From db7f2791e29bc2e870188f24836a3f2fbed34e4c Mon Sep 17 00:00:00 2001 From: Ivan Danyliuk Date: Wed, 19 Sep 2018 21:06:30 +0300 Subject: [PATCH] Add debug info for propagation log --- page.go | 26 +- whispervis.js | 90917 +++++++++++++++++++++++++++++++++++++++- whispervis.js.map | 2 +- widgets/simulation.go | 51 +- 4 files changed, 90865 insertions(+), 131 deletions(-) diff --git a/page.go b/page.go index 81570ea..eacdc2e 100644 --- a/page.go +++ b/page.go @@ -1,9 +1,10 @@ package main import ( + "bytes" "fmt" - "github.com/divan/graphx/graph" + "github.com/divan/graphx/formats" "github.com/divan/graphx/layout" "github.com/gopherjs/vecty" "github.com/gopherjs/vecty/elem" @@ -25,19 +26,17 @@ type Page struct { forceEditor *widgets.ForceEditor network *NetworkSelector simulationConf *widgets.Simulation - - data *graph.Graph } // NewPage creates and inits new app page. func NewPage() *Page { page := &Page{ - loader: widgets.NewLoader(), - forceEditor: widgets.NewForceEditor(), - simulationConf: widgets.NewSimulation(""), + loader: widgets.NewLoader(), + forceEditor: widgets.NewForceEditor(), } page.network = NewNetworkSelector(page.onNetworkChange) page.webgl = NewWebGLScene() + page.simulationConf = widgets.NewSimulation("localhost:8084", page.CurrentNetwork) return page } @@ -119,8 +118,19 @@ func (p *Page) onUpdateClick(e *vecty.Event) { func (p *Page) onNetworkChange(network *Network) { fmt.Println("Network changed:", network) - p.data = network.Data config := p.forceEditor.Config() - p.layout = layout.NewFromConfig(p.data, config.Config) + p.layout = layout.NewFromConfig(network.Data, config.Config) go p.UpdateGraph() } + +// CurrentNetwork returns JSON encoded description of the current graph/network. +func (p *Page) CurrentNetwork() []byte { + net := p.network.current.Data + var buf bytes.Buffer + err := formats.NewD3JSON(&buf, true).ExportGraph(net) + if err != nil { + fmt.Println("[ERROR] Can't export graph:", err) + return nil + } + return buf.Bytes() +} diff --git a/whispervis.js b/whispervis.js index 9615588..d9a6782 100644 --- a/whispervis.js +++ b/whispervis.js @@ -2246,22 +2246,182 @@ $packages["github.com/gopherjs/gopherjs/js"] = (function() { return $pkg; })(); $packages["internal/cpu"] = (function() { - var $pkg = {}, $init; + var $pkg = {}, $init, x86, arm64, s390x, arrayType; + x86 = $pkg.x86 = $newType(0, $kindStruct, "cpu.x86", true, "internal/cpu", false, function(_$0_, HasAES_, HasADX_, HasAVX_, HasAVX2_, HasBMI1_, HasBMI2_, HasERMS_, HasFMA_, HasOSXSAVE_, HasPCLMULQDQ_, HasPOPCNT_, HasSSE2_, HasSSE3_, HasSSSE3_, HasSSE41_, HasSSE42_, _$17_) { + this.$val = this; + if (arguments.length === 0) { + this._$0 = arrayType.zero(); + this.HasAES = false; + this.HasADX = false; + this.HasAVX = false; + this.HasAVX2 = false; + this.HasBMI1 = false; + this.HasBMI2 = false; + this.HasERMS = false; + this.HasFMA = false; + this.HasOSXSAVE = false; + this.HasPCLMULQDQ = false; + this.HasPOPCNT = false; + this.HasSSE2 = false; + this.HasSSE3 = false; + this.HasSSSE3 = false; + this.HasSSE41 = false; + this.HasSSE42 = false; + this._$17 = arrayType.zero(); + return; + } + this._$0 = _$0_; + this.HasAES = HasAES_; + this.HasADX = HasADX_; + this.HasAVX = HasAVX_; + this.HasAVX2 = HasAVX2_; + this.HasBMI1 = HasBMI1_; + this.HasBMI2 = HasBMI2_; + this.HasERMS = HasERMS_; + this.HasFMA = HasFMA_; + this.HasOSXSAVE = HasOSXSAVE_; + this.HasPCLMULQDQ = HasPCLMULQDQ_; + this.HasPOPCNT = HasPOPCNT_; + this.HasSSE2 = HasSSE2_; + this.HasSSE3 = HasSSE3_; + this.HasSSSE3 = HasSSSE3_; + this.HasSSE41 = HasSSE41_; + this.HasSSE42 = HasSSE42_; + this._$17 = _$17_; + }); + arm64 = $pkg.arm64 = $newType(0, $kindStruct, "cpu.arm64", true, "internal/cpu", false, function(_$0_, HasFP_, HasASIMD_, HasEVTSTRM_, HasAES_, HasPMULL_, HasSHA1_, HasSHA2_, HasCRC32_, HasATOMICS_, HasFPHP_, HasASIMDHP_, HasCPUID_, HasASIMDRDM_, HasJSCVT_, HasFCMA_, HasLRCPC_, HasDCPOP_, HasSHA3_, HasSM3_, HasSM4_, HasASIMDDP_, HasSHA512_, HasSVE_, HasASIMDFHM_, _$25_) { + this.$val = this; + if (arguments.length === 0) { + this._$0 = arrayType.zero(); + this.HasFP = false; + this.HasASIMD = false; + this.HasEVTSTRM = false; + this.HasAES = false; + this.HasPMULL = false; + this.HasSHA1 = false; + this.HasSHA2 = false; + this.HasCRC32 = false; + this.HasATOMICS = false; + this.HasFPHP = false; + this.HasASIMDHP = false; + this.HasCPUID = false; + this.HasASIMDRDM = false; + this.HasJSCVT = false; + this.HasFCMA = false; + this.HasLRCPC = false; + this.HasDCPOP = false; + this.HasSHA3 = false; + this.HasSM3 = false; + this.HasSM4 = false; + this.HasASIMDDP = false; + this.HasSHA512 = false; + this.HasSVE = false; + this.HasASIMDFHM = false; + this._$25 = arrayType.zero(); + return; + } + this._$0 = _$0_; + this.HasFP = HasFP_; + this.HasASIMD = HasASIMD_; + this.HasEVTSTRM = HasEVTSTRM_; + this.HasAES = HasAES_; + this.HasPMULL = HasPMULL_; + this.HasSHA1 = HasSHA1_; + this.HasSHA2 = HasSHA2_; + this.HasCRC32 = HasCRC32_; + this.HasATOMICS = HasATOMICS_; + this.HasFPHP = HasFPHP_; + this.HasASIMDHP = HasASIMDHP_; + this.HasCPUID = HasCPUID_; + this.HasASIMDRDM = HasASIMDRDM_; + this.HasJSCVT = HasJSCVT_; + this.HasFCMA = HasFCMA_; + this.HasLRCPC = HasLRCPC_; + this.HasDCPOP = HasDCPOP_; + this.HasSHA3 = HasSHA3_; + this.HasSM3 = HasSM3_; + this.HasSM4 = HasSM4_; + this.HasASIMDDP = HasASIMDDP_; + this.HasSHA512 = HasSHA512_; + this.HasSVE = HasSVE_; + this.HasASIMDFHM = HasASIMDFHM_; + this._$25 = _$25_; + }); + s390x = $pkg.s390x = $newType(0, $kindStruct, "cpu.s390x", true, "internal/cpu", false, function(_$0_, HasZArch_, HasSTFLE_, HasLDisp_, HasEImm_, HasDFP_, HasETF3Enhanced_, HasMSA_, HasAES_, HasAESCBC_, HasAESCTR_, HasAESGCM_, HasGHASH_, HasSHA1_, HasSHA256_, HasSHA512_, HasVX_, _$17_) { + this.$val = this; + if (arguments.length === 0) { + this._$0 = arrayType.zero(); + this.HasZArch = false; + this.HasSTFLE = false; + this.HasLDisp = false; + this.HasEImm = false; + this.HasDFP = false; + this.HasETF3Enhanced = false; + this.HasMSA = false; + this.HasAES = false; + this.HasAESCBC = false; + this.HasAESCTR = false; + this.HasAESGCM = false; + this.HasGHASH = false; + this.HasSHA1 = false; + this.HasSHA256 = false; + this.HasSHA512 = false; + this.HasVX = false; + this._$17 = arrayType.zero(); + return; + } + this._$0 = _$0_; + this.HasZArch = HasZArch_; + this.HasSTFLE = HasSTFLE_; + this.HasLDisp = HasLDisp_; + this.HasEImm = HasEImm_; + this.HasDFP = HasDFP_; + this.HasETF3Enhanced = HasETF3Enhanced_; + this.HasMSA = HasMSA_; + this.HasAES = HasAES_; + this.HasAESCBC = HasAESCBC_; + this.HasAESCTR = HasAESCTR_; + this.HasAESGCM = HasAESGCM_; + this.HasGHASH = HasGHASH_; + this.HasSHA1 = HasSHA1_; + this.HasSHA256 = HasSHA256_; + this.HasSHA512 = HasSHA512_; + this.HasVX = HasVX_; + this._$17 = _$17_; + }); + arrayType = $arrayType($Uint8, 0); + x86.init("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasADX", name: "HasADX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX", name: "HasAVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX2", name: "HasAVX2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI1", name: "HasBMI1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI2", name: "HasBMI2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasERMS", name: "HasERMS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasFMA", name: "HasFMA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasOSXSAVE", name: "HasOSXSAVE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPCLMULQDQ", name: "HasPCLMULQDQ", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPOPCNT", name: "HasPOPCNT", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE2", name: "HasSSE2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE3", name: "HasSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSSE3", name: "HasSSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE41", name: "HasSSE41", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE42", name: "HasSSE42", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$17", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}]); + arm64.init("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "HasFP", name: "HasFP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasASIMD", name: "HasASIMD", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEVTSTRM", name: "HasEVTSTRM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPMULL", name: "HasPMULL", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA2", name: "HasSHA2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCRC32", name: "HasCRC32", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasATOMICS", name: "HasATOMICS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasFPHP", name: "HasFPHP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasASIMDHP", name: "HasASIMDHP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCPUID", name: "HasCPUID", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasASIMDRDM", name: "HasASIMDRDM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasJSCVT", name: "HasJSCVT", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasFCMA", name: "HasFCMA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasLRCPC", name: "HasLRCPC", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasDCPOP", name: "HasDCPOP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA3", name: "HasSHA3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSM3", name: "HasSM3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSM4", name: "HasSM4", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasASIMDDP", name: "HasASIMDDP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA512", name: "HasSHA512", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSVE", name: "HasSVE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasASIMDFHM", name: "HasASIMDFHM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$25", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}]); + s390x.init("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "HasZArch", name: "HasZArch", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSTFLE", name: "HasSTFLE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasLDisp", name: "HasLDisp", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEImm", name: "HasEImm", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasDFP", name: "HasDFP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasETF3Enhanced", name: "HasETF3Enhanced", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasMSA", name: "HasMSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCBC", name: "HasAESCBC", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCTR", name: "HasAESCTR", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESGCM", name: "HasAESGCM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasGHASH", name: "HasGHASH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA256", name: "HasSHA256", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA512", name: "HasSHA512", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasVX", name: "HasVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$17", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $pkg.X86 = new x86.ptr(arrayType.zero(), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, arrayType.zero()); + $pkg.ARM64 = new arm64.ptr(arrayType.zero(), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, arrayType.zero()); + $pkg.S390X = new s390x.ptr(arrayType.zero(), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, arrayType.zero()); /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; }; $pkg.$init = $init; return $pkg; })(); $packages["internal/bytealg"] = (function() { - var $pkg = {}, $init, cpu; + var $pkg = {}, $init, cpu, Index, Cutover; cpu = $packages["internal/cpu"]; + Index = function(a, b) { + var a, b; + $panic(new $String("unimplemented")); + }; + $pkg.Index = Index; + Cutover = function(n) { + var n; + $panic(new $String("unimplemented")); + }; + $pkg.Cutover = Cutover; $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: $r = cpu.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.MaxLen = 0; /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; }; $pkg.$init = $init; @@ -2278,7 +2438,7 @@ $packages["runtime/internal/sys"] = (function() { return $pkg; })(); $packages["runtime"] = (function() { - var $pkg = {}, $init, js, bytealg, sys, _type, TypeAssertionError, errorString, ptrType, structType, ptrType$4, init, GOROOT, Caller, Goexit, Gosched, SetFinalizer, KeepAlive, throw$1; + var $pkg = {}, $init, js, bytealg, sys, _type, TypeAssertionError, errorString, ptrType, structType, ptrType$4, init, GOROOT, Caller, Goexit, Gosched, SetFinalizer, Stack, KeepAlive, throw$1; js = $packages["github.com/gopherjs/gopherjs/js"]; bytealg = $packages["internal/bytealg"]; sys = $packages["runtime/internal/sys"]; @@ -2396,6 +2556,15 @@ $packages["runtime"] = (function() { var f, x; }; $pkg.SetFinalizer = SetFinalizer; + Stack = function(buf, all) { + var all, buf, s; + s = new ($global.Error)().stack; + if (s === undefined) { + return 0; + } + return $copyString(buf, $internalize(s.substr(($parseInt(s.indexOf($externalize("\n", $String))) >> 0) + 1 >> 0), $String)); + }; + $pkg.Stack = Stack; KeepAlive = function(param) { var param; }; @@ -2530,7 +2699,7 @@ $packages["internal/race"] = (function() { return $pkg; })(); $packages["sync/atomic"] = (function() { - var $pkg = {}, $init, js, Value, ptrType, CompareAndSwapInt32, CompareAndSwapUint64, AddInt32, LoadInt32, LoadUint32, LoadUint64, StoreInt32, StoreUint32; + var $pkg = {}, $init, js, Value, ptrType, CompareAndSwapInt32, CompareAndSwapUint64, CompareAndSwapPointer, AddInt32, AddUint32, LoadInt32, LoadUint32, LoadUint64, LoadPointer, StoreInt32, StoreUint32, StoreUint64, StorePointer; js = $packages["github.com/gopherjs/gopherjs/js"]; Value = $pkg.Value = $newType(0, $kindStruct, "atomic.Value", true, "sync/atomic", true, function(v_) { this.$val = this; @@ -2559,6 +2728,15 @@ $packages["sync/atomic"] = (function() { return false; }; $pkg.CompareAndSwapUint64 = CompareAndSwapUint64; + CompareAndSwapPointer = function(addr, old, new$1) { + var addr, new$1, old; + if (addr.$get() === old) { + addr.$set(new$1); + return true; + } + return false; + }; + $pkg.CompareAndSwapPointer = CompareAndSwapPointer; AddInt32 = function(addr, delta) { var addr, delta, new$1; new$1 = addr.$get() + delta >> 0; @@ -2566,6 +2744,13 @@ $packages["sync/atomic"] = (function() { return new$1; }; $pkg.AddInt32 = AddInt32; + AddUint32 = function(addr, delta) { + var addr, delta, new$1; + new$1 = addr.$get() + delta >>> 0; + addr.$set(new$1); + return new$1; + }; + $pkg.AddUint32 = AddUint32; LoadInt32 = function(addr) { var addr; return addr.$get(); @@ -2581,6 +2766,11 @@ $packages["sync/atomic"] = (function() { return addr.$get(); }; $pkg.LoadUint64 = LoadUint64; + LoadPointer = function(addr) { + var addr; + return addr.$get(); + }; + $pkg.LoadPointer = LoadPointer; StoreInt32 = function(addr, val) { var addr, val; addr.$set(val); @@ -2591,6 +2781,16 @@ $packages["sync/atomic"] = (function() { addr.$set(val); }; $pkg.StoreUint32 = StoreUint32; + StoreUint64 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + $pkg.StoreUint64 = StoreUint64; + StorePointer = function(addr, val) { + var addr, val; + addr.$set(val); + }; + $pkg.StorePointer = StorePointer; Value.ptr.prototype.Load = function() { var v, x; x = $ifaceNil; @@ -2623,11 +2823,29 @@ $packages["sync/atomic"] = (function() { return $pkg; })(); $packages["sync"] = (function() { - var $pkg = {}, $init, js, race, runtime, atomic, Pool, Mutex, Locker, Once, poolLocalInternal, poolLocal, notifyList, RWMutex, rlocker, ptrType, sliceType, ptrType$1, chanType, sliceType$1, ptrType$6, ptrType$7, sliceType$4, ptrType$8, ptrType$9, funcType, ptrType$16, funcType$2, ptrType$17, arrayType$2, semWaiters, semAwoken, expunged, allPools, runtime_registerPoolCleanup, runtime_SemacquireMutex, runtime_Semrelease, runtime_notifyListCheck, runtime_canSpin, runtime_nanotime, throw$1, poolCleanup, init, indexLocal, init$1, runtime_doSpin; + var $pkg = {}, $init, js, race, runtime, atomic, Cond, Pool, WaitGroup, copyChecker, noCopy, Map, readOnly, entry, Mutex, Locker, Once, poolLocalInternal, poolLocal, notifyList, RWMutex, rlocker, ptrType, sliceType, ptrType$1, chanType, sliceType$1, structType, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, sliceType$4, ptrType$8, ptrType$9, ptrType$10, ptrType$11, funcType, arrayType$1, ptrType$12, chanType$1, ptrType$13, ptrType$14, funcType$1, ptrType$15, mapType, ptrType$16, funcType$2, ptrType$17, arrayType$2, semWaiters, semAwoken, expunged, allPools, runtime_registerPoolCleanup, runtime_SemacquireMutex, runtime_Semrelease, runtime_notifyListCheck, runtime_canSpin, runtime_nanotime, throw$1, NewCond, newEntry, poolCleanup, init, indexLocal, init$1, runtime_doSpin; js = $packages["github.com/gopherjs/gopherjs/js"]; race = $packages["internal/race"]; runtime = $packages["runtime"]; atomic = $packages["sync/atomic"]; + Cond = $pkg.Cond = $newType(0, $kindStruct, "sync.Cond", true, "sync", true, function(noCopy_, L_, notify_, checker_, n_, ch_) { + this.$val = this; + if (arguments.length === 0) { + this.noCopy = new noCopy.ptr(); + this.L = $ifaceNil; + this.notify = new notifyList.ptr(0, 0, 0, 0, 0); + this.checker = 0; + this.n = 0; + this.ch = $chanNil; + return; + } + this.noCopy = noCopy_; + this.L = L_; + this.notify = notify_; + this.checker = checker_; + this.n = n_; + this.ch = ch_; + }); Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", true, "sync", true, function(local_, localSize_, store_, New_) { this.$val = this; if (arguments.length === 0) { @@ -2642,6 +2860,57 @@ $packages["sync"] = (function() { this.store = store_; this.New = New_; }); + WaitGroup = $pkg.WaitGroup = $newType(0, $kindStruct, "sync.WaitGroup", true, "sync", true, function(counter_, ch_, state1_) { + this.$val = this; + if (arguments.length === 0) { + this.counter = 0; + this.ch = $chanNil; + this.state1 = arrayType$1.zero(); + return; + } + this.counter = counter_; + this.ch = ch_; + this.state1 = state1_; + }); + copyChecker = $pkg.copyChecker = $newType(4, $kindUintptr, "sync.copyChecker", true, "sync", false, null); + noCopy = $pkg.noCopy = $newType(0, $kindStruct, "sync.noCopy", true, "sync", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + Map = $pkg.Map = $newType(0, $kindStruct, "sync.Map", true, "sync", true, function(mu_, read_, dirty_, misses_) { + this.$val = this; + if (arguments.length === 0) { + this.mu = new Mutex.ptr(0, 0); + this.read = new atomic.Value.ptr($ifaceNil); + this.dirty = false; + this.misses = 0; + return; + } + this.mu = mu_; + this.read = read_; + this.dirty = dirty_; + this.misses = misses_; + }); + readOnly = $pkg.readOnly = $newType(0, $kindStruct, "sync.readOnly", true, "sync", false, function(m_, amended_) { + this.$val = this; + if (arguments.length === 0) { + this.m = false; + this.amended = false; + return; + } + this.m = m_; + this.amended = amended_; + }); + entry = $pkg.entry = $newType(0, $kindStruct, "sync.entry", true, "sync", false, function(p_) { + this.$val = this; + if (arguments.length === 0) { + this.p = 0; + return; + } + this.p = p_; + }); Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", true, "sync", true, function(state_, sema_) { this.$val = this; if (arguments.length === 0) { @@ -2738,16 +3007,75 @@ $packages["sync"] = (function() { ptrType$1 = $ptrType($Uint32); chanType = $chanType($Bool, false, false); sliceType$1 = $sliceType(chanType); + structType = $structType("", []); + ptrType$3 = $ptrType($emptyInterface); + ptrType$4 = $ptrType(entry); + ptrType$5 = $ptrType($UnsafePointer); ptrType$6 = $ptrType($Int32); ptrType$7 = $ptrType(poolLocal); sliceType$4 = $sliceType($emptyInterface); ptrType$8 = $ptrType(rlocker); ptrType$9 = $ptrType(RWMutex); + ptrType$10 = $ptrType($Uint64); + ptrType$11 = $ptrType(Cond); funcType = $funcType([], [$emptyInterface], false); + arrayType$1 = $arrayType($Uint32, 3); + ptrType$12 = $ptrType(WaitGroup); + chanType$1 = $chanType(structType, false, false); + ptrType$13 = $ptrType(copyChecker); + ptrType$14 = $ptrType(noCopy); + funcType$1 = $funcType([$emptyInterface, $emptyInterface], [$Bool], false); + ptrType$15 = $ptrType(Map); + mapType = $mapType($emptyInterface, ptrType$4); ptrType$16 = $ptrType(Mutex); funcType$2 = $funcType([], [], false); ptrType$17 = $ptrType(Once); arrayType$2 = $arrayType($Uint8, 100); + Cond.ptr.prototype.Wait = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + c.n = c.n + (1) >> 0; + if (c.ch === $chanNil) { + c.ch = new $Chan($Bool, 0); + } + $r = c.L.Unlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = $recv(c.ch); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r[0]; + $r = c.L.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Cond.ptr.prototype.Wait }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + Cond.prototype.Wait = function() { return this.$val.Wait(); }; + Cond.ptr.prototype.Signal = function() { + var c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.n === 0) { + $s = -1; return; + } + c.n = c.n - (1) >> 0; + $r = $send(c.ch, true); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Cond.ptr.prototype.Signal }; } $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + Cond.prototype.Signal = function() { return this.$val.Signal(); }; + Cond.ptr.prototype.Broadcast = function() { + var c, i, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; i = $f.i; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + n = c.n; + c.n = 0; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } + $r = $send(c.ch, true); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Cond.ptr.prototype.Broadcast }; } $f.c = c; $f.i = i; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + Cond.prototype.Broadcast = function() { return this.$val.Broadcast(); }; Pool.ptr.prototype.Get = function() { var _r, p, x, x$1, x$2, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -2837,6 +3165,470 @@ $packages["sync"] = (function() { var s; $throwRuntimeError($externalize(s, $String)); }; + WaitGroup.ptr.prototype.Add = function(delta) { + var delta, wg; + wg = this; + wg.counter = wg.counter + (delta) >> 0; + if (wg.counter < 0) { + $panic(new $String("sync: negative WaitGroup counter")); + } + if (wg.counter > 0 && wg.ch === $chanNil) { + wg.ch = new $Chan(structType, 0); + } + if ((wg.counter === 0) && !(wg.ch === $chanNil)) { + $close(wg.ch); + wg.ch = $chanNil; + } + }; + WaitGroup.prototype.Add = function(delta) { return this.$val.Add(delta); }; + WaitGroup.ptr.prototype.Wait = function() { + var _r, wg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; wg = $f.wg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + wg = this; + /* */ if (wg.counter > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (wg.counter > 0) { */ case 1: + _r = $recv(wg.ch); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r[0]; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: WaitGroup.ptr.prototype.Wait }; } $f._r = _r; $f.wg = wg; $f.$s = $s; $f.$r = $r; return $f; + }; + WaitGroup.prototype.Wait = function() { return this.$val.Wait(); }; + NewCond = function(l) { + var l; + return new Cond.ptr(new noCopy.ptr(), l, new notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); + }; + $pkg.NewCond = NewCond; + noCopy.ptr.prototype.Lock = function() { + }; + noCopy.prototype.Lock = function() { return this.$val.Lock(); }; + noCopy.ptr.prototype.Unlock = function() { + }; + noCopy.prototype.Unlock = function() { return this.$val.Unlock(); }; + newEntry = function(i) { + var i, i$24ptr; + return new entry.ptr(((i$24ptr || (i$24ptr = new ptrType$3(function() { return i; }, function($v) { i = $v; }))))); + }; + Map.ptr.prototype.Load = function(key) { + var _entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, m, ok, read, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; e = $f.e; key = $f.key; m = $f.m; ok = $f.ok; read = $f.read; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + value = $ifaceNil; + ok = false; + m = this; + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + e = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok && read.amended) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!ok && read.amended) { */ case 1: + $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$2 = $assertType(m.read.Load(), readOnly, true); + readOnly.copy(read, _tuple$2[0]); + _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$4.nil, false]); + e = _tuple$3[0]; + ok = _tuple$3[1]; + if (!ok && read.amended) { + _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$4.nil, false]); + e = _tuple$4[0]; + ok = _tuple$4[1]; + m.missLocked(); + } + $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!ok) { + _tmp = $ifaceNil; + _tmp$1 = false; + value = _tmp; + ok = _tmp$1; + $s = -1; return [value, ok]; + } + _tuple$5 = e.load(); + value = _tuple$5[0]; + ok = _tuple$5[1]; + $s = -1; return [value, ok]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Map.ptr.prototype.Load }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.e = e; $f.key = key; $f.m = m; $f.ok = ok; $f.read = read; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + Map.prototype.Load = function(key) { return this.$val.Load(key); }; + entry.ptr.prototype.load = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, ok, p, value; + value = $ifaceNil; + ok = false; + e = this; + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === 0 || p === expunged) { + _tmp = $ifaceNil; + _tmp$1 = false; + value = _tmp; + ok = _tmp$1; + return [value, ok]; + } + _tmp$2 = (p).$get(); + _tmp$3 = true; + value = _tmp$2; + ok = _tmp$3; + return [value, ok]; + }; + entry.prototype.load = function() { return this.$val.load(); }; + Map.ptr.prototype.Store = function(key, value) { + var _entry, _entry$1, _entry$2, _key, _key$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, e, e$1, e$2, key, m, ok, ok$1, ok$2, read, value, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _key = $f._key; _key$1 = $f._key$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; e = $f.e; e$1 = $f.e$1; e$2 = $f.e$2; key = $f.key; m = $f.m; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; read = $f.read; value = $f.value; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + value = [value]; + m = this; + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + e = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok && e.tryStore((value.$ptr || (value.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))))) { + $s = -1; return; + } + $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$2 = $assertType(m.read.Load(), readOnly, true); + readOnly.copy(read, _tuple$2[0]); + _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$4.nil, false]); + e$1 = _tuple$3[0]; + ok$1 = _tuple$3[1]; + if (ok$1) { + if (e$1.unexpungeLocked()) { + _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 }; + } + e$1.storeLocked((value.$ptr || (value.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value)))); + } else { + _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$4.nil, false]); + e$2 = _tuple$4[0]; + ok$2 = _tuple$4[1]; + if (ok$2) { + e$2.storeLocked((value.$ptr || (value.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value)))); + } else { + if (!read.amended) { + m.dirtyLocked(); + m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x))); + } + _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value[0]) }; + } + } + $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Map.ptr.prototype.Store }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._key = _key; $f._key$1 = _key$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.e = e; $f.e$1 = e$1; $f.e$2 = e$2; $f.key = key; $f.m = m; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.read = read; $f.value = value; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Map.prototype.Store = function(key, value) { return this.$val.Store(key, value); }; + entry.ptr.prototype.tryStore = function(i) { + var e, i, p; + e = this; + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === expunged) { + return false; + } + while (true) { + if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, (i))) { + return true; + } + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === expunged) { + return false; + } + } + }; + entry.prototype.tryStore = function(i) { return this.$val.tryStore(i); }; + entry.ptr.prototype.unexpungeLocked = function() { + var e, wasExpunged; + wasExpunged = false; + e = this; + wasExpunged = atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), expunged, 0); + return wasExpunged; + }; + entry.prototype.unexpungeLocked = function() { return this.$val.unexpungeLocked(); }; + entry.ptr.prototype.storeLocked = function(i) { + var e, i; + e = this; + atomic.StorePointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), (i)); + }; + entry.prototype.storeLocked = function(i) { return this.$val.storeLocked(i); }; + Map.ptr.prototype.LoadOrStore = function(key, value) { + var _entry, _entry$1, _entry$2, _key, _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, actual, actual$1, e, e$1, e$2, key, loaded, loaded$1, m, ok, ok$1, ok$2, ok$3, read, value, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _key = $f._key; _key$1 = $f._key$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; actual = $f.actual; actual$1 = $f.actual$1; e = $f.e; e$1 = $f.e$1; e$2 = $f.e$2; key = $f.key; loaded = $f.loaded; loaded$1 = $f.loaded$1; m = $f.m; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; ok$3 = $f.ok$3; read = $f.read; value = $f.value; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + actual = $ifaceNil; + loaded = false; + m = this; + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + e = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + _tuple$2 = e.tryLoadOrStore(value); + actual$1 = _tuple$2[0]; + loaded$1 = _tuple$2[1]; + ok$1 = _tuple$2[2]; + if (ok$1) { + _tmp = actual$1; + _tmp$1 = loaded$1; + actual = _tmp; + loaded = _tmp$1; + $s = -1; return [actual, loaded]; + } + } + $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$3 = $assertType(m.read.Load(), readOnly, true); + readOnly.copy(read, _tuple$3[0]); + _tuple$4 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$4.nil, false]); + e$1 = _tuple$4[0]; + ok$2 = _tuple$4[1]; + if (ok$2) { + if (e$1.unexpungeLocked()) { + _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 }; + } + _tuple$5 = e$1.tryLoadOrStore(value); + actual = _tuple$5[0]; + loaded = _tuple$5[1]; + } else { + _tuple$6 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$4.nil, false]); + e$2 = _tuple$6[0]; + ok$3 = _tuple$6[1]; + if (ok$3) { + _tuple$7 = e$2.tryLoadOrStore(value); + actual = _tuple$7[0]; + loaded = _tuple$7[1]; + m.missLocked(); + } else { + if (!read.amended) { + m.dirtyLocked(); + m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x))); + } + _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value) }; + _tmp$2 = value; + _tmp$3 = false; + actual = _tmp$2; + loaded = _tmp$3; + } + } + $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$4 = actual; + _tmp$5 = loaded; + actual = _tmp$4; + loaded = _tmp$5; + $s = -1; return [actual, loaded]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Map.ptr.prototype.LoadOrStore }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._key = _key; $f._key$1 = _key$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f.actual = actual; $f.actual$1 = actual$1; $f.e = e; $f.e$1 = e$1; $f.e$2 = e$2; $f.key = key; $f.loaded = loaded; $f.loaded$1 = loaded$1; $f.m = m; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.ok$3 = ok$3; $f.read = read; $f.value = value; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Map.prototype.LoadOrStore = function(key, value) { return this.$val.LoadOrStore(key, value); }; + entry.ptr.prototype.tryLoadOrStore = function(i) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, actual, e, i, ic, ic$24ptr, loaded, ok, p; + actual = $ifaceNil; + loaded = false; + ok = false; + e = this; + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === expunged) { + _tmp = $ifaceNil; + _tmp$1 = false; + _tmp$2 = false; + actual = _tmp; + loaded = _tmp$1; + ok = _tmp$2; + return [actual, loaded, ok]; + } + if (!(p === 0)) { + _tmp$3 = (p).$get(); + _tmp$4 = true; + _tmp$5 = true; + actual = _tmp$3; + loaded = _tmp$4; + ok = _tmp$5; + return [actual, loaded, ok]; + } + ic = i; + while (true) { + if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, ((ic$24ptr || (ic$24ptr = new ptrType$3(function() { return ic; }, function($v) { ic = $v; })))))) { + _tmp$6 = i; + _tmp$7 = false; + _tmp$8 = true; + actual = _tmp$6; + loaded = _tmp$7; + ok = _tmp$8; + return [actual, loaded, ok]; + } + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === expunged) { + _tmp$9 = $ifaceNil; + _tmp$10 = false; + _tmp$11 = false; + actual = _tmp$9; + loaded = _tmp$10; + ok = _tmp$11; + return [actual, loaded, ok]; + } + if (!(p === 0)) { + _tmp$12 = (p).$get(); + _tmp$13 = true; + _tmp$14 = true; + actual = _tmp$12; + loaded = _tmp$13; + ok = _tmp$14; + return [actual, loaded, ok]; + } + } + }; + entry.prototype.tryLoadOrStore = function(i) { return this.$val.tryLoadOrStore(i); }; + Map.ptr.prototype.Delete = function(key) { + var _entry, _entry$1, _tuple, _tuple$1, _tuple$2, _tuple$3, e, key, m, ok, read, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; e = $f.e; key = $f.key; m = $f.m; ok = $f.ok; read = $f.read; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + e = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok && read.amended) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!ok && read.amended) { */ case 1: + $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$2 = $assertType(m.read.Load(), readOnly, true); + readOnly.copy(read, _tuple$2[0]); + _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$4.nil, false]); + e = _tuple$3[0]; + ok = _tuple$3[1]; + if (!ok && read.amended) { + delete m.dirty[$emptyInterface.keyFor(key)]; + } + $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (ok) { + e.delete$(); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Map.ptr.prototype.Delete }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.e = e; $f.key = key; $f.m = m; $f.ok = ok; $f.read = read; $f.$s = $s; $f.$r = $r; return $f; + }; + Map.prototype.Delete = function(key) { return this.$val.Delete(key); }; + entry.ptr.prototype.delete$ = function() { + var e, hadValue, p; + hadValue = false; + e = this; + while (true) { + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + if (p === 0 || p === expunged) { + hadValue = false; + return hadValue; + } + if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, 0)) { + hadValue = true; + return hadValue; + } + } + }; + entry.prototype.delete$ = function() { return this.$val.delete$(); }; + Map.ptr.prototype.Range = function(f) { + var _entry, _i, _keys, _r, _ref, _tuple, _tuple$1, _tuple$2, e, f, k, m, ok, read, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r = $f._r; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; e = $f.e; f = $f.f; k = $f.k; m = $f.m; ok = $f.ok; read = $f.read; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + /* */ if (read.amended) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (read.amended) { */ case 1: + $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$1 = $assertType(m.read.Load(), readOnly, true); + readOnly.copy(read, _tuple$1[0]); + if (read.amended) { + readOnly.copy(read, new readOnly.ptr(m.dirty, false)); + m.read.Store(new read.constructor.elem(read)); + m.dirty = false; + m.misses = 0; + } + $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _ref = read.m; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 5: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 6; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 5; continue; + } + k = _entry.k; + e = _entry.v; + _tuple$2 = e.load(); + v = _tuple$2[0]; + ok = _tuple$2[1]; + /* */ if (!ok) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!ok) { */ case 7: + _i++; + /* continue; */ $s = 5; continue; + /* } */ case 8: + _r = f(k, v); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!_r) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!_r) { */ case 9: + /* break; */ $s = 6; continue; + /* } */ case 10: + _i++; + /* } */ $s = 5; continue; case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Map.ptr.prototype.Range }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r = _r; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.e = e; $f.f = f; $f.k = k; $f.m = m; $f.ok = ok; $f.read = read; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Map.prototype.Range = function(f) { return this.$val.Range(f); }; + Map.ptr.prototype.missLocked = function() { + var m, x; + m = this; + m.misses = m.misses + (1) >> 0; + if (m.misses < $keys(m.dirty).length) { + return; + } + m.read.Store((x = new readOnly.ptr(m.dirty, false), new x.constructor.elem(x))); + m.dirty = false; + m.misses = 0; + }; + Map.prototype.missLocked = function() { return this.$val.missLocked(); }; + Map.ptr.prototype.dirtyLocked = function() { + var _entry, _i, _key, _keys, _ref, _tuple, e, k, m, read, x; + m = this; + if (!(m.dirty === false)) { + return; + } + _tuple = $assertType(m.read.Load(), readOnly, true); + read = $clone(_tuple[0], readOnly); + m.dirty = (x = $keys(read.m).length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + _ref = read.m; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + e = _entry.v; + if (!e.tryExpungeLocked()) { + _key = k; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e }; + } + _i++; + } + }; + Map.prototype.dirtyLocked = function() { return this.$val.dirtyLocked(); }; + entry.ptr.prototype.tryExpungeLocked = function() { + var e, isExpunged, p; + isExpunged = false; + e = this; + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + while (true) { + if (!(p === 0)) { break; } + if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, expunged)) { + isExpunged = true; + return isExpunged; + } + p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); + } + isExpunged = p === expunged; + return isExpunged; + }; + entry.prototype.tryExpungeLocked = function() { return this.$val.tryExpungeLocked(); }; Mutex.ptr.prototype.Lock = function() { var awoke, delta, iter, m, new$1, old, queueLifo, starving, waitStartTime, x, x$1, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; awoke = $f.awoke; delta = $f.delta; iter = $f.iter; m = $f.m; new$1 = $f.new$1; old = $f.old; queueLifo = $f.queueLifo; starving = $f.starving; waitStartTime = $f.waitStartTime; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3148,12 +3940,30 @@ $packages["sync"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: rlocker.ptr.prototype.Unlock }; } $f.r = r; $f.$s = $s; $f.$r = $r; return $f; }; rlocker.prototype.Unlock = function() { return this.$val.Unlock(); }; + WaitGroup.ptr.prototype.Done = function() { + var wg; + wg = this; + wg.Add(-1); + }; + WaitGroup.prototype.Done = function() { return this.$val.Done(); }; + ptrType$11.methods = [{prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}, {prop: "Signal", name: "Signal", pkg: "", typ: $funcType([], [], false)}, {prop: "Broadcast", name: "Broadcast", pkg: "", typ: $funcType([], [], false)}]; ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "getSlow", name: "getSlow", pkg: "sync", typ: $funcType([], [$emptyInterface], false)}, {prop: "pin", name: "pin", pkg: "sync", typ: $funcType([], [ptrType$7], false)}, {prop: "pinSlow", name: "pinSlow", pkg: "sync", typ: $funcType([], [ptrType$7], false)}]; + ptrType$12.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}, {prop: "state", name: "state", pkg: "sync", typ: $funcType([], [ptrType$10, ptrType$1], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}]; + ptrType$13.methods = [{prop: "check", name: "check", pkg: "sync", typ: $funcType([], [], false)}]; + ptrType$14.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$15.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [], false)}, {prop: "LoadOrStore", name: "LoadOrStore", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "missLocked", name: "missLocked", pkg: "sync", typ: $funcType([], [], false)}, {prop: "dirtyLocked", name: "dirtyLocked", pkg: "sync", typ: $funcType([], [], false)}]; + ptrType$4.methods = [{prop: "load", name: "load", pkg: "sync", typ: $funcType([], [$emptyInterface, $Bool], false)}, {prop: "tryStore", name: "tryStore", pkg: "sync", typ: $funcType([ptrType$3], [$Bool], false)}, {prop: "unexpungeLocked", name: "unexpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}, {prop: "storeLocked", name: "storeLocked", pkg: "sync", typ: $funcType([ptrType$3], [], false)}, {prop: "tryLoadOrStore", name: "tryLoadOrStore", pkg: "sync", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool, $Bool], false)}, {prop: "delete$", name: "delete", pkg: "sync", typ: $funcType([], [$Bool], false)}, {prop: "tryExpungeLocked", name: "tryExpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}]; ptrType$16.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; ptrType$17.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$2], [], false)}]; ptrType$9.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}]; ptrType$8.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + Cond.init("sync", [{prop: "noCopy", name: "noCopy", embedded: false, exported: false, typ: noCopy, tag: ""}, {prop: "L", name: "L", embedded: false, exported: true, typ: Locker, tag: ""}, {prop: "notify", name: "notify", embedded: false, exported: false, typ: notifyList, tag: ""}, {prop: "checker", name: "checker", embedded: false, exported: false, typ: copyChecker, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType, tag: ""}]); Pool.init("sync", [{prop: "local", name: "local", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "localSize", name: "localSize", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "store", name: "store", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: funcType, tag: ""}]); + WaitGroup.init("sync", [{prop: "counter", name: "counter", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "state1", name: "state1", embedded: false, exported: false, typ: arrayType$1, tag: ""}]); + noCopy.init("", []); + Map.init("sync", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "read", name: "read", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "misses", name: "misses", embedded: false, exported: false, typ: $Int, tag: ""}]); + readOnly.init("sync", [{prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "amended", name: "amended", embedded: false, exported: false, typ: $Bool, tag: ""}]); + entry.init("sync", [{prop: "p", name: "p", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}]); Mutex.init("sync", [{prop: "state", name: "state", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "sema", name: "sema", embedded: false, exported: false, typ: $Uint32, tag: ""}]); Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]); Once.init("sync", [{prop: "m", name: "m", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Uint32, tag: ""}]); @@ -3181,16 +3991,23 @@ $packages["sync"] = (function() { return $pkg; })(); $packages["io"] = (function() { - var $pkg = {}, $init, errors, sync, atomic, Reader, Writer, ReadCloser, ReaderFrom, WriterTo, RuneScanner, LimitedReader, sliceType, ptrType$1, errWhence, errOffset, ReadAtLeast, ReadFull, Copy, copyBuffer; + var $pkg = {}, $init, errors, sync, atomic, Reader, Writer, Closer, ReadWriter, ReadCloser, WriteCloser, ReaderFrom, WriterTo, ReaderAt, ByteScanner, ByteWriter, RuneScanner, stringWriter, LimitedReader, SectionReader, eofReader, multiReader, sliceType, ptrType$1, ptrType$2, sliceType$1, ptrType$3, errWhence, errOffset, WriteString, ReadAtLeast, ReadFull, CopyN, Copy, CopyBuffer, copyBuffer, LimitReader, NewSectionReader, MultiReader; errors = $packages["errors"]; sync = $packages["sync"]; atomic = $packages["sync/atomic"]; Reader = $pkg.Reader = $newType(8, $kindInterface, "io.Reader", true, "io", true, null); Writer = $pkg.Writer = $newType(8, $kindInterface, "io.Writer", true, "io", true, null); + Closer = $pkg.Closer = $newType(8, $kindInterface, "io.Closer", true, "io", true, null); + ReadWriter = $pkg.ReadWriter = $newType(8, $kindInterface, "io.ReadWriter", true, "io", true, null); ReadCloser = $pkg.ReadCloser = $newType(8, $kindInterface, "io.ReadCloser", true, "io", true, null); + WriteCloser = $pkg.WriteCloser = $newType(8, $kindInterface, "io.WriteCloser", true, "io", true, null); ReaderFrom = $pkg.ReaderFrom = $newType(8, $kindInterface, "io.ReaderFrom", true, "io", true, null); WriterTo = $pkg.WriterTo = $newType(8, $kindInterface, "io.WriterTo", true, "io", true, null); + ReaderAt = $pkg.ReaderAt = $newType(8, $kindInterface, "io.ReaderAt", true, "io", true, null); + ByteScanner = $pkg.ByteScanner = $newType(8, $kindInterface, "io.ByteScanner", true, "io", true, null); + ByteWriter = $pkg.ByteWriter = $newType(8, $kindInterface, "io.ByteWriter", true, "io", true, null); RuneScanner = $pkg.RuneScanner = $newType(8, $kindInterface, "io.RuneScanner", true, "io", true, null); + stringWriter = $pkg.stringWriter = $newType(8, $kindInterface, "io.stringWriter", true, "io", false, null); LimitedReader = $pkg.LimitedReader = $newType(0, $kindStruct, "io.LimitedReader", true, "io", true, function(R_, N_) { this.$val = this; if (arguments.length === 0) { @@ -3201,8 +4018,64 @@ $packages["io"] = (function() { this.R = R_; this.N = N_; }); + SectionReader = $pkg.SectionReader = $newType(0, $kindStruct, "io.SectionReader", true, "io", true, function(r_, base_, off_, limit_) { + this.$val = this; + if (arguments.length === 0) { + this.r = $ifaceNil; + this.base = new $Int64(0, 0); + this.off = new $Int64(0, 0); + this.limit = new $Int64(0, 0); + return; + } + this.r = r_; + this.base = base_; + this.off = off_; + this.limit = limit_; + }); + eofReader = $pkg.eofReader = $newType(0, $kindStruct, "io.eofReader", true, "io", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + multiReader = $pkg.multiReader = $newType(0, $kindStruct, "io.multiReader", true, "io", false, function(readers_) { + this.$val = this; + if (arguments.length === 0) { + this.readers = sliceType$1.nil; + return; + } + this.readers = readers_; + }); sliceType = $sliceType($Uint8); ptrType$1 = $ptrType(LimitedReader); + ptrType$2 = $ptrType(multiReader); + sliceType$1 = $sliceType(Reader); + ptrType$3 = $ptrType(SectionReader); + WriteString = function(w, s) { + var _r, _r$1, _tuple, _tuple$1, _tuple$2, err, n, ok, s, sw, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; n = $f.n; ok = $f.ok; s = $f.s; sw = $f.sw; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + _tuple = $assertType(w, stringWriter, true); + sw = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r = sw.WriteString(s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 2: + _r$1 = w.Write((new sliceType($stringToBytes(s)))); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + n = _tuple$2[0]; + err = _tuple$2[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: WriteString }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.n = n; $f.ok = ok; $f.s = s; $f.sw = sw; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.WriteString = WriteString; ReadAtLeast = function(r, buf, min) { var _r, _tmp, _tmp$1, _tuple, buf, err, min, n, nn, r, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; buf = $f.buf; err = $f.err; min = $f.min; n = $f.n; nn = $f.nn; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3246,6 +4119,29 @@ $packages["io"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: ReadFull }; } $f._r = _r; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.ReadFull = ReadFull; + CopyN = function(dst, src, n) { + var _r, _tmp, _tmp$1, _tuple, dst, err, n, src, written, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; dst = $f.dst; err = $f.err; n = $f.n; src = $f.src; written = $f.written; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + written = new $Int64(0, 0); + err = $ifaceNil; + _r = Copy(dst, LimitReader(src, n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + written = _tuple[0]; + err = _tuple[1]; + if ((written.$high === n.$high && written.$low === n.$low)) { + _tmp = n; + _tmp$1 = $ifaceNil; + written = _tmp; + err = _tmp$1; + $s = -1; return [written, err]; + } + if ((written.$high < n.$high || (written.$high === n.$high && written.$low < n.$low)) && $interfaceIsEqual(err, $ifaceNil)) { + err = $pkg.EOF; + } + $s = -1; return [written, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CopyN }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.dst = dst; $f.err = err; $f.n = n; $f.src = src; $f.written = written; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.CopyN = CopyN; Copy = function(dst, src) { var _r, _tuple, dst, err, src, written, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; dst = $f.dst; err = $f.err; src = $f.src; written = $f.written; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3259,6 +4155,22 @@ $packages["io"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: Copy }; } $f._r = _r; $f._tuple = _tuple; $f.dst = dst; $f.err = err; $f.src = src; $f.written = written; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.Copy = Copy; + CopyBuffer = function(dst, src, buf) { + var _r, _tuple, buf, dst, err, src, written, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; buf = $f.buf; dst = $f.dst; err = $f.err; src = $f.src; written = $f.written; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + written = new $Int64(0, 0); + err = $ifaceNil; + if (!(buf === sliceType.nil) && (buf.$length === 0)) { + $panic(new $String("empty buffer in io.CopyBuffer")); + } + _r = copyBuffer(dst, src, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + written = _tuple[0]; + err = _tuple[1]; + $s = -1; return [written, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CopyBuffer }; } $f._r = _r; $f._tuple = _tuple; $f.buf = buf; $f.dst = dst; $f.err = err; $f.src = src; $f.written = written; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.CopyBuffer = CopyBuffer; copyBuffer = function(dst, src, buf) { var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, buf, dst, er, err, ew, l, nr, nw, ok, ok$1, ok$2, rt, size, src, written, wt, x, x$1, x$2, x$3, x$4, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; buf = $f.buf; dst = $f.dst; er = $f.er; err = $f.err; ew = $f.ew; l = $f.l; nr = $f.nr; nw = $f.nw; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; rt = $f.rt; size = $f.size; src = $f.src; written = $f.written; wt = $f.wt; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3340,6 +4252,11 @@ $packages["io"] = (function() { $s = -1; return [written, err]; /* */ } return; } if ($f === undefined) { $f = { $blk: copyBuffer }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.buf = buf; $f.dst = dst; $f.er = er; $f.err = err; $f.ew = ew; $f.l = l; $f.nr = nr; $f.nw = nw; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.rt = rt; $f.size = size; $f.src = src; $f.written = written; $f.wt = wt; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; }; + LimitReader = function(r, n) { + var n, r; + return new LimitedReader.ptr(r, n); + }; + $pkg.LimitReader = LimitReader; LimitedReader.ptr.prototype.Read = function(p) { var _r, _tmp, _tmp$1, _tuple, err, l, n, p, x, x$1, x$2, x$3, x$4, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; l = $f.l; n = $f.n; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3365,14 +4282,178 @@ $packages["io"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: LimitedReader.ptr.prototype.Read }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.l = l; $f.n = n; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; }; LimitedReader.prototype.Read = function(p) { return this.$val.Read(p); }; + NewSectionReader = function(r, off, n) { + var n, off, r; + return new SectionReader.ptr(r, off, off, new $Int64(off.$high + n.$high, off.$low + n.$low)); + }; + $pkg.NewSectionReader = NewSectionReader; + SectionReader.ptr.prototype.Read = function(p) { + var _r, _tmp, _tmp$1, _tuple, err, max, n, p, s, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; max = $f.max; n = $f.n; p = $f.p; s = $f.s; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + s = this; + if ((x = s.off, x$1 = s.limit, (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + _tmp = 0; + _tmp$1 = $pkg.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + max = (x$2 = s.limit, x$3 = s.off, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); + if ((x$4 = (new $Int64(0, p.$length)), (x$4.$high > max.$high || (x$4.$high === max.$high && x$4.$low > max.$low)))) { + p = $subslice(p, 0, $flatten64(max)); + } + _r = s.r.ReadAt(p, s.off); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + s.off = (x$5 = s.off, x$6 = (new $Int64(0, n)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: SectionReader.ptr.prototype.Read }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.max = max; $f.n = n; $f.p = p; $f.s = s; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + SectionReader.prototype.Read = function(p) { return this.$val.Read(p); }; + SectionReader.ptr.prototype.Seek = function(offset, whence) { + var _1, offset, s, whence, x, x$1, x$2, x$3, x$4; + s = this; + _1 = whence; + if (_1 === (0)) { + offset = (x = s.base, new $Int64(offset.$high + x.$high, offset.$low + x.$low)); + } else if (_1 === (1)) { + offset = (x$1 = s.off, new $Int64(offset.$high + x$1.$high, offset.$low + x$1.$low)); + } else if (_1 === (2)) { + offset = (x$2 = s.limit, new $Int64(offset.$high + x$2.$high, offset.$low + x$2.$low)); + } else { + return [new $Int64(0, 0), errWhence]; + } + if ((x$3 = s.base, (offset.$high < x$3.$high || (offset.$high === x$3.$high && offset.$low < x$3.$low)))) { + return [new $Int64(0, 0), errOffset]; + } + s.off = offset; + return [(x$4 = s.base, new $Int64(offset.$high - x$4.$high, offset.$low - x$4.$low)), $ifaceNil]; + }; + SectionReader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + SectionReader.ptr.prototype.ReadAt = function(p, off) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, max, n, off, p, s, x, x$1, x$2, x$3, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; max = $f.max; n = $f.n; off = $f.off; p = $f.p; s = $f.s; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + s = this; + if ((off.$high < 0 || (off.$high === 0 && off.$low < 0)) || (x = (x$1 = s.limit, x$2 = s.base, new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) { + _tmp = 0; + _tmp$1 = $pkg.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + off = (x$3 = s.base, new $Int64(off.$high + x$3.$high, off.$low + x$3.$low)); + max = (x$4 = s.limit, new $Int64(x$4.$high - off.$high, x$4.$low - off.$low)); + /* */ if ((x$5 = (new $Int64(0, p.$length)), (x$5.$high > max.$high || (x$5.$high === max.$high && x$5.$low > max.$low)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x$5 = (new $Int64(0, p.$length)), (x$5.$high > max.$high || (x$5.$high === max.$high && x$5.$low > max.$low)))) { */ case 1: + p = $subslice(p, 0, $flatten64(max)); + _r = s.r.ReadAt(p, off); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = $pkg.EOF; + } + _tmp$2 = n; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* } */ case 2: + _r$1 = s.r.ReadAt(p, off); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: SectionReader.ptr.prototype.ReadAt }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.max = max; $f.n = n; $f.off = off; $f.p = p; $f.s = s; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + SectionReader.prototype.ReadAt = function(p, off) { return this.$val.ReadAt(p, off); }; + SectionReader.ptr.prototype.Size = function() { + var s, x, x$1; + s = this; + return (x = s.limit, x$1 = s.base, new $Int64(x.$high - x$1.$high, x.$low - x$1.$low)); + }; + SectionReader.prototype.Size = function() { return this.$val.Size(); }; + eofReader.ptr.prototype.Read = function(param) { + var param; + return [0, $pkg.EOF]; + }; + eofReader.prototype.Read = function(param) { return this.$val.Read(param); }; + multiReader.ptr.prototype.Read = function(p) { + var _r, _tmp, _tmp$1, _tuple, _tuple$1, err, mr, n, ok, p, r, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; mr = $f.mr; n = $f.n; ok = $f.ok; p = $f.p; r = $f.r; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + mr = this; + /* while (true) { */ case 1: + /* if (!(mr.readers.$length > 0)) { break; } */ if(!(mr.readers.$length > 0)) { $s = 2; continue; } + /* */ if (mr.readers.$length === 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (mr.readers.$length === 1) { */ case 3: + _tuple = $assertType((x = mr.readers, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), ptrType$2, true); + r = _tuple[0]; + ok = _tuple[1]; + if (ok) { + mr.readers = r.readers; + /* continue; */ $s = 1; continue; + } + /* } */ case 4: + _r = (x$1 = mr.readers, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])).Read(p); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + n = _tuple$1[0]; + err = _tuple$1[1]; + if ($interfaceIsEqual(err, $pkg.EOF)) { + (x$3 = mr.readers, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0] = (x$2 = new eofReader.ptr(), new x$2.constructor.elem(x$2)))); + mr.readers = $subslice(mr.readers, 1); + } + if (n > 0 || !($interfaceIsEqual(err, $pkg.EOF))) { + if ($interfaceIsEqual(err, $pkg.EOF) && mr.readers.$length > 0) { + err = $ifaceNil; + } + $s = -1; return [n, err]; + } + /* } */ $s = 1; continue; case 2: + _tmp = 0; + _tmp$1 = $pkg.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: multiReader.ptr.prototype.Read }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.mr = mr; $f.n = n; $f.ok = ok; $f.p = p; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + multiReader.prototype.Read = function(p) { return this.$val.Read(p); }; + MultiReader = function(readers) { + var r, readers; + r = $makeSlice(sliceType$1, readers.$length); + $copySlice(r, readers); + return new multiReader.ptr(r); + }; + $pkg.MultiReader = MultiReader; ptrType$1.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$3.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}]; + eofReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$2.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; Reader.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); Writer.init([{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + Closer.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]); + ReadWriter.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); ReadCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + WriteCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); ReaderFrom.init([{prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}]); WriterTo.init([{prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([Writer], [$Int64, $error], false)}]); + ReaderAt.init([{prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}]); + ByteScanner.init([{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}]); + ByteWriter.init([{prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}]); RuneScanner.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]); + stringWriter.init([{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]); LimitedReader.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: Reader, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int64, tag: ""}]); + SectionReader.init("io", [{prop: "r", name: "r", embedded: false, exported: false, typ: ReaderAt, tag: ""}, {prop: "base", name: "base", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "limit", name: "limit", embedded: false, exported: false, typ: $Int64, tag: ""}]); + eofReader.init("", []); + multiReader.init("io", [{prop: "readers", name: "readers", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -3393,7 +4474,7 @@ $packages["io"] = (function() { return $pkg; })(); $packages["unicode"] = (function() { - var $pkg = {}, $init, RangeTable, Range16, Range32, CaseRange, d, foldPair, arrayType, sliceType, sliceType$1, sliceType$3, sliceType$4, _L, _Nd, _CaseRanges, properties, asciiFold, caseOrbit, to, IsDigit, IsLetter, is16, is32, isExcludingLatin, To, ToUpper, ToLower, SimpleFold; + var $pkg = {}, $init, RangeTable, Range16, Range32, CaseRange, d, foldPair, arrayType, sliceType, sliceType$1, sliceType$3, sliceType$4, _L, _Nd, _White_Space, _CaseRanges, properties, asciiFold, caseOrbit, to, IsDigit, IsLetter, IsSpace, is16, is32, isExcludingLatin, To, ToUpper, ToLower, SimpleFold; RangeTable = $pkg.RangeTable = $newType(0, $kindStruct, "unicode.RangeTable", true, "unicode", true, function(R16_, R32_, LatinOffset_) { this.$val = this; if (arguments.length === 0) { @@ -3518,6 +4599,18 @@ $packages["unicode"] = (function() { return isExcludingLatin($pkg.Letter, r); }; $pkg.IsLetter = IsLetter; + IsSpace = function(r) { + var _1, r; + if (((r >>> 0)) <= 255) { + _1 = r; + if ((_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (32)) || (_1 === (133)) || (_1 === (160))) { + return true; + } + return false; + } + return isExcludingLatin($pkg.White_Space, r); + }; + $pkg.IsSpace = IsSpace; is16 = function(ranges, r) { var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges; if (ranges.$length <= 18 || r <= 255) { @@ -3674,6 +4767,8 @@ $packages["unicode"] = (function() { _Nd = new RangeTable.ptr(new sliceType([new Range16.ptr(48, 57, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1776, 1785, 1), new Range16.ptr(1984, 1993, 1), new Range16.ptr(2406, 2415, 1), new Range16.ptr(2534, 2543, 1), new Range16.ptr(2662, 2671, 1), new Range16.ptr(2790, 2799, 1), new Range16.ptr(2918, 2927, 1), new Range16.ptr(3046, 3055, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3430, 3439, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3664, 3673, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3872, 3881, 1), new Range16.ptr(4160, 4169, 1), new Range16.ptr(4240, 4249, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6470, 6479, 1), new Range16.ptr(6608, 6617, 1), new Range16.ptr(6784, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6992, 7001, 1), new Range16.ptr(7088, 7097, 1), new Range16.ptr(7232, 7241, 1), new Range16.ptr(7248, 7257, 1), new Range16.ptr(42528, 42537, 1), new Range16.ptr(43216, 43225, 1), new Range16.ptr(43264, 43273, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43504, 43513, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(44016, 44025, 1), new Range16.ptr(65296, 65305, 1)]), new sliceType$1([new Range32.ptr(66720, 66729, 1), new Range32.ptr(69734, 69743, 1), new Range32.ptr(69872, 69881, 1), new Range32.ptr(69942, 69951, 1), new Range32.ptr(70096, 70105, 1), new Range32.ptr(70384, 70393, 1), new Range32.ptr(70736, 70745, 1), new Range32.ptr(70864, 70873, 1), new Range32.ptr(71248, 71257, 1), new Range32.ptr(71360, 71369, 1), new Range32.ptr(71472, 71481, 1), new Range32.ptr(71904, 71913, 1), new Range32.ptr(72784, 72793, 1), new Range32.ptr(73040, 73049, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(120782, 120831, 1), new Range32.ptr(125264, 125273, 1)]), 1); $pkg.Digit = _Nd; $pkg.Letter = _L; + _White_Space = new RangeTable.ptr(new sliceType([new Range16.ptr(9, 13, 1), new Range16.ptr(32, 32, 1), new Range16.ptr(133, 133, 1), new Range16.ptr(160, 160, 1), new Range16.ptr(5760, 5760, 1), new Range16.ptr(8192, 8202, 1), new Range16.ptr(8232, 8233, 1), new Range16.ptr(8239, 8239, 1), new Range16.ptr(8287, 8287, 1), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 4); + $pkg.White_Space = _White_Space; _CaseRanges = new sliceType$3([new CaseRange.ptr(65, 90, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(97, 122, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(181, 181, $toNativeArray($kindInt32, [743, 0, 743])), new CaseRange.ptr(192, 214, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(216, 222, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(224, 246, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(248, 254, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(255, 255, $toNativeArray($kindInt32, [121, 0, 121])), new CaseRange.ptr(256, 303, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(304, 304, $toNativeArray($kindInt32, [0, -199, 0])), new CaseRange.ptr(305, 305, $toNativeArray($kindInt32, [-232, 0, -232])), new CaseRange.ptr(306, 311, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(313, 328, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(330, 375, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(376, 376, $toNativeArray($kindInt32, [0, -121, 0])), new CaseRange.ptr(377, 382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(383, 383, $toNativeArray($kindInt32, [-300, 0, -300])), new CaseRange.ptr(384, 384, $toNativeArray($kindInt32, [195, 0, 195])), new CaseRange.ptr(385, 385, $toNativeArray($kindInt32, [0, 210, 0])), new CaseRange.ptr(386, 389, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(390, 390, $toNativeArray($kindInt32, [0, 206, 0])), new CaseRange.ptr(391, 392, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(393, 394, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(395, 396, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(398, 398, $toNativeArray($kindInt32, [0, 79, 0])), new CaseRange.ptr(399, 399, $toNativeArray($kindInt32, [0, 202, 0])), new CaseRange.ptr(400, 400, $toNativeArray($kindInt32, [0, 203, 0])), new CaseRange.ptr(401, 402, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(403, 403, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(404, 404, $toNativeArray($kindInt32, [0, 207, 0])), new CaseRange.ptr(405, 405, $toNativeArray($kindInt32, [97, 0, 97])), new CaseRange.ptr(406, 406, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(407, 407, $toNativeArray($kindInt32, [0, 209, 0])), new CaseRange.ptr(408, 409, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(410, 410, $toNativeArray($kindInt32, [163, 0, 163])), new CaseRange.ptr(412, 412, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(413, 413, $toNativeArray($kindInt32, [0, 213, 0])), new CaseRange.ptr(414, 414, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(415, 415, $toNativeArray($kindInt32, [0, 214, 0])), new CaseRange.ptr(416, 421, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(422, 422, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(423, 424, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(425, 425, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(428, 429, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(430, 430, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(431, 432, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(433, 434, $toNativeArray($kindInt32, [0, 217, 0])), new CaseRange.ptr(435, 438, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(439, 439, $toNativeArray($kindInt32, [0, 219, 0])), new CaseRange.ptr(440, 441, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(444, 445, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(447, 447, $toNativeArray($kindInt32, [56, 0, 56])), new CaseRange.ptr(452, 452, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(453, 453, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(454, 454, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(455, 455, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(456, 456, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(457, 457, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(458, 458, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(459, 459, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(460, 460, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(461, 476, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(477, 477, $toNativeArray($kindInt32, [-79, 0, -79])), new CaseRange.ptr(478, 495, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(497, 497, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(498, 498, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(499, 499, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(500, 501, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(502, 502, $toNativeArray($kindInt32, [0, -97, 0])), new CaseRange.ptr(503, 503, $toNativeArray($kindInt32, [0, -56, 0])), new CaseRange.ptr(504, 543, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(544, 544, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(546, 563, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(570, 570, $toNativeArray($kindInt32, [0, 10795, 0])), new CaseRange.ptr(571, 572, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(573, 573, $toNativeArray($kindInt32, [0, -163, 0])), new CaseRange.ptr(574, 574, $toNativeArray($kindInt32, [0, 10792, 0])), new CaseRange.ptr(575, 576, $toNativeArray($kindInt32, [10815, 0, 10815])), new CaseRange.ptr(577, 578, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(579, 579, $toNativeArray($kindInt32, [0, -195, 0])), new CaseRange.ptr(580, 580, $toNativeArray($kindInt32, [0, 69, 0])), new CaseRange.ptr(581, 581, $toNativeArray($kindInt32, [0, 71, 0])), new CaseRange.ptr(582, 591, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(592, 592, $toNativeArray($kindInt32, [10783, 0, 10783])), new CaseRange.ptr(593, 593, $toNativeArray($kindInt32, [10780, 0, 10780])), new CaseRange.ptr(594, 594, $toNativeArray($kindInt32, [10782, 0, 10782])), new CaseRange.ptr(595, 595, $toNativeArray($kindInt32, [-210, 0, -210])), new CaseRange.ptr(596, 596, $toNativeArray($kindInt32, [-206, 0, -206])), new CaseRange.ptr(598, 599, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(601, 601, $toNativeArray($kindInt32, [-202, 0, -202])), new CaseRange.ptr(603, 603, $toNativeArray($kindInt32, [-203, 0, -203])), new CaseRange.ptr(604, 604, $toNativeArray($kindInt32, [42319, 0, 42319])), new CaseRange.ptr(608, 608, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(609, 609, $toNativeArray($kindInt32, [42315, 0, 42315])), new CaseRange.ptr(611, 611, $toNativeArray($kindInt32, [-207, 0, -207])), new CaseRange.ptr(613, 613, $toNativeArray($kindInt32, [42280, 0, 42280])), new CaseRange.ptr(614, 614, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(616, 616, $toNativeArray($kindInt32, [-209, 0, -209])), new CaseRange.ptr(617, 617, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(618, 618, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(619, 619, $toNativeArray($kindInt32, [10743, 0, 10743])), new CaseRange.ptr(620, 620, $toNativeArray($kindInt32, [42305, 0, 42305])), new CaseRange.ptr(623, 623, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(625, 625, $toNativeArray($kindInt32, [10749, 0, 10749])), new CaseRange.ptr(626, 626, $toNativeArray($kindInt32, [-213, 0, -213])), new CaseRange.ptr(629, 629, $toNativeArray($kindInt32, [-214, 0, -214])), new CaseRange.ptr(637, 637, $toNativeArray($kindInt32, [10727, 0, 10727])), new CaseRange.ptr(640, 640, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(643, 643, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(647, 647, $toNativeArray($kindInt32, [42282, 0, 42282])), new CaseRange.ptr(648, 648, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(649, 649, $toNativeArray($kindInt32, [-69, 0, -69])), new CaseRange.ptr(650, 651, $toNativeArray($kindInt32, [-217, 0, -217])), new CaseRange.ptr(652, 652, $toNativeArray($kindInt32, [-71, 0, -71])), new CaseRange.ptr(658, 658, $toNativeArray($kindInt32, [-219, 0, -219])), new CaseRange.ptr(669, 669, $toNativeArray($kindInt32, [42261, 0, 42261])), new CaseRange.ptr(670, 670, $toNativeArray($kindInt32, [42258, 0, 42258])), new CaseRange.ptr(837, 837, $toNativeArray($kindInt32, [84, 0, 84])), new CaseRange.ptr(880, 883, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(886, 887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(891, 893, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(895, 895, $toNativeArray($kindInt32, [0, 116, 0])), new CaseRange.ptr(902, 902, $toNativeArray($kindInt32, [0, 38, 0])), new CaseRange.ptr(904, 906, $toNativeArray($kindInt32, [0, 37, 0])), new CaseRange.ptr(908, 908, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(910, 911, $toNativeArray($kindInt32, [0, 63, 0])), new CaseRange.ptr(913, 929, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(931, 939, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(940, 940, $toNativeArray($kindInt32, [-38, 0, -38])), new CaseRange.ptr(941, 943, $toNativeArray($kindInt32, [-37, 0, -37])), new CaseRange.ptr(945, 961, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(962, 962, $toNativeArray($kindInt32, [-31, 0, -31])), new CaseRange.ptr(963, 971, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(972, 972, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(973, 974, $toNativeArray($kindInt32, [-63, 0, -63])), new CaseRange.ptr(975, 975, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(976, 976, $toNativeArray($kindInt32, [-62, 0, -62])), new CaseRange.ptr(977, 977, $toNativeArray($kindInt32, [-57, 0, -57])), new CaseRange.ptr(981, 981, $toNativeArray($kindInt32, [-47, 0, -47])), new CaseRange.ptr(982, 982, $toNativeArray($kindInt32, [-54, 0, -54])), new CaseRange.ptr(983, 983, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(984, 1007, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1008, 1008, $toNativeArray($kindInt32, [-86, 0, -86])), new CaseRange.ptr(1009, 1009, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1010, 1010, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(1011, 1011, $toNativeArray($kindInt32, [-116, 0, -116])), new CaseRange.ptr(1012, 1012, $toNativeArray($kindInt32, [0, -60, 0])), new CaseRange.ptr(1013, 1013, $toNativeArray($kindInt32, [-96, 0, -96])), new CaseRange.ptr(1015, 1016, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1017, 1017, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(1018, 1019, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1021, 1023, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(1024, 1039, $toNativeArray($kindInt32, [0, 80, 0])), new CaseRange.ptr(1040, 1071, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(1072, 1103, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(1104, 1119, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1120, 1153, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1162, 1215, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1216, 1216, $toNativeArray($kindInt32, [0, 15, 0])), new CaseRange.ptr(1217, 1230, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1231, 1231, $toNativeArray($kindInt32, [-15, 0, -15])), new CaseRange.ptr(1232, 1327, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1329, 1366, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(1377, 1414, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(4256, 4293, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4295, 4295, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4301, 4301, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(5024, 5103, $toNativeArray($kindInt32, [0, 38864, 0])), new CaseRange.ptr(5104, 5109, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(5112, 5117, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(7296, 7296, $toNativeArray($kindInt32, [-6254, 0, -6254])), new CaseRange.ptr(7297, 7297, $toNativeArray($kindInt32, [-6253, 0, -6253])), new CaseRange.ptr(7298, 7298, $toNativeArray($kindInt32, [-6244, 0, -6244])), new CaseRange.ptr(7299, 7300, $toNativeArray($kindInt32, [-6242, 0, -6242])), new CaseRange.ptr(7301, 7301, $toNativeArray($kindInt32, [-6243, 0, -6243])), new CaseRange.ptr(7302, 7302, $toNativeArray($kindInt32, [-6236, 0, -6236])), new CaseRange.ptr(7303, 7303, $toNativeArray($kindInt32, [-6181, 0, -6181])), new CaseRange.ptr(7304, 7304, $toNativeArray($kindInt32, [35266, 0, 35266])), new CaseRange.ptr(7545, 7545, $toNativeArray($kindInt32, [35332, 0, 35332])), new CaseRange.ptr(7549, 7549, $toNativeArray($kindInt32, [3814, 0, 3814])), new CaseRange.ptr(7680, 7829, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7835, 7835, $toNativeArray($kindInt32, [-59, 0, -59])), new CaseRange.ptr(7838, 7838, $toNativeArray($kindInt32, [0, -7615, 0])), new CaseRange.ptr(7840, 7935, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7936, 7943, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7944, 7951, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7952, 7957, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7960, 7965, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7968, 7975, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7976, 7983, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7984, 7991, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7992, 7999, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8000, 8005, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8008, 8013, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8017, 8017, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8019, 8019, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8021, 8021, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8023, 8023, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8025, 8025, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8027, 8027, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8029, 8029, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8031, 8031, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8032, 8039, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8040, 8047, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8048, 8049, $toNativeArray($kindInt32, [74, 0, 74])), new CaseRange.ptr(8050, 8053, $toNativeArray($kindInt32, [86, 0, 86])), new CaseRange.ptr(8054, 8055, $toNativeArray($kindInt32, [100, 0, 100])), new CaseRange.ptr(8056, 8057, $toNativeArray($kindInt32, [128, 0, 128])), new CaseRange.ptr(8058, 8059, $toNativeArray($kindInt32, [112, 0, 112])), new CaseRange.ptr(8060, 8061, $toNativeArray($kindInt32, [126, 0, 126])), new CaseRange.ptr(8064, 8071, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8072, 8079, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8080, 8087, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8088, 8095, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8096, 8103, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8104, 8111, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8112, 8113, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8115, 8115, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8120, 8121, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8122, 8123, $toNativeArray($kindInt32, [0, -74, 0])), new CaseRange.ptr(8124, 8124, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8126, 8126, $toNativeArray($kindInt32, [-7205, 0, -7205])), new CaseRange.ptr(8131, 8131, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8136, 8139, $toNativeArray($kindInt32, [0, -86, 0])), new CaseRange.ptr(8140, 8140, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8144, 8145, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8152, 8153, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8154, 8155, $toNativeArray($kindInt32, [0, -100, 0])), new CaseRange.ptr(8160, 8161, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8165, 8165, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(8168, 8169, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8170, 8171, $toNativeArray($kindInt32, [0, -112, 0])), new CaseRange.ptr(8172, 8172, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(8179, 8179, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8184, 8185, $toNativeArray($kindInt32, [0, -128, 0])), new CaseRange.ptr(8186, 8187, $toNativeArray($kindInt32, [0, -126, 0])), new CaseRange.ptr(8188, 8188, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8486, 8486, $toNativeArray($kindInt32, [0, -7517, 0])), new CaseRange.ptr(8490, 8490, $toNativeArray($kindInt32, [0, -8383, 0])), new CaseRange.ptr(8491, 8491, $toNativeArray($kindInt32, [0, -8262, 0])), new CaseRange.ptr(8498, 8498, $toNativeArray($kindInt32, [0, 28, 0])), new CaseRange.ptr(8526, 8526, $toNativeArray($kindInt32, [-28, 0, -28])), new CaseRange.ptr(8544, 8559, $toNativeArray($kindInt32, [0, 16, 0])), new CaseRange.ptr(8560, 8575, $toNativeArray($kindInt32, [-16, 0, -16])), new CaseRange.ptr(8579, 8580, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(9398, 9423, $toNativeArray($kindInt32, [0, 26, 0])), new CaseRange.ptr(9424, 9449, $toNativeArray($kindInt32, [-26, 0, -26])), new CaseRange.ptr(11264, 11310, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(11312, 11358, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(11360, 11361, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11362, 11362, $toNativeArray($kindInt32, [0, -10743, 0])), new CaseRange.ptr(11363, 11363, $toNativeArray($kindInt32, [0, -3814, 0])), new CaseRange.ptr(11364, 11364, $toNativeArray($kindInt32, [0, -10727, 0])), new CaseRange.ptr(11365, 11365, $toNativeArray($kindInt32, [-10795, 0, -10795])), new CaseRange.ptr(11366, 11366, $toNativeArray($kindInt32, [-10792, 0, -10792])), new CaseRange.ptr(11367, 11372, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11373, 11373, $toNativeArray($kindInt32, [0, -10780, 0])), new CaseRange.ptr(11374, 11374, $toNativeArray($kindInt32, [0, -10749, 0])), new CaseRange.ptr(11375, 11375, $toNativeArray($kindInt32, [0, -10783, 0])), new CaseRange.ptr(11376, 11376, $toNativeArray($kindInt32, [0, -10782, 0])), new CaseRange.ptr(11378, 11379, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11381, 11382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11390, 11391, $toNativeArray($kindInt32, [0, -10815, 0])), new CaseRange.ptr(11392, 11491, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11499, 11502, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11506, 11507, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11520, 11557, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11559, 11559, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11565, 11565, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(42560, 42605, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42624, 42651, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42786, 42799, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42802, 42863, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42873, 42876, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42877, 42877, $toNativeArray($kindInt32, [0, -35332, 0])), new CaseRange.ptr(42878, 42887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42891, 42892, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42893, 42893, $toNativeArray($kindInt32, [0, -42280, 0])), new CaseRange.ptr(42896, 42899, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42902, 42921, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42922, 42922, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42923, 42923, $toNativeArray($kindInt32, [0, -42319, 0])), new CaseRange.ptr(42924, 42924, $toNativeArray($kindInt32, [0, -42315, 0])), new CaseRange.ptr(42925, 42925, $toNativeArray($kindInt32, [0, -42305, 0])), new CaseRange.ptr(42926, 42926, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42928, 42928, $toNativeArray($kindInt32, [0, -42258, 0])), new CaseRange.ptr(42929, 42929, $toNativeArray($kindInt32, [0, -42282, 0])), new CaseRange.ptr(42930, 42930, $toNativeArray($kindInt32, [0, -42261, 0])), new CaseRange.ptr(42931, 42931, $toNativeArray($kindInt32, [0, 928, 0])), new CaseRange.ptr(42932, 42935, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(43859, 43859, $toNativeArray($kindInt32, [-928, 0, -928])), new CaseRange.ptr(43888, 43967, $toNativeArray($kindInt32, [-38864, 0, -38864])), new CaseRange.ptr(65313, 65338, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(65345, 65370, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(66560, 66599, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66600, 66639, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(66736, 66771, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66776, 66811, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(68736, 68786, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(68800, 68850, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(71840, 71871, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(71872, 71903, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(125184, 125217, $toNativeArray($kindInt32, [0, 34, 0])), new CaseRange.ptr(125218, 125251, $toNativeArray($kindInt32, [-34, 0, -34]))]); $pkg.CaseRanges = _CaseRanges; properties = $toNativeArray($kindUint8, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 144, 130, 130, 130, 136, 130, 130, 130, 130, 130, 130, 136, 130, 130, 130, 130, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 130, 130, 136, 136, 136, 130, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 130, 130, 130, 136, 130, 136, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 130, 136, 130, 136, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 130, 136, 136, 136, 136, 136, 130, 136, 136, 224, 130, 136, 0, 136, 136, 136, 136, 132, 132, 136, 192, 130, 130, 136, 132, 224, 130, 132, 132, 132, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 136, 160, 160, 160, 160, 160, 160, 160, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 136, 192, 192, 192, 192, 192, 192, 192, 192]); @@ -3685,7 +4780,7 @@ $packages["unicode"] = (function() { return $pkg; })(); $packages["unicode/utf8"] = (function() { - var $pkg = {}, $init, acceptRange, first, acceptRanges, FullRune, DecodeRune, DecodeRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString, ValidString, ValidRune; + var $pkg = {}, $init, acceptRange, first, acceptRanges, FullRune, DecodeRune, DecodeRuneInString, DecodeLastRune, DecodeLastRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString, RuneStart, Valid, ValidString, ValidRune; acceptRange = $pkg.acceptRange = $newType(0, $kindStruct, "utf8.acceptRange", true, "unicode/utf8", false, function(lo_, hi_) { this.$val = this; if (arguments.length === 0) { @@ -3867,6 +4962,112 @@ $packages["unicode/utf8"] = (function() { return [r, size]; }; $pkg.DecodeRuneInString = DecodeRuneInString; + DecodeLastRune = function(p) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, p, r, size, start; + r = 0; + size = 0; + end = p.$length; + if (end === 0) { + _tmp = 65533; + _tmp$1 = 0; + r = _tmp; + size = _tmp$1; + return [r, size]; + } + start = end - 1 >> 0; + r = ((((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]) >> 0)); + if (r < 128) { + _tmp$2 = r; + _tmp$3 = 1; + r = _tmp$2; + size = _tmp$3; + return [r, size]; + } + lim = end - 4 >> 0; + if (lim < 0) { + lim = 0; + } + start = start - (1) >> 0; + while (true) { + if (!(start >= lim)) { break; } + if (RuneStart(((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]))) { + break; + } + start = start - (1) >> 0; + } + if (start < 0) { + start = 0; + } + _tuple = DecodeRune($subslice(p, start, end)); + r = _tuple[0]; + size = _tuple[1]; + if (!(((start + size >> 0) === end))) { + _tmp$4 = 65533; + _tmp$5 = 1; + r = _tmp$4; + size = _tmp$5; + return [r, size]; + } + _tmp$6 = r; + _tmp$7 = size; + r = _tmp$6; + size = _tmp$7; + return [r, size]; + }; + $pkg.DecodeLastRune = DecodeLastRune; + DecodeLastRuneInString = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, r, s, size, start; + r = 0; + size = 0; + end = s.length; + if (end === 0) { + _tmp = 65533; + _tmp$1 = 0; + r = _tmp; + size = _tmp$1; + return [r, size]; + } + start = end - 1 >> 0; + r = ((s.charCodeAt(start) >> 0)); + if (r < 128) { + _tmp$2 = r; + _tmp$3 = 1; + r = _tmp$2; + size = _tmp$3; + return [r, size]; + } + lim = end - 4 >> 0; + if (lim < 0) { + lim = 0; + } + start = start - (1) >> 0; + while (true) { + if (!(start >= lim)) { break; } + if (RuneStart(s.charCodeAt(start))) { + break; + } + start = start - (1) >> 0; + } + if (start < 0) { + start = 0; + } + _tuple = DecodeRuneInString($substring(s, start, end)); + r = _tuple[0]; + size = _tuple[1]; + if (!(((start + size >> 0) === end))) { + _tmp$4 = 65533; + _tmp$5 = 1; + r = _tmp$4; + size = _tmp$5; + return [r, size]; + } + _tmp$6 = r; + _tmp$7 = size; + r = _tmp$6; + size = _tmp$7; + return [r, size]; + }; + $pkg.DecodeLastRuneInString = DecodeLastRuneInString; RuneLen = function(r) { var r; if (r < 0) { @@ -4013,6 +5214,52 @@ $packages["unicode/utf8"] = (function() { return n; }; $pkg.RuneCountInString = RuneCountInString; + RuneStart = function(b) { + var b; + return !((((b & 192) >>> 0) === 128)); + }; + $pkg.RuneStart = RuneStart; + Valid = function(p) { + var accept, c, c$1, c$2, i, n, p, pi, size, x, x$1, x$2, x$3, x$4; + n = p.$length; + i = 0; + while (true) { + if (!(i < n)) { break; } + pi = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]); + if (pi < 128) { + i = i + (1) >> 0; + continue; + } + x = ((pi < 0 || pi >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[pi]); + if (x === 241) { + return false; + } + size = ((((x & 7) >>> 0) >> 0)); + if ((i + size >> 0) > n) { + return false; + } + accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); + c = (x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])); + if (c < accept.lo || accept.hi < c) { + return false; + } else if (size === 2) { + } else { + c$1 = (x$3 = i + 2 >> 0, ((x$3 < 0 || x$3 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$3])); + if (c$1 < 128 || 191 < c$1) { + return false; + } else if (size === 3) { + } else { + c$2 = (x$4 = i + 3 >> 0, ((x$4 < 0 || x$4 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$4])); + if (c$2 < 128 || 191 < c$2) { + return false; + } + } + } + i = i + (size) >> 0; + } + return true; + }; + $pkg.Valid = Valid; ValidString = function(s) { var accept, c, c$1, c$2, i, n, s, si, size, x, x$1; n = s.length; @@ -4076,7 +5323,7 @@ $packages["unicode/utf8"] = (function() { return $pkg; })(); $packages["bytes"] = (function() { - var $pkg = {}, $init, errors, bytealg, io, unicode, utf8, Buffer, readOp, Reader, ptrType, sliceType, arrayType, ptrType$2, errNegativeRead, IndexByte, Equal, makeSlice, NewBuffer, EqualFold, NewReader; + var $pkg = {}, $init, errors, bytealg, io, unicode, utf8, Buffer, readOp, asciiSet, Reader, ptrType, sliceType, arrayType, ptrType$1, arrayType$2, ptrType$2, errNegativeRead, IndexByte, Equal, makeSlice, NewBuffer, Contains, LastIndexByte, HasPrefix, HasSuffix, TrimLeftFunc, TrimRightFunc, TrimFunc, TrimPrefix, indexFunc, lastIndexFunc, makeASCIISet, makeCutsetFunc, TrimRight, TrimSpace, EqualFold, Index, indexRabinKarp, hashStr, NewReader; errors = $packages["errors"]; bytealg = $packages["internal/bytealg"]; io = $packages["io"]; @@ -4097,6 +5344,7 @@ $packages["bytes"] = (function() { this.lastRead = lastRead_; }); readOp = $pkg.readOp = $newType(1, $kindInt8, "bytes.readOp", true, "bytes", false, null); + asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "bytes.asciiSet", true, "bytes", false, null); Reader = $pkg.Reader = $newType(0, $kindStruct, "bytes.Reader", true, "bytes", true, function(s_, i_, prevRune_) { this.$val = this; if (arguments.length === 0) { @@ -4112,6 +5360,8 @@ $packages["bytes"] = (function() { ptrType = $ptrType(Buffer); sliceType = $sliceType($Uint8); arrayType = $arrayType($Uint8, 64); + ptrType$1 = $ptrType(asciiSet); + arrayType$2 = $arrayType($Uint32, 8); ptrType$2 = $ptrType(Reader); IndexByte = function(s, c) { var _i, _ref, b, c, i, s; @@ -4617,6 +5867,209 @@ $packages["bytes"] = (function() { return new Buffer.ptr(buf, 0, arrayType.zero(), 0); }; $pkg.NewBuffer = NewBuffer; + Contains = function(b, subslice) { + var b, subslice; + return !((Index(b, subslice) === -1)); + }; + $pkg.Contains = Contains; + LastIndexByte = function(s, c) { + var c, i, s; + i = s.$length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === c) { + return i; + } + i = i - (1) >> 0; + } + return -1; + }; + $pkg.LastIndexByte = LastIndexByte; + HasPrefix = function(s, prefix) { + var prefix, s; + return s.$length >= prefix.$length && Equal($subslice(s, 0, prefix.$length), prefix); + }; + $pkg.HasPrefix = HasPrefix; + HasSuffix = function(s, suffix) { + var s, suffix; + return s.$length >= suffix.$length && Equal($subslice(s, (s.$length - suffix.$length >> 0)), suffix); + }; + $pkg.HasSuffix = HasSuffix; + TrimLeftFunc = function(s, f) { + var _r, f, i, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; i = $f.i; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + i = _r; + if (i === -1) { + $s = -1; return sliceType.nil; + } + $s = -1; return $subslice(s, i); + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimLeftFunc }; } $f._r = _r; $f.f = f; $f.i = i; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimLeftFunc = TrimLeftFunc; + TrimRightFunc = function(s, f) { + var _r, _tuple, f, i, s, wid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; f = $f.f; i = $f.i; s = $f.s; wid = $f.wid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + i = _r; + if (i >= 0 && ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >= 128) { + _tuple = utf8.DecodeRune($subslice(s, i)); + wid = _tuple[1]; + i = i + (wid) >> 0; + } else { + i = i + (1) >> 0; + } + $s = -1; return $subslice(s, 0, i); + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimRightFunc }; } $f._r = _r; $f._tuple = _tuple; $f.f = f; $f.i = i; $f.s = s; $f.wid = wid; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimRightFunc = TrimRightFunc; + TrimFunc = function(s, f) { + var _r, _r$1, f, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; f = $f.f; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimFunc }; } $f._r = _r; $f._r$1 = _r$1; $f.f = f; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimFunc = TrimFunc; + TrimPrefix = function(s, prefix) { + var prefix, s; + if (HasPrefix(s, prefix)) { + return $subslice(s, prefix.$length); + } + return s; + }; + $pkg.TrimPrefix = TrimPrefix; + indexFunc = function(s, f, truth) { + var _r, _tuple, f, r, s, start, truth, wid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; f = $f.f; r = $f.r; s = $f.s; start = $f.start; truth = $f.truth; wid = $f.wid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + start = 0; + /* while (true) { */ case 1: + /* if (!(start < s.$length)) { break; } */ if(!(start < s.$length)) { $s = 2; continue; } + wid = 1; + r = ((((start < 0 || start >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + start]) >> 0)); + if (r >= 128) { + _tuple = utf8.DecodeRune($subslice(s, start)); + r = _tuple[0]; + wid = _tuple[1]; + } + _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === truth) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r === truth) { */ case 3: + $s = -1; return start; + /* } */ case 4: + start = start + (wid) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return -1; + /* */ } return; } if ($f === undefined) { $f = { $blk: indexFunc }; } $f._r = _r; $f._tuple = _tuple; $f.f = f; $f.r = r; $f.s = s; $f.start = start; $f.truth = truth; $f.wid = wid; $f.$s = $s; $f.$r = $r; return $f; + }; + lastIndexFunc = function(s, f, truth) { + var _r, _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; f = $f.f; i = $f.i; r = $f.r; s = $f.s; size = $f.size; truth = $f.truth; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = s.$length; + /* while (true) { */ case 1: + /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; } + _tmp = (((x = i - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >> 0)); + _tmp$1 = 1; + r = _tmp; + size = _tmp$1; + if (r >= 128) { + _tuple = utf8.DecodeLastRune($subslice(s, 0, i)); + r = _tuple[0]; + size = _tuple[1]; + } + i = i - (size) >> 0; + _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === truth) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r === truth) { */ case 3: + $s = -1; return i; + /* } */ case 4: + /* } */ $s = 1; continue; case 2: + $s = -1; return -1; + /* */ } return; } if ($f === undefined) { $f = { $blk: lastIndexFunc }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.f = f; $f.i = i; $f.r = r; $f.s = s; $f.size = size; $f.truth = truth; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + makeASCIISet = function(chars) { + var _index, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y; + as = arrayType$2.zero(); + ok = false; + i = 0; + while (true) { + if (!(i < chars.length)) { break; } + c = chars.charCodeAt(i); + if (c >= 128) { + _tmp = $clone(as, asciiSet); + _tmp$1 = false; + asciiSet.copy(as, _tmp); + ok = _tmp$1; + return [as, ok]; + } + _index = c >>> 5 << 24 >>> 24; + ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((((c & 31) >>> 0) >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + _tmp$2 = $clone(as, asciiSet); + _tmp$3 = true; + asciiSet.copy(as, _tmp$2); + ok = _tmp$3; + return [as, ok]; + }; + asciiSet.prototype.contains = function(c) { + var as, c, x, y; + as = this.$val; + return !((((((x = c >>> 5 << 24 >>> 24, (as.nilCheck, ((x < 0 || x >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[x]))) & (((y = ((((c & 31) >>> 0) >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0)); + }; + $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); }; + makeCutsetFunc = function(cutset) { + var _tuple, as, cutset, isASCII; + if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { + return (function(r) { + var r; + return r === ((cutset.charCodeAt(0) >> 0)); + }); + } + _tuple = makeASCIISet(cutset); + as = $clone(_tuple[0], asciiSet); + isASCII = _tuple[1]; + if (isASCII) { + return (function(r) { + var r; + return r < 128 && new ptrType$1(as).contains(((r << 24 >>> 24))); + }); + } + return (function(r) { + var _i, _ref, _rune, c, r; + _ref = cutset; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + c = _rune[0]; + if (c === r) { + return true; + } + _i += _rune[1]; + } + return false; + }); + }; + TrimRight = function(s, cutset) { + var _r, cutset, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; cutset = $f.cutset; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = TrimRightFunc(s, makeCutsetFunc(cutset)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimRight }; } $f._r = _r; $f.cutset = cutset; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimRight = TrimRight; + TrimSpace = function(s) { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = TrimFunc(s, unicode.IsSpace); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimSpace }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimSpace = TrimSpace; EqualFold = function(s, t) { var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr; while (true) { @@ -4681,6 +6134,134 @@ $packages["bytes"] = (function() { return s.$length === t.$length; }; $pkg.EqualFold = EqualFold; + Index = function(s, sep) { + var c, c$1, fails, fails$1, i, i$1, j, n, o, o$1, r, s, sep, t, t$1; + n = sep.$length; + if ((n === 0)) { + return 0; + } else if ((n === 1)) { + return IndexByte(s, (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0])); + } else if ((n === s.$length)) { + if (Equal(sep, s)) { + return 0; + } + return -1; + } else if (n > s.$length) { + return -1; + } else if (n <= bytealg.MaxLen) { + if (s.$length <= 0) { + return bytealg.Index(s, sep); + } + c = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]); + i = 0; + t = $subslice(s, 0, ((s.$length - n >> 0) + 1 >> 0)); + fails = 0; + while (true) { + if (!(i < t.$length)) { break; } + if (!((((i < 0 || i >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + i]) === c))) { + o = IndexByte($subslice(t, i), c); + if (o < 0) { + return -1; + } + i = i + (o) >> 0; + } + if (Equal($subslice(s, i, (i + n >> 0)), sep)) { + return i; + } + fails = fails + (1) >> 0; + i = i + (1) >> 0; + if (fails > bytealg.Cutover(i)) { + r = bytealg.Index($subslice(s, i), sep); + if (r >= 0) { + return r + i >> 0; + } + return -1; + } + } + return -1; + } + c$1 = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]); + i$1 = 0; + fails$1 = 0; + t$1 = $subslice(s, 0, ((s.$length - n >> 0) + 1 >> 0)); + while (true) { + if (!(i$1 < t$1.$length)) { break; } + if (!((((i$1 < 0 || i$1 >= t$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : t$1.$array[t$1.$offset + i$1]) === c$1))) { + o$1 = IndexByte($subslice(t$1, i$1), c$1); + if (o$1 < 0) { + break; + } + i$1 = i$1 + (o$1) >> 0; + } + if (Equal($subslice(s, i$1, (i$1 + n >> 0)), sep)) { + return i$1; + } + i$1 = i$1 + (1) >> 0; + fails$1 = fails$1 + (1) >> 0; + if (fails$1 >= (4 + (i$1 >> 4 >> 0) >> 0) && i$1 < t$1.$length) { + j = indexRabinKarp($subslice(s, i$1), sep); + if (j < 0) { + return -1; + } + return i$1 + j >> 0; + } + } + return -1; + }; + $pkg.Index = Index; + indexRabinKarp = function(s, sep) { + var _tuple, h, hashsep, i, i$1, n, pow, s, sep, x; + _tuple = hashStr(sep); + hashsep = _tuple[0]; + pow = _tuple[1]; + n = sep.$length; + h = 0; + i = 0; + while (true) { + if (!(i < n)) { break; } + h = ($imul(h, 16777619) >>> 0) + ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >>> 0)) >>> 0; + i = i + (1) >> 0; + } + if ((h === hashsep) && Equal($subslice(s, 0, n), sep)) { + return 0; + } + i$1 = n; + while (true) { + if (!(i$1 < s.$length)) { break; } + h = $imul(h, (16777619)) >>> 0; + h = h + (((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) >>> 0))) >>> 0; + h = h - (($imul(pow, (((x = i$1 - n >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >>> 0))) >>> 0)) >>> 0; + i$1 = i$1 + (1) >> 0; + if ((h === hashsep) && Equal($subslice(s, (i$1 - n >> 0), i$1), sep)) { + return i$1 - n >> 0; + } + } + return -1; + }; + hashStr = function(sep) { + var _tmp, _tmp$1, hash, i, i$1, pow, sep, sq; + hash = 0; + i = 0; + while (true) { + if (!(i < sep.$length)) { break; } + hash = ($imul(hash, 16777619) >>> 0) + ((((i < 0 || i >= sep.$length) ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + i]) >>> 0)) >>> 0; + i = i + (1) >> 0; + } + _tmp = 1; + _tmp$1 = 16777619; + pow = _tmp; + sq = _tmp$1; + i$1 = sep.$length; + while (true) { + if (!(i$1 > 0)) { break; } + if (!(((i$1 & 1) === 0))) { + pow = $imul(pow, (sq)) >>> 0; + } + sq = $imul(sq, (sq)) >>> 0; + i$1 = (i$1 >> $min((1), 31)) >> 0; + } + return [hash, pow]; + }; Reader.ptr.prototype.Len = function() { var r, x, x$1, x$2, x$3, x$4; r = this; @@ -4874,8 +6455,10 @@ $packages["bytes"] = (function() { }; $pkg.NewReader = NewReader; ptrType.methods = [{prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "empty", name: "empty", pkg: "bytes", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "tryGrowByReslice", name: "tryGrowByReslice", pkg: "bytes", typ: $funcType([$Int], [$Int, $Bool], false)}, {prop: "grow", name: "grow", pkg: "bytes", typ: $funcType([$Int], [$Int], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "readSlice", name: "readSlice", pkg: "bytes", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}]; + ptrType$1.methods = [{prop: "contains", name: "contains", pkg: "bytes", typ: $funcType([$Uint8], [$Bool], false)}]; ptrType$2.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([sliceType], [], false)}]; Buffer.init("bytes", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "bootstrap", name: "bootstrap", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "lastRead", name: "lastRead", embedded: false, exported: false, typ: readOp, tag: ""}]); + asciiSet.init($Uint32, 8); Reader.init("bytes", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]); $init = function() { $pkg.$init = function() {}; @@ -4893,7 +6476,7 @@ $packages["bytes"] = (function() { return $pkg; })(); $packages["bufio"] = (function() { - var $pkg = {}, $init, bytes, errors, io, utf8, Reader, sliceType, ptrType, sliceType$1, errNegativeRead, errNegativeWrite, NewReaderSize, NewReader; + var $pkg = {}, $init, bytes, errors, io, utf8, Reader, Writer, ReadWriter, Scanner, SplitFunc, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, errNegativeRead, errNegativeWrite, NewReaderSize, NewReader, NewWriterSize, NewWriter, NewReadWriter, NewScanner, dropCR, ScanLines; bytes = $packages["bytes"]; errors = $packages["errors"]; io = $packages["io"]; @@ -4918,9 +6501,64 @@ $packages["bufio"] = (function() { this.lastByte = lastByte_; this.lastRuneSize = lastRuneSize_; }); + Writer = $pkg.Writer = $newType(0, $kindStruct, "bufio.Writer", true, "bufio", true, function(err_, buf_, n_, wr_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + this.buf = sliceType.nil; + this.n = 0; + this.wr = $ifaceNil; + return; + } + this.err = err_; + this.buf = buf_; + this.n = n_; + this.wr = wr_; + }); + ReadWriter = $pkg.ReadWriter = $newType(0, $kindStruct, "bufio.ReadWriter", true, "bufio", true, function(Reader_, Writer_) { + this.$val = this; + if (arguments.length === 0) { + this.Reader = ptrType.nil; + this.Writer = ptrType$1.nil; + return; + } + this.Reader = Reader_; + this.Writer = Writer_; + }); + Scanner = $pkg.Scanner = $newType(0, $kindStruct, "bufio.Scanner", true, "bufio", true, function(r_, split_, maxTokenSize_, token_, buf_, start_, end_, err_, empties_, scanCalled_, done_) { + this.$val = this; + if (arguments.length === 0) { + this.r = $ifaceNil; + this.split = $throwNilPointerError; + this.maxTokenSize = 0; + this.token = sliceType.nil; + this.buf = sliceType.nil; + this.start = 0; + this.end = 0; + this.err = $ifaceNil; + this.empties = 0; + this.scanCalled = false; + this.done = false; + return; + } + this.r = r_; + this.split = split_; + this.maxTokenSize = maxTokenSize_; + this.token = token_; + this.buf = buf_; + this.start = start_; + this.end = end_; + this.err = err_; + this.empties = empties_; + this.scanCalled = scanCalled_; + this.done = done_; + }); + SplitFunc = $pkg.SplitFunc = $newType(4, $kindFunc, "bufio.SplitFunc", true, "bufio", true, null); sliceType = $sliceType($Uint8); ptrType = $ptrType(Reader); sliceType$1 = $sliceType(sliceType); + ptrType$1 = $ptrType(Writer); + ptrType$2 = $ptrType(Scanner); NewReaderSize = function(rd, size) { var _tuple, b, ok, r, rd, size; _tuple = $assertType(rd, ptrType, true); @@ -5489,8 +7127,544 @@ $packages["bufio"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.writeBuf }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; }; Reader.prototype.writeBuf = function(w) { return this.$val.writeBuf(w); }; + NewWriterSize = function(w, size) { + var _tuple, b, ok, size, w; + _tuple = $assertType(w, ptrType$1, true); + b = _tuple[0]; + ok = _tuple[1]; + if (ok && b.buf.$length >= size) { + return b; + } + if (size <= 0) { + size = 4096; + } + return new Writer.ptr($ifaceNil, $makeSlice(sliceType, size), 0, w); + }; + $pkg.NewWriterSize = NewWriterSize; + NewWriter = function(w) { + var w; + return NewWriterSize(w, 4096); + }; + $pkg.NewWriter = NewWriter; + Writer.ptr.prototype.Size = function() { + var b; + b = this; + return b.buf.$length; + }; + Writer.prototype.Size = function() { return this.$val.Size(); }; + Writer.ptr.prototype.Reset = function(w) { + var b, w; + b = this; + b.err = $ifaceNil; + b.n = 0; + b.wr = w; + }; + Writer.prototype.Reset = function(w) { return this.$val.Reset(w); }; + Writer.ptr.prototype.Flush = function() { + var _r, _tuple, b, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + $s = -1; return b.err; + } + if (b.n === 0) { + $s = -1; return $ifaceNil; + } + _r = b.wr.Write($subslice(b.buf, 0, b.n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + if (n < b.n && $interfaceIsEqual(err, $ifaceNil)) { + err = io.ErrShortWrite; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (n > 0 && n < b.n) { + $copySlice($subslice(b.buf, 0, (b.n - n >> 0)), $subslice(b.buf, n, b.n)); + } + b.n = b.n - (n) >> 0; + b.err = err; + $s = -1; return err; + } + b.n = 0; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.Flush }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.Flush = function() { return this.$val.Flush(); }; + Writer.ptr.prototype.Available = function() { + var b; + b = this; + return b.buf.$length - b.n >> 0; + }; + Writer.prototype.Available = function() { return this.$val.Available(); }; + Writer.ptr.prototype.Buffered = function() { + var b; + b = this; + return b.n; + }; + Writer.prototype.Buffered = function() { return this.$val.Buffered(); }; + Writer.ptr.prototype.Write = function(p) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, n, n$1, nn, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; n$1 = $f.n$1; nn = $f.nn; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + b = this; + /* while (true) { */ case 1: + /* if (!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; } + n = 0; + /* */ if (b.Buffered() === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (b.Buffered() === 0) { */ case 3: + _r = b.wr.Write(p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + b.err = _tuple[1]; + $s = 5; continue; + /* } else { */ case 4: + n = $copySlice($subslice(b.buf, b.n), p); + b.n = b.n + (n) >> 0; + _r$1 = b.Flush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 5: + nn = nn + (n) >> 0; + p = $subslice(p, n); + /* } */ $s = 1; continue; case 2: + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + _tmp = nn; + _tmp$1 = b.err; + nn = _tmp; + err = _tmp$1; + $s = -1; return [nn, err]; + } + n$1 = $copySlice($subslice(b.buf, b.n), p); + b.n = b.n + (n$1) >> 0; + nn = nn + (n$1) >> 0; + _tmp$2 = nn; + _tmp$3 = $ifaceNil; + nn = _tmp$2; + err = _tmp$3; + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.Write }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.Write = function(p) { return this.$val.Write(p); }; + Writer.ptr.prototype.WriteByte = function(c) { + var _r, _v, b, c, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _v = $f._v; b = $f.b; c = $f.c; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + $s = -1; return b.err; + } + if (!(b.Available() <= 0)) { _v = false; $s = 3; continue s; } + _r = b.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _v = !($interfaceIsEqual(_r, $ifaceNil)); case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return b.err; + /* } */ case 2: + (x = b.buf, x$1 = b.n, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); + b.n = b.n + (1) >> 0; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.WriteByte }; } $f._r = _r; $f._v = _v; $f.b = b; $f.c = c; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; + Writer.ptr.prototype.WriteRune = function(r) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, r, size, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; r = $f.r; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + size = 0; + err = $ifaceNil; + b = this; + /* */ if (r < 128) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r < 128) { */ case 1: + _r = b.WriteByte(((r << 24 >>> 24))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = err; + size = _tmp; + err = _tmp$1; + $s = -1; return [size, err]; + } + _tmp$2 = 1; + _tmp$3 = $ifaceNil; + size = _tmp$2; + err = _tmp$3; + $s = -1; return [size, err]; + /* } */ case 2: + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = b.err; + size = _tmp$4; + err = _tmp$5; + $s = -1; return [size, err]; + } + n = b.Available(); + /* */ if (n < 4) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (n < 4) { */ case 4: + _r$1 = b.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + _tmp$6 = 0; + _tmp$7 = b.err; + size = _tmp$6; + err = _tmp$7; + $s = -1; return [size, err]; + } + n = b.Available(); + /* */ if (n < 4) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (n < 4) { */ case 7: + _r$2 = b.WriteString(($encodeRune(r))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + size = _tuple[0]; + err = _tuple[1]; + $s = -1; return [size, err]; + /* } */ case 8: + /* } */ case 5: + size = utf8.EncodeRune($subslice(b.buf, b.n), r); + b.n = b.n + (size) >> 0; + _tmp$8 = size; + _tmp$9 = $ifaceNil; + size = _tmp$8; + err = _tmp$9; + $s = -1; return [size, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.WriteRune }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.r = r; $f.size = size; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; + Writer.ptr.prototype.WriteString = function(s) { + var _r, b, n, n$1, nn, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; n = $f.n; n$1 = $f.n$1; nn = $f.nn; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + nn = 0; + /* while (true) { */ case 1: + /* if (!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; } + n = $copyString($subslice(b.buf, b.n), s); + b.n = b.n + (n) >> 0; + nn = nn + (n) >> 0; + s = $substring(s, n); + _r = b.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + /* } */ $s = 1; continue; case 2: + if (!($interfaceIsEqual(b.err, $ifaceNil))) { + $s = -1; return [nn, b.err]; + } + n$1 = $copyString($subslice(b.buf, b.n), s); + b.n = b.n + (n$1) >> 0; + nn = nn + (n$1) >> 0; + $s = -1; return [nn, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.WriteString }; } $f._r = _r; $f.b = b; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + Writer.ptr.prototype.ReadFrom = function(r) { + var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, b, err, err1, m, n, nr, ok, r, w, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; err = $f.err; err1 = $f.err1; m = $f.m; n = $f.n; nr = $f.nr; ok = $f.ok; r = $f.r; w = $f.w; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + b = this; + /* */ if (b.Buffered() === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (b.Buffered() === 0) { */ case 1: + _tuple = $assertType(b.wr, io.ReaderFrom, true); + w = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (ok) { */ case 3: + _r = w.ReadFrom(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 4: + /* } */ case 2: + m = 0; + /* while (true) { */ case 6: + /* */ if (b.Available() === 0) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (b.Available() === 0) { */ case 8: + _r$1 = b.Flush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err1 = _r$1; + if (!($interfaceIsEqual(err1, $ifaceNil))) { + _tmp = n; + _tmp$1 = err1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* } */ case 9: + nr = 0; + /* while (true) { */ case 11: + /* if (!(nr < 100)) { break; } */ if(!(nr < 100)) { $s = 12; continue; } + _r$2 = r.Read($subslice(b.buf, b.n)); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + m = _tuple$2[0]; + err = _tuple$2[1]; + if (!((m === 0)) || !($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 12; continue; + } + nr = nr + (1) >> 0; + /* } */ $s = 11; continue; case 12: + if (nr === 100) { + _tmp$2 = n; + _tmp$3 = io.ErrNoProgress; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + b.n = b.n + (m) >> 0; + n = (x = (new $Int64(0, m)), new $Int64(n.$high + x.$high, n.$low + x.$low)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 7; continue; + } + /* } */ $s = 6; continue; case 7: + /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if ($interfaceIsEqual(err, io.EOF)) { */ case 14: + /* */ if (b.Available() === 0) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (b.Available() === 0) { */ case 16: + _r$3 = b.Flush(); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + $s = 18; continue; + /* } else { */ case 17: + err = $ifaceNil; + /* } */ case 18: + /* } */ case 15: + _tmp$4 = n; + _tmp$5 = err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Writer.ptr.prototype.ReadFrom }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.err = err; $f.err1 = err1; $f.m = m; $f.n = n; $f.nr = nr; $f.ok = ok; $f.r = r; $f.w = w; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Writer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; + NewReadWriter = function(r, w) { + var r, w; + return new ReadWriter.ptr(r, w); + }; + $pkg.NewReadWriter = NewReadWriter; + NewScanner = function(r) { + var r; + return new Scanner.ptr(r, ScanLines, 65536, sliceType.nil, sliceType.nil, 0, 0, $ifaceNil, 0, false, false); + }; + $pkg.NewScanner = NewScanner; + Scanner.ptr.prototype.Err = function() { + var s; + s = this; + if ($interfaceIsEqual(s.err, io.EOF)) { + return $ifaceNil; + } + return s.err; + }; + Scanner.prototype.Err = function() { return this.$val.Err(); }; + Scanner.ptr.prototype.Bytes = function() { + var s; + s = this; + return s.token; + }; + Scanner.prototype.Bytes = function() { return this.$val.Bytes(); }; + Scanner.ptr.prototype.Text = function() { + var s; + s = this; + return ($bytesToString(s.token)); + }; + Scanner.prototype.Text = function() { return this.$val.Text(); }; + Scanner.ptr.prototype.Scan = function() { + var _q, _r, _r$1, _tuple, _tuple$1, advance, err, err$1, loop, n, newBuf, newSize, s, token, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; advance = $f.advance; err = $f.err; err$1 = $f.err$1; loop = $f.loop; n = $f.n; newBuf = $f.newBuf; newSize = $f.newSize; s = $f.s; token = $f.token; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + if (s.done) { + $s = -1; return false; + } + s.scanCalled = true; + /* while (true) { */ case 1: + /* */ if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { */ case 3: + _r = s.split($subslice(s.buf, s.start, s.end), !($interfaceIsEqual(s.err, $ifaceNil))); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + advance = _tuple[0]; + token = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, $pkg.ErrFinalToken)) { + s.token = token; + s.done = true; + $s = -1; return true; + } + s.setErr(err); + $s = -1; return false; + } + if (!s.advance(advance)) { + $s = -1; return false; + } + s.token = token; + if (!(token === sliceType.nil)) { + if ($interfaceIsEqual(s.err, $ifaceNil) || advance > 0) { + s.empties = 0; + } else { + s.empties = s.empties + (1) >> 0; + if (s.empties > 100) { + $panic(new $String("bufio.Scan: too many empty tokens without progressing")); + } + } + $s = -1; return true; + } + /* } */ case 4: + if (!($interfaceIsEqual(s.err, $ifaceNil))) { + s.start = 0; + s.end = 0; + $s = -1; return false; + } + if (s.start > 0 && ((s.end === s.buf.$length) || s.start > (_q = s.buf.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { + $copySlice(s.buf, $subslice(s.buf, s.start, s.end)); + s.end = s.end - (s.start) >> 0; + s.start = 0; + } + if (s.end === s.buf.$length) { + if (s.buf.$length >= s.maxTokenSize || s.buf.$length > 1073741823) { + s.setErr($pkg.ErrTooLong); + $s = -1; return false; + } + newSize = $imul(s.buf.$length, 2); + if (newSize === 0) { + newSize = 4096; + } + if (newSize > s.maxTokenSize) { + newSize = s.maxTokenSize; + } + newBuf = $makeSlice(sliceType, newSize); + $copySlice(newBuf, $subslice(s.buf, s.start, s.end)); + s.buf = newBuf; + s.end = s.end - (s.start) >> 0; + s.start = 0; + } + loop = 0; + /* while (true) { */ case 6: + _r$1 = s.r.Read($subslice(s.buf, s.end, s.buf.$length)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err$1 = _tuple$1[1]; + s.end = s.end + (n) >> 0; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + s.setErr(err$1); + /* break; */ $s = 7; continue; + } + if (n > 0) { + s.empties = 0; + /* break; */ $s = 7; continue; + } + loop = loop + (1) >> 0; + if (loop > 100) { + s.setErr(io.ErrNoProgress); + /* break; */ $s = 7; continue; + } + /* } */ $s = 6; continue; case 7: + /* } */ $s = 1; continue; case 2: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: Scanner.ptr.prototype.Scan }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.advance = advance; $f.err = err; $f.err$1 = err$1; $f.loop = loop; $f.n = n; $f.newBuf = newBuf; $f.newSize = newSize; $f.s = s; $f.token = token; $f.$s = $s; $f.$r = $r; return $f; + }; + Scanner.prototype.Scan = function() { return this.$val.Scan(); }; + Scanner.ptr.prototype.advance = function(n) { + var n, s; + s = this; + if (n < 0) { + s.setErr($pkg.ErrNegativeAdvance); + return false; + } + if (n > (s.end - s.start >> 0)) { + s.setErr($pkg.ErrAdvanceTooFar); + return false; + } + s.start = s.start + (n) >> 0; + return true; + }; + Scanner.prototype.advance = function(n) { return this.$val.advance(n); }; + Scanner.ptr.prototype.setErr = function(err) { + var err, s; + s = this; + if ($interfaceIsEqual(s.err, $ifaceNil) || $interfaceIsEqual(s.err, io.EOF)) { + s.err = err; + } + }; + Scanner.prototype.setErr = function(err) { return this.$val.setErr(err); }; + Scanner.ptr.prototype.Buffer = function(buf, max) { + var buf, max, s; + s = this; + if (s.scanCalled) { + $panic(new $String("Buffer called after Scan")); + } + s.buf = $subslice(buf, 0, buf.$capacity); + s.maxTokenSize = max; + }; + Scanner.prototype.Buffer = function(buf, max) { return this.$val.Buffer(buf, max); }; + Scanner.ptr.prototype.Split = function(split) { + var s, split; + s = this; + if (s.scanCalled) { + $panic(new $String("Split called after Scan")); + } + s.split = split; + }; + Scanner.prototype.Split = function(split) { return this.$val.Split(split); }; + dropCR = function(data) { + var data, x; + if (data.$length > 0 && ((x = data.$length - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) === 13)) { + return $subslice(data, 0, (data.$length - 1 >> 0)); + } + return data; + }; + ScanLines = function(data, atEOF) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, advance, atEOF, data, err, i, token; + advance = 0; + token = sliceType.nil; + err = $ifaceNil; + if (atEOF && (data.$length === 0)) { + _tmp = 0; + _tmp$1 = sliceType.nil; + _tmp$2 = $ifaceNil; + advance = _tmp; + token = _tmp$1; + err = _tmp$2; + return [advance, token, err]; + } + i = bytes.IndexByte(data, 10); + if (i >= 0) { + _tmp$3 = i + 1 >> 0; + _tmp$4 = dropCR($subslice(data, 0, i)); + _tmp$5 = $ifaceNil; + advance = _tmp$3; + token = _tmp$4; + err = _tmp$5; + return [advance, token, err]; + } + if (atEOF) { + _tmp$6 = data.$length; + _tmp$7 = dropCR(data); + _tmp$8 = $ifaceNil; + advance = _tmp$6; + token = _tmp$7; + err = _tmp$8; + return [advance, token, err]; + } + _tmp$9 = 0; + _tmp$10 = sliceType.nil; + _tmp$11 = $ifaceNil; + advance = _tmp$9; + token = _tmp$10; + err = _tmp$11; + return [advance, token, err]; + }; + $pkg.ScanLines = ScanLines; ptrType.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader], [], false)}, {prop: "reset", name: "reset", pkg: "bufio", typ: $funcType([sliceType, io.Reader], [], false)}, {prop: "fill", name: "fill", pkg: "bufio", typ: $funcType([], [], false)}, {prop: "readErr", name: "readErr", pkg: "bufio", typ: $funcType([], [$error], false)}, {prop: "Peek", name: "Peek", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Discard", name: "Discard", pkg: "", typ: $funcType([$Int], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ReadSlice", name: "ReadSlice", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadLine", name: "ReadLine", pkg: "", typ: $funcType([], [sliceType, $Bool, $error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "writeBuf", name: "writeBuf", pkg: "bufio", typ: $funcType([io.Writer], [$Int64, $error], false)}]; + ptrType$1.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}]; + ptrType$2.methods = [{prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "advance", name: "advance", pkg: "bufio", typ: $funcType([$Int], [$Bool], false)}, {prop: "setErr", name: "setErr", pkg: "bufio", typ: $funcType([$error], [], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([sliceType, $Int], [], false)}, {prop: "Split", name: "Split", pkg: "", typ: $funcType([SplitFunc], [], false)}]; Reader.init("bufio", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "rd", name: "rd", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "lastByte", name: "lastByte", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastRuneSize", name: "lastRuneSize", embedded: false, exported: false, typ: $Int, tag: ""}]); + Writer.init("bufio", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "wr", name: "wr", embedded: false, exported: false, typ: io.Writer, tag: ""}]); + ReadWriter.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$1, tag: ""}]); + Scanner.init("bufio", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "split", name: "split", embedded: false, exported: false, typ: SplitFunc, tag: ""}, {prop: "maxTokenSize", name: "maxTokenSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "token", name: "token", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "empties", name: "empties", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scanCalled", name: "scanCalled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); + SplitFunc.init([sliceType, $Bool], [$Int, sliceType, $error], false); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -5514,7 +7688,7 @@ $packages["bufio"] = (function() { return $pkg; })(); $packages["math"] = (function() { - var $pkg = {}, $init, js, arrayType, arrayType$1, arrayType$2, structType, math, zero, posInf, negInf, nan, buf, Cbrt, Cos, Inf, NaN, Sin, Sqrt, init, Float32bits, Float32frombits, Float64bits, Float64frombits, Abs; + var $pkg = {}, $init, js, arrayType, arrayType$1, arrayType$2, structType, math, zero, posInf, negInf, nan, buf, Cbrt, Copysign, Cos, Exp, Frexp, Inf, IsInf, IsNaN, Ldexp, Log, Log2, NaN, Signbit, Sin, Sqrt, init, Float32bits, Float32frombits, Float64bits, Float64frombits, Abs, normalize, frexp, ldexp, log2; js = $packages["github.com/gopherjs/gopherjs/js"]; arrayType = $arrayType($Uint32, 2); arrayType$1 = $arrayType($Float32, 2); @@ -5525,11 +7699,34 @@ $packages["math"] = (function() { return $parseFloat(math.cbrt(x)); }; $pkg.Cbrt = Cbrt; + Copysign = function(x, y) { + var x, y; + if (!((x < 0 || (1 / x === negInf)) === (y < 0 || (1 / y === negInf)))) { + return -x; + } + return x; + }; + $pkg.Copysign = Copysign; Cos = function(x) { var x; return $parseFloat(math.cos(x)); }; $pkg.Cos = Cos; + Exp = function(x) { + var x; + return $parseFloat(math.exp(x)); + }; + $pkg.Exp = Exp; + Frexp = function(f) { + var _tuple, exp$1, f, frac; + frac = 0; + exp$1 = 0; + _tuple = frexp(f); + frac = _tuple[0]; + exp$1 = _tuple[1]; + return [frac, exp$1]; + }; + $pkg.Frexp = Frexp; Inf = function(sign) { var sign; if (sign >= 0) { @@ -5539,10 +7736,57 @@ $packages["math"] = (function() { } }; $pkg.Inf = Inf; + IsInf = function(f, sign) { + var f, sign; + if (f === posInf) { + return sign >= 0; + } + if (f === negInf) { + return sign <= 0; + } + return false; + }; + $pkg.IsInf = IsInf; + IsNaN = function(f) { + var f, is; + is = false; + is = !((f === f)); + return is; + }; + $pkg.IsNaN = IsNaN; + Ldexp = function(frac, exp$1) { + var exp$1, frac; + if (-1024 < exp$1 && exp$1 < 1024) { + if (frac === 0) { + return frac; + } + return frac * $parseFloat(math.pow(2, exp$1)); + } + return ldexp(frac, exp$1); + }; + $pkg.Ldexp = Ldexp; + Log = function(x) { + var x; + if (!((x === x))) { + return nan; + } + return $parseFloat(math.log(x)); + }; + $pkg.Log = Log; + Log2 = function(x) { + var x; + return log2(x); + }; + $pkg.Log2 = Log2; NaN = function() { return nan; }; $pkg.NaN = NaN; + Signbit = function(x) { + var x; + return x < 0 || (1 / x === negInf); + }; + $pkg.Signbit = Signbit; Sin = function(x) { var x; return $parseFloat(math.sin(x)); @@ -5590,6 +7834,91 @@ $packages["math"] = (function() { return Float64frombits((x$1 = Float64bits(x), new $Uint64(x$1.$high & ~2147483648, (x$1.$low & ~0) >>> 0))); }; $pkg.Abs = Abs; + normalize = function(x) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, exp$1, x, y; + y = 0; + exp$1 = 0; + if (Abs(x) < 2.2250738585072014e-308) { + _tmp = x * 4.503599627370496e+15; + _tmp$1 = -52; + y = _tmp; + exp$1 = _tmp$1; + return [y, exp$1]; + } + _tmp$2 = x; + _tmp$3 = 0; + y = _tmp$2; + exp$1 = _tmp$3; + return [y, exp$1]; + }; + frexp = function(f) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, exp$1, f, frac, x, x$1, x$2, x$3; + frac = 0; + exp$1 = 0; + if ((f === 0)) { + _tmp = f; + _tmp$1 = 0; + frac = _tmp; + exp$1 = _tmp$1; + return [frac, exp$1]; + } else if (IsInf(f, 0) || IsNaN(f)) { + _tmp$2 = f; + _tmp$3 = 0; + frac = _tmp$2; + exp$1 = _tmp$3; + return [frac, exp$1]; + } + _tuple = normalize(f); + f = _tuple[0]; + exp$1 = _tuple[1]; + x = Float64bits(f); + exp$1 = exp$1 + ((((((x$1 = $shiftRightUint64(x, 52), new $Uint64(x$1.$high & 0, (x$1.$low & 2047) >>> 0)).$low >> 0)) - 1023 >> 0) + 1 >> 0)) >> 0; + x = (x$2 = new $Uint64(2146435072, 0), new $Uint64(x.$high & ~x$2.$high, (x.$low & ~x$2.$low) >>> 0)); + x = (x$3 = new $Uint64(1071644672, 0), new $Uint64(x.$high | x$3.$high, (x.$low | x$3.$low) >>> 0)); + frac = Float64frombits(x); + return [frac, exp$1]; + }; + ldexp = function(frac, exp$1) { + var _tuple, e, exp$1, frac, m, x, x$1, x$2; + if ((frac === 0)) { + return frac; + } else if (IsInf(frac, 0) || IsNaN(frac)) { + return frac; + } + _tuple = normalize(frac); + frac = _tuple[0]; + e = _tuple[1]; + exp$1 = exp$1 + (e) >> 0; + x = Float64bits(frac); + exp$1 = exp$1 + ((((($shiftRightUint64(x, 52).$low >> 0)) & 2047) - 1023 >> 0)) >> 0; + if (exp$1 < -1075) { + return Copysign(0, frac); + } + if (exp$1 > 1023) { + if (frac < 0) { + return Inf(-1); + } + return Inf(1); + } + m = 1; + if (exp$1 < -1022) { + exp$1 = exp$1 + (53) >> 0; + m = 1.1102230246251565e-16; + } + x = (x$1 = new $Uint64(2146435072, 0), new $Uint64(x.$high & ~x$1.$high, (x.$low & ~x$1.$low) >>> 0)); + x = (x$2 = $shiftLeft64((new $Uint64(0, (exp$1 + 1023 >> 0))), 52), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); + return m * Float64frombits(x); + }; + log2 = function(x) { + var _tuple, exp$1, frac, x; + _tuple = Frexp(x); + frac = _tuple[0]; + exp$1 = _tuple[1]; + if (frac === 0.5) { + return ((exp$1 - 1 >> 0)); + } + return Log(frac) * 1.4426950408889634 + (exp$1); + }; $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -5607,12 +7936,13 @@ $packages["math"] = (function() { return $pkg; })(); $packages["syscall"] = (function() { - var $pkg = {}, $init, errors, js, race, runtime, sync, SockaddrDatalink, mmapper, Errno, Sockaddr, SockaddrInet4, SockaddrInet6, SockaddrUnix, Timespec, Stat_t, RawSockaddrInet4, RawSockaddrInet6, RawSockaddrUnix, RawSockaddrDatalink, RawSockaddr, RawSockaddrAny, _Socklen, Linger, Iovec, IPMreq, IPv6Mreq, Msghdr, sliceType, sliceType$1, ptrType$2, arrayType, arrayType$1, ptrType$11, arrayType$3, arrayType$4, arrayType$5, arrayType$6, arrayType$10, ptrType$16, arrayType$11, ptrType$17, ptrType$18, structType, ptrType$20, ptrType$21, ptrType$27, mapType, funcType$2, funcType$3, ptrType$28, ptrType$29, ptrType$30, ptrType$31, arrayType$15, ptrType$32, warningPrinted, lineBuffer, syscallModule, alreadyTriedToLoad, minusOne, envs, freebsdConfArch, minRoutingSockaddrLen, mapper, errEAGAIN, errEINVAL, errENOENT, ioSync, ioSync$24ptr, errors$1, init, printWarning, printToConsole, Exit, indexByte, runtime_envs, syscall, Syscall, Syscall6, BytePtrFromString, readInt, readIntBE, readIntLE, ParseDirent, CloseOnExec, SetNonblock, msanRead, msanWrite, rsaAlignOf, itoa, uitoa, ReadDirent, anyToSockaddr, Accept, Recvmsg, SendmsgN, direntIno, direntReclen, direntNamlen, errnoErr, Read, Write, Recvfrom, Sendto, SetsockoptByte, SetsockoptInt, SetsockoptInet4Addr, SetsockoptIPMreq, SetsockoptIPv6Mreq, SetsockoptLinger, accept, setsockopt, Shutdown, recvfrom, sendto, recvmsg, sendmsg, fcntl, Close, Dup, Fchdir, Fchmod, Fchown, Fstat, Fsync, Ftruncate, Getdirentries, Lstat, Pread, Pwrite, read, Seek, write, mmap, munmap; + var $pkg = {}, $init, errors, js, race, runtime, sync, RawConn, SockaddrDatalink, mmapper, Errno, Sockaddr, SockaddrInet4, SockaddrInet6, SockaddrUnix, _C_int, Timespec, Stat_t, RawSockaddrInet4, RawSockaddrInet6, RawSockaddrUnix, RawSockaddrDatalink, RawSockaddr, RawSockaddrAny, _Socklen, Linger, Iovec, IPMreq, IPv6Mreq, Msghdr, sliceType, sliceType$1, ptrType$2, arrayType, arrayType$1, ptrType$11, arrayType$3, arrayType$4, arrayType$5, arrayType$6, sliceType$5, ptrType$12, arrayType$10, ptrType$16, arrayType$11, ptrType$17, ptrType$18, arrayType$13, structType, ptrType$20, ptrType$21, funcType, funcType$1, ptrType$27, mapType, funcType$2, funcType$3, ptrType$28, ptrType$29, ptrType$30, ptrType$31, arrayType$15, ptrType$32, warningPrinted, lineBuffer, syscallModule, alreadyTriedToLoad, minusOne, envOnce, envLock, env, envs, freebsdConfArch, minRoutingSockaddrLen, mapper, errEAGAIN, errEINVAL, errENOENT, ioSync, ioSync$24ptr, errors$1, init, printWarning, printToConsole, Exit, indexByte, runtime_envs, syscall, Syscall, Syscall6, RawSyscall, BytePtrFromString, readInt, readIntBE, readIntLE, ParseDirent, copyenv, Getenv, CloseOnExec, SetNonblock, msanRead, msanWrite, rsaAlignOf, itoa, uitoa, ByteSliceFromString, ReadDirent, anyToSockaddr, Accept, Getsockname, Recvmsg, SendmsgN, Sysctl, nametomib, direntIno, direntReclen, direntNamlen, errnoErr, Read, Write, Bind, Connect, Getpeername, GetsockoptInt, Recvfrom, Sendto, SetsockoptByte, SetsockoptInt, SetsockoptInet4Addr, SetsockoptIPMreq, SetsockoptIPv6Mreq, SetsockoptLinger, Socket, accept, bind, connect, socket, getsockopt, setsockopt, getpeername, getsockname, Shutdown, recvfrom, sendto, recvmsg, sendmsg, sysctl, fcntl, Chmod, Close, Dup, Fchdir, Fchmod, Fchown, Fstat, Fsync, Ftruncate, Getdirentries, Getpid, Listen, Lstat, Open, Pread, Pwrite, read, Rmdir, Seek, Stat, Unlink, write, mmap, munmap; errors = $packages["errors"]; js = $packages["github.com/gopherjs/gopherjs/js"]; race = $packages["internal/race"]; runtime = $packages["runtime"]; sync = $packages["sync"]; + RawConn = $pkg.RawConn = $newType(8, $kindInterface, "syscall.RawConn", true, "syscall", true, null); SockaddrDatalink = $pkg.SockaddrDatalink = $newType(0, $kindStruct, "syscall.SockaddrDatalink", true, "syscall", true, function(Len_, Family_, Index_, Type_, Nlen_, Alen_, Slen_, Data_, raw_) { this.$val = this; if (arguments.length === 0) { @@ -5689,6 +8019,7 @@ $packages["syscall"] = (function() { this.Name = Name_; this.raw = raw_; }); + _C_int = $pkg._C_int = $newType(4, $kindInt32, "syscall._C_int", true, "syscall", false, null); Timespec = $pkg.Timespec = $newType(0, $kindStruct, "syscall.Timespec", true, "syscall", true, function(Sec_, Nsec_) { this.$val = this; if (arguments.length === 0) { @@ -5908,14 +8239,19 @@ $packages["syscall"] = (function() { arrayType$4 = $arrayType($Int8, 14); arrayType$5 = $arrayType($Int8, 92); arrayType$6 = $arrayType($Int8, 8); + sliceType$5 = $sliceType(_C_int); + ptrType$12 = $ptrType($Uintptr); arrayType$10 = $arrayType($Uint8, 32); ptrType$16 = $ptrType($Uint16); arrayType$11 = $arrayType($Int8, 104); ptrType$17 = $ptrType(_Socklen); ptrType$18 = $ptrType(Iovec); + arrayType$13 = $arrayType(_C_int, 14); structType = $structType("syscall", [{prop: "addr", name: "addr", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "cap", name: "cap", embedded: false, exported: false, typ: $Int, tag: ""}]); ptrType$20 = $ptrType($Int64); ptrType$21 = $ptrType($Int32); + funcType = $funcType([$Uintptr], [], false); + funcType$1 = $funcType([$Uintptr], [$Bool], false); ptrType$27 = $ptrType(mmapper); mapType = $mapType(ptrType$2, sliceType); funcType$2 = $funcType([$Uintptr, $Uintptr, $Int, $Int, $Int, $Int64], [$Uintptr, $error], false); @@ -6085,6 +8421,32 @@ $packages["syscall"] = (function() { return [r1, r2, err]; }; $pkg.Syscall6 = Syscall6; + RawSyscall = function(trap, a1, a2, a3) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, a1, a2, a3, err, f, r, r1, r2, trap; + r1 = 0; + r2 = 0; + err = 0; + f = syscall("Syscall"); + if (!(f === null)) { + r = f(trap, a1, a2, a3); + _tmp = ((($parseInt(r[0]) >> 0) >>> 0)); + _tmp$1 = ((($parseInt(r[1]) >> 0) >>> 0)); + _tmp$2 = ((($parseInt(r[2]) >> 0) >>> 0)); + r1 = _tmp; + r2 = _tmp$1; + err = _tmp$2; + return [r1, r2, err]; + } + printWarning(); + _tmp$3 = ((minusOne >>> 0)); + _tmp$4 = 0; + _tmp$5 = 13; + r1 = _tmp$3; + r2 = _tmp$4; + err = _tmp$5; + return [r1, r2, err]; + }; + $pkg.RawSyscall = RawSyscall; BytePtrFromString = function(s) { var _i, _ref, array, b, i, s; array = new ($global.Uint8Array)(s.length + 1 >> 0); @@ -6231,6 +8593,80 @@ $packages["syscall"] = (function() { return [consumed, count, newnames]; }; $pkg.ParseDirent = ParseDirent; + copyenv = function() { + var _entry, _i, _key, _ref, _tuple, i, j, key, ok, s; + env = {}; + _ref = envs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + j = 0; + while (true) { + if (!(j < s.length)) { break; } + if (s.charCodeAt(j) === 61) { + key = $substring(s, 0, j); + _tuple = (_entry = env[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]); + ok = _tuple[1]; + if (!ok) { + _key = key; (env || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: i }; + } else { + ((i < 0 || i >= envs.$length) ? ($throwRuntimeError("index out of range"), undefined) : envs.$array[envs.$offset + i] = ""); + } + break; + } + j = j + (1) >> 0; + } + _i++; + } + }; + Getenv = function(key) { + var _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found, i, i$1, key, ok, s, value, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; found = $f.found; i = $f.i; i$1 = $f.i$1; key = $f.key; ok = $f.ok; s = $f.s; value = $f.value; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + value = ""; + found = false; + $r = envOnce.Do(copyenv); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (key.length === 0) { + _tmp = ""; + _tmp$1 = false; + value = _tmp; + found = _tmp$1; + $s = -1; return [value, found]; + } + $r = envLock.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(envLock, "RUnlock"), []]); + _tuple = (_entry = env[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]); + i = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _tmp$2 = ""; + _tmp$3 = false; + value = _tmp$2; + found = _tmp$3; + $s = -1; return [value, found]; + } + s = ((i < 0 || i >= envs.$length) ? ($throwRuntimeError("index out of range"), undefined) : envs.$array[envs.$offset + i]); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + if (s.charCodeAt(i$1) === 61) { + _tmp$4 = $substring(s, (i$1 + 1 >> 0)); + _tmp$5 = true; + value = _tmp$4; + found = _tmp$5; + $s = -1; return [value, found]; + } + i$1 = i$1 + (1) >> 0; + } + _tmp$6 = ""; + _tmp$7 = false; + value = _tmp$6; + found = _tmp$7; + $s = -1; return [value, found]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [value, found]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Getenv }; } $f._entry = _entry; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f.found = found; $f.i = i; $f.i$1 = i$1; $f.key = key; $f.ok = ok; $f.s = s; $f.value = value; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + $pkg.Getenv = Getenv; CloseOnExec = function(fd) { var fd; fcntl(fd, 2, 1); @@ -6300,6 +8736,21 @@ $packages["syscall"] = (function() { ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = (((val + 48 >>> 0) << 24 >>> 24))); return ($bytesToString($subslice(new sliceType(buf), i))); }; + ByteSliceFromString = function(s) { + var a, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 0) { + return [sliceType.nil, new Errno(22)]; + } + i = i + (1) >> 0; + } + a = $makeSlice(sliceType, (s.length + 1 >> 0)); + $copyString(a, s); + return [a, $ifaceNil]; + }; + $pkg.ByteSliceFromString = ByteSliceFromString; Timespec.ptr.prototype.Unix = function() { var _tmp, _tmp$1, nsec, sec, ts; sec = new $Int64(0, 0); @@ -6523,6 +8974,26 @@ $packages["syscall"] = (function() { return [nfd, sa, err]; }; $pkg.Accept = Accept; + Getsockname = function(fd) { + var _tuple, err, fd, len, len$24ptr, rsa, sa; + sa = $ifaceNil; + err = $ifaceNil; + rsa = new RawSockaddrAny.ptr(new RawSockaddr.ptr(0, 0, arrayType$4.zero()), arrayType$5.zero()); + len = 108; + err = getsockname(fd, rsa, (len$24ptr || (len$24ptr = new ptrType$17(function() { return len; }, function($v) { len = $v; })))); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sa, err]; + } + if (false && (rsa.Addr.Family === 0) && (rsa.Addr.Len === 0)) { + rsa.Addr.Family = 1; + rsa.Addr.Len = 106; + } + _tuple = anyToSockaddr(rsa); + sa = _tuple[0]; + err = _tuple[1]; + return [sa, err]; + }; + $pkg.Getsockname = Getsockname; Recvmsg = function(fd, p, oob, flags) { var _array, _struct, _tuple, _tuple$1, _view, dummy, dummy$24ptr, err, fd, flags, from, iov, msg, n, oob, oobn, p, recvflags, rsa; n = 0; @@ -6634,6 +9105,86 @@ $packages["syscall"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: SendmsgN }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.dummy = dummy; $f.err = err; $f.fd = fd; $f.flags = flags; $f.iov = iov; $f.msg = msg; $f.n = n; $f.oob = oob; $f.p = p; $f.ptr = ptr; $f.salen = salen; $f.to = to; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.SendmsgN = SendmsgN; + Sysctl = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, err, mib, n, n$24ptr, name, value, x; + value = ""; + err = $ifaceNil; + _tuple = nametomib(name); + mib = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; + _tmp$1 = err; + value = _tmp; + err = _tmp$1; + return [value, err]; + } + n = 0; + err = sysctl(mib, ptrType$2.nil, (n$24ptr || (n$24ptr = new ptrType$12(function() { return n; }, function($v) { n = $v; }))), ptrType$2.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = ""; + _tmp$3 = err; + value = _tmp$2; + err = _tmp$3; + return [value, err]; + } + if (n === 0) { + _tmp$4 = ""; + _tmp$5 = $ifaceNil; + value = _tmp$4; + err = _tmp$5; + return [value, err]; + } + buf = $makeSlice(sliceType, n); + err = sysctl(mib, $indexPtr(buf.$array, buf.$offset + 0, ptrType$2), (n$24ptr || (n$24ptr = new ptrType$12(function() { return n; }, function($v) { n = $v; }))), ptrType$2.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = ""; + _tmp$7 = err; + value = _tmp$6; + err = _tmp$7; + return [value, err]; + } + if (n > 0 && ((x = n - 1 >>> 0, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])) === 0)) { + n = n - (1) >>> 0; + } + _tmp$8 = ($bytesToString($subslice(buf, 0, n))); + _tmp$9 = $ifaceNil; + value = _tmp$8; + err = _tmp$9; + return [value, err]; + }; + $pkg.Sysctl = Sysctl; + nametomib = function(name) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, bytes, err, mib, n, n$24ptr, name, p; + mib = sliceType$5.nil; + err = $ifaceNil; + buf = arrayType$13.zero(); + n = 48; + p = (($sliceToArray(new sliceType(buf)))); + _tuple = ByteSliceFromString(name); + bytes = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType$5.nil; + _tmp$1 = err; + mib = _tmp; + err = _tmp$1; + return [mib, err]; + } + err = sysctl(new sliceType$5([0, 3]), p, (n$24ptr || (n$24ptr = new ptrType$12(function() { return n; }, function($v) { n = $v; }))), $indexPtr(bytes.$array, bytes.$offset + 0, ptrType$2), ((name.length >>> 0))); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = sliceType$5.nil; + _tmp$3 = err; + mib = _tmp$2; + err = _tmp$3; + return [mib, err]; + } + _tmp$4 = $subslice(new sliceType$5(buf), 0, (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))); + _tmp$5 = $ifaceNil; + mib = _tmp$4; + err = _tmp$5; + return [mib, err]; + }; direntIno = function(buf) { var buf; return readInt(buf, 0, 8); @@ -6804,6 +9355,72 @@ $packages["syscall"] = (function() { return [n, err]; }; $pkg.Write = Write; + Bind = function(fd, sa) { + var _r, _tuple, err, fd, n, ptr, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; ptr = $f.ptr; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + _r = sa.sockaddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + ptr = _tuple[0]; + n = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = err; + $s = -1; return err; + } + err = bind(fd, ptr, n); + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Bind }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.ptr = ptr; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Bind = Bind; + Connect = function(fd, sa) { + var _r, _tuple, err, fd, n, ptr, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; ptr = $f.ptr; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + _r = sa.sockaddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + ptr = _tuple[0]; + n = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = err; + $s = -1; return err; + } + err = connect(fd, ptr, n); + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Connect }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.ptr = ptr; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Connect = Connect; + Getpeername = function(fd) { + var _tuple, err, fd, len, len$24ptr, rsa, sa; + sa = $ifaceNil; + err = $ifaceNil; + rsa = new RawSockaddrAny.ptr(new RawSockaddr.ptr(0, 0, arrayType$4.zero()), arrayType$5.zero()); + len = 108; + err = getpeername(fd, rsa, (len$24ptr || (len$24ptr = new ptrType$17(function() { return len; }, function($v) { len = $v; })))); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sa, err]; + } + _tuple = anyToSockaddr(rsa); + sa = _tuple[0]; + err = _tuple[1]; + return [sa, err]; + }; + $pkg.Getpeername = Getpeername; + GetsockoptInt = function(fd, level, opt) { + var _tmp, _tmp$1, err, fd, level, n, n$24ptr, opt, vallen, vallen$24ptr, value; + value = 0; + err = $ifaceNil; + n = 0; + vallen = 4; + err = getsockopt(fd, level, opt, ((n$24ptr || (n$24ptr = new ptrType$21(function() { return n; }, function($v) { n = $v; })))), (vallen$24ptr || (vallen$24ptr = new ptrType$17(function() { return vallen; }, function($v) { vallen = $v; })))); + _tmp = ((n >> 0)); + _tmp$1 = err; + value = _tmp; + err = _tmp$1; + return [value, err]; + }; + $pkg.GetsockoptInt = GetsockoptInt; Recvfrom = function(fd, p, flags) { var _tuple, _tuple$1, err, fd, flags, from, len, len$24ptr, n, p, rsa; n = 0; @@ -6892,6 +9509,23 @@ $packages["syscall"] = (function() { return err; }; $pkg.SetsockoptLinger = SetsockoptLinger; + Socket = function(domain, typ, proto) { + var _tmp, _tmp$1, _tuple, domain, err, fd, proto, typ; + fd = 0; + err = $ifaceNil; + if ((domain === 30) && $pkg.SocketDisableIPv6) { + _tmp = -1; + _tmp$1 = new Errno(47); + fd = _tmp; + err = _tmp$1; + return [fd, err]; + } + _tuple = socket(domain, typ, proto); + fd = _tuple[0]; + err = _tuple[1]; + return [fd, err]; + }; + $pkg.Socket = Socket; accept = function(s, rsa, addrlen) { var _array, _struct, _tuple, _view, addrlen, e1, err, fd, r0, rsa, s; fd = 0; @@ -6907,6 +9541,49 @@ $packages["syscall"] = (function() { } return [fd, err]; }; + bind = function(s, addr, addrlen) { + var _tuple, addr, addrlen, e1, err, s; + err = $ifaceNil; + _tuple = Syscall(104, ((s >>> 0)), (addr), ((addrlen >>> 0))); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + connect = function(s, addr, addrlen) { + var _tuple, addr, addrlen, e1, err, s; + err = $ifaceNil; + _tuple = Syscall(98, ((s >>> 0)), (addr), ((addrlen >>> 0))); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + socket = function(domain, typ, proto) { + var _tuple, domain, e1, err, fd, proto, r0, typ; + fd = 0; + err = $ifaceNil; + _tuple = RawSyscall(97, ((domain >>> 0)), ((typ >>> 0)), ((proto >>> 0))); + r0 = _tuple[0]; + e1 = _tuple[2]; + fd = ((r0 >> 0)); + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return [fd, err]; + }; + getsockopt = function(s, level, name, val, vallen) { + var _tuple, e1, err, level, name, s, val, vallen; + err = $ifaceNil; + _tuple = Syscall6(118, ((s >>> 0)), ((level >>> 0)), ((name >>> 0)), (val), ((vallen)), 0); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; setsockopt = function(s, level, name, val, vallen) { var _tuple, e1, err, level, name, s, val, vallen; err = $ifaceNil; @@ -6917,6 +9594,30 @@ $packages["syscall"] = (function() { } return err; }; + getpeername = function(fd, rsa, addrlen) { + var _array, _struct, _tuple, _view, addrlen, e1, err, fd, rsa; + err = $ifaceNil; + _array = new Uint8Array(108); + _tuple = RawSyscall(31, ((fd >>> 0)), ((_array)), ((addrlen))); + _struct = rsa, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Addr.Len = _view.getUint8(0, true), _struct.Addr.Family = _view.getUint8(1, true), _struct.Addr.Data = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 2, _array.buffer.byteLength)), _struct.Pad = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 16, _array.buffer.byteLength)); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + getsockname = function(fd, rsa, addrlen) { + var _array, _struct, _tuple, _view, addrlen, e1, err, fd, rsa; + err = $ifaceNil; + _array = new Uint8Array(108); + _tuple = RawSyscall(32, ((fd >>> 0)), ((_array)), ((addrlen))); + _struct = rsa, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Addr.Len = _view.getUint8(0, true), _struct.Addr.Family = _view.getUint8(1, true), _struct.Addr.Data = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 2, _array.buffer.byteLength)), _struct.Pad = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 16, _array.buffer.byteLength)); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; Shutdown = function(s, how) { var _tuple, e1, err, how, s; err = $ifaceNil; @@ -6995,6 +9696,22 @@ $packages["syscall"] = (function() { } return [n, err]; }; + sysctl = function(mib, old, oldlen, new$1, newlen) { + var _p0, _tuple, e1, err, mib, new$1, newlen, old, oldlen; + err = $ifaceNil; + _p0 = 0; + if (mib.$length > 0) { + _p0 = ($sliceToArray(mib)); + } else { + _p0 = (new Uint8Array(0)); + } + _tuple = Syscall6(202, (_p0), ((mib.$length >>> 0)), ((old)), ((oldlen)), ((new$1)), (newlen)); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; fcntl = function(fd, cmd, arg) { var _tuple, arg, cmd, e1, err, fd, r0, val; val = 0; @@ -7008,6 +9725,24 @@ $packages["syscall"] = (function() { } return [val, err]; }; + Chmod = function(path, mode) { + var _p0, _tuple, _tuple$1, e1, err, mode, path; + err = $ifaceNil; + _p0 = ptrType$2.nil; + _tuple = BytePtrFromString(path); + _p0 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _tuple$1 = Syscall(15, ((_p0)), ((mode >>> 0)), 0); + e1 = _tuple$1[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + $pkg.Chmod = Chmod; Close = function(fd) { var _tuple, e1, err, fd; err = $ifaceNil; @@ -7121,6 +9856,26 @@ $packages["syscall"] = (function() { return [n, err]; }; $pkg.Getdirentries = Getdirentries; + Getpid = function() { + var _tuple, pid, r0; + pid = 0; + _tuple = RawSyscall(20, 0, 0, 0); + r0 = _tuple[0]; + pid = ((r0 >> 0)); + return pid; + }; + $pkg.Getpid = Getpid; + Listen = function(s, backlog) { + var _tuple, backlog, e1, err, s; + err = $ifaceNil; + _tuple = Syscall(106, ((s >>> 0)), ((backlog >>> 0)), 0); + e1 = _tuple[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + $pkg.Listen = Listen; Lstat = function(path, stat) { var _array, _p0, _struct, _tuple, _tuple$1, _view, e1, err, path, stat; err = $ifaceNil; @@ -7141,6 +9896,27 @@ $packages["syscall"] = (function() { return err; }; $pkg.Lstat = Lstat; + Open = function(path, mode, perm) { + var _p0, _tuple, _tuple$1, e1, err, fd, mode, path, perm, r0; + fd = 0; + err = $ifaceNil; + _p0 = ptrType$2.nil; + _tuple = BytePtrFromString(path); + _p0 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [fd, err]; + } + _tuple$1 = Syscall(5, ((_p0)), ((mode >>> 0)), ((perm >>> 0))); + r0 = _tuple$1[0]; + e1 = _tuple$1[2]; + fd = ((r0 >> 0)); + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return [fd, err]; + }; + $pkg.Open = Open; Pread = function(fd, p, offset) { var _p0, _tuple, e1, err, fd, n, offset, p, r0; n = 0; @@ -7200,6 +9976,24 @@ $packages["syscall"] = (function() { } return [n, err]; }; + Rmdir = function(path) { + var _p0, _tuple, _tuple$1, e1, err, path; + err = $ifaceNil; + _p0 = ptrType$2.nil; + _tuple = BytePtrFromString(path); + _p0 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _tuple$1 = Syscall(137, ((_p0)), 0, 0); + e1 = _tuple$1[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + $pkg.Rmdir = Rmdir; Seek = function(fd, offset, whence) { var _tuple, e1, err, fd, newoffset, offset, r0, whence; newoffset = new $Int64(0, 0); @@ -7214,6 +10008,44 @@ $packages["syscall"] = (function() { return [newoffset, err]; }; $pkg.Seek = Seek; + Stat = function(path, stat) { + var _array, _p0, _struct, _tuple, _tuple$1, _view, e1, err, path, stat; + err = $ifaceNil; + _p0 = ptrType$2.nil; + _tuple = BytePtrFromString(path); + _p0 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _array = new Uint8Array(144); + _tuple$1 = Syscall(338, ((_p0)), ((_array)), 0); + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + e1 = _tuple$1[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + $pkg.Stat = Stat; + Unlink = function(path) { + var _p0, _tuple, _tuple$1, e1, err, path; + err = $ifaceNil; + _p0 = ptrType$2.nil; + _tuple = BytePtrFromString(path); + _p0 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _tuple$1 = Syscall(10, ((_p0)), 0, 0); + e1 = _tuple$1[2]; + if (!((e1 === 0))) { + err = errnoErr(e1); + } + return err; + }; + $pkg.Unlink = Unlink; write = function(fd, p) { var _p0, _tuple, e1, err, fd, n, p, r0; n = 0; @@ -7265,6 +10097,7 @@ $packages["syscall"] = (function() { ptrType$31.methods = [{prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64, $Int64], false)}, {prop: "Nano", name: "Nano", pkg: "", typ: $funcType([], [$Int64], false)}]; ptrType$18.methods = [{prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}]; ptrType$32.methods = [{prop: "SetControllen", name: "SetControllen", pkg: "", typ: $funcType([$Int], [], false)}]; + RawConn.init([{prop: "Control", name: "Control", pkg: "", typ: $funcType([funcType], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$1], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$1], [$error], false)}]); SockaddrDatalink.init("syscall", [{prop: "Len", name: "Len", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Family", name: "Family", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Nlen", name: "Nlen", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Alen", name: "Alen", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Slen", name: "Slen", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: arrayType$3, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: RawSockaddrDatalink, tag: ""}]); mmapper.init("syscall", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: sync.Mutex, tag: ""}, {prop: "active", name: "active", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "mmap", name: "mmap", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "munmap", name: "munmap", embedded: false, exported: false, typ: funcType$3, tag: ""}]); Sockaddr.init([{prop: "sockaddr", name: "sockaddr", pkg: "syscall", typ: $funcType([], [$UnsafePointer, _Socklen, $error], false)}]); @@ -7294,8 +10127,12 @@ $packages["syscall"] = (function() { $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } lineBuffer = sliceType.nil; syscallModule = null; + envOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + envLock = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); + env = false; $pkg.ForkLock = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); freebsdConfArch = ""; + $pkg.SocketDisableIPv6 = false; ioSync = new $Int64(0, 0); warningPrinted = false; alreadyTriedToLoad = false; @@ -7317,7 +10154,7 @@ $packages["syscall"] = (function() { return $pkg; })(); $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { - var $pkg = {}, $init, Map, Mutex, Once, funcType, ptrType, mapType, ptrType$1, funcType$1, ptrType$4; + var $pkg = {}, $init, Map, Mutex, WaitGroup, Once, Pool, funcType, ptrType, mapType, ptrType$1, ptrType$3, funcType$1, ptrType$4, sliceType, ptrType$5, funcType$2; Map = $pkg.Map = $newType(0, $kindStruct, "nosync.Map", true, "github.com/gopherjs/gopherjs/nosync", true, function(m_) { this.$val = this; if (arguments.length === 0) { @@ -7334,6 +10171,14 @@ $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { } this.locked = locked_; }); + WaitGroup = $pkg.WaitGroup = $newType(0, $kindStruct, "nosync.WaitGroup", true, "github.com/gopherjs/gopherjs/nosync", true, function(counter_) { + this.$val = this; + if (arguments.length === 0) { + this.counter = 0; + return; + } + this.counter = counter_; + }); Once = $pkg.Once = $newType(0, $kindStruct, "nosync.Once", true, "github.com/gopherjs/gopherjs/nosync", true, function(doing_, done_) { this.$val = this; if (arguments.length === 0) { @@ -7344,12 +10189,26 @@ $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { this.doing = doing_; this.done = done_; }); + Pool = $pkg.Pool = $newType(0, $kindStruct, "nosync.Pool", true, "github.com/gopherjs/gopherjs/nosync", true, function(store_, New_) { + this.$val = this; + if (arguments.length === 0) { + this.store = sliceType.nil; + this.New = $throwNilPointerError; + return; + } + this.store = store_; + this.New = New_; + }); funcType = $funcType([$emptyInterface, $emptyInterface], [$Bool], false); ptrType = $ptrType(Map); mapType = $mapType($emptyInterface, $emptyInterface); ptrType$1 = $ptrType(Mutex); + ptrType$3 = $ptrType(WaitGroup); funcType$1 = $funcType([], [], false); ptrType$4 = $ptrType(Once); + sliceType = $sliceType($emptyInterface); + ptrType$5 = $ptrType(Pool); + funcType$2 = $funcType([], [$emptyInterface], false); Map.ptr.prototype.Load = function(key) { var _entry, _tmp, _tmp$1, _tuple, key, m, ok, value; value = $ifaceNil; @@ -7455,6 +10314,29 @@ $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { m.locked = false; }; Mutex.prototype.Unlock = function() { return this.$val.Unlock(); }; + WaitGroup.ptr.prototype.Add = function(delta) { + var delta, wg; + wg = this; + wg.counter = wg.counter + (delta) >> 0; + if (wg.counter < 0) { + $panic(new $String("sync: negative WaitGroup counter")); + } + }; + WaitGroup.prototype.Add = function(delta) { return this.$val.Add(delta); }; + WaitGroup.ptr.prototype.Done = function() { + var wg; + wg = this; + wg.Add(-1); + }; + WaitGroup.prototype.Done = function() { return this.$val.Done(); }; + WaitGroup.ptr.prototype.Wait = function() { + var wg; + wg = this; + if (!((wg.counter === 0))) { + $panic(new $String("sync: WaitGroup counter not zero")); + } + }; + WaitGroup.prototype.Wait = function() { return this.$val.Wait(); }; Once.ptr.prototype.Do = function(f) { var f, o, $s, $deferred, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; o = $f.o; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); @@ -7476,12 +10358,46 @@ $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Once.ptr.prototype.Do }; } $f.f = f; $f.o = o; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } }; Once.prototype.Do = function(f) { return this.$val.Do(f); }; + Pool.ptr.prototype.Get = function() { + var _r, p, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + /* */ if (p.store.$length === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (p.store.$length === 0) { */ case 1: + /* */ if (!(p.New === $throwNilPointerError)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(p.New === $throwNilPointerError)) { */ case 3: + _r = p.New(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 4: + $s = -1; return $ifaceNil; + /* } */ case 2: + x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); + $s = -1; return x$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: Pool.ptr.prototype.Get }; } $f._r = _r; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Pool.prototype.Get = function() { return this.$val.Get(); }; + Pool.ptr.prototype.Put = function(x) { + var p, x; + p = this; + if ($interfaceIsEqual(x, $ifaceNil)) { + return; + } + p.store = $append(p.store, x); + }; + Pool.prototype.Put = function(x) { return this.$val.Put(x); }; ptrType.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [], false)}, {prop: "LoadOrStore", name: "LoadOrStore", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType], [], false)}]; ptrType$1.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$3.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; ptrType$4.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$1], [], false)}]; + ptrType$5.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}]; Map.init("github.com/gopherjs/gopherjs/nosync", [{prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}]); Mutex.init("github.com/gopherjs/gopherjs/nosync", [{prop: "locked", name: "locked", embedded: false, exported: false, typ: $Bool, tag: ""}]); + WaitGroup.init("github.com/gopherjs/gopherjs/nosync", [{prop: "counter", name: "counter", embedded: false, exported: false, typ: $Int, tag: ""}]); Once.init("github.com/gopherjs/gopherjs/nosync", [{prop: "doing", name: "doing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); + Pool.init("github.com/gopherjs/gopherjs/nosync", [{prop: "store", name: "store", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: funcType$2, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -7491,12 +10407,32 @@ $packages["github.com/gopherjs/gopherjs/nosync"] = (function() { return $pkg; })(); $packages["time"] = (function() { - var $pkg = {}, $init, errors, js, nosync, runtime, syscall, ParseError, Time, Month, Weekday, Duration, Location, zone, zoneTrans, sliceType, sliceType$1, ptrType, sliceType$2, arrayType, sliceType$3, arrayType$1, arrayType$2, ptrType$2, arrayType$3, ptrType$4, ptrType$7, zoneSources, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, months, days, daysBefore, utcLoc, utcLoc$24ptr, localLoc, localLoc$24ptr, localOnce, errLocation, badData, init, initLocal, runtimeNano, now, indexByte, startsWithLowerCase, nextStdChunk, match, lookup, appendInt, atoi, formatNano, quote, isDigit, getnum, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseSignedOffset, parseNanoseconds, leadingInt, absWeekday, absClock, fmtFrac, fmtInt, lessThanHalf, Since, absDate, daysIn, Now, unixTime, Unix, isLeap, norm, Date, div, FixedZone; + var $pkg = {}, $init, errors, js, nosync, runtime, syscall, runtimeTimer, ParseError, Timer, Ticker, Time, Month, Weekday, Duration, Location, zone, zoneTrans, sliceType, sliceType$1, ptrType, sliceType$2, structType, arrayType, sliceType$3, arrayType$1, arrayType$2, ptrType$2, chanType, funcType, arrayType$3, funcType$1, ptrType$3, ptrType$4, ptrType$5, chanType$1, ptrType$6, ptrType$7, zoneSources, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, months, days, daysBefore, utcLoc, utcLoc$24ptr, localLoc, localLoc$24ptr, localOnce, errLocation, badData, init, initLocal, runtimeNano, now, Sleep, startTimer, stopTimer, indexByte, startsWithLowerCase, nextStdChunk, match, lookup, appendInt, atoi, formatNano, quote, isDigit, getnum, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseSignedOffset, parseNanoseconds, leadingInt, when, NewTimer, sendTime, After, AfterFunc, goFunc, NewTicker, absWeekday, absClock, fmtFrac, fmtInt, lessThanHalf, Since, Until, absDate, daysIn, Now, unixTime, Unix, isLeap, norm, Date, div, FixedZone; errors = $packages["errors"]; js = $packages["github.com/gopherjs/gopherjs/js"]; nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; runtime = $packages["runtime"]; syscall = $packages["syscall"]; + runtimeTimer = $pkg.runtimeTimer = $newType(0, $kindStruct, "time.runtimeTimer", true, "time", false, function(i_, when_, period_, f_, arg_, timeout_, active_) { + this.$val = this; + if (arguments.length === 0) { + this.i = 0; + this.when = new $Int64(0, 0); + this.period = new $Int64(0, 0); + this.f = $throwNilPointerError; + this.arg = $ifaceNil; + this.timeout = null; + this.active = false; + return; + } + this.i = i_; + this.when = when_; + this.period = period_; + this.f = f_; + this.arg = arg_; + this.timeout = timeout_; + this.active = active_; + }); ParseError = $pkg.ParseError = $newType(0, $kindStruct, "time.ParseError", true, "time", true, function(Layout_, Value_, LayoutElem_, ValueElem_, Message_) { this.$val = this; if (arguments.length === 0) { @@ -7513,6 +10449,26 @@ $packages["time"] = (function() { this.ValueElem = ValueElem_; this.Message = Message_; }); + Timer = $pkg.Timer = $newType(0, $kindStruct, "time.Timer", true, "time", true, function(C_, r_) { + this.$val = this; + if (arguments.length === 0) { + this.C = $chanNil; + this.r = new runtimeTimer.ptr(0, new $Int64(0, 0), new $Int64(0, 0), $throwNilPointerError, $ifaceNil, null, false); + return; + } + this.C = C_; + this.r = r_; + }); + Ticker = $pkg.Ticker = $newType(0, $kindStruct, "time.Ticker", true, "time", true, function(C_, r_) { + this.$val = this; + if (arguments.length === 0) { + this.C = $chanNil; + this.r = new runtimeTimer.ptr(0, new $Int64(0, 0), new $Int64(0, 0), $throwNilPointerError, $ifaceNil, null, false); + return; + } + this.C = C_; + this.r = r_; + }); Time = $pkg.Time = $newType(0, $kindStruct, "time.Time", true, "time", true, function(wall_, ext_, loc_) { this.$val = this; if (arguments.length === 0) { @@ -7576,13 +10532,21 @@ $packages["time"] = (function() { sliceType$1 = $sliceType(zoneTrans); ptrType = $ptrType(zone); sliceType$2 = $sliceType($String); + structType = $structType("", []); arrayType = $arrayType($Uint8, 20); sliceType$3 = $sliceType($Uint8); arrayType$1 = $arrayType($Uint8, 9); arrayType$2 = $arrayType($Uint8, 64); ptrType$2 = $ptrType(Location); + chanType = $chanType(Time, false, false); + funcType = $funcType([], [], false); arrayType$3 = $arrayType($Uint8, 32); + funcType$1 = $funcType([$emptyInterface, $Uintptr], [], false); + ptrType$3 = $ptrType(js.Object); ptrType$4 = $ptrType(ParseError); + ptrType$5 = $ptrType(Timer); + chanType$1 = $chanType(Time, false, true); + ptrType$6 = $ptrType(Ticker); ptrType$7 = $ptrType(Time); init = function() { $unused(Unix(new $Int64(0, 0), new $Int64(0, 0))); @@ -7617,6 +10581,47 @@ $packages["time"] = (function() { mono = _tmp$2; return [sec, nsec, mono]; }; + Sleep = function(d) { + var _r, c, d, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; d = $f.d; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + c[0] = new $Chan(structType, 0); + $setTimeout((function(c) { return function() { + $close(c[0]); + }; })(c), (((x = $div64(d, new Duration(0, 1000000), false), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); + _r = $recv(c[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r[0]; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Sleep }; } $f._r = _r; $f.c = c; $f.d = d; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Sleep = Sleep; + startTimer = function(t) { + var diff, t, x, x$1; + t.active = true; + diff = $div64(((x = t.when, x$1 = runtimeNano(), new $Int64(x.$high - x$1.$high, x.$low - x$1.$low))), new $Int64(0, 1000000), false); + if ((diff.$high > 0 || (diff.$high === 0 && diff.$low > 2147483647))) { + return; + } + if ((diff.$high < 0 || (diff.$high === 0 && diff.$low < 0))) { + diff = new $Int64(0, 0); + } + t.timeout = $setTimeout((function() { + var x$2, x$3, x$4; + t.active = false; + if (!((x$2 = t.period, (x$2.$high === 0 && x$2.$low === 0)))) { + t.when = (x$3 = t.when, x$4 = t.period, new $Int64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); + startTimer(t); + } + $go(t.f, [t.arg, 0]); + }), $externalize(new $Int64(diff.$high + 0, diff.$low + 1), $Int64)); + }; + stopTimer = function(t) { + var t, wasActive; + $global.clearTimeout(t.timeout); + wasActive = t.active; + t.active = false; + return wasActive; + }; indexByte = function(s, c) { var c, s; return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; @@ -8933,6 +11938,89 @@ $packages["time"] = (function() { err = _tmp$8; return [x, rem, err]; }; + when = function(d) { + var d, t, x, x$1; + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return runtimeNano(); + } + t = (x = runtimeNano(), x$1 = (new $Int64(d.$high, d.$low)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + if ((t.$high < 0 || (t.$high === 0 && t.$low < 0))) { + t = new $Int64(2147483647, 4294967295); + } + return t; + }; + Timer.ptr.prototype.Stop = function() { + var t; + t = this; + if (t.r.f === $throwNilPointerError) { + $panic(new $String("time: Stop called on uninitialized Timer")); + } + return stopTimer(t.r); + }; + Timer.prototype.Stop = function() { return this.$val.Stop(); }; + NewTimer = function(d) { + var c, d, t; + c = new $Chan(Time, 1); + t = new Timer.ptr(c, new runtimeTimer.ptr(0, when(d), new $Int64(0, 0), sendTime, new chanType(c), null, false)); + startTimer(t.r); + return t; + }; + $pkg.NewTimer = NewTimer; + Timer.ptr.prototype.Reset = function(d) { + var active, d, t, w; + t = this; + if (t.r.f === $throwNilPointerError) { + $panic(new $String("time: Reset called on uninitialized Timer")); + } + w = when(d); + active = stopTimer(t.r); + t.r.when = w; + startTimer(t.r); + return active; + }; + Timer.prototype.Reset = function(d) { return this.$val.Reset(d); }; + sendTime = function(c, seq) { + var _selection, c, seq, $r; + /* */ var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; c = $f.c; seq = $f.seq; $r = $f.$r; } + _selection = $select([[$assertType(c, chanType), $clone(Now(), Time)], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + /* */ if ($f === undefined) { $f = { $blk: sendTime }; } $f._selection = _selection; $f.c = c; $f.seq = seq; $f.$r = $r; return $f; + }; + After = function(d) { + var d; + return NewTimer(d).C; + }; + $pkg.After = After; + AfterFunc = function(d, f) { + var d, f, t; + t = new Timer.ptr($chanNil, new runtimeTimer.ptr(0, when(d), new $Int64(0, 0), goFunc, new funcType(f), null, false)); + startTimer(t.r); + return t; + }; + $pkg.AfterFunc = AfterFunc; + goFunc = function(arg, seq) { + var arg, seq; + $go($assertType(arg, funcType), []); + }; + NewTicker = function(d) { + var c, d, t; + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + $panic(errors.New("non-positive interval for NewTicker")); + } + c = new $Chan(Time, 1); + t = new Ticker.ptr(c, new runtimeTimer.ptr(0, when(d), (new $Int64(d.$high, d.$low)), sendTime, new chanType(c), null, false)); + startTimer(t.r); + return t; + }; + $pkg.NewTicker = NewTicker; + Ticker.ptr.prototype.Stop = function() { + var t; + t = this; + stopTimer(t.r); + }; + Ticker.prototype.Stop = function() { return this.$val.Stop(); }; Time.ptr.prototype.nsec = function() { var t, x; t = this; @@ -9519,6 +12607,11 @@ $packages["time"] = (function() { return $clone(Now(), Time).Sub($clone(t, Time)); }; $pkg.Since = Since; + Until = function(t) { + var t; + return $clone(t, Time).Sub($clone(Now(), Time)); + }; + $pkg.Until = Until; Time.ptr.prototype.AddDate = function(years, months$1, days$1) { var _r, _r$1, _r$2, _tuple, _tuple$1, day, days$1, hour, min, month, months$1, sec, t, year, years, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; day = $f.day; days$1 = $f.days$1; hour = $f.hour; min = $f.min; month = $f.month; months$1 = $f.months$1; sec = $f.sec; t = $f.t; year = $f.year; years = $f.years; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -10246,13 +13339,18 @@ $packages["time"] = (function() { }; Location.prototype.lookupName = function(name, unix) { return this.$val.lookupName(name, unix); }; ptrType$4.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$5.methods = [{prop: "Stop", name: "Stop", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([Duration], [$Bool], false)}]; + ptrType$6.methods = [{prop: "Stop", name: "Stop", pkg: "", typ: $funcType([], [], false)}]; Time.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "AppendFormat", name: "AppendFormat", pkg: "", typ: $funcType([sliceType$3, $String], [sliceType$3], false)}, {prop: "After", name: "After", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Before", name: "Before", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "abs", name: "abs", pkg: "time", typ: $funcType([], [$Uint64], false)}, {prop: "locabs", name: "locabs", pkg: "time", typ: $funcType([], [$String, $Int, $Uint64], false)}, {prop: "Date", name: "Date", pkg: "", typ: $funcType([], [$Int, Month, $Int], false)}, {prop: "Year", name: "Year", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Month", name: "Month", pkg: "", typ: $funcType([], [Month], false)}, {prop: "Day", name: "Day", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weekday", name: "Weekday", pkg: "", typ: $funcType([], [Weekday], false)}, {prop: "ISOWeek", name: "ISOWeek", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "Clock", name: "Clock", pkg: "", typ: $funcType([], [$Int, $Int, $Int], false)}, {prop: "Hour", name: "Hour", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Minute", name: "Minute", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Second", name: "Second", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Nanosecond", name: "Nanosecond", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "YearDay", name: "YearDay", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Time], [Duration], false)}, {prop: "AddDate", name: "AddDate", pkg: "", typ: $funcType([$Int, $Int, $Int], [Time], false)}, {prop: "date", name: "date", pkg: "time", typ: $funcType([$Bool], [$Int, Month, $Int, $Int], false)}, {prop: "UTC", name: "UTC", pkg: "", typ: $funcType([], [Time], false)}, {prop: "Local", name: "Local", pkg: "", typ: $funcType([], [Time], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([ptrType$2], [Time], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String, $Int], false)}, {prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixNano", name: "UnixNano", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Time], false)}]; ptrType$7.methods = [{prop: "nsec", name: "nsec", pkg: "time", typ: $funcType([], [$Int32], false)}, {prop: "sec", name: "sec", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "unixSec", name: "unixSec", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "addSec", name: "addSec", pkg: "time", typ: $funcType([$Int64], [], false)}, {prop: "setLoc", name: "setLoc", pkg: "time", typ: $funcType([ptrType$2], [], false)}, {prop: "stripMono", name: "stripMono", pkg: "time", typ: $funcType([], [], false)}, {prop: "setMono", name: "setMono", pkg: "time", typ: $funcType([$Int64], [], false)}, {prop: "mono", name: "mono", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; Month.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; Weekday.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; Duration.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Nanoseconds", name: "Nanoseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seconds", name: "Seconds", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Minutes", name: "Minutes", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Hours", name: "Hours", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Duration], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Duration], false)}]; ptrType$2.methods = [{prop: "get", name: "get", pkg: "time", typ: $funcType([], [ptrType$2], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "lookup", name: "lookup", pkg: "time", typ: $funcType([$Int64], [$String, $Int, $Int64, $Int64], false)}, {prop: "lookupFirstZone", name: "lookupFirstZone", pkg: "time", typ: $funcType([], [$Int], false)}, {prop: "firstZoneUsed", name: "firstZoneUsed", pkg: "time", typ: $funcType([], [$Bool], false)}, {prop: "lookupName", name: "lookupName", pkg: "time", typ: $funcType([$String, $Int64], [$Int, $Bool], false)}]; + runtimeTimer.init("time", [{prop: "i", name: "i", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "when", name: "when", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "period", name: "period", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "f", name: "f", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "arg", name: "arg", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "active", name: "active", embedded: false, exported: false, typ: $Bool, tag: ""}]); ParseError.init("", [{prop: "Layout", name: "Layout", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "LayoutElem", name: "LayoutElem", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ValueElem", name: "ValueElem", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: $String, tag: ""}]); + Timer.init("time", [{prop: "C", name: "C", embedded: false, exported: true, typ: chanType$1, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: runtimeTimer, tag: ""}]); + Ticker.init("time", [{prop: "C", name: "C", embedded: false, exported: true, typ: chanType$1, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: runtimeTimer, tag: ""}]); Time.init("time", [{prop: "wall", name: "wall", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "ext", name: "ext", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "loc", name: "loc", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); Location.init("time", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "zone", name: "zone", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "tx", name: "tx", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "cacheStart", name: "cacheStart", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "cacheEnd", name: "cacheEnd", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "cacheZone", name: "cacheZone", embedded: false, exported: false, typ: ptrType, tag: ""}]); zone.init("time", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isDST", name: "isDST", embedded: false, exported: false, typ: $Bool, tag: ""}]); @@ -11680,7 +14778,7 @@ $packages["internal/syscall/unix"] = (function() { return $pkg; })(); $packages["internal/testlog"] = (function() { - var $pkg = {}, $init, atomic, Interface, ptrType, logger, Logger, Stat; + var $pkg = {}, $init, atomic, Interface, ptrType, logger, Logger, Getenv, Open, Stat; atomic = $packages["sync/atomic"]; Interface = $pkg.Interface = $newType(8, $kindInterface, "testlog.Interface", true, "internal/testlog", true, null); ptrType = $ptrType(Interface); @@ -11693,6 +14791,32 @@ $packages["internal/testlog"] = (function() { return $assertType(impl, ptrType).$get(); }; $pkg.Logger = Logger; + Getenv = function(name) { + var log, name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; log = $f.log; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + log = Logger(); + /* */ if (!($interfaceIsEqual(log, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(log, $ifaceNil))) { */ case 1: + $r = log.Getenv(name); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Getenv }; } $f.log = log; $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Getenv = Getenv; + Open = function(name) { + var log, name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; log = $f.log; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + log = Logger(); + /* */ if (!($interfaceIsEqual(log, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(log, $ifaceNil))) { */ case 1: + $r = log.Open(name); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Open }; } $f.log = log; $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Open = Open; Stat = function(name) { var log, name, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; log = $f.log; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -11718,7 +14842,7 @@ $packages["internal/testlog"] = (function() { return $pkg; })(); $packages["os"] = (function() { - var $pkg = {}, $init, errors, js, poll, unix, testlog, io, runtime, sync, atomic, syscall, time, timeout, PathError, SyscallError, LinkError, file, dirInfo, File, FileInfo, FileMode, fileStat, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, arrayType, sliceType$5, ptrType$12, arrayType$2, ptrType$13, funcType$1, ptrType$15, arrayType$5, ptrType$16, errFinished, lstat, useSyscallwd, runtime_args, init, runtime_beforeExit, NewSyscallError, IsNotExist, underlyingError, wrapSyscallError, isNotExist, sigpipe, syscallMode, NewFile, newFile, epipecheck, init$1, useSyscallwdDarwin, basename, init$2, Exit, Lstat, fillFileStatFromSys, timespecToTime, lstatNolog; + var $pkg = {}, $init, errors, js, poll, unix, testlog, io, runtime, sync, atomic, syscall, time, timeout, PathError, SyscallError, LinkError, file, dirInfo, File, FileInfo, FileMode, fileStat, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, arrayType, sliceType$5, ptrType$12, arrayType$2, ptrType$13, funcType$1, ptrType$15, arrayType$5, ptrType$16, errFinished, lstat, useSyscallwd, runtime_args, init, runtime_beforeExit, Getenv, NewSyscallError, IsExist, IsNotExist, IsPermission, underlyingError, wrapSyscallError, isExist, isNotExist, isPermission, Getpid, setStickyBit, Open, OpenFile, TempDir, Chmod, sigpipe, syscallMode, chmod, fixLongPath, NewFile, newFile, epipecheck, openFileNolog, Remove, tempDir, init$1, useSyscallwdDarwin, IsPathSeparator, basename, init$2, Exit, Stat, Lstat, fillFileStatFromSys, timespecToTime, statNolog, lstatNolog, Hostname, hostname; errors = $packages["errors"]; js = $packages["github.com/gopherjs/gopherjs/js"]; poll = $packages["internal/poll"]; @@ -12008,6 +15132,17 @@ $packages["os"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: File.ptr.prototype.readdirnames }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.d = d; $f.err = err; $f.errno = errno; $f.f = f; $f.n = n; $f.names = names; $f.nb = nb; $f.nc = nc; $f.size = size; $f.$s = $s; $f.$r = $r; return $f; }; File.prototype.readdirnames = function(n) { return this.$val.readdirnames(n); }; + Getenv = function(key) { + var _r, _tuple, key, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; key = $f.key; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = testlog.Getenv(key); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = syscall.Getenv(key); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + v = _tuple[0]; + $s = -1; return v; + /* */ } return; } if ($f === undefined) { $f = { $blk: Getenv }; } $f._r = _r; $f._tuple = _tuple; $f.key = key; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Getenv = Getenv; PathError.ptr.prototype.Error = function() { var _r, e, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12062,11 +15197,21 @@ $packages["os"] = (function() { return new SyscallError.ptr(syscall$1, err); }; $pkg.NewSyscallError = NewSyscallError; + IsExist = function(err) { + var err; + return isExist(err); + }; + $pkg.IsExist = IsExist; IsNotExist = function(err) { var err; return isNotExist(err); }; $pkg.IsNotExist = IsNotExist; + IsPermission = function(err) { + var err; + return isPermission(err); + }; + $pkg.IsPermission = IsPermission; underlyingError = function(err) { var _ref, err, err$1, err$2, err$3; _ref = err; @@ -12091,11 +15236,25 @@ $packages["os"] = (function() { } return err; }; + isExist = function(err) { + var err; + err = underlyingError(err); + return $interfaceIsEqual(err, new syscall.Errno(17)) || $interfaceIsEqual(err, new syscall.Errno(66)) || $interfaceIsEqual(err, $pkg.ErrExist); + }; isNotExist = function(err) { var err; err = underlyingError(err); return $interfaceIsEqual(err, new syscall.Errno(2)) || $interfaceIsEqual(err, $pkg.ErrNotExist); }; + isPermission = function(err) { + var err; + err = underlyingError(err); + return $interfaceIsEqual(err, new syscall.Errno(13)) || $interfaceIsEqual(err, new syscall.Errno(1)) || $interfaceIsEqual(err, $pkg.ErrPermission); + }; + Getpid = function() { + return syscall.Getpid(); + }; + $pkg.Getpid = Getpid; File.ptr.prototype.Name = function() { var f; f = this; @@ -12301,6 +15460,40 @@ $packages["os"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: File.ptr.prototype.WriteString }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.n = n; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; }; File.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + setStickyBit = function(name) { + var _arg, _arg$1, _r, _r$1, _r$2, _tuple, err, fi, name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; err = $f.err; fi = $f.fi; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + fi = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _arg = name; + _r$1 = fi.Mode(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = (_r$1 | 1048576) >>> 0; + _r$2 = Chmod(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: setStickyBit }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.err = err; $f.fi = fi; $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + Open = function(name) { + var _r, name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = OpenFile(name, 0, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Open }; } $f._r = _r; $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Open = Open; + OpenFile = function(name, flag, perm) { + var _r, flag, name, perm, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; flag = $f.flag; name = $f.name; perm = $f.perm; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = testlog.Open(name); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = openFileNolog(name, flag, perm); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: OpenFile }; } $f._r = _r; $f.flag = flag; $f.name = name; $f.perm = perm; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.OpenFile = OpenFile; File.ptr.prototype.wrapErr = function(op, err) { var err, f, op; f = this; @@ -12313,6 +15506,19 @@ $packages["os"] = (function() { return new PathError.ptr(op, f.file.name, err); }; File.prototype.wrapErr = function(op, err) { return this.$val.wrapErr(op, err); }; + TempDir = function() { + var _r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = tempDir(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TempDir }; } $f._r = _r; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TempDir = TempDir; + Chmod = function(name, mode) { + var mode, name; + return chmod(name, mode); + }; + $pkg.Chmod = Chmod; File.ptr.prototype.Chmod = function(mode) { var _r, f, mode, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; mode = $f.mode; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12358,6 +15564,14 @@ $packages["os"] = (function() { } return o; }; + chmod = function(name, mode) { + var e, mode, name; + e = syscall.Chmod(fixLongPath(name), syscallMode(mode)); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chmod", name, e); + } + return $ifaceNil; + }; File.ptr.prototype.chmod = function(mode) { var _r, e, err, f, mode, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; err = $f.err; f = $f.f; mode = $f.mode; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12482,6 +15696,10 @@ $packages["os"] = (function() { return $ifaceNil; }; File.prototype.checkValid = function(op) { return this.$val.checkValid(op); }; + fixLongPath = function(path) { + var path; + return path; + }; File.ptr.prototype.Fd = function() { var _r, f, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12546,6 +15764,46 @@ $packages["os"] = (function() { sigpipe(); } }; + openFileNolog = function(name, flag, perm) { + var _r, _r$1, _tuple, _tuple$1, e, err, flag, name, perm, r, setSticky, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; err = $f.err; flag = $f.flag; name = $f.name; perm = $f.perm; r = $f.r; setSticky = $f.setSticky; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + setSticky = false; + /* */ if (true && !(((flag & 512) === 0)) && !((((perm & 1048576) >>> 0) === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (true && !(((flag & 512) === 0)) && !((((perm & 1048576) >>> 0) === 0))) { */ case 1: + _r = Stat(name); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (IsNotExist(err)) { + setSticky = true; + } + /* } */ case 2: + r = 0; + /* while (true) { */ case 4: + e = $ifaceNil; + _tuple$1 = syscall.Open(name, flag | 16777216, syscallMode(perm)); + r = _tuple$1[0]; + e = _tuple$1[1]; + if ($interfaceIsEqual(e, $ifaceNil)) { + /* break; */ $s = 5; continue; + } + if (true && $interfaceIsEqual(e, new syscall.Errno(4))) { + /* continue; */ $s = 4; continue; + } + $s = -1; return [ptrType.nil, new PathError.ptr("open", name, e)]; + /* } */ $s = 4; continue; case 5: + /* */ if (setSticky) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (setSticky) { */ case 6: + _r$1 = setStickyBit(name); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 7: + if (false) { + syscall.CloseOnExec(r); + } + $s = -1; return [newFile(((r >>> 0)), name, 1), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: openFileNolog }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.err = err; $f.flag = flag; $f.name = name; $f.perm = perm; $f.r = r; $f.setSticky = setSticky; $f.$s = $s; $f.$r = $r; return $f; + }; File.ptr.prototype.Close = function() { var _r, f, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12674,6 +15932,37 @@ $packages["os"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: File.ptr.prototype.seek }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.offset = offset; $f.ret = ret; $f.whence = whence; $f.$s = $s; $f.$r = $r; return $f; }; File.prototype.seek = function(offset, whence) { return this.$val.seek(offset, whence); }; + Remove = function(name) { + var e, e1, name; + e = syscall.Unlink(name); + if ($interfaceIsEqual(e, $ifaceNil)) { + return $ifaceNil; + } + e1 = syscall.Rmdir(name); + if ($interfaceIsEqual(e1, $ifaceNil)) { + return $ifaceNil; + } + if (!($interfaceIsEqual(e1, new syscall.Errno(20)))) { + e = e1; + } + return new PathError.ptr("remove", name, e); + }; + $pkg.Remove = Remove; + tempDir = function() { + var _r, dir, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; dir = $f.dir; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = Getenv("TMPDIR"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + dir = _r; + if (dir === "") { + if (false) { + dir = "/data/local/tmp"; + } else { + dir = "/tmp"; + } + } + $s = -1; return dir; + /* */ } return; } if ($f === undefined) { $f = { $blk: tempDir }; } $f._r = _r; $f.dir = dir; $f.$s = $s; $f.$r = $r; return $f; + }; init$1 = function() { useSyscallwd = useSyscallwdDarwin; }; @@ -12681,6 +15970,11 @@ $packages["os"] = (function() { var err; return !($interfaceIsEqual(err, new syscall.Errno(45))); }; + IsPathSeparator = function(c) { + var c; + return 47 === c; + }; + $pkg.IsPathSeparator = IsPathSeparator; basename = function(name) { var i, name; i = name.length - 1 >> 0; @@ -12714,6 +16008,14 @@ $packages["os"] = (function() { syscall.Exit(code); }; $pkg.Exit = Exit; + Stat = function(name) { + var name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = testlog.Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return statNolog(name); + /* */ } return; } if ($f === undefined) { $f = { $blk: Stat }; } $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Stat = Stat; Lstat = function(name) { var name, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -12776,6 +16078,16 @@ $packages["os"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: File.ptr.prototype.Stat }; } $f._r = _r; $f.err = err; $f.f = f; $f.fs = fs; $f.$s = $s; $f.$r = $r; return $f; }; File.prototype.Stat = function() { return this.$val.Stat(); }; + statNolog = function(name) { + var err, fs, name; + fs = new fileStat.ptr("", new $Int64(0, 0), 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$15.nil), new syscall.Stat_t.ptr(0, 0, 0, new $Uint64(0, 0), 0, 0, 0, arrayType.zero(), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new $Int64(0, 0), new $Int64(0, 0), 0, 0, 0, 0, arrayType$2.zero())); + err = syscall.Stat(name, fs.sys); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [$ifaceNil, new PathError.ptr("stat", name, err)]; + } + fillFileStatFromSys(fs, name); + return [fs, $ifaceNil]; + }; lstatNolog = function(name) { var err, fs, name; fs = new fileStat.ptr("", new $Int64(0, 0), 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$15.nil), new syscall.Stat_t.ptr(0, 0, 0, new $Uint64(0, 0), 0, 0, 0, arrayType.zero(), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new syscall.Timespec.ptr(new $Int64(0, 0), new $Int64(0, 0)), new $Int64(0, 0), new $Int64(0, 0), 0, 0, 0, 0, arrayType$2.zero())); @@ -12786,6 +16098,36 @@ $packages["os"] = (function() { fillFileStatFromSys(fs, name); return [fs, $ifaceNil]; }; + Hostname = function() { + var _tuple, err, name; + name = ""; + err = $ifaceNil; + _tuple = hostname(); + name = _tuple[0]; + err = _tuple[1]; + return [name, err]; + }; + $pkg.Hostname = Hostname; + hostname = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, name; + name = ""; + err = $ifaceNil; + _tuple = syscall.Sysctl("kern.hostname"); + name = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; + _tmp$1 = NewSyscallError("sysctl kern.hostname", err); + name = _tmp; + err = _tmp$1; + return [name, err]; + } + _tmp$2 = name; + _tmp$3 = $ifaceNil; + name = _tmp$2; + err = _tmp$3; + return [name, err]; + }; FileMode.prototype.String = function() { var _i, _i$1, _ref, _ref$1, _rune, _rune$1, buf, c, c$1, i, i$1, m, w, y, y$1; m = this.$val; @@ -12934,7 +16276,12 @@ $packages["os"] = (function() { return $pkg; })(); $packages["math/bits"] = (function() { - var $pkg = {}, $init, deBruijn32tab, deBruijn64tab, rev8tab, len8tab, LeadingZeros64, TrailingZeros, TrailingZeros32, TrailingZeros64, Reverse8, Reverse16, Len64; + var $pkg = {}, $init, deBruijn32tab, deBruijn64tab, rev8tab, len8tab, LeadingZeros, LeadingZeros64, TrailingZeros, TrailingZeros32, TrailingZeros64, Reverse8, Reverse16, Len, Len32, Len64; + LeadingZeros = function(x) { + var x; + return 32 - Len(x) >> 0; + }; + $pkg.LeadingZeros = LeadingZeros; LeadingZeros64 = function(x) { var x; return 64 - Len64(x) >> 0; @@ -12974,6 +16321,29 @@ $packages["math/bits"] = (function() { return ((((x$1 = x >>> 8 << 16 >>> 16, ((x$1 < 0 || x$1 >= rev8tab.length) ? ($throwRuntimeError("index out of range"), undefined) : rev8tab[x$1])) << 16 >>> 16)) | ((((x$2 = (x & 255) >>> 0, ((x$2 < 0 || x$2 >= rev8tab.length) ? ($throwRuntimeError("index out of range"), undefined) : rev8tab[x$2])) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; }; $pkg.Reverse16 = Reverse16; + Len = function(x) { + var x; + if (true) { + return Len32(((x >>> 0))); + } + return Len64((new $Uint64(0, x))); + }; + $pkg.Len = Len; + Len32 = function(x) { + var n, x, y, y$1; + n = 0; + if (x >= 65536) { + x = (y = (16), y < 32 ? (x >>> y) : 0) >>> 0; + n = 16; + } + if (x >= 256) { + x = (y$1 = (8), y$1 < 32 ? (x >>> y$1) : 0) >>> 0; + n = n + (8) >> 0; + } + n = n + ((((x < 0 || x >= len8tab.length) ? ($throwRuntimeError("index out of range"), undefined) : len8tab[x]) >> 0)) >> 0; + return n; + }; + $pkg.Len32 = Len32; Len64 = function(x) { var n, x; n = 0; @@ -13006,7 +16376,7 @@ $packages["math/bits"] = (function() { return $pkg; })(); $packages["strconv"] = (function() { - var $pkg = {}, $init, errors, math, bits, utf8, NumError, decimal, leftCheat, extFloat, floatInfo, decimalSlice, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, arrayType, sliceType$6, ptrType, arrayType$1, arrayType$2, ptrType$1, arrayType$3, arrayType$4, ptrType$2, ptrType$3, ptrType$4, optimize, powtab, float64pow10, float32pow10, leftcheats, smallPowersOfTen, powersOfTen, uint64pow10, float32info, float32info$24ptr, float64info, float64info$24ptr, isPrint16, isNotPrint16, isPrint32, isNotPrint32, isGraphic, equalIgnoreCase, special, readFloat, atof64exact, atof32exact, atof32, atof64, ParseFloat, syntaxError, rangeError, baseError, bitSizeError, ParseUint, ParseInt, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, frexp10Many, adjustLastDigitFixed, adjustLastDigit, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, min, max, FormatInt, Itoa, small, formatBits, isPowerOfTwo, quoteWith, appendQuotedWith, appendQuotedRuneWith, appendEscapedRune, Quote, AppendQuote, AppendQuoteToASCII, AppendQuoteRune, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, contains, bsearch16, bsearch32, IsPrint, isInGraphicList; + var $pkg = {}, $init, errors, math, bits, utf8, NumError, decimal, leftCheat, extFloat, floatInfo, decimalSlice, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, arrayType, sliceType$6, ptrType, arrayType$1, arrayType$2, ptrType$1, arrayType$3, arrayType$4, ptrType$2, ptrType$3, ptrType$4, optimize, powtab, float64pow10, float32pow10, leftcheats, smallPowersOfTen, powersOfTen, uint64pow10, float32info, float32info$24ptr, float64info, float64info$24ptr, isPrint16, isNotPrint16, isPrint32, isNotPrint32, isGraphic, equalIgnoreCase, special, readFloat, atof64exact, atof32exact, atof32, atof64, ParseFloat, syntaxError, rangeError, baseError, bitSizeError, ParseUint, ParseInt, Atoi, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, frexp10Many, adjustLastDigitFixed, adjustLastDigit, FormatFloat, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, min, max, FormatUint, FormatInt, Itoa, AppendInt, AppendUint, small, formatBits, isPowerOfTwo, quoteWith, appendQuotedWith, appendQuotedRuneWith, appendEscapedRune, Quote, AppendQuote, AppendQuoteToASCII, AppendQuoteRune, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, contains, bsearch16, bsearch32, IsPrint, isInGraphicList; errors = $packages["errors"]; math = $packages["math"]; bits = $packages["math/bits"]; @@ -13838,6 +17208,47 @@ $packages["strconv"] = (function() { return [i, err]; }; $pkg.ParseInt = ParseInt; + Atoi = function(s) { + var _i, _ref, _tuple, _tuple$1, ch, err, i64, n, nerr, ok, s, s0, sLen; + sLen = s.length; + if (true && (0 < sLen && sLen < 10) || false && (0 < sLen && sLen < 19)) { + s0 = s; + if ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43)) { + s = $substring(s, 1); + if (s.length < 1) { + return [0, new NumError.ptr("Atoi", s0, $pkg.ErrSyntax)]; + } + } + n = 0; + _ref = (new sliceType$6($stringToBytes(s))); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ch = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ch = ch - (48) << 24 >>> 24; + if (ch > 9) { + return [0, new NumError.ptr("Atoi", s0, $pkg.ErrSyntax)]; + } + n = ($imul(n, 10)) + ((ch >> 0)) >> 0; + _i++; + } + if (s0.charCodeAt(0) === 45) { + n = -n; + } + return [n, $ifaceNil]; + } + _tuple = ParseInt(s, 10, 0); + i64 = _tuple[0]; + err = _tuple[1]; + _tuple$1 = $assertType(err, ptrType, true); + nerr = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + nerr.Func = "Atoi"; + } + return [(((i64.$low + ((i64.$high >> 31) * 4294967296)) >> 0)), err]; + }; + $pkg.Atoi = Atoi; decimal.ptr.prototype.String = function() { var a, buf, n, w; a = this; @@ -14571,6 +17982,11 @@ $packages["strconv"] = (function() { } return true; }; + FormatFloat = function(f, fmt, prec, bitSize) { + var bitSize, f, fmt, prec; + return ($bytesToString(genericFtoa($makeSlice(sliceType$6, 0, max(prec + 4 >> 0, 24)), f, fmt, prec, bitSize))); + }; + $pkg.FormatFloat = FormatFloat; AppendFloat = function(dst, f, fmt, prec, bitSize) { var bitSize, dst, f, fmt, prec; return genericFtoa(dst, f, fmt, prec, bitSize); @@ -14884,6 +18300,16 @@ $packages["strconv"] = (function() { } return b; }; + FormatUint = function(i, base) { + var _tuple, base, i, s; + if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { + return small(((i.$low >> 0))); + } + _tuple = formatBits(sliceType$6.nil, i, base, false, false); + s = _tuple[1]; + return s; + }; + $pkg.FormatUint = FormatUint; FormatInt = function(i, base) { var _tuple, base, i, s; if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { @@ -14899,6 +18325,26 @@ $packages["strconv"] = (function() { return FormatInt((new $Int64(0, i)), 10); }; $pkg.Itoa = Itoa; + AppendInt = function(dst, i, base) { + var _tuple, base, dst, i; + if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { + return $appendSlice(dst, small((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0)))); + } + _tuple = formatBits(dst, (new $Uint64(i.$high, i.$low)), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), true); + dst = _tuple[0]; + return dst; + }; + $pkg.AppendInt = AppendInt; + AppendUint = function(dst, i, base) { + var _tuple, base, dst, i; + if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { + return $appendSlice(dst, small(((i.$low >> 0)))); + } + _tuple = formatBits(dst, i, base, false, true); + dst = _tuple[0]; + return dst; + }; + $pkg.AppendUint = AppendUint; small = function(i) { var i; if (i < 10) { @@ -19936,7 +23382,7 @@ $packages["reflect"] = (function() { return $pkg; })(); $packages["fmt"] = (function() { - var $pkg = {}, $init, errors, io, math, os, reflect, strconv, sync, utf8, fmtFlags, fmt, State, Formatter, Stringer, GoStringer, buffer, pp, scanError, ss, ssave, sliceType, ptrType, ptrType$1, arrayType, arrayType$1, sliceType$1, sliceType$2, arrayType$2, ptrType$2, ptrType$5, ptrType$25, funcType, ppFree, space, ssFree, complexError, boolError, newPrinter, Fprintf, Printf, Sprintf, Errorf, Sprint, Fprintln, Println, Sprintln, getField, tooLarge, parsenum, intFromArg, parseArgNumber, isSpace, notSpace, indexRune; + var $pkg = {}, $init, errors, io, math, os, reflect, strconv, sync, utf8, fmtFlags, fmt, State, Formatter, Stringer, GoStringer, buffer, pp, ScanState, scanError, ss, ssave, sliceType, ptrType, ptrType$1, arrayType, arrayType$1, sliceType$1, sliceType$2, arrayType$2, ptrType$2, ptrType$5, ptrType$25, funcType, ppFree, space, ssFree, complexError, boolError, newPrinter, Fprintf, Printf, Sprintf, Errorf, Fprint, Sprint, Fprintln, Println, Sprintln, getField, tooLarge, parsenum, intFromArg, parseArgNumber, isSpace, notSpace, indexRune; errors = $packages["errors"]; io = $packages["io"]; math = $packages["math"]; @@ -20012,6 +23458,7 @@ $packages["fmt"] = (function() { this.panicking = panicking_; this.erroring = erroring_; }); + ScanState = $pkg.ScanState = $newType(8, $kindInterface, "fmt.ScanState", true, "fmt", true, null); scanError = $pkg.scanError = $newType(0, $kindStruct, "fmt.scanError", true, "fmt", false, function(err_) { this.$val = this; if (arguments.length === 0) { @@ -20686,6 +24133,23 @@ $packages["fmt"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: Errorf }; } $f._r = _r; $f._r$1 = _r$1; $f.a = a; $f.format = format; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.Errorf = Errorf; + Fprint = function(w, a) { + var _r, _r$1, _tuple, a, err, n, p, w, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; a = $f.a; err = $f.err; n = $f.n; p = $f.p; w = $f.w; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + p = _r; + $r = p.doPrint(a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = w.Write((x = p.buf, $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length))); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + p.free(); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Fprint }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.a = a; $f.err = err; $f.n = n; $f.p = p; $f.w = w; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Fprint = Fprint; Sprint = function(a) { var _r, a, p, s, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; a = $f.a; p = $f.p; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -22397,6 +25861,7 @@ $packages["fmt"] = (function() { GoStringer.init([{prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]); buffer.init($Uint8); pp.init("fmt", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: buffer, tag: ""}, {prop: "arg", name: "arg", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "fmt", name: "fmt", embedded: false, exported: false, typ: fmt, tag: ""}, {prop: "reordered", name: "reordered", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goodArgNum", name: "goodArgNum", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "panicking", name: "panicking", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "erroring", name: "erroring", embedded: false, exported: false, typ: $Bool, tag: ""}]); + ScanState.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType$2, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}]); scanError.init("fmt", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); ss.init("fmt", [{prop: "rs", name: "rs", embedded: false, exported: false, typ: io.RuneScanner, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: buffer, tag: ""}, {prop: "count", name: "count", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "atEOF", name: "atEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ssave", name: "ssave", embedded: true, exported: false, typ: ssave, tag: ""}]); ssave.init("fmt", [{prop: "validSave", name: "validSave", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "nlIsEnd", name: "nlIsEnd", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "nlIsSpace", name: "nlIsSpace", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "argLimit", name: "argLimit", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "limit", name: "limit", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxWid", name: "maxWid", embedded: false, exported: false, typ: $Int, tag: ""}]); @@ -22426,8 +25891,9 @@ $packages["fmt"] = (function() { return $pkg; })(); $packages["sort"] = (function() { - var $pkg = {}, $init, reflect, lessSwap, funcType, funcType$1, Slice, insertionSort, siftDown, heapSort, medianOfThree, doPivot, quickSort, Sort, maxDepth, insertionSort_func, siftDown_func, heapSort_func, medianOfThree_func, doPivot_func, quickSort_func; + var $pkg = {}, $init, reflect, Interface, lessSwap, reverse, StringSlice, sliceType$2, funcType, funcType$1, Search, SearchStrings, Slice, insertionSort, siftDown, heapSort, medianOfThree, swapRange, doPivot, quickSort, Sort, maxDepth, Reverse, Strings, Stable, stable, symMerge, rotate, insertionSort_func, siftDown_func, heapSort_func, medianOfThree_func, doPivot_func, quickSort_func; reflect = $packages["reflect"]; + Interface = $pkg.Interface = $newType(8, $kindInterface, "sort.Interface", true, "sort", true, null); lessSwap = $pkg.lessSwap = $newType(0, $kindStruct, "sort.lessSwap", true, "sort", false, function(Less_, Swap_) { this.$val = this; if (arguments.length === 0) { @@ -22438,8 +25904,64 @@ $packages["sort"] = (function() { this.Less = Less_; this.Swap = Swap_; }); + reverse = $pkg.reverse = $newType(0, $kindStruct, "sort.reverse", true, "sort", false, function(Interface_) { + this.$val = this; + if (arguments.length === 0) { + this.Interface = $ifaceNil; + return; + } + this.Interface = Interface_; + }); + StringSlice = $pkg.StringSlice = $newType(12, $kindSlice, "sort.StringSlice", true, "sort", true, null); + sliceType$2 = $sliceType($String); funcType = $funcType([$Int, $Int], [$Bool], false); funcType$1 = $funcType([$Int, $Int], [], false); + Search = function(n, f) { + var _r, _tmp, _tmp$1, f, h, i, j, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; f = $f.f; h = $f.h; i = $f.i; j = $f.j; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tmp = 0; + _tmp$1 = n; + i = _tmp; + j = _tmp$1; + /* while (true) { */ case 1: + /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 2; continue; } + h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); + _r = f(h); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!_r) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!_r) { */ case 3: + i = h + 1 >> 0; + $s = 5; continue; + /* } else { */ case 4: + j = h; + /* } */ case 5: + /* } */ $s = 1; continue; case 2: + $s = -1; return i; + /* */ } return; } if ($f === undefined) { $f = { $blk: Search }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.f = f; $f.h = h; $f.i = i; $f.j = j; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Search = Search; + SearchStrings = function(a, x) { + var _r, a, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; a = $f.a; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = [a]; + x = [x]; + _r = Search(a[0].$length, (function(a, x) { return function(i) { + var i; + return ((i < 0 || i >= a[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : a[0].$array[a[0].$offset + i]) >= x[0]; + }; })(a, x)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: SearchStrings }; } $f._r = _r; $f.a = a; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.SearchStrings = SearchStrings; + StringSlice.prototype.Search = function(x) { + var _r, p, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r = SearchStrings($subslice(new sliceType$2(p.$array), p.$offset, p.$offset + p.$length), x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: StringSlice.prototype.Search }; } $f._r = _r; $f.p = p; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(StringSlice).prototype.Search = function(x) { return this.$get().Search(x); }; Slice = function(slice, less) { var _r, _r$1, length, less, rv, slice, swap, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; length = $f.length; less = $f.less; rv = $f.rv; slice = $f.slice; swap = $f.swap; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -22548,6 +26070,18 @@ $packages["sort"] = (function() { $s = -1; return; /* */ } return; } if ($f === undefined) { $f = { $blk: medianOfThree }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.data = data; $f.m0 = m0; $f.m1 = m1; $f.m2 = m2; $f.$s = $s; $f.$r = $r; return $f; }; + swapRange = function(data, a, b, n) { + var a, b, data, i, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; a = $f.a; b = $f.b; data = $f.data; i = $f.i; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = 0; + /* while (true) { */ case 1: + /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } + $r = data.Swap(a + i >> 0, b + i >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: swapRange }; } $f.a = a; $f.b = b; $f.data = data; $f.i = i; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; doPivot = function(data, lo, hi) { var _q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _v = $f._v; _v$1 = $f._v$1; _v$2 = $f._v$2; _v$3 = $f._v$3; _v$4 = $f._v$4; a = $f.a; b = $f.b; c = $f.c; data = $f.data; dups = $f.dups; hi = $f.hi; lo = $f.lo; m = $f.m; midhi = $f.midhi; midlo = $f.midlo; pivot = $f.pivot; protect = $f.protect; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -22729,6 +26263,230 @@ $packages["sort"] = (function() { } return $imul(depth, 2); }; + reverse.ptr.prototype.Less = function(i, j) { + var _r, i, j, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; j = $f.j; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.Interface.Less(j, i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: reverse.ptr.prototype.Less }; } $f._r = _r; $f.i = i; $f.j = j; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + reverse.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; + Reverse = function(data) { + var data; + return new reverse.ptr(data); + }; + $pkg.Reverse = Reverse; + StringSlice.prototype.Len = function() { + var p; + p = this; + return p.$length; + }; + $ptrType(StringSlice).prototype.Len = function() { return this.$get().Len(); }; + StringSlice.prototype.Less = function(i, j) { + var i, j, p; + p = this; + return ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]) < ((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]); + }; + $ptrType(StringSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + StringSlice.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, p; + p = this; + _tmp = ((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]); + _tmp$1 = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]); + ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i] = _tmp); + ((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j] = _tmp$1); + }; + $ptrType(StringSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + StringSlice.prototype.Sort = function() { + var p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + $r = Sort(p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: StringSlice.prototype.Sort }; } $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(StringSlice).prototype.Sort = function() { return this.$get().Sort(); }; + Strings = function(a) { + var a, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; a = $f.a; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = Sort(($subslice(new StringSlice(a.$array), a.$offset, a.$offset + a.$length))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Strings }; } $f.a = a; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Strings = Strings; + Stable = function(data) { + var _arg, _arg$1, _r, data, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r = $f._r; data = $f.data; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _arg = data; + _r = data.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _arg$1 = _r; + $r = stable(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Stable }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r = _r; $f.data = data; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Stable = Stable; + stable = function(data, n) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, blockSize, data, m, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; a = $f.a; b = $f.b; blockSize = $f.blockSize; data = $f.data; m = $f.m; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + blockSize = 20; + _tmp = 0; + _tmp$1 = blockSize; + a = _tmp; + b = _tmp$1; + /* while (true) { */ case 1: + /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 2; continue; } + $r = insertionSort(data, a, b); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + a = b; + b = b + (blockSize) >> 0; + /* } */ $s = 1; continue; case 2: + $r = insertionSort(data, a, n); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* while (true) { */ case 5: + /* if (!(blockSize < n)) { break; } */ if(!(blockSize < n)) { $s = 6; continue; } + _tmp$2 = 0; + _tmp$3 = $imul(2, blockSize); + a = _tmp$2; + b = _tmp$3; + /* while (true) { */ case 7: + /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 8; continue; } + $r = symMerge(data, a, a + blockSize >> 0, b); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + a = b; + b = b + (($imul(2, blockSize))) >> 0; + /* } */ $s = 7; continue; case 8: + m = a + blockSize >> 0; + /* */ if (m < n) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (m < n) { */ case 10: + $r = symMerge(data, a, m, n); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 11: + blockSize = $imul(blockSize, (2)); + /* } */ $s = 5; continue; case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: stable }; } $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.a = a; $f.b = b; $f.blockSize = blockSize; $f.data = data; $f.m = m; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + symMerge = function(data, a, m, b) { + var _r, _r$1, _r$2, _tmp, _tmp$1, a, b, c, data, end, h, h$1, i, i$1, j, j$1, k, k$1, m, mid, n, p, r, start, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; a = $f.a; b = $f.b; c = $f.c; data = $f.data; end = $f.end; h = $f.h; h$1 = $f.h$1; i = $f.i; i$1 = $f.i$1; j = $f.j; j$1 = $f.j$1; k = $f.k; k$1 = $f.k$1; m = $f.m; mid = $f.mid; n = $f.n; p = $f.p; r = $f.r; start = $f.start; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if ((m - a >> 0) === 1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((m - a >> 0) === 1) { */ case 1: + i = m; + j = b; + /* while (true) { */ case 3: + /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 4; continue; } + h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); + _r = data.Less(h, a); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_r) { */ case 5: + i = h + 1 >> 0; + $s = 7; continue; + /* } else { */ case 6: + j = h; + /* } */ case 7: + /* } */ $s = 3; continue; case 4: + k = a; + /* while (true) { */ case 9: + /* if (!(k < (i - 1 >> 0))) { break; } */ if(!(k < (i - 1 >> 0))) { $s = 10; continue; } + $r = data.Swap(k, k + 1 >> 0); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + k = k + (1) >> 0; + /* } */ $s = 9; continue; case 10: + $s = -1; return; + /* } */ case 2: + /* */ if ((b - m >> 0) === 1) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ((b - m >> 0) === 1) { */ case 12: + i$1 = a; + j$1 = m; + /* while (true) { */ case 14: + /* if (!(i$1 < j$1)) { break; } */ if(!(i$1 < j$1)) { $s = 15; continue; } + h$1 = ((((((i$1 + j$1 >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); + _r$1 = data.Less(m, h$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!_r$1) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!_r$1) { */ case 16: + i$1 = h$1 + 1 >> 0; + $s = 18; continue; + /* } else { */ case 17: + j$1 = h$1; + /* } */ case 18: + /* } */ $s = 14; continue; case 15: + k$1 = m; + /* while (true) { */ case 20: + /* if (!(k$1 > i$1)) { break; } */ if(!(k$1 > i$1)) { $s = 21; continue; } + $r = data.Swap(k$1, k$1 - 1 >> 0); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + k$1 = k$1 - (1) >> 0; + /* } */ $s = 20; continue; case 21: + $s = -1; return; + /* } */ case 13: + mid = ((((((a + b >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); + n = mid + m >> 0; + _tmp = 0; + _tmp$1 = 0; + start = _tmp; + r = _tmp$1; + if (m > mid) { + start = n - b >> 0; + r = mid; + } else { + start = a; + r = m; + } + p = n - 1 >> 0; + /* while (true) { */ case 23: + /* if (!(start < r)) { break; } */ if(!(start < r)) { $s = 24; continue; } + c = ((((((start + r >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); + _r$2 = data.Less(p - c >> 0, c); /* */ $s = 28; case 28: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!_r$2) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!_r$2) { */ case 25: + start = c + 1 >> 0; + $s = 27; continue; + /* } else { */ case 26: + r = c; + /* } */ case 27: + /* } */ $s = 23; continue; case 24: + end = n - start >> 0; + /* */ if (start < m && m < end) { $s = 29; continue; } + /* */ $s = 30; continue; + /* if (start < m && m < end) { */ case 29: + $r = rotate(data, start, m, end); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 30: + /* */ if (a < start && start < mid) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (a < start && start < mid) { */ case 32: + $r = symMerge(data, a, start, mid); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 33: + /* */ if (mid < end && end < b) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if (mid < end && end < b) { */ case 35: + $r = symMerge(data, mid, end, b); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 36: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: symMerge }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.a = a; $f.b = b; $f.c = c; $f.data = data; $f.end = end; $f.h = h; $f.h$1 = h$1; $f.i = i; $f.i$1 = i$1; $f.j = j; $f.j$1 = j$1; $f.k = k; $f.k$1 = k$1; $f.m = m; $f.mid = mid; $f.n = n; $f.p = p; $f.r = r; $f.start = start; $f.$s = $s; $f.$r = $r; return $f; + }; + rotate = function(data, a, m, b) { + var a, b, data, i, j, m, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; a = $f.a; b = $f.b; data = $f.data; i = $f.i; j = $f.j; m = $f.m; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = m - a >> 0; + j = b - m >> 0; + /* while (true) { */ case 1: + /* if (!(!((i === j)))) { break; } */ if(!(!((i === j)))) { $s = 2; continue; } + /* */ if (i > j) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (i > j) { */ case 3: + $r = swapRange(data, m - i >> 0, m, j); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i - (j) >> 0; + $s = 5; continue; + /* } else { */ case 4: + $r = swapRange(data, m - i >> 0, (m + j >> 0) - i >> 0, i); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + j = j - (i) >> 0; + /* } */ case 5: + /* } */ $s = 1; continue; case 2: + $r = swapRange(data, m - i >> 0, m, i); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: rotate }; } $f.a = a; $f.b = b; $f.data = data; $f.i = i; $f.j = j; $f.m = m; $f.$s = $s; $f.$r = $r; return $f; + }; insertionSort_func = function(data, a, b) { var _r, _v, a, b, data, i, j, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _v = $f._v; a = $f.a; b = $f.b; data = $f.data; i = $f.i; j = $f.j; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -22984,7 +26742,12 @@ $packages["sort"] = (function() { $s = -1; return; /* */ } return; } if ($f === undefined) { $f = { $blk: quickSort_func }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.a = a; $f.b = b; $f.data = data; $f.i = i; $f.maxDepth$1 = maxDepth$1; $f.mhi = mhi; $f.mlo = mlo; $f.$s = $s; $f.$r = $r; return $f; }; + reverse.methods = [{prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + StringSlice.methods = [{prop: "Search", name: "Search", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}]; + Interface.init([{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}]); lessSwap.init("", [{prop: "Less", name: "Less", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Swap", name: "Swap", embedded: false, exported: true, typ: funcType$1, tag: ""}]); + reverse.init("", [{prop: "Interface", name: "Interface", embedded: true, exported: true, typ: Interface, tag: ""}]); + StringSlice.init($String); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -24570,8 +28333,11 @@ $packages["encoding/binary"] = (function() { return $pkg; })(); $packages["hash"] = (function() { - var $pkg = {}, $init, io; + var $pkg = {}, $init, io, Hash, sliceType; io = $packages["io"]; + Hash = $pkg.Hash = $newType(8, $kindInterface, "hash.Hash", true, "hash", true, null); + sliceType = $sliceType($Uint8); + Hash.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -25154,7 +28920,7 @@ $packages["encoding"] = (function() { return $pkg; })(); $packages["encoding/base64"] = (function() { - var $pkg = {}, $init, binary, io, strconv, Encoding, CorruptInputError, arrayType, arrayType$1, sliceType, ptrType, arrayType$4, NewEncoding; + var $pkg = {}, $init, binary, io, strconv, Encoding, encoder, CorruptInputError, arrayType, arrayType$1, sliceType, ptrType, arrayType$2, arrayType$3, arrayType$4, ptrType$1, NewEncoding, NewEncoder; binary = $packages["encoding/binary"]; io = $packages["io"]; strconv = $packages["strconv"]; @@ -25172,12 +28938,33 @@ $packages["encoding/base64"] = (function() { this.padChar = padChar_; this.strict = strict_; }); + encoder = $pkg.encoder = $newType(0, $kindStruct, "base64.encoder", true, "encoding/base64", false, function(err_, enc_, w_, buf_, nbuf_, out_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + this.enc = ptrType.nil; + this.w = $ifaceNil; + this.buf = arrayType$2.zero(); + this.nbuf = 0; + this.out = arrayType$3.zero(); + return; + } + this.err = err_; + this.enc = enc_; + this.w = w_; + this.buf = buf_; + this.nbuf = nbuf_; + this.out = out_; + }); CorruptInputError = $pkg.CorruptInputError = $newType(8, $kindInt64, "base64.CorruptInputError", true, "encoding/base64", true, null); arrayType = $arrayType($Uint8, 64); arrayType$1 = $arrayType($Uint8, 256); sliceType = $sliceType($Uint8); ptrType = $ptrType(Encoding); + arrayType$2 = $arrayType($Uint8, 3); + arrayType$3 = $arrayType($Uint8, 1024); arrayType$4 = $arrayType($Uint8, 4); + ptrType$1 = $ptrType(encoder); NewEncoding = function(encoder$1) { var e, encoder$1, i, i$1, i$2, x, x$1, x$2; if (!((encoder$1.length === 64))) { @@ -25287,6 +29074,103 @@ $packages["encoding/base64"] = (function() { return ($bytesToString(buf)); }; Encoding.prototype.EncodeToString = function(src) { return this.$val.EncodeToString(src); }; + encoder.ptr.prototype.Write = function(p) { + var _q, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, err, i, i$1, n, nn, p, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; err = $f.err; i = $f.i; i$1 = $f.i$1; n = $f.n; nn = $f.nn; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + e = this; + if (!($interfaceIsEqual(e.err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = e.err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* */ if (e.nbuf > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (e.nbuf > 0) { */ case 1: + i = 0; + i = 0; + while (true) { + if (!(i < p.$length && e.nbuf < 3)) { break; } + (x = e.buf, x$1 = e.nbuf, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]))); + e.nbuf = e.nbuf + (1) >> 0; + i = i + (1) >> 0; + } + n = n + (i) >> 0; + p = $subslice(p, i); + if (e.nbuf < 3) { + $s = -1; return [n, err]; + } + e.enc.Encode(new sliceType(e.out), new sliceType(e.buf)); + _r = e.w.Write($subslice(new sliceType(e.out), 0, 4)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + e.err = _tuple[1]; + if (!($interfaceIsEqual(e.err, $ifaceNil))) { + _tmp$2 = n; + _tmp$3 = e.err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + e.nbuf = 0; + /* } */ case 2: + /* while (true) { */ case 4: + /* if (!(p.$length >= 3)) { break; } */ if(!(p.$length >= 3)) { $s = 5; continue; } + nn = 768; + if (nn > p.$length) { + nn = p.$length; + nn = nn - ((_r$1 = nn % 3, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))) >> 0; + } + e.enc.Encode(new sliceType(e.out), $subslice(p, 0, nn)); + _r$2 = e.w.Write($subslice(new sliceType(e.out), 0, ($imul((_q = nn / 3, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 4)))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + e.err = _tuple$1[1]; + if (!($interfaceIsEqual(e.err, $ifaceNil))) { + _tmp$4 = n; + _tmp$5 = e.err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + n = n + (nn) >> 0; + p = $subslice(p, nn); + /* } */ $s = 4; continue; case 5: + i$1 = 0; + while (true) { + if (!(i$1 < p.$length)) { break; } + (x$2 = e.buf, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1] = ((i$1 < 0 || i$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i$1]))); + i$1 = i$1 + (1) >> 0; + } + e.nbuf = p.$length; + n = n + (p.$length) >> 0; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: encoder.ptr.prototype.Write }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.err = err; $f.i = i; $f.i$1 = i$1; $f.n = n; $f.nn = nn; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + encoder.prototype.Write = function(p) { return this.$val.Write(p); }; + encoder.ptr.prototype.Close = function() { + var _r, _tuple, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + /* */ if ($interfaceIsEqual(e.err, $ifaceNil) && e.nbuf > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(e.err, $ifaceNil) && e.nbuf > 0) { */ case 1: + e.enc.Encode(new sliceType(e.out), $subslice(new sliceType(e.buf), 0, e.nbuf)); + _r = e.w.Write($subslice(new sliceType(e.out), 0, e.enc.EncodedLen(e.nbuf))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + e.err = _tuple[1]; + e.nbuf = 0; + /* } */ case 2: + $s = -1; return e.err; + /* */ } return; } if ($f === undefined) { $f = { $blk: encoder.ptr.prototype.Close }; } $f._r = _r; $f._tuple = _tuple; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + encoder.prototype.Close = function() { return this.$val.Close(); }; + NewEncoder = function(enc, w) { + var enc, w; + return new encoder.ptr($ifaceNil, enc, w, arrayType$2.zero(), 0, arrayType$3.zero()); + }; + $pkg.NewEncoder = NewEncoder; Encoding.ptr.prototype.EncodedLen = function(n) { var _q, _q$1, enc, n; enc = this; @@ -25670,8 +29554,10 @@ $packages["encoding/base64"] = (function() { Encoding.prototype.DecodedLen = function(n) { return this.$val.DecodedLen(n); }; Encoding.methods = [{prop: "WithPadding", name: "WithPadding", pkg: "", typ: $funcType([$Int32], [ptrType], false)}, {prop: "Strict", name: "Strict", pkg: "", typ: $funcType([], [ptrType], false)}]; ptrType.methods = [{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "EncodeToString", name: "EncodeToString", pkg: "", typ: $funcType([sliceType], [$String], false)}, {prop: "EncodedLen", name: "EncodedLen", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "decodeQuantum", name: "decodeQuantum", pkg: "encoding/base64", typ: $funcType([sliceType, sliceType, $Int], [$Int, $Int, $error], false)}, {prop: "DecodeString", name: "DecodeString", pkg: "", typ: $funcType([$String], [sliceType, $error], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType, sliceType], [$Int, $error], false)}, {prop: "decode32", name: "decode32", pkg: "encoding/base64", typ: $funcType([sliceType, sliceType], [$Bool], false)}, {prop: "decode64", name: "decode64", pkg: "encoding/base64", typ: $funcType([sliceType, sliceType], [$Bool], false)}, {prop: "DecodedLen", name: "DecodedLen", pkg: "", typ: $funcType([$Int], [$Int], false)}]; + ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; CorruptInputError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; Encoding.init("encoding/base64", [{prop: "encode", name: "encode", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "decodeMap", name: "decodeMap", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "padChar", name: "padChar", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "strict", name: "strict", embedded: false, exported: false, typ: $Bool, tag: ""}]); + encoder.init("encoding/base64", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "enc", name: "enc", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "nbuf", name: "nbuf", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: arrayType$3, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -25688,15 +29574,146 @@ $packages["encoding/base64"] = (function() { return $pkg; })(); $packages["strings"] = (function() { - var $pkg = {}, $init, errors, js, bytealg, io, unicode, utf8, sliceType, sliceType$1, IndexByte, Index, Count, explode, ContainsRune, IndexRune, genSplit, Split, Replace; + var $pkg = {}, $init, errors, js, bytealg, io, unicode, utf8, Builder, Reader, Replacer, replacer, trieNode, genericReplacer, appendSliceWriter, stringWriterIface, stringWriter, singleStringReplacer, byteReplacer, byteStringReplacer, stringFinder, asciiSet, span, ptrType, sliceType, arrayType, ptrType$1, arrayType$1, sliceType$1, ptrType$2, sliceType$2, ptrType$3, ptrType$4, arrayType$2, sliceType$3, ptrType$5, sliceType$4, arrayType$3, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, asciiSpace, IndexByte, Index, LastIndex, Count, NewReader, NewReplacer, makeGenericReplacer, getStringWriter, makeSingleStringReplacer, makeStringFinder, longestCommonSuffix, max, explode, Contains, ContainsRune, IndexRune, IndexAny, LastIndexByte, genSplit, SplitN, Split, Fields, FieldsFunc, Join, HasPrefix, HasSuffix, Map, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, IndexFunc, indexFunc, lastIndexFunc, makeASCIISet, makeCutsetFunc, TrimLeft, TrimRight, TrimSpace, TrimPrefix, TrimSuffix, Replace, EqualFold; errors = $packages["errors"]; js = $packages["github.com/gopherjs/gopherjs/js"]; bytealg = $packages["internal/bytealg"]; io = $packages["io"]; unicode = $packages["unicode"]; utf8 = $packages["unicode/utf8"]; + Builder = $pkg.Builder = $newType(0, $kindStruct, "strings.Builder", true, "strings", true, function(addr_, buf_) { + this.$val = this; + if (arguments.length === 0) { + this.addr = ptrType.nil; + this.buf = sliceType.nil; + return; + } + this.addr = addr_; + this.buf = buf_; + }); + Reader = $pkg.Reader = $newType(0, $kindStruct, "strings.Reader", true, "strings", true, function(s_, i_, prevRune_) { + this.$val = this; + if (arguments.length === 0) { + this.s = ""; + this.i = new $Int64(0, 0); + this.prevRune = 0; + return; + } + this.s = s_; + this.i = i_; + this.prevRune = prevRune_; + }); + Replacer = $pkg.Replacer = $newType(0, $kindStruct, "strings.Replacer", true, "strings", true, function(r_) { + this.$val = this; + if (arguments.length === 0) { + this.r = $ifaceNil; + return; + } + this.r = r_; + }); + replacer = $pkg.replacer = $newType(8, $kindInterface, "strings.replacer", true, "strings", false, null); + trieNode = $pkg.trieNode = $newType(0, $kindStruct, "strings.trieNode", true, "strings", false, function(value_, priority_, prefix_, next_, table_) { + this.$val = this; + if (arguments.length === 0) { + this.value = ""; + this.priority = 0; + this.prefix = ""; + this.next = ptrType$2.nil; + this.table = sliceType$2.nil; + return; + } + this.value = value_; + this.priority = priority_; + this.prefix = prefix_; + this.next = next_; + this.table = table_; + }); + genericReplacer = $pkg.genericReplacer = $newType(0, $kindStruct, "strings.genericReplacer", true, "strings", false, function(root_, tableSize_, mapping_) { + this.$val = this; + if (arguments.length === 0) { + this.root = new trieNode.ptr("", 0, "", ptrType$2.nil, sliceType$2.nil); + this.tableSize = 0; + this.mapping = arrayType.zero(); + return; + } + this.root = root_; + this.tableSize = tableSize_; + this.mapping = mapping_; + }); + appendSliceWriter = $pkg.appendSliceWriter = $newType(12, $kindSlice, "strings.appendSliceWriter", true, "strings", false, null); + stringWriterIface = $pkg.stringWriterIface = $newType(8, $kindInterface, "strings.stringWriterIface", true, "strings", false, null); + stringWriter = $pkg.stringWriter = $newType(0, $kindStruct, "strings.stringWriter", true, "strings", false, function(w_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + return; + } + this.w = w_; + }); + singleStringReplacer = $pkg.singleStringReplacer = $newType(0, $kindStruct, "strings.singleStringReplacer", true, "strings", false, function(finder_, value_) { + this.$val = this; + if (arguments.length === 0) { + this.finder = ptrType$4.nil; + this.value = ""; + return; + } + this.finder = finder_; + this.value = value_; + }); + byteReplacer = $pkg.byteReplacer = $newType(256, $kindArray, "strings.byteReplacer", true, "strings", false, null); + byteStringReplacer = $pkg.byteStringReplacer = $newType(0, $kindStruct, "strings.byteStringReplacer", true, "strings", false, function(replacements_, toReplace_) { + this.$val = this; + if (arguments.length === 0) { + this.replacements = arrayType$1.zero(); + this.toReplace = sliceType$1.nil; + return; + } + this.replacements = replacements_; + this.toReplace = toReplace_; + }); + stringFinder = $pkg.stringFinder = $newType(0, $kindStruct, "strings.stringFinder", true, "strings", false, function(pattern_, badCharSkip_, goodSuffixSkip_) { + this.$val = this; + if (arguments.length === 0) { + this.pattern = ""; + this.badCharSkip = arrayType$2.zero(); + this.goodSuffixSkip = sliceType$3.nil; + return; + } + this.pattern = pattern_; + this.badCharSkip = badCharSkip_; + this.goodSuffixSkip = goodSuffixSkip_; + }); + asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "strings.asciiSet", true, "strings", false, null); + span = $newType(0, $kindStruct, "strings.span", true, "strings", false, function(start_, end_) { + this.$val = this; + if (arguments.length === 0) { + this.start = 0; + this.end = 0; + return; + } + this.start = start_; + this.end = end_; + }); + ptrType = $ptrType(Builder); sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 256); + ptrType$1 = $ptrType(byteReplacer); + arrayType$1 = $arrayType(sliceType, 256); sliceType$1 = $sliceType($String); + ptrType$2 = $ptrType(trieNode); + sliceType$2 = $sliceType(ptrType$2); + ptrType$3 = $ptrType(appendSliceWriter); + ptrType$4 = $ptrType(stringFinder); + arrayType$2 = $arrayType($Int, 256); + sliceType$3 = $sliceType($Int); + ptrType$5 = $ptrType(asciiSet); + sliceType$4 = $sliceType(span); + arrayType$3 = $arrayType($Uint32, 8); + ptrType$6 = $ptrType(Reader); + ptrType$7 = $ptrType(Replacer); + ptrType$8 = $ptrType(genericReplacer); + ptrType$9 = $ptrType(singleStringReplacer); + ptrType$10 = $ptrType(byteStringReplacer); IndexByte = function(s, c) { var c, s; return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; @@ -25707,6 +29724,11 @@ $packages["strings"] = (function() { return $parseInt(s.indexOf(sep)) >> 0; }; $pkg.Index = Index; + LastIndex = function(s, sep) { + var s, sep; + return $parseInt(s.lastIndexOf(sep)) >> 0; + }; + $pkg.LastIndex = LastIndex; Count = function(s, sep) { var n, pos, s, sep; n = 0; @@ -25731,6 +29753,946 @@ $packages["strings"] = (function() { return n; }; $pkg.Count = Count; + Builder.ptr.prototype.String = function() { + var b; + b = this; + return ($bytesToString(b.buf)); + }; + Builder.prototype.String = function() { return this.$val.String(); }; + Builder.ptr.prototype.copyCheck = function() { + var b; + b = this; + if (b.addr === ptrType.nil) { + b.addr = b; + } else if (!(b.addr === b)) { + $panic(new $String("strings: illegal use of non-zero Builder copied by value")); + } + }; + Builder.prototype.copyCheck = function() { return this.$val.copyCheck(); }; + Builder.ptr.prototype.Len = function() { + var b; + b = this; + return b.buf.$length; + }; + Builder.prototype.Len = function() { return this.$val.Len(); }; + Builder.ptr.prototype.Reset = function() { + var b; + b = this; + b.addr = ptrType.nil; + b.buf = sliceType.nil; + }; + Builder.prototype.Reset = function() { return this.$val.Reset(); }; + Builder.ptr.prototype.grow = function(n) { + var b, buf, n; + b = this; + buf = $makeSlice(sliceType, b.buf.$length, (($imul(2, b.buf.$capacity)) + n >> 0)); + $copySlice(buf, b.buf); + b.buf = buf; + }; + Builder.prototype.grow = function(n) { return this.$val.grow(n); }; + Builder.ptr.prototype.Grow = function(n) { + var b, n; + b = this; + b.copyCheck(); + if (n < 0) { + $panic(new $String("strings.Builder.Grow: negative count")); + } + if ((b.buf.$capacity - b.buf.$length >> 0) < n) { + b.grow(n); + } + }; + Builder.prototype.Grow = function(n) { return this.$val.Grow(n); }; + Builder.ptr.prototype.Write = function(p) { + var b, p; + b = this; + b.copyCheck(); + b.buf = $appendSlice(b.buf, p); + return [p.$length, $ifaceNil]; + }; + Builder.prototype.Write = function(p) { return this.$val.Write(p); }; + Builder.ptr.prototype.WriteByte = function(c) { + var b, c; + b = this; + b.copyCheck(); + b.buf = $append(b.buf, c); + return $ifaceNil; + }; + Builder.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; + Builder.ptr.prototype.WriteRune = function(r) { + var b, l, n, r; + b = this; + b.copyCheck(); + if (r < 128) { + b.buf = $append(b.buf, ((r << 24 >>> 24))); + return [1, $ifaceNil]; + } + l = b.buf.$length; + if ((b.buf.$capacity - l >> 0) < 4) { + b.grow(4); + } + n = utf8.EncodeRune($subslice(b.buf, l, (l + 4 >> 0)), r); + b.buf = $subslice(b.buf, 0, (l + n >> 0)); + return [n, $ifaceNil]; + }; + Builder.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; + Builder.ptr.prototype.WriteString = function(s) { + var b, s; + b = this; + b.copyCheck(); + b.buf = $appendSlice(b.buf, s); + return [s.length, $ifaceNil]; + }; + Builder.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + Reader.ptr.prototype.Len = function() { + var r, x, x$1, x$2, x$3, x$4; + r = this; + if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + return 0; + } + return (((x$2 = (x$3 = (new $Int64(0, r.s.length)), x$4 = r.i, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); + }; + Reader.prototype.Len = function() { return this.$val.Len(); }; + Reader.ptr.prototype.Size = function() { + var r; + r = this; + return (new $Int64(0, r.s.length)); + }; + Reader.prototype.Size = function() { return this.$val.Size(); }; + Reader.ptr.prototype.Read = function(b) { + var _tmp, _tmp$1, b, err, n, r, x, x$1, x$2, x$3; + n = 0; + err = $ifaceNil; + r = this; + if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + _tmp = 0; + _tmp$1 = io.EOF; + n = _tmp; + err = _tmp$1; + return [n, err]; + } + r.prevRune = -1; + n = $copyString(b, $substring(r.s, $flatten64(r.i))); + r.i = (x$2 = r.i, x$3 = (new $Int64(0, n)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); + return [n, err]; + }; + Reader.prototype.Read = function(b) { return this.$val.Read(b); }; + Reader.ptr.prototype.ReadAt = function(b, off) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, n, off, r, x; + n = 0; + err = $ifaceNil; + r = this; + if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) { + _tmp = 0; + _tmp$1 = errors.New("strings.Reader.ReadAt: negative offset"); + n = _tmp; + err = _tmp$1; + return [n, err]; + } + if ((x = (new $Int64(0, r.s.length)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) { + _tmp$2 = 0; + _tmp$3 = io.EOF; + n = _tmp$2; + err = _tmp$3; + return [n, err]; + } + n = $copyString(b, $substring(r.s, $flatten64(off))); + if (n < b.$length) { + err = io.EOF; + } + return [n, err]; + }; + Reader.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; + Reader.ptr.prototype.ReadByte = function() { + var b, r, x, x$1, x$2, x$3; + r = this; + r.prevRune = -1; + if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + return [0, io.EOF]; + } + b = r.s.charCodeAt($flatten64(r.i)); + r.i = (x$2 = r.i, x$3 = new $Int64(0, 1), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); + return [b, $ifaceNil]; + }; + Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; + Reader.ptr.prototype.UnreadByte = function() { + var r, x, x$1, x$2; + r = this; + r.prevRune = -1; + if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { + return errors.New("strings.Reader.UnreadByte: at beginning of string"); + } + r.i = (x$1 = r.i, x$2 = new $Int64(0, 1), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + return $ifaceNil; + }; + Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; + Reader.ptr.prototype.ReadRune = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, ch, err, r, size, x, x$1, x$2, x$3, x$4, x$5, x$6; + ch = 0; + size = 0; + err = $ifaceNil; + r = this; + if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + r.prevRune = -1; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = io.EOF; + ch = _tmp; + size = _tmp$1; + err = _tmp$2; + return [ch, size, err]; + } + r.prevRune = (((x$2 = r.i, x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); + c = r.s.charCodeAt($flatten64(r.i)); + if (c < 128) { + r.i = (x$3 = r.i, x$4 = new $Int64(0, 1), new $Int64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); + _tmp$3 = ((c >> 0)); + _tmp$4 = 1; + _tmp$5 = $ifaceNil; + ch = _tmp$3; + size = _tmp$4; + err = _tmp$5; + return [ch, size, err]; + } + _tuple = utf8.DecodeRuneInString($substring(r.s, $flatten64(r.i))); + ch = _tuple[0]; + size = _tuple[1]; + r.i = (x$5 = r.i, x$6 = (new $Int64(0, size)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); + return [ch, size, err]; + }; + Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); }; + Reader.ptr.prototype.UnreadRune = function() { + var r; + r = this; + if (r.prevRune < 0) { + return errors.New("strings.Reader.UnreadRune: previous operation was not ReadRune"); + } + r.i = (new $Int64(0, r.prevRune)); + r.prevRune = -1; + return $ifaceNil; + }; + Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; + Reader.ptr.prototype.Seek = function(offset, whence) { + var _1, abs, offset, r, whence, x, x$1; + r = this; + r.prevRune = -1; + abs = new $Int64(0, 0); + _1 = whence; + if (_1 === (0)) { + abs = offset; + } else if (_1 === (1)) { + abs = (x = r.i, new $Int64(x.$high + offset.$high, x.$low + offset.$low)); + } else if (_1 === (2)) { + abs = (x$1 = (new $Int64(0, r.s.length)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); + } else { + return [new $Int64(0, 0), errors.New("strings.Reader.Seek: invalid whence")]; + } + if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { + return [new $Int64(0, 0), errors.New("strings.Reader.Seek: negative position")]; + } + r.i = abs; + return [abs, $ifaceNil]; + }; + Reader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + Reader.ptr.prototype.WriteTo = function(w) { + var _r, _tmp, _tmp$1, _tuple, err, m, n, r, s, w, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; m = $f.m; n = $f.n; r = $f.r; s = $f.s; w = $f.w; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + r = this; + r.prevRune = -1; + if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { + _tmp = new $Int64(0, 0); + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + s = $substring(r.s, $flatten64(r.i)); + _r = io.WriteString(w, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + m = _tuple[0]; + err = _tuple[1]; + if (m > s.length) { + $panic(new $String("strings.Reader.WriteTo: invalid WriteString count")); + } + r.i = (x$2 = r.i, x$3 = (new $Int64(0, m)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); + n = (new $Int64(0, m)); + if (!((m === s.length)) && $interfaceIsEqual(err, $ifaceNil)) { + err = io.ErrShortWrite; + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.WriteTo }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.m = m; $f.n = n; $f.r = r; $f.s = s; $f.w = w; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; + Reader.ptr.prototype.Reset = function(s) { + var r, s; + r = this; + Reader.copy(r, new Reader.ptr(s, new $Int64(0, 0), -1)); + }; + Reader.prototype.Reset = function(s) { return this.$val.Reset(s); }; + NewReader = function(s) { + var s; + return new Reader.ptr(s, new $Int64(0, 0), -1); + }; + $pkg.NewReader = NewReader; + NewReplacer = function(oldnew) { + var _i, _q, _r, _ref, allNewBytes, i, i$1, i$2, i$3, n, n$1, o, o$1, oldnew, r, r$1, x, x$1, x$2, x$3, x$4; + if ((_r = oldnew.$length % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 1) { + $panic(new $String("strings.NewReplacer: odd argument count")); + } + if ((oldnew.$length === 2) && (0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]).length > 1) { + return new Replacer.ptr(makeSingleStringReplacer((0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]), (1 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 1]))); + } + allNewBytes = true; + i = 0; + while (true) { + if (!(i < oldnew.$length)) { break; } + if (!((((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]).length === 1))) { + return new Replacer.ptr(makeGenericReplacer(oldnew)); + } + if (!(((x = i + 1 >> 0, ((x < 0 || x >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x])).length === 1))) { + allNewBytes = false; + } + i = i + (2) >> 0; + } + if (allNewBytes) { + r = arrayType.zero(); + _ref = r; + _i = 0; + while (true) { + if (!(_i < 256)) { break; } + i$1 = _i; + ((i$1 < 0 || i$1 >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[i$1] = ((i$1 << 24 >>> 24))); + _i++; + } + i$2 = oldnew.$length - 2 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + o = ((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]).charCodeAt(0); + n = (x$1 = i$2 + 1 >> 0, ((x$1 < 0 || x$1 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$1])).charCodeAt(0); + ((o < 0 || o >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[o] = n); + i$2 = i$2 - (2) >> 0; + } + return new Replacer.ptr(new ptrType$1(r)); + } + r$1 = new byteStringReplacer.ptr(arrayType$1.zero(), $makeSlice(sliceType$1, 0, (_q = oldnew.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))); + i$3 = oldnew.$length - 2 >> 0; + while (true) { + if (!(i$3 >= 0)) { break; } + o$1 = ((i$3 < 0 || i$3 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$3]).charCodeAt(0); + n$1 = (x$2 = i$3 + 1 >> 0, ((x$2 < 0 || x$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$2])); + if ((x$3 = r$1.replacements, ((o$1 < 0 || o$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[o$1])) === sliceType.nil) { + r$1.toReplace = $append(r$1.toReplace, ($bytesToString(new sliceType([o$1])))); + } + (x$4 = r$1.replacements, ((o$1 < 0 || o$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[o$1] = (new sliceType($stringToBytes(n$1))))); + i$3 = i$3 - (2) >> 0; + } + return new Replacer.ptr(r$1); + }; + $pkg.NewReplacer = NewReplacer; + Replacer.ptr.prototype.Replace = function(s) { + var _r, r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.r.Replace(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Replacer.ptr.prototype.Replace }; } $f._r = _r; $f.r = r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Replacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; + Replacer.ptr.prototype.WriteString = function(w, s) { + var _r, _tuple, err, n, r, s, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; n = $f.n; r = $f.r; s = $f.s; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + _r = r.r.WriteString(w, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Replacer.ptr.prototype.WriteString }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.r = r; $f.s = s; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + Replacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; + trieNode.ptr.prototype.add = function(key, val, priority, r) { + var key, keyNode, m, n, next, prefixNode, priority, r, t, val, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = this; + if (key === "") { + if (t.priority === 0) { + t.value = val; + t.priority = priority; + } + return; + } + if (!(t.prefix === "")) { + n = 0; + while (true) { + if (!(n < t.prefix.length && n < key.length)) { break; } + if (!((t.prefix.charCodeAt(n) === key.charCodeAt(n)))) { + break; + } + n = n + (1) >> 0; + } + if (n === t.prefix.length) { + t.next.add($substring(key, n), val, priority, r); + } else if (n === 0) { + prefixNode = ptrType$2.nil; + if (t.prefix.length === 1) { + prefixNode = t.next; + } else { + prefixNode = new trieNode.ptr("", 0, $substring(t.prefix, 1), t.next, sliceType$2.nil); + } + keyNode = new trieNode.ptr("", 0, "", ptrType$2.nil, sliceType$2.nil); + t.table = $makeSlice(sliceType$2, r.tableSize); + (x = t.table, x$1 = (x$2 = r.mapping, x$3 = t.prefix.charCodeAt(0), ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3])), ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = prefixNode)); + (x$4 = t.table, x$5 = (x$6 = r.mapping, x$7 = key.charCodeAt(0), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])), ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = keyNode)); + t.prefix = ""; + t.next = ptrType$2.nil; + keyNode.add($substring(key, 1), val, priority, r); + } else { + next = new trieNode.ptr("", 0, $substring(t.prefix, n), t.next, sliceType$2.nil); + t.prefix = $substring(t.prefix, 0, n); + t.next = next; + next.add($substring(key, n), val, priority, r); + } + } else if (!(t.table === sliceType$2.nil)) { + m = (x$8 = r.mapping, x$9 = key.charCodeAt(0), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])); + if ((x$10 = t.table, ((m < 0 || m >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + m])) === ptrType$2.nil) { + (x$11 = t.table, ((m < 0 || m >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + m] = new trieNode.ptr("", 0, "", ptrType$2.nil, sliceType$2.nil))); + } + (x$12 = t.table, ((m < 0 || m >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + m])).add($substring(key, 1), val, priority, r); + } else { + t.prefix = key; + t.next = new trieNode.ptr("", 0, "", ptrType$2.nil, sliceType$2.nil); + t.next.add("", val, priority, r); + } + }; + trieNode.prototype.add = function(key, val, priority, r) { return this.$val.add(key, val, priority, r); }; + genericReplacer.ptr.prototype.lookup = function(s, ignoreRoot) { + var bestPriority, found, ignoreRoot, index, keylen, n, node, r, s, val, x, x$1, x$2; + val = ""; + keylen = 0; + found = false; + r = this; + bestPriority = 0; + node = r.root; + n = 0; + while (true) { + if (!(!(node === ptrType$2.nil))) { break; } + if (node.priority > bestPriority && !(ignoreRoot && node === r.root)) { + bestPriority = node.priority; + val = node.value; + keylen = n; + found = true; + } + if (s === "") { + break; + } + if (!(node.table === sliceType$2.nil)) { + index = (x = r.mapping, x$1 = s.charCodeAt(0), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])); + if (((index >> 0)) === r.tableSize) { + break; + } + node = (x$2 = node.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index])); + s = $substring(s, 1); + n = n + (1) >> 0; + } else if (!(node.prefix === "") && HasPrefix(s, node.prefix)) { + n = n + (node.prefix.length) >> 0; + s = $substring(s, node.prefix.length); + node = node.next; + } else { + break; + } + } + return [val, keylen, found]; + }; + genericReplacer.prototype.lookup = function(s, ignoreRoot) { return this.$val.lookup(s, ignoreRoot); }; + makeGenericReplacer = function(oldnew) { + var _i, _i$1, _ref, _ref$1, b, b$1, i, i$1, i$2, index, j, key, oldnew, r, x, x$1, x$2, x$3, x$4; + r = new genericReplacer.ptr(new trieNode.ptr("", 0, "", ptrType$2.nil, sliceType$2.nil), 0, arrayType.zero()); + i = 0; + while (true) { + if (!(i < oldnew.$length)) { break; } + key = ((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]); + j = 0; + while (true) { + if (!(j < key.length)) { break; } + (x = r.mapping, x$1 = key.charCodeAt(j), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = 1)); + j = j + (1) >> 0; + } + i = i + (2) >> 0; + } + _ref = r.mapping; + _i = 0; + while (true) { + if (!(_i < 256)) { break; } + b = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + r.tableSize = r.tableSize + (((b >> 0))) >> 0; + _i++; + } + index = 0; + _ref$1 = r.mapping; + _i$1 = 0; + while (true) { + if (!(_i$1 < 256)) { break; } + i$1 = _i$1; + b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); + if (b$1 === 0) { + (x$2 = r.mapping, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1] = ((r.tableSize << 24 >>> 24)))); + } else { + (x$3 = r.mapping, ((i$1 < 0 || i$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i$1] = index)); + index = index + (1) << 24 >>> 24; + } + _i$1++; + } + r.root.table = $makeSlice(sliceType$2, r.tableSize); + i$2 = 0; + while (true) { + if (!(i$2 < oldnew.$length)) { break; } + r.root.add(((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]), (x$4 = i$2 + 1 >> 0, ((x$4 < 0 || x$4 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$4])), oldnew.$length - i$2 >> 0, r); + i$2 = i$2 + (2) >> 0; + } + return r; + }; + $ptrType(appendSliceWriter).prototype.Write = function(p) { + var p, w; + w = this; + w.$set($appendSlice(w.$get(), p)); + return [p.$length, $ifaceNil]; + }; + $ptrType(appendSliceWriter).prototype.WriteString = function(s) { + var s, w; + w = this; + w.$set($appendSlice(w.$get(), s)); + return [s.length, $ifaceNil]; + }; + stringWriter.ptr.prototype.WriteString = function(s) { + var _r, s, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r = w.w.Write((new sliceType($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: stringWriter.ptr.prototype.WriteString }; } $f._r = _r; $f.s = s; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + stringWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + getStringWriter = function(w) { + var _tuple, ok, sw, w, x; + _tuple = $assertType(w, stringWriterIface, true); + sw = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + sw = (x = new stringWriter.ptr(w), new x.constructor.elem(x)); + } + return sw; + }; + genericReplacer.ptr.prototype.Replace = function(s) { + var _r, buf, r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; buf = $f.buf; r = $f.r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = [buf]; + r = this; + buf[0] = $makeSlice(appendSliceWriter, 0, s.length); + _r = r.WriteString((buf.$ptr || (buf.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, buf))), s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return ($bytesToString(buf[0])); + /* */ } return; } if ($f === undefined) { $f = { $blk: genericReplacer.ptr.prototype.Replace }; } $f._r = _r; $f.buf = buf; $f.r = r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + genericReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; + genericReplacer.ptr.prototype.WriteString = function(w, s) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, index, keylen, last, match, n, prevMatchEmpty, r, s, sw, val, w, wn, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; err = $f.err; i = $f.i; index = $f.index; keylen = $f.keylen; last = $f.last; match = $f.match; n = $f.n; prevMatchEmpty = $f.prevMatchEmpty; r = $f.r; s = $f.s; sw = $f.sw; val = $f.val; w = $f.w; wn = $f.wn; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + sw = getStringWriter(w); + _tmp = 0; + _tmp$1 = 0; + last = _tmp; + wn = _tmp$1; + prevMatchEmpty = false; + i = 0; + /* while (true) { */ case 1: + /* if (!(i <= s.length)) { break; } */ if(!(i <= s.length)) { $s = 2; continue; } + /* */ if (!((i === s.length)) && (r.root.priority === 0)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((i === s.length)) && (r.root.priority === 0)) { */ case 3: + index = (((x = r.mapping, x$1 = s.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) >> 0)); + if ((index === r.tableSize) || (x$2 = r.root.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index])) === ptrType$2.nil) { + i = i + (1) >> 0; + /* continue; */ $s = 1; continue; + } + /* } */ case 4: + _tuple = r.lookup($substring(s, i), prevMatchEmpty); + val = _tuple[0]; + keylen = _tuple[1]; + match = _tuple[2]; + prevMatchEmpty = match && (keylen === 0); + /* */ if (match) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (match) { */ case 5: + _r = sw.WriteString($substring(s, last, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + wn = _tuple$1[0]; + err = _tuple$1[1]; + n = n + (wn) >> 0; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + _r$1 = sw.WriteString(val); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + wn = _tuple$2[0]; + err = _tuple$2[1]; + n = n + (wn) >> 0; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + i = i + (keylen) >> 0; + last = i; + /* continue; */ $s = 1; continue; + /* } */ case 6: + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + /* */ if (!((last === s.length))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!((last === s.length))) { */ case 9: + _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$3 = _r$2; + wn = _tuple$3[0]; + err = _tuple$3[1]; + n = n + (wn) >> 0; + /* } */ case 10: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: genericReplacer.ptr.prototype.WriteString }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.err = err; $f.i = i; $f.index = index; $f.keylen = keylen; $f.last = last; $f.match = match; $f.n = n; $f.prevMatchEmpty = prevMatchEmpty; $f.r = r; $f.s = s; $f.sw = sw; $f.val = val; $f.w = w; $f.wn = wn; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + genericReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; + makeSingleStringReplacer = function(pattern, value) { + var pattern, value; + return new singleStringReplacer.ptr(makeStringFinder(pattern), value); + }; + singleStringReplacer.ptr.prototype.Replace = function(s) { + var _tmp, _tmp$1, buf, i, match, matched, r, s; + r = this; + buf = sliceType.nil; + _tmp = 0; + _tmp$1 = false; + i = _tmp; + matched = _tmp$1; + while (true) { + match = r.finder.next($substring(s, i)); + if (match === -1) { + break; + } + matched = true; + buf = $appendSlice(buf, $substring(s, i, (i + match >> 0))); + buf = $appendSlice(buf, r.value); + i = i + ((match + r.finder.pattern.length >> 0)) >> 0; + } + if (!matched) { + return s; + } + buf = $appendSlice(buf, $substring(s, i)); + return ($bytesToString(buf)); + }; + singleStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; + singleStringReplacer.ptr.prototype.WriteString = function(w, s) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, i, match, n, r, s, sw, w, wn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; i = $f.i; match = $f.match; n = $f.n; r = $f.r; s = $f.s; sw = $f.sw; w = $f.w; wn = $f.wn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + sw = getStringWriter(w); + _tmp = 0; + _tmp$1 = 0; + i = _tmp; + wn = _tmp$1; + /* while (true) { */ case 1: + match = r.finder.next($substring(s, i)); + if (match === -1) { + /* break; */ $s = 2; continue; + } + _r = sw.WriteString($substring(s, i, (i + match >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + wn = _tuple[0]; + err = _tuple[1]; + n = n + (wn) >> 0; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + _r$1 = sw.WriteString(r.value); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + wn = _tuple$1[0]; + err = _tuple$1[1]; + n = n + (wn) >> 0; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + i = i + ((match + r.finder.pattern.length >> 0)) >> 0; + /* } */ $s = 1; continue; case 2: + _r$2 = sw.WriteString($substring(s, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + wn = _tuple$2[0]; + err = _tuple$2[1]; + n = n + (wn) >> 0; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: singleStringReplacer.ptr.prototype.WriteString }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.i = i; $f.match = match; $f.n = n; $f.r = r; $f.s = s; $f.sw = sw; $f.w = w; $f.wn = wn; $f.$s = $s; $f.$r = $r; return $f; + }; + singleStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; + byteReplacer.prototype.Replace = function(s) { + var b, buf, i, r, s; + r = this.$val; + buf = sliceType.nil; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + b = s.charCodeAt(i); + if (!(((r.nilCheck, ((b < 0 || b >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[b])) === b))) { + if (buf === sliceType.nil) { + buf = (new sliceType($stringToBytes(s))); + } + ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (r.nilCheck, ((b < 0 || b >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[b]))); + } + i = i + (1) >> 0; + } + if (buf === sliceType.nil) { + return s; + } + return ($bytesToString(buf)); + }; + $ptrType(byteReplacer).prototype.Replace = function(s) { return (new byteReplacer(this.$get())).Replace(s); }; + byteReplacer.prototype.WriteString = function(w, s) { + var _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, bufsize, err, err$1, i, n, ncopy, r, s, w, wn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; b = $f.b; buf = $f.buf; bufsize = $f.bufsize; err = $f.err; err$1 = $f.err$1; i = $f.i; n = $f.n; ncopy = $f.ncopy; r = $f.r; s = $f.s; w = $f.w; wn = $f.wn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this.$val; + bufsize = 32768; + if (s.length < bufsize) { + bufsize = s.length; + } + buf = $makeSlice(sliceType, bufsize); + /* while (true) { */ case 1: + /* if (!(s.length > 0)) { break; } */ if(!(s.length > 0)) { $s = 2; continue; } + ncopy = $copyString(buf, s); + s = $substring(s, ncopy); + _ref = $subslice(buf, 0, ncopy); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (r.nilCheck, ((b < 0 || b >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[b]))); + _i++; + } + _r = w.Write($subslice(buf, 0, ncopy)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + wn = _tuple[0]; + err$1 = _tuple[1]; + n = n + (wn) >> 0; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = n; + _tmp$1 = err$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* } */ $s = 1; continue; case 2: + _tmp$2 = n; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: byteReplacer.prototype.WriteString }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.b = b; $f.buf = buf; $f.bufsize = bufsize; $f.err = err; $f.err$1 = err$1; $f.i = i; $f.n = n; $f.ncopy = ncopy; $f.r = r; $f.s = s; $f.w = w; $f.wn = wn; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(byteReplacer).prototype.WriteString = function(w, s) { return (new byteReplacer(this.$get())).WriteString(w, s); }; + byteStringReplacer.ptr.prototype.Replace = function(s) { + var _i, _ref, anyChanges, b, b$1, buf, c, i, i$1, j, newSize, r, s, x, x$1, x$2, x$3, x$4, x$5, x$6; + r = this; + newSize = s.length; + anyChanges = false; + if (($imul(r.toReplace.$length, 8)) <= s.length) { + _ref = r.toReplace; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + c = Count(s, x); + if (!((c === 0))) { + newSize = newSize + (($imul(c, (((x$1 = r.replacements, x$2 = x.charCodeAt(0), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])).$length - 1 >> 0))))) >> 0; + anyChanges = true; + } + _i++; + } + } else { + i = 0; + while (true) { + if (!(i < s.length)) { break; } + b = s.charCodeAt(i); + if (!((x$3 = r.replacements, ((b < 0 || b >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[b])) === sliceType.nil)) { + newSize = newSize + (((x$4 = r.replacements, ((b < 0 || b >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[b])).$length - 1 >> 0)) >> 0; + anyChanges = true; + } + i = i + (1) >> 0; + } + } + if (!anyChanges) { + return s; + } + buf = $makeSlice(sliceType, newSize); + j = 0; + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + b$1 = s.charCodeAt(i$1); + if (!((x$5 = r.replacements, ((b$1 < 0 || b$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[b$1])) === sliceType.nil)) { + j = j + ($copySlice($subslice(buf, j), (x$6 = r.replacements, ((b$1 < 0 || b$1 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[b$1])))) >> 0; + } else { + ((j < 0 || j >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + j] = b$1); + j = j + (1) >> 0; + } + i$1 = i$1 + (1) >> 0; + } + return ($bytesToString(buf)); + }; + byteStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; + byteStringReplacer.ptr.prototype.WriteString = function(w, s) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, i, last, n, nw, nw$1, nw$2, r, s, sw, w, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; i = $f.i; last = $f.last; n = $f.n; nw = $f.nw; nw$1 = $f.nw$1; nw$2 = $f.nw$2; r = $f.r; s = $f.s; sw = $f.sw; w = $f.w; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + sw = getStringWriter(w); + last = 0; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } + b = s.charCodeAt(i); + /* */ if ((x = r.replacements, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === sliceType.nil) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ((x = r.replacements, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === sliceType.nil) { */ case 3: + i = i + (1) >> 0; + /* continue; */ $s = 1; continue; + /* } */ case 4: + /* */ if (!((last === i))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!((last === i))) { */ case 5: + _r = sw.WriteString($substring(s, last, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + nw = _tuple[0]; + err$1 = _tuple[1]; + n = n + (nw) >> 0; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = n; + _tmp$1 = err$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* } */ case 6: + last = i + 1 >> 0; + _r$1 = w.Write((x$1 = r.replacements, ((b < 0 || b >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[b]))); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + nw$1 = _tuple$1[0]; + err$2 = _tuple$1[1]; + n = n + (nw$1) >> 0; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$2 = n; + _tmp$3 = err$2; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + /* */ if (!((last === s.length))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!((last === s.length))) { */ case 9: + nw$2 = 0; + _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + nw$2 = _tuple$2[0]; + err = _tuple$2[1]; + n = n + (nw$2) >> 0; + /* } */ case 10: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: byteStringReplacer.ptr.prototype.WriteString }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.i = i; $f.last = last; $f.n = n; $f.nw = nw; $f.nw$1 = nw$1; $f.nw$2 = nw$2; $f.r = r; $f.s = s; $f.sw = sw; $f.w = w; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + byteStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; + makeStringFinder = function(pattern) { + var _i, _ref, f, i, i$1, i$2, i$3, last, lastPrefix, lenSuffix, pattern, x, x$1, x$2, x$3, x$4, x$5; + f = new stringFinder.ptr(pattern, arrayType$2.zero(), $makeSlice(sliceType$3, pattern.length)); + last = pattern.length - 1 >> 0; + _ref = f.badCharSkip; + _i = 0; + while (true) { + if (!(_i < 256)) { break; } + i = _i; + (x = f.badCharSkip, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = pattern.length)); + _i++; + } + i$1 = 0; + while (true) { + if (!(i$1 < last)) { break; } + (x$1 = f.badCharSkip, x$2 = pattern.charCodeAt(i$1), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = (last - i$1 >> 0))); + i$1 = i$1 + (1) >> 0; + } + lastPrefix = last; + i$2 = last; + while (true) { + if (!(i$2 >= 0)) { break; } + if (HasPrefix(pattern, $substring(pattern, (i$2 + 1 >> 0)))) { + lastPrefix = i$2 + 1 >> 0; + } + (x$3 = f.goodSuffixSkip, ((i$2 < 0 || i$2 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$2] = ((lastPrefix + last >> 0) - i$2 >> 0))); + i$2 = i$2 - (1) >> 0; + } + i$3 = 0; + while (true) { + if (!(i$3 < last)) { break; } + lenSuffix = longestCommonSuffix(pattern, $substring(pattern, 1, (i$3 + 1 >> 0))); + if (!((pattern.charCodeAt((i$3 - lenSuffix >> 0)) === pattern.charCodeAt((last - lenSuffix >> 0))))) { + (x$4 = f.goodSuffixSkip, x$5 = last - lenSuffix >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = ((lenSuffix + last >> 0) - i$3 >> 0))); + } + i$3 = i$3 + (1) >> 0; + } + return f; + }; + longestCommonSuffix = function(a, b) { + var a, b, i; + i = 0; + while (true) { + if (!(i < a.length && i < b.length)) { break; } + if (!((a.charCodeAt(((a.length - 1 >> 0) - i >> 0)) === b.charCodeAt(((b.length - 1 >> 0) - i >> 0))))) { + break; + } + i = i + (1) >> 0; + } + return i; + }; + stringFinder.ptr.prototype.next = function(text) { + var f, i, j, text, x, x$1, x$2; + f = this; + i = f.pattern.length - 1 >> 0; + while (true) { + if (!(i < text.length)) { break; } + j = f.pattern.length - 1 >> 0; + while (true) { + if (!(j >= 0 && (text.charCodeAt(i) === f.pattern.charCodeAt(j)))) { break; } + i = i - (1) >> 0; + j = j - (1) >> 0; + } + if (j < 0) { + return i + 1 >> 0; + } + i = i + (max((x = f.badCharSkip, x$1 = text.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = f.goodSuffixSkip, ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j])))) >> 0; + } + return -1; + }; + stringFinder.prototype.next = function(text) { return this.$val.next(text); }; + max = function(a, b) { + var a, b; + if (a > b) { + return a; + } + return b; + }; explode = function(s, n) { var _tuple, a, ch, i, l, n, s, size, x; l = utf8.RuneCountInString(s); @@ -25756,6 +30718,11 @@ $packages["strings"] = (function() { } return a; }; + Contains = function(s, substr) { + var s, substr; + return Index(s, substr) >= 0; + }; + $pkg.Contains = Contains; ContainsRune = function(s, r) { var r, s; return IndexRune(s, r) >= 0; @@ -25786,6 +30753,63 @@ $packages["strings"] = (function() { } }; $pkg.IndexRune = IndexRune; + IndexAny = function(s, chars) { + var _i, _i$1, _ref, _ref$1, _rune, _rune$1, _tuple, as, c, chars, i, i$1, isASCII, m, s; + if (chars === "") { + return -1; + } + if (s.length > 8) { + _tuple = makeASCIISet(chars); + as = $clone(_tuple[0], asciiSet); + isASCII = _tuple[1]; + if (isASCII) { + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (new ptrType$5(as).contains(s.charCodeAt(i))) { + return i; + } + i = i + (1) >> 0; + } + return -1; + } + } + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i$1 = _i; + c = _rune[0]; + _ref$1 = chars; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + m = _rune$1[0]; + if (c === m) { + return i$1; + } + _i$1 += _rune$1[1]; + } + _i += _rune[1]; + } + return -1; + }; + $pkg.IndexAny = IndexAny; + LastIndexByte = function(s, c) { + var c, i, s; + i = s.length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (s.charCodeAt(i) === c) { + return i; + } + i = i - (1) >> 0; + } + return -1; + }; + $pkg.LastIndexByte = LastIndexByte; genSplit = function(s, sep, sepSave, n) { var a, i, m, n, s, sep, sepSave; if (n === 0) { @@ -25813,11 +30837,453 @@ $packages["strings"] = (function() { ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = s); return $subslice(a, 0, (i + 1 >> 0)); }; + SplitN = function(s, sep, n) { + var n, s, sep; + return genSplit(s, sep, 0, n); + }; + $pkg.SplitN = SplitN; Split = function(s, sep) { var s, sep; return genSplit(s, sep, 0, -1); }; $pkg.Split = Split; + Fields = function(s) { + var _r, a, fieldStart, i, i$1, isSpace, n, na, r, s, setBits, wasSpace, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; a = $f.a; fieldStart = $f.fieldStart; i = $f.i; i$1 = $f.i$1; isSpace = $f.isSpace; n = $f.n; na = $f.na; r = $f.r; s = $f.s; setBits = $f.setBits; wasSpace = $f.wasSpace; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + wasSpace = 1; + setBits = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + r = s.charCodeAt(i); + setBits = (setBits | (r)) >>> 0; + isSpace = ((((r < 0 || r >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[r]) >> 0)); + n = n + ((wasSpace & (~isSpace >> 0))) >> 0; + wasSpace = isSpace; + i = i + (1) >> 0; + } + /* */ if (setBits < 128) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (setBits < 128) { */ case 1: + a = $makeSlice(sliceType$1, n); + na = 0; + fieldStart = 0; + i$1 = 0; + while (true) { + if (!(i$1 < s.length && !(((x = s.charCodeAt(i$1), ((x < 0 || x >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x])) === 0)))) { break; } + i$1 = i$1 + (1) >> 0; + } + fieldStart = i$1; + while (true) { + if (!(i$1 < s.length)) { break; } + if ((x$1 = s.charCodeAt(i$1), ((x$1 < 0 || x$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$1])) === 0) { + i$1 = i$1 + (1) >> 0; + continue; + } + ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart, i$1)); + na = na + (1) >> 0; + i$1 = i$1 + (1) >> 0; + while (true) { + if (!(i$1 < s.length && !(((x$2 = s.charCodeAt(i$1), ((x$2 < 0 || x$2 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$2])) === 0)))) { break; } + i$1 = i$1 + (1) >> 0; + } + fieldStart = i$1; + } + if (fieldStart < s.length) { + ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart)); + } + $s = -1; return a; + /* } */ case 2: + _r = FieldsFunc(s, unicode.IsSpace); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Fields }; } $f._r = _r; $f.a = a; $f.fieldStart = fieldStart; $f.i = i; $f.i$1 = i$1; $f.isSpace = isSpace; $f.n = n; $f.na = na; $f.r = r; $f.s = s; $f.setBits = setBits; $f.wasSpace = wasSpace; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Fields = Fields; + FieldsFunc = function(s, f) { + var _i, _i$1, _r, _ref, _ref$1, _rune, a, f, fromIndex, i, i$1, rune, s, span$1, spans, wasField, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; _rune = $f._rune; a = $f.a; f = $f.f; fromIndex = $f.fromIndex; i = $f.i; i$1 = $f.i$1; rune = $f.rune; s = $f.s; span$1 = $f.span$1; spans = $f.spans; wasField = $f.wasField; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + spans = $makeSlice(sliceType$4, 0, 32); + wasField = false; + fromIndex = 0; + _ref = s; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } + _rune = $decodeRune(_ref, _i); + i = _i; + rune = _rune[0]; + _r = f(rune); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r) { */ case 3: + if (wasField) { + spans = $append(spans, new span.ptr(fromIndex, i)); + wasField = false; + } + $s = 5; continue; + /* } else { */ case 4: + if (!wasField) { + fromIndex = i; + wasField = true; + } + /* } */ case 5: + _i += _rune[1]; + /* } */ $s = 1; continue; case 2: + if (wasField) { + spans = $append(spans, new span.ptr(fromIndex, s.length)); + } + a = $makeSlice(sliceType$1, spans.$length); + _ref$1 = spans; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + span$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), span); + ((i$1 < 0 || i$1 >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i$1] = $substring(s, span$1.start, span$1.end)); + _i$1++; + } + $s = -1; return a; + /* */ } return; } if ($f === undefined) { $f = { $blk: FieldsFunc }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f._rune = _rune; $f.a = a; $f.f = f; $f.fromIndex = fromIndex; $f.i = i; $f.i$1 = i$1; $f.rune = rune; $f.s = s; $f.span$1 = span$1; $f.spans = spans; $f.wasField = wasField; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.FieldsFunc = FieldsFunc; + Join = function(a, sep) { + var _1, _i, _ref, a, b, bp, i, n, s, sep; + _1 = a.$length; + if (_1 === (0)) { + return ""; + } else if (_1 === (1)) { + return (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0]); + } else if (_1 === (2)) { + return (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0]) + sep + (1 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 1]); + } else if (_1 === (3)) { + return (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0]) + sep + (1 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 1]) + sep + (2 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 2]); + } + n = $imul(sep.length, ((a.$length - 1 >> 0))); + i = 0; + while (true) { + if (!(i < a.$length)) { break; } + n = n + (((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]).length) >> 0; + i = i + (1) >> 0; + } + b = $makeSlice(sliceType, n); + bp = $copyString(b, (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0])); + _ref = $subslice(a, 1); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + bp = bp + ($copyString($subslice(b, bp), sep)) >> 0; + bp = bp + ($copyString($subslice(b, bp), s)) >> 0; + _i++; + } + return ($bytesToString(b)); + }; + $pkg.Join = Join; + HasPrefix = function(s, prefix) { + var prefix, s; + return s.length >= prefix.length && $substring(s, 0, prefix.length) === prefix; + }; + $pkg.HasPrefix = HasPrefix; + HasSuffix = function(s, suffix) { + var s, suffix; + return s.length >= suffix.length && $substring(s, (s.length - suffix.length >> 0)) === suffix; + }; + $pkg.HasSuffix = HasSuffix; + Map = function(mapping, s) { + var _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _rune$1, _tuple, b, c, c$1, i, mapping, nb, nbytes, r, r$1, s, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; _ref$1 = $f._ref$1; _rune = $f._rune; _rune$1 = $f._rune$1; _tuple = $f._tuple; b = $f.b; c = $f.c; c$1 = $f.c$1; i = $f.i; mapping = $f.mapping; nb = $f.nb; nbytes = $f.nbytes; r = $f.r; r$1 = $f.r$1; s = $f.s; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = sliceType.nil; + nbytes = 0; + _ref = s; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + _r = mapping(c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + r = _r; + if (r === c) { + _i += _rune[1]; + /* continue; */ $s = 1; continue; + } + b = $makeSlice(sliceType, (s.length + 4 >> 0)); + nbytes = $copyString(b, $substring(s, 0, i)); + if (r >= 0) { + if (r < 128) { + ((nbytes < 0 || nbytes >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + nbytes] = ((r << 24 >>> 24))); + nbytes = nbytes + (1) >> 0; + } else { + nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes), r)) >> 0; + } + } + if (c === 65533) { + _tuple = utf8.DecodeRuneInString($substring(s, i)); + w = _tuple[1]; + i = i + (w) >> 0; + } else { + i = i + (utf8.RuneLen(c)) >> 0; + } + s = $substring(s, i); + /* break; */ $s = 2; continue; + /* } */ $s = 1; continue; case 2: + if (b === sliceType.nil) { + $s = -1; return s; + } + _ref$1 = s; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.length)) { break; } */ if(!(_i$1 < _ref$1.length)) { $s = 5; continue; } + _rune$1 = $decodeRune(_ref$1, _i$1); + c$1 = _rune$1[0]; + _r$1 = mapping(c$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + r$1 = _r$1; + if ((0 <= r$1 && r$1 < 128) && nbytes < b.$length) { + ((nbytes < 0 || nbytes >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + nbytes] = ((r$1 << 24 >>> 24))); + nbytes = nbytes + (1) >> 0; + _i$1 += _rune$1[1]; + /* continue; */ $s = 4; continue; + } + if (r$1 >= 0) { + if ((nbytes + 4 >> 0) >= b.$length) { + nb = $makeSlice(sliceType, ($imul(2, b.$length))); + $copySlice(nb, $subslice(b, 0, nbytes)); + b = nb; + } + nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes), r$1)) >> 0; + } + _i$1 += _rune$1[1]; + /* } */ $s = 4; continue; case 5: + $s = -1; return ($bytesToString($subslice(b, 0, nbytes))); + /* */ } return; } if ($f === undefined) { $f = { $blk: Map }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f._ref$1 = _ref$1; $f._rune = _rune; $f._rune$1 = _rune$1; $f._tuple = _tuple; $f.b = b; $f.c = c; $f.c$1 = c$1; $f.i = i; $f.mapping = mapping; $f.nb = nb; $f.nbytes = nbytes; $f.r = r; $f.r$1 = r$1; $f.s = s; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Map = Map; + ToLower = function(s) { + var _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; b = $f.b; c = $f.c; c$1 = $f.c$1; hasUpper = $f.hasUpper; i = $f.i; i$1 = $f.i$1; isASCII = $f.isASCII; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tmp = true; + _tmp$1 = false; + isASCII = _tmp; + hasUpper = _tmp$1; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (c >= 128) { + isASCII = false; + break; + } + hasUpper = hasUpper || (c >= 65 && c <= 90); + i = i + (1) >> 0; + } + if (isASCII) { + if (!hasUpper) { + $s = -1; return s; + } + b = $makeSlice(sliceType, s.length); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + c$1 = s.charCodeAt(i$1); + if (c$1 >= 65 && c$1 <= 90) { + c$1 = c$1 + (32) << 24 >>> 24; + } + ((i$1 < 0 || i$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i$1] = c$1); + i$1 = i$1 + (1) >> 0; + } + $s = -1; return ($bytesToString(b)); + } + _r = Map(unicode.ToLower, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: ToLower }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.b = b; $f.c = c; $f.c$1 = c$1; $f.hasUpper = hasUpper; $f.i = i; $f.i$1 = i$1; $f.isASCII = isASCII; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ToLower = ToLower; + TrimLeftFunc = function(s, f) { + var _r, f, i, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; i = $f.i; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + i = _r; + if (i === -1) { + $s = -1; return ""; + } + $s = -1; return $substring(s, i); + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimLeftFunc }; } $f._r = _r; $f.f = f; $f.i = i; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimLeftFunc = TrimLeftFunc; + TrimRightFunc = function(s, f) { + var _r, _tuple, f, i, s, wid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; f = $f.f; i = $f.i; s = $f.s; wid = $f.wid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + i = _r; + if (i >= 0 && s.charCodeAt(i) >= 128) { + _tuple = utf8.DecodeRuneInString($substring(s, i)); + wid = _tuple[1]; + i = i + (wid) >> 0; + } else { + i = i + (1) >> 0; + } + $s = -1; return $substring(s, 0, i); + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimRightFunc }; } $f._r = _r; $f._tuple = _tuple; $f.f = f; $f.i = i; $f.s = s; $f.wid = wid; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimRightFunc = TrimRightFunc; + TrimFunc = function(s, f) { + var _r, _r$1, f, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; f = $f.f; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimFunc }; } $f._r = _r; $f._r$1 = _r$1; $f.f = f; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimFunc = TrimFunc; + IndexFunc = function(s, f) { + var _r, f, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = indexFunc(s, f, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: IndexFunc }; } $f._r = _r; $f.f = f; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.IndexFunc = IndexFunc; + indexFunc = function(s, f, truth) { + var _i, _r, _ref, _rune, f, i, r, s, truth, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; _rune = $f._rune; f = $f.f; i = $f.i; r = $f.r; s = $f.s; truth = $f.truth; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = s; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } + _rune = $decodeRune(_ref, _i); + i = _i; + r = _rune[0]; + _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === truth) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r === truth) { */ case 3: + $s = -1; return i; + /* } */ case 4: + _i += _rune[1]; + /* } */ $s = 1; continue; case 2: + $s = -1; return -1; + /* */ } return; } if ($f === undefined) { $f = { $blk: indexFunc }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f._rune = _rune; $f.f = f; $f.i = i; $f.r = r; $f.s = s; $f.truth = truth; $f.$s = $s; $f.$r = $r; return $f; + }; + lastIndexFunc = function(s, f, truth) { + var _r, _tuple, f, i, r, s, size, truth, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; f = $f.f; i = $f.i; r = $f.r; s = $f.s; size = $f.size; truth = $f.truth; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = s.length; + /* while (true) { */ case 1: + /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; } + _tuple = utf8.DecodeLastRuneInString($substring(s, 0, i)); + r = _tuple[0]; + size = _tuple[1]; + i = i - (size) >> 0; + _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === truth) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r === truth) { */ case 3: + $s = -1; return i; + /* } */ case 4: + /* } */ $s = 1; continue; case 2: + $s = -1; return -1; + /* */ } return; } if ($f === undefined) { $f = { $blk: lastIndexFunc }; } $f._r = _r; $f._tuple = _tuple; $f.f = f; $f.i = i; $f.r = r; $f.s = s; $f.size = size; $f.truth = truth; $f.$s = $s; $f.$r = $r; return $f; + }; + makeASCIISet = function(chars) { + var _index, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y; + as = arrayType$3.zero(); + ok = false; + i = 0; + while (true) { + if (!(i < chars.length)) { break; } + c = chars.charCodeAt(i); + if (c >= 128) { + _tmp = $clone(as, asciiSet); + _tmp$1 = false; + asciiSet.copy(as, _tmp); + ok = _tmp$1; + return [as, ok]; + } + _index = c >>> 5 << 24 >>> 24; + ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((((c & 31) >>> 0) >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + _tmp$2 = $clone(as, asciiSet); + _tmp$3 = true; + asciiSet.copy(as, _tmp$2); + ok = _tmp$3; + return [as, ok]; + }; + asciiSet.prototype.contains = function(c) { + var as, c, x, y; + as = this.$val; + return !((((((x = c >>> 5 << 24 >>> 24, (as.nilCheck, ((x < 0 || x >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[x]))) & (((y = ((((c & 31) >>> 0) >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0)); + }; + $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); }; + makeCutsetFunc = function(cutset) { + var _tuple, as, cutset, isASCII; + if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { + return (function(r) { + var r; + return r === ((cutset.charCodeAt(0) >> 0)); + }); + } + _tuple = makeASCIISet(cutset); + as = $clone(_tuple[0], asciiSet); + isASCII = _tuple[1]; + if (isASCII) { + return (function(r) { + var r; + return r < 128 && new ptrType$5(as).contains(((r << 24 >>> 24))); + }); + } + return (function(r) { + var r; + return IndexRune(cutset, r) >= 0; + }); + }; + TrimLeft = function(s, cutset) { + var _r, cutset, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; cutset = $f.cutset; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (s === "" || cutset === "") { + $s = -1; return s; + } + _r = TrimLeftFunc(s, makeCutsetFunc(cutset)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimLeft }; } $f._r = _r; $f.cutset = cutset; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimLeft = TrimLeft; + TrimRight = function(s, cutset) { + var _r, cutset, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; cutset = $f.cutset; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (s === "" || cutset === "") { + $s = -1; return s; + } + _r = TrimRightFunc(s, makeCutsetFunc(cutset)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimRight }; } $f._r = _r; $f.cutset = cutset; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimRight = TrimRight; + TrimSpace = function(s) { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = TrimFunc(s, unicode.IsSpace); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: TrimSpace }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TrimSpace = TrimSpace; + TrimPrefix = function(s, prefix) { + var prefix, s; + if (HasPrefix(s, prefix)) { + return $substring(s, prefix.length); + } + return s; + }; + $pkg.TrimPrefix = TrimPrefix; + TrimSuffix = function(s, suffix) { + var s, suffix; + if (HasSuffix(s, suffix)) { + return $substring(s, 0, (s.length - suffix.length >> 0)); + } + return s; + }; + $pkg.TrimSuffix = TrimSuffix; Replace = function(s, old, new$1, n) { var _tuple, i, j, m, n, new$1, old, s, start, t, w, wid; if (old === new$1 || (n === 0)) { @@ -25854,6 +31320,97 @@ $packages["strings"] = (function() { return ($bytesToString($subslice(t, 0, w))); }; $pkg.Replace = Replace; + EqualFold = function(s, t) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr; + while (true) { + if (!(!(s === "") && !(t === ""))) { break; } + _tmp = 0; + _tmp$1 = 0; + sr = _tmp; + tr = _tmp$1; + if (s.charCodeAt(0) < 128) { + _tmp$2 = ((s.charCodeAt(0) >> 0)); + _tmp$3 = $substring(s, 1); + sr = _tmp$2; + s = _tmp$3; + } else { + _tuple = utf8.DecodeRuneInString(s); + r = _tuple[0]; + size = _tuple[1]; + _tmp$4 = r; + _tmp$5 = $substring(s, size); + sr = _tmp$4; + s = _tmp$5; + } + if (t.charCodeAt(0) < 128) { + _tmp$6 = ((t.charCodeAt(0) >> 0)); + _tmp$7 = $substring(t, 1); + tr = _tmp$6; + t = _tmp$7; + } else { + _tuple$1 = utf8.DecodeRuneInString(t); + r$1 = _tuple$1[0]; + size$1 = _tuple$1[1]; + _tmp$8 = r$1; + _tmp$9 = $substring(t, size$1); + tr = _tmp$8; + t = _tmp$9; + } + if (tr === sr) { + continue; + } + if (tr < sr) { + _tmp$10 = sr; + _tmp$11 = tr; + tr = _tmp$10; + sr = _tmp$11; + } + if (tr < 128) { + if (65 <= sr && sr <= 90 && (tr === ((sr + 97 >> 0) - 65 >> 0))) { + continue; + } + return false; + } + r$2 = unicode.SimpleFold(sr); + while (true) { + if (!(!((r$2 === sr)) && r$2 < tr)) { break; } + r$2 = unicode.SimpleFold(r$2); + } + if (r$2 === tr) { + continue; + } + return false; + } + return s === t; + }; + $pkg.EqualFold = EqualFold; + ptrType.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "copyCheck", name: "copyCheck", pkg: "strings", typ: $funcType([], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "grow", name: "grow", pkg: "strings", typ: $funcType([$Int], [], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; + ptrType$6.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([$String], [], false)}]; + ptrType$7.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; + ptrType$2.methods = [{prop: "add", name: "add", pkg: "strings", typ: $funcType([$String, $String, $Int, ptrType$8], [], false)}]; + ptrType$8.methods = [{prop: "lookup", name: "lookup", pkg: "strings", typ: $funcType([$String, $Bool], [$String, $Int, $Bool], false)}, {prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; + ptrType$3.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; + stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; + ptrType$9.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; + ptrType$1.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; + ptrType$10.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; + ptrType$4.methods = [{prop: "next", name: "next", pkg: "strings", typ: $funcType([$String], [$Int], false)}]; + ptrType$5.methods = [{prop: "contains", name: "contains", pkg: "strings", typ: $funcType([$Uint8], [$Bool], false)}]; + Builder.init("strings", [{prop: "addr", name: "addr", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}]); + Reader.init("strings", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]); + Replacer.init("strings", [{prop: "r", name: "r", embedded: false, exported: false, typ: replacer, tag: ""}]); + replacer.init([{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]); + trieNode.init("strings", [{prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "priority", name: "priority", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "table", name: "table", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); + genericReplacer.init("strings", [{prop: "root", name: "root", embedded: false, exported: false, typ: trieNode, tag: ""}, {prop: "tableSize", name: "tableSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mapping", name: "mapping", embedded: false, exported: false, typ: arrayType, tag: ""}]); + appendSliceWriter.init($Uint8); + stringWriterIface.init([{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]); + stringWriter.init("strings", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]); + singleStringReplacer.init("strings", [{prop: "finder", name: "finder", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}]); + byteReplacer.init($Uint8, 256); + byteStringReplacer.init("strings", [{prop: "replacements", name: "replacements", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "toReplace", name: "toReplace", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + stringFinder.init("strings", [{prop: "pattern", name: "pattern", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "badCharSkip", name: "badCharSkip", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "goodSuffixSkip", name: "goodSuffixSkip", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + asciiSet.init($Uint32, 8); + span.init("strings", [{prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -25863,6 +31420,7 @@ $packages["strings"] = (function() { $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } $r = unicode.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + asciiSpace = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; }; $pkg.$init = $init; @@ -25892,7 +31450,7 @@ $packages["unicode/utf16"] = (function() { return $pkg; })(); $packages["encoding/json"] = (function() { - var $pkg = {}, $init, bytes, encoding, base64, errors, fmt, nosync, io, math, reflect, sort, strconv, strings, unicode, utf16, utf8, Unmarshaler, UnmarshalTypeError, InvalidUnmarshalError, Number, decodeState, unquotedValue, Marshaler, field, byIndex, SyntaxError, scanner, Decoder, Token, Delim, tagOptions, sliceType, sliceType$1, ptrType, ptrType$1, ptrType$2, sliceType$2, structType, ptrType$4, ptrType$5, mapType, ptrType$6, sliceType$3, ptrType$9, ptrType$10, ptrType$12, ptrType$13, funcType, ptrType$25, ptrType$26, funcType$1, ptrType$27, errPhase, nullLiteral, textUnmarshalerType, numberType, marshalerType, textMarshalerType, fieldCache, _r, _r$1, _r$2, isValidNumber, indirect, getu4, unquote, unquoteBytes, isValidTag, fillField, typeFields, dominantField, cachedTypeFields, foldFunc, equalFoldRight, asciiEqualFold, simpleLetterEqualFold, isSpace, stateBeginValueOrEmpty, stateBeginValue, stateBeginStringOrEmpty, stateBeginString, stateEndValue, stateEndTop, stateInString, stateInStringEsc, stateInStringEscU, stateInStringEscU1, stateInStringEscU12, stateInStringEscU123, stateNeg, state1, state0, stateDot, stateDot0, stateE, stateESign, stateE0, stateT, stateTr, stateTru, stateF, stateFa, stateFal, stateFals, stateN, stateNu, stateNul, stateError, quoteChar, NewDecoder, nonSpace, parseTag; + var $pkg = {}, $init, bytes, encoding, base64, errors, fmt, nosync, io, math, reflect, sort, strconv, strings, unicode, utf16, utf8, Unmarshaler, UnmarshalTypeError, InvalidUnmarshalError, Number, decodeState, unquotedValue, Marshaler, UnsupportedTypeError, UnsupportedValueError, MarshalerError, encodeState, jsonError, encOpts, encoderFunc, floatEncoder, structEncoder, mapEncoder, sliceEncoder, arrayEncoder, ptrEncoder, condAddrEncoder, reflectWithString, field, byIndex, SyntaxError, scanner, Decoder, Encoder, Token, Delim, tagOptions, sliceType, sliceType$1, ptrType, ptrType$1, ptrType$2, sliceType$2, structType, ptrType$4, ptrType$5, mapType, ptrType$6, arrayType, ptrType$7, sliceType$3, sliceType$4, sliceType$5, ptrType$8, ptrType$9, ptrType$10, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, ptrType$24, funcType, ptrType$25, ptrType$26, funcType$1, ptrType$27, ptrType$28, errPhase, nullLiteral, textUnmarshalerType, numberType, hex, encodeStatePool, encoderCache, marshalerType, textMarshalerType, float32Encoder, float64Encoder, fieldCache, safeSet, htmlSafeSet, _r, _r$1, _r$2, isValidNumber, indirect, getu4, unquote, unquoteBytes, Marshal, newEncodeState, isEmptyValue, valueEncoder, typeEncoder, newTypeEncoder, invalidValueEncoder, marshalerEncoder, addrMarshalerEncoder, textMarshalerEncoder, addrTextMarshalerEncoder, boolEncoder, intEncoder, uintEncoder, stringEncoder, interfaceEncoder, unsupportedTypeEncoder, newStructEncoder, newMapEncoder, encodeByteSlice, newSliceEncoder, newArrayEncoder, newPtrEncoder, newCondAddrEncoder, isValidTag, fieldByIndex, typeByIndex, fillField, typeFields, dominantField, cachedTypeFields, foldFunc, equalFoldRight, asciiEqualFold, simpleLetterEqualFold, compact, newline, Indent, isSpace, stateBeginValueOrEmpty, stateBeginValue, stateBeginStringOrEmpty, stateBeginString, stateEndValue, stateEndTop, stateInString, stateInStringEsc, stateInStringEscU, stateInStringEscU1, stateInStringEscU12, stateInStringEscU123, stateNeg, state1, state0, stateDot, stateDot0, stateE, stateESign, stateE0, stateT, stateTr, stateTru, stateF, stateFa, stateFal, stateFals, stateN, stateNu, stateNul, stateError, quoteChar, NewDecoder, nonSpace, NewEncoder, parseTag; bytes = $packages["bytes"]; encoding = $packages["encoding"]; base64 = $packages["encoding/base64"]; @@ -25963,6 +31521,126 @@ $packages["encoding/json"] = (function() { } }); Marshaler = $pkg.Marshaler = $newType(8, $kindInterface, "json.Marshaler", true, "encoding/json", true, null); + UnsupportedTypeError = $pkg.UnsupportedTypeError = $newType(0, $kindStruct, "json.UnsupportedTypeError", true, "encoding/json", true, function(Type_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = $ifaceNil; + return; + } + this.Type = Type_; + }); + UnsupportedValueError = $pkg.UnsupportedValueError = $newType(0, $kindStruct, "json.UnsupportedValueError", true, "encoding/json", true, function(Value_, Str_) { + this.$val = this; + if (arguments.length === 0) { + this.Value = new reflect.Value.ptr(ptrType$5.nil, 0, 0); + this.Str = ""; + return; + } + this.Value = Value_; + this.Str = Str_; + }); + MarshalerError = $pkg.MarshalerError = $newType(0, $kindStruct, "json.MarshalerError", true, "encoding/json", true, function(Type_, Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = $ifaceNil; + this.Err = $ifaceNil; + return; + } + this.Type = Type_; + this.Err = Err_; + }); + encodeState = $pkg.encodeState = $newType(0, $kindStruct, "json.encodeState", true, "encoding/json", false, function(Buffer_, scratch_) { + this.$val = this; + if (arguments.length === 0) { + this.Buffer = new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + this.scratch = arrayType.zero(); + return; + } + this.Buffer = Buffer_; + this.scratch = scratch_; + }); + jsonError = $pkg.jsonError = $newType(0, $kindStruct, "json.jsonError", true, "encoding/json", false, function(error_) { + this.$val = this; + if (arguments.length === 0) { + this.error = $ifaceNil; + return; + } + this.error = error_; + }); + encOpts = $pkg.encOpts = $newType(0, $kindStruct, "json.encOpts", true, "encoding/json", false, function(quoted_, escapeHTML_) { + this.$val = this; + if (arguments.length === 0) { + this.quoted = false; + this.escapeHTML = false; + return; + } + this.quoted = quoted_; + this.escapeHTML = escapeHTML_; + }); + encoderFunc = $pkg.encoderFunc = $newType(4, $kindFunc, "json.encoderFunc", true, "encoding/json", false, null); + floatEncoder = $pkg.floatEncoder = $newType(4, $kindInt, "json.floatEncoder", true, "encoding/json", false, null); + structEncoder = $pkg.structEncoder = $newType(0, $kindStruct, "json.structEncoder", true, "encoding/json", false, function(fields_, fieldEncs_) { + this.$val = this; + if (arguments.length === 0) { + this.fields = sliceType$3.nil; + this.fieldEncs = sliceType$4.nil; + return; + } + this.fields = fields_; + this.fieldEncs = fieldEncs_; + }); + mapEncoder = $pkg.mapEncoder = $newType(0, $kindStruct, "json.mapEncoder", true, "encoding/json", false, function(elemEnc_) { + this.$val = this; + if (arguments.length === 0) { + this.elemEnc = $throwNilPointerError; + return; + } + this.elemEnc = elemEnc_; + }); + sliceEncoder = $pkg.sliceEncoder = $newType(0, $kindStruct, "json.sliceEncoder", true, "encoding/json", false, function(arrayEnc_) { + this.$val = this; + if (arguments.length === 0) { + this.arrayEnc = $throwNilPointerError; + return; + } + this.arrayEnc = arrayEnc_; + }); + arrayEncoder = $pkg.arrayEncoder = $newType(0, $kindStruct, "json.arrayEncoder", true, "encoding/json", false, function(elemEnc_) { + this.$val = this; + if (arguments.length === 0) { + this.elemEnc = $throwNilPointerError; + return; + } + this.elemEnc = elemEnc_; + }); + ptrEncoder = $pkg.ptrEncoder = $newType(0, $kindStruct, "json.ptrEncoder", true, "encoding/json", false, function(elemEnc_) { + this.$val = this; + if (arguments.length === 0) { + this.elemEnc = $throwNilPointerError; + return; + } + this.elemEnc = elemEnc_; + }); + condAddrEncoder = $pkg.condAddrEncoder = $newType(0, $kindStruct, "json.condAddrEncoder", true, "encoding/json", false, function(canAddrEnc_, elseEnc_) { + this.$val = this; + if (arguments.length === 0) { + this.canAddrEnc = $throwNilPointerError; + this.elseEnc = $throwNilPointerError; + return; + } + this.canAddrEnc = canAddrEnc_; + this.elseEnc = elseEnc_; + }); + reflectWithString = $pkg.reflectWithString = $newType(0, $kindStruct, "json.reflectWithString", true, "encoding/json", false, function(v_, s_) { + this.$val = this; + if (arguments.length === 0) { + this.v = new reflect.Value.ptr(ptrType$5.nil, 0, 0); + this.s = ""; + return; + } + this.v = v_; + this.s = s_; + }); field = $pkg.field = $newType(0, $kindStruct, "json.field", true, "encoding/json", false, function(name_, nameBytes_, equalFold_, tag_, index_, typ_, omitEmpty_, quoted_) { this.$val = this; if (arguments.length === 0) { @@ -26036,6 +31714,24 @@ $packages["encoding/json"] = (function() { this.tokenState = tokenState_; this.tokenStack = tokenStack_; }); + Encoder = $pkg.Encoder = $newType(0, $kindStruct, "json.Encoder", true, "encoding/json", true, function(w_, err_, escapeHTML_, indentBuf_, indentPrefix_, indentValue_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + this.err = $ifaceNil; + this.escapeHTML = false; + this.indentBuf = ptrType$8.nil; + this.indentPrefix = ""; + this.indentValue = ""; + return; + } + this.w = w_; + this.err = err_; + this.escapeHTML = escapeHTML_; + this.indentBuf = indentBuf_; + this.indentPrefix = indentPrefix_; + this.indentValue = indentValue_; + }); Token = $pkg.Token = $newType(8, $kindInterface, "json.Token", true, "encoding/json", true, null); Delim = $pkg.Delim = $newType(4, $kindInt32, "json.Delim", true, "encoding/json", true, null); tagOptions = $pkg.tagOptions = $newType(8, $kindString, "json.tagOptions", true, "encoding/json", false, null); @@ -26050,16 +31746,32 @@ $packages["encoding/json"] = (function() { ptrType$5 = $ptrType(reflect.rtype); mapType = $mapType($String, $emptyInterface); ptrType$6 = $ptrType(field); + arrayType = $arrayType($Uint8, 64); + ptrType$7 = $ptrType(encodeState); sliceType$3 = $sliceType(field); + sliceType$4 = $sliceType(encoderFunc); + sliceType$5 = $sliceType(reflectWithString); + ptrType$8 = $ptrType(bytes.Buffer); ptrType$9 = $ptrType($String); ptrType$10 = $ptrType($emptyInterface); ptrType$12 = $ptrType(InvalidUnmarshalError); ptrType$13 = $ptrType(decodeState); + ptrType$14 = $ptrType(UnsupportedTypeError); + ptrType$15 = $ptrType(UnsupportedValueError); + ptrType$17 = $ptrType(MarshalerError); + ptrType$18 = $ptrType(structEncoder); + ptrType$19 = $ptrType(mapEncoder); + ptrType$20 = $ptrType(sliceEncoder); + ptrType$21 = $ptrType(arrayEncoder); + ptrType$22 = $ptrType(ptrEncoder); + ptrType$23 = $ptrType(condAddrEncoder); + ptrType$24 = $ptrType(reflectWithString); funcType = $funcType([sliceType$1, sliceType$1], [$Bool], false); ptrType$25 = $ptrType(SyntaxError); ptrType$26 = $ptrType(scanner); funcType$1 = $funcType([ptrType$26, $Uint8], [$Int], false); ptrType$27 = $ptrType(Decoder); + ptrType$28 = $ptrType(Encoder); UnmarshalTypeError.ptr.prototype.Error = function() { var _r$3, _r$4, e, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -27575,6 +33287,768 @@ $packages["encoding/json"] = (function() { ok = _tmp$3; return [t, ok]; }; + Marshal = function(v) { + var _r$3, _r$4, buf, e, err, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; buf = $f.buf; e = $f.e; err = $f.err; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = newEncodeState(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + e = _r$3; + _r$4 = e.marshal(v, new encOpts.ptr(false, true)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err]; + } + buf = $appendSlice((sliceType$1.nil), e.Buffer.Bytes()); + e.Buffer.Reset(); + encodeStatePool.Put(e); + $s = -1; return [buf, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Marshal }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.buf = buf; $f.e = e; $f.err = err; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Marshal = Marshal; + UnsupportedTypeError.ptr.prototype.Error = function() { + var _r$3, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$3 = e.Type.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return "json: unsupported type: " + _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnsupportedTypeError.ptr.prototype.Error }; } $f._r$3 = _r$3; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + UnsupportedTypeError.prototype.Error = function() { return this.$val.Error(); }; + UnsupportedValueError.ptr.prototype.Error = function() { + var e; + e = this; + return "json: unsupported value: " + e.Str; + }; + UnsupportedValueError.prototype.Error = function() { return this.$val.Error(); }; + MarshalerError.ptr.prototype.Error = function() { + var _r$3, _r$4, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$3 = e.Type.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = e.Err.Error(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return "json: error calling MarshalJSON for type " + _r$3 + ": " + _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: MarshalerError.ptr.prototype.Error }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + MarshalerError.prototype.Error = function() { return this.$val.Error(); }; + newEncodeState = function() { + var _r$3, e, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = encodeStatePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + if (!($interfaceIsEqual(v, $ifaceNil))) { + e = $assertType(v, ptrType$7); + e.Buffer.Reset(); + $s = -1; return e; + } + $s = -1; return new encodeState.ptr(new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0), arrayType.zero()); + /* */ } return; } if ($f === undefined) { $f = { $blk: newEncodeState }; } $f._r$3 = _r$3; $f.e = e; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + encodeState.ptr.prototype.marshal = function(v, opts) { + var _r$3, e, err, opts, v, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; err = $f.err; opts = $f.opts; v = $f.v; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + err[0] = $ifaceNil; + e = this; + $deferred.push([(function(err) { return function() { + var _tuple, je, ok, r; + r = $recover(); + if (!($interfaceIsEqual(r, $ifaceNil))) { + _tuple = $assertType(r, jsonError, true); + je = $clone(_tuple[0], jsonError); + ok = _tuple[1]; + if (ok) { + err[0] = je.error; + } else { + $panic(r); + } + } + }; })(err), []]); + _r$3 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $r = e.reflectValue($clone(_r$3, reflect.Value), $clone(opts, encOpts)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err[0] = $ifaceNil; + $s = -1; return err[0]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: encodeState.ptr.prototype.marshal }; } $f._r$3 = _r$3; $f.e = e; $f.err = err; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + encodeState.prototype.marshal = function(v, opts) { return this.$val.marshal(v, opts); }; + encodeState.ptr.prototype.error = function(err) { + var e, err, x; + e = this; + $panic((x = new jsonError.ptr(err), new x.constructor.elem(x))); + }; + encodeState.prototype.error = function(err) { return this.$val.error(err); }; + isEmptyValue = function(v) { + var _1, v, x, x$1; + _1 = $clone(v, reflect.Value).Kind(); + if ((_1 === (17)) || (_1 === (21)) || (_1 === (23)) || (_1 === (24))) { + return $clone(v, reflect.Value).Len() === 0; + } else if (_1 === (1)) { + return !$clone(v, reflect.Value).Bool(); + } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { + return (x = $clone(v, reflect.Value).Int(), (x.$high === 0 && x.$low === 0)); + } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { + return (x$1 = $clone(v, reflect.Value).Uint(), (x$1.$high === 0 && x$1.$low === 0)); + } else if ((_1 === (13)) || (_1 === (14))) { + return $clone(v, reflect.Value).Float() === 0; + } else if ((_1 === (20)) || (_1 === (22))) { + return $clone(v, reflect.Value).IsNil(); + } + return false; + }; + encodeState.ptr.prototype.reflectValue = function(v, opts) { + var _r$3, e, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$3 = valueEncoder($clone(v, reflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $r = _r$3(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: encodeState.ptr.prototype.reflectValue }; } $f._r$3 = _r$3; $f.e = e; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + encodeState.prototype.reflectValue = function(v, opts) { return this.$val.reflectValue(v, opts); }; + valueEncoder = function(v) { + var _r$3, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (!$clone(v, reflect.Value).IsValid()) { + $s = -1; return invalidValueEncoder; + } + _r$3 = typeEncoder($clone(v, reflect.Value).Type()); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: valueEncoder }; } $f._r$3 = _r$3; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + typeEncoder = function(t) { + var _r$3, _tuple, _tuple$1, f, fi, fi$1, loaded, ok, t, wg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; f = $f.f; fi = $f.fi; fi$1 = $f.fi$1; loaded = $f.loaded; ok = $f.ok; t = $f.t; wg = $f.wg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = [f]; + wg = [wg]; + _tuple = encoderCache.Load(t); + fi = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return $assertType(fi, encoderFunc); + } + wg[0] = new nosync.WaitGroup.ptr(0); + f[0] = $throwNilPointerError; + wg[0].Add(1); + _tuple$1 = encoderCache.LoadOrStore(t, new encoderFunc(((function(f, wg) { return function $b(e, v, opts) { + var e, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + wg[0].Wait(); + $r = f[0](e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.e = e; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; })(f, wg)))); + fi$1 = _tuple$1[0]; + loaded = _tuple$1[1]; + if (loaded) { + $s = -1; return $assertType(fi$1, encoderFunc); + } + _r$3 = newTypeEncoder(t, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + f[0] = _r$3; + wg[0].Done(); + encoderCache.Store(t, new encoderFunc(f[0])); + $s = -1; return f[0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: typeEncoder }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.f = f; $f.fi = fi; $f.fi$1 = fi$1; $f.loaded = loaded; $f.ok = ok; $f.t = t; $f.wg = wg; $f.$s = $s; $f.$r = $r; return $f; + }; + newTypeEncoder = function(t, allowAddr) { + var _1, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, allowAddr, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; allowAddr = $f.allowAddr; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = t.Implements(marshalerType); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$3) { */ case 1: + $s = -1; return marshalerEncoder; + /* } */ case 2: + _r$4 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (!((_r$4 === 22)) && allowAddr) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((_r$4 === 22)) && allowAddr) { */ case 4: + _r$5 = reflect.PtrTo(t).Implements(marshalerType); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + /* */ if (_r$5) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_r$5) { */ case 7: + _arg = addrMarshalerEncoder; + _r$6 = newTypeEncoder(t, false); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _arg$1 = _r$6; + _r$7 = newCondAddrEncoder(_arg, _arg$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 8: + /* } */ case 5: + _r$8 = t.Implements(textMarshalerType); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + /* */ if (_r$8) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_r$8) { */ case 12: + $s = -1; return textMarshalerEncoder; + /* } */ case 13: + _r$9 = t.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + /* */ if (!((_r$9 === 22)) && allowAddr) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!((_r$9 === 22)) && allowAddr) { */ case 15: + _r$10 = reflect.PtrTo(t).Implements(textMarshalerType); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + /* */ if (_r$10) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (_r$10) { */ case 18: + _arg$2 = addrTextMarshalerEncoder; + _r$11 = newTypeEncoder(t, false); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _arg$3 = _r$11; + _r$12 = newCondAddrEncoder(_arg$2, _arg$3); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + $s = -1; return _r$12; + /* } */ case 19: + /* } */ case 16: + _r$13 = t.Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _1 = _r$13; + /* */ if (_1 === (1)) { $s = 25; continue; } + /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 26; continue; } + /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 27; continue; } + /* */ if (_1 === (13)) { $s = 28; continue; } + /* */ if (_1 === (14)) { $s = 29; continue; } + /* */ if (_1 === (24)) { $s = 30; continue; } + /* */ if (_1 === (20)) { $s = 31; continue; } + /* */ if (_1 === (25)) { $s = 32; continue; } + /* */ if (_1 === (21)) { $s = 33; continue; } + /* */ if (_1 === (23)) { $s = 34; continue; } + /* */ if (_1 === (17)) { $s = 35; continue; } + /* */ if (_1 === (22)) { $s = 36; continue; } + /* */ $s = 37; continue; + /* if (_1 === (1)) { */ case 25: + $s = -1; return boolEncoder; + /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 26: + $s = -1; return intEncoder; + /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 27: + $s = -1; return uintEncoder; + /* } else if (_1 === (13)) { */ case 28: + $s = -1; return float32Encoder; + /* } else if (_1 === (14)) { */ case 29: + $s = -1; return float64Encoder; + /* } else if (_1 === (24)) { */ case 30: + $s = -1; return stringEncoder; + /* } else if (_1 === (20)) { */ case 31: + $s = -1; return interfaceEncoder; + /* } else if (_1 === (25)) { */ case 32: + _r$14 = newStructEncoder(t); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $s = -1; return _r$14; + /* } else if (_1 === (21)) { */ case 33: + _r$15 = newMapEncoder(t); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return _r$15; + /* } else if (_1 === (23)) { */ case 34: + _r$16 = newSliceEncoder(t); /* */ $s = 41; case 41: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + $s = -1; return _r$16; + /* } else if (_1 === (17)) { */ case 35: + _r$17 = newArrayEncoder(t); /* */ $s = 42; case 42: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + $s = -1; return _r$17; + /* } else if (_1 === (22)) { */ case 36: + _r$18 = newPtrEncoder(t); /* */ $s = 43; case 43: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + $s = -1; return _r$18; + /* } else { */ case 37: + $s = -1; return unsupportedTypeEncoder; + /* } */ case 38: + case 23: + $s = -1; return $throwNilPointerError; + /* */ } return; } if ($f === undefined) { $f = { $blk: newTypeEncoder }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f.allowAddr = allowAddr; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + invalidValueEncoder = function(e, v, param) { + var e, param, v; + e.Buffer.WriteString("null"); + }; + marshalerEncoder = function(e, v, opts) { + var _r$3, _r$4, _r$5, _tuple, _tuple$1, b, e, err, m, ok, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; e = $f.e; err = $f.err; m = $f.m; ok = $f.ok; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = $assertType(_r$3, Marshaler, true); + m = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$4 = m.MarshalJSON(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + b = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 3: + _r$5 = compact(e.Buffer, b, opts.escapeHTML); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + /* } */ case 4: + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err)); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: marshalerEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.e = e; $f.err = err; $f.m = m; $f.ok = ok; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + addrMarshalerEncoder = function(e, v, param) { + var _r$3, _r$4, _r$5, _tuple, b, e, err, m, param, v, va, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; b = $f.b; e = $f.e; err = $f.err; m = $f.m; param = $f.param; v = $f.v; va = $f.va; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + va = $clone(v, reflect.Value).Addr(); + if ($clone(va, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(va, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + m = $assertType(_r$3, Marshaler); + _r$4 = m.MarshalJSON(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + b = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 3: + _r$5 = compact(e.Buffer, b, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + /* } */ case 4: + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err)); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: addrMarshalerEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.b = b; $f.e = e; $f.err = err; $f.m = m; $f.param = param; $f.v = v; $f.va = va; $f.$s = $s; $f.$r = $r; return $f; + }; + textMarshalerEncoder = function(e, v, opts) { + var _r$3, _r$4, _tuple, b, e, err, m, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; b = $f.b; e = $f.e; err = $f.err; m = $f.m; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + m = $assertType(_r$3, encoding.TextMarshaler); + _r$4 = m.MarshalText(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + b = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err)); + } + e.stringBytes(b, opts.escapeHTML); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: textMarshalerEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.b = b; $f.e = e; $f.err = err; $f.m = m; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + addrTextMarshalerEncoder = function(e, v, opts) { + var _r$3, _r$4, _tuple, b, e, err, m, opts, v, va, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; b = $f.b; e = $f.e; err = $f.err; m = $f.m; opts = $f.opts; v = $f.v; va = $f.va; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + va = $clone(v, reflect.Value).Addr(); + if ($clone(va, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(va, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + m = $assertType(_r$3, encoding.TextMarshaler); + _r$4 = m.MarshalText(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + b = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err)); + } + e.stringBytes(b, opts.escapeHTML); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: addrTextMarshalerEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.b = b; $f.e = e; $f.err = err; $f.m = m; $f.opts = opts; $f.v = v; $f.va = va; $f.$s = $s; $f.$r = $r; return $f; + }; + boolEncoder = function(e, v, opts) { + var e, opts, v; + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + if ($clone(v, reflect.Value).Bool()) { + e.Buffer.WriteString("true"); + } else { + e.Buffer.WriteString("false"); + } + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + }; + intEncoder = function(e, v, opts) { + var b, e, opts, v; + b = strconv.AppendInt($subslice(new sliceType$1(e.scratch), 0, 0), $clone(v, reflect.Value).Int(), 10); + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + e.Buffer.Write(b); + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + }; + uintEncoder = function(e, v, opts) { + var b, e, opts, v; + b = strconv.AppendUint($subslice(new sliceType$1(e.scratch), 0, 0), $clone(v, reflect.Value).Uint(), 10); + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + e.Buffer.Write(b); + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + }; + floatEncoder.prototype.encode = function(e, v, opts) { + var abs, b, bits, e, f, fmt$1, n, opts, v, x, x$1, x$2, x$3, x$4; + bits = this.$val; + f = $clone(v, reflect.Value).Float(); + if (math.IsInf(f, 0) || math.IsNaN(f)) { + e.error(new UnsupportedValueError.ptr($clone(v, reflect.Value), strconv.FormatFloat(f, 103, -1, ((bits >> 0))))); + } + b = $subslice(new sliceType$1(e.scratch), 0, 0); + abs = math.Abs(f); + fmt$1 = 102; + if (!((abs === 0))) { + if ((bits === 64) && (abs < 1e-06 || abs >= 1e+21) || (bits === 32) && (($fround(abs)) < 9.999999974752427e-07 || ($fround(abs)) >= 1.0000000200408773e+21)) { + fmt$1 = 101; + } + } + b = strconv.AppendFloat(b, f, fmt$1, -1, ((bits >> 0))); + if (fmt$1 === 101) { + n = b.$length; + if (n >= 4 && ((x = n - 4 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])) === 101) && ((x$1 = n - 3 >> 0, ((x$1 < 0 || x$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$1])) === 45) && ((x$2 = n - 2 >> 0, ((x$2 < 0 || x$2 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$2])) === 48)) { + (x$4 = n - 2 >> 0, ((x$4 < 0 || x$4 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$4] = (x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$3])))); + b = $subslice(b, 0, (n - 1 >> 0)); + } + } + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + e.Buffer.Write(b); + if (opts.quoted) { + e.Buffer.WriteByte(34); + } + }; + $ptrType(floatEncoder).prototype.encode = function(e, v, opts) { return new floatEncoder(this.$get()).encode(e, v, opts); }; + stringEncoder = function(e, v, opts) { + var _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, e, err, numStr, opts, sb, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; e = $f.e; err = $f.err; numStr = $f.numStr; opts = $f.opts; sb = $f.sb; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType)) { */ case 1: + _r$3 = $clone(v, reflect.Value).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + numStr = _r$3; + if (numStr === "") { + numStr = "0"; + } + /* */ if (!isValidNumber(numStr)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!isValidNumber(numStr)) { */ case 4: + _r$4 = fmt.Errorf("json: invalid number literal %q", new sliceType([new $String(numStr)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $r = e.error(_r$4); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + e.Buffer.WriteString(numStr); + $s = -1; return; + /* } */ case 2: + /* */ if (opts.quoted) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (opts.quoted) { */ case 8: + _r$5 = $clone(v, reflect.Value).String(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = Marshal(new $String(_r$5)); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple = _r$6; + sb = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(err); + } + e.string(($bytesToString(sb)), opts.escapeHTML); + $s = 10; continue; + /* } else { */ case 9: + _r$7 = $clone(v, reflect.Value).String(); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $r = e.string(_r$7, opts.escapeHTML); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: stringEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f.e = e; $f.err = err; $f.numStr = numStr; $f.opts = opts; $f.sb = sb; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + interfaceEncoder = function(e, v, opts) { + var _r$3, e, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $r = e.reflectValue($clone(_r$3, reflect.Value), $clone(opts, encOpts)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: interfaceEncoder }; } $f._r$3 = _r$3; $f.e = e; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + unsupportedTypeEncoder = function(e, v, param) { + var e, param, v; + e.error(new UnsupportedTypeError.ptr($clone(v, reflect.Value).Type())); + }; + structEncoder.ptr.prototype.encode = function(e, v, opts) { + var _i, _r$3, _ref, e, f, first, fv, i, opts, se, v, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$3 = $f._r$3; _ref = $f._ref; e = $f.e; f = $f.f; first = $f.first; fv = $f.fv; i = $f.i; opts = $f.opts; se = $f.se; v = $f.v; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + se = this; + e.Buffer.WriteByte(123); + first = true; + _ref = se.fields; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + f = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), field); + _r$3 = fieldByIndex($clone(v, reflect.Value), f.index); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + fv = _r$3; + /* */ if (!$clone(fv, reflect.Value).IsValid() || f.omitEmpty && isEmptyValue($clone(fv, reflect.Value))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!$clone(fv, reflect.Value).IsValid() || f.omitEmpty && isEmptyValue($clone(fv, reflect.Value))) { */ case 4: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 5: + if (first) { + first = false; + } else { + e.Buffer.WriteByte(44); + } + e.string(f.name, opts.escapeHTML); + e.Buffer.WriteByte(58); + opts.quoted = f.quoted; + $r = (x = se.fieldEncs, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))(e, $clone(fv, reflect.Value), $clone(opts, encOpts)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 1; continue; case 2: + e.Buffer.WriteByte(125); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: structEncoder.ptr.prototype.encode }; } $f._i = _i; $f._r$3 = _r$3; $f._ref = _ref; $f.e = e; $f.f = f; $f.first = first; $f.fv = fv; $f.i = i; $f.opts = opts; $f.se = se; $f.v = v; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + structEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newStructEncoder = function(t) { + var _i, _r$3, _r$4, _r$5, _ref, f, fields, i, se, t, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; f = $f.f; fields = $f.fields; i = $f.i; se = $f.se; t = $f.t; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = cachedTypeFields(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + fields = _r$3; + se = new structEncoder.ptr(fields, $makeSlice(sliceType$4, fields.$length)); + _ref = fields; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + i = _i; + f = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), field); + _r$4 = typeByIndex(t, f.index); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = typeEncoder(_r$4); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + (x = se.fieldEncs, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = _r$5)); + _i++; + /* } */ $s = 2; continue; case 3: + $s = -1; return $methodVal(se, "encode"); + /* */ } return; } if ($f === undefined) { $f = { $blk: newStructEncoder }; } $f._i = _i; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f.f = f; $f.fields = fields; $f.i = i; $f.se = se; $f.t = t; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + mapEncoder.ptr.prototype.encode = function(e, v, opts) { + var _arg, _arg$1, _arg$2, _i, _i$1, _r$3, _r$4, _r$5, _ref, _ref$1, e, err, i, i$1, keys, kv, me, opts, sv, v, v$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _i = $f._i; _i$1 = $f._i$1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _ref$1 = $f._ref$1; e = $f.e; err = $f.err; i = $f.i; i$1 = $f.i$1; keys = $f.keys; kv = $f.kv; me = $f.me; opts = $f.opts; sv = $f.sv; v = $f.v; v$1 = $f.v$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sv = [sv]; + me = this; + if ($clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + e.Buffer.WriteByte(123); + _r$3 = $clone(v, reflect.Value).MapKeys(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + keys = _r$3; + sv[0] = $makeSlice(sliceType$5, keys.$length); + _ref = keys; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + i = _i; + v$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i]).v = v$1; + _r$4 = ((i < 0 || i >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i]).resolve(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if (!($interfaceIsEqual(err, $ifaceNil))) { + e.error(new MarshalerError.ptr($clone(v$1, reflect.Value).Type(), err)); + } + _i++; + /* } */ $s = 2; continue; case 3: + $r = sort.Slice(sv[0], (function(sv) { return function(i$1, j) { + var i$1, j; + return ((i$1 < 0 || i$1 >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i$1]).s < ((j < 0 || j >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + j]).s; + }; })(sv)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref$1 = sv[0]; + _i$1 = 0; + /* while (true) { */ case 6: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 7; continue; } + i$1 = _i$1; + kv = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), reflectWithString); + if (i$1 > 0) { + e.Buffer.WriteByte(44); + } + e.string(kv.s, opts.escapeHTML); + e.Buffer.WriteByte(58); + _arg = e; + _r$5 = $clone(v, reflect.Value).MapIndex($clone(kv.v, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _arg$1 = $clone(_r$5, reflect.Value); + _arg$2 = $clone(opts, encOpts); + $r = me.elemEnc(_arg, _arg$1, _arg$2); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$1++; + /* } */ $s = 6; continue; case 7: + e.Buffer.WriteByte(125); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: mapEncoder.ptr.prototype.encode }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._i = _i; $f._i$1 = _i$1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._ref$1 = _ref$1; $f.e = e; $f.err = err; $f.i = i; $f.i$1 = i$1; $f.keys = keys; $f.kv = kv; $f.me = me; $f.opts = opts; $f.sv = sv; $f.v = v; $f.v$1 = v$1; $f.$s = $s; $f.$r = $r; return $f; + }; + mapEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newMapEncoder = function(t) { + var _1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, me, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; me = $f.me; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = t.Key(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = _r$3.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _1 = _r$4; + /* */ if ((_1 === (24)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; } + _r$5 = t.Key(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = _r$5.Implements(textMarshalerType); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + /* */ if (!_r$6) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((_1 === (24)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4: + $s = 6; continue; + /* } else if (!_r$6) { */ case 5: + $s = -1; return unsupportedTypeEncoder; + /* } */ case 6: + case 1: + _r$7 = t.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = typeEncoder(_r$7); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + me = new mapEncoder.ptr(_r$8); + $s = -1; return $methodVal(me, "encode"); + /* */ } return; } if ($f === undefined) { $f = { $blk: newMapEncoder }; } $f._1 = _1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f.me = me; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + encodeByteSlice = function(e, v, param) { + var _r$3, _r$4, _r$5, dst, e, enc, param, s, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; dst = $f.dst; e = $f.e; enc = $f.enc; param = $f.param; s = $f.s; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _r$3 = $clone(v, reflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + s = _r$3; + e.Buffer.WriteByte(34); + /* */ if (s.$length < 1024) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (s.$length < 1024) { */ case 2: + dst = $makeSlice(sliceType$1, base64.StdEncoding.EncodedLen(s.$length)); + base64.StdEncoding.Encode(dst, s); + e.Buffer.Write(dst); + $s = 4; continue; + /* } else { */ case 3: + enc = base64.NewEncoder(base64.StdEncoding, e); + _r$4 = enc.Write(s); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = enc.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 4: + e.Buffer.WriteByte(34); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: encodeByteSlice }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.dst = dst; $f.e = e; $f.enc = enc; $f.param = param; $f.s = s; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + sliceEncoder.ptr.prototype.encode = function(e, v, opts) { + var e, opts, se, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; opts = $f.opts; se = $f.se; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + se = this; + if ($clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + $r = se.arrayEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: sliceEncoder.ptr.prototype.encode }; } $f.e = e; $f.opts = opts; $f.se = se; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + sliceEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newSliceEncoder = function(t) { + var _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, enc, p, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _v = $f._v; enc = $f.enc; p = $f.p; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = t.Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = _r$3.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4 === 8) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$4 === 8) { */ case 1: + _r$5 = t.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = reflect.PtrTo(_r$5); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + p = _r$6; + _r$7 = p.Implements(marshalerType); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + if (!(!_r$7)) { _v = false; $s = 9; continue s; } + _r$8 = p.Implements(textMarshalerType); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _v = !_r$8; case 9: + /* */ if (_v) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_v) { */ case 7: + $s = -1; return encodeByteSlice; + /* } */ case 8: + /* } */ case 2: + _r$9 = newArrayEncoder(t); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + enc = new sliceEncoder.ptr(_r$9); + $s = -1; return $methodVal(enc, "encode"); + /* */ } return; } if ($f === undefined) { $f = { $blk: newSliceEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._v = _v; $f.enc = enc; $f.p = p; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + arrayEncoder.ptr.prototype.encode = function(e, v, opts) { + var _arg, _arg$1, _arg$2, _r$3, ae, e, i, n, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$3 = $f._r$3; ae = $f.ae; e = $f.e; i = $f.i; n = $f.n; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ae = this; + e.Buffer.WriteByte(91); + n = $clone(v, reflect.Value).Len(); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } + if (i > 0) { + e.Buffer.WriteByte(44); + } + _arg = e; + _r$3 = $clone(v, reflect.Value).Index(i); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = $clone(_r$3, reflect.Value); + _arg$2 = $clone(opts, encOpts); + $r = ae.elemEnc(_arg, _arg$1, _arg$2); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + e.Buffer.WriteByte(93); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: arrayEncoder.ptr.prototype.encode }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$3 = _r$3; $f.ae = ae; $f.e = e; $f.i = i; $f.n = n; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + arrayEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newArrayEncoder = function(t) { + var _r$3, _r$4, enc, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; enc = $f.enc; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = typeEncoder(_r$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + enc = new arrayEncoder.ptr(_r$4); + $s = -1; return $methodVal(enc, "encode"); + /* */ } return; } if ($f === undefined) { $f = { $blk: newArrayEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.enc = enc; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + ptrEncoder.ptr.prototype.encode = function(e, v, opts) { + var _arg, _arg$1, _arg$2, _r$3, e, opts, pe, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$3 = $f._r$3; e = $f.e; opts = $f.opts; pe = $f.pe; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pe = this; + if ($clone(v, reflect.Value).IsNil()) { + e.Buffer.WriteString("null"); + $s = -1; return; + } + _arg = e; + _r$3 = $clone(v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = $clone(_r$3, reflect.Value); + _arg$2 = $clone(opts, encOpts); + $r = pe.elemEnc(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: ptrEncoder.ptr.prototype.encode }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$3 = _r$3; $f.e = e; $f.opts = opts; $f.pe = pe; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + ptrEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newPtrEncoder = function(t) { + var _r$3, _r$4, enc, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; enc = $f.enc; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = typeEncoder(_r$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + enc = new ptrEncoder.ptr(_r$4); + $s = -1; return $methodVal(enc, "encode"); + /* */ } return; } if ($f === undefined) { $f = { $blk: newPtrEncoder }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.enc = enc; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + condAddrEncoder.ptr.prototype.encode = function(e, v, opts) { + var ce, e, opts, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; ce = $f.ce; e = $f.e; opts = $f.opts; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ce = this; + /* */ if ($clone(v, reflect.Value).CanAddr()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($clone(v, reflect.Value).CanAddr()) { */ case 1: + $r = ce.canAddrEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 3; continue; + /* } else { */ case 2: + $r = ce.elseEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: condAddrEncoder.ptr.prototype.encode }; } $f.ce = ce; $f.e = e; $f.opts = opts; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + condAddrEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; + newCondAddrEncoder = function(canAddrEnc, elseEnc) { + var canAddrEnc, elseEnc, enc; + enc = new condAddrEncoder.ptr(canAddrEnc, elseEnc); + return $methodVal(enc, "encode"); + }; isValidTag = function(s) { var _i, _ref, _rune, c, s; if (s === "") { @@ -27594,6 +34068,228 @@ $packages["encoding/json"] = (function() { } return true; }; + fieldByIndex = function(v, index) { + var _i, _r$3, _r$4, _ref, i, index, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; i = $f.i; index = $f.index; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = index; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + /* */ if ($clone(v, reflect.Value).Kind() === 22) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($clone(v, reflect.Value).Kind() === 22) { */ case 3: + if ($clone(v, reflect.Value).IsNil()) { + $s = -1; return new reflect.Value.ptr(ptrType$5.nil, 0, 0); + } + _r$3 = $clone(v, reflect.Value).Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + /* } */ case 4: + _r$4 = $clone(v, reflect.Value).Field(i); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + v = _r$4; + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return v; + /* */ } return; } if ($f === undefined) { $f = { $blk: fieldByIndex }; } $f._i = _i; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.i = i; $f.index = index; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + typeByIndex = function(t, index) { + var _i, _r$3, _r$4, _r$5, _ref, i, index, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; i = $f.i; index = $f.index; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = index; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$3 = t.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3 === 22) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r$3 === 22) { */ case 3: + _r$4 = t.Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + t = _r$4; + /* } */ case 4: + _r$5 = t.Field(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + t = _r$5.Type; + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return t; + /* */ } return; } if ($f === undefined) { $f = { $blk: typeByIndex }; } $f._i = _i; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f.i = i; $f.index = index; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + reflectWithString.ptr.prototype.resolve = function() { + var _1, _r$3, _r$4, _r$5, _tuple, _tuple$1, buf, err, ok, tm, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; buf = $f.buf; err = $f.err; ok = $f.ok; tm = $f.tm; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + /* */ if ($clone(w.v, reflect.Value).Kind() === 24) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($clone(w.v, reflect.Value).Kind() === 24) { */ case 1: + _r$3 = $clone(w.v, reflect.Value).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + w.s = _r$3; + $s = -1; return $ifaceNil; + /* } */ case 2: + _r$4 = $clone(w.v, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = $assertType(_r$4, encoding.TextMarshaler, true); + tm = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (ok) { */ case 5: + _r$5 = tm.MarshalText(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + buf = _tuple$1[0]; + err = _tuple$1[1]; + w.s = ($bytesToString(buf)); + $s = -1; return err; + /* } */ case 6: + _1 = $clone(w.v, reflect.Value).Kind(); + if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { + w.s = strconv.FormatInt($clone(w.v, reflect.Value).Int(), 10); + $s = -1; return $ifaceNil; + } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { + w.s = strconv.FormatUint($clone(w.v, reflect.Value).Uint(), 10); + $s = -1; return $ifaceNil; + } + $panic(new $String("unexpected map key type")); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: reflectWithString.ptr.prototype.resolve }; } $f._1 = _1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.buf = buf; $f.err = err; $f.ok = ok; $f.tm = tm; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + reflectWithString.prototype.resolve = function() { return this.$val.resolve(); }; + encodeState.ptr.prototype.string = function(s, escapeHTML) { + var _1, _tuple, b, c, e, escapeHTML, i, s, size, start; + e = this; + e.Buffer.WriteByte(34); + start = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + b = s.charCodeAt(i); + if (b < 128) { + if (((b < 0 || b >= htmlSafeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : htmlSafeSet[b]) || (!escapeHTML && ((b < 0 || b >= safeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : safeSet[b]))) { + i = i + (1) >> 0; + continue; + } + if (start < i) { + e.Buffer.WriteString($substring(s, start, i)); + } + _1 = b; + if ((_1 === (92)) || (_1 === (34))) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(b); + } else if (_1 === (10)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(110); + } else if (_1 === (13)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(114); + } else if (_1 === (9)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(116); + } else { + e.Buffer.WriteString("\\u00"); + e.Buffer.WriteByte(hex.charCodeAt((b >>> 4 << 24 >>> 24))); + e.Buffer.WriteByte(hex.charCodeAt(((b & 15) >>> 0))); + } + i = i + (1) >> 0; + start = i; + continue; + } + _tuple = utf8.DecodeRuneInString($substring(s, i)); + c = _tuple[0]; + size = _tuple[1]; + if ((c === 65533) && (size === 1)) { + if (start < i) { + e.Buffer.WriteString($substring(s, start, i)); + } + e.Buffer.WriteString("\\ufffd"); + i = i + (size) >> 0; + start = i; + continue; + } + if ((c === 8232) || (c === 8233)) { + if (start < i) { + e.Buffer.WriteString($substring(s, start, i)); + } + e.Buffer.WriteString("\\u202"); + e.Buffer.WriteByte(hex.charCodeAt((c & 15))); + i = i + (size) >> 0; + start = i; + continue; + } + i = i + (size) >> 0; + } + if (start < s.length) { + e.Buffer.WriteString($substring(s, start)); + } + e.Buffer.WriteByte(34); + }; + encodeState.prototype.string = function(s, escapeHTML) { return this.$val.string(s, escapeHTML); }; + encodeState.ptr.prototype.stringBytes = function(s, escapeHTML) { + var _1, _tuple, b, c, e, escapeHTML, i, s, size, start; + e = this; + e.Buffer.WriteByte(34); + start = 0; + i = 0; + while (true) { + if (!(i < s.$length)) { break; } + b = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); + if (b < 128) { + if (((b < 0 || b >= htmlSafeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : htmlSafeSet[b]) || (!escapeHTML && ((b < 0 || b >= safeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : safeSet[b]))) { + i = i + (1) >> 0; + continue; + } + if (start < i) { + e.Buffer.Write($subslice(s, start, i)); + } + _1 = b; + if ((_1 === (92)) || (_1 === (34))) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(b); + } else if (_1 === (10)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(110); + } else if (_1 === (13)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(114); + } else if (_1 === (9)) { + e.Buffer.WriteByte(92); + e.Buffer.WriteByte(116); + } else { + e.Buffer.WriteString("\\u00"); + e.Buffer.WriteByte(hex.charCodeAt((b >>> 4 << 24 >>> 24))); + e.Buffer.WriteByte(hex.charCodeAt(((b & 15) >>> 0))); + } + i = i + (1) >> 0; + start = i; + continue; + } + _tuple = utf8.DecodeRune($subslice(s, i)); + c = _tuple[0]; + size = _tuple[1]; + if ((c === 65533) && (size === 1)) { + if (start < i) { + e.Buffer.Write($subslice(s, start, i)); + } + e.Buffer.WriteString("\\ufffd"); + i = i + (size) >> 0; + start = i; + continue; + } + if ((c === 8232) || (c === 8233)) { + if (start < i) { + e.Buffer.Write($subslice(s, start, i)); + } + e.Buffer.WriteString("\\u202"); + e.Buffer.WriteByte(hex.charCodeAt((c & 15))); + i = i + (size) >> 0; + start = i; + continue; + } + i = i + (size) >> 0; + } + if (start < s.$length) { + e.Buffer.Write($subslice(s, start)); + } + e.Buffer.WriteByte(34); + }; + encodeState.prototype.stringBytes = function(s, escapeHTML) { return this.$val.stringBytes(s, escapeHTML); }; fillField = function(f) { var f; f.nameBytes = (new sliceType$1($stringToBytes(f.name))); @@ -27965,6 +34661,142 @@ $packages["encoding/json"] = (function() { } return true; }; + compact = function(dst, src, escape) { + var _i, _r$3, _r$4, _ref, c, dst, escape, i, origLen, scan, src, start, v, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; c = $f.c; dst = $f.dst; escape = $f.escape; i = $f.i; origLen = $f.origLen; scan = $f.scan; src = $f.src; start = $f.start; v = $f.v; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + scan = [scan]; + origLen = dst.Len(); + scan[0] = new scanner.ptr($throwNilPointerError, false, sliceType$2.nil, $ifaceNil, new $Int64(0, 0)); + scan[0].reset(); + start = 0; + _ref = src; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (escape && ((c === 60) || (c === 62) || (c === 38))) { + if (start < i) { + dst.Write($subslice(src, start, i)); + } + dst.WriteString("\\u00"); + dst.WriteByte(hex.charCodeAt((c >>> 4 << 24 >>> 24))); + dst.WriteByte(hex.charCodeAt(((c & 15) >>> 0))); + start = i + 1 >> 0; + } + if ((c === 226) && (i + 2 >> 0) < src.$length && ((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) === 128) && ((((x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) & ~1) << 24 >>> 24) === 168)) { + if (start < i) { + dst.Write($subslice(src, start, i)); + } + dst.WriteString("\\u202"); + dst.WriteByte(hex.charCodeAt((((x$2 = i + 2 >> 0, ((x$2 < 0 || x$2 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$2])) & 15) >>> 0))); + start = i + 3 >> 0; + } + _r$3 = scan[0].step(scan[0], c); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + if (v >= 9) { + if (v === 11) { + /* break; */ $s = 2; continue; + } + if (start < i) { + dst.Write($subslice(src, start, i)); + } + start = i + 1 >> 0; + } + _i++; + /* } */ $s = 1; continue; case 2: + _r$4 = scan[0].eof(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4 === 11) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$4 === 11) { */ case 4: + dst.Truncate(origLen); + $s = -1; return scan[0].err; + /* } */ case 5: + if (start < src.$length) { + dst.Write($subslice(src, start)); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: compact }; } $f._i = _i; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.c = c; $f.dst = dst; $f.escape = escape; $f.i = i; $f.origLen = origLen; $f.scan = scan; $f.src = src; $f.start = start; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + newline = function(dst, prefix, indent, depth) { + var depth, dst, i, indent, prefix; + dst.WriteByte(10); + dst.WriteString(prefix); + i = 0; + while (true) { + if (!(i < depth)) { break; } + dst.WriteString(indent); + i = i + (1) >> 0; + } + }; + Indent = function(dst, src, prefix, indent) { + var _1, _i, _r$3, _r$4, _ref, c, depth, dst, indent, needIndent, origLen, prefix, scan, src, v, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; c = $f.c; depth = $f.depth; dst = $f.dst; indent = $f.indent; needIndent = $f.needIndent; origLen = $f.origLen; prefix = $f.prefix; scan = $f.scan; src = $f.src; v = $f.v; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + scan = [scan]; + origLen = dst.Len(); + scan[0] = new scanner.ptr($throwNilPointerError, false, sliceType$2.nil, $ifaceNil, new $Int64(0, 0)); + scan[0].reset(); + needIndent = false; + depth = 0; + _ref = src; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + scan[0].bytes = (x = scan[0].bytes, x$1 = new $Int64(0, 1), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + _r$3 = scan[0].step(scan[0], c); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + if (v === 9) { + _i++; + /* continue; */ $s = 1; continue; + } + if (v === 11) { + /* break; */ $s = 2; continue; + } + if (needIndent && !((v === 5)) && !((v === 8))) { + needIndent = false; + depth = depth + (1) >> 0; + newline(dst, prefix, indent, depth); + } + if (v === 0) { + dst.WriteByte(c); + _i++; + /* continue; */ $s = 1; continue; + } + _1 = c; + if ((_1 === (123)) || (_1 === (91))) { + needIndent = true; + dst.WriteByte(c); + } else if (_1 === (44)) { + dst.WriteByte(c); + newline(dst, prefix, indent, depth); + } else if (_1 === (58)) { + dst.WriteByte(c); + dst.WriteByte(32); + } else if ((_1 === (125)) || (_1 === (93))) { + if (needIndent) { + needIndent = false; + } else { + depth = depth - (1) >> 0; + newline(dst, prefix, indent, depth); + } + dst.WriteByte(c); + } else { + dst.WriteByte(c); + } + _i++; + /* } */ $s = 1; continue; case 2: + _r$4 = scan[0].eof(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4 === 11) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$4 === 11) { */ case 4: + dst.Truncate(origLen); + $s = -1; return scan[0].err; + /* } */ case 5: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Indent }; } $f._1 = _1; $f._i = _i; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.c = c; $f.depth = depth; $f.dst = dst; $f.indent = indent; $f.needIndent = needIndent; $f.origLen = origLen; $f.prefix = prefix; $f.scan = scan; $f.src = src; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Indent = Indent; SyntaxError.ptr.prototype.Error = function() { var e; e = this; @@ -28542,6 +35374,65 @@ $packages["encoding/json"] = (function() { } return false; }; + NewEncoder = function(w) { + var w; + return new Encoder.ptr(w, $ifaceNil, true, ptrType$8.nil, "", ""); + }; + $pkg.NewEncoder = NewEncoder; + Encoder.ptr.prototype.Encode = function(v) { + var _r$3, _r$4, _r$5, _r$6, _tuple, b, e, enc, err, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; b = $f.b; e = $f.e; enc = $f.enc; err = $f.err; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + enc = this; + if (!($interfaceIsEqual(enc.err, $ifaceNil))) { + $s = -1; return enc.err; + } + _r$3 = newEncodeState(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + e = _r$3; + _r$4 = e.marshal(v, new encOpts.ptr(false, enc.escapeHTML)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + e.Buffer.WriteByte(10); + b = e.Buffer.Bytes(); + /* */ if (!(enc.indentPrefix === "") || !(enc.indentValue === "")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(enc.indentPrefix === "") || !(enc.indentValue === "")) { */ case 3: + if (enc.indentBuf === ptrType$8.nil) { + enc.indentBuf = new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + } + enc.indentBuf.Reset(); + _r$5 = Indent(enc.indentBuf, b, enc.indentPrefix, enc.indentValue); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + b = enc.indentBuf.Bytes(); + /* } */ case 4: + _r$6 = enc.w.Write(b); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple = _r$6; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + enc.err = err; + } + encodeStatePool.Put(e); + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Encoder.ptr.prototype.Encode }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f.b = b; $f.e = e; $f.enc = enc; $f.err = err; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Encoder.prototype.Encode = function(v) { return this.$val.Encode(v); }; + Encoder.ptr.prototype.SetIndent = function(prefix, indent) { + var enc, indent, prefix; + enc = this; + enc.indentPrefix = prefix; + enc.indentValue = indent; + }; + Encoder.prototype.SetIndent = function(prefix, indent) { return this.$val.SetIndent(prefix, indent); }; + Encoder.ptr.prototype.SetEscapeHTML = function(on) { + var enc, on; + enc = this; + enc.escapeHTML = on; + }; + Encoder.prototype.SetEscapeHTML = function(on) { return this.$val.SetEscapeHTML(on); }; Decoder.ptr.prototype.tokenPrepareForDecode = function() { var _1, _r$3, _r$4, _tuple, _tuple$1, c, c$1, dec, err, err$1, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; c$1 = $f.c$1; dec = $f.dec; err = $f.err; err$1 = $f.err$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -28836,10 +35727,23 @@ $packages["encoding/json"] = (function() { ptrType$12.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; Number.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64, $error], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64, $error], false)}]; ptrType$13.methods = [{prop: "unmarshal", name: "unmarshal", pkg: "encoding/json", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "readIndex", name: "readIndex", pkg: "encoding/json", typ: $funcType([], [$Int], false)}, {prop: "init", name: "init", pkg: "encoding/json", typ: $funcType([sliceType$1], [ptrType$13], false)}, {prop: "saveError", name: "saveError", pkg: "encoding/json", typ: $funcType([$error], [], false)}, {prop: "addErrorContext", name: "addErrorContext", pkg: "encoding/json", typ: $funcType([$error], [$error], false)}, {prop: "skip", name: "skip", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "scanNext", name: "scanNext", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "scanWhile", name: "scanWhile", pkg: "encoding/json", typ: $funcType([$Int], [], false)}, {prop: "value", name: "value", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "valueQuoted", name: "valueQuoted", pkg: "encoding/json", typ: $funcType([], [$emptyInterface, $error], false)}, {prop: "array", name: "array", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "object", name: "object", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "convertNumber", name: "convertNumber", pkg: "encoding/json", typ: $funcType([$String], [$emptyInterface, $error], false)}, {prop: "literalStore", name: "literalStore", pkg: "encoding/json", typ: $funcType([sliceType$1, reflect.Value, $Bool], [$error], false)}, {prop: "valueInterface", name: "valueInterface", pkg: "encoding/json", typ: $funcType([], [$emptyInterface, $error], false)}, {prop: "arrayInterface", name: "arrayInterface", pkg: "encoding/json", typ: $funcType([], [sliceType, $error], false)}, {prop: "objectInterface", name: "objectInterface", pkg: "encoding/json", typ: $funcType([], [mapType, $error], false)}, {prop: "literalInterface", name: "literalInterface", pkg: "encoding/json", typ: $funcType([], [$emptyInterface, $error], false)}]; + ptrType$14.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$15.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$17.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$7.methods = [{prop: "marshal", name: "marshal", pkg: "encoding/json", typ: $funcType([$emptyInterface, encOpts], [$error], false)}, {prop: "error", name: "error", pkg: "encoding/json", typ: $funcType([$error], [], false)}, {prop: "reflectValue", name: "reflectValue", pkg: "encoding/json", typ: $funcType([reflect.Value, encOpts], [], false)}, {prop: "string", name: "string", pkg: "encoding/json", typ: $funcType([$String, $Bool], [], false)}, {prop: "stringBytes", name: "stringBytes", pkg: "encoding/json", typ: $funcType([sliceType$1, $Bool], [], false)}]; + floatEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$18.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$19.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$20.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$21.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$22.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$23.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$7, reflect.Value, encOpts], [], false)}]; + ptrType$24.methods = [{prop: "resolve", name: "resolve", pkg: "encoding/json", typ: $funcType([], [$error], false)}]; byIndex.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; ptrType$25.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; ptrType$26.methods = [{prop: "reset", name: "reset", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "eof", name: "eof", pkg: "encoding/json", typ: $funcType([], [$Int], false)}, {prop: "pushParseState", name: "pushParseState", pkg: "encoding/json", typ: $funcType([$Int], [], false)}, {prop: "popParseState", name: "popParseState", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "error", name: "error", pkg: "encoding/json", typ: $funcType([$Uint8, $String], [$Int], false)}]; ptrType$27.methods = [{prop: "UseNumber", name: "UseNumber", pkg: "", typ: $funcType([], [], false)}, {prop: "DisallowUnknownFields", name: "DisallowUnknownFields", pkg: "", typ: $funcType([], [], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [io.Reader], false)}, {prop: "readValue", name: "readValue", pkg: "encoding/json", typ: $funcType([], [$Int, $error], false)}, {prop: "refill", name: "refill", pkg: "encoding/json", typ: $funcType([], [$error], false)}, {prop: "tokenPrepareForDecode", name: "tokenPrepareForDecode", pkg: "encoding/json", typ: $funcType([], [$error], false)}, {prop: "tokenValueAllowed", name: "tokenValueAllowed", pkg: "encoding/json", typ: $funcType([], [$Bool], false)}, {prop: "tokenValueEnd", name: "tokenValueEnd", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "tokenError", name: "tokenError", pkg: "encoding/json", typ: $funcType([$Uint8], [Token, $error], false)}, {prop: "More", name: "More", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "encoding/json", typ: $funcType([], [$Uint8, $error], false)}, {prop: "offset", name: "offset", pkg: "encoding/json", typ: $funcType([], [$Int64], false)}]; + ptrType$28.methods = [{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "SetIndent", name: "SetIndent", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "SetEscapeHTML", name: "SetEscapeHTML", pkg: "", typ: $funcType([$Bool], [], false)}]; Delim.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; tagOptions.methods = [{prop: "Contains", name: "Contains", pkg: "", typ: $funcType([$String], [$Bool], false)}]; Unmarshaler.init([{prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$1], [$error], false)}]); @@ -28848,11 +35752,26 @@ $packages["encoding/json"] = (function() { decodeState.init("encoding/json", [{prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "opcode", name: "opcode", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scan", name: "scan", embedded: false, exported: false, typ: scanner, tag: ""}, {prop: "errorContext", name: "errorContext", embedded: false, exported: false, typ: structType, tag: ""}, {prop: "savedError", name: "savedError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "useNumber", name: "useNumber", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "disallowUnknownFields", name: "disallowUnknownFields", embedded: false, exported: false, typ: $Bool, tag: ""}]); unquotedValue.init("", []); Marshaler.init([{prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}]); + UnsupportedTypeError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}]); + UnsupportedValueError.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: reflect.Value, tag: ""}, {prop: "Str", name: "Str", embedded: false, exported: true, typ: $String, tag: ""}]); + MarshalerError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + encodeState.init("encoding/json", [{prop: "Buffer", name: "Buffer", embedded: true, exported: true, typ: bytes.Buffer, tag: ""}, {prop: "scratch", name: "scratch", embedded: false, exported: false, typ: arrayType, tag: ""}]); + jsonError.init("encoding/json", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); + encOpts.init("encoding/json", [{prop: "quoted", name: "quoted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "escapeHTML", name: "escapeHTML", embedded: false, exported: false, typ: $Bool, tag: ""}]); + encoderFunc.init([ptrType$7, reflect.Value, encOpts], [], false); + structEncoder.init("encoding/json", [{prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "fieldEncs", name: "fieldEncs", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + mapEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); + sliceEncoder.init("encoding/json", [{prop: "arrayEnc", name: "arrayEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); + arrayEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); + ptrEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); + condAddrEncoder.init("encoding/json", [{prop: "canAddrEnc", name: "canAddrEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}, {prop: "elseEnc", name: "elseEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); + reflectWithString.init("encoding/json", [{prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]); field.init("encoding/json", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "nameBytes", name: "nameBytes", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "equalFold", name: "equalFold", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "omitEmpty", name: "omitEmpty", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "quoted", name: "quoted", embedded: false, exported: false, typ: $Bool, tag: ""}]); byIndex.init(field); SyntaxError.init("encoding/json", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int64, tag: ""}]); scanner.init("encoding/json", [{prop: "step", name: "step", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "endTop", name: "endTop", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "parseState", name: "parseState", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}]); Decoder.init("encoding/json", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "d", name: "d", embedded: false, exported: false, typ: decodeState, tag: ""}, {prop: "scanp", name: "scanp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scanned", name: "scanned", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "scan", name: "scan", embedded: false, exported: false, typ: scanner, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "tokenState", name: "tokenState", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tokenStack", name: "tokenStack", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); + Encoder.init("encoding/json", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "escapeHTML", name: "escapeHTML", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "indentBuf", name: "indentBuf", embedded: false, exported: false, typ: ptrType$8, tag: ""}, {prop: "indentPrefix", name: "indentPrefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "indentValue", name: "indentValue", embedded: false, exported: false, typ: $String, tag: ""}]); Token.init([]); $init = function() { $pkg.$init = function() {}; @@ -28872,16 +35791,23 @@ $packages["encoding/json"] = (function() { $r = unicode.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } $r = utf16.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } $r = utf8.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + encodeStatePool = new nosync.Pool.ptr(sliceType.nil, $throwNilPointerError); + encoderCache = new nosync.Map.ptr(false); fieldCache = new nosync.Map.ptr(false); errPhase = errors.New("JSON decoder out of sync - data changing underfoot?"); nullLiteral = (new sliceType$1($stringToBytes("null"))); _r = reflect.TypeOf($newDataPointer($ifaceNil, ptrType)).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } textUnmarshalerType = _r; numberType = reflect.TypeOf(new Number("")); + hex = "0123456789abcdef"; _r$1 = reflect.TypeOf($newDataPointer($ifaceNil, ptrType$1)).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } marshalerType = _r$1; _r$2 = reflect.TypeOf($newDataPointer($ifaceNil, ptrType$2)).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } textMarshalerType = _r$2; + float32Encoder = $methodVal(new floatEncoder(32), "encode"); + float64Encoder = $methodVal(new floatEncoder(64), "encode"); + safeSet = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]); + htmlSafeSet = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]); /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; }; $pkg.$init = $init; @@ -28902,15 +35828,19 @@ $packages["github.com/divan/graphx/graph"] = (function() { this.links = links_; this.nodeLinks = nodeLinks_; }); - Link = $pkg.Link = $newType(0, $kindStruct, "graph.Link", true, "github.com/divan/graphx/graph", true, function(from_, to_) { + Link = $pkg.Link = $newType(0, $kindStruct, "graph.Link", true, "github.com/divan/graphx/graph", true, function(from_, to_, fromIdx_, toIdx_) { this.$val = this; if (arguments.length === 0) { this.from = ""; this.to = ""; + this.fromIdx = 0; + this.toIdx = 0; return; } this.from = from_; this.to = to_; + this.fromIdx = fromIdx_; + this.toIdx = toIdx_; }); Node = $pkg.Node = $newType(8, $kindInterface, "graph.Node", true, "github.com/divan/graphx/graph", true, null); BasicNode = $pkg.BasicNode = $newType(0, $kindStruct, "graph.BasicNode", true, "github.com/divan/graphx/graph", true, function(ID__, Group__, Weight__) { @@ -28998,6 +35928,46 @@ $packages["github.com/divan/graphx/graph"] = (function() { return false; }; Graph.prototype.LinkExists = function(from, to) { return this.$val.LinkExists(from, to); }; + Graph.ptr.prototype.LinkIndex = function(from, to) { + var _i, _r, _ref, from, g, i, link, to, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; from = $f.from; g = $f.g; i = $f.i; link = $f.link; to = $f.to; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + _ref = g.links; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + link = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (link.from === from && link.to === to || link.to === from && link.from === to) { + $s = -1; return [i, $ifaceNil]; + } + _i++; + } + _r = fmt.Errorf("link %s->%s not found", new sliceType$2([new $String(from), new $String(to)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [0, _r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Graph.ptr.prototype.LinkIndex }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.from = from; $f.g = g; $f.i = i; $f.link = link; $f.to = to; $f.$s = $s; $f.$r = $r; return $f; + }; + Graph.prototype.LinkIndex = function(from, to) { return this.$val.LinkIndex(from, to); }; + Graph.ptr.prototype.LinkByIndices = function(from, to) { + var _i, _r, _ref, from, g, i, link, to, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; from = $f.from; g = $f.g; i = $f.i; link = $f.link; to = $f.to; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + _ref = g.links; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + link = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((link.fromIdx === from) && (link.toIdx === to) || (link.toIdx === from) && (link.fromIdx === to)) { + $s = -1; return [i, $ifaceNil]; + } + _i++; + } + _r = fmt.Errorf("link %d->%d not found", new sliceType$2([new $Int(from), new $Int(to)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [0, _r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Graph.ptr.prototype.LinkByIndices }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.from = from; $f.g = g; $f.i = i; $f.link = link; $f.to = to; $f.$s = $s; $f.$r = $r; return $f; + }; + Graph.prototype.LinkByIndices = function(from, to) { return this.$val.LinkByIndices(from, to); }; Graph.ptr.prototype.NodeByID = function(id) { var _i, _r, _r$1, _ref, g, i, id, node, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; g = $f.g; i = $f.i; id = $f.id; node = $f.node; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -29038,15 +36008,32 @@ $packages["github.com/divan/graphx/graph"] = (function() { Graph.prototype.NodeIDByIdx = function(idx) { return this.$val.NodeIDByIdx(idx); }; NewLink = function(from, to) { var from, to; - return new Link.ptr(from, to); + return new Link.ptr(from, to, 0, 0); }; $pkg.NewLink = NewLink; Graph.ptr.prototype.AddLink = function(from, to) { - var from, g, link, to; + var _r, _r$1, _tuple, _tuple$1, err, from, g, link, to, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; from = $f.from; g = $f.g; link = $f.link; to = $f.to; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: g = this; link = NewLink(from, to); + err = $ifaceNil; + _r = g.NodeByID(from); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + link.fromIdx = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$1 = g.NodeByID(to); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + link.toIdx = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } g.links = $append(g.links, link); - return $ifaceNil; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Graph.ptr.prototype.AddLink }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.from = from; $f.g = g; $f.link = link; $f.to = to; $f.$s = $s; $f.$r = $r; return $f; }; Graph.prototype.AddLink = function(from, to) { return this.$val.AddLink(from, to); }; Link.ptr.prototype.From = function() { @@ -29061,6 +36048,18 @@ $packages["github.com/divan/graphx/graph"] = (function() { return l.to; }; Link.prototype.To = function() { return this.$val.To(); }; + Link.ptr.prototype.FromIdx = function() { + var l; + l = this; + return l.fromIdx; + }; + Link.prototype.FromIdx = function() { return this.$val.FromIdx(); }; + Link.ptr.prototype.ToIdx = function() { + var l; + l = this; + return l.toIdx; + }; + Link.prototype.ToIdx = function() { return this.$val.ToIdx(); }; Link.ptr.prototype.Rewire = function(from, to) { var from, l, to; l = this; @@ -29098,11 +36097,11 @@ $packages["github.com/divan/graphx/graph"] = (function() { return b.Weight_; }; BasicNode.prototype.Weight = function() { return this.$val.Weight(); }; - ptrType$1.methods = [{prop: "Nodes", name: "Nodes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Links", name: "Links", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "UpdateCache", name: "UpdateCache", pkg: "", typ: $funcType([], [], false)}, {prop: "NodeHasLinks", name: "NodeHasLinks", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "NodeLinks", name: "NodeLinks", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "NodeIDHasLinks", name: "NodeIDHasLinks", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "LinkExists", name: "LinkExists", pkg: "", typ: $funcType([$String, $String], [$Bool], false)}, {prop: "NodeByID", name: "NodeByID", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "NodeIDByIdx", name: "NodeIDByIdx", pkg: "", typ: $funcType([$Int], [$String, $error], false)}, {prop: "AddLink", name: "AddLink", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "AddNode", name: "AddNode", pkg: "", typ: $funcType([Node], [], false)}, {prop: "AddNodes", name: "AddNodes", pkg: "", typ: $funcType([sliceType], [], true)}]; - ptrType.methods = [{prop: "From", name: "From", pkg: "", typ: $funcType([], [$String], false)}, {prop: "To", name: "To", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Rewire", name: "Rewire", pkg: "", typ: $funcType([$String, $String], [], false)}]; + ptrType$1.methods = [{prop: "Nodes", name: "Nodes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Links", name: "Links", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "UpdateCache", name: "UpdateCache", pkg: "", typ: $funcType([], [], false)}, {prop: "NodeHasLinks", name: "NodeHasLinks", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "NodeLinks", name: "NodeLinks", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "NodeIDHasLinks", name: "NodeIDHasLinks", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "LinkExists", name: "LinkExists", pkg: "", typ: $funcType([$String, $String], [$Bool], false)}, {prop: "LinkIndex", name: "LinkIndex", pkg: "", typ: $funcType([$String, $String], [$Int, $error], false)}, {prop: "LinkByIndices", name: "LinkByIndices", pkg: "", typ: $funcType([$Int, $Int], [$Int, $error], false)}, {prop: "NodeByID", name: "NodeByID", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "NodeIDByIdx", name: "NodeIDByIdx", pkg: "", typ: $funcType([$Int], [$String, $error], false)}, {prop: "AddLink", name: "AddLink", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "AddNode", name: "AddNode", pkg: "", typ: $funcType([Node], [], false)}, {prop: "AddNodes", name: "AddNodes", pkg: "", typ: $funcType([sliceType], [], true)}]; + ptrType.methods = [{prop: "From", name: "From", pkg: "", typ: $funcType([], [$String], false)}, {prop: "To", name: "To", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FromIdx", name: "FromIdx", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ToIdx", name: "ToIdx", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Rewire", name: "Rewire", pkg: "", typ: $funcType([$String, $String], [], false)}]; ptrType$2.methods = [{prop: "ID", name: "ID", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Group", name: "Group", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weight", name: "Weight", pkg: "", typ: $funcType([], [$Int], false)}]; Graph.init("github.com/divan/graphx/graph", [{prop: "nodes", name: "nodes", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "links", name: "links", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "nodeLinks", name: "nodeLinks", embedded: false, exported: false, typ: mapType, tag: ""}]); - Link.init("github.com/divan/graphx/graph", [{prop: "from", name: "from", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "to", name: "to", embedded: false, exported: false, typ: $String, tag: ""}]); + Link.init("github.com/divan/graphx/graph", [{prop: "from", name: "from", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "to", name: "to", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "fromIdx", name: "fromIdx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "toIdx", name: "toIdx", embedded: false, exported: false, typ: $Int, tag: ""}]); Node.init([{prop: "ID", name: "ID", pkg: "", typ: $funcType([], [$String], false)}]); BasicNode.init("", [{prop: "ID_", name: "ID_", embedded: false, exported: true, typ: $String, tag: "json:\"id\""}, {prop: "Group_", name: "Group_", embedded: false, exported: true, typ: $Int, tag: "json:\"group,omitempty\""}, {prop: "Weight_", name: "Weight_", embedded: false, exported: true, typ: $Int, tag: "json:\"weight,omitempty\""}]); $init = function() { @@ -29115,7 +36114,7 @@ $packages["github.com/divan/graphx/graph"] = (function() { return $pkg; })(); $packages["log"] = (function() { - var $pkg = {}, $init, fmt, nosync, io, os, runtime, time, Logger, sliceType, arrayType, ptrType, sliceType$1, ptrType$1, std, New, itoa, Println; + var $pkg = {}, $init, fmt, nosync, io, os, runtime, time, Logger, sliceType, arrayType, ptrType, sliceType$1, ptrType$1, std, New, itoa, Printf, Println, Fatalf; fmt = $packages["fmt"]; nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; io = $packages["io"]; @@ -29431,6 +36430,17 @@ $packages["log"] = (function() { /* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); } }; Logger.prototype.SetPrefix = function(prefix) { return this.$val.SetPrefix(prefix); }; + Printf = function(format, v) { + var _arg, _r, _r$1, format, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; format = $f.format; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _arg = _r; + _r$1 = std.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Printf }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f.format = format; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Printf = Printf; Println = function(v) { var _arg, _r, _r$1, v, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -29442,6 +36452,18 @@ $packages["log"] = (function() { /* */ } return; } if ($f === undefined) { $f = { $blk: Println }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.Println = Println; + Fatalf = function(format, v) { + var _arg, _r, _r$1, format, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; format = $f.format; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _arg = _r; + _r$1 = std.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + os.Exit(1); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Fatalf }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f.format = format; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Fatalf = Fatalf; ptrType$1.methods = [{prop: "SetOutput", name: "SetOutput", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "formatHeader", name: "formatHeader", pkg: "log", typ: $funcType([ptrType, time.Time, $String, $Int], [], false)}, {prop: "Output", name: "Output", pkg: "", typ: $funcType([$Int, $String], [$error], false)}, {prop: "Printf", name: "Printf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Print", name: "Print", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Println", name: "Println", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Fatal", name: "Fatal", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Fatalf", name: "Fatalf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Fatalln", name: "Fatalln", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Panic", name: "Panic", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Panicf", name: "Panicf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Panicln", name: "Panicln", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Flags", name: "Flags", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "SetFlags", name: "SetFlags", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Prefix", name: "Prefix", pkg: "", typ: $funcType([], [$String], false)}, {prop: "SetPrefix", name: "SetPrefix", pkg: "", typ: $funcType([$String], [], false)}]; Logger.init("log", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: nosync.Mutex, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "flag", name: "flag", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}]); $init = function() { @@ -30645,13 +37667,162 @@ $packages["github.com/divan/graphx/layout"] = (function() { return $pkg; })(); $packages["path/filepath"] = (function() { - var $pkg = {}, $init, errors, os, runtime, sort, strings, utf8; + var $pkg = {}, $init, errors, os, runtime, sort, strings, utf8, lazybuf, sliceType$1, ptrType$1, Clean, FromSlash, Join, volumeNameLen, join; errors = $packages["errors"]; os = $packages["os"]; runtime = $packages["runtime"]; sort = $packages["sort"]; strings = $packages["strings"]; utf8 = $packages["unicode/utf8"]; + lazybuf = $pkg.lazybuf = $newType(0, $kindStruct, "filepath.lazybuf", true, "path/filepath", false, function(path_, buf_, w_, volAndPath_, volLen_) { + this.$val = this; + if (arguments.length === 0) { + this.path = ""; + this.buf = sliceType$1.nil; + this.w = 0; + this.volAndPath = ""; + this.volLen = 0; + return; + } + this.path = path_; + this.buf = buf_; + this.w = w_; + this.volAndPath = volAndPath_; + this.volLen = volLen_; + }); + sliceType$1 = $sliceType($Uint8); + ptrType$1 = $ptrType(lazybuf); + lazybuf.ptr.prototype.index = function(i) { + var b, i, x; + b = this; + if (!(b.buf === sliceType$1.nil)) { + return (x = b.buf, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); + } + return b.path.charCodeAt(i); + }; + lazybuf.prototype.index = function(i) { return this.$val.index(i); }; + lazybuf.ptr.prototype.append = function(c) { + var b, c, x, x$1; + b = this; + if (b.buf === sliceType$1.nil) { + if (b.w < b.path.length && (b.path.charCodeAt(b.w) === c)) { + b.w = b.w + (1) >> 0; + return; + } + b.buf = $makeSlice(sliceType$1, b.path.length); + $copyString(b.buf, $substring(b.path, 0, b.w)); + } + (x = b.buf, x$1 = b.w, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); + b.w = b.w + (1) >> 0; + }; + lazybuf.prototype.append = function(c) { return this.$val.append(c); }; + lazybuf.ptr.prototype.string = function() { + var b; + b = this; + if (b.buf === sliceType$1.nil) { + return $substring(b.volAndPath, 0, (b.volLen + b.w >> 0)); + } + return $substring(b.volAndPath, 0, b.volLen) + ($bytesToString($subslice(b.buf, 0, b.w))); + }; + lazybuf.prototype.string = function() { return this.$val.string(); }; + Clean = function(path) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, dotdot, n, originalPath, out, path, r, rooted, volLen; + originalPath = path; + volLen = volumeNameLen(path); + path = $substring(path, volLen); + if (path === "") { + if (volLen > 1 && !((originalPath.charCodeAt(1) === 58))) { + return FromSlash(originalPath); + } + return originalPath + "."; + } + rooted = os.IsPathSeparator(path.charCodeAt(0)); + n = path.length; + out = new lazybuf.ptr(path, sliceType$1.nil, 0, originalPath, volLen); + _tmp = 0; + _tmp$1 = 0; + r = _tmp; + dotdot = _tmp$1; + if (rooted) { + out.append(47); + _tmp$2 = 1; + _tmp$3 = 1; + r = _tmp$2; + dotdot = _tmp$3; + } + while (true) { + if (!(r < n)) { break; } + if (os.IsPathSeparator(path.charCodeAt(r))) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (((r + 1 >> 0) === n) || os.IsPathSeparator(path.charCodeAt((r + 1 >> 0))))) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (path.charCodeAt((r + 1 >> 0)) === 46) && (((r + 2 >> 0) === n) || os.IsPathSeparator(path.charCodeAt((r + 2 >> 0))))) { + r = r + (2) >> 0; + if (out.w > dotdot) { + out.w = out.w - (1) >> 0; + while (true) { + if (!(out.w > dotdot && !os.IsPathSeparator(out.index(out.w)))) { break; } + out.w = out.w - (1) >> 0; + } + } else if (!rooted) { + if (out.w > 0) { + out.append(47); + } + out.append(46); + out.append(46); + dotdot = out.w; + } + } else { + if (rooted && !((out.w === 1)) || !rooted && !((out.w === 0))) { + out.append(47); + } + while (true) { + if (!(r < n && !os.IsPathSeparator(path.charCodeAt(r)))) { break; } + out.append(path.charCodeAt(r)); + r = r + (1) >> 0; + } + } + } + if (out.w === 0) { + out.append(46); + } + return FromSlash(out.string()); + }; + $pkg.Clean = Clean; + FromSlash = function(path) { + var path; + if (true) { + return path; + } + return strings.Replace(path, "/", "/", -1); + }; + $pkg.FromSlash = FromSlash; + Join = function(elem) { + var elem; + return join(elem); + }; + $pkg.Join = Join; + volumeNameLen = function(path) { + var path; + return 0; + }; + join = function(elem) { + var _i, _ref, e, elem, i; + _ref = elem; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!(e === "")) { + return Clean(strings.Join($subslice(elem, i), "/")); + } + _i++; + } + return ""; + }; + ptrType$1.methods = [{prop: "index", name: "index", pkg: "path/filepath", typ: $funcType([$Int], [$Uint8], false)}, {prop: "append", name: "append", pkg: "path/filepath", typ: $funcType([$Uint8], [], false)}, {prop: "string", name: "string", pkg: "path/filepath", typ: $funcType([], [$String], false)}]; + lazybuf.init("path/filepath", [{prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "volAndPath", name: "volAndPath", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "volLen", name: "volLen", embedded: false, exported: false, typ: $Int, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -30669,7 +37840,7 @@ $packages["path/filepath"] = (function() { return $pkg; })(); $packages["github.com/divan/graphx/formats"] = (function() { - var $pkg = {}, $init, binary, json, errors, fmt, graph, layout, io, log, os, filepath, ptrType$1, ptrType$2, sliceType$3, structType$1, ptrType$3, sliceType$4, structType$2, FromD3JSONReader; + var $pkg = {}, $init, binary, json, errors, fmt, graph, layout, io, log, os, filepath, D3JSON, link, sliceType$1, ptrType, sliceType$2, structType, ptrType$1, ptrType$2, sliceType$3, structType$1, ptrType$3, sliceType$4, structType$2, ptrType$6, NewD3JSON, FromD3JSONReader; binary = $packages["encoding/binary"]; json = $packages["encoding/json"]; errors = $packages["errors"]; @@ -30680,6 +37851,30 @@ $packages["github.com/divan/graphx/formats"] = (function() { log = $packages["log"]; os = $packages["os"]; filepath = $packages["path/filepath"]; + D3JSON = $pkg.D3JSON = $newType(0, $kindStruct, "formats.D3JSON", true, "github.com/divan/graphx/formats", true, function(writer_, indented_) { + this.$val = this; + if (arguments.length === 0) { + this.writer = $ifaceNil; + this.indented = false; + return; + } + this.writer = writer_; + this.indented = indented_; + }); + link = $newType(0, $kindStruct, "formats.link", true, "github.com/divan/graphx/formats", false, function(Source_, Target_) { + this.$val = this; + if (arguments.length === 0) { + this.Source = ""; + this.Target = ""; + return; + } + this.Source = Source_; + this.Target = Target_; + }); + sliceType$1 = $sliceType(graph.Node); + ptrType = $ptrType(link); + sliceType$2 = $sliceType(ptrType); + structType = $structType("", [{prop: "Nodes", name: "Nodes", embedded: false, exported: true, typ: sliceType$1, tag: "json:\"nodes\""}, {prop: "Links", name: "Links", embedded: false, exported: true, typ: sliceType$2, tag: "json:\"links\""}]); ptrType$1 = $ptrType(graph.Graph); ptrType$2 = $ptrType(graph.BasicNode); sliceType$3 = $sliceType(ptrType$2); @@ -30687,9 +37882,40 @@ $packages["github.com/divan/graphx/formats"] = (function() { ptrType$3 = $ptrType(structType$1); sliceType$4 = $sliceType(ptrType$3); structType$2 = $structType("", [{prop: "Nodes", name: "Nodes", embedded: false, exported: true, typ: sliceType$3, tag: "json:\"nodes\""}, {prop: "Links", name: "Links", embedded: false, exported: true, typ: sliceType$4, tag: "json:\"links\""}]); + ptrType$6 = $ptrType(D3JSON); + NewD3JSON = function(w, indented) { + var indented, w; + return new D3JSON.ptr(w, indented); + }; + $pkg.NewD3JSON = NewD3JSON; + D3JSON.ptr.prototype.ExportGraph = function(g) { + var _i, _r, _ref, d, data, enc, g, i, l, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; d = $f.d; data = $f.data; enc = $f.enc; g = $f.g; i = $f.i; l = $f.l; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + data = new structType.ptr(sliceType$1.nil, sliceType$2.nil); + data.Nodes = g.Nodes(); + data.Links = $makeSlice(sliceType$2, g.Links().$length); + _ref = g.Links(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + l = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + (x = data.Links, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = new link.ptr(l.From(), l.To()))); + _i++; + } + enc = json.NewEncoder(d.writer); + if (d.indented) { + enc.SetIndent("", " "); + } + _r = enc.Encode(new data.constructor.elem(data)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: D3JSON.ptr.prototype.ExportGraph }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.d = d; $f.data = data; $f.enc = enc; $f.g = g; $f.i = i; $f.l = l; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + D3JSON.prototype.ExportGraph = function(g) { return this.$val.ExportGraph(g); }; FromD3JSONReader = function(r) { - var _i, _i$1, _r, _ref, _ref$1, err, err$1, g, link$1, node, r, res, $s, $r; - /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; err = $f.err; err$1 = $f.err$1; g = $f.g; link$1 = $f.link$1; node = $f.node; r = $f.r; res = $f.res; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + var _i, _i$1, _r, _r$1, _ref, _ref$1, err, err$1, g, link$1, node, r, res, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; _ref$1 = $f._ref$1; err = $f.err; err$1 = $f.err$1; g = $f.g; link$1 = $f.link$1; node = $f.node; r = $f.r; res = $f.res; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: res = [res]; res[0] = new structType$2.ptr(sliceType$3.nil, sliceType$4.nil); _r = json.NewDecoder(r).Decode(res[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } @@ -30711,20 +37937,24 @@ $packages["github.com/divan/graphx/formats"] = (function() { } _ref$1 = res[0].Links; _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } + /* while (true) { */ case 2: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 3; continue; } link$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - err$1 = g.AddLink(link$1.Source, link$1.Target); + _r$1 = g.AddLink(link$1.Source, link$1.Target); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = -1; return [ptrType$1.nil, err$1]; } _i$1++; - } + /* } */ $s = 2; continue; case 3: g.UpdateCache(); $s = -1; return [g, err]; - /* */ } return; } if ($f === undefined) { $f = { $blk: FromD3JSONReader }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f.err = err; $f.err$1 = err$1; $f.g = g; $f.link$1 = link$1; $f.node = node; $f.r = r; $f.res = res; $f.$s = $s; $f.$r = $r; return $f; + /* */ } return; } if ($f === undefined) { $f = { $blk: FromD3JSONReader }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f._ref$1 = _ref$1; $f.err = err; $f.err$1 = err$1; $f.g = g; $f.link$1 = link$1; $f.node = node; $f.r = r; $f.res = res; $f.$s = $s; $f.$r = $r; return $f; }; $pkg.FromD3JSONReader = FromD3JSONReader; + ptrType$6.methods = [{prop: "ExportGraph", name: "ExportGraph", pkg: "", typ: $funcType([ptrType$1], [$error], false)}]; + D3JSON.init("github.com/divan/graphx/formats", [{prop: "writer", name: "writer", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "indented", name: "indented", embedded: false, exported: false, typ: $Bool, tag: ""}]); + link.init("", [{prop: "Source", name: "Source", embedded: false, exported: true, typ: $String, tag: "json:\"source\""}, {prop: "Target", name: "Target", embedded: false, exported: true, typ: $String, tag: "json:\"target\""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: @@ -34765,6 +41995,31 @@ $packages["github.com/lngramos/three"] = (function() { $pkg.$init = $init; return $pkg; })(); +$packages["github.com/status-im/simulation/propagation"] = (function() { + var $pkg = {}, $init, Log, sliceType, sliceType$1; + Log = $pkg.Log = $newType(0, $kindStruct, "propagation.Log", true, "github.com/status-im/simulation/propagation", true, function(Timestamps_, Indices_, Nodes_) { + this.$val = this; + if (arguments.length === 0) { + this.Timestamps = sliceType.nil; + this.Indices = sliceType$1.nil; + this.Nodes = sliceType$1.nil; + return; + } + this.Timestamps = Timestamps_; + this.Indices = Indices_; + this.Nodes = Nodes_; + }); + sliceType = $sliceType($Int); + sliceType$1 = $sliceType(sliceType); + Log.init("", [{prop: "Timestamps", name: "Timestamps", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Indices", name: "Indices", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Nodes", name: "Nodes", embedded: false, exported: true, typ: sliceType$1, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); $packages["github.com/status-im/whispervis/jsapi"] = (function() { var $pkg = {}, $init, js, FileReader, sliceType, funcType, ptrType, ptrType$1, NewFileReader; js = $packages["github.com/gopherjs/gopherjs/js"]; @@ -34815,16 +42070,83395 @@ $packages["github.com/status-im/whispervis/jsapi"] = (function() { $pkg.$init = $init; return $pkg; })(); +$packages["container/list"] = (function() { + var $pkg = {}, $init, Element, List, ptrType, ptrType$1, New; + Element = $pkg.Element = $newType(0, $kindStruct, "list.Element", true, "container/list", true, function(next_, prev_, list_, Value_) { + this.$val = this; + if (arguments.length === 0) { + this.next = ptrType$1.nil; + this.prev = ptrType$1.nil; + this.list = ptrType.nil; + this.Value = $ifaceNil; + return; + } + this.next = next_; + this.prev = prev_; + this.list = list_; + this.Value = Value_; + }); + List = $pkg.List = $newType(0, $kindStruct, "list.List", true, "container/list", true, function(root_, len_) { + this.$val = this; + if (arguments.length === 0) { + this.root = new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, $ifaceNil); + this.len = 0; + return; + } + this.root = root_; + this.len = len_; + }); + ptrType = $ptrType(List); + ptrType$1 = $ptrType(Element); + Element.ptr.prototype.Next = function() { + var e, p; + e = this; + p = e.next; + if (!(e.list === ptrType.nil) && !(p === e.list.root)) { + return p; + } + return ptrType$1.nil; + }; + Element.prototype.Next = function() { return this.$val.Next(); }; + Element.ptr.prototype.Prev = function() { + var e, p; + e = this; + p = e.prev; + if (!(e.list === ptrType.nil) && !(p === e.list.root)) { + return p; + } + return ptrType$1.nil; + }; + Element.prototype.Prev = function() { return this.$val.Prev(); }; + List.ptr.prototype.Init = function() { + var l; + l = this; + l.root.next = l.root; + l.root.prev = l.root; + l.len = 0; + return l; + }; + List.prototype.Init = function() { return this.$val.Init(); }; + New = function() { + return new List.ptr(new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, $ifaceNil), 0).Init(); + }; + $pkg.New = New; + List.ptr.prototype.Len = function() { + var l; + l = this; + return l.len; + }; + List.prototype.Len = function() { return this.$val.Len(); }; + List.ptr.prototype.Front = function() { + var l; + l = this; + if (l.len === 0) { + return ptrType$1.nil; + } + return l.root.next; + }; + List.prototype.Front = function() { return this.$val.Front(); }; + List.ptr.prototype.Back = function() { + var l; + l = this; + if (l.len === 0) { + return ptrType$1.nil; + } + return l.root.prev; + }; + List.prototype.Back = function() { return this.$val.Back(); }; + List.ptr.prototype.lazyInit = function() { + var l; + l = this; + if (l.root.next === ptrType$1.nil) { + l.Init(); + } + }; + List.prototype.lazyInit = function() { return this.$val.lazyInit(); }; + List.ptr.prototype.insert = function(e, at) { + var at, e, l, n; + l = this; + n = at.next; + at.next = e; + e.prev = at; + e.next = n; + n.prev = e; + e.list = l; + l.len = l.len + (1) >> 0; + return e; + }; + List.prototype.insert = function(e, at) { return this.$val.insert(e, at); }; + List.ptr.prototype.insertValue = function(v, at) { + var at, l, v; + l = this; + return l.insert(new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, v), at); + }; + List.prototype.insertValue = function(v, at) { return this.$val.insertValue(v, at); }; + List.ptr.prototype.remove = function(e) { + var e, l; + l = this; + e.prev.next = e.next; + e.next.prev = e.prev; + e.next = ptrType$1.nil; + e.prev = ptrType$1.nil; + e.list = ptrType.nil; + l.len = l.len - (1) >> 0; + return e; + }; + List.prototype.remove = function(e) { return this.$val.remove(e); }; + List.ptr.prototype.Remove = function(e) { + var e, l; + l = this; + if (e.list === l) { + l.remove(e); + } + return e.Value; + }; + List.prototype.Remove = function(e) { return this.$val.Remove(e); }; + List.ptr.prototype.PushFront = function(v) { + var l, v; + l = this; + l.lazyInit(); + return l.insertValue(v, l.root); + }; + List.prototype.PushFront = function(v) { return this.$val.PushFront(v); }; + List.ptr.prototype.PushBack = function(v) { + var l, v; + l = this; + l.lazyInit(); + return l.insertValue(v, l.root.prev); + }; + List.prototype.PushBack = function(v) { return this.$val.PushBack(v); }; + List.ptr.prototype.InsertBefore = function(v, mark) { + var l, mark, v; + l = this; + if (!(mark.list === l)) { + return ptrType$1.nil; + } + return l.insertValue(v, mark.prev); + }; + List.prototype.InsertBefore = function(v, mark) { return this.$val.InsertBefore(v, mark); }; + List.ptr.prototype.InsertAfter = function(v, mark) { + var l, mark, v; + l = this; + if (!(mark.list === l)) { + return ptrType$1.nil; + } + return l.insertValue(v, mark); + }; + List.prototype.InsertAfter = function(v, mark) { return this.$val.InsertAfter(v, mark); }; + List.ptr.prototype.MoveToFront = function(e) { + var e, l; + l = this; + if (!(e.list === l) || l.root.next === e) { + return; + } + l.insert(l.remove(e), l.root); + }; + List.prototype.MoveToFront = function(e) { return this.$val.MoveToFront(e); }; + List.ptr.prototype.MoveToBack = function(e) { + var e, l; + l = this; + if (!(e.list === l) || l.root.prev === e) { + return; + } + l.insert(l.remove(e), l.root.prev); + }; + List.prototype.MoveToBack = function(e) { return this.$val.MoveToBack(e); }; + List.ptr.prototype.MoveBefore = function(e, mark) { + var e, l, mark; + l = this; + if (!(e.list === l) || e === mark || !(mark.list === l)) { + return; + } + l.insert(l.remove(e), mark.prev); + }; + List.prototype.MoveBefore = function(e, mark) { return this.$val.MoveBefore(e, mark); }; + List.ptr.prototype.MoveAfter = function(e, mark) { + var e, l, mark; + l = this; + if (!(e.list === l) || e === mark || !(mark.list === l)) { + return; + } + l.insert(l.remove(e), mark); + }; + List.prototype.MoveAfter = function(e, mark) { return this.$val.MoveAfter(e, mark); }; + List.ptr.prototype.PushBackList = function(other) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, i, l, other; + l = this; + l.lazyInit(); + _tmp = other.Len(); + _tmp$1 = other.Front(); + i = _tmp; + e = _tmp$1; + while (true) { + if (!(i > 0)) { break; } + l.insertValue(e.Value, l.root.prev); + _tmp$2 = i - 1 >> 0; + _tmp$3 = e.Next(); + i = _tmp$2; + e = _tmp$3; + } + }; + List.prototype.PushBackList = function(other) { return this.$val.PushBackList(other); }; + List.ptr.prototype.PushFrontList = function(other) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, i, l, other; + l = this; + l.lazyInit(); + _tmp = other.Len(); + _tmp$1 = other.Back(); + i = _tmp; + e = _tmp$1; + while (true) { + if (!(i > 0)) { break; } + l.insertValue(e.Value, l.root); + _tmp$2 = i - 1 >> 0; + _tmp$3 = e.Prev(); + i = _tmp$2; + e = _tmp$3; + } + }; + List.prototype.PushFrontList = function(other) { return this.$val.PushFrontList(other); }; + ptrType$1.methods = [{prop: "Next", name: "Next", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Prev", name: "Prev", pkg: "", typ: $funcType([], [ptrType$1], false)}]; + ptrType.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Front", name: "Front", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Back", name: "Back", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "container/list", typ: $funcType([], [], false)}, {prop: "insert", name: "insert", pkg: "container/list", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "insertValue", name: "insertValue", pkg: "container/list", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "remove", name: "remove", pkg: "container/list", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Remove", name: "Remove", pkg: "", typ: $funcType([ptrType$1], [$emptyInterface], false)}, {prop: "PushFront", name: "PushFront", pkg: "", typ: $funcType([$emptyInterface], [ptrType$1], false)}, {prop: "PushBack", name: "PushBack", pkg: "", typ: $funcType([$emptyInterface], [ptrType$1], false)}, {prop: "InsertBefore", name: "InsertBefore", pkg: "", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "InsertAfter", name: "InsertAfter", pkg: "", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "MoveToFront", name: "MoveToFront", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "MoveToBack", name: "MoveToBack", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "MoveBefore", name: "MoveBefore", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [], false)}, {prop: "MoveAfter", name: "MoveAfter", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [], false)}, {prop: "PushBackList", name: "PushBackList", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "PushFrontList", name: "PushFrontList", pkg: "", typ: $funcType([ptrType], [], false)}]; + Element.init("container/list", [{prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "list", name: "list", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $emptyInterface, tag: ""}]); + List.init("container/list", [{prop: "root", name: "root", embedded: false, exported: false, typ: Element, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["context"] = (function() { + var $pkg = {}, $init, errors, fmt, reflect, sync, time, Context, deadlineExceededError, emptyCtx, CancelFunc, canceler, cancelCtx, timerCtx, valueCtx, ptrType, structType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, sliceType, ptrType$5, chanType, chanType$1, mapType, background, todo, closedchan, x, Background, WithCancel, newCancelCtx, propagateCancel, parentCancelCtx, removeChild, init, WithDeadline, WithValue; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + reflect = $packages["reflect"]; + sync = $packages["sync"]; + time = $packages["time"]; + Context = $pkg.Context = $newType(8, $kindInterface, "context.Context", true, "context", true, null); + deadlineExceededError = $pkg.deadlineExceededError = $newType(0, $kindStruct, "context.deadlineExceededError", true, "context", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + emptyCtx = $pkg.emptyCtx = $newType(4, $kindInt, "context.emptyCtx", true, "context", false, null); + CancelFunc = $pkg.CancelFunc = $newType(4, $kindFunc, "context.CancelFunc", true, "context", true, null); + canceler = $pkg.canceler = $newType(8, $kindInterface, "context.canceler", true, "context", false, null); + cancelCtx = $pkg.cancelCtx = $newType(0, $kindStruct, "context.cancelCtx", true, "context", false, function(Context_, mu_, done_, children_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.Context = $ifaceNil; + this.mu = new sync.Mutex.ptr(0, 0); + this.done = $chanNil; + this.children = false; + this.err = $ifaceNil; + return; + } + this.Context = Context_; + this.mu = mu_; + this.done = done_; + this.children = children_; + this.err = err_; + }); + timerCtx = $pkg.timerCtx = $newType(0, $kindStruct, "context.timerCtx", true, "context", false, function(cancelCtx_, timer_, deadline_) { + this.$val = this; + if (arguments.length === 0) { + this.cancelCtx = new cancelCtx.ptr($ifaceNil, new sync.Mutex.ptr(0, 0), $chanNil, false, $ifaceNil); + this.timer = ptrType$5.nil; + this.deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + return; + } + this.cancelCtx = cancelCtx_; + this.timer = timer_; + this.deadline = deadline_; + }); + valueCtx = $pkg.valueCtx = $newType(0, $kindStruct, "context.valueCtx", true, "context", false, function(Context_, key_, val_) { + this.$val = this; + if (arguments.length === 0) { + this.Context = $ifaceNil; + this.key = $ifaceNil; + this.val = $ifaceNil; + return; + } + this.Context = Context_; + this.key = key_; + this.val = val_; + }); + ptrType = $ptrType(emptyCtx); + structType = $structType("", []); + ptrType$1 = $ptrType(time.Location); + ptrType$2 = $ptrType(cancelCtx); + ptrType$3 = $ptrType(timerCtx); + ptrType$4 = $ptrType(valueCtx); + sliceType = $sliceType($emptyInterface); + ptrType$5 = $ptrType(time.Timer); + chanType = $chanType(structType, false, true); + chanType$1 = $chanType(structType, false, false); + mapType = $mapType(canceler, structType); + deadlineExceededError.ptr.prototype.Error = function() { + return "context deadline exceeded"; + }; + deadlineExceededError.prototype.Error = function() { return this.$val.Error(); }; + deadlineExceededError.ptr.prototype.Timeout = function() { + return true; + }; + deadlineExceededError.prototype.Timeout = function() { return this.$val.Timeout(); }; + deadlineExceededError.ptr.prototype.Temporary = function() { + return true; + }; + deadlineExceededError.prototype.Temporary = function() { return this.$val.Temporary(); }; + $ptrType(emptyCtx).prototype.Deadline = function() { + var deadline, ok; + deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + ok = false; + return [deadline, ok]; + }; + $ptrType(emptyCtx).prototype.Done = function() { + return $chanNil; + }; + $ptrType(emptyCtx).prototype.Err = function() { + return $ifaceNil; + }; + $ptrType(emptyCtx).prototype.Value = function(key) { + var key; + return $ifaceNil; + }; + $ptrType(emptyCtx).prototype.String = function() { + var _1, e; + e = this; + _1 = e; + if (_1 === (background)) { + return "context.Background"; + } else if (_1 === (todo)) { + return "context.TODO"; + } + return "unknown empty Context"; + }; + Background = function() { + return background; + }; + $pkg.Background = Background; + WithCancel = function(parent) { + var _tmp, _tmp$1, c, cancel, ctx, parent, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; c = $f.c; cancel = $f.cancel; ctx = $f.ctx; parent = $f.parent; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + ctx = $ifaceNil; + cancel = $throwNilPointerError; + c[0] = $clone(newCancelCtx(parent), cancelCtx); + $r = propagateCancel(parent, c[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = c[0]; + _tmp$1 = (function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].cancel(true, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c); + ctx = _tmp; + cancel = _tmp$1; + $s = -1; return [ctx, cancel]; + /* */ } return; } if ($f === undefined) { $f = { $blk: WithCancel }; } $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.c = c; $f.cancel = cancel; $f.ctx = ctx; $f.parent = parent; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.WithCancel = WithCancel; + newCancelCtx = function(parent) { + var parent; + return new cancelCtx.ptr(parent, new sync.Mutex.ptr(0, 0), $chanNil, false, $ifaceNil); + }; + propagateCancel = function(parent, child) { + var _key, _r, _tuple, child, ok, p, parent, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; _r = $f._r; _tuple = $f._tuple; child = $f.child; ok = $f.ok; p = $f.p; parent = $f.parent; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + child = [child]; + parent = [parent]; + _r = parent[0].Done(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === $chanNil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r === $chanNil) { */ case 1: + $s = -1; return; + /* } */ case 2: + _tuple = parentCancelCtx(parent[0]); + p = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ok) { */ case 4: + $r = p.mu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(p.err, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(p.err, $ifaceNil))) { */ case 8: + $r = child[0].cancel(false, p.err); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 10; continue; + /* } else { */ case 9: + if (p.children === false) { + p.children = {}; + } + _key = child[0]; (p.children || $throwRuntimeError("assignment to entry in nil map"))[canceler.keyFor(_key)] = { k: _key, v: new structType.ptr() }; + /* } */ case 10: + $r = p.mu.Unlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 6; continue; + /* } else { */ case 5: + $go((function(child, parent) { return function $b() { + var _arg, _r$1, _r$2, _r$3, _r$4, _selection, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _selection = $f._selection; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = parent[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = child[0].Done(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $select([[_r$1], [_r$2]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection = _r$3; + /* */ if (_selection[0] === 0) { $s = 4; continue; } + /* */ if (_selection[0] === 1) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_selection[0] === 0) { */ case 4: + _r$4 = parent[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _arg = _r$4; + $r = child[0].cancel(false, _arg); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 6; continue; + /* } else if (_selection[0] === 1) { */ case 5: + /* } */ case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._arg = _arg; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._selection = _selection; $f.$s = $s; $f.$r = $r; return $f; + }; })(child, parent), []); + /* } */ case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: propagateCancel }; } $f._key = _key; $f._r = _r; $f._tuple = _tuple; $f.child = child; $f.ok = ok; $f.p = p; $f.parent = parent; $f.$s = $s; $f.$r = $r; return $f; + }; + parentCancelCtx = function(parent) { + var _ref, c, c$1, c$2, c$3, parent; + while (true) { + _ref = parent; + if ($assertType(_ref, ptrType$2, true)[1]) { + c = _ref.$val; + return [c, true]; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + c$1 = _ref.$val; + return [c$1.cancelCtx, true]; + } else if ($assertType(_ref, ptrType$4, true)[1]) { + c$2 = _ref.$val; + parent = c$2.Context; + } else { + c$3 = _ref; + return [ptrType$2.nil, false]; + } + } + }; + removeChild = function(parent, child) { + var _tuple, child, ok, p, parent, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; child = $f.child; ok = $f.ok; p = $f.p; parent = $f.parent; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = parentCancelCtx(parent); + p = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return; + } + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(p.children === false)) { + delete p.children[canceler.keyFor(child)]; + } + $r = p.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: removeChild }; } $f._tuple = _tuple; $f.child = child; $f.ok = ok; $f.p = p; $f.parent = parent; $f.$s = $s; $f.$r = $r; return $f; + }; + init = function() { + $close(closedchan); + }; + cancelCtx.ptr.prototype.Done = function() { + var c, d, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (c.done === $chanNil) { + c.done = new $Chan(structType, 0); + } + d = c.done; + $r = c.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return d; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelCtx.ptr.prototype.Done }; } $f.c = c; $f.d = d; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelCtx.prototype.Done = function() { return this.$val.Done(); }; + cancelCtx.ptr.prototype.Err = function() { + var c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err = c.err; + $r = c.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelCtx.ptr.prototype.Err }; } $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelCtx.prototype.Err = function() { return this.$val.Err(); }; + cancelCtx.ptr.prototype.String = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = fmt.Sprintf("%v.WithCancel", new sliceType([c.Context])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelCtx.ptr.prototype.String }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelCtx.prototype.String = function() { return this.$val.String(); }; + cancelCtx.ptr.prototype.cancel = function(removeFromParent, err) { + var _entry, _i, _keys, _ref, c, child, err, removeFromParent, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; c = $f.c; child = $f.child; err = $f.err; removeFromParent = $f.removeFromParent; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $panic(new $String("context: internal error: missing cancel error")); + } + $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(c.err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(c.err, $ifaceNil))) { */ case 2: + $r = c.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 3: + c.err = err; + if (c.done === $chanNil) { + c.done = closedchan; + } else { + $close(c.done); + } + _ref = c.children; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 5: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 6; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 5; continue; + } + child = _entry.k; + $r = child.cancel(false, err); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 5; continue; case 6: + c.children = false; + $r = c.mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (removeFromParent) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (removeFromParent) { */ case 9: + $r = removeChild(c.Context, c); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelCtx.ptr.prototype.cancel }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.c = c; $f.child = child; $f.err = err; $f.removeFromParent = removeFromParent; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelCtx.prototype.cancel = function(removeFromParent, err) { return this.$val.cancel(removeFromParent, err); }; + WithDeadline = function(parent, d) { + var _r, _r$1, _tuple, c, cur, d, dur, ok, parent, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; cur = $f.cur; d = $f.d; dur = $f.dur; ok = $f.ok; parent = $f.parent; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = [c]; + _r = parent.Deadline(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + cur = $clone(_tuple[0], time.Time); + ok = _tuple[1]; + /* */ if (ok && $clone(cur, time.Time).Before($clone(d, time.Time))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok && $clone(cur, time.Time).Before($clone(d, time.Time))) { */ case 2: + _r$1 = WithCancel(parent); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 3: + c[0] = new timerCtx.ptr($clone(newCancelCtx(parent), cancelCtx), ptrType$5.nil, $clone(d, time.Time)); + $r = propagateCancel(parent, c[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + dur = time.Until($clone(d, time.Time)); + /* */ if ((dur.$high < 0 || (dur.$high === 0 && dur.$low <= 0))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ((dur.$high < 0 || (dur.$high === 0 && dur.$low <= 0))) { */ case 6: + $r = c[0].cancel(true, $pkg.DeadlineExceeded); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [c[0], (function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].cancel(true, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c)]; + /* } */ case 7: + $r = c[0].cancelCtx.mu.Lock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c[0].cancelCtx.mu, "Unlock"), []]); + if ($interfaceIsEqual(c[0].cancelCtx.err, $ifaceNil)) { + c[0].timer = time.AfterFunc(dur, (function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].cancel(true, $pkg.DeadlineExceeded); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c)); + } + $s = -1; return [c[0], (function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].cancel(true, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c)]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $throwNilPointerError]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: WithDeadline }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.cur = cur; $f.d = d; $f.dur = dur; $f.ok = ok; $f.parent = parent; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + $pkg.WithDeadline = WithDeadline; + timerCtx.ptr.prototype.Deadline = function() { + var _tmp, _tmp$1, c, deadline, ok; + deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + ok = false; + c = this; + _tmp = $clone(c.deadline, time.Time); + _tmp$1 = true; + time.Time.copy(deadline, _tmp); + ok = _tmp$1; + return [deadline, ok]; + }; + timerCtx.prototype.Deadline = function() { return this.$val.Deadline(); }; + timerCtx.ptr.prototype.String = function() { + var _r, c, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = fmt.Sprintf("%v.WithDeadline(%s [%s])", new sliceType([c.cancelCtx.Context, (x$1 = c.deadline, new x$1.constructor.elem(x$1)), time.Until($clone(c.deadline, time.Time))])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: timerCtx.ptr.prototype.String }; } $f._r = _r; $f.c = c; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + timerCtx.prototype.String = function() { return this.$val.String(); }; + timerCtx.ptr.prototype.cancel = function(removeFromParent, err) { + var c, err, removeFromParent, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; err = $f.err; removeFromParent = $f.removeFromParent; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.cancelCtx.cancel(false, err); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (removeFromParent) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (removeFromParent) { */ case 2: + $r = removeChild(c.cancelCtx.Context, c); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $r = c.cancelCtx.mu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(c.timer === ptrType$5.nil)) { + c.timer.Stop(); + c.timer = ptrType$5.nil; + } + $r = c.cancelCtx.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: timerCtx.ptr.prototype.cancel }; } $f.c = c; $f.err = err; $f.removeFromParent = removeFromParent; $f.$s = $s; $f.$r = $r; return $f; + }; + timerCtx.prototype.cancel = function(removeFromParent, err) { return this.$val.cancel(removeFromParent, err); }; + WithValue = function(parent, key, val) { + var _r, key, parent, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; key = $f.key; parent = $f.parent; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($interfaceIsEqual(key, $ifaceNil)) { + $panic(new $String("nil key")); + } + _r = reflect.TypeOf(key).Comparable(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!_r) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!_r) { */ case 1: + $panic(new $String("key is not comparable")); + /* } */ case 2: + $s = -1; return new valueCtx.ptr(parent, key, val); + /* */ } return; } if ($f === undefined) { $f = { $blk: WithValue }; } $f._r = _r; $f.key = key; $f.parent = parent; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.WithValue = WithValue; + valueCtx.ptr.prototype.String = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = fmt.Sprintf("%v.WithValue(%#v, %#v)", new sliceType([c.Context, c.key, c.val])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: valueCtx.ptr.prototype.String }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + valueCtx.prototype.String = function() { return this.$val.String(); }; + valueCtx.ptr.prototype.Value = function(key) { + var _r, c, key, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; key = $f.key; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if ($interfaceIsEqual(c.key, key)) { + $s = -1; return c.val; + } + _r = c.Context.Value(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: valueCtx.ptr.prototype.Value }; } $f._r = _r; $f.c = c; $f.key = key; $f.$s = $s; $f.$r = $r; return $f; + }; + valueCtx.prototype.Value = function(key) { return this.$val.Value(key); }; + deadlineExceededError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType.methods = [{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]; + ptrType$3.methods = [{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]; + ptrType$4.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]; + Context.init([{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]); + deadlineExceededError.init("", []); + CancelFunc.init([], [], false); + canceler.init([{prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]); + cancelCtx.init("context", [{prop: "Context", name: "Context", embedded: true, exported: true, typ: Context, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "children", name: "children", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + timerCtx.init("context", [{prop: "cancelCtx", name: "cancelCtx", embedded: true, exported: false, typ: cancelCtx, tag: ""}, {prop: "timer", name: "timer", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "deadline", name: "deadline", embedded: false, exported: false, typ: time.Time, tag: ""}]); + valueCtx.init("context", [{prop: "Context", name: "Context", embedded: true, exported: true, typ: Context, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.Canceled = errors.New("context canceled"); + $pkg.DeadlineExceeded = (x = new deadlineExceededError.ptr(), new x.constructor.elem(x)); + background = $newDataPointer(0, ptrType); + todo = $newDataPointer(0, ptrType); + closedchan = new $Chan(structType, 0); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["math/rand"] = (function() { + var $pkg = {}, $init, nosync, math, Source, Source64, Rand, lockedSource, rngSource, arrayType, ptrType, ptrType$1, sliceType, ptrType$2, ptrType$3, funcType, sliceType$1, ptrType$5, ke, we, fe, kn, wn, fn, globalRand, rngCooked, absInt32, NewSource, New, read, Int, Intn, Float64, seedrand; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + math = $packages["math"]; + Source = $pkg.Source = $newType(8, $kindInterface, "rand.Source", true, "math/rand", true, null); + Source64 = $pkg.Source64 = $newType(8, $kindInterface, "rand.Source64", true, "math/rand", true, null); + Rand = $pkg.Rand = $newType(0, $kindStruct, "rand.Rand", true, "math/rand", true, function(src_, s64_, readVal_, readPos_) { + this.$val = this; + if (arguments.length === 0) { + this.src = $ifaceNil; + this.s64 = $ifaceNil; + this.readVal = new $Int64(0, 0); + this.readPos = 0; + return; + } + this.src = src_; + this.s64 = s64_; + this.readVal = readVal_; + this.readPos = readPos_; + }); + lockedSource = $pkg.lockedSource = $newType(0, $kindStruct, "rand.lockedSource", true, "math/rand", false, function(lk_, src_) { + this.$val = this; + if (arguments.length === 0) { + this.lk = new nosync.Mutex.ptr(false); + this.src = $ifaceNil; + return; + } + this.lk = lk_; + this.src = src_; + }); + rngSource = $pkg.rngSource = $newType(0, $kindStruct, "rand.rngSource", true, "math/rand", false, function(tap_, feed_, vec_) { + this.$val = this; + if (arguments.length === 0) { + this.tap = 0; + this.feed = 0; + this.vec = arrayType.zero(); + return; + } + this.tap = tap_; + this.feed = feed_; + this.vec = vec_; + }); + arrayType = $arrayType($Int64, 607); + ptrType = $ptrType(lockedSource); + ptrType$1 = $ptrType($Int8); + sliceType = $sliceType($Int); + ptrType$2 = $ptrType($Int64); + ptrType$3 = $ptrType(Rand); + funcType = $funcType([$Int, $Int], [], false); + sliceType$1 = $sliceType($Uint8); + ptrType$5 = $ptrType(rngSource); + Rand.ptr.prototype.ExpFloat64 = function() { + var _r, _r$1, _r$2, _r$3, i, j, r, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; i = $f.i; j = $f.j; r = $f.r; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* while (true) { */ case 1: + _r = r.Uint32(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + j = _r; + i = (j & 255) >>> 0; + x = (j) * (((i < 0 || i >= we.length) ? ($throwRuntimeError("index out of range"), undefined) : we[i])); + if (j < ((i < 0 || i >= ke.length) ? ($throwRuntimeError("index out of range"), undefined) : ke[i])) { + $s = -1; return x; + } + /* */ if (i === 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (i === 0) { */ case 4: + _r$1 = r.Float64(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = math.Log(_r$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return 7.69711747013105 - _r$2; + /* } */ case 5: + _r$3 = r.Float64(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if ($fround(((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]) + $fround(($fround(_r$3)) * ($fround((x$1 = i - 1 >>> 0, ((x$1 < 0 || x$1 >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[x$1])) - ((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]))))) < ($fround(math.Exp(-x)))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($fround(((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]) + $fround(($fround(_r$3)) * ($fround((x$1 = i - 1 >>> 0, ((x$1 < 0 || x$1 >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[x$1])) - ((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]))))) < ($fround(math.Exp(-x)))) { */ case 8: + $s = -1; return x; + /* } */ case 9: + /* } */ $s = 1; continue; case 2: + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.ExpFloat64 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.i = i; $f.j = j; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.ExpFloat64 = function() { return this.$val.ExpFloat64(); }; + absInt32 = function(i) { + var i; + if (i < 0) { + return ((-i >>> 0)); + } + return ((i >>> 0)); + }; + Rand.ptr.prototype.NormFloat64 = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, i, j, r, x, x$1, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; i = $f.i; j = $f.j; r = $f.r; x = $f.x; x$1 = $f.x$1; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* while (true) { */ case 1: + _r = r.Uint32(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + j = ((_r >> 0)); + i = j & 127; + x = (j) * (((i < 0 || i >= wn.length) ? ($throwRuntimeError("index out of range"), undefined) : wn[i])); + if (absInt32(j) < ((i < 0 || i >= kn.length) ? ($throwRuntimeError("index out of range"), undefined) : kn[i])) { + $s = -1; return x; + } + /* */ if (i === 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (i === 0) { */ case 4: + /* while (true) { */ case 6: + _r$1 = r.Float64(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = math.Log(_r$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + x = -_r$2 * 0.29047645161474317; + _r$3 = r.Float64(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = math.Log(_r$3); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + y = -_r$4; + if (y + y >= x * x) { + /* break; */ $s = 7; continue; + } + /* } */ $s = 6; continue; case 7: + if (j > 0) { + $s = -1; return 3.442619855899 + x; + } + $s = -1; return -3.442619855899 - x; + /* } */ case 5: + _r$5 = r.Float64(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + /* */ if ($fround(((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]) + $fround(($fround(_r$5)) * ($fround((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[x$1])) - ((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]))))) < ($fround(math.Exp(-0.5 * x * x)))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ($fround(((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]) + $fround(($fround(_r$5)) * ($fround((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[x$1])) - ((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]))))) < ($fround(math.Exp(-0.5 * x * x)))) { */ case 12: + $s = -1; return x; + /* } */ case 13: + /* } */ $s = 1; continue; case 2: + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.NormFloat64 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.i = i; $f.j = j; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.NormFloat64 = function() { return this.$val.NormFloat64(); }; + NewSource = function(seed) { + var rng, seed; + rng = new rngSource.ptr(0, 0, arrayType.zero()); + rng.Seed(seed); + return rng; + }; + $pkg.NewSource = NewSource; + New = function(src) { + var _tuple, s64, src; + _tuple = $assertType(src, Source64, true); + s64 = _tuple[0]; + return new Rand.ptr(src, s64, new $Int64(0, 0), 0); + }; + $pkg.New = New; + Rand.ptr.prototype.Seed = function(seed) { + var _tuple, lk, ok, r, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; lk = $f.lk; ok = $f.ok; r = $f.r; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _tuple = $assertType(r.src, ptrType, true); + lk = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + $r = lk.seedPos(seed, (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$1(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + $r = r.src.Seed(seed); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r.readPos = 0; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Seed }; } $f._tuple = _tuple; $f.lk = lk; $f.ok = ok; $f.r = r; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; + Rand.ptr.prototype.Int63 = function() { + var _r, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.src.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Int63 }; } $f._r = _r; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Int63 = function() { return this.$val.Int63(); }; + Rand.ptr.prototype.Uint32 = function() { + var _r, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return (($shiftRightInt64(_r, 31).$low >>> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Uint32 }; } $f._r = _r; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Uint32 = function() { return this.$val.Uint32(); }; + Rand.ptr.prototype.Uint64 = function() { + var _r, _r$1, _r$2, r, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; r = $f.r; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (!($interfaceIsEqual(r.s64, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(r.s64, $ifaceNil))) { */ case 1: + _r = r.s64.Uint64(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _r$1 = r.Int63(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = r.Int63(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return (x = $shiftRightUint64(((x$1 = _r$1, new $Uint64(x$1.$high, x$1.$low))), 31), x$2 = $shiftLeft64(((x$3 = _r$2, new $Uint64(x$3.$high, x$3.$low))), 32), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Uint64 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Uint64 = function() { return this.$val.Uint64(); }; + Rand.ptr.prototype.Int31 = function() { + var _r, r, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return (((x = $shiftRightInt64(_r, 32), x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Int31 }; } $f._r = _r; $f.r = r; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Int31 = function() { return this.$val.Int31(); }; + Rand.ptr.prototype.Int = function() { + var _r, r, u, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; u = $f.u; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + u = ((_r.$low >>> 0)); + $s = -1; return ((((u << 1 >>> 0) >>> 1 >>> 0) >> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Int }; } $f._r = _r; $f.r = r; $f.u = u; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Int = function() { return this.$val.Int(); }; + Rand.ptr.prototype.Int63n = function(n) { + var _r, _r$1, _r$2, max, n, r, v, x, x$1, x$2, x$3, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; max = $f.max; n = $f.n; r = $f.r; v = $f.v; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if ((n.$high < 0 || (n.$high === 0 && n.$low <= 0))) { + $panic(new $String("invalid argument to Int63n")); + } + /* */ if ((x = (x$1 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(n.$high & x$1.$high, (n.$low & x$1.$low) >>> 0)), (x.$high === 0 && x.$low === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = (x$1 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(n.$high & x$1.$high, (n.$low & x$1.$low) >>> 0)), (x.$high === 0 && x.$low === 0))) { */ case 1: + _r = r.Int63(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return (x$2 = _r, x$3 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0)); + /* } */ case 2: + max = ((x$4 = (x$5 = $div64(new $Uint64(2147483648, 0), (new $Uint64(n.$high, n.$low)), true), new $Uint64(2147483647 - x$5.$high, 4294967295 - x$5.$low)), new $Int64(x$4.$high, x$4.$low))); + _r$1 = r.Int63(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + /* while (true) { */ case 5: + /* if (!((v.$high > max.$high || (v.$high === max.$high && v.$low > max.$low)))) { break; } */ if(!((v.$high > max.$high || (v.$high === max.$high && v.$low > max.$low)))) { $s = 6; continue; } + _r$2 = r.Int63(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + v = _r$2; + /* } */ $s = 5; continue; case 6: + $s = -1; return $div64(v, n, true); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Int63n }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.max = max; $f.n = n; $f.r = r; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Int63n = function(n) { return this.$val.Int63n(n); }; + Rand.ptr.prototype.Int31n = function(n) { + var _r, _r$1, _r$2, _r$3, _r$4, max, n, r, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; max = $f.max; n = $f.n; r = $f.r; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (n <= 0) { + $panic(new $String("invalid argument to Int31n")); + } + /* */ if ((n & ((n - 1 >> 0))) === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((n & ((n - 1 >> 0))) === 0) { */ case 1: + _r = r.Int31(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r & ((n - 1 >> 0)); + /* } */ case 2: + max = (((2147483647 - (_r$1 = 2147483648 % ((n >>> 0)), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0) >> 0)); + _r$2 = r.Int31(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + v = _r$2; + /* while (true) { */ case 5: + /* if (!(v > max)) { break; } */ if(!(v > max)) { $s = 6; continue; } + _r$3 = r.Int31(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + /* } */ $s = 5; continue; case 6: + $s = -1; return (_r$4 = v % n, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Int31n }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.max = max; $f.n = n; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Int31n = function(n) { return this.$val.Int31n(n); }; + Rand.ptr.prototype.int31n = function(n) { + var _r, _r$1, _r$2, low, n, prod, r, thresh, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; low = $f.low; n = $f.n; prod = $f.prod; r = $f.r; thresh = $f.thresh; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + v = _r; + prod = $mul64((new $Uint64(0, v)), (new $Uint64(0, n))); + low = ((prod.$low >>> 0)); + /* */ if (low < ((n >>> 0))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (low < ((n >>> 0))) { */ case 2: + thresh = (_r$1 = ((-n >>> 0)) % ((n >>> 0)), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); + /* while (true) { */ case 4: + /* if (!(low < thresh)) { break; } */ if(!(low < thresh)) { $s = 5; continue; } + _r$2 = r.Uint32(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + v = _r$2; + prod = $mul64((new $Uint64(0, v)), (new $Uint64(0, n))); + low = ((prod.$low >>> 0)); + /* } */ $s = 4; continue; case 5: + /* } */ case 3: + $s = -1; return (($shiftRightUint64(prod, 32).$low >> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.int31n }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.low = low; $f.n = n; $f.prod = prod; $f.r = r; $f.thresh = thresh; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.int31n = function(n) { return this.$val.int31n(n); }; + Rand.ptr.prototype.Intn = function(n) { + var _r, _r$1, n, r, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; n = $f.n; r = $f.r; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (n <= 0) { + $panic(new $String("invalid argument to Intn")); + } + /* */ if (n <= 2147483647) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (n <= 2147483647) { */ case 1: + _r = r.Int31n(((n >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return ((_r >> 0)); + /* } */ case 2: + _r$1 = r.Int63n((new $Int64(0, n))); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return (((x = _r$1, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Intn }; } $f._r = _r; $f._r$1 = _r$1; $f.n = n; $f.r = r; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Intn = function(n) { return this.$val.Intn(n); }; + Rand.ptr.prototype.Float64 = function() { + var _r, f, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* again: */ case 1: + _r = r.Int63(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + f = ($flatten64(_r)) / 9.223372036854776e+18; + /* */ if (f === 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (f === 1) { */ case 3: + /* goto again */ $s = 1; continue; + /* } */ case 4: + $s = -1; return f; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Float64 }; } $f._r = _r; $f.f = f; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Float64 = function() { return this.$val.Float64(); }; + Rand.ptr.prototype.Float32 = function() { + var _r, f, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* again: */ case 1: + _r = r.Float64(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + f = ($fround(_r)); + /* */ if (f === 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (f === 1) { */ case 3: + /* goto again */ $s = 1; continue; + /* } */ case 4: + $s = -1; return f; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Float32 }; } $f._r = _r; $f.f = f; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Float32 = function() { return this.$val.Float32(); }; + Rand.ptr.prototype.Perm = function(n) { + var _r, i, j, m, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; j = $f.j; m = $f.m; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + m = $makeSlice(sliceType, n); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } + _r = r.Intn(i + 1 >> 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + j = _r; + ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = ((j < 0 || j >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + j])); + ((j < 0 || j >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + j] = i); + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return m; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Perm }; } $f._r = _r; $f.i = i; $f.j = j; $f.m = m; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Perm = function(n) { return this.$val.Perm(n); }; + Rand.ptr.prototype.Shuffle = function(n, swap) { + var _r, _r$1, i, j, j$1, n, r, swap, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; i = $f.i; j = $f.j; j$1 = $f.j$1; n = $f.n; r = $f.r; swap = $f.swap; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (n < 0) { + $panic(new $String("invalid argument to Shuffle")); + } + i = n - 1 >> 0; + /* while (true) { */ case 1: + /* if (!(i > 2147483646)) { break; } */ if(!(i > 2147483646)) { $s = 2; continue; } + _r = r.Int63n((new $Int64(0, (i + 1 >> 0)))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + j = (((x = _r, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + $r = swap(i, j); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i - (1) >> 0; + /* } */ $s = 1; continue; case 2: + /* while (true) { */ case 5: + /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 6; continue; } + _r$1 = r.int31n((((i + 1 >> 0) >> 0))); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + j$1 = ((_r$1 >> 0)); + $r = swap(i, j$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = i - (1) >> 0; + /* } */ $s = 5; continue; case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Shuffle }; } $f._r = _r; $f._r$1 = _r$1; $f.i = i; $f.j = j; $f.j$1 = j$1; $f.n = n; $f.r = r; $f.swap = swap; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Shuffle = function(n, swap) { return this.$val.Shuffle(n, swap); }; + Rand.ptr.prototype.Read = function(p) { + var _r, _r$1, _tuple, _tuple$1, _tuple$2, err, lk, n, ok, p, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; lk = $f.lk; n = $f.n; ok = $f.ok; p = $f.p; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + _tuple = $assertType(r.src, ptrType, true); + lk = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r = lk.read(p, (r.$ptr_readVal || (r.$ptr_readVal = new ptrType$2(function() { return this.$target.readVal; }, function($v) { this.$target.readVal = $v; }, r))), (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$1(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 2: + _r$1 = read(p, $methodVal(r, "Int63"), (r.$ptr_readVal || (r.$ptr_readVal = new ptrType$2(function() { return this.$target.readVal; }, function($v) { this.$target.readVal = $v; }, r))), (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$1(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + n = _tuple$2[0]; + err = _tuple$2[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rand.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.lk = lk; $f.n = n; $f.ok = ok; $f.p = p; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rand.prototype.Read = function(p) { return this.$val.Read(p); }; + read = function(p, int63, readVal, readPos) { + var _r, err, int63, n, p, pos, readPos, readVal, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; err = $f.err; int63 = $f.int63; n = $f.n; p = $f.p; pos = $f.pos; readPos = $f.readPos; readVal = $f.readVal; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + pos = readPos.$get(); + val = readVal.$get(); + n = 0; + /* while (true) { */ case 1: + /* if (!(n < p.$length)) { break; } */ if(!(n < p.$length)) { $s = 2; continue; } + /* */ if (pos === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (pos === 0) { */ case 3: + _r = int63(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + val = _r; + pos = 7; + /* } */ case 4: + ((n < 0 || n >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + n] = ((val.$low << 24 >>> 24))); + val = $shiftRightInt64(val, (8)); + pos = pos - (1) << 24 >> 24; + n = n + (1) >> 0; + /* } */ $s = 1; continue; case 2: + readPos.$set(pos); + readVal.$set(val); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: read }; } $f._r = _r; $f.err = err; $f.int63 = int63; $f.n = n; $f.p = p; $f.pos = pos; $f.readPos = readPos; $f.readVal = readVal; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + Int = function() { + var _r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = globalRand.Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int }; } $f._r = _r; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Int = Int; + Intn = function(n) { + var _r, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = globalRand.Intn(n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Intn }; } $f._r = _r; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Intn = Intn; + Float64 = function() { + var _r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = globalRand.Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float64 }; } $f._r = _r; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Float64 = Float64; + lockedSource.ptr.prototype.Int63 = function() { + var _r, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + r = this; + r.lk.Lock(); + _r = r.src.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + n = _r; + r.lk.Unlock(); + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: lockedSource.ptr.prototype.Int63 }; } $f._r = _r; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + lockedSource.prototype.Int63 = function() { return this.$val.Int63(); }; + lockedSource.ptr.prototype.Uint64 = function() { + var _r, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Uint64(0, 0); + r = this; + r.lk.Lock(); + _r = r.src.Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + n = _r; + r.lk.Unlock(); + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: lockedSource.ptr.prototype.Uint64 }; } $f._r = _r; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + lockedSource.prototype.Uint64 = function() { return this.$val.Uint64(); }; + lockedSource.ptr.prototype.Seed = function(seed) { + var r, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; r = $f.r; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + r.lk.Lock(); + $r = r.src.Seed(seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r.lk.Unlock(); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: lockedSource.ptr.prototype.Seed }; } $f.r = r; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + lockedSource.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; + lockedSource.ptr.prototype.seedPos = function(seed, readPos) { + var r, readPos, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; r = $f.r; readPos = $f.readPos; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + r.lk.Lock(); + $r = r.src.Seed(seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + readPos.$set(0); + r.lk.Unlock(); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: lockedSource.ptr.prototype.seedPos }; } $f.r = r; $f.readPos = readPos; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + lockedSource.prototype.seedPos = function(seed, readPos) { return this.$val.seedPos(seed, readPos); }; + lockedSource.ptr.prototype.read = function(p, readVal, readPos) { + var _r, _tuple, err, n, p, r, readPos, readVal, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; r = $f.r; readPos = $f.readPos; readVal = $f.readVal; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + r.lk.Lock(); + _r = read(p, $methodVal(r.src, "Int63"), readVal, readPos); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + r.lk.Unlock(); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: lockedSource.ptr.prototype.read }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.r = r; $f.readPos = readPos; $f.readVal = readVal; $f.$s = $s; $f.$r = $r; return $f; + }; + lockedSource.prototype.read = function(p, readVal, readPos) { return this.$val.read(p, readVal, readPos); }; + seedrand = function(x) { + var _q, _r, hi, lo, x; + hi = (_q = x / 44488, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + lo = (_r = x % 44488, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + x = ($imul(48271, lo)) - ($imul(3399, hi)) >> 0; + if (x < 0) { + x = x + (2147483647) >> 0; + } + return x; + }; + rngSource.ptr.prototype.Seed = function(seed) { + var i, rng, seed, u, x, x$1, x$2, x$3, x$4, x$5; + rng = this; + rng.tap = 0; + rng.feed = 334; + seed = $div64(seed, new $Int64(0, 2147483647), true); + if ((seed.$high < 0 || (seed.$high === 0 && seed.$low < 0))) { + seed = (x = new $Int64(0, 2147483647), new $Int64(seed.$high + x.$high, seed.$low + x.$low)); + } + if ((seed.$high === 0 && seed.$low === 0)) { + seed = new $Int64(0, 89482311); + } + x$1 = (((seed.$low + ((seed.$high >> 31) * 4294967296)) >> 0)); + i = -20; + while (true) { + if (!(i < 607)) { break; } + x$1 = seedrand(x$1); + if (i >= 0) { + u = new $Int64(0, 0); + u = $shiftLeft64((new $Int64(0, x$1)), 40); + x$1 = seedrand(x$1); + u = (x$2 = $shiftLeft64((new $Int64(0, x$1)), 20), new $Int64(u.$high ^ x$2.$high, (u.$low ^ x$2.$low) >>> 0)); + x$1 = seedrand(x$1); + u = (x$3 = (new $Int64(0, x$1)), new $Int64(u.$high ^ x$3.$high, (u.$low ^ x$3.$low) >>> 0)); + u = (x$4 = ((i < 0 || i >= rngCooked.length) ? ($throwRuntimeError("index out of range"), undefined) : rngCooked[i]), new $Int64(u.$high ^ x$4.$high, (u.$low ^ x$4.$low) >>> 0)); + (x$5 = rng.vec, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i] = u)); + } + i = i + (1) >> 0; + } + }; + rngSource.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; + rngSource.ptr.prototype.Int63 = function() { + var rng, x, x$1; + rng = this; + return ((x = (x$1 = rng.Uint64(), new $Uint64(x$1.$high & 2147483647, (x$1.$low & 4294967295) >>> 0)), new $Int64(x.$high, x.$low))); + }; + rngSource.prototype.Int63 = function() { return this.$val.Int63(); }; + rngSource.ptr.prototype.Uint64 = function() { + var rng, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; + rng = this; + rng.tap = rng.tap - (1) >> 0; + if (rng.tap < 0) { + rng.tap = rng.tap + (607) >> 0; + } + rng.feed = rng.feed - (1) >> 0; + if (rng.feed < 0) { + rng.feed = rng.feed + (607) >> 0; + } + x$6 = (x = (x$1 = rng.vec, x$2 = rng.feed, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), x$3 = (x$4 = rng.vec, x$5 = rng.tap, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), new $Int64(x.$high + x$3.$high, x.$low + x$3.$low)); + (x$7 = rng.vec, x$8 = rng.feed, ((x$8 < 0 || x$8 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[x$8] = x$6)); + return (new $Uint64(x$6.$high, x$6.$low)); + }; + rngSource.prototype.Uint64 = function() { return this.$val.Uint64(); }; + ptrType$3.methods = [{prop: "ExpFloat64", name: "ExpFloat64", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "NormFloat64", name: "NormFloat64", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Int31", name: "Int31", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int63n", name: "Int63n", pkg: "", typ: $funcType([$Int64], [$Int64], false)}, {prop: "Int31n", name: "Int31n", pkg: "", typ: $funcType([$Int32], [$Int32], false)}, {prop: "int31n", name: "int31n", pkg: "math/rand", typ: $funcType([$Int32], [$Int32], false)}, {prop: "Intn", name: "Intn", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "Shuffle", name: "Shuffle", pkg: "", typ: $funcType([$Int, funcType], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; + ptrType.methods = [{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "seedPos", name: "seedPos", pkg: "math/rand", typ: $funcType([$Int64, ptrType$1], [], false)}, {prop: "read", name: "read", pkg: "math/rand", typ: $funcType([sliceType$1, ptrType$2, ptrType$1], [$Int, $error], false)}]; + ptrType$5.methods = [{prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}]; + Source.init([{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}]); + Source64.init([{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}]); + Rand.init("math/rand", [{prop: "src", name: "src", embedded: false, exported: false, typ: Source, tag: ""}, {prop: "s64", name: "s64", embedded: false, exported: false, typ: Source64, tag: ""}, {prop: "readVal", name: "readVal", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "readPos", name: "readPos", embedded: false, exported: false, typ: $Int8, tag: ""}]); + lockedSource.init("math/rand", [{prop: "lk", name: "lk", embedded: false, exported: false, typ: nosync.Mutex, tag: ""}, {prop: "src", name: "src", embedded: false, exported: false, typ: Source64, tag: ""}]); + rngSource.init("math/rand", [{prop: "tap", name: "tap", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "feed", name: "feed", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "vec", name: "vec", embedded: false, exported: false, typ: arrayType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = nosync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ke = $toNativeArray($kindUint32, [3801129273, 0, 2615860924, 3279400049, 3571300752, 3733536696, 3836274812, 3906990442, 3958562475, 3997804264, 4028649213, 4053523342, 4074002619, 4091154507, 4105727352, 4118261130, 4129155133, 4138710916, 4147160435, 4154685009, 4161428406, 4167506077, 4173011791, 4178022498, 4182601930, 4186803325, 4190671498, 4194244443, 4197554582, 4200629752, 4203493986, 4206168142, 4208670408, 4211016720, 4213221098, 4215295924, 4217252177, 4219099625, 4220846988, 4222502074, 4224071896, 4225562770, 4226980400, 4228329951, 4229616109, 4230843138, 4232014925, 4233135020, 4234206673, 4235232866, 4236216336, 4237159604, 4238064994, 4238934652, 4239770563, 4240574564, 4241348362, 4242093539, 4242811568, 4243503822, 4244171579, 4244816032, 4245438297, 4246039419, 4246620374, 4247182079, 4247725394, 4248251127, 4248760037, 4249252839, 4249730206, 4250192773, 4250641138, 4251075867, 4251497493, 4251906522, 4252303431, 4252688672, 4253062674, 4253425844, 4253778565, 4254121205, 4254454110, 4254777611, 4255092022, 4255397640, 4255694750, 4255983622, 4256264513, 4256537670, 4256803325, 4257061702, 4257313014, 4257557464, 4257795244, 4258026541, 4258251531, 4258470383, 4258683258, 4258890309, 4259091685, 4259287526, 4259477966, 4259663135, 4259843154, 4260018142, 4260188212, 4260353470, 4260514019, 4260669958, 4260821380, 4260968374, 4261111028, 4261249421, 4261383632, 4261513736, 4261639802, 4261761900, 4261880092, 4261994441, 4262105003, 4262211835, 4262314988, 4262414513, 4262510454, 4262602857, 4262691764, 4262777212, 4262859239, 4262937878, 4263013162, 4263085118, 4263153776, 4263219158, 4263281289, 4263340187, 4263395872, 4263448358, 4263497660, 4263543789, 4263586755, 4263626565, 4263663224, 4263696735, 4263727099, 4263754314, 4263778377, 4263799282, 4263817020, 4263831582, 4263842955, 4263851124, 4263856071, 4263857776, 4263856218, 4263851370, 4263843206, 4263831695, 4263816804, 4263798497, 4263776735, 4263751476, 4263722676, 4263690284, 4263654251, 4263614520, 4263571032, 4263523724, 4263472530, 4263417377, 4263358192, 4263294892, 4263227394, 4263155608, 4263079437, 4262998781, 4262913534, 4262823581, 4262728804, 4262629075, 4262524261, 4262414220, 4262298801, 4262177846, 4262051187, 4261918645, 4261780032, 4261635148, 4261483780, 4261325704, 4261160681, 4260988457, 4260808763, 4260621313, 4260425802, 4260221905, 4260009277, 4259787550, 4259556329, 4259315195, 4259063697, 4258801357, 4258527656, 4258242044, 4257943926, 4257632664, 4257307571, 4256967906, 4256612870, 4256241598, 4255853155, 4255446525, 4255020608, 4254574202, 4254106002, 4253614578, 4253098370, 4252555662, 4251984571, 4251383021, 4250748722, 4250079132, 4249371435, 4248622490, 4247828790, 4246986404, 4246090910, 4245137315, 4244119963, 4243032411, 4241867296, 4240616155, 4239269214, 4237815118, 4236240596, 4234530035, 4232664930, 4230623176, 4228378137, 4225897409, 4223141146, 4220059768, 4216590757, 4212654085, 4208145538, 4202926710, 4196809522, 4189531420, 4180713890, 4169789475, 4155865042, 4137444620, 4111806704, 4073393724, 4008685917, 3873074895]); + we = $toNativeArray($kindFloat32, [2.0249555365836613e-09, 1.4866739783681027e-11, 2.4409616689036184e-11, 3.1968806074589295e-11, 3.844677007314168e-11, 4.42282044321729e-11, 4.951644302919611e-11, 5.443358958023836e-11, 5.905943789574764e-11, 6.34494193296753e-11, 6.764381416113352e-11, 7.167294535648239e-11, 7.556032188826833e-11, 7.932458162551725e-11, 8.298078890689453e-11, 8.654132271912474e-11, 9.001651507523079e-11, 9.341507428706208e-11, 9.674443190998971e-11, 1.0001099254308699e-10, 1.0322031424037093e-10, 1.0637725422757427e-10, 1.0948611461891744e-10, 1.1255067711157807e-10, 1.1557434870246297e-10, 1.1856014781042035e-10, 1.2151082917633005e-10, 1.2442885610752796e-10, 1.2731647680563896e-10, 1.3017574518325858e-10, 1.330085347417409e-10, 1.3581656632677408e-10, 1.386014220061682e-10, 1.413645728254309e-10, 1.4410737880776736e-10, 1.4683107507629245e-10, 1.4953686899854546e-10, 1.522258291641876e-10, 1.5489899640730442e-10, 1.575573282952547e-10, 1.6020171300645814e-10, 1.628330109637588e-10, 1.6545202707884954e-10, 1.68059510752272e-10, 1.7065616975120435e-10, 1.73242697965037e-10, 1.758197337720091e-10, 1.783878739169964e-10, 1.8094774290045024e-10, 1.834998542005195e-10, 1.8604476292871652e-10, 1.8858298256319017e-10, 1.9111498494872592e-10, 1.9364125580789704e-10, 1.9616222535212557e-10, 1.9867835154840918e-10, 2.011900368525943e-10, 2.0369768372052732e-10, 2.062016807302669e-10, 2.0870240258208383e-10, 2.1120022397624894e-10, 2.136955057352452e-10, 2.1618855317040442e-10, 2.1867974098199738e-10, 2.2116936060356807e-10, 2.2365774510202385e-10, 2.2614519978869652e-10, 2.2863201609713002e-10, 2.3111849933865614e-10, 2.3360494094681883e-10, 2.3609159072179864e-10, 2.3857874009713953e-10, 2.4106666662859766e-10, 2.4355562011635357e-10, 2.460458781161634e-10, 2.485376904282077e-10, 2.5103127909709144e-10, 2.5352694943414633e-10, 2.560248957284017e-10, 2.585253955356137e-10, 2.610286709003873e-10, 2.6353494386732734e-10, 2.6604446423661443e-10, 2.6855745405285347e-10, 2.71074163116225e-10, 2.7359478571575835e-10, 2.7611959940720965e-10, 2.786487707240326e-10, 2.8118254946640775e-10, 2.8372118543451563e-10, 2.8626484516180994e-10, 2.8881380620404684e-10, 2.9136826285025563e-10, 2.9392840938946563e-10, 2.96494523377433e-10, 2.990667713476114e-10, 3.016454031001814e-10, 3.042306406797479e-10, 3.068226783753403e-10, 3.09421765987139e-10, 3.12028125559749e-10, 3.1464195138219964e-10, 3.17263521010247e-10, 3.1989300097734485e-10, 3.225306410836737e-10, 3.2517669112941405e-10, 3.2783134540359526e-10, 3.3049485370639786e-10, 3.3316743808242677e-10, 3.3584937608743815e-10, 3.385408342548857e-10, 3.4124211789610115e-10, 3.4395342130011386e-10, 3.4667499426710435e-10, 3.494071143528288e-10, 3.521500313574677e-10, 3.54903967325626e-10, 3.576691720574843e-10, 3.6044595086437425e-10, 3.632345535464765e-10, 3.660352021483959e-10, 3.688482297370399e-10, 3.716738583570134e-10, 3.7451239331964814e-10, 3.773641121807003e-10, 3.802292924959261e-10, 3.831082673322328e-10, 3.8600128648980103e-10, 3.8890865527996255e-10, 3.9183070676962473e-10, 3.9476774627011935e-10, 3.977200790927782e-10, 4.006880383045086e-10, 4.0367195697221803e-10, 4.066721681628138e-10, 4.0968900494320337e-10, 4.127228558914453e-10, 4.15774054074447e-10, 4.188429603146915e-10, 4.2192993543466173e-10, 4.25035395767992e-10, 4.2815970213716525e-10, 4.313032986313914e-10, 4.3446651831757777e-10, 4.376498607960855e-10, 4.408536868893975e-10, 4.4407846844229937e-10, 4.4732464954400086e-10, 4.5059267428371186e-10, 4.538830145062178e-10, 4.5719619756745544e-10, 4.605326675566346e-10, 4.638929240741163e-10, 4.672775499869886e-10, 4.706869893844612e-10, 4.74121908400349e-10, 4.775827511238617e-10, 4.810701836888143e-10, 4.845848167178701e-10, 4.881271498113904e-10, 4.916979601254923e-10, 4.952977472605369e-10, 4.989272883726414e-10, 5.025872495956207e-10, 5.062783525744408e-10, 5.100013189540675e-10, 5.13756870379467e-10, 5.175458395179078e-10, 5.21369003525507e-10, 5.252272505806843e-10, 5.29121357839557e-10, 5.330522134805449e-10, 5.3702081670437e-10, 5.41028055689452e-10, 5.450749851476644e-10, 5.491624932574268e-10, 5.532918012640664e-10, 5.574638528571541e-10, 5.616799247931681e-10, 5.659410717839819e-10, 5.702485705860738e-10, 5.746036979559221e-10, 5.790077306500052e-10, 5.83462111958255e-10, 5.879682296594524e-10, 5.925275825546805e-10, 5.971417249561739e-10, 6.01812211176167e-10, 6.065408175714992e-10, 6.113292094767075e-10, 6.16179329782085e-10, 6.21092954844471e-10, 6.260721940876124e-10, 6.311191569352559e-10, 6.362359528111483e-10, 6.414249686947926e-10, 6.466885360545405e-10, 6.520292639144998e-10, 6.574497612987784e-10, 6.629528592760892e-10, 6.685415554485985e-10, 6.742187919073217e-10, 6.799880103436351e-10, 6.858525969377638e-10, 6.918161599145378e-10, 6.978825850545434e-10, 7.040559801829716e-10, 7.103406751696184e-10, 7.167412219288849e-10, 7.232625609532306e-10, 7.2990985477972e-10, 7.366885990123251e-10, 7.436047333442275e-10, 7.506645305355164e-10, 7.57874762946642e-10, 7.652426470272644e-10, 7.727759543385559e-10, 7.804830115532013e-10, 7.883728114777e-10, 7.964550685635174e-10, 8.047402189070851e-10, 8.132396422944055e-10, 8.219657177122031e-10, 8.309318788590758e-10, 8.401527806789488e-10, 8.496445214056791e-10, 8.594246980742071e-10, 8.695127395874636e-10, 8.799300732498239e-10, 8.90700457834015e-10, 9.01850316648023e-10, 9.134091816243028e-10, 9.254100818978372e-10, 9.37890431984556e-10, 9.508922538259412e-10, 9.64463842123564e-10, 9.78660263939446e-10, 9.935448019859905e-10, 1.0091912860943353e-09, 1.0256859805934937e-09, 1.0431305819125214e-09, 1.0616465484503124e-09, 1.0813799855569073e-09, 1.1025096391392708e-09, 1.1252564435793033e-09, 1.149898620766976e-09, 1.176793218427008e-09, 1.2064089727203964e-09, 1.2393785997488749e-09, 1.2765849488616254e-09, 1.319313880365769e-09, 1.36954347862428e-09, 1.4305497897382224e-09, 1.5083649884672923e-09, 1.6160853766322703e-09, 1.7921247819074893e-09]); + fe = $toNativeArray($kindFloat32, [1, 0.9381436705589294, 0.900469958782196, 0.8717043399810791, 0.847785472869873, 0.8269932866096497, 0.8084216713905334, 0.7915276288986206, 0.7759568691253662, 0.7614634037017822, 0.7478685975074768, 0.7350381016731262, 0.7228676676750183, 0.7112747430801392, 0.7001926302909851, 0.6895664930343628, 0.6793505549430847, 0.669506311416626, 0.6600008606910706, 0.6508058309555054, 0.6418967247009277, 0.633251965045929, 0.62485271692276, 0.6166821718215942, 0.608725368976593, 0.6009689569473267, 0.5934008955955505, 0.5860103368759155, 0.5787873864173889, 0.5717230439186096, 0.5648092031478882, 0.5580382943153381, 0.5514034032821655, 0.5448982119560242, 0.5385168790817261, 0.5322538614273071, 0.526104211807251, 0.5200631618499756, 0.5141264200210571, 0.5082897543907166, 0.5025495290756226, 0.4969019889831543, 0.4913438558578491, 0.4858720004558563, 0.48048335313796997, 0.4751752018928528, 0.4699448347091675, 0.4647897481918335, 0.4597076177597046, 0.4546961486339569, 0.4497532546520233, 0.44487687945365906, 0.4400651156902313, 0.4353161156177521, 0.4306281507015228, 0.42599955201148987, 0.42142874002456665, 0.4169141948223114, 0.4124544560909271, 0.40804818272590637, 0.4036940038204193, 0.39939069747924805, 0.3951369822025299, 0.39093172550201416, 0.38677382469177246, 0.38266217708587646, 0.378595769405365, 0.37457355856895447, 0.37059465050697327, 0.366658091545105, 0.362762987613678, 0.358908474445343, 0.35509374737739563, 0.35131800174713135, 0.3475804924964905, 0.34388044476509094, 0.34021714329719543, 0.33658990263938904, 0.3329980671405792, 0.3294409513473511, 0.32591795921325684, 0.32242849469184875, 0.3189719021320343, 0.3155476748943329, 0.31215524673461914, 0.3087940812110901, 0.30546361207962036, 0.30216339230537415, 0.29889291524887085, 0.29565170407295227, 0.2924392819404602, 0.2892552316188812, 0.28609907627105713, 0.2829704284667969, 0.27986884117126465, 0.2767939269542694, 0.2737452983856201, 0.2707225978374481, 0.26772540807724, 0.26475343108177185, 0.2618062496185303, 0.258883535861969, 0.2559850215911865, 0.25311028957366943, 0.25025907158851624, 0.24743106961250305, 0.2446259707212448, 0.24184346199035645, 0.23908329010009766, 0.23634515702724457, 0.2336287796497345, 0.23093391954898834, 0.22826029360294342, 0.22560766339302063, 0.22297576069831848, 0.22036437690258026, 0.21777324378490448, 0.21520215272903442, 0.212650865316391, 0.21011915802955627, 0.20760682225227356, 0.20511364936828613, 0.20263944566249847, 0.20018397271633148, 0.19774706661701202, 0.1953285187482834, 0.19292815029621124, 0.19054576754570007, 0.18818120658397675, 0.18583425879478455, 0.18350479006767273, 0.18119260668754578, 0.17889754474163055, 0.17661945521831512, 0.17435817420482635, 0.1721135377883911, 0.16988539695739746, 0.16767361760139465, 0.16547803580760956, 0.16329853236675262, 0.16113494336605072, 0.1589871346950531, 0.15685498714447021, 0.15473836660385132, 0.15263713896274567, 0.1505511850118637, 0.1484803706407547, 0.14642459154129028, 0.1443837285041809, 0.14235764741897583, 0.1403462439775467, 0.13834942877292633, 0.136367067694664, 0.13439907133579254, 0.1324453204870224, 0.1305057406425476, 0.12858019769191742, 0.12666863203048706, 0.12477091699838638, 0.12288697808980942, 0.1210167184472084, 0.11916005611419678, 0.11731690168380737, 0.11548716574907303, 0.11367076635360718, 0.11186762899160385, 0.11007767915725708, 0.1083008274435997, 0.10653700679540634, 0.10478614270687103, 0.1030481606721878, 0.10132300108671188, 0.0996105819940567, 0.09791085124015808, 0.09622374176979065, 0.09454918652772903, 0.09288713335990906, 0.09123751521110535, 0.08960027992725372, 0.08797537535429001, 0.08636274188756943, 0.0847623273730278, 0.08317409455776215, 0.08159798383712769, 0.08003395050764084, 0.07848194986581802, 0.07694194465875626, 0.07541389018297195, 0.07389774918556213, 0.07239348441362381, 0.070901058614254, 0.06942043453454971, 0.06795158982276917, 0.06649449467658997, 0.06504911929368973, 0.06361543387174606, 0.06219341605901718, 0.06078304722905159, 0.0593843050301075, 0.05799717456102371, 0.05662164092063904, 0.05525768920779228, 0.05390531197190285, 0.05256449431180954, 0.05123523622751236, 0.04991753399372101, 0.04861138388514519, 0.047316793352365494, 0.04603376239538193, 0.044762298464775085, 0.04350241273641586, 0.04225412383675575, 0.04101744294166565, 0.039792392402887344, 0.03857899457216263, 0.03737728297710419, 0.03618728369474411, 0.03500903770327568, 0.03384258225560188, 0.0326879620552063, 0.031545232981443405, 0.030414443463087082, 0.0292956605553627, 0.028188949450850487, 0.027094384655356407, 0.02601204626262188, 0.024942025542259216, 0.023884421214461327, 0.022839335724711418, 0.021806888282299042, 0.020787203684449196, 0.019780423492193222, 0.018786700442433357, 0.017806200310587883, 0.016839107498526573, 0.015885621309280396, 0.014945968054234982, 0.01402039173990488, 0.013109165243804455, 0.012212592177093029, 0.011331013403832912, 0.010464809834957123, 0.009614413604140282, 0.008780314587056637, 0.007963077165186405, 0.007163353264331818, 0.0063819061033427715, 0.005619642324745655, 0.004877655766904354, 0.004157294984906912, 0.003460264764726162, 0.0027887988835573196, 0.0021459676790982485, 0.001536299823783338, 0.0009672692976891994, 0.0004541343660093844]); + kn = $toNativeArray($kindUint32, [1991057938, 0, 1611602771, 1826899878, 1918584482, 1969227037, 2001281515, 2023368125, 2039498179, 2051788381, 2061460127, 2069267110, 2075699398, 2081089314, 2085670119, 2089610331, 2093034710, 2096037586, 2098691595, 2101053571, 2103168620, 2105072996, 2106796166, 2108362327, 2109791536, 2111100552, 2112303493, 2113412330, 2114437283, 2115387130, 2116269447, 2117090813, 2117856962, 2118572919, 2119243101, 2119871411, 2120461303, 2121015852, 2121537798, 2122029592, 2122493434, 2122931299, 2123344971, 2123736059, 2124106020, 2124456175, 2124787725, 2125101763, 2125399283, 2125681194, 2125948325, 2126201433, 2126441213, 2126668298, 2126883268, 2127086657, 2127278949, 2127460589, 2127631985, 2127793506, 2127945490, 2128088244, 2128222044, 2128347141, 2128463758, 2128572095, 2128672327, 2128764606, 2128849065, 2128925811, 2128994934, 2129056501, 2129110560, 2129157136, 2129196237, 2129227847, 2129251929, 2129268426, 2129277255, 2129278312, 2129271467, 2129256561, 2129233410, 2129201800, 2129161480, 2129112170, 2129053545, 2128985244, 2128906855, 2128817916, 2128717911, 2128606255, 2128482298, 2128345305, 2128194452, 2128028813, 2127847342, 2127648860, 2127432031, 2127195339, 2126937058, 2126655214, 2126347546, 2126011445, 2125643893, 2125241376, 2124799783, 2124314271, 2123779094, 2123187386, 2122530867, 2121799464, 2120980787, 2120059418, 2119015917, 2117825402, 2116455471, 2114863093, 2112989789, 2110753906, 2108037662, 2104664315, 2100355223, 2094642347, 2086670106, 2074676188, 2054300022, 2010539237]); + wn = $toNativeArray($kindFloat32, [1.7290404663583558e-09, 1.2680928529462676e-10, 1.689751810696194e-10, 1.9862687883343e-10, 2.223243117382978e-10, 2.4244936613904144e-10, 2.601613091623989e-10, 2.761198769629658e-10, 2.9073962681813725e-10, 3.042996965518796e-10, 3.169979556627567e-10, 3.289802041894774e-10, 3.4035738116777736e-10, 3.5121602848242617e-10, 3.61625090983253e-10, 3.7164057942185025e-10, 3.813085680537398e-10, 3.906675816178762e-10, 3.997501218933053e-10, 4.0858399996679395e-10, 4.1719308563337165e-10, 4.255982233303257e-10, 4.3381759295968436e-10, 4.4186720948857783e-10, 4.497613115272969e-10, 4.57512583373898e-10, 4.6513240481438345e-10, 4.726310454117311e-10, 4.800177477726209e-10, 4.873009773476156e-10, 4.944885056978876e-10, 5.015873272284921e-10, 5.086040477664255e-10, 5.155446070048697e-10, 5.224146670812502e-10, 5.292193350214802e-10, 5.359634958068682e-10, 5.426517013518151e-10, 5.492881705038144e-10, 5.558769555769061e-10, 5.624218868405251e-10, 5.689264614971989e-10, 5.75394121238304e-10, 5.818281967329142e-10, 5.882316855831959e-10, 5.946076964136182e-10, 6.009590047817426e-10, 6.072883862451306e-10, 6.135985053390414e-10, 6.19892026598734e-10, 6.261713370037114e-10, 6.324390455780815e-10, 6.386973727678935e-10, 6.449488165749528e-10, 6.511955974453087e-10, 6.574400468473129e-10, 6.636843297158634e-10, 6.699307220081607e-10, 6.761814441702541e-10, 6.824387166481927e-10, 6.887046488657234e-10, 6.949815167800466e-10, 7.012714853260604e-10, 7.075767749498141e-10, 7.13899661608508e-10, 7.202424212593428e-10, 7.266072743483676e-10, 7.329966078550854e-10, 7.394128087589991e-10, 7.458582640396116e-10, 7.523354716987285e-10, 7.588469852493063e-10, 7.653954137154528e-10, 7.719834771435785e-10, 7.786139510912449e-10, 7.852897221383159e-10, 7.920137878869582e-10, 7.987892014504894e-10, 8.056192379868321e-10, 8.125072836762115e-10, 8.194568912323064e-10, 8.264716688799467e-10, 8.3355555791087e-10, 8.407127216614185e-10, 8.479473234679347e-10, 8.552640262671218e-10, 8.626675485068347e-10, 8.701631637464402e-10, 8.777562010564566e-10, 8.854524335966119e-10, 8.932581896381464e-10, 9.011799639857543e-10, 9.092249730890956e-10, 9.174008219758889e-10, 9.25715837318819e-10, 9.341788453909317e-10, 9.42799727177146e-10, 9.515889187738935e-10, 9.605578554783278e-10, 9.697193048552322e-10, 9.790869226478094e-10, 9.886760299337993e-10, 9.985036131254788e-10, 1.008588212947359e-09, 1.0189509236369076e-09, 1.0296150598776421e-09, 1.040606933955246e-09, 1.0519566329136865e-09, 1.0636980185552147e-09, 1.0758701707302976e-09, 1.0885182755160372e-09, 1.101694735439196e-09, 1.115461056855338e-09, 1.1298901814171813e-09, 1.1450695946990663e-09, 1.1611052119775422e-09, 1.178127595480305e-09, 1.1962995039027646e-09, 1.2158286599728285e-09, 1.2369856250415978e-09, 1.2601323318151003e-09, 1.2857697129220469e-09, 1.3146201904845611e-09, 1.3477839955200466e-09, 1.3870635751089821e-09, 1.43574030442295e-09, 1.5008658760251592e-09, 1.6030947680434338e-09]); + fn = $toNativeArray($kindFloat32, [1, 0.963599681854248, 0.9362826943397522, 0.9130436182022095, 0.8922816514968872, 0.8732430338859558, 0.8555005788803101, 0.8387836217880249, 0.8229072093963623, 0.8077383041381836, 0.7931770086288452, 0.7791460752487183, 0.7655841708183289, 0.7524415850639343, 0.7396772503852844, 0.7272568941116333, 0.7151514887809753, 0.7033361196517944, 0.6917891502380371, 0.6804918646812439, 0.6694276928901672, 0.6585819721221924, 0.6479418277740479, 0.6374954581260681, 0.6272324919700623, 0.6171433925628662, 0.6072195172309875, 0.5974531769752502, 0.5878370404243469, 0.5783646702766418, 0.5690299868583679, 0.5598273873329163, 0.550751805305481, 0.5417983531951904, 0.5329626798629761, 0.5242405533790588, 0.5156282186508179, 0.5071220397949219, 0.49871864914894104, 0.4904148280620575, 0.48220765590667725, 0.47409430146217346, 0.466072142124176, 0.45813870429992676, 0.45029163360595703, 0.44252872467041016, 0.4348478317260742, 0.42724698781967163, 0.41972434520721436, 0.41227802634239197, 0.40490642189979553, 0.39760786294937134, 0.3903807997703552, 0.3832238018512726, 0.3761354684829712, 0.3691144585609436, 0.36215949058532715, 0.3552693724632263, 0.3484429717063904, 0.3416791558265686, 0.33497685194015503, 0.32833510637283325, 0.3217529058456421, 0.3152293860912323, 0.30876362323760986, 0.3023548424243927, 0.2960021495819092, 0.2897048592567444, 0.28346219658851624, 0.2772735059261322, 0.271138072013855, 0.2650552988052368, 0.25902456045150757, 0.25304529070854187, 0.24711695313453674, 0.24123899638652802, 0.23541094362735748, 0.22963231801986694, 0.22390270233154297, 0.21822164952754974, 0.21258877217769623, 0.20700371265411377, 0.20146611332893372, 0.1959756463766098, 0.19053204357624054, 0.18513499200344086, 0.17978426814079285, 0.1744796335697174, 0.16922089457511902, 0.16400785744190216, 0.1588403731584549, 0.15371830761432648, 0.14864157140254974, 0.14361007511615753, 0.13862377405166626, 0.13368265330791473, 0.12878671288490295, 0.12393598258495331, 0.11913054436445236, 0.11437050998210907, 0.10965602099895477, 0.1049872562289238, 0.10036443918943405, 0.09578784555196762, 0.09125780314207077, 0.08677466958761215, 0.08233889937400818, 0.07795098423957825, 0.07361150532960892, 0.06932111829519272, 0.06508058309555054, 0.06089077144861221, 0.05675266310572624, 0.05266740173101425, 0.048636294901371, 0.044660862535238266, 0.040742866694927216, 0.03688438981771469, 0.03308788686990738, 0.029356317594647408, 0.025693291798233986, 0.02210330404341221, 0.018592102453112602, 0.015167297795414925, 0.011839478276669979, 0.0086244847625494, 0.005548994988203049, 0.0026696291752159595]); + rngCooked = $toNativeArray($kindInt64, [new $Int64(-973649357, 3952672746), new $Int64(-1065661887, 3130416987), new $Int64(324977939, 3414273807), new $Int64(1241840476, 2806224363), new $Int64(-1477934308, 1997590414), new $Int64(2103305448, 2402795971), new $Int64(1663160183, 1140819369), new $Int64(1120601685, 1788868961), new $Int64(1848035537, 1089001426), new $Int64(1235702047, 873593504), new $Int64(1911387977, 581324885), new $Int64(-1654874170, 1609182556), new $Int64(1069394745, 1241596776), new $Int64(1895445337, 1771189259), new $Int64(-1374618802, 3467012610), new $Int64(-140526423, 2344407434), new $Int64(-1745367887, 782467244), new $Int64(26335124, 3404933915), new $Int64(1063924276, 618867887), new $Int64(-968700782, 520164395), new $Int64(-1591572833, 1341358184), new $Int64(-1515085039, 665794848), new $Int64(1527227641, 3183648150), new $Int64(1781176124, 696329606), new $Int64(1789146075, 4151988961), new $Int64(-2087444114, 998951326), new $Int64(-612324923, 1364957564), new $Int64(63173359, 4090230633), new $Int64(-1498029007, 4009697548), new $Int64(248009524, 2569622517), new $Int64(778703922, 3742421481), new $Int64(-1109106023, 1506914633), new $Int64(1738099768, 1983412561), new $Int64(236311649, 1436266083), new $Int64(-1111517500, 3922894967), new $Int64(-1336974714, 1792680179), new $Int64(563141142, 1188796351), new $Int64(1349617468, 405968250), new $Int64(1044074554, 433754187), new $Int64(870549669, 4073162024), new $Int64(-1094251604, 433121399), new $Int64(2451824, 4162580594), new $Int64(-137262572, 4132415622), new $Int64(-1536231048, 3033822028), new $Int64(2016407895, 824682382), new $Int64(2366218, 3583765414), new $Int64(-624604839, 535386927), new $Int64(1637219058, 2286693689), new $Int64(1453075389, 2968466525), new $Int64(193683513, 1351410206), new $Int64(-283806096, 1412813499), new $Int64(492736522, 4126267639), new $Int64(512765208, 2105529399), new $Int64(2132966268, 2413882233), new $Int64(947457634, 32226200), new $Int64(1149341356, 2032329073), new $Int64(106485445, 1356518208), new $Int64(-2067810156, 3430061722), new $Int64(-1484435135, 3820169661), new $Int64(-1665985194, 2981816134), new $Int64(1017155588, 4184371017), new $Int64(206574701, 2119206761), new $Int64(-852109057, 2472200560), new $Int64(-560457548, 2853524696), new $Int64(1307803389, 1681119904), new $Int64(-174986835, 95608918), new $Int64(392686347, 3690479145), new $Int64(-1205570926, 1397922290), new $Int64(-1159314025, 1516129515), new $Int64(-320178155, 1547420459), new $Int64(1311333971, 1470949486), new $Int64(-1953469798, 1336785672), new $Int64(-45086614, 4131677129), new $Int64(-1392278100, 4246329084), new $Int64(-1142500187, 3788585631), new $Int64(-66478285, 3080389532), new $Int64(-646438364, 2215402037), new $Int64(391002300, 1171593935), new $Int64(1408774047, 1423855166), new $Int64(-519177718, 2276716302), new $Int64(-368453140, 2068027241), new $Int64(1369359303, 3427553297), new $Int64(189241615, 3289637845), new $Int64(1057480830, 3486407650), new $Int64(-1512910664, 3071877822), new $Int64(1159653919, 3363620705), new $Int64(-934256930, 4159821533), new $Int64(-76621938, 1894661), new $Int64(-674493898, 1156868282), new $Int64(348271067, 776219088), new $Int64(-501428838, 2425634259), new $Int64(1716021749, 680510161), new $Int64(-574263456, 1310101429), new $Int64(1095885995, 2964454134), new $Int64(-325695512, 3467098407), new $Int64(1990672920, 2109628894), new $Int64(-2139648704, 1232604732), new $Int64(-1838070714, 3261916179), new $Int64(1699175360, 434597899), new $Int64(235436061, 1624796439), new $Int64(-1626402839, 3589632480), new $Int64(1198416575, 864579159), new $Int64(-1938748161, 1380889830), new $Int64(619206309, 2654509477), new $Int64(1419738251, 1468209306), new $Int64(-1744284772, 100794388), new $Int64(-1191421458, 2991674471), new $Int64(-208666741, 2224662036), new $Int64(-173659161, 977097250), new $Int64(1351320195, 726419512), new $Int64(-183459897, 1747974366), new $Int64(-753095183, 1556430604), new $Int64(-1049492215, 1080776742), new $Int64(-385846958, 280794874), new $Int64(117767733, 919835643), new $Int64(-967009426, 3434019658), new $Int64(-1951414480, 2461941785), new $Int64(133215641, 3615001066), new $Int64(417204809, 3103414427), new $Int64(790056561, 3380809712), new $Int64(-1267681408, 2724693469), new $Int64(547796833, 598827710), new $Int64(-1846559452, 3452273442), new $Int64(-75778224, 649274915), new $Int64(-801301329, 2585724112), new $Int64(-1510934263, 3165579553), new $Int64(1185578221, 2635894283), new $Int64(-52910178, 2053289721), new $Int64(985976581, 3169337108), new $Int64(1170569632, 144717764), new $Int64(1079216270, 1383666384), new $Int64(-124804942, 681540375), new $Int64(1375448925, 537050586), new $Int64(-1964768344, 315246468), new $Int64(226402871, 849323088), new $Int64(-885062465, 45543944), new $Int64(-946445250, 2319052083), new $Int64(-40708194, 3613090841), new $Int64(560472520, 2992171180), new $Int64(-381863169, 2068244785), new $Int64(917538188, 4239862634), new $Int64(-1369555809, 3892253031), new $Int64(720683925, 958186149), new $Int64(-423297785, 1877702262), new $Int64(1357886971, 837674867), new $Int64(1837048883, 1507589294), new $Int64(1905518400, 873336795), new $Int64(-1879761037, 2764496274), new $Int64(-1806480530, 4196182374), new $Int64(-1066765755, 550964545), new $Int64(818747069, 420611474), new $Int64(-1924830376, 204265180), new $Int64(1549974541, 1787046383), new $Int64(1215581865, 3102292318), new $Int64(418321538, 1552199393), new $Int64(1243493047, 980542004), new $Int64(267284263, 3293718720), new $Int64(1179528763, 3771917473), new $Int64(599484404, 2195808264), new $Int64(252818753, 3894702887), new $Int64(-1367475956, 2099949527), new $Int64(1424094358, 338442522), new $Int64(490737398, 637158004), new $Int64(-1727621530, 281976339), new $Int64(574970164, 3619802330), new $Int64(-431930823, 3084554784), new $Int64(-1264611183, 4129772886), new $Int64(-2104399043, 1680378557), new $Int64(-1621962591, 3339087776), new $Int64(1680500332, 4220317857), new $Int64(-1935828963, 2959322499), new $Int64(1675600481, 1488354890), new $Int64(-834863562, 3958162143), new $Int64(-1226511573, 2773705983), new $Int64(1876039582, 225908689), new $Int64(-1183735113, 908216283), new $Int64(-605696219, 3574646075), new $Int64(-1827723091, 1936937569), new $Int64(1519770881, 75492235), new $Int64(816689472, 1935193178), new $Int64(2142521206, 2018250883), new $Int64(455141620, 3943126022), new $Int64(-601399488, 3066544345), new $Int64(1932392669, 2793082663), new $Int64(-1239009361, 3297036421), new $Int64(1640597065, 2206987825), new $Int64(-553246738, 807894872), new $Int64(-1781325307, 766252117), new $Int64(2060649606, 3833114345), new $Int64(845619743, 1255067973), new $Int64(1201145605, 741697208), new $Int64(-1476242608, 2810093753), new $Int64(1109032642, 4229340371), new $Int64(1462188720, 1361684224), new $Int64(-1159399429, 1906263026), new $Int64(475781207, 3904421704), new $Int64(-623537128, 1769075545), new $Int64(1062308525, 2621599764), new $Int64(1279509432, 3431891480), new $Int64(-1742751146, 1871896503), new $Int64(128756421, 1412808876), new $Int64(1605404688, 952876175), new $Int64(-230443691, 1824438899), new $Int64(1662295856, 1005035476), new $Int64(-156574141, 527508597), new $Int64(1288873303, 3066806859), new $Int64(565995893, 3244940914), new $Int64(-889746188, 209092916), new $Int64(-247669406, 1242699167), new $Int64(-713830396, 456723774), new $Int64(1776978905, 1001252870), new $Int64(1468772157, 2026725874), new $Int64(857254202, 2137562569), new $Int64(765939740, 3183366709), new $Int64(1533887628, 2612072960), new $Int64(56977098, 1727148468), new $Int64(-1197583895, 3803658212), new $Int64(1883670356, 479946959), new $Int64(685713571, 1562982345), new $Int64(-1946242443, 1766109365), new $Int64(700596547, 3257093788), new $Int64(-184714929, 2365720207), new $Int64(93384808, 3742754173), new $Int64(-458385235, 2878193673), new $Int64(1096135042, 2174002182), new $Int64(-834260953, 3573511231), new $Int64(-754572527, 1760299077), new $Int64(-1375627191, 2260779833), new $Int64(-866019274, 1452805722), new $Int64(-1229671918, 2940011802), new $Int64(1890251082, 1886183802), new $Int64(893897673, 2514369088), new $Int64(1644345561, 3924317791), new $Int64(-1974867432, 500935732), new $Int64(1403501753, 676580929), new $Int64(-1565912283, 1184984890), new $Int64(-691968413, 1271474274), new $Int64(-1828754738, 3163791473), new $Int64(2051027584, 2842487377), new $Int64(1511537551, 2170968612), new $Int64(573262976, 3535856740), new $Int64(-2053227187, 1488599718), new $Int64(-1180531831, 3408913763), new $Int64(-2086531912, 2501050084), new $Int64(-875130448, 1639124157), new $Int64(-2009482504, 4088176393), new $Int64(1574896563, 3989947576), new $Int64(-165243708, 3414355209), new $Int64(-792329287, 2275136352), new $Int64(-2057774345, 2151835223), new $Int64(-931144933, 1654534827), new $Int64(-679921451, 377892833), new $Int64(-482716010, 660204544), new $Int64(85706799, 390828249), new $Int64(-1422172693, 3402783878), new $Int64(-1468634160, 3717936603), new $Int64(1113532086, 2211058823), new $Int64(1564224320, 2692150867), new $Int64(1952770442, 1928910388), new $Int64(788716862, 3931011137), new $Int64(1083670504, 1112701047), new $Int64(-68150572, 2452299106), new $Int64(-896164822, 2337204777), new $Int64(1774877857, 273889282), new $Int64(1798719843, 1462008793), new $Int64(2138834788, 1554494002), new $Int64(-1194967131, 182675323), new $Int64(-1598554764, 1882802136), new $Int64(589279648, 3700220025), new $Int64(381039426, 3083431543), new $Int64(-851859191, 3622207527), new $Int64(338126939, 432729309), new $Int64(-1667470126, 2391914317), new $Int64(-1849558151, 235747924), new $Int64(2120733629, 3088823825), new $Int64(-745079795, 2314658321), new $Int64(1165929723, 2957634338), new $Int64(501323675, 4117056981), new $Int64(1564699815, 1482500298), new $Int64(-740826490, 840489337), new $Int64(799522364, 3483178565), new $Int64(532129761, 2074004656), new $Int64(724246478, 3643392642), new $Int64(-665153481, 1583624461), new $Int64(-885822954, 287473085), new $Int64(1667835381, 3136843981), new $Int64(1138806821, 1266970974), new $Int64(135185781, 1998688839), new $Int64(392094735, 1492900209), new $Int64(1031326774, 1538112737), new $Int64(-2070568842, 2207265429), new $Int64(-1886797613, 963263315), new $Int64(1671145500, 2295892134), new $Int64(1068469660, 2002560897), new $Int64(-356250305, 1369254035), new $Int64(33436120, 3353312708), new $Int64(57507843, 947771099), new $Int64(-1945755145, 1747061399), new $Int64(1507240140, 2047354631), new $Int64(720000810, 4165367136), new $Int64(479265078, 3388864963), new $Int64(-952181250, 286492130), new $Int64(2045622690, 2795735007), new $Int64(-715730566, 3703961339), new $Int64(-148436487, 1797825479), new $Int64(1429039600, 1116589674), new $Int64(-1665420098, 2593309206), new $Int64(1329049334, 3404995677), new $Int64(-750579440, 3453462936), new $Int64(1014767077, 3016498634), new $Int64(75698599, 1650371545), new $Int64(1592007860, 212344364), new $Int64(1127766888, 3843932156), new $Int64(-748019856, 3573129983), new $Int64(-890581831, 665897820), new $Int64(1071492673, 1675628772), new $Int64(243225682, 2831752928), new $Int64(2120298836, 1486294219), new $Int64(-1954407413, 268782709), new $Int64(-1002123503, 4186179080), new $Int64(624342951, 1613720397), new $Int64(857179861, 2703686015), new $Int64(-911618704, 2205342611), new $Int64(-672703993, 1411666394), new $Int64(-1528454899, 677744900), new $Int64(-1876628533, 4172867247), new $Int64(135494707, 2163418403), new $Int64(849547544, 2841526879), new $Int64(-1117516959, 1082141470), new $Int64(-1770111792, 4046134367), new $Int64(51415528, 2142943655), new $Int64(-249824333, 3124627521), new $Int64(998228909, 219992939), new $Int64(-1078790951, 1756846531), new $Int64(1283749206, 1225118210), new $Int64(-525858006, 1647770243), new $Int64(-2035959705, 444807907), new $Int64(2036369448, 3952076173), new $Int64(53201823, 1461839639), new $Int64(315761893, 3699250910), new $Int64(702974850, 1373688981), new $Int64(734022261, 147523747), new $Int64(-2047330906, 1211276581), new $Int64(1294440951, 2548832680), new $Int64(1144696256, 1995631888), new $Int64(-1992983070, 2011457303), new $Int64(-1351022674, 3057425772), new $Int64(667839456, 81484597), new $Int64(-1681980888, 3646681560), new $Int64(-1372462725, 635548515), new $Int64(602489502, 2508044581), new $Int64(-1794220117, 1014917157), new $Int64(719992433, 3214891315), new $Int64(-1294799037, 959582252), new $Int64(226415134, 3347040449), new $Int64(-362868096, 4102971975), new $Int64(397887437, 4078022210), new $Int64(-536803826, 2851767182), new $Int64(-1398321012, 1540160644), new $Int64(-1549098876, 1057290595), new $Int64(-112592988, 3907769253), new $Int64(579300318, 4248952684), new $Int64(-1054576049, 132554364), new $Int64(-1085862414, 1029351092), new $Int64(697840928, 2583007416), new $Int64(298619124, 1486185789), new $Int64(55905697, 2871589073), new $Int64(2017643612, 723203291), new $Int64(146250550, 2494333952), new $Int64(-1082993397, 2230939180), new $Int64(-1804568072, 3943232912), new $Int64(1768732449, 2181367922), new $Int64(-729261111, 2889274791), new $Int64(1824032949, 2046728161), new $Int64(1653899792, 1376052477), new $Int64(1022327048, 381236993), new $Int64(-1113097690, 3188942166), new $Int64(-74480109, 350070824), new $Int64(144881592, 61758415), new $Int64(-741824226, 3492950336), new $Int64(-2030042720, 3093818430), new $Int64(-453590535, 2962480613), new $Int64(-1912050708, 3154871160), new $Int64(-1636478569, 3228564679), new $Int64(610731502, 888276216), new $Int64(-946702974, 3574998604), new $Int64(-1277068380, 1967526716), new $Int64(-1556147941, 1554691298), new $Int64(-1573024234, 339944798), new $Int64(1223764147, 1154515356), new $Int64(1825645307, 967516237), new $Int64(1546195135, 596588202), new $Int64(-1867600880, 3764362170), new $Int64(-1655392592, 266611402), new $Int64(-393255880, 2047856075), new $Int64(-1000726433, 21444105), new $Int64(-949424754, 3065563181), new $Int64(-232418803, 1140663212), new $Int64(633187674, 2323741028), new $Int64(2126290159, 3103873707), new $Int64(1008658319, 2766828349), new $Int64(-485587503, 1970872996), new $Int64(1628585413, 3766615585), new $Int64(-595148528, 2036813414), new $Int64(-1994877121, 3105536507), new $Int64(13954645, 3396176938), new $Int64(-721402003, 1377154485), new $Int64(-61839181, 3807014186), new $Int64(543009040, 3710110597), new $Int64(-1751425519, 916420443), new $Int64(734556788, 2103831255), new $Int64(-1766161494, 717331943), new $Int64(-1574598896, 3550505941), new $Int64(45939673, 378749927), new $Int64(-1997615719, 611017331), new $Int64(592130075, 758907650), new $Int64(1012992349, 154266815), new $Int64(-1040454942, 1407468696), new $Int64(-1678191250, 970098704), new $Int64(-285057486, 1971660656), new $Int64(998365243, 3332747885), new $Int64(1947089649, 1935189867), new $Int64(1510248801, 203520055), new $Int64(-1305165746, 3916463034), new $Int64(-388598655, 3474113316), new $Int64(1036101639, 316544223), new $Int64(-1773744891, 1650844677), new $Int64(-907191419, 4267565603), new $Int64(-1070275024, 2501167616), new $Int64(-1520651863, 3929401789), new $Int64(-2091360852, 337170252), new $Int64(-960502090, 2061966842), new $Int64(-304190848, 2508461464), new $Int64(-1941471116, 2791377107), new $Int64(1240791848, 1227227588), new $Int64(1813978778, 1709681848), new $Int64(1153692192, 3768820575), new $Int64(-1002297449, 2887126398), new $Int64(-1447111334, 296561685), new $Int64(700300844, 3729960077), new $Int64(-1572311344, 372833036), new $Int64(2078875613, 2409779288), new $Int64(1829161290, 555274064), new $Int64(-1105595719, 4239804901), new $Int64(1839403216, 3723486978), new $Int64(-1649093095, 2145871984), new $Int64(-1582765715, 3565480803), new $Int64(-1568653827, 2197313814), new $Int64(974785092, 3613674566), new $Int64(438638731, 3042093666), new $Int64(-96556264, 3324034321), new $Int64(869420878, 3708873369), new $Int64(946682149, 1698090092), new $Int64(1618900382, 4213940712), new $Int64(-1843479747, 2087477361), new $Int64(-1766167800, 2407950639), new $Int64(-1296225558, 3942568569), new $Int64(-1223900450, 4088074412), new $Int64(723260036, 2964773675), new $Int64(-673921829, 1539178386), new $Int64(1062961552, 2694849566), new $Int64(460977733, 2120273838), new $Int64(-1604570740, 2484608657), new $Int64(880846449, 2956190677), new $Int64(1970902366, 4223313749), new $Int64(662161910, 3502682327), new $Int64(705634754, 4133891139), new $Int64(-1031359300, 1166449596), new $Int64(1038247601, 3362705993), new $Int64(93734798, 3892921029), new $Int64(1876124043, 786869787), new $Int64(1057490746, 1046342263), new $Int64(242763728, 493777327), new $Int64(-853573201, 3304827646), new $Int64(616460742, 125356352), new $Int64(499300063, 74094113), new $Int64(-795586925, 2500816079), new $Int64(-490248444, 514015239), new $Int64(1377565129, 543520454), new $Int64(-2039776725, 3614531153), new $Int64(2056746300, 2356753985), new $Int64(1390062617, 2018141668), new $Int64(131272971, 2087974891), new $Int64(-1502927041, 3166972343), new $Int64(372256200, 1517638666), new $Int64(-935275664, 173466846), new $Int64(-695774461, 4241513471), new $Int64(-1413550842, 2783126920), new $Int64(1972004134, 4167264826), new $Int64(29260506, 3907395640), new $Int64(-910901561, 1539634186), new $Int64(-595957298, 178241987), new $Int64(-113277636, 182168164), new $Int64(-1102530459, 2386154934), new $Int64(1379126408, 4077374341), new $Int64(-2114679722, 1732699140), new $Int64(-421057745, 1041306002), new $Int64(1860414813, 2068001749), new $Int64(1005320202, 3208962910), new $Int64(844054010, 697710380), new $Int64(-1509359403, 2228431183), new $Int64(-810313977, 3554678728), new $Int64(-750989047, 173470263), new $Int64(-85886265, 3848297795), new $Int64(-926936977, 246236185), new $Int64(-1984190461, 2066374846), new $Int64(1771673660, 312890749), new $Int64(703378057, 3573310289), new $Int64(-598851901, 143166754), new $Int64(613554316, 2081511079), new $Int64(1197802104, 486038032), new $Int64(-1906483789, 2982218564), new $Int64(364901986, 1000939191), new $Int64(1902782651, 2750454885), new $Int64(-671844857, 3375313137), new $Int64(-1643868040, 881302957), new $Int64(-1508784745, 2514186393), new $Int64(-1703622845, 360024739), new $Int64(1399671872, 292500025), new $Int64(1381210821, 2276300752), new $Int64(521803381, 4069087683), new $Int64(-1938982667, 1637778212), new $Int64(720490469, 1676670893), new $Int64(1067262482, 3855174429), new $Int64(2114075974, 2067248671), new $Int64(-89426259, 2884561259), new $Int64(-805741095, 2456511185), new $Int64(983726246, 561175414), new $Int64(-1719489563, 432588903), new $Int64(885133709, 4059399550), new $Int64(-93096266, 1075014784), new $Int64(-1733832628, 2728058415), new $Int64(1839142064, 1299703678), new $Int64(1262333188, 2347583393), new $Int64(1285481956, 2468164145), new $Int64(-1158354011, 1140014346), new $Int64(2033889184, 1936972070), new $Int64(-1737578993, 3870530098), new $Int64(-484494257, 1717789158), new $Int64(-232997156, 1153452491), new $Int64(-990424416, 3948827651), new $Int64(-1357145630, 2101413152), new $Int64(1495744672, 3854091229), new $Int64(83644069, 4215565463), new $Int64(-1385277313, 1202710438), new $Int64(-564909037, 2072216740), new $Int64(705690639, 2066751068), new $Int64(-2113583312, 173902580), new $Int64(-741983806, 142459001), new $Int64(172391592, 1889151926), new $Int64(-498943125, 3034199774), new $Int64(1618587731, 516490102), new $Int64(93114264, 3692577783), new $Int64(-2078821353, 2953948865), new $Int64(-320938673, 4041040923), new $Int64(-1942517976, 592046130), new $Int64(-705643640, 384297211), new $Int64(-2051649464, 265863924), new $Int64(2101717619, 1333136237), new $Int64(1499611781, 1406273556), new $Int64(1074670496, 426305476), new $Int64(125704633, 2750898176), new $Int64(488068495, 1633944332), new $Int64(2037723464, 3236349343), new $Int64(-1703423246, 4013676611), new $Int64(1718532237, 2265047407), new $Int64(1433593806, 875071080), new $Int64(-343047503, 1418843655), new $Int64(2009228711, 451657300), new $Int64(1229446621, 1866374663), new $Int64(1653472867, 1551455622), new $Int64(577191481, 3560962459), new $Int64(1669204077, 3347903778), new $Int64(-298327194, 2675874918), new $Int64(-1831355577, 2762991672), new $Int64(530492383, 3689068477), new $Int64(844089962, 4071997905), new $Int64(1508155730, 1381702441), new $Int64(2089931018, 2373284878), new $Int64(-864267462, 2143983064), new $Int64(308739063, 1938207195), new $Int64(1754949306, 1188152253), new $Int64(1272345009, 615870490), new $Int64(742653194, 2662252621), new $Int64(1477718295, 3839976789), new $Int64(-2091334213, 306752547), new $Int64(-1426688067, 2162363077), new $Int64(-57052633, 2767224719), new $Int64(-1471624099, 2628837712), new $Int64(1678405918, 2967771969), new $Int64(1694285728, 499792248), new $Int64(-1744131281, 4285253508), new $Int64(962357072, 2856511070), new $Int64(679471692, 2526409716), new $Int64(-1793706473, 1240875658), new $Int64(-914893422, 2577342868), new $Int64(-1001298215, 4136853496), new $Int64(-1477114974, 2403540137), new $Int64(1372824515, 1371410668), new $Int64(-176562048, 371758825), new $Int64(-441063112, 1528834084), new $Int64(-71688630, 1504757260), new $Int64(-1461820072, 699052551), new $Int64(-505543539, 3347789870), new $Int64(1951619734, 3430604759), new $Int64(2119672219, 1935601723), new $Int64(966789690, 834676166)]); + globalRand = New(new lockedSource.ptr(new nosync.Mutex.ptr(false), $assertType(NewSource(new $Int64(0, 1)), Source64))); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["math/big"] = (function() { + var $pkg = {}, $init, bytes, binary, errors, fmt, nosync, io, math, bits, rand, strconv, strings, Word, decimal, Float, ErrNaN, form, RoundingMode, Accuracy, Int, byteReader, nat, divisor, Rat, sliceType, arrayType, structType, sliceType$1, ptrType, sliceType$2, ptrType$1, ptrType$2, ptrType$3, ptrType$4, arrayType$1, sliceType$3, ptrType$5, ptrType$6, _Accuracy_index, pow5tab, intOne, natOne, natTwo, natTen, karatsubaThreshold, basicSqrThreshold, karatsubaSqrThreshold, natPool, leafSize, cacheBase10, _RoundingMode_index, half, two, three, _r, _r$1, _r$2, addWW_g, subWW_g, mulWW_g, mulAddWWW_g, nlz, divWW_g, addVV_g, subVV_g, addVW_g, subVW_g, shlVU_g, shrVU_g, mulAddVWW_g, addMulVVW_g, divWVW_g, mulWW, divWW, addVV, subVV, addVW, subVW, shlVU, shrVU, mulAddVWW, addMulVVW, divWVW, shr, appendZeros, shouldRoundUp, trim, NewFloat, makeAcc, fnorm, msb32, msb64, validateBinaryOperands, umax32, roundShortest, fmtE, fmtF, min, NewInt, low32, low64, lehmerSimulate, lehmerUpdate, euclidUpdate, Jacobi, writeMultiple, scanSign, basicMul, karatsubaAdd, karatsubaSub, karatsuba, alias, addAt, max, karatsubaLen, basicSqr, karatsubaSqr, getNat, putNat, same, greaterThan, bigEndianWord, maxPow, pow, divisors, quotToFloat32, quotToFloat64, mulDenom, scaleDenom, ratTok, scanExponent, newFloat; + bytes = $packages["bytes"]; + binary = $packages["encoding/binary"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + io = $packages["io"]; + math = $packages["math"]; + bits = $packages["math/bits"]; + rand = $packages["math/rand"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + Word = $pkg.Word = $newType(4, $kindUintptr, "big.Word", true, "math/big", true, null); + decimal = $pkg.decimal = $newType(0, $kindStruct, "big.decimal", true, "math/big", false, function(mant_, exp_) { + this.$val = this; + if (arguments.length === 0) { + this.mant = sliceType$1.nil; + this.exp = 0; + return; + } + this.mant = mant_; + this.exp = exp_; + }); + Float = $pkg.Float = $newType(0, $kindStruct, "big.Float", true, "math/big", true, function(prec_, mode_, acc_, form_, neg_, mant_, exp_) { + this.$val = this; + if (arguments.length === 0) { + this.prec = 0; + this.mode = 0; + this.acc = 0; + this.form = 0; + this.neg = false; + this.mant = nat.nil; + this.exp = 0; + return; + } + this.prec = prec_; + this.mode = mode_; + this.acc = acc_; + this.form = form_; + this.neg = neg_; + this.mant = mant_; + this.exp = exp_; + }); + ErrNaN = $pkg.ErrNaN = $newType(0, $kindStruct, "big.ErrNaN", true, "math/big", true, function(msg_) { + this.$val = this; + if (arguments.length === 0) { + this.msg = ""; + return; + } + this.msg = msg_; + }); + form = $pkg.form = $newType(1, $kindUint8, "big.form", true, "math/big", false, null); + RoundingMode = $pkg.RoundingMode = $newType(1, $kindUint8, "big.RoundingMode", true, "math/big", true, null); + Accuracy = $pkg.Accuracy = $newType(1, $kindInt8, "big.Accuracy", true, "math/big", true, null); + Int = $pkg.Int = $newType(0, $kindStruct, "big.Int", true, "math/big", true, function(neg_, abs_) { + this.$val = this; + if (arguments.length === 0) { + this.neg = false; + this.abs = nat.nil; + return; + } + this.neg = neg_; + this.abs = abs_; + }); + byteReader = $pkg.byteReader = $newType(0, $kindStruct, "big.byteReader", true, "math/big", false, function(ScanState_) { + this.$val = this; + if (arguments.length === 0) { + this.ScanState = $ifaceNil; + return; + } + this.ScanState = ScanState_; + }); + nat = $pkg.nat = $newType(12, $kindSlice, "big.nat", true, "math/big", false, null); + divisor = $pkg.divisor = $newType(0, $kindStruct, "big.divisor", true, "math/big", false, function(bbb_, nbits_, ndigits_) { + this.$val = this; + if (arguments.length === 0) { + this.bbb = nat.nil; + this.nbits = 0; + this.ndigits = 0; + return; + } + this.bbb = bbb_; + this.nbits = nbits_; + this.ndigits = ndigits_; + }); + Rat = $pkg.Rat = $newType(0, $kindStruct, "big.Rat", true, "math/big", true, function(a_, b_) { + this.$val = this; + if (arguments.length === 0) { + this.a = new Int.ptr(false, nat.nil); + this.b = new Int.ptr(false, nat.nil); + return; + } + this.a = a_; + this.b = b_; + }); + sliceType = $sliceType($emptyInterface); + arrayType = $arrayType(divisor, 64); + structType = $structType("math/big", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: nosync.Mutex, tag: ""}, {prop: "table", name: "table", embedded: false, exported: false, typ: arrayType, tag: ""}]); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(Float); + sliceType$2 = $sliceType(Word); + ptrType$1 = $ptrType(Int); + ptrType$2 = $ptrType(Rat); + ptrType$3 = $ptrType(Word); + ptrType$4 = $ptrType(nat); + arrayType$1 = $arrayType(nat, 16); + sliceType$3 = $sliceType(divisor); + ptrType$5 = $ptrType(decimal); + ptrType$6 = $ptrType(rand.Rand); + Accuracy.prototype.String = function() { + var i, x; + i = this.$val; + i = i - (-1) << 24 >> 24; + if (i < 0 || i >= 3) { + return "Accuracy(" + strconv.FormatInt((new $Int64(0, (i + -1 << 24 >> 24))), 10) + ")"; + } + return $substring("BelowExactAbove", ((i < 0 || i >= _Accuracy_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _Accuracy_index[i]), (x = i + 1 << 24 >> 24, ((x < 0 || x >= _Accuracy_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _Accuracy_index[x]))); + }; + $ptrType(Accuracy).prototype.String = function() { return new Accuracy(this.$get()).String(); }; + addWW_g = function(x, y, c) { + var c, x, y, yc, z0, z1; + z1 = 0; + z0 = 0; + yc = y + c >>> 0; + z0 = x + yc >>> 0; + if (z0 < x || yc < y) { + z1 = 1; + } + return [z1, z0]; + }; + subWW_g = function(x, y, c) { + var c, x, y, yc, z0, z1; + z1 = 0; + z0 = 0; + yc = y + c >>> 0; + z0 = x - yc >>> 0; + if (z0 > x || yc < y) { + z1 = 1; + } + return [z1, z0]; + }; + mulWW_g = function(x, y) { + var t, w0, w1, w2, x, x0, x1, y, y0, y1, z0, z1; + z1 = 0; + z0 = 0; + x0 = (x & 65535) >>> 0; + x1 = x >>> 16 >>> 0; + y0 = (y & 65535) >>> 0; + y1 = y >>> 16 >>> 0; + w0 = $imul(x0, y0) >>> 0; + t = ($imul(x1, y0) >>> 0) + (w0 >>> 16 >>> 0) >>> 0; + w1 = (t & 65535) >>> 0; + w2 = t >>> 16 >>> 0; + w1 = w1 + (($imul(x0, y1) >>> 0)) >>> 0; + z1 = (($imul(x1, y1) >>> 0) + w2 >>> 0) + (w1 >>> 16 >>> 0) >>> 0; + z0 = $imul(x, y) >>> 0; + return [z1, z0]; + }; + mulAddWWW_g = function(x, y, c) { + var _tuple, c, x, y, z0, z1, zz0; + z1 = 0; + z0 = 0; + _tuple = mulWW_g(x, y); + z1 = _tuple[0]; + zz0 = _tuple[1]; + z0 = zz0 + c >>> 0; + if (z0 < zz0) { + z1 = z1 + (1) >>> 0; + } + return [z1, z0]; + }; + nlz = function(x) { + var x; + return ((bits.LeadingZeros(((x >>> 0))) >>> 0)); + }; + divWW_g = function(u1, u0, v) { + var _q, _q$1, _tmp, _tmp$1, _tmp$2, _tmp$3, q, q0, q1, r, rhat, s, u0, u1, un0, un1, un10, un21, un32, v, vn0, vn1, y, y$1, y$2, y$3, y$4; + q = 0; + r = 0; + if (u1 >= v) { + _tmp = 4294967295; + _tmp$1 = 4294967295; + q = _tmp; + r = _tmp$1; + return [q, r]; + } + s = nlz(v); + v = (y = (s), y < 32 ? (v << y) : 0) >>> 0; + vn1 = v >>> 16 >>> 0; + vn0 = (v & 65535) >>> 0; + un32 = (((y$1 = s, y$1 < 32 ? (u1 << y$1) : 0) >>> 0) | ((y$2 = ((32 - s >>> 0)), y$2 < 32 ? (u0 >>> y$2) : 0) >>> 0)) >>> 0; + un10 = (y$3 = s, y$3 < 32 ? (u0 << y$3) : 0) >>> 0; + un1 = un10 >>> 16 >>> 0; + un0 = (un10 & 65535) >>> 0; + q1 = (_q = un32 / vn1, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + rhat = un32 - ($imul(q1, vn1) >>> 0) >>> 0; + while (true) { + if (!(q1 >= 65536 || ($imul(q1, vn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un1 >>> 0))) { break; } + q1 = q1 - (1) >>> 0; + rhat = rhat + (vn1) >>> 0; + if (rhat >= 65536) { + break; + } + } + un21 = (($imul(un32, 65536) >>> 0) + un1 >>> 0) - ($imul(q1, v) >>> 0) >>> 0; + q0 = (_q$1 = un21 / vn1, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + rhat = un21 - ($imul(q0, vn1) >>> 0) >>> 0; + while (true) { + if (!(q0 >= 65536 || ($imul(q0, vn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un0 >>> 0))) { break; } + q0 = q0 - (1) >>> 0; + rhat = rhat + (vn1) >>> 0; + if (rhat >= 65536) { + break; + } + } + _tmp$2 = ($imul(q1, 65536) >>> 0) + q0 >>> 0; + _tmp$3 = (y$4 = s, y$4 < 32 ? ((((($imul(un21, 65536) >>> 0) + un0 >>> 0) - ($imul(q0, v) >>> 0) >>> 0)) >>> y$4) : 0) >>> 0; + q = _tmp$2; + r = _tmp$3; + return [q, r]; + }; + addVV_g = function(z, x, y) { + var _i, _i$1, _ref, _ref$1, _tuple, c, i, i$1, x, xi, y, yi, z, zi; + c = 0; + if (false) { + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = addWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]), c); + c = _tuple[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); + _i++; + } + return c; + } + _ref$1 = $subslice(x, 0, z.$length); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + xi = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + yi = ((i$1 < 0 || i$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$1]); + zi = (xi + yi >>> 0) + c >>> 0; + ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = zi); + c = (((((xi & yi) >>> 0) | (((((xi | yi) >>> 0)) & ~zi) >>> 0)) >>> 0)) >>> 31 >>> 0; + _i$1++; + } + return c; + }; + subVV_g = function(z, x, y) { + var _i, _i$1, _ref, _ref$1, _tuple, c, i, i$1, x, xi, y, yi, z, zi; + c = 0; + if (false) { + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = subWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]), c); + c = _tuple[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); + _i++; + } + return c; + } + _ref$1 = $subslice(x, 0, z.$length); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + xi = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + yi = ((i$1 < 0 || i$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$1]); + zi = (xi - yi >>> 0) - c >>> 0; + ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = zi); + c = (((((yi & ~xi) >>> 0) | (((((yi | (~xi >>> 0)) >>> 0)) & zi) >>> 0)) >>> 0)) >>> 31 >>> 0; + _i$1++; + } + return c; + }; + addVW_g = function(z, x, y) { + var _i, _i$1, _ref, _ref$1, _tuple, c, i, i$1, x, xi, y, z, zi; + c = 0; + if (false) { + c = y; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = addWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), c, 0); + c = _tuple[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); + _i++; + } + return c; + } + c = y; + _ref$1 = $subslice(x, 0, z.$length); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + xi = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + zi = xi + c >>> 0; + ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = zi); + c = ((xi & ~zi) >>> 0) >>> 31 >>> 0; + _i$1++; + } + return c; + }; + subVW_g = function(z, x, y) { + var _i, _i$1, _ref, _ref$1, _tuple, c, i, i$1, x, xi, y, z, zi; + c = 0; + if (false) { + c = y; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = subWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), c, 0); + c = _tuple[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); + _i++; + } + return c; + } + c = y; + _ref$1 = $subslice(x, 0, z.$length); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + xi = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + zi = xi - c >>> 0; + ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = zi); + c = (((zi & ~xi) >>> 0)) >>> 31 >>> 0; + _i$1++; + } + return c; + }; + shlVU_g = function(z, x, s) { + var $C5$9D, c, i, n, s, w, w1, x, x$1, x$2, y, y$1, y$2, y$3, z; + c = 0; + n = z.$length; + if (n > 0) { + $C5$9D = 32 - s >>> 0; + w1 = (x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + c = (y = $C5$9D, y < 32 ? (w1 >>> y) : 0) >>> 0; + i = n - 1 >> 0; + while (true) { + if (!(i > 0)) { break; } + w = w1; + w1 = (x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$2])); + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((y$1 = s, y$1 < 32 ? (w << y$1) : 0) >>> 0) | ((y$2 = $C5$9D, y$2 < 32 ? (w1 >>> y$2) : 0) >>> 0)) >>> 0)); + i = i - (1) >> 0; + } + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((y$3 = s, y$3 < 32 ? (w1 << y$3) : 0) >>> 0)); + } + return c; + }; + shrVU_g = function(z, x, s) { + var $C5$9D, c, i, n, s, w, w1, x, x$1, x$2, y, y$1, y$2, y$3, z; + c = 0; + n = z.$length; + if (n > 0) { + $C5$9D = 32 - s >>> 0; + w1 = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]); + c = (y = $C5$9D, y < 32 ? (w1 << y) : 0) >>> 0; + i = 0; + while (true) { + if (!(i < (n - 1 >> 0))) { break; } + w = w1; + w1 = (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((y$1 = s, y$1 < 32 ? (w >>> y$1) : 0) >>> 0) | ((y$2 = $C5$9D, y$2 < 32 ? (w1 << y$2) : 0) >>> 0)) >>> 0)); + i = i + (1) >> 0; + } + (x$2 = n - 1 >> 0, ((x$2 < 0 || x$2 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$2] = ((y$3 = s, y$3 < 32 ? (w1 >>> y$3) : 0) >>> 0))); + } + return c; + }; + mulAddVWW_g = function(z, x, y, r) { + var _i, _ref, _tuple, c, i, r, x, y, z; + c = 0; + c = r; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = mulAddWWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y, c); + c = _tuple[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); + _i++; + } + return c; + }; + addMulVVW_g = function(z, x, y) { + var _i, _ref, _tuple, _tuple$1, c, i, x, y, z, z0, z1; + c = 0; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + _tuple = mulAddWWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y, ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i])); + z1 = _tuple[0]; + z0 = _tuple[1]; + _tuple$1 = addWW_g(z0, c, 0); + c = _tuple$1[0]; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple$1[1]); + c = c + (z1) >>> 0; + _i++; + } + return c; + }; + divWVW_g = function(z, xn, x, y) { + var _tuple, i, r, x, xn, y, z; + r = 0; + r = xn; + i = z.$length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + _tuple = divWW_g(r, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y); + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[0]); + r = _tuple[1]; + i = i - (1) >> 0; + } + return r; + }; + mulWW = function(x, y) { + var _tuple, x, y, z0, z1; + z1 = 0; + z0 = 0; + _tuple = mulWW_g(x, y); + z1 = _tuple[0]; + z0 = _tuple[1]; + return [z1, z0]; + }; + divWW = function(x1, x0, y) { + var _tuple, q, r, x0, x1, y; + q = 0; + r = 0; + _tuple = divWW_g(x1, x0, y); + q = _tuple[0]; + r = _tuple[1]; + return [q, r]; + }; + addVV = function(z, x, y) { + var c, x, y, z; + c = 0; + c = addVV_g(z, x, y); + return c; + }; + subVV = function(z, x, y) { + var c, x, y, z; + c = 0; + c = subVV_g(z, x, y); + return c; + }; + addVW = function(z, x, y) { + var c, x, y, z; + c = 0; + c = addVW_g(z, x, y); + return c; + }; + subVW = function(z, x, y) { + var c, x, y, z; + c = 0; + c = subVW_g(z, x, y); + return c; + }; + shlVU = function(z, x, s) { + var c, s, x, z; + c = 0; + c = shlVU_g(z, x, s); + return c; + }; + shrVU = function(z, x, s) { + var c, s, x, z; + c = 0; + c = shrVU_g(z, x, s); + return c; + }; + mulAddVWW = function(z, x, y, r) { + var c, r, x, y, z; + c = 0; + c = mulAddVWW_g(z, x, y, r); + return c; + }; + addMulVVW = function(z, x, y) { + var c, x, y, z; + c = 0; + c = addMulVVW_g(z, x, y); + return c; + }; + divWVW = function(z, xn, x, y) { + var r, x, xn, y, z; + r = 0; + r = divWVW_g(z, xn, x, y); + return r; + }; + decimal.ptr.prototype.at = function(i) { + var d, i, x; + d = this; + if (0 <= i && i < d.mant.$length) { + return (x = d.mant, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); + } + return 48; + }; + decimal.prototype.at = function(i) { return this.$val.at(i); }; + decimal.ptr.prototype.init = function(m, shift) { + var _r$3, m, n, ntz, s, s$1, shift, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; m = $f.m; n = $f.n; ntz = $f.ntz; s = $f.s; s$1 = $f.s$1; shift = $f.shift; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (m.$length === 0) { + x.mant = $subslice(x.mant, 0, 0); + x.exp = 0; + $s = -1; return; + } + if (shift < 0) { + ntz = m.trailingZeroBits(); + s = ((-shift >>> 0)); + if (s >= ntz) { + s = ntz; + } + m = (nat.nil).shr(m, s); + shift = shift + (((s >> 0))) >> 0; + } + if (shift > 0) { + m = (nat.nil).shl(m, ((shift >>> 0))); + shift = 0; + } + _r$3 = m.utoa(10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + s$1 = _r$3; + n = s$1.$length; + x.exp = n; + while (true) { + if (!(n > 0 && ((x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= s$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : s$1.$array[s$1.$offset + x$1])) === 48))) { break; } + n = n - (1) >> 0; + } + x.mant = $appendSlice($subslice(x.mant, 0, 0), $subslice(s$1, 0, n)); + if (shift < 0) { + while (true) { + if (!(shift < -28)) { break; } + shr(x, 28); + shift = shift + (28) >> 0; + } + shr(x, ((-shift >>> 0))); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: decimal.ptr.prototype.init }; } $f._r$3 = _r$3; $f.m = m; $f.n = n; $f.ntz = ntz; $f.s = s; $f.s$1 = s$1; $f.shift = shift; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + decimal.prototype.init = function(m, shift) { return this.$val.init(m, shift); }; + shr = function(x, s) { + var ch, ch$1, d, d$1, d$2, mask, n, r, s, w, x, x$1, x$2, x$3, x$4, y, y$1, y$2, y$3, y$4, y$5; + r = 0; + n = 0; + while (true) { + if (!((((y = s, y < 32 ? (n >>> y) : 0) >>> 0) === 0) && r < x.mant.$length)) { break; } + ch = (((x$1 = x.mant, ((r < 0 || r >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + r])) >>> 0)); + r = r + (1) >> 0; + n = (($imul(n, 10) >>> 0) + ch >>> 0) - 48 >>> 0; + } + if (n === 0) { + x.mant = $subslice(x.mant, 0, 0); + return; + } + while (true) { + if (!(((y$1 = s, y$1 < 32 ? (n >>> y$1) : 0) >>> 0) === 0)) { break; } + r = r + (1) >> 0; + n = $imul(n, (10)) >>> 0; + } + x.exp = x.exp + ((1 - r >> 0)) >> 0; + w = 0; + mask = ((y$2 = s, y$2 < 32 ? (1 << y$2) : 0) >>> 0) - 1 >>> 0; + while (true) { + if (!(r < x.mant.$length)) { break; } + ch$1 = (((x$2 = x.mant, ((r < 0 || r >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + r])) >>> 0)); + r = r + (1) >> 0; + d = (y$3 = s, y$3 < 32 ? (n >>> y$3) : 0) >>> 0; + n = (n & (mask)) >>> 0; + (x$3 = x.mant, ((w < 0 || w >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + w] = (((d + 48 >>> 0) << 24 >>> 24)))); + w = w + (1) >> 0; + n = (($imul(n, 10) >>> 0) + ch$1 >>> 0) - 48 >>> 0; + } + while (true) { + if (!(n > 0 && w < x.mant.$length)) { break; } + d$1 = (y$4 = s, y$4 < 32 ? (n >>> y$4) : 0) >>> 0; + n = (n & (mask)) >>> 0; + (x$4 = x.mant, ((w < 0 || w >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + w] = (((d$1 + 48 >>> 0) << 24 >>> 24)))); + w = w + (1) >> 0; + n = $imul(n, 10) >>> 0; + } + x.mant = $subslice(x.mant, 0, w); + while (true) { + if (!(n > 0)) { break; } + d$2 = (y$5 = s, y$5 < 32 ? (n >>> y$5) : 0) >>> 0; + n = (n & (mask)) >>> 0; + x.mant = $append(x.mant, (((d$2 + 48 >>> 0) << 24 >>> 24))); + n = $imul(n, 10) >>> 0; + } + trim(x); + }; + decimal.ptr.prototype.String = function() { + var buf, x; + x = this; + if (x.mant.$length === 0) { + return "0"; + } + buf = sliceType$1.nil; + if (x.exp <= 0) { + buf = $appendSlice(buf, "0."); + buf = appendZeros(buf, -x.exp); + buf = $appendSlice(buf, x.mant); + } else if (x.exp < x.mant.$length) { + buf = $appendSlice(buf, $subslice(x.mant, 0, x.exp)); + buf = $append(buf, 46); + buf = $appendSlice(buf, $subslice(x.mant, x.exp)); + } else { + buf = $appendSlice(buf, x.mant); + buf = appendZeros(buf, x.exp - x.mant.$length >> 0); + } + return ($bytesToString(buf)); + }; + decimal.prototype.String = function() { return this.$val.String(); }; + appendZeros = function(buf, n) { + var buf, n; + while (true) { + if (!(n > 0)) { break; } + buf = $append(buf, 48); + n = n - (1) >> 0; + } + return buf; + }; + shouldRoundUp = function(x, n) { + var n, x, x$1, x$2, x$3, x$4; + if (((x$1 = x.mant, ((n < 0 || n >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + n])) === 53) && ((n + 1 >> 0) === x.mant.$length)) { + return n > 0 && !(((((((x$2 = x.mant, x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])) - 48 << 24 >>> 24)) & 1) >>> 0) === 0)); + } + return (x$4 = x.mant, ((n < 0 || n >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + n])) >= 53; + }; + decimal.ptr.prototype.round = function(n) { + var n, x; + x = this; + if (n < 0 || n >= x.mant.$length) { + return; + } + if (shouldRoundUp(x, n)) { + x.roundUp(n); + } else { + x.roundDown(n); + } + }; + decimal.prototype.round = function(n) { return this.$val.round(n); }; + decimal.ptr.prototype.roundUp = function(n) { + var _index, n, x, x$1, x$2, x$3, x$4, x$5; + x = this; + if (n < 0 || n >= x.mant.$length) { + return; + } + while (true) { + if (!(n > 0 && (x$1 = x.mant, x$2 = n - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) >= 57)) { break; } + n = n - (1) >> 0; + } + if (n === 0) { + (x$3 = x.mant, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0] = 49)); + x.mant = $subslice(x.mant, 0, 1); + x.exp = x.exp + (1) >> 0; + return; + } + _index = n - 1 >> 0; + (x$5 = x.mant, ((_index < 0 || _index >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + _index] = ((x$4 = x.mant, ((_index < 0 || _index >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + _index])) + (1) << 24 >>> 24))); + x.mant = $subslice(x.mant, 0, n); + }; + decimal.prototype.roundUp = function(n) { return this.$val.roundUp(n); }; + decimal.ptr.prototype.roundDown = function(n) { + var n, x; + x = this; + if (n < 0 || n >= x.mant.$length) { + return; + } + x.mant = $subslice(x.mant, 0, n); + trim(x); + }; + decimal.prototype.roundDown = function(n) { return this.$val.roundDown(n); }; + trim = function(x) { + var i, x, x$1, x$2; + i = x.mant.$length; + while (true) { + if (!(i > 0 && ((x$1 = x.mant, x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) === 48))) { break; } + i = i - (1) >> 0; + } + x.mant = $subslice(x.mant, 0, i); + if (i === 0) { + x.exp = 0; + } + }; + ErrNaN.ptr.prototype.Error = function() { + var err; + err = this; + return err.msg; + }; + ErrNaN.prototype.Error = function() { return this.$val.Error(); }; + NewFloat = function(x) { + var _r$3, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (math.IsNaN(x)) { + $panic((x$1 = new ErrNaN.ptr("NewFloat(NaN)"), new x$1.constructor.elem(x$1))); + } + _r$3 = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0).SetFloat64(x); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: NewFloat }; } $f._r$3 = _r$3; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewFloat = NewFloat; + Float.ptr.prototype.SetPrec = function(prec) { + var old, prec, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; old = $f.old; prec = $f.prec; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + z.acc = 0; + if (prec === 0) { + z.prec = 0; + if (z.form === 1) { + z.acc = makeAcc(z.neg); + z.form = 0; + } + $s = -1; return z; + } + if (prec > 4294967295) { + prec = 4294967295; + } + old = z.prec; + z.prec = ((prec >>> 0)); + /* */ if (z.prec < old) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (z.prec < old) { */ case 1: + $r = z.round(0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetPrec }; } $f.old = old; $f.prec = prec; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetPrec = function(prec) { return this.$val.SetPrec(prec); }; + makeAcc = function(above) { + var above; + if (above) { + return 1; + } + return -1; + }; + Float.ptr.prototype.SetMode = function(mode) { + var mode, z; + z = this; + z.mode = mode; + z.acc = 0; + return z; + }; + Float.prototype.SetMode = function(mode) { return this.$val.SetMode(mode); }; + Float.ptr.prototype.Prec = function() { + var x; + x = this; + return ((x.prec >>> 0)); + }; + Float.prototype.Prec = function() { return this.$val.Prec(); }; + Float.ptr.prototype.MinPrec = function() { + var x; + x = this; + if (!((x.form === 1))) { + return 0; + } + return (((x.mant.$length >>> 0)) * 32 >>> 0) - x.mant.trailingZeroBits() >>> 0; + }; + Float.prototype.MinPrec = function() { return this.$val.MinPrec(); }; + Float.ptr.prototype.Mode = function() { + var x; + x = this; + return x.mode; + }; + Float.prototype.Mode = function() { return this.$val.Mode(); }; + Float.ptr.prototype.Acc = function() { + var x; + x = this; + return x.acc; + }; + Float.prototype.Acc = function() { return this.$val.Acc(); }; + Float.ptr.prototype.Sign = function() { + var x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (x.form === 0) { + $s = -1; return 0; + } + if (x.neg) { + $s = -1; return -1; + } + $s = -1; return 1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Sign }; } $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Sign = function() { return this.$val.Sign(); }; + Float.ptr.prototype.MantExp = function(mant) { + var _r$3, exp, mant, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; exp = $f.exp; mant = $f.mant; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + exp = 0; + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (x.form === 1) { + exp = ((x.exp >> 0)); + } + /* */ if (!(mant === ptrType.nil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(mant === ptrType.nil)) { */ case 4: + _r$3 = mant.Copy(x); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (mant.form === 1) { + mant.exp = 0; + } + /* } */ case 5: + $s = -1; return exp; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.MantExp }; } $f._r$3 = _r$3; $f.exp = exp; $f.mant = mant; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.MantExp = function(mant) { return this.$val.MantExp(mant); }; + Float.ptr.prototype.setExpAndRound = function(exp, sbit) { + var exp, sbit, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; exp = $f.exp; sbit = $f.sbit; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if ((exp.$high < -1 || (exp.$high === -1 && exp.$low < 2147483648))) { + z.acc = makeAcc(z.neg); + z.form = 0; + $s = -1; return; + } + if ((exp.$high > 0 || (exp.$high === 0 && exp.$low > 2147483647))) { + z.acc = makeAcc(!z.neg); + z.form = 2; + $s = -1; return; + } + z.form = 1; + z.exp = (((exp.$low + ((exp.$high >> 31) * 4294967296)) >> 0)); + $r = z.round(sbit); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.setExpAndRound }; } $f.exp = exp; $f.sbit = sbit; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.setExpAndRound = function(exp, sbit) { return this.$val.setExpAndRound(exp, sbit); }; + Float.ptr.prototype.SetMantExp = function(mant, exp) { + var _r$3, exp, mant, x, x$1, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; exp = $f.exp; mant = $f.mant; x = $f.x; x$1 = $f.x$1; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = z.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = mant.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$3 = z.Copy(mant); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (!((z.form === 1))) { + $s = -1; return z; + } + $r = z.setExpAndRound((x = (new $Int64(0, z.exp)), x$1 = (new $Int64(0, exp)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)), 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetMantExp }; } $f._r$3 = _r$3; $f.exp = exp; $f.mant = mant; $f.x = x; $f.x$1 = x$1; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetMantExp = function(mant, exp) { return this.$val.SetMantExp(mant, exp); }; + Float.ptr.prototype.Signbit = function() { + var x; + x = this; + return x.neg; + }; + Float.prototype.Signbit = function() { return this.$val.Signbit(); }; + Float.ptr.prototype.IsInf = function() { + var x; + x = this; + return x.form === 2; + }; + Float.prototype.IsInf = function() { return this.$val.IsInf(); }; + Float.ptr.prototype.IsInt = function() { + var x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!((x.form === 1))) { + $s = -1; return x.form === 0; + } + if (x.exp <= 0) { + $s = -1; return false; + } + $s = -1; return x.prec <= ((x.exp >>> 0)) || x.MinPrec() <= ((x.exp >>> 0)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.IsInt }; } $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.IsInt = function() { return this.$val.IsInt(); }; + Float.ptr.prototype.validate = function() { + var _arg, _arg$1, _r$3, _r$4, m, x, x$1, x$2, x$3, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$3 = $f._r$3; _r$4 = $f._r$4; m = $f.m; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (true) { + $panic(new $String("validate called but debugFloat is not set")); + } + if (!((x.form === 1))) { + $s = -1; return; + } + m = x.mant.$length; + if (m === 0) { + $panic(new $String("nonzero finite number with empty mantissa")); + } + /* */ if ((((x$1 = x.mant, x$2 = m - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) & 2147483648) >>> 0) === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((((x$1 = x.mant, x$2 = m - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) & 2147483648) >>> 0) === 0) { */ case 1: + _arg = new Word((x$3 = x.mant, x$4 = m - 1 >> 0, ((x$4 < 0 || x$4 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + x$4]))); + _r$3 = x.Text(112, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = new $String(_r$3); + _r$4 = fmt.Sprintf("msb not set in last word %#x of %s", new sliceType([_arg, _arg$1])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $panic(new $String(_r$4)); + /* } */ case 2: + if (x.prec === 0) { + $panic(new $String("zero precision finite number")); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.validate }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.m = m; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.validate = function() { return this.$val.validate(); }; + Float.ptr.prototype.round = function(sbit) { + var _1, _index, _q, bits$1, inc, lsb, m, n, ntz, r, rbit, sbit, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _index = $f._index; _q = $f._q; bits$1 = $f.bits$1; inc = $f.inc; lsb = $f.lsb; m = $f.m; n = $f.n; ntz = $f.ntz; r = $f.r; rbit = $f.rbit; sbit = $f.sbit; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = z.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + z.acc = 0; + if (!((z.form === 1))) { + $s = -1; return; + } + m = ((z.mant.$length >>> 0)); + bits$1 = $imul(m, 32) >>> 0; + if (bits$1 <= z.prec) { + $s = -1; return; + } + r = ((((bits$1 - z.prec >>> 0) - 1 >>> 0) >>> 0)); + rbit = (z.mant.bit(r) & 1) >>> 0; + if ((sbit === 0) && ((rbit === 0) || (z.mode === 0))) { + sbit = z.mant.sticky(r); + } + sbit = (sbit & (1)) >>> 0; + n = (_q = ((z.prec + 31 >>> 0)) / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + if (m > n) { + $copySlice(z.mant, $subslice(z.mant, (m - n >>> 0))); + z.mant = $subslice(z.mant, 0, n); + } + ntz = ($imul(n, 32) >>> 0) - z.prec >>> 0; + lsb = (y = ntz, y < 32 ? (1 << y) : 0) >>> 0; + if (!((((rbit | sbit) >>> 0) === 0))) { + inc = false; + _1 = z.mode; + if (_1 === (4)) { + inc = z.neg; + } else if (_1 === (2)) { + } else if (_1 === (0)) { + inc = !((rbit === 0)) && (!((sbit === 0)) || !(((((x = z.mant, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) & lsb) >>> 0) === 0))); + } else if (_1 === (1)) { + inc = !((rbit === 0)); + } else if (_1 === (3)) { + inc = true; + } else if (_1 === (5)) { + inc = !z.neg; + } else { + $panic(new $String("unreachable")); + } + z.acc = makeAcc(!(inc === z.neg)); + if (inc) { + if (!((addVW((x$1 = z.mant, $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), (x$2 = z.mant, $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), lsb) === 0))) { + if (z.exp >= 2147483647) { + z.form = 2; + $s = -1; return; + } + z.exp = z.exp + (1) >> 0; + shrVU((x$3 = z.mant, $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), (x$4 = z.mant, $subslice(new sliceType$2(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)), 1); + _index = n - 1 >>> 0; + (x$6 = z.mant, ((_index < 0 || _index >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + _index] = (((x$5 = z.mant, ((_index < 0 || _index >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + _index])) | (2147483648)) >>> 0))); + } + } + } + (x$8 = z.mant, (0 >= x$8.$length ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + 0] = (((x$7 = z.mant, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])) & ~((lsb - 1 >>> 0))) >>> 0))); + /* */ if (false) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (false) { */ case 4: + $r = z.validate(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.round }; } $f._1 = _1; $f._index = _index; $f._q = _q; $f.bits$1 = bits$1; $f.inc = inc; $f.lsb = lsb; $f.m = m; $f.n = n; $f.ntz = ntz; $f.r = r; $f.rbit = rbit; $f.sbit = sbit; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.round = function(sbit) { return this.$val.round(sbit); }; + Float.ptr.prototype.setBits64 = function(neg, x) { + var neg, s, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; neg = $f.neg; s = $f.s; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (z.prec === 0) { + z.prec = 64; + } + z.acc = 0; + z.neg = neg; + if ((x.$high === 0 && x.$low === 0)) { + z.form = 0; + $s = -1; return z; + } + z.form = 1; + s = bits.LeadingZeros64(x); + z.mant = z.mant.setUint64($shiftLeft64(x, ((s >>> 0)))); + z.exp = (((64 - s >> 0) >> 0)); + /* */ if (z.prec < 64) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (z.prec < 64) { */ case 1: + $r = z.round(0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.setBits64 }; } $f.neg = neg; $f.s = s; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.setBits64 = function(neg, x) { return this.$val.setBits64(neg, x); }; + Float.ptr.prototype.SetUint64 = function(x) { + var _r$3, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.setBits64(false, x); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetUint64 }; } $f._r$3 = _r$3; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetUint64 = function(x) { return this.$val.SetUint64(x); }; + Float.ptr.prototype.SetInt64 = function(x) { + var _r$3, u, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; u = $f.u; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + u = x; + if ((u.$high < 0 || (u.$high === 0 && u.$low < 0))) { + u = new $Int64(-u.$high, -u.$low); + } + _r$3 = z.setBits64((x.$high < 0 || (x.$high === 0 && x.$low < 0)), (new $Uint64(u.$high, u.$low))); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetInt64 }; } $f._r$3 = _r$3; $f.u = u; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetInt64 = function(x) { return this.$val.SetInt64(x); }; + Float.ptr.prototype.SetFloat64 = function(x) { + var _tuple, exp, fmant, x, x$1, x$2, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; exp = $f.exp; fmant = $f.fmant; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (z.prec === 0) { + z.prec = 53; + } + if (math.IsNaN(x)) { + $panic((x$1 = new ErrNaN.ptr("Float.SetFloat64(NaN)"), new x$1.constructor.elem(x$1))); + } + z.acc = 0; + z.neg = math.Signbit(x); + if (x === 0) { + z.form = 0; + $s = -1; return z; + } + if (math.IsInf(x, 0)) { + z.form = 2; + $s = -1; return z; + } + z.form = 1; + _tuple = math.Frexp(x); + fmant = _tuple[0]; + exp = _tuple[1]; + z.mant = z.mant.setUint64((x$2 = $shiftLeft64(math.Float64bits(fmant), 11), new $Uint64(2147483648 | x$2.$high, (0 | x$2.$low) >>> 0))); + z.exp = ((exp >> 0)); + /* */ if (z.prec < 53) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (z.prec < 53) { */ case 1: + $r = z.round(0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetFloat64 }; } $f._tuple = _tuple; $f.exp = exp; $f.fmant = fmant; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetFloat64 = function(x) { return this.$val.SetFloat64(x); }; + fnorm = function(m) { + var c, m, s, x, x$1; + if (false && ((m.$length === 0) || ((x = m.$length - 1 >> 0, ((x < 0 || x >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + x])) === 0))) { + $panic(new $String("msw of mantissa is 0")); + } + s = nlz((x$1 = m.$length - 1 >> 0, ((x$1 < 0 || x$1 >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + x$1]))); + if (s > 0) { + c = shlVU($subslice(new sliceType$2(m.$array), m.$offset, m.$offset + m.$length), $subslice(new sliceType$2(m.$array), m.$offset, m.$offset + m.$length), s); + if (false && !((c === 0))) { + $panic(new $String("nlz or shlVU incorrect")); + } + } + return (new $Int64(0, s)); + }; + Float.ptr.prototype.SetInt = function(x) { + var bits$1, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; bits$1 = $f.bits$1; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + bits$1 = ((x.BitLen() >>> 0)); + if (z.prec === 0) { + z.prec = umax32(bits$1, 64); + } + z.acc = 0; + z.neg = x.neg; + if (x.abs.$length === 0) { + z.form = 0; + $s = -1; return z; + } + z.mant = z.mant.set(x.abs); + fnorm(z.mant); + $r = z.setExpAndRound((new $Int64(0, bits$1)), 0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetInt }; } $f.bits$1 = bits$1; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; + Float.ptr.prototype.SetRat = function(x) { + var _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, a, b, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; a = $f.a; b = $f.b; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = [a]; + b = [b]; + z = this; + /* */ if (x.IsInt()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (x.IsInt()) { */ case 1: + _r$3 = z.SetInt(x.Num()); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + _tmp = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + _tmp$1 = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + a[0] = $clone(_tmp, Float); + b[0] = $clone(_tmp$1, Float); + _r$4 = a[0].SetInt(x.Num()); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = b[0].SetInt(x.Denom()); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + if (z.prec === 0) { + z.prec = umax32(a[0].prec, b[0].prec); + } + _r$6 = z.Quo(a[0], b[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetRat }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.a = a; $f.b = b; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetRat = function(x) { return this.$val.SetRat(x); }; + Float.ptr.prototype.SetInf = function(signbit) { + var signbit, z; + z = this; + z.acc = 0; + z.form = 2; + z.neg = signbit; + return z; + }; + Float.prototype.SetInf = function(signbit) { return this.$val.SetInf(signbit); }; + Float.ptr.prototype.Set = function(x) { + var x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + z.acc = 0; + /* */ if (!(z === x)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(z === x)) { */ case 4: + z.form = x.form; + z.neg = x.neg; + if (x.form === 1) { + z.exp = x.exp; + z.mant = z.mant.set(x.mant); + } + /* */ if (z.prec === 0) { $s = 6; continue; } + /* */ if (z.prec < x.prec) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (z.prec === 0) { */ case 6: + z.prec = x.prec; + $s = 8; continue; + /* } else if (z.prec < x.prec) { */ case 7: + $r = z.round(0); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + /* } */ case 5: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Set }; } $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Set = function(x) { return this.$val.Set(x); }; + Float.ptr.prototype.Copy = function(x) { + var x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!(z === x)) { + z.prec = x.prec; + z.mode = x.mode; + z.acc = x.acc; + z.form = x.form; + z.neg = x.neg; + if (z.form === 1) { + z.mant = z.mant.set(x.mant); + z.exp = x.exp; + } + } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Copy }; } $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Copy = function(x) { return this.$val.Copy(x); }; + msb32 = function(x) { + var _1, i, x; + i = x.$length - 1 >> 0; + if (i < 0) { + return 0; + } + if (false && (((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & 2147483648) >>> 0) === 0)) { + $panic(new $String("x not normalized")); + } + _1 = 32; + if (_1 === (32)) { + return ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)); + } else if (_1 === (64)) { + return ((0 >>> 0)); + } + $panic(new $String("unreachable")); + }; + msb64 = function(x) { + var _1, i, v, x, x$1, x$2, x$3, x$4, x$5; + i = x.$length - 1 >> 0; + if (i < 0) { + return new $Uint64(0, 0); + } + if (false && (((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & 2147483648) >>> 0) === 0)) { + $panic(new $String("x not normalized")); + } + _1 = 32; + if (_1 === (32)) { + v = $shiftLeft64(((x$1 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), new $Uint64(0, x$1.constructor === Number ? x$1 : 1))), 32); + if (i > 0) { + v = (x$2 = ((x$3 = (x$4 = i - 1 >> 0, ((x$4 < 0 || x$4 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$4])), new $Uint64(0, x$3.constructor === Number ? x$3 : 1))), new $Uint64(v.$high | x$2.$high, (v.$low | x$2.$low) >>> 0)); + } + return v; + } else if (_1 === (64)) { + return ((x$5 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), new $Uint64(0, x$5.constructor === Number ? x$5 : 1))); + } + $panic(new $String("unreachable")); + }; + Float.ptr.prototype.Uint64 = function() { + var _1, u, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; u = $f.u; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _1 = x.form; + if (_1 === (1)) { + if (x.neg) { + $s = -1; return [new $Uint64(0, 0), 1]; + } + if (x.exp <= 0) { + $s = -1; return [new $Uint64(0, 0), -1]; + } + if (x.exp <= 64) { + u = $shiftRightUint64(msb64(x.mant), ((64 - ((x.exp >>> 0)) >>> 0))); + if (x.MinPrec() <= 64) { + $s = -1; return [u, 0]; + } + $s = -1; return [u, -1]; + } + $s = -1; return [new $Uint64(4294967295, 4294967295), -1]; + } else if (_1 === (0)) { + $s = -1; return [new $Uint64(0, 0), 0]; + } else if (_1 === (2)) { + if (x.neg) { + $s = -1; return [new $Uint64(0, 0), 1]; + } + $s = -1; return [new $Uint64(4294967295, 4294967295), -1]; + } + $panic(new $String("unreachable")); + $s = -1; return [new $Uint64(0, 0), 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Uint64 }; } $f._1 = _1; $f.u = u; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Uint64 = function() { return this.$val.Uint64(); }; + Float.ptr.prototype.Int64 = function() { + var _1, acc, i, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; acc = $f.acc; i = $f.i; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _1 = x.form; + if (_1 === (1)) { + acc = makeAcc(x.neg); + if (x.exp <= 0) { + $s = -1; return [new $Int64(0, 0), acc]; + } + if (x.exp <= 63) { + i = ((x$1 = $shiftRightUint64(msb64(x.mant), ((64 - ((x.exp >>> 0)) >>> 0))), new $Int64(x$1.$high, x$1.$low))); + if (x.neg) { + i = new $Int64(-i.$high, -i.$low); + } + if (x.MinPrec() <= ((x.exp >>> 0))) { + $s = -1; return [i, 0]; + } + $s = -1; return [i, acc]; + } + if (x.neg) { + if ((x.exp === 64) && (x.MinPrec() === 1)) { + acc = 0; + } + $s = -1; return [new $Int64(-2147483648, 0), acc]; + } + $s = -1; return [new $Int64(2147483647, 4294967295), -1]; + } else if (_1 === (0)) { + $s = -1; return [new $Int64(0, 0), 0]; + } else if (_1 === (2)) { + if (x.neg) { + $s = -1; return [new $Int64(-2147483648, 0), 1]; + } + $s = -1; return [new $Int64(2147483647, 4294967295), -1]; + } + $panic(new $String("unreachable")); + $s = -1; return [new $Int64(0, 0), 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Int64 }; } $f._1 = _1; $f.acc = acc; $f.i = i; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Int64 = function() { return this.$val.Int64(); }; + Float.ptr.prototype.Float32 = function() { + var _1, _r$3, _tmp, _tmp$1, _tmp$2, bexp, e, mant, p, r, sign, x, y, z, z$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; bexp = $f.bexp; e = $f.e; mant = $f.mant; p = $f.p; r = $f.r; sign = $f.sign; x = $f.x; y = $f.y; z = $f.z; z$1 = $f.z$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _1 = x.form; + /* */ if (_1 === (1)) { $s = 5; continue; } + /* */ if (_1 === (0)) { $s = 6; continue; } + /* */ if (_1 === (2)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_1 === (1)) { */ case 5: + e = x.exp - 1 >> 0; + p = 24; + if (e < -126) { + p = 150 + ((e >> 0)) >> 0; + if (p < 0 || (p === 0) && (x.mant.sticky((((x.mant.$length >>> 0)) * 32 >>> 0) - 1 >>> 0) === 0)) { + if (x.neg) { + z = 0; + $s = -1; return [-z, 1]; + } + $s = -1; return [0, -1]; + } + if (p === 0) { + if (x.neg) { + $s = -1; return [-1.401298464324817e-45, -1]; + } + $s = -1; return [1.401298464324817e-45, 1]; + } + } + r = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + r.prec = ((p >>> 0)); + _r$3 = r.Set(x); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + e = r.exp - 1 >> 0; + if ((r.form === 2) || e > 127) { + if (x.neg) { + $s = -1; return [($fround(math.Inf(-1))), -1]; + } + $s = -1; return [($fround(math.Inf(1))), 1]; + } + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + sign = _tmp; + bexp = _tmp$1; + mant = _tmp$2; + if (x.neg) { + sign = 2147483648; + } + if (e < -126) { + p = 150 + ((e >> 0)) >> 0; + mant = (y = (((32 - p >> 0) >>> 0)), y < 32 ? (msb32(r.mant) >>> y) : 0) >>> 0; + } else { + bexp = (((e + 127 >> 0) >>> 0)) << 23 >>> 0; + mant = ((msb32(r.mant) >>> 8 >>> 0) & 8388607) >>> 0; + } + $s = -1; return [math.Float32frombits((((sign | bexp) >>> 0) | mant) >>> 0), r.acc]; + /* } else if (_1 === (0)) { */ case 6: + if (x.neg) { + z$1 = 0; + $s = -1; return [-z$1, 0]; + } + $s = -1; return [0, 0]; + /* } else if (_1 === (2)) { */ case 7: + if (x.neg) { + $s = -1; return [($fround(math.Inf(-1))), 0]; + } + $s = -1; return [($fround(math.Inf(1))), 0]; + /* } */ case 8: + case 4: + $panic(new $String("unreachable")); + $s = -1; return [0, 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Float32 }; } $f._1 = _1; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f.bexp = bexp; $f.e = e; $f.mant = mant; $f.p = p; $f.r = r; $f.sign = sign; $f.x = x; $f.y = y; $f.z = z; $f.z$1 = z$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Float32 = function() { return this.$val.Float32(); }; + Float.ptr.prototype.Float64 = function() { + var _1, _r$3, _tmp, _tmp$1, _tmp$2, bexp, e, mant, p, r, sign, x, x$1, x$2, z, z$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; bexp = $f.bexp; e = $f.e; mant = $f.mant; p = $f.p; r = $f.r; sign = $f.sign; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; z = $f.z; z$1 = $f.z$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _1 = x.form; + /* */ if (_1 === (1)) { $s = 5; continue; } + /* */ if (_1 === (0)) { $s = 6; continue; } + /* */ if (_1 === (2)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_1 === (1)) { */ case 5: + e = x.exp - 1 >> 0; + p = 53; + if (e < -1022) { + p = 1075 + ((e >> 0)) >> 0; + if (p < 0 || (p === 0) && (x.mant.sticky((((x.mant.$length >>> 0)) * 32 >>> 0) - 1 >>> 0) === 0)) { + if (x.neg) { + z = 0; + $s = -1; return [-z, 1]; + } + $s = -1; return [0, -1]; + } + if (p === 0) { + if (x.neg) { + $s = -1; return [-5e-324, -1]; + } + $s = -1; return [5e-324, 1]; + } + } + r = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + r.prec = ((p >>> 0)); + _r$3 = r.Set(x); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + e = r.exp - 1 >> 0; + if ((r.form === 2) || e > 1023) { + if (x.neg) { + $s = -1; return [math.Inf(-1), -1]; + } + $s = -1; return [math.Inf(1), 1]; + } + _tmp = new $Uint64(0, 0); + _tmp$1 = new $Uint64(0, 0); + _tmp$2 = new $Uint64(0, 0); + sign = _tmp; + bexp = _tmp$1; + mant = _tmp$2; + if (x.neg) { + sign = new $Uint64(2147483648, 0); + } + if (e < -1022) { + p = 1075 + ((e >> 0)) >> 0; + mant = $shiftRightUint64(msb64(r.mant), (((64 - p >> 0) >>> 0))); + } else { + bexp = $shiftLeft64((new $Uint64(0, (e + 1023 >> 0))), 52); + mant = (x$1 = $shiftRightUint64(msb64(r.mant), 11), new $Uint64(x$1.$high & 1048575, (x$1.$low & 4294967295) >>> 0)); + } + $s = -1; return [math.Float64frombits((x$2 = new $Uint64(sign.$high | bexp.$high, (sign.$low | bexp.$low) >>> 0), new $Uint64(x$2.$high | mant.$high, (x$2.$low | mant.$low) >>> 0))), r.acc]; + /* } else if (_1 === (0)) { */ case 6: + if (x.neg) { + z$1 = 0; + $s = -1; return [-z$1, 0]; + } + $s = -1; return [0, 0]; + /* } else if (_1 === (2)) { */ case 7: + if (x.neg) { + $s = -1; return [math.Inf(-1), 0]; + } + $s = -1; return [math.Inf(1), 0]; + /* } */ case 8: + case 4: + $panic(new $String("unreachable")); + $s = -1; return [0, 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Float64 }; } $f._1 = _1; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f.bexp = bexp; $f.e = e; $f.mant = mant; $f.p = p; $f.r = r; $f.sign = sign; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.z = z; $f.z$1 = z$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Float64 = function() { return this.$val.Float64(); }; + Float.ptr.prototype.Int = function(z) { + var _1, acc, allBits, exp, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; acc = $f.acc; allBits = $f.allBits; exp = $f.exp; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z === ptrType$1.nil && x.form <= 1) { + z = new Int.ptr(false, nat.nil); + } + _1 = x.form; + if (_1 === (1)) { + acc = makeAcc(x.neg); + if (x.exp <= 0) { + $s = -1; return [z.SetInt64(new $Int64(0, 0)), acc]; + } + allBits = ((x.mant.$length >>> 0)) * 32 >>> 0; + exp = ((x.exp >>> 0)); + if (x.MinPrec() <= exp) { + acc = 0; + } + if (z === ptrType$1.nil) { + z = new Int.ptr(false, nat.nil); + } + z.neg = x.neg; + if (exp > allBits) { + z.abs = z.abs.shl(x.mant, exp - allBits >>> 0); + } else if (exp < allBits) { + z.abs = z.abs.shr(x.mant, allBits - exp >>> 0); + } else { + z.abs = z.abs.set(x.mant); + } + $s = -1; return [z, acc]; + } else if (_1 === (0)) { + $s = -1; return [z.SetInt64(new $Int64(0, 0)), 0]; + } else if (_1 === (2)) { + $s = -1; return [ptrType$1.nil, makeAcc(x.neg)]; + } + $panic(new $String("unreachable")); + $s = -1; return [ptrType$1.nil, 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Int }; } $f._1 = _1; $f.acc = acc; $f.allBits = allBits; $f.exp = exp; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Int = function(z) { return this.$val.Int(z); }; + Float.ptr.prototype.Rat = function(z) { + var _1, _r$3, allBits, t, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; allBits = $f.allBits; t = $f.t; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z === ptrType$2.nil && x.form <= 1) { + z = new Rat.ptr(new Int.ptr(false, nat.nil), new Int.ptr(false, nat.nil)); + } + _1 = x.form; + /* */ if (_1 === (1)) { $s = 5; continue; } + /* */ if (_1 === (0)) { $s = 6; continue; } + /* */ if (_1 === (2)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_1 === (1)) { */ case 5: + allBits = $imul(((x.mant.$length >> 0)), 32); + z.a.neg = x.neg; + /* */ if (x.exp > allBits) { $s = 10; continue; } + /* */ if (x.exp < allBits) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (x.exp > allBits) { */ case 10: + z.a.abs = z.a.abs.shl(x.mant, (((x.exp - allBits >> 0) >>> 0))); + z.b.abs = $subslice(z.b.abs, 0, 0); + $s = 13; continue; + /* } else if (x.exp < allBits) { */ case 11: + z.a.abs = z.a.abs.set(x.mant); + t = z.b.abs.setUint64(new $Uint64(0, 1)); + z.b.abs = t.shl(t, (((allBits - x.exp >> 0) >>> 0))); + _r$3 = z.norm(); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = 13; continue; + /* } else { */ case 12: + z.a.abs = z.a.abs.set(x.mant); + z.b.abs = $subslice(z.b.abs, 0, 0); + /* } */ case 13: + case 9: + $s = -1; return [z, 0]; + /* } else if (_1 === (0)) { */ case 6: + $s = -1; return [z.SetInt64(new $Int64(0, 0)), 0]; + /* } else if (_1 === (2)) { */ case 7: + $s = -1; return [ptrType$2.nil, makeAcc(x.neg)]; + /* } */ case 8: + case 4: + $panic(new $String("unreachable")); + $s = -1; return [ptrType$2.nil, 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Rat }; } $f._1 = _1; $f._r$3 = _r$3; $f.allBits = allBits; $f.t = t; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Rat = function(z) { return this.$val.Rat(z); }; + Float.ptr.prototype.Abs = function(x) { + var _r$3, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.Set(x); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + z.neg = false; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Abs }; } $f._r$3 = _r$3; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Abs = function(x) { return this.$val.Abs(x); }; + Float.ptr.prototype.Neg = function(x) { + var _r$3, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.Set(x); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + z.neg = !z.neg; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Neg }; } $f._r$3 = _r$3; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Neg = function(x) { return this.$val.Neg(x); }; + validateBinaryOperands = function(x, y) { + var x, y; + if (true) { + $panic(new $String("validateBinaryOperands called but debugFloat is not set")); + } + if (x.mant.$length === 0) { + $panic(new $String("empty mantissa for x")); + } + if (y.mant.$length === 0) { + $panic(new $String("empty mantissa for y")); + } + }; + Float.ptr.prototype.uadd = function(x, y) { + var al, ex, ey, t, t$1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; al = $f.al; ex = $f.ex; ey = $f.ey; t = $f.t; t$1 = $f.t$1; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (false) { + validateBinaryOperands(x, y); + } + ex = (x$1 = (new $Int64(0, x.exp)), x$2 = $mul64((new $Int64(0, x.mant.$length)), new $Int64(0, 32)), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + ey = (x$3 = (new $Int64(0, y.exp)), x$4 = $mul64((new $Int64(0, y.mant.$length)), new $Int64(0, 32)), new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)); + al = alias(z.mant, x.mant) || alias(z.mant, y.mant); + if ((ex.$high < ey.$high || (ex.$high === ey.$high && ex.$low < ey.$low))) { + if (al) { + t = (nat.nil).shl(y.mant, ((new $Int64(ey.$high - ex.$high, ey.$low - ex.$low).$low >>> 0))); + z.mant = z.mant.add(x.mant, t); + } else { + z.mant = z.mant.shl(y.mant, ((new $Int64(ey.$high - ex.$high, ey.$low - ex.$low).$low >>> 0))); + z.mant = z.mant.add(x.mant, z.mant); + } + } else if ((ex.$high > ey.$high || (ex.$high === ey.$high && ex.$low > ey.$low))) { + if (al) { + t$1 = (nat.nil).shl(x.mant, ((new $Int64(ex.$high - ey.$high, ex.$low - ey.$low).$low >>> 0))); + z.mant = z.mant.add(t$1, y.mant); + } else { + z.mant = z.mant.shl(x.mant, ((new $Int64(ex.$high - ey.$high, ex.$low - ey.$low).$low >>> 0))); + z.mant = z.mant.add(z.mant, y.mant); + } + ex = ey; + } else { + z.mant = z.mant.add(x.mant, y.mant); + } + $r = z.setExpAndRound((x$5 = (x$6 = $mul64((new $Int64(0, z.mant.$length)), new $Int64(0, 32)), new $Int64(ex.$high + x$6.$high, ex.$low + x$6.$low)), x$7 = fnorm(z.mant), new $Int64(x$5.$high - x$7.$high, x$5.$low - x$7.$low)), 0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.uadd }; } $f.al = al; $f.ex = ex; $f.ey = ey; $f.t = t; $f.t$1 = t$1; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.uadd = function(x, y) { return this.$val.uadd(x, y); }; + Float.ptr.prototype.usub = function(x, y) { + var al, ex, ey, t, t$1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; al = $f.al; ex = $f.ex; ey = $f.ey; t = $f.t; t$1 = $f.t$1; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (false) { + validateBinaryOperands(x, y); + } + ex = (x$1 = (new $Int64(0, x.exp)), x$2 = $mul64((new $Int64(0, x.mant.$length)), new $Int64(0, 32)), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + ey = (x$3 = (new $Int64(0, y.exp)), x$4 = $mul64((new $Int64(0, y.mant.$length)), new $Int64(0, 32)), new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)); + al = alias(z.mant, x.mant) || alias(z.mant, y.mant); + if ((ex.$high < ey.$high || (ex.$high === ey.$high && ex.$low < ey.$low))) { + if (al) { + t = (nat.nil).shl(y.mant, ((new $Int64(ey.$high - ex.$high, ey.$low - ex.$low).$low >>> 0))); + z.mant = t.sub(x.mant, t); + } else { + z.mant = z.mant.shl(y.mant, ((new $Int64(ey.$high - ex.$high, ey.$low - ex.$low).$low >>> 0))); + z.mant = z.mant.sub(x.mant, z.mant); + } + } else if ((ex.$high > ey.$high || (ex.$high === ey.$high && ex.$low > ey.$low))) { + if (al) { + t$1 = (nat.nil).shl(x.mant, ((new $Int64(ex.$high - ey.$high, ex.$low - ey.$low).$low >>> 0))); + z.mant = t$1.sub(t$1, y.mant); + } else { + z.mant = z.mant.shl(x.mant, ((new $Int64(ex.$high - ey.$high, ex.$low - ey.$low).$low >>> 0))); + z.mant = z.mant.sub(z.mant, y.mant); + } + ex = ey; + } else { + z.mant = z.mant.sub(x.mant, y.mant); + } + if (z.mant.$length === 0) { + z.acc = 0; + z.form = 0; + z.neg = false; + $s = -1; return; + } + $r = z.setExpAndRound((x$5 = (x$6 = $mul64((new $Int64(0, z.mant.$length)), new $Int64(0, 32)), new $Int64(ex.$high + x$6.$high, ex.$low + x$6.$low)), x$7 = fnorm(z.mant), new $Int64(x$5.$high - x$7.$high, x$5.$low - x$7.$low)), 0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.usub }; } $f.al = al; $f.ex = ex; $f.ey = ey; $f.t = t; $f.t$1 = t$1; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.usub = function(x, y) { return this.$val.usub(x, y); }; + Float.ptr.prototype.umul = function(x, y) { + var e, x, x$1, x$2, x$3, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (false) { + validateBinaryOperands(x, y); + } + e = (x$1 = (new $Int64(0, x.exp)), x$2 = (new $Int64(0, y.exp)), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); + if (x === y) { + z.mant = z.mant.sqr(x.mant); + } else { + z.mant = z.mant.mul(x.mant, y.mant); + } + $r = z.setExpAndRound((x$3 = fnorm(z.mant), new $Int64(e.$high - x$3.$high, e.$low - x$3.$low)), 0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.umul }; } $f.e = e; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.umul = function(x, y) { return this.$val.umul(x, y); }; + Float.ptr.prototype.uquo = function(x, y) { + var _q, _r$3, _tuple, d, d$1, e, n, r, sbit, x, x$1, x$2, x$3, x$4, x$5, xadj, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r$3 = $f._r$3; _tuple = $f._tuple; d = $f.d; d$1 = $f.d$1; e = $f.e; n = $f.n; r = $f.r; sbit = $f.sbit; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; xadj = $f.xadj; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (false) { + validateBinaryOperands(x, y); + } + n = (((_q = z.prec / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) + 1 >> 0; + xadj = x.mant; + d = (n - x.mant.$length >> 0) + y.mant.$length >> 0; + if (d > 0) { + xadj = $makeSlice(nat, (x.mant.$length + d >> 0)); + $copySlice($subslice(xadj, d), x.mant); + } + d$1 = xadj.$length - y.mant.$length >> 0; + r = nat.nil; + _r$3 = z.mant.div(nat.nil, xadj, y.mant); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z.mant = _tuple[0]; + r = _tuple[1]; + e = (x$1 = (x$2 = (new $Int64(0, x.exp)), x$3 = (new $Int64(0, y.exp)), new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)), x$4 = $mul64((new $Int64(0, (d$1 - z.mant.$length >> 0))), new $Int64(0, 32)), new $Int64(x$1.$high - x$4.$high, x$1.$low - x$4.$low)); + sbit = 0; + if (r.$length > 0) { + sbit = 1; + } + $r = z.setExpAndRound((x$5 = fnorm(z.mant), new $Int64(e.$high - x$5.$high, e.$low - x$5.$low)), sbit); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.uquo }; } $f._q = _q; $f._r$3 = _r$3; $f._tuple = _tuple; $f.d = d; $f.d$1 = d$1; $f.e = e; $f.n = n; $f.r = r; $f.sbit = sbit; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.xadj = xadj; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.uquo = function(x, y) { return this.$val.uquo(x, y); }; + Float.ptr.prototype.ucmp = function(y) { + var _tmp, _tmp$1, i, j, x, x$1, x$2, xm, y, ym; + x = this; + if (false) { + validateBinaryOperands(x, y); + } + if (x.exp < y.exp) { + return -1; + } else if (x.exp > y.exp) { + return 1; + } + i = x.mant.$length; + j = y.mant.$length; + while (true) { + if (!(i > 0 || j > 0)) { break; } + _tmp = 0; + _tmp$1 = 0; + xm = _tmp; + ym = _tmp$1; + if (i > 0) { + i = i - (1) >> 0; + xm = (x$1 = x.mant, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); + } + if (j > 0) { + j = j - (1) >> 0; + ym = (x$2 = y.mant, ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j])); + } + if (xm < ym) { + return -1; + } else if (xm > ym) { + return 1; + } + } + return 0; + }; + Float.prototype.ucmp = function(y) { return this.$val.ucmp(y); }; + Float.ptr.prototype.Add = function(x, y) { + var _r$3, _r$4, x, x$1, y, yneg, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; x = $f.x; x$1 = $f.x$1; y = $f.y; yneg = $f.yneg; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = y.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z.prec === 0) { + z.prec = umax32(x.prec, y.prec); + } + /* */ if ((x.form === 1) && (y.form === 1)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((x.form === 1) && (y.form === 1)) { */ case 5: + yneg = y.neg; + z.neg = x.neg; + /* */ if (x.neg === yneg) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (x.neg === yneg) { */ case 7: + $r = z.uadd(x, y); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 9; continue; + /* } else { */ case 8: + /* */ if (x.ucmp(y) > 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (x.ucmp(y) > 0) { */ case 11: + $r = z.usub(x, y); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 13; continue; + /* } else { */ case 12: + z.neg = !z.neg; + $r = z.usub(y, x); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + /* } */ case 9: + if ((z.form === 0) && (z.mode === 4) && (z.acc === 0)) { + z.neg = true; + } + $s = -1; return z; + /* } */ case 6: + if ((x.form === 2) && (y.form === 2) && !(x.neg === y.neg)) { + z.acc = 0; + z.form = 0; + z.neg = false; + $panic((x$1 = new ErrNaN.ptr("addition of infinities with opposite signs"), new x$1.constructor.elem(x$1))); + } + if ((x.form === 0) && (y.form === 0)) { + z.acc = 0; + z.form = 0; + z.neg = x.neg && y.neg; + $s = -1; return z; + } + /* */ if ((x.form === 2) || (y.form === 0)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if ((x.form === 2) || (y.form === 0)) { */ case 16: + _r$3 = z.Set(x); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 17: + _r$4 = z.Set(y); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Add }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.yneg = yneg; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Add = function(x, y) { return this.$val.Add(x, y); }; + Float.ptr.prototype.Sub = function(x, y) { + var _r$3, _r$4, x, x$1, y, yneg, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; x = $f.x; x$1 = $f.x$1; y = $f.y; yneg = $f.yneg; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = y.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z.prec === 0) { + z.prec = umax32(x.prec, y.prec); + } + /* */ if ((x.form === 1) && (y.form === 1)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((x.form === 1) && (y.form === 1)) { */ case 5: + yneg = y.neg; + z.neg = x.neg; + /* */ if (!(x.neg === yneg)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(x.neg === yneg)) { */ case 7: + $r = z.uadd(x, y); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 9; continue; + /* } else { */ case 8: + /* */ if (x.ucmp(y) > 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (x.ucmp(y) > 0) { */ case 11: + $r = z.usub(x, y); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 13; continue; + /* } else { */ case 12: + z.neg = !z.neg; + $r = z.usub(y, x); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + /* } */ case 9: + if ((z.form === 0) && (z.mode === 4) && (z.acc === 0)) { + z.neg = true; + } + $s = -1; return z; + /* } */ case 6: + if ((x.form === 2) && (y.form === 2) && x.neg === y.neg) { + z.acc = 0; + z.form = 0; + z.neg = false; + $panic((x$1 = new ErrNaN.ptr("subtraction of infinities with equal signs"), new x$1.constructor.elem(x$1))); + } + if ((x.form === 0) && (y.form === 0)) { + z.acc = 0; + z.form = 0; + z.neg = x.neg && !y.neg; + $s = -1; return z; + } + /* */ if ((x.form === 2) || (y.form === 0)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if ((x.form === 2) || (y.form === 0)) { */ case 16: + _r$3 = z.Set(x); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 17: + _r$4 = z.Neg(y); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Sub }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.yneg = yneg; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Sub = function(x, y) { return this.$val.Sub(x, y); }; + Float.ptr.prototype.Mul = function(x, y) { + var x, x$1, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; x$1 = $f.x$1; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = y.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z.prec === 0) { + z.prec = umax32(x.prec, y.prec); + } + z.neg = !(x.neg === y.neg); + /* */ if ((x.form === 1) && (y.form === 1)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((x.form === 1) && (y.form === 1)) { */ case 5: + $r = z.umul(x, y); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return z; + /* } */ case 6: + z.acc = 0; + if ((x.form === 0) && (y.form === 2) || (x.form === 2) && (y.form === 0)) { + z.form = 0; + z.neg = false; + $panic((x$1 = new ErrNaN.ptr("multiplication of zero with infinity"), new x$1.constructor.elem(x$1))); + } + if ((x.form === 2) || (y.form === 2)) { + z.form = 2; + $s = -1; return z; + } + z.form = 0; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Mul }; } $f.x = x; $f.x$1 = x$1; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Mul = function(x, y) { return this.$val.Mul(x, y); }; + Float.ptr.prototype.Quo = function(x, y) { + var x, x$1, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; x$1 = $f.x$1; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = y.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z.prec === 0) { + z.prec = umax32(x.prec, y.prec); + } + z.neg = !(x.neg === y.neg); + /* */ if ((x.form === 1) && (y.form === 1)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((x.form === 1) && (y.form === 1)) { */ case 5: + $r = z.uquo(x, y); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return z; + /* } */ case 6: + z.acc = 0; + if ((x.form === 0) && (y.form === 0) || (x.form === 2) && (y.form === 2)) { + z.form = 0; + z.neg = false; + $panic((x$1 = new ErrNaN.ptr("division of zero by zero or infinity by infinity"), new x$1.constructor.elem(x$1))); + } + if ((x.form === 0) || (y.form === 2)) { + z.form = 0; + $s = -1; return z; + } + z.form = 2; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Quo }; } $f.x = x; $f.x$1 = x$1; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Quo = function(x, y) { return this.$val.Quo(x, y); }; + Float.ptr.prototype.Cmp = function(y) { + var _1, mx, my, x, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; mx = $f.mx; my = $f.my; x = $f.x; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = y.validate(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + mx = x.ord(); + my = y.ord(); + if (mx < my) { + $s = -1; return -1; + } else if (mx > my) { + $s = -1; return 1; + } + _1 = mx; + if (_1 === (-1)) { + $s = -1; return y.ucmp(x); + } else if (_1 === (1)) { + $s = -1; return x.ucmp(y); + } + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Cmp }; } $f._1 = _1; $f.mx = mx; $f.my = my; $f.x = x; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Cmp = function(y) { return this.$val.Cmp(y); }; + Float.ptr.prototype.ord = function() { + var _1, m, x; + x = this; + m = 0; + _1 = x.form; + if (_1 === (1)) { + m = 1; + } else if (_1 === (0)) { + return 0; + } else if (_1 === (2)) { + m = 2; + } + if (x.neg) { + m = -m; + } + return m; + }; + Float.prototype.ord = function() { return this.$val.ord(); }; + umax32 = function(x, y) { + var x, y; + if (x > y) { + return x; + } + return y; + }; + Float.ptr.prototype.SetString = function(s) { + var _r$3, _tuple, err, f, s, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err; f = $f.f; s = $f.s; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.Parse(s, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + f = _tuple[0]; + err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return [f, true]; + } + $s = -1; return [ptrType.nil, false]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.SetString }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.s = s; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.SetString = function(s) { return this.$val.SetString(s); }; + Float.ptr.prototype.scan = function(r, base) { + var _1, _2, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, b, base, d, ebase, err, exp, exp2, exp5, f, fcount, p, prec, r, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; base = $f.base; d = $f.d; ebase = $f.ebase; err = $f.err; exp = $f.exp; exp2 = $f.exp2; exp5 = $f.exp5; f = $f.f; fcount = $f.fcount; p = $f.p; prec = $f.prec; r = $f.r; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType.nil; + b = 0; + err = $ifaceNil; + z = this; + prec = z.prec; + if (prec === 0) { + prec = 64; + } + z.form = 0; + _r$3 = scanSign(r); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z.neg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [f, b, err]; + } + fcount = 0; + _r$4 = z.mant.scan(r, base, true); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + z.mant = _tuple$1[0]; + b = _tuple$1[1]; + fcount = _tuple$1[2]; + err = _tuple$1[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [f, b, err]; + } + exp = new $Int64(0, 0); + ebase = 0; + _r$5 = scanExponent(r, true); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + exp = _tuple$2[0]; + ebase = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [f, b, err]; + } + if (z.mant.$length === 0) { + z.prec = prec; + z.acc = 0; + z.form = 0; + f = z; + $s = -1; return [f, b, err]; + } + exp2 = (x = $mul64((new $Int64(0, z.mant.$length)), new $Int64(0, 32)), x$1 = fnorm(z.mant), new $Int64(x.$high - x$1.$high, x.$low - x$1.$low)); + exp5 = new $Int64(0, 0); + if (fcount < 0) { + d = (new $Int64(0, fcount)); + _1 = b; + if (_1 === (10)) { + exp5 = d; + exp2 = (x$2 = d, new $Int64(exp2.$high + x$2.$high, exp2.$low + x$2.$low)); + } else if (_1 === (2)) { + exp2 = (x$3 = d, new $Int64(exp2.$high + x$3.$high, exp2.$low + x$3.$low)); + } else if (_1 === (16)) { + exp2 = (x$4 = $mul64(d, new $Int64(0, 4)), new $Int64(exp2.$high + x$4.$high, exp2.$low + x$4.$low)); + } else { + $panic(new $String("unexpected mantissa base")); + } + } + _2 = ebase; + if (_2 === (10)) { + exp5 = (x$5 = exp, new $Int64(exp5.$high + x$5.$high, exp5.$low + x$5.$low)); + exp2 = (x$6 = exp, new $Int64(exp2.$high + x$6.$high, exp2.$low + x$6.$low)); + } else if (_2 === (2)) { + exp2 = (x$7 = exp, new $Int64(exp2.$high + x$7.$high, exp2.$low + x$7.$low)); + } else { + $panic(new $String("unexpected exponent base")); + } + /* */ if ((-1 < exp2.$high || (-1 === exp2.$high && 2147483648 <= exp2.$low)) && (exp2.$high < 0 || (exp2.$high === 0 && exp2.$low <= 2147483647))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((-1 < exp2.$high || (-1 === exp2.$high && 2147483648 <= exp2.$low)) && (exp2.$high < 0 || (exp2.$high === 0 && exp2.$low <= 2147483647))) { */ case 4: + z.prec = prec; + z.form = 1; + z.exp = (((exp2.$low + ((exp2.$high >> 31) * 4294967296)) >> 0)); + f = z; + $s = 6; continue; + /* } else { */ case 5: + _r$6 = fmt.Errorf("exponent overflow", new sliceType([])); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err = _r$6; + $s = -1; return [f, b, err]; + /* } */ case 6: + /* */ if ((exp5.$high === 0 && exp5.$low === 0)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ((exp5.$high === 0 && exp5.$low === 0)) { */ case 8: + $r = z.round(0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [f, b, err]; + /* } */ case 9: + _r$7 = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0).SetPrec(z.Prec() + 64 >>> 0); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + p = _r$7; + /* */ if ((exp5.$high < 0 || (exp5.$high === 0 && exp5.$low < 0))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ((exp5.$high < 0 || (exp5.$high === 0 && exp5.$low < 0))) { */ case 12: + _arg = z; + _r$8 = p.pow5(((x$8 = new $Int64(-exp5.$high, -exp5.$low), new $Uint64(x$8.$high, x$8.$low)))); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _arg$1 = _r$8; + _r$9 = z.Quo(_arg, _arg$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + $s = 14; continue; + /* } else { */ case 13: + _arg$2 = z; + _r$10 = p.pow5((new $Uint64(exp5.$high, exp5.$low))); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg$3 = _r$10; + _r$11 = z.Mul(_arg$2, _arg$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + /* } */ case 14: + $s = -1; return [f, b, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.scan }; } $f._1 = _1; $f._2 = _2; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.base = base; $f.d = d; $f.ebase = ebase; $f.err = err; $f.exp = exp; $f.exp2 = exp2; $f.exp5 = exp5; $f.f = f; $f.fcount = fcount; $f.p = p; $f.prec = prec; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.scan = function(r, base) { return this.$val.scan(r, base); }; + Float.ptr.prototype.pow5 = function(n) { + var _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, f, n, x, x$1, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; f = $f.f; n = $f.n; x = $f.x; x$1 = $f.x$1; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if ((n.$high < 0 || (n.$high === 0 && n.$low <= 27))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((n.$high < 0 || (n.$high === 0 && n.$low <= 27))) { */ case 1: + _r$3 = z.SetUint64((($flatten64(n) < 0 || $flatten64(n) >= pow5tab.length) ? ($throwRuntimeError("index out of range"), undefined) : pow5tab[$flatten64(n)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + _r$4 = z.SetUint64(pow5tab[27]); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + n = (x = new $Uint64(0, 27), new $Uint64(n.$high - x.$high, n.$low - x.$low)); + _r$5 = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0).SetPrec(z.Prec() + 64 >>> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = _r$5.SetUint64(new $Uint64(0, 5)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + f = _r$6; + /* while (true) { */ case 7: + /* if (!((n.$high > 0 || (n.$high === 0 && n.$low > 0)))) { break; } */ if(!((n.$high > 0 || (n.$high === 0 && n.$low > 0)))) { $s = 8; continue; } + /* */ if (!((x$1 = new $Uint64(n.$high & 0, (n.$low & 1) >>> 0), (x$1.$high === 0 && x$1.$low === 0)))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!((x$1 = new $Uint64(n.$high & 0, (n.$low & 1) >>> 0), (x$1.$high === 0 && x$1.$low === 0)))) { */ case 9: + _r$7 = z.Mul(z, f); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + /* } */ case 10: + _r$8 = f.Mul(f, f); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + n = $shiftRightUint64(n, (1)); + /* } */ $s = 7; continue; case 8: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.pow5 }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f.f = f; $f.n = n; $f.x = x; $f.x$1 = x$1; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.pow5 = function(n) { return this.$val.pow5(n); }; + Float.ptr.prototype.Parse = function(s, base) { + var _r$3, _r$4, _tuple, _tuple$1, b, base, ch, err, err2, f, r, s, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; base = $f.base; ch = $f.ch; err = $f.err; err2 = $f.err2; f = $f.f; r = $f.r; s = $f.s; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType.nil; + b = 0; + err = $ifaceNil; + z = this; + if ((s.length === 3) && (s === "Inf" || s === "inf")) { + f = z.SetInf(false); + $s = -1; return [f, b, err]; + } + if ((s.length === 4) && ((s.charCodeAt(0) === 43) || (s.charCodeAt(0) === 45)) && ($substring(s, 1) === "Inf" || $substring(s, 1) === "inf")) { + f = z.SetInf(s.charCodeAt(0) === 45); + $s = -1; return [f, b, err]; + } + r = strings.NewReader(s); + _r$3 = z.scan(r, base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + f = _tuple[0]; + b = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [f, b, err]; + } + _tuple$1 = r.ReadByte(); + ch = _tuple$1[0]; + err2 = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err2, $ifaceNil)) { $s = 2; continue; } + /* */ if (!($interfaceIsEqual(err2, io.EOF))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err2, $ifaceNil)) { */ case 2: + _r$4 = fmt.Errorf("expected end of string, found %q", new sliceType([new $Uint8(ch)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + $s = 4; continue; + /* } else if (!($interfaceIsEqual(err2, io.EOF))) { */ case 3: + err = err2; + /* } */ case 4: + $s = -1; return [f, b, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Parse }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.base = base; $f.ch = ch; $f.err = err; $f.err2 = err2; $f.f = f; $f.r = r; $f.s = s; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Parse = function(s, base) { return this.$val.Parse(s, base); }; + Float.ptr.prototype.Scan = function(s, ch) { + var _r$3, _tuple, ch, err, s, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; ch = $f.ch; err = $f.err; s = $f.s; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + $r = s.SkipSpace(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = z.scan((x = new byteReader.ptr(s), new x.constructor.elem(x)), 0); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[2]; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Scan }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.ch = ch; $f.err = err; $f.s = s; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Scan = function(s, ch) { return this.$val.Scan(s, ch); }; + Float.ptr.prototype.GobEncode = function() { + var _q, b, buf, n, sz, x; + x = this; + if (x === ptrType.nil) { + return [sliceType$1.nil, $ifaceNil]; + } + sz = 6; + n = 0; + if (x.form === 1) { + n = (((_q = ((x.prec + 31 >>> 0)) / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)); + if (x.mant.$length < n) { + n = x.mant.$length; + } + sz = sz + ((4 + ($imul(n, 4)) >> 0)) >> 0; + } + buf = $makeSlice(sliceType$1, sz); + (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0] = 1); + b = ((((((((x.mode & 7) >>> 0) << 24 >>> 24)) << 5 << 24 >>> 24) | ((((((x.acc + 1 << 24 >> 24)) & 3) << 24 >>> 24)) << 3 << 24 >>> 24)) >>> 0) | (((((x.form & 3) >>> 0) << 24 >>> 24)) << 1 << 24 >>> 24)) >>> 0; + if (x.neg) { + b = (b | (1)) >>> 0; + } + (1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1] = b); + $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(buf, 2), x.prec); + if (x.form === 1) { + $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(buf, 6), ((x.exp >>> 0))); + $subslice(x.mant, (x.mant.$length - n >> 0)).bytes($subslice(buf, 10)); + } + return [buf, $ifaceNil]; + }; + Float.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Float.ptr.prototype.GobDecode = function(buf) { + var _r$3, _r$4, b, buf, oldMode, oldPrec, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; b = $f.b; buf = $f.buf; oldMode = $f.oldMode; oldPrec = $f.oldPrec; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (buf.$length === 0) { + Float.copy(z, new Float.ptr(0, 0, 0, 0, false, nat.nil, 0)); + $s = -1; return $ifaceNil; + } + /* */ if (!(((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 1))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 1))) { */ case 1: + _r$3 = fmt.Errorf("Float.GobDecode: encoding version %d not supported", new sliceType([new $Uint8((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + oldPrec = z.prec; + oldMode = z.mode; + b = (1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]); + z.mode = ((((((b >>> 5 << 24 >>> 24)) & 7) >>> 0) << 24 >>> 24)); + z.acc = ((((((b >>> 3 << 24 >>> 24)) & 3) >>> 0) << 24 >> 24)) - 1 << 24 >> 24; + z.form = ((((((b >>> 1 << 24 >>> 24)) & 3) >>> 0) << 24 >>> 24)); + z.neg = !((((b & 1) >>> 0) === 0)); + z.prec = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, 2)); + if (z.form === 1) { + z.exp = (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, 6)) >> 0)); + z.mant = z.mant.setBytes($subslice(buf, 10)); + } + /* */ if (!((oldPrec === 0))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((oldPrec === 0))) { */ case 4: + z.mode = oldMode; + _r$4 = z.SetPrec(((oldPrec >>> 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 5: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.GobDecode }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.b = b; $f.buf = buf; $f.oldMode = oldMode; $f.oldPrec = oldPrec; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.GobDecode = function(buf) { return this.$val.GobDecode(buf); }; + Float.ptr.prototype.MarshalText = function() { + var _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, buf, err, text, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; buf = $f.buf; err = $f.err; text = $f.text; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + text = sliceType$1.nil; + err = $ifaceNil; + x = this; + if (x === ptrType.nil) { + _tmp = (new sliceType$1($stringToBytes(""))); + _tmp$1 = $ifaceNil; + text = _tmp; + err = _tmp$1; + $s = -1; return [text, err]; + } + buf = sliceType$1.nil; + _r$3 = x.Append(buf, 103, -1); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tmp$2 = _r$3; + _tmp$3 = $ifaceNil; + text = _tmp$2; + err = _tmp$3; + $s = -1; return [text, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.MarshalText }; } $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.buf = buf; $f.err = err; $f.text = text; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Float.ptr.prototype.UnmarshalText = function(text) { + var _r$3, _r$4, _tuple, err, text, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; err = $f.err; text = $f.text; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.Parse(($bytesToString(text)), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + _r$4 = fmt.Errorf("math/big: cannot unmarshal %q into a *big.Float (%v)", new sliceType([text, err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + /* } */ case 3: + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.UnmarshalText }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.err = err; $f.text = text; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; + Float.ptr.prototype.Text = function(format, prec) { + var _r$3, cap, format, prec, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; cap = $f.cap; format = $f.format; prec = $f.prec; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + cap = 10; + if (prec > 0) { + cap = cap + (prec) >> 0; + } + _r$3 = x.Append($makeSlice(sliceType$1, 0, cap), format, prec); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return ($bytesToString(_r$3)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Text }; } $f._r$3 = _r$3; $f.cap = cap; $f.format = format; $f.prec = prec; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Text = function(format, prec) { return this.$val.Text(format, prec); }; + Float.ptr.prototype.String = function() { + var _r$3, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = x.Text(103, 10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.String }; } $f._r$3 = _r$3; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.String = function() { return this.$val.String(); }; + Float.ptr.prototype.Append = function(buf, fmt$1, prec) { + var _1, _2, _3, _4, _r$3, _r$4, buf, d, eprec, exp, fmt$1, prec, shortest, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _3 = $f._3; _4 = $f._4; _r$3 = $f._r$3; _r$4 = $f._r$4; buf = $f.buf; d = $f.d; eprec = $f.eprec; exp = $f.exp; fmt$1 = $f.fmt$1; prec = $f.prec; shortest = $f.shortest; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = [d]; + x = this; + if (x.neg) { + buf = $append(buf, 45); + } + if (x.form === 2) { + if (!x.neg) { + buf = $append(buf, 43); + } + $s = -1; return $appendSlice(buf, "Inf"); + } + _1 = fmt$1; + /* */ if (_1 === (98)) { $s = 2; continue; } + /* */ if (_1 === (112)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === (98)) { */ case 2: + _r$3 = x.fmtB(buf); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } else if (_1 === (112)) { */ case 3: + _r$4 = x.fmtP(buf); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 4: + case 1: + d[0] = new decimal.ptr(sliceType$1.nil, 0); + /* */ if (x.form === 1) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (x.form === 1) { */ case 7: + $r = d[0].init(x.mant, ((x.exp >> 0)) - x.mant.bitLen() >> 0); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + shortest = false; + /* */ if (prec < 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (prec < 0) { */ case 10: + shortest = true; + $r = roundShortest(d[0], x); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _2 = fmt$1; + if ((_2 === (101)) || (_2 === (69))) { + prec = d[0].mant.$length - 1 >> 0; + } else if (_2 === (102)) { + prec = max(d[0].mant.$length - d[0].exp >> 0, 0); + } else if ((_2 === (103)) || (_2 === (71))) { + prec = d[0].mant.$length; + } + $s = 12; continue; + /* } else { */ case 11: + _3 = fmt$1; + if ((_3 === (101)) || (_3 === (69))) { + d[0].round(1 + prec >> 0); + } else if (_3 === (102)) { + d[0].round(d[0].exp + prec >> 0); + } else if ((_3 === (103)) || (_3 === (71))) { + if (prec === 0) { + prec = 1; + } + d[0].round(prec); + } + /* } */ case 12: + _4 = fmt$1; + if ((_4 === (101)) || (_4 === (69))) { + $s = -1; return fmtE(buf, fmt$1, prec, $clone(d[0], decimal)); + } else if (_4 === (102)) { + $s = -1; return fmtF(buf, prec, $clone(d[0], decimal)); + } else if ((_4 === (103)) || (_4 === (71))) { + eprec = prec; + if (eprec > d[0].mant.$length && d[0].mant.$length >= d[0].exp) { + eprec = d[0].mant.$length; + } + if (shortest) { + eprec = 6; + } + exp = d[0].exp - 1 >> 0; + if (exp < -4 || exp >= eprec) { + if (prec > d[0].mant.$length) { + prec = d[0].mant.$length; + } + $s = -1; return fmtE(buf, (fmt$1 + 101 << 24 >>> 24) - 103 << 24 >>> 24, prec - 1 >> 0, $clone(d[0], decimal)); + } + if (prec > d[0].exp) { + prec = d[0].mant.$length; + } + $s = -1; return fmtF(buf, max(prec - d[0].exp >> 0, 0), $clone(d[0], decimal)); + } + if (x.neg) { + buf = $subslice(buf, 0, (buf.$length - 1 >> 0)); + } + $s = -1; return $append(buf, 37, fmt$1); + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Append }; } $f._1 = _1; $f._2 = _2; $f._3 = _3; $f._4 = _4; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.buf = buf; $f.d = d; $f.eprec = eprec; $f.exp = exp; $f.fmt$1 = fmt$1; $f.prec = prec; $f.shortest = shortest; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Append = function(buf, fmt$1, prec) { return this.$val.Append(buf, fmt$1, prec); }; + roundShortest = function(d, x) { + var _i, _ref, d, exp, i, inclusive, l, lower, m, mant, okdown, okup, s, tmp, u, upper, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; d = $f.d; exp = $f.exp; i = $f.i; inclusive = $f.inclusive; l = $f.l; lower = $f.lower; m = $f.m; mant = $f.mant; okdown = $f.okdown; okup = $f.okup; s = $f.s; tmp = $f.tmp; u = $f.u; upper = $f.upper; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (d.mant.$length === 0) { + $s = -1; return; + } + mant = (nat.nil).set(x.mant); + exp = ((x.exp >> 0)) - mant.bitLen() >> 0; + s = mant.bitLen() - (((x.prec + 1 >>> 0) >> 0)) >> 0; + if (s < 0) { + mant = mant.shl(mant, ((-s >>> 0))); + } else if (s > 0) { + mant = mant.shr(mant, ((s >>> 0))); + } + exp = exp + (s) >> 0; + lower = new decimal.ptr(sliceType$1.nil, 0); + tmp = nat.nil; + $r = lower.init(tmp.sub(mant, natOne), exp); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + upper = new decimal.ptr(sliceType$1.nil, 0); + $r = upper.init(tmp.add(mant, natOne), exp); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + inclusive = (((0 >= mant.$length ? ($throwRuntimeError("index out of range"), undefined) : mant.$array[mant.$offset + 0]) & 2) >>> 0) === 0; + _ref = d.mant; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + m = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + l = lower.at(i); + u = upper.at(i); + okdown = !((l === m)) || inclusive && ((i + 1 >> 0) === lower.mant.$length); + okup = !((m === u)) && (inclusive || (m + 1 << 24 >>> 24) < u || (i + 1 >> 0) < upper.mant.$length); + if (okdown && okup) { + d.round(i + 1 >> 0); + $s = -1; return; + } else if (okdown) { + d.roundDown(i + 1 >> 0); + $s = -1; return; + } else if (okup) { + d.roundUp(i + 1 >> 0); + $s = -1; return; + } + _i++; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: roundShortest }; } $f._i = _i; $f._ref = _ref; $f.d = d; $f.exp = exp; $f.i = i; $f.inclusive = inclusive; $f.l = l; $f.lower = lower; $f.m = m; $f.mant = mant; $f.okdown = okdown; $f.okup = okup; $f.s = s; $f.tmp = tmp; $f.u = u; $f.upper = upper; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + fmtE = function(buf, fmt$1, prec, d) { + var buf, ch, d, exp, fmt$1, i, m, prec, x, x$1; + ch = 48; + if (d.mant.$length > 0) { + ch = (x = d.mant, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + } + buf = $append(buf, ch); + if (prec > 0) { + buf = $append(buf, 46); + i = 1; + m = min(d.mant.$length, prec + 1 >> 0); + if (i < m) { + buf = $appendSlice(buf, $subslice(d.mant, i, m)); + i = m; + } + while (true) { + if (!(i <= prec)) { break; } + buf = $append(buf, 48); + i = i + (1) >> 0; + } + } + buf = $append(buf, fmt$1); + exp = new $Int64(0, 0); + if (d.mant.$length > 0) { + exp = (x$1 = (new $Int64(0, d.exp)), new $Int64(x$1.$high - 0, x$1.$low - 1)); + } + if ((exp.$high < 0 || (exp.$high === 0 && exp.$low < 0))) { + ch = 45; + exp = new $Int64(-exp.$high, -exp.$low); + } else { + ch = 43; + } + buf = $append(buf, ch); + if ((exp.$high < 0 || (exp.$high === 0 && exp.$low < 10))) { + buf = $append(buf, 48); + } + return strconv.AppendInt(buf, exp, 10); + }; + fmtF = function(buf, prec, d) { + var buf, d, i, m, prec; + if (d.exp > 0) { + m = min(d.mant.$length, d.exp); + buf = $appendSlice(buf, $subslice(d.mant, 0, m)); + while (true) { + if (!(m < d.exp)) { break; } + buf = $append(buf, 48); + m = m + (1) >> 0; + } + } else { + buf = $append(buf, 48); + } + if (prec > 0) { + buf = $append(buf, 46); + i = 0; + while (true) { + if (!(i < prec)) { break; } + buf = $append(buf, d.at(d.exp + i >> 0)); + i = i + (1) >> 0; + } + } + return buf; + }; + Float.ptr.prototype.fmtB = function(buf) { + var _arg, _arg$1, _r$3, buf, e, m, w, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$3 = $f._r$3; buf = $f.buf; e = $f.e; m = $f.m; w = $f.w; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (x.form === 0) { + $s = -1; return $append(buf, 48); + } + if (false && !((x.form === 1))) { + $panic(new $String("non-finite float")); + } + m = x.mant; + w = $imul(((x.mant.$length >>> 0)), 32) >>> 0; + if (w < x.prec) { + m = (nat.nil).shl(m, (((x.prec - w >>> 0) >>> 0))); + } else if (w > x.prec) { + m = (nat.nil).shr(m, (((w - x.prec >>> 0) >>> 0))); + } + _arg = buf; + _r$3 = m.utoa(10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = _r$3; + buf = $appendSlice(_arg, _arg$1); + buf = $append(buf, 112); + e = (x$1 = (new $Int64(0, x.exp)), x$2 = (new $Int64(0, x.prec)), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + if ((e.$high > 0 || (e.$high === 0 && e.$low >= 0))) { + buf = $append(buf, 43); + } + $s = -1; return strconv.AppendInt(buf, e, 10); + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.fmtB }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$3 = _r$3; $f.buf = buf; $f.e = e; $f.m = m; $f.w = w; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.fmtB = function(buf) { return this.$val.fmtB(buf); }; + Float.ptr.prototype.fmtP = function(buf) { + var _arg, _arg$1, _r$3, _r$4, buf, i, m, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$3 = $f._r$3; _r$4 = $f._r$4; buf = $f.buf; i = $f.i; m = $f.m; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (x.form === 0) { + $s = -1; return $append(buf, 48); + } + if (false && !((x.form === 1))) { + $panic(new $String("non-finite float")); + } + m = x.mant; + i = 0; + while (true) { + if (!(i < m.$length && (((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i]) === 0))) { break; } + i = i + (1) >> 0; + } + m = $subslice(m, i); + buf = $appendSlice(buf, "0x."); + _arg = buf; + _r$3 = m.utoa(16); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = bytes.TrimRight(_r$3, "0"); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _arg$1 = _r$4; + buf = $appendSlice(_arg, _arg$1); + buf = $append(buf, 112); + if (x.exp >= 0) { + buf = $append(buf, 43); + } + $s = -1; return strconv.AppendInt(buf, (new $Int64(0, x.exp)), 10); + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.fmtP }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.buf = buf; $f.i = i; $f.m = m; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.fmtP = function(buf) { return this.$val.fmtP(buf); }; + min = function(x, y) { + var x, y; + if (x < y) { + return x; + } + return y; + }; + Float.ptr.prototype.Format = function(s, format) { + var _1, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, buf, format, hasPrec, hasWidth, padding, prec, s, sign, width, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; buf = $f.buf; format = $f.format; hasPrec = $f.hasPrec; hasWidth = $f.hasWidth; padding = $f.padding; prec = $f.prec; s = $f.s; sign = $f.sign; width = $f.width; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = s.Precision(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + prec = _tuple[0]; + hasPrec = _tuple[1]; + if (!hasPrec) { + prec = 6; + } + _1 = format; + /* */ if ((_1 === (101)) || (_1 === (69)) || (_1 === (102)) || (_1 === (98)) || (_1 === (112))) { $s = 3; continue; } + /* */ if (_1 === (70)) { $s = 4; continue; } + /* */ if (_1 === (118)) { $s = 5; continue; } + /* */ if ((_1 === (103)) || (_1 === (71))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ((_1 === (101)) || (_1 === (69)) || (_1 === (102)) || (_1 === (98)) || (_1 === (112))) { */ case 3: + $s = 8; continue; + /* } else if (_1 === (70)) { */ case 4: + format = 102; + $s = 8; continue; + /* } else if (_1 === (118)) { */ case 5: + format = 103; + if (!hasPrec) { + prec = -1; + } + $s = 8; continue; + /* } else if ((_1 === (103)) || (_1 === (71))) { */ case 6: + if (!hasPrec) { + prec = -1; + } + $s = 8; continue; + /* } else { */ case 7: + _arg = s; + _arg$1 = new $Int32(format); + _r$4 = x.String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _arg$2 = new $String(_r$4); + _r$5 = fmt.Fprintf(_arg, "%%!%c(*big.Float=%s)", new sliceType([_arg$1, _arg$2])); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return; + /* } */ case 8: + case 2: + buf = sliceType$1.nil; + _r$6 = x.Append(buf, ((format << 24 >>> 24)), prec); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + buf = _r$6; + if (buf.$length === 0) { + buf = (new sliceType$1($stringToBytes("?"))); + } + sign = ""; + /* */ if (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 45)) { $s = 13; continue; } + /* */ if (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 43)) { $s = 14; continue; } + _r$7 = s.Flag(43); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + /* */ if (_r$7) { $s = 15; continue; } + _r$8 = s.Flag(32); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + /* */ if (_r$8) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 45)) { */ case 13: + sign = "-"; + buf = $subslice(buf, 1); + $s = 17; continue; + /* } else if (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 43)) { */ case 14: + sign = "+"; + _r$9 = s.Flag(32); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + /* */ if (_r$9) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (_r$9) { */ case 20: + sign = " "; + /* } */ case 21: + buf = $subslice(buf, 1); + $s = 17; continue; + /* } else if (_r$7) { */ case 15: + sign = "+"; + $s = 17; continue; + /* } else if (_r$8) { */ case 16: + sign = " "; + /* } */ case 17: + case 12: + padding = 0; + _r$10 = s.Width(); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + width = _tuple$1[0]; + hasWidth = _tuple$1[1]; + if (hasWidth && width > (sign.length + buf.$length >> 0)) { + padding = (width - sign.length >> 0) - buf.$length >> 0; + } + _r$11 = s.Flag(48); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + /* */ if (_r$11 && !x.IsInf()) { $s = 25; continue; } + _r$12 = s.Flag(45); /* */ $s = 30; case 30: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + /* */ if (_r$12) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (_r$11 && !x.IsInf()) { */ case 25: + $r = writeMultiple(s, sign, 1); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = writeMultiple(s, "0", padding); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$13 = s.Write(buf); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + $s = 28; continue; + /* } else if (_r$12) { */ case 26: + $r = writeMultiple(s, sign, 1); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$14 = s.Write(buf); /* */ $s = 35; case 35: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + $r = writeMultiple(s, " ", padding); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 28; continue; + /* } else { */ case 27: + $r = writeMultiple(s, " ", padding); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = writeMultiple(s, sign, 1); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$15 = s.Write(buf); /* */ $s = 39; case 39: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _r$15; + /* } */ case 28: + case 24: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Format }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.buf = buf; $f.format = format; $f.hasPrec = hasPrec; $f.hasWidth = hasWidth; $f.padding = padding; $f.prec = prec; $f.s = s; $f.sign = sign; $f.width = width; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Format = function(s, format) { return this.$val.Format(s, format); }; + Int.ptr.prototype.Sign = function() { + var x; + x = this; + if (x.abs.$length === 0) { + return 0; + } + if (x.neg) { + return -1; + } + return 1; + }; + Int.prototype.Sign = function() { return this.$val.Sign(); }; + Int.ptr.prototype.SetInt64 = function(x) { + var neg, x, z; + z = this; + neg = false; + if ((x.$high < 0 || (x.$high === 0 && x.$low < 0))) { + neg = true; + x = new $Int64(-x.$high, -x.$low); + } + z.abs = z.abs.setUint64((new $Uint64(x.$high, x.$low))); + z.neg = neg; + return z; + }; + Int.prototype.SetInt64 = function(x) { return this.$val.SetInt64(x); }; + Int.ptr.prototype.SetUint64 = function(x) { + var x, z; + z = this; + z.abs = z.abs.setUint64(x); + z.neg = false; + return z; + }; + Int.prototype.SetUint64 = function(x) { return this.$val.SetUint64(x); }; + NewInt = function(x) { + var x; + return new Int.ptr(false, nat.nil).SetInt64(x); + }; + $pkg.NewInt = NewInt; + Int.ptr.prototype.Set = function(x) { + var x, z; + z = this; + if (!(z === x)) { + z.abs = z.abs.set(x.abs); + z.neg = x.neg; + } + return z; + }; + Int.prototype.Set = function(x) { return this.$val.Set(x); }; + Int.ptr.prototype.Bits = function() { + var x, x$1; + x = this; + return (x$1 = x.abs, $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)); + }; + Int.prototype.Bits = function() { return this.$val.Bits(); }; + Int.ptr.prototype.SetBits = function(abs) { + var abs, z; + z = this; + z.abs = ($subslice(new nat(abs.$array), abs.$offset, abs.$offset + abs.$length)).norm(); + z.neg = false; + return z; + }; + Int.prototype.SetBits = function(abs) { return this.$val.SetBits(abs); }; + Int.ptr.prototype.Abs = function(x) { + var x, z; + z = this; + z.Set(x); + z.neg = false; + return z; + }; + Int.prototype.Abs = function(x) { return this.$val.Abs(x); }; + Int.ptr.prototype.Neg = function(x) { + var x, z; + z = this; + z.Set(x); + z.neg = z.abs.$length > 0 && !z.neg; + return z; + }; + Int.prototype.Neg = function(x) { return this.$val.Neg(x); }; + Int.ptr.prototype.Add = function(x, y) { + var neg, x, y, z; + z = this; + neg = x.neg; + if (x.neg === y.neg) { + z.abs = z.abs.add(x.abs, y.abs); + } else { + if (x.abs.cmp(y.abs) >= 0) { + z.abs = z.abs.sub(x.abs, y.abs); + } else { + neg = !neg; + z.abs = z.abs.sub(y.abs, x.abs); + } + } + z.neg = z.abs.$length > 0 && neg; + return z; + }; + Int.prototype.Add = function(x, y) { return this.$val.Add(x, y); }; + Int.ptr.prototype.Sub = function(x, y) { + var neg, x, y, z; + z = this; + neg = x.neg; + if (!(x.neg === y.neg)) { + z.abs = z.abs.add(x.abs, y.abs); + } else { + if (x.abs.cmp(y.abs) >= 0) { + z.abs = z.abs.sub(x.abs, y.abs); + } else { + neg = !neg; + z.abs = z.abs.sub(y.abs, x.abs); + } + } + z.neg = z.abs.$length > 0 && neg; + return z; + }; + Int.prototype.Sub = function(x, y) { return this.$val.Sub(x, y); }; + Int.ptr.prototype.Mul = function(x, y) { + var x, y, z; + z = this; + if (x === y) { + z.abs = z.abs.sqr(x.abs); + z.neg = false; + return z; + } + z.abs = z.abs.mul(x.abs, y.abs); + z.neg = z.abs.$length > 0 && !(x.neg === y.neg); + return z; + }; + Int.prototype.Mul = function(x, y) { return this.$val.Mul(x, y); }; + Int.ptr.prototype.MulRange = function(a, b) { + var _tmp, _tmp$1, a, b, neg, x, x$1, z; + z = this; + if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { + return z.SetInt64(new $Int64(0, 1)); + } else if ((a.$high < 0 || (a.$high === 0 && a.$low <= 0)) && (b.$high > 0 || (b.$high === 0 && b.$low >= 0))) { + return z.SetInt64(new $Int64(0, 0)); + } + neg = false; + if ((a.$high < 0 || (a.$high === 0 && a.$low < 0))) { + neg = (x = (x$1 = new $Int64(b.$high - a.$high, b.$low - a.$low), new $Int64(x$1.$high & 0, (x$1.$low & 1) >>> 0)), (x.$high === 0 && x.$low === 0)); + _tmp = new $Int64(-b.$high, -b.$low); + _tmp$1 = new $Int64(-a.$high, -a.$low); + a = _tmp; + b = _tmp$1; + } + z.abs = z.abs.mulRange((new $Uint64(a.$high, a.$low)), (new $Uint64(b.$high, b.$low))); + z.neg = neg; + return z; + }; + Int.prototype.MulRange = function(a, b) { return this.$val.MulRange(a, b); }; + Int.ptr.prototype.Binomial = function(n, k) { + var _r$3, _tmp, _tmp$1, a, b, k, n, x, x$1, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; a = $f.a; b = $f.b; k = $f.k; n = $f.n; x = $f.x; x$1 = $f.x$1; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = [a]; + b = [b]; + z = this; + if ((x = $div64(n, new $Int64(0, 2), false), (x.$high < k.$high || (x.$high === k.$high && x.$low < k.$low))) && (k.$high < n.$high || (k.$high === n.$high && k.$low <= n.$low))) { + k = new $Int64(n.$high - k.$high, n.$low - k.$low); + } + _tmp = new Int.ptr(false, nat.nil); + _tmp$1 = new Int.ptr(false, nat.nil); + a[0] = $clone(_tmp, Int); + b[0] = $clone(_tmp$1, Int); + a[0].MulRange((x$1 = new $Int64(n.$high - k.$high, n.$low - k.$low), new $Int64(x$1.$high + 0, x$1.$low + 1)), n); + b[0].MulRange(new $Int64(0, 1), k); + _r$3 = z.Quo(a[0], b[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Binomial }; } $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.a = a; $f.b = b; $f.k = k; $f.n = n; $f.x = x; $f.x$1 = x$1; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Binomial = function(n, k) { return this.$val.Binomial(n, k); }; + Int.ptr.prototype.Quo = function(x, y) { + var _r$3, _tuple, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.abs.div(nat.nil, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z.abs = _tuple[0]; + z.neg = z.abs.$length > 0 && !(x.neg === y.neg); + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Quo }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Quo = function(x, y) { return this.$val.Quo(x, y); }; + Int.ptr.prototype.Rem = function(x, y) { + var _r$3, _tuple, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = (nat.nil).div(z.abs, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z.abs = _tuple[1]; + z.neg = z.abs.$length > 0 && x.neg; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Rem }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Rem = function(x, y) { return this.$val.Rem(x, y); }; + Int.ptr.prototype.QuoRem = function(x, y, r) { + var _r$3, _tmp, _tmp$1, _tuple, r, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; r = $f.r; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.abs.div(r.abs, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z.abs = _tuple[0]; + r.abs = _tuple[1]; + _tmp = z.abs.$length > 0 && !(x.neg === y.neg); + _tmp$1 = r.abs.$length > 0 && x.neg; + z.neg = _tmp; + r.neg = _tmp$1; + $s = -1; return [z, r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.QuoRem }; } $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.r = r; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.QuoRem = function(x, y, r) { return this.$val.QuoRem(x, y, r); }; + Int.ptr.prototype.Div = function(x, y) { + var _r$3, r, x, y, y_neg, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; r = $f.r; x = $f.x; y = $f.y; y_neg = $f.y_neg; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = [r]; + z = this; + y_neg = y.neg; + r[0] = new Int.ptr(false, nat.nil); + _r$3 = z.QuoRem(x, y, r[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (r[0].neg) { + if (y_neg) { + z.Add(z, intOne); + } else { + z.Sub(z, intOne); + } + } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Div }; } $f._r$3 = _r$3; $f.r = r; $f.x = x; $f.y = y; $f.y_neg = y_neg; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Div = function(x, y) { return this.$val.Div(x, y); }; + Int.ptr.prototype.Mod = function(x, y) { + var _r$3, q, x, y, y0, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; q = $f.q; x = $f.x; y = $f.y; y0 = $f.y0; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + y0 = y; + if (z === y || alias(z.abs, y.abs)) { + y0 = new Int.ptr(false, nat.nil).Set(y); + } + q = new Int.ptr(false, nat.nil); + _r$3 = q.QuoRem(x, y, z); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (z.neg) { + if (y0.neg) { + z.Sub(z, y0); + } else { + z.Add(z, y0); + } + } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Mod }; } $f._r$3 = _r$3; $f.q = q; $f.x = x; $f.y = y; $f.y0 = y0; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Mod = function(x, y) { return this.$val.Mod(x, y); }; + Int.ptr.prototype.DivMod = function(x, y, m) { + var _r$3, m, x, y, y0, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; m = $f.m; x = $f.x; y = $f.y; y0 = $f.y0; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + y0 = y; + if (z === y || alias(z.abs, y.abs)) { + y0 = new Int.ptr(false, nat.nil).Set(y); + } + _r$3 = z.QuoRem(x, y, m); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (m.neg) { + if (y0.neg) { + z.Add(z, intOne); + m.Sub(m, y0); + } else { + z.Sub(z, intOne); + m.Add(m, y0); + } + } + $s = -1; return [z, m]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.DivMod }; } $f._r$3 = _r$3; $f.m = m; $f.x = x; $f.y = y; $f.y0 = y0; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.DivMod = function(x, y, m) { return this.$val.DivMod(x, y, m); }; + Int.ptr.prototype.Cmp = function(y) { + var r, x, y; + r = 0; + x = this; + if (x.neg === y.neg) { + r = x.abs.cmp(y.abs); + if (x.neg) { + r = -r; + } + } else if (x.neg) { + r = -1; + } else { + r = 1; + } + return r; + }; + Int.prototype.Cmp = function(y) { return this.$val.Cmp(y); }; + Int.ptr.prototype.CmpAbs = function(y) { + var x, y; + x = this; + return x.abs.cmp(y.abs); + }; + Int.prototype.CmpAbs = function(y) { return this.$val.CmpAbs(y); }; + low32 = function(x) { + var x; + if (x.$length === 0) { + return 0; + } + return (((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]) >>> 0)); + }; + low64 = function(x) { + var v, x, x$1, x$2, x$3; + if (x.$length === 0) { + return new $Uint64(0, 0); + } + v = ((x$1 = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]), new $Uint64(0, x$1.constructor === Number ? x$1 : 1))); + if (true && x.$length > 1) { + return (x$2 = $shiftLeft64(((x$3 = (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1]), new $Uint64(0, x$3.constructor === Number ? x$3 : 1))), 32), new $Uint64(x$2.$high | v.$high, (x$2.$low | v.$low) >>> 0)); + } + return v; + }; + Int.ptr.prototype.Int64 = function() { + var v, x, x$1; + x = this; + v = ((x$1 = low64(x.abs), new $Int64(x$1.$high, x$1.$low))); + if (x.neg) { + v = new $Int64(-v.$high, -v.$low); + } + return v; + }; + Int.prototype.Int64 = function() { return this.$val.Int64(); }; + Int.ptr.prototype.Uint64 = function() { + var x; + x = this; + return low64(x.abs); + }; + Int.prototype.Uint64 = function() { return this.$val.Uint64(); }; + Int.ptr.prototype.IsInt64 = function() { + var w, x, x$1, x$2; + x = this; + if (x.abs.$length <= 2) { + w = ((x$1 = low64(x.abs), new $Int64(x$1.$high, x$1.$low))); + return (w.$high > 0 || (w.$high === 0 && w.$low >= 0)) || x.neg && (x$2 = new $Int64(-w.$high, -w.$low), (w.$high === x$2.$high && w.$low === x$2.$low)); + } + return false; + }; + Int.prototype.IsInt64 = function() { return this.$val.IsInt64(); }; + Int.ptr.prototype.IsUint64 = function() { + var x; + x = this; + return !x.neg && x.abs.$length <= 2; + }; + Int.prototype.IsUint64 = function() { return this.$val.IsUint64(); }; + Int.ptr.prototype.SetString = function(s, base) { + var _r$3, base, s, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; base = $f.base; s = $f.s; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.setFromScanner(strings.NewReader(s), base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.SetString }; } $f._r$3 = _r$3; $f.base = base; $f.s = s; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.SetString = function(s, base) { return this.$val.SetString(s, base); }; + Int.ptr.prototype.setFromScanner = function(r, base) { + var _r$3, _r$4, _tuple, _tuple$1, base, err, err$1, r, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; base = $f.base; err = $f.err; err$1 = $f.err$1; r = $f.r; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.scan(r, base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, false]; + } + _r$4 = r.ReadByte(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, io.EOF))) { + $s = -1; return [ptrType$1.nil, false]; + } + $s = -1; return [z, true]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.setFromScanner }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.base = base; $f.err = err; $f.err$1 = err$1; $f.r = r; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.setFromScanner = function(r, base) { return this.$val.setFromScanner(r, base); }; + Int.ptr.prototype.SetBytes = function(buf) { + var buf, z; + z = this; + z.abs = z.abs.setBytes(buf); + z.neg = false; + return z; + }; + Int.prototype.SetBytes = function(buf) { return this.$val.SetBytes(buf); }; + Int.ptr.prototype.Bytes = function() { + var buf, x; + x = this; + buf = $makeSlice(sliceType$1, ($imul(x.abs.$length, 4))); + return $subslice(buf, x.abs.bytes(buf)); + }; + Int.prototype.Bytes = function() { return this.$val.Bytes(); }; + Int.ptr.prototype.BitLen = function() { + var x; + x = this; + return x.abs.bitLen(); + }; + Int.prototype.BitLen = function() { return this.$val.BitLen(); }; + Int.ptr.prototype.Exp = function(x, y, m) { + var _r$3, _r$4, m, mWords, x, xWords, y, yWords, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; m = $f.m; mWords = $f.mWords; x = $f.x; xWords = $f.xWords; y = $f.y; yWords = $f.yWords; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + xWords = x.abs; + /* */ if (y.neg) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (y.neg) { */ case 1: + if (m === ptrType$1.nil || (m.abs.$length === 0)) { + $s = -1; return z.SetInt64(new $Int64(0, 1)); + } + _r$3 = new Int.ptr(false, nat.nil).ModInverse(x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + xWords = _r$3.abs; + /* } */ case 2: + yWords = y.abs; + mWords = nat.nil; + if (!(m === ptrType$1.nil)) { + mWords = m.abs; + } + _r$4 = z.abs.expNN(xWords, yWords, mWords); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + z.abs = _r$4; + z.neg = z.abs.$length > 0 && x.neg && yWords.$length > 0 && ((((0 >= yWords.$length ? ($throwRuntimeError("index out of range"), undefined) : yWords.$array[yWords.$offset + 0]) & 1) >>> 0) === 1); + if (z.neg && mWords.$length > 0) { + z.abs = z.abs.sub(mWords, z.abs); + z.neg = false; + } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Exp }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.m = m; $f.mWords = mWords; $f.x = x; $f.xWords = xWords; $f.y = y; $f.yWords = yWords; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Exp = function(x, y, m) { return this.$val.Exp(x, y, m); }; + Int.ptr.prototype.GCD = function(x, y, a, b) { + var _r$3, a, b, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a = $f.a; b = $f.b; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (a.Sign() <= 0 || b.Sign() <= 0) { + z.SetInt64(new $Int64(0, 0)); + if (!(x === ptrType$1.nil)) { + x.SetInt64(new $Int64(0, 0)); + } + if (!(y === ptrType$1.nil)) { + y.SetInt64(new $Int64(0, 0)); + } + $s = -1; return z; + } + _r$3 = z.lehmerGCD(x, y, a, b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.GCD }; } $f._r$3 = _r$3; $f.a = a; $f.b = b; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.GCD = function(x, y, a, b) { return this.$val.GCD(x, y, a, b); }; + lehmerSimulate = function(A, B) { + var A, B, _q, _r$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a1, a2, even, h, m, n, q, r, u0, u1, u2, v0, v1, v2, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1, y$2, y$3, y$4; + u0 = 0; + u1 = 0; + v0 = 0; + v1 = 0; + even = false; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = 0; + a1 = _tmp; + a2 = _tmp$1; + u2 = _tmp$2; + v2 = _tmp$3; + m = B.abs.$length; + n = A.abs.$length; + h = nlz((x = A.abs, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]))); + a1 = (((y = h, y < 32 ? ((x$2 = A.abs, x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])) << y) : 0) >>> 0) | ((y$1 = ((32 - h >>> 0)), y$1 < 32 ? ((x$4 = A.abs, x$5 = n - 2 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])) >>> y$1) : 0) >>> 0)) >>> 0; + if ((n === m)) { + a2 = (((y$2 = h, y$2 < 32 ? ((x$6 = B.abs, x$7 = n - 1 >> 0, ((x$7 < 0 || x$7 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$7])) << y$2) : 0) >>> 0) | ((y$3 = ((32 - h >>> 0)), y$3 < 32 ? ((x$8 = B.abs, x$9 = n - 2 >> 0, ((x$9 < 0 || x$9 >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + x$9])) >>> y$3) : 0) >>> 0)) >>> 0; + } else if ((n === (m + 1 >> 0))) { + a2 = (y$4 = ((32 - h >>> 0)), y$4 < 32 ? ((x$10 = B.abs, x$11 = n - 2 >> 0, ((x$11 < 0 || x$11 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + x$11])) >>> y$4) : 0) >>> 0; + } else { + a2 = 0; + } + even = false; + _tmp$4 = 0; + _tmp$5 = 1; + _tmp$6 = 0; + u0 = _tmp$4; + u1 = _tmp$5; + u2 = _tmp$6; + _tmp$7 = 0; + _tmp$8 = 0; + _tmp$9 = 1; + v0 = _tmp$7; + v1 = _tmp$8; + v2 = _tmp$9; + while (true) { + if (!(a2 >= v2 && (a1 - a2 >>> 0) >= (v1 + v2 >>> 0))) { break; } + _tmp$10 = (_q = a1 / a2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + _tmp$11 = (_r$3 = a1 % a2, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + q = _tmp$10; + r = _tmp$11; + _tmp$12 = a2; + _tmp$13 = r; + a1 = _tmp$12; + a2 = _tmp$13; + _tmp$14 = u1; + _tmp$15 = u2; + _tmp$16 = u1 + ($imul(q, u2) >>> 0) >>> 0; + u0 = _tmp$14; + u1 = _tmp$15; + u2 = _tmp$16; + _tmp$17 = v1; + _tmp$18 = v2; + _tmp$19 = v1 + ($imul(q, v2) >>> 0) >>> 0; + v0 = _tmp$17; + v1 = _tmp$18; + v2 = _tmp$19; + even = !even; + } + return [u0, u1, v0, v1, even]; + }; + lehmerUpdate = function(A, B, q, r, s, t, u0, u1, v0, v1, even) { + var A, B, even, q, r, s, t, u0, u1, v0, v1; + t.abs = t.abs.setWord(u0); + s.abs = s.abs.setWord(v0); + t.neg = !even; + s.neg = even; + t.Mul(A, t); + s.Mul(B, s); + r.abs = r.abs.setWord(u1); + q.abs = q.abs.setWord(v1); + r.neg = even; + q.neg = !even; + r.Mul(A, r); + q.Mul(B, q); + A.Add(t, s); + B.Add(r, q); + }; + euclidUpdate = function(A, B, Ua, Ub, q, r, s, t, extended) { + var A, B, Ua, Ub, _r$3, _tmp, _tmp$1, _tmp$2, _tuple, extended, q, r, s, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; A = $f.A; B = $f.B; Ua = $f.Ua; Ub = $f.Ub; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; extended = $f.extended; q = $f.q; r = $f.r; s = $f.s; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = q.QuoRem(A, B, r); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + q = _tuple[0]; + r = _tuple[1]; + _tmp = $clone(B, Int); + _tmp$1 = $clone(r, Int); + _tmp$2 = $clone(A, Int); + Int.copy(A, _tmp); + Int.copy(B, _tmp$1); + Int.copy(r, _tmp$2); + if (extended) { + t.Set(Ub); + s.Mul(Ub, q); + Ub.Sub(Ua, s); + Ua.Set(t); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: euclidUpdate }; } $f.A = A; $f.B = B; $f.Ua = Ua; $f.Ub = Ub; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.extended = extended; $f.q = q; $f.r = r; $f.s = s; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.ptr.prototype.lehmerGCD = function(x, y, a, b) { + var A, B, Ua, Ub, _q, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, a, aWord, b, bWord, even, even$1, extended, q, q$1, r, r$1, s, t, u0, u1, ua, ub, v0, v1, va, vb, x, x$1, x$2, x$3, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; A = $f.A; B = $f.B; Ua = $f.Ua; Ub = $f.Ub; _q = $f._q; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; a = $f.a; aWord = $f.aWord; b = $f.b; bWord = $f.bWord; even = $f.even; even$1 = $f.even$1; extended = $f.extended; q = $f.q; q$1 = $f.q$1; r = $f.r; r$1 = $f.r$1; s = $f.s; t = $f.t; u0 = $f.u0; u1 = $f.u1; ua = $f.ua; ub = $f.ub; v0 = $f.v0; v1 = $f.v1; va = $f.va; vb = $f.vb; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _tmp = ptrType$1.nil; + _tmp$1 = ptrType$1.nil; + _tmp$2 = ptrType$1.nil; + _tmp$3 = ptrType$1.nil; + A = _tmp; + B = _tmp$1; + Ua = _tmp$2; + Ub = _tmp$3; + A = new Int.ptr(false, nat.nil).Set(a); + B = new Int.ptr(false, nat.nil).Set(b); + extended = !(x === ptrType$1.nil) || !(y === ptrType$1.nil); + if (extended) { + Ua = new Int.ptr(false, nat.nil).SetInt64(new $Int64(0, 1)); + Ub = new Int.ptr(false, nat.nil); + } + q = new Int.ptr(false, nat.nil); + r = new Int.ptr(false, nat.nil); + s = new Int.ptr(false, nat.nil); + t = new Int.ptr(false, nat.nil); + if (A.abs.cmp(B.abs) < 0) { + _tmp$4 = B; + _tmp$5 = A; + A = _tmp$4; + B = _tmp$5; + _tmp$6 = Ua; + _tmp$7 = Ub; + Ub = _tmp$6; + Ua = _tmp$7; + } + /* while (true) { */ case 1: + /* if (!(B.abs.$length > 1)) { break; } */ if(!(B.abs.$length > 1)) { $s = 2; continue; } + _tuple = lehmerSimulate(A, B); + u0 = _tuple[0]; + u1 = _tuple[1]; + v0 = _tuple[2]; + v1 = _tuple[3]; + even = _tuple[4]; + /* */ if (!((v0 === 0))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((v0 === 0))) { */ case 3: + lehmerUpdate(A, B, q, r, s, t, u0, u1, v0, v1, even); + if (extended) { + lehmerUpdate(Ua, Ub, q, r, s, t, u0, u1, v0, v1, even); + } + $s = 5; continue; + /* } else { */ case 4: + $r = euclidUpdate(A, B, Ua, Ub, q, r, s, t, extended); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + /* } */ $s = 1; continue; case 2: + /* */ if (B.abs.$length > 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (B.abs.$length > 0) { */ case 7: + /* */ if (A.abs.$length > 1) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (A.abs.$length > 1) { */ case 9: + $r = euclidUpdate(A, B, Ua, Ub, q, r, s, t, extended); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + if (B.abs.$length > 0) { + _tmp$8 = (x$1 = A.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); + _tmp$9 = (x$2 = B.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])); + aWord = _tmp$8; + bWord = _tmp$9; + if (extended) { + _tmp$10 = 0; + _tmp$11 = 0; + _tmp$12 = 0; + _tmp$13 = 0; + ua = _tmp$10; + ub = _tmp$11; + va = _tmp$12; + vb = _tmp$13; + _tmp$14 = 1; + _tmp$15 = 0; + ua = _tmp$14; + ub = _tmp$15; + _tmp$16 = 0; + _tmp$17 = 1; + va = _tmp$16; + vb = _tmp$17; + even$1 = true; + while (true) { + if (!(!((bWord === 0)))) { break; } + _tmp$18 = (_q = aWord / bWord, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + _tmp$19 = (_r$3 = aWord % bWord, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + q$1 = _tmp$18; + r$1 = _tmp$19; + _tmp$20 = bWord; + _tmp$21 = r$1; + aWord = _tmp$20; + bWord = _tmp$21; + _tmp$22 = ub; + _tmp$23 = ua + ($imul(q$1, ub) >>> 0) >>> 0; + ua = _tmp$22; + ub = _tmp$23; + _tmp$24 = vb; + _tmp$25 = va + ($imul(q$1, vb) >>> 0) >>> 0; + va = _tmp$24; + vb = _tmp$25; + even$1 = !even$1; + } + t.abs = t.abs.setWord(ua); + s.abs = s.abs.setWord(va); + t.neg = !even$1; + s.neg = even$1; + t.Mul(Ua, t); + s.Mul(Ub, s); + Ua.Add(t, s); + } else { + while (true) { + if (!(!((bWord === 0)))) { break; } + _tmp$26 = bWord; + _tmp$27 = (_r$4 = aWord % bWord, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")); + aWord = _tmp$26; + bWord = _tmp$27; + } + } + (x$3 = A.abs, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0] = aWord)); + } + /* } */ case 8: + if (!(x === ptrType$1.nil)) { + Int.copy(x, Ua); + } + /* */ if (!(y === ptrType$1.nil)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!(y === ptrType$1.nil)) { */ case 12: + y.Mul(a, Ua); + y.Sub(A, y); + _r$5 = y.Div(y, b); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 13: + Int.copy(z, A); + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.lehmerGCD }; } $f.A = A; $f.B = B; $f.Ua = Ua; $f.Ub = Ub; $f._q = _q; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.a = a; $f.aWord = aWord; $f.b = b; $f.bWord = bWord; $f.even = even; $f.even$1 = even$1; $f.extended = extended; $f.q = q; $f.q$1 = q$1; $f.r = r; $f.r$1 = r$1; $f.s = s; $f.t = t; $f.u0 = u0; $f.u1 = u1; $f.ua = ua; $f.ub = ub; $f.v0 = v0; $f.v1 = v1; $f.va = va; $f.vb = vb; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.lehmerGCD = function(x, y, a, b) { return this.$val.lehmerGCD(x, y, a, b); }; + Int.ptr.prototype.Rand = function(rnd, n) { + var _r$3, n, rnd, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; n = $f.n; rnd = $f.rnd; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + z.neg = false; + if (n.neg || (n.abs.$length === 0)) { + z.abs = nat.nil; + $s = -1; return z; + } + _r$3 = z.abs.random(rnd, n.abs, n.abs.bitLen()); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + z.abs = _r$3; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Rand }; } $f._r$3 = _r$3; $f.n = n; $f.rnd = rnd; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Rand = function(rnd, n) { return this.$val.Rand(rnd, n); }; + Int.ptr.prototype.ModInverse = function(g, n) { + var _r$3, _r$4, _tmp, _tmp$1, d, g, g2, n, n2, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; d = $f.d; g = $f.g; g2 = $f.g2; n = $f.n; n2 = $f.n2; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = [x]; + z = this; + if (n.neg) { + n2 = new Int.ptr(false, nat.nil); + n = n2.Neg(n); + } + /* */ if (g.neg) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (g.neg) { */ case 1: + g2 = new Int.ptr(false, nat.nil); + _r$3 = g2.Mod(g, n); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + g = _r$3; + /* } */ case 2: + _tmp = new Int.ptr(false, nat.nil); + _tmp$1 = new Int.ptr(false, nat.nil); + d = $clone(_tmp, Int); + x[0] = $clone(_tmp$1, Int); + _r$4 = d.GCD(x[0], ptrType$1.nil, g, n); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + if (!((d.Cmp(intOne) === 0))) { + $s = -1; return ptrType$1.nil; + } + if (x[0].neg) { + z.Add(x[0], n); + } else { + z.Set(x[0]); + } + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.ModInverse }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.d = d; $f.g = g; $f.g2 = g2; $f.n = n; $f.n2 = n2; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.ModInverse = function(g, n) { return this.$val.ModInverse(g, n); }; + Jacobi = function(x, y) { + var _r$3, _r$4, _tmp, _tmp$1, _tmp$2, a, b, bmod8, c, j, s, x, x$1, x$2, x$3, x$4, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; a = $f.a; b = $f.b; bmod8 = $f.bmod8; c = $f.c; j = $f.j; s = $f.s; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = [a]; + b = [b]; + c = [c]; + /* */ if ((y.abs.$length === 0) || ((((x$1 = y.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) === 0)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((y.abs.$length === 0) || ((((x$1 = y.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) === 0)) { */ case 1: + _r$3 = fmt.Sprintf("big: invalid 2nd argument to Int.Jacobi: need odd integer but got %s", new sliceType([y])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String(_r$3)); + /* } */ case 2: + _tmp = new Int.ptr(false, nat.nil); + _tmp$1 = new Int.ptr(false, nat.nil); + _tmp$2 = new Int.ptr(false, nat.nil); + a[0] = $clone(_tmp, Int); + b[0] = $clone(_tmp$1, Int); + c[0] = $clone(_tmp$2, Int); + a[0].Set(x); + b[0].Set(y); + j = 1; + if (b[0].neg) { + if (a[0].neg) { + j = -1; + } + b[0].neg = false; + } + /* while (true) { */ case 4: + if (b[0].Cmp(intOne) === 0) { + $s = -1; return j; + } + if (a[0].abs.$length === 0) { + $s = -1; return 0; + } + _r$4 = a[0].Mod(a[0], b[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + if (a[0].abs.$length === 0) { + $s = -1; return 0; + } + s = a[0].abs.trailingZeroBits(); + if (!((((s & 1) >>> 0) === 0))) { + bmod8 = ((x$2 = b[0].abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) & 7) >>> 0; + if ((bmod8 === 3) || (bmod8 === 5)) { + j = -j; + } + } + c[0].Rsh(a[0], s); + if (((((x$3 = b[0].abs, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) & 3) >>> 0) === 3) && ((((x$4 = c[0].abs, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) & 3) >>> 0) === 3)) { + j = -j; + } + a[0].Set(b[0]); + b[0].Set(c[0]); + /* } */ $s = 4; continue; case 5: + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Jacobi }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f.a = a; $f.b = b; $f.bmod8 = bmod8; $f.c = c; $f.j = j; $f.s = s; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Jacobi = Jacobi; + Int.ptr.prototype.modSqrt3Mod4Prime = function(x, p) { + var _r$3, e, p, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; e = $f.e; p = $f.p; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + e = new Int.ptr(false, nat.nil).Add(p, intOne); + e.Rsh(e, 2); + _r$3 = z.Exp(x, e, p); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.modSqrt3Mod4Prime }; } $f._r$3 = _r$3; $f.e = e; $f.p = p; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.modSqrt3Mod4Prime = function(x, p) { return this.$val.modSqrt3Mod4Prime(x, p); }; + Int.ptr.prototype.modSqrt5Mod8Prime = function(x, p) { + var _r$3, _r$4, _r$5, _r$6, _r$7, alpha, beta, e, p, tx, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; alpha = $f.alpha; beta = $f.beta; e = $f.e; p = $f.p; tx = $f.tx; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + e = new Int.ptr(false, nat.nil).Rsh(p, 3); + tx = new Int.ptr(false, nat.nil).Lsh(x, 1); + _r$3 = new Int.ptr(false, nat.nil).Exp(tx, e, p); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + alpha = _r$3; + beta = new Int.ptr(false, nat.nil).Mul(alpha, alpha); + _r$4 = beta.Mod(beta, p); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + beta.Mul(beta, tx); + _r$5 = beta.Mod(beta, p); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + beta.Sub(beta, intOne); + beta.Mul(beta, x); + _r$6 = beta.Mod(beta, p); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + beta.Mul(beta, alpha); + _r$7 = z.Mod(beta, p); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.modSqrt5Mod8Prime }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.alpha = alpha; $f.beta = beta; $f.e = e; $f.p = p; $f.tx = tx; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.modSqrt5Mod8Prime = function(x, p) { return this.$val.modSqrt5Mod8Prime(x, p); }; + Int.ptr.prototype.modSqrtTonelliShanks = function(x, p) { + var _r$10, _r$11, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, b, e, g, m, n, p, r, s, t, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; b = $f.b; e = $f.e; g = $f.g; m = $f.m; n = $f.n; p = $f.p; r = $f.r; s = $f.s; t = $f.t; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = [b]; + g = [g]; + n = [n]; + s = [s]; + t = [t]; + y = [y]; + z = this; + s[0] = new Int.ptr(false, nat.nil); + s[0].Sub(p, intOne); + e = s[0].abs.trailingZeroBits(); + s[0].Rsh(s[0], e); + n[0] = new Int.ptr(false, nat.nil); + n[0].SetInt64(new $Int64(0, 2)); + /* while (true) { */ case 1: + _r$3 = Jacobi(n[0], p); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* if (!(!((_r$3 === -1)))) { break; } */ if(!(!((_r$3 === -1)))) { $s = 2; continue; } + n[0].Add(n[0], intOne); + /* } */ $s = 1; continue; case 2: + _tmp = new Int.ptr(false, nat.nil); + _tmp$1 = new Int.ptr(false, nat.nil); + _tmp$2 = new Int.ptr(false, nat.nil); + _tmp$3 = new Int.ptr(false, nat.nil); + y[0] = $clone(_tmp, Int); + b[0] = $clone(_tmp$1, Int); + g[0] = $clone(_tmp$2, Int); + t[0] = $clone(_tmp$3, Int); + y[0].Add(s[0], intOne); + y[0].Rsh(y[0], 1); + _r$4 = y[0].Exp(x, y[0], p); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = b[0].Exp(x, s[0], p); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = g[0].Exp(n[0], s[0], p); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + r = e; + /* while (true) { */ case 7: + m = 0; + t[0].Set(b[0]); + /* while (true) { */ case 9: + /* if (!(!((t[0].Cmp(intOne) === 0)))) { break; } */ if(!(!((t[0].Cmp(intOne) === 0)))) { $s = 10; continue; } + _r$7 = t[0].Mul(t[0], t[0]).Mod(t[0], p); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + m = m + (1) >>> 0; + /* } */ $s = 9; continue; case 10: + if (m === 0) { + $s = -1; return z.Set(y[0]); + } + _r$8 = t[0].SetInt64(new $Int64(0, 0)).SetBit(t[0], ((((r - m >>> 0) - 1 >>> 0) >> 0)), 1).Exp(g[0], t[0], p); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = g[0].Mul(t[0], t[0]).Mod(g[0], p); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _r$10 = y[0].Mul(y[0], t[0]).Mod(y[0], p); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + _r$11 = b[0].Mul(b[0], g[0]).Mod(b[0], p); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + r = m; + /* } */ $s = 7; continue; case 8: + $s = -1; return ptrType$1.nil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.modSqrtTonelliShanks }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.b = b; $f.e = e; $f.g = g; $f.m = m; $f.n = n; $f.p = p; $f.r = r; $f.s = s; $f.t = t; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.modSqrtTonelliShanks = function(x, p) { return this.$val.modSqrtTonelliShanks(x, p); }; + Int.ptr.prototype.ModSqrt = function(x, p) { + var _1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, p, x, x$1, x$2, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = Jacobi(x, p); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _1 = _r$3; + if (_1 === (-1)) { + $s = -1; return ptrType$1.nil; + } else if (_1 === (0)) { + $s = -1; return z.SetInt64(new $Int64(0, 0)); + } else if (_1 === (1)) { + /* break; */ $s = 1; continue; + } + case 1: + /* */ if (x.neg || x.Cmp(p) >= 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (x.neg || x.Cmp(p) >= 0) { */ case 3: + _r$4 = new Int.ptr(false, nat.nil).Mod(x, p); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + x = _r$4; + /* } */ case 4: + /* */ if (((_r$5 = (x$1 = p.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) % 4, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) === 3)) { $s = 7; continue; } + /* */ if (((_r$6 = (x$2 = p.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) % 8, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) === 5)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (((_r$5 = (x$1 = p.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) % 4, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) === 3)) { */ case 7: + _r$7 = z.modSqrt3Mod4Prime(x, p); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } else if (((_r$6 = (x$2 = p.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) % 8, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) === 5)) { */ case 8: + _r$8 = z.modSqrt5Mod8Prime(x, p); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return _r$8; + /* } else { */ case 9: + _r$9 = z.modSqrtTonelliShanks(x, p); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 10: + case 6: + $s = -1; return ptrType$1.nil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.ModSqrt }; } $f._1 = _1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.ModSqrt = function(x, p) { return this.$val.ModSqrt(x, p); }; + Int.ptr.prototype.Lsh = function(x, n) { + var n, x, z; + z = this; + z.abs = z.abs.shl(x.abs, n); + z.neg = x.neg; + return z; + }; + Int.prototype.Lsh = function(x, n) { return this.$val.Lsh(x, n); }; + Int.ptr.prototype.Rsh = function(x, n) { + var n, t, x, z; + z = this; + if (x.neg) { + t = z.abs.sub(x.abs, natOne); + t = t.shr(t, n); + z.abs = t.add(t, natOne); + z.neg = true; + return z; + } + z.abs = z.abs.shr(x.abs, n); + z.neg = false; + return z; + }; + Int.prototype.Rsh = function(x, n) { return this.$val.Rsh(x, n); }; + Int.ptr.prototype.Bit = function(i) { + var i, t, x, x$1; + x = this; + if (i === 0) { + if (x.abs.$length > 0) { + return (((((x$1 = x.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) >>> 0)); + } + return 0; + } + if (i < 0) { + $panic(new $String("negative bit index")); + } + if (x.neg) { + t = (nat.nil).sub(x.abs, natOne); + return (t.bit(((i >>> 0))) ^ 1) >>> 0; + } + return x.abs.bit(((i >>> 0))); + }; + Int.prototype.Bit = function(i) { return this.$val.Bit(i); }; + Int.ptr.prototype.SetBit = function(x, i, b) { + var b, i, t, x, z; + z = this; + if (i < 0) { + $panic(new $String("negative bit index")); + } + if (x.neg) { + t = z.abs.sub(x.abs, natOne); + t = t.setBit(t, ((i >>> 0)), (b ^ 1) >>> 0); + z.abs = t.add(t, natOne); + z.neg = z.abs.$length > 0; + return z; + } + z.abs = z.abs.setBit(x.abs, ((i >>> 0)), b); + z.neg = false; + return z; + }; + Int.prototype.SetBit = function(x, i, b) { return this.$val.SetBit(x, i, b); }; + Int.ptr.prototype.And = function(x, y) { + var _tmp, _tmp$1, x, x1, y, y1, y1$1, z; + z = this; + if (x.neg === y.neg) { + if (x.neg) { + x1 = (nat.nil).sub(x.abs, natOne); + y1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.add(z.abs.or(x1, y1), natOne); + z.neg = true; + return z; + } + z.abs = z.abs.and(x.abs, y.abs); + z.neg = false; + return z; + } + if (x.neg) { + _tmp = y; + _tmp$1 = x; + x = _tmp; + y = _tmp$1; + } + y1$1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.andNot(x.abs, y1$1); + z.neg = false; + return z; + }; + Int.prototype.And = function(x, y) { return this.$val.And(x, y); }; + Int.ptr.prototype.AndNot = function(x, y) { + var x, x1, x1$1, y, y1, y1$1, z; + z = this; + if (x.neg === y.neg) { + if (x.neg) { + x1 = (nat.nil).sub(x.abs, natOne); + y1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.andNot(y1, x1); + z.neg = false; + return z; + } + z.abs = z.abs.andNot(x.abs, y.abs); + z.neg = false; + return z; + } + if (x.neg) { + x1$1 = (nat.nil).sub(x.abs, natOne); + z.abs = z.abs.add(z.abs.or(x1$1, y.abs), natOne); + z.neg = true; + return z; + } + y1$1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.and(x.abs, y1$1); + z.neg = false; + return z; + }; + Int.prototype.AndNot = function(x, y) { return this.$val.AndNot(x, y); }; + Int.ptr.prototype.Or = function(x, y) { + var _tmp, _tmp$1, x, x1, y, y1, y1$1, z; + z = this; + if (x.neg === y.neg) { + if (x.neg) { + x1 = (nat.nil).sub(x.abs, natOne); + y1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.add(z.abs.and(x1, y1), natOne); + z.neg = true; + return z; + } + z.abs = z.abs.or(x.abs, y.abs); + z.neg = false; + return z; + } + if (x.neg) { + _tmp = y; + _tmp$1 = x; + x = _tmp; + y = _tmp$1; + } + y1$1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.add(z.abs.andNot(y1$1, x.abs), natOne); + z.neg = true; + return z; + }; + Int.prototype.Or = function(x, y) { return this.$val.Or(x, y); }; + Int.ptr.prototype.Xor = function(x, y) { + var _tmp, _tmp$1, x, x1, y, y1, y1$1, z; + z = this; + if (x.neg === y.neg) { + if (x.neg) { + x1 = (nat.nil).sub(x.abs, natOne); + y1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.xor(x1, y1); + z.neg = false; + return z; + } + z.abs = z.abs.xor(x.abs, y.abs); + z.neg = false; + return z; + } + if (x.neg) { + _tmp = y; + _tmp$1 = x; + x = _tmp; + y = _tmp$1; + } + y1$1 = (nat.nil).sub(y.abs, natOne); + z.abs = z.abs.add(z.abs.xor(x.abs, y1$1), natOne); + z.neg = true; + return z; + }; + Int.prototype.Xor = function(x, y) { return this.$val.Xor(x, y); }; + Int.ptr.prototype.Not = function(x) { + var x, z; + z = this; + if (x.neg) { + z.abs = z.abs.sub(x.abs, natOne); + z.neg = false; + return z; + } + z.abs = z.abs.add(x.abs, natOne); + z.neg = true; + return z; + }; + Int.prototype.Not = function(x) { return this.$val.Not(x); }; + Int.ptr.prototype.Sqrt = function(x) { + var _r$3, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (x.neg) { + $panic(new $String("square root of negative number")); + } + z.neg = false; + _r$3 = z.abs.sqrt(x.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + z.abs = _r$3; + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Sqrt }; } $f._r$3 = _r$3; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Sqrt = function(x) { return this.$val.Sqrt(x); }; + Int.ptr.prototype.Text = function(base) { + var _r$3, base, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; base = $f.base; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (x === ptrType$1.nil) { + $s = -1; return ""; + } + _r$3 = x.abs.itoa(x.neg, base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return ($bytesToString(_r$3)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Text }; } $f._r$3 = _r$3; $f.base = base; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Text = function(base) { return this.$val.Text(base); }; + Int.ptr.prototype.Append = function(buf, base) { + var _arg, _arg$1, _r$3, base, buf, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$3 = $f._r$3; base = $f.base; buf = $f.buf; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (x === ptrType$1.nil) { + $s = -1; return $appendSlice(buf, ""); + } + _arg = buf; + _r$3 = x.abs.itoa(x.neg, base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = _r$3; + $s = -1; return $appendSlice(_arg, _arg$1); + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Append }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$3 = _r$3; $f.base = base; $f.buf = buf; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Append = function(buf, base) { return this.$val.Append(buf, base); }; + Int.ptr.prototype.String = function() { + var _r$3, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = x.Text(10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.String }; } $f._r$3 = _r$3; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.String = function() { return this.$val.String(); }; + writeMultiple = function(s, text, count) { + var _r$3, b, count, s, text, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; b = $f.b; count = $f.count; s = $f.s; text = $f.text; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (text.length > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (text.length > 0) { */ case 1: + b = (new sliceType$1($stringToBytes(text))); + /* while (true) { */ case 3: + /* if (!(count > 0)) { break; } */ if(!(count > 0)) { $s = 4; continue; } + _r$3 = s.Write(b); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + count = count - (1) >> 0; + /* } */ $s = 3; continue; case 4: + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: writeMultiple }; } $f._r$3 = _r$3; $f.b = b; $f.count = count; $f.s = s; $f.text = text; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.ptr.prototype.Format = function(s, ch) { + var _1, _2, _arg, _arg$1, _arg$2, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, base, ch, d, d$1, digits, i, left, length, precision, precisionSet, prefix, right, s, sign, width, widthSet, x, zeros, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; base = $f.base; ch = $f.ch; d = $f.d; d$1 = $f.d$1; digits = $f.digits; i = $f.i; left = $f.left; length = $f.length; precision = $f.precision; precisionSet = $f.precisionSet; prefix = $f.prefix; right = $f.right; s = $f.s; sign = $f.sign; width = $f.width; widthSet = $f.widthSet; x = $f.x; zeros = $f.zeros; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + base = 0; + _1 = ch; + /* */ if (_1 === (98)) { $s = 2; continue; } + /* */ if (_1 === (111)) { $s = 3; continue; } + /* */ if ((_1 === (100)) || (_1 === (115)) || (_1 === (118))) { $s = 4; continue; } + /* */ if ((_1 === (120)) || (_1 === (88))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_1 === (98)) { */ case 2: + base = 2; + $s = 7; continue; + /* } else if (_1 === (111)) { */ case 3: + base = 8; + $s = 7; continue; + /* } else if ((_1 === (100)) || (_1 === (115)) || (_1 === (118))) { */ case 4: + base = 10; + $s = 7; continue; + /* } else if ((_1 === (120)) || (_1 === (88))) { */ case 5: + base = 16; + $s = 7; continue; + /* } else { */ case 6: + _arg = s; + _arg$1 = new $Int32(ch); + _r$3 = x.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$2 = new $String(_r$3); + _r$4 = fmt.Fprintf(_arg, "%%!%c(big.Int=%s)", new sliceType([_arg$1, _arg$2])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + $s = -1; return; + /* } */ case 7: + case 1: + /* */ if (x === ptrType$1.nil) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (x === ptrType$1.nil) { */ case 10: + _r$5 = fmt.Fprint(s, new sliceType([new $String("")])); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return; + /* } */ case 11: + sign = ""; + /* */ if (x.neg) { $s = 14; continue; } + _r$6 = s.Flag(43); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + /* */ if (_r$6) { $s = 15; continue; } + _r$7 = s.Flag(32); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + /* */ if (_r$7) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (x.neg) { */ case 14: + sign = "-"; + $s = 17; continue; + /* } else if (_r$6) { */ case 15: + sign = "+"; + $s = 17; continue; + /* } else if (_r$7) { */ case 16: + sign = " "; + /* } */ case 17: + case 13: + prefix = ""; + _r$8 = s.Flag(35); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + /* */ if (_r$8) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (_r$8) { */ case 20: + _2 = ch; + if (_2 === (111)) { + prefix = "0"; + } else if (_2 === (120)) { + prefix = "0x"; + } else if (_2 === (88)) { + prefix = "0X"; + } + /* } */ case 21: + _r$9 = x.abs.utoa(base); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + digits = _r$9; + if (ch === 88) { + _ref = digits; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (97 <= d && d <= 122) { + ((i < 0 || i >= digits.$length) ? ($throwRuntimeError("index out of range"), undefined) : digits.$array[digits.$offset + i] = (65 + ((d - 97 << 24 >>> 24)) << 24 >>> 24)); + } + _i++; + } + } + left = 0; + zeros = 0; + right = 0; + _r$10 = s.Precision(); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + precision = _tuple[0]; + precisionSet = _tuple[1]; + if (precisionSet) { + if (digits.$length < precision) { + zeros = precision - digits.$length >> 0; + } else if ((digits.$length === 1) && ((0 >= digits.$length ? ($throwRuntimeError("index out of range"), undefined) : digits.$array[digits.$offset + 0]) === 48) && (precision === 0)) { + $s = -1; return; + } + } + length = ((sign.length + prefix.length >> 0) + zeros >> 0) + digits.$length >> 0; + _r$11 = s.Width(); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + width = _tuple$1[0]; + widthSet = _tuple$1[1]; + /* */ if (widthSet && length < width) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (widthSet && length < width) { */ case 26: + d$1 = width - length >> 0; + _r$12 = s.Flag(45); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + /* */ if (_r$12) { $s = 29; continue; } + _r$13 = s.Flag(48); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + /* */ if (_r$13 && !precisionSet) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (_r$12) { */ case 29: + right = d$1; + $s = 32; continue; + /* } else if (_r$13 && !precisionSet) { */ case 30: + zeros = d$1; + $s = 32; continue; + /* } else { */ case 31: + left = d$1; + /* } */ case 32: + case 28: + /* } */ case 27: + $r = writeMultiple(s, " ", left); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = writeMultiple(s, sign, 1); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = writeMultiple(s, prefix, 1); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = writeMultiple(s, "0", zeros); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$14 = s.Write(digits); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + $r = writeMultiple(s, " ", right); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Format }; } $f._1 = _1; $f._2 = _2; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.base = base; $f.ch = ch; $f.d = d; $f.d$1 = d$1; $f.digits = digits; $f.i = i; $f.left = left; $f.length = length; $f.precision = precision; $f.precisionSet = precisionSet; $f.prefix = prefix; $f.right = right; $f.s = s; $f.sign = sign; $f.width = width; $f.widthSet = widthSet; $f.x = x; $f.zeros = zeros; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Format = function(s, ch) { return this.$val.Format(s, ch); }; + Int.ptr.prototype.scan = function(r, base) { + var _r$3, _r$4, _tuple, _tuple$1, base, err, neg, r, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; base = $f.base; err = $f.err; neg = $f.neg; r = $f.r; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = scanSign(r); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + neg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, 0, err]; + } + _r$4 = z.abs.scan(r, base, false); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + z.abs = _tuple$1[0]; + base = _tuple$1[1]; + err = _tuple$1[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, base, err]; + } + z.neg = z.abs.$length > 0 && neg; + $s = -1; return [z, base, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.scan }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.base = base; $f.err = err; $f.neg = neg; $f.r = r; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.scan = function(r, base) { return this.$val.scan(r, base); }; + scanSign = function(r) { + var _1, _r$3, _r$4, _tmp, _tmp$1, _tuple, ch, err, neg, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; ch = $f.ch; err = $f.err; neg = $f.neg; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + neg = false; + err = $ifaceNil; + ch = 0; + _r$3 = r.ReadByte(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ch = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = false; + _tmp$1 = err; + neg = _tmp; + err = _tmp$1; + $s = -1; return [neg, err]; + } + _1 = ch; + /* */ if (_1 === (45)) { $s = 3; continue; } + /* */ if (_1 === (43)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_1 === (45)) { */ case 3: + neg = true; + $s = 6; continue; + /* } else if (_1 === (43)) { */ case 4: + $s = 6; continue; + /* } else { */ case 5: + _r$4 = r.UnreadByte(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 6: + case 2: + $s = -1; return [neg, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: scanSign }; } $f._1 = _1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.ch = ch; $f.err = err; $f.neg = neg; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + byteReader.ptr.prototype.ReadByte = function() { + var _r$3, _r$4, _tuple, ch, err, r, size, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; ch = $f.ch; err = $f.err; r = $f.r; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$3 = r.ScanState.ReadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ch = _tuple[0]; + size = _tuple[1]; + err = _tuple[2]; + /* */ if (!((size === 1)) && $interfaceIsEqual(err, $ifaceNil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((size === 1)) && $interfaceIsEqual(err, $ifaceNil)) { */ case 2: + _r$4 = fmt.Errorf("invalid rune %#U", new sliceType([new $Int32(ch)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + /* } */ case 3: + $s = -1; return [((ch << 24 >>> 24)), err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: byteReader.ptr.prototype.ReadByte }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.ch = ch; $f.err = err; $f.r = r; $f.size = size; $f.$s = $s; $f.$r = $r; return $f; + }; + byteReader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; + byteReader.ptr.prototype.UnreadByte = function() { + var _r$3, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$3 = r.ScanState.UnreadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: byteReader.ptr.prototype.UnreadByte }; } $f._r$3 = _r$3; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + byteReader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; + Int.ptr.prototype.Scan = function(s, ch) { + var _1, _r$3, _tuple, base, ch, err, s, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _tuple = $f._tuple; base = $f.base; ch = $f.ch; err = $f.err; s = $f.s; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + $r = s.SkipSpace(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + base = 0; + _1 = ch; + if (_1 === (98)) { + base = 2; + } else if (_1 === (111)) { + base = 8; + } else if (_1 === (100)) { + base = 10; + } else if ((_1 === (120)) || (_1 === (88))) { + base = 16; + } else if ((_1 === (115)) || (_1 === (118))) { + } else { + $s = -1; return errors.New("Int.Scan: invalid verb"); + } + _r$3 = z.scan((x = new byteReader.ptr(s), new x.constructor.elem(x)), base); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[2]; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.Scan }; } $f._1 = _1; $f._r$3 = _r$3; $f._tuple = _tuple; $f.base = base; $f.ch = ch; $f.err = err; $f.s = s; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.Scan = function(s, ch) { return this.$val.Scan(s, ch); }; + Int.ptr.prototype.GobEncode = function() { + var b, buf, i, x; + x = this; + if (x === ptrType$1.nil) { + return [sliceType$1.nil, $ifaceNil]; + } + buf = $makeSlice(sliceType$1, (1 + ($imul(x.abs.$length, 4)) >> 0)); + i = x.abs.bytes(buf) - 1 >> 0; + b = 2; + if (x.neg) { + b = (b | (1)) >>> 0; + } + ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = b); + return [$subslice(buf, i), $ifaceNil]; + }; + Int.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Int.ptr.prototype.GobDecode = function(buf) { + var _r$3, b, buf, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; b = $f.b; buf = $f.buf; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (buf.$length === 0) { + Int.copy(z, new Int.ptr(false, nat.nil)); + $s = -1; return $ifaceNil; + } + b = (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]); + /* */ if (!(((b >>> 1 << 24 >>> 24) === 1))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(((b >>> 1 << 24 >>> 24) === 1))) { */ case 1: + _r$3 = fmt.Errorf("Int.GobDecode: encoding version %d not supported", new sliceType([new $Uint8((b >>> 1 << 24 >>> 24))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + z.neg = !((((b & 1) >>> 0) === 0)); + z.abs = z.abs.setBytes($subslice(buf, 1)); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.GobDecode }; } $f._r$3 = _r$3; $f.b = b; $f.buf = buf; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.GobDecode = function(buf) { return this.$val.GobDecode(buf); }; + Int.ptr.prototype.MarshalText = function() { + var _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, err, text, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; err = $f.err; text = $f.text; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + text = sliceType$1.nil; + err = $ifaceNil; + x = this; + if (x === ptrType$1.nil) { + _tmp = (new sliceType$1($stringToBytes(""))); + _tmp$1 = $ifaceNil; + text = _tmp; + err = _tmp$1; + $s = -1; return [text, err]; + } + _r$3 = x.abs.itoa(x.neg, 10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tmp$2 = _r$3; + _tmp$3 = $ifaceNil; + text = _tmp$2; + err = _tmp$3; + $s = -1; return [text, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.MarshalText }; } $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.err = err; $f.text = text; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Int.ptr.prototype.UnmarshalText = function(text) { + var _r$3, _r$4, _tuple, ok, text, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; ok = $f.ok; text = $f.text; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.setFromScanner(bytes.NewReader(text), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ok = _tuple[1]; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$4 = fmt.Errorf("math/big: cannot unmarshal %q into a *big.Int", new sliceType([text])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.UnmarshalText }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.ok = ok; $f.text = text; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; + Int.ptr.prototype.MarshalJSON = function() { + var _r$3, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = x.MarshalText(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.MarshalJSON }; } $f._r$3 = _r$3; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; + Int.ptr.prototype.UnmarshalJSON = function(text) { + var _r$3, text, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; text = $f.text; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (($bytesToString(text)) === "null") { + $s = -1; return $ifaceNil; + } + _r$3 = z.UnmarshalText(text); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.UnmarshalJSON }; } $f._r$3 = _r$3; $f.text = text; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.UnmarshalJSON = function(text) { return this.$val.UnmarshalJSON(text); }; + nat.prototype.clear = function() { + var _i, _ref, i, z; + z = this; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = 0); + _i++; + } + }; + $ptrType(nat).prototype.clear = function() { return this.$get().clear(); }; + nat.prototype.norm = function() { + var i, x, z; + z = this; + i = z.$length; + while (true) { + if (!(i > 0 && ((x = i - 1 >> 0, ((x < 0 || x >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x])) === 0))) { break; } + i = i - (1) >> 0; + } + return $subslice(z, 0, i); + }; + $ptrType(nat).prototype.norm = function() { return this.$get().norm(); }; + nat.prototype.make = function(n) { + var n, z; + z = this; + if (n <= z.$capacity) { + return $subslice(z, 0, n); + } + return $makeSlice(nat, n, (n + 4 >> 0)); + }; + $ptrType(nat).prototype.make = function(n) { return this.$get().make(n); }; + nat.prototype.setWord = function(x) { + var x, z; + z = this; + if (x === 0) { + return $subslice(z, 0, 0); + } + z = z.make(1); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = x); + return z; + }; + $ptrType(nat).prototype.setWord = function(x) { return this.$get().setWord(x); }; + nat.prototype.setUint64 = function(x) { + var w, x, x$1, z; + z = this; + w = ((x.$low >>> 0)); + if ((x$1 = (new $Uint64(0, w.constructor === Number ? w : 1)), (x$1.$high === x.$high && x$1.$low === x.$low))) { + return z.setWord(w); + } + z = z.make(2); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = (($shiftRightUint64(x, 32).$low >>> 0))); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((x.$low >>> 0))); + return z; + }; + $ptrType(nat).prototype.setUint64 = function(x) { return this.$get().setUint64(x); }; + nat.prototype.set = function(x) { + var x, z; + z = this; + z = z.make(x.$length); + $copySlice(z, x); + return z; + }; + $ptrType(nat).prototype.set = function(x) { return this.$get().set(x); }; + nat.prototype.add = function(x, y) { + var c, m, n, x, x$1, x$2, x$3, y, z; + z = this; + m = x.$length; + n = y.$length; + if (m < n) { + return z.add(y, x); + } else if ((m === 0)) { + return $subslice(z, 0, 0); + } else if ((n === 0)) { + return z.set(x); + } + z = z.make(m + 1 >> 0); + c = addVV((x$1 = $subslice(z, 0, n), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), $subslice(new sliceType$2(y.$array), y.$offset, y.$offset + y.$length)); + if (m > n) { + c = addVW((x$2 = $subslice(z, n, m), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), (x$3 = $subslice(x, n), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), c); + } + ((m < 0 || m >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + m] = c); + return z.norm(); + }; + $ptrType(nat).prototype.add = function(x, y) { return this.$get().add(x, y); }; + nat.prototype.sub = function(x, y) { + var c, m, n, x, x$1, x$2, x$3, y, z; + z = this; + m = x.$length; + n = y.$length; + if (m < n) { + $panic(new $String("underflow")); + } else if ((m === 0)) { + return $subslice(z, 0, 0); + } else if ((n === 0)) { + return z.set(x); + } + z = z.make(m); + c = subVV((x$1 = $subslice(z, 0, n), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), $subslice(new sliceType$2(y.$array), y.$offset, y.$offset + y.$length)); + if (m > n) { + c = subVW((x$2 = $subslice(z, n), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), (x$3 = $subslice(x, n), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), c); + } + if (!((c === 0))) { + $panic(new $String("underflow")); + } + return z.norm(); + }; + $ptrType(nat).prototype.sub = function(x, y) { return this.$get().sub(x, y); }; + nat.prototype.cmp = function(y) { + var i, m, n, r, x, y; + r = 0; + x = this; + m = x.$length; + n = y.$length; + if (!((m === n)) || (m === 0)) { + if (m < n) { + r = -1; + } else if (m > n) { + r = 1; + } + return r; + } + i = m - 1 >> 0; + while (true) { + if (!(i > 0 && (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) === ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])))) { break; } + i = i - (1) >> 0; + } + if (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) { + r = -1; + } else if (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) > ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) { + r = 1; + } + return r; + }; + $ptrType(nat).prototype.cmp = function(y) { return this.$get().cmp(y); }; + nat.prototype.mulAddWW = function(x, y, r) { + var m, r, x, x$1, y, z; + z = this; + m = x.$length; + if ((m === 0) || (y === 0)) { + return z.setWord(r); + } + z = z.make(m + 1 >> 0); + ((m < 0 || m >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + m] = mulAddVWW((x$1 = $subslice(z, 0, m), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), y, r)); + return z.norm(); + }; + $ptrType(nat).prototype.mulAddWW = function(x, y, r) { return this.$get().mulAddWW(x, y, r); }; + basicMul = function(z, x, y) { + var _i, _ref, d, i, x, x$1, x$2, y, z; + $subslice(z, 0, (x.$length + y.$length >> 0)).clear(); + _ref = y; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((d === 0))) { + (x$2 = x.$length + i >> 0, ((x$2 < 0 || x$2 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$2] = addMulVVW((x$1 = $subslice(z, i, (i + x.$length >> 0)), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), d))); + } + _i++; + } + }; + nat.prototype.montgomery = function(x, y, m, k, n) { + var c, c2, c3, cx, cy, d, i, k, m, n, t, x, x$1, x$2, x$3, x$4, x$5, y, z; + z = this; + if (!((x.$length === n)) || !((y.$length === n)) || !((m.$length === n))) { + $panic(new $String("math/big: mismatched montgomery number lengths")); + } + z = z.make($imul(n, 2)); + z.clear(); + c = 0; + i = 0; + while (true) { + if (!(i < n)) { break; } + d = ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]); + c2 = addMulVVW((x$1 = $subslice(z, i, (n + i >> 0)), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), d); + t = $imul(((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]), k) >>> 0; + c3 = addMulVVW((x$2 = $subslice(z, i, (n + i >> 0)), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), $subslice(new sliceType$2(m.$array), m.$offset, m.$offset + m.$length), t); + cx = c + c2 >>> 0; + cy = cx + c3 >>> 0; + (x$3 = n + i >> 0, ((x$3 < 0 || x$3 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$3] = cy)); + if (cx < c2 || cy < c3) { + c = 1; + } else { + c = 0; + } + i = i + (1) >> 0; + } + if (!((c === 0))) { + subVV((x$4 = $subslice(z, 0, n), $subslice(new sliceType$2(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)), (x$5 = $subslice(z, n), $subslice(new sliceType$2(x$5.$array), x$5.$offset, x$5.$offset + x$5.$length)), $subslice(new sliceType$2(m.$array), m.$offset, m.$offset + m.$length)); + } else { + $copySlice($subslice(z, 0, n), $subslice(z, n)); + } + return $subslice(z, 0, n); + }; + $ptrType(nat).prototype.montgomery = function(x, y, m, k, n) { return this.$get().montgomery(x, y, m, k, n); }; + karatsubaAdd = function(z, x, n) { + var c, n, x, x$1, x$2, x$3, z; + c = addVV((x$1 = $subslice(z, 0, n), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length)); + if (!((c === 0))) { + addVW((x$2 = $subslice(z, n, (n + (n >> 1 >> 0) >> 0)), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), (x$3 = $subslice(z, n), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), c); + } + }; + karatsubaSub = function(z, x, n) { + var c, n, x, x$1, x$2, x$3, z; + c = subVV((x$1 = $subslice(z, 0, n), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length)); + if (!((c === 0))) { + subVW((x$2 = $subslice(z, n, (n + (n >> 1 >> 0) >> 0)), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), (x$3 = $subslice(z, n), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), c); + } + }; + karatsuba = function(z, x, y) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, n, n2, p, r, s, x, x0, x1, xd, y, y0, y1, yd, z; + n = y.$length; + if (!(((n & 1) === 0)) || n < karatsubaThreshold || n < 2) { + basicMul(z, x, y); + return; + } + n2 = n >> 1 >> 0; + _tmp = $subslice(x, n2); + _tmp$1 = $subslice(x, 0, n2); + x1 = _tmp; + x0 = _tmp$1; + _tmp$2 = $subslice(y, n2); + _tmp$3 = $subslice(y, 0, n2); + y1 = _tmp$2; + y0 = _tmp$3; + karatsuba(z, x0, y0); + karatsuba($subslice(z, n), x1, y1); + s = 1; + xd = $subslice(z, ($imul(2, n)), (($imul(2, n)) + n2 >> 0)); + if (!((subVV($subslice(new sliceType$2(xd.$array), xd.$offset, xd.$offset + xd.$length), $subslice(new sliceType$2(x1.$array), x1.$offset, x1.$offset + x1.$length), $subslice(new sliceType$2(x0.$array), x0.$offset, x0.$offset + x0.$length)) === 0))) { + s = -s; + subVV($subslice(new sliceType$2(xd.$array), xd.$offset, xd.$offset + xd.$length), $subslice(new sliceType$2(x0.$array), x0.$offset, x0.$offset + x0.$length), $subslice(new sliceType$2(x1.$array), x1.$offset, x1.$offset + x1.$length)); + } + yd = $subslice(z, (($imul(2, n)) + n2 >> 0), ($imul(3, n))); + if (!((subVV($subslice(new sliceType$2(yd.$array), yd.$offset, yd.$offset + yd.$length), $subslice(new sliceType$2(y0.$array), y0.$offset, y0.$offset + y0.$length), $subslice(new sliceType$2(y1.$array), y1.$offset, y1.$offset + y1.$length)) === 0))) { + s = -s; + subVV($subslice(new sliceType$2(yd.$array), yd.$offset, yd.$offset + yd.$length), $subslice(new sliceType$2(y1.$array), y1.$offset, y1.$offset + y1.$length), $subslice(new sliceType$2(y0.$array), y0.$offset, y0.$offset + y0.$length)); + } + p = $subslice(z, ($imul(n, 3))); + karatsuba(p, xd, yd); + r = $subslice(z, ($imul(n, 4))); + $copySlice(r, $subslice(z, 0, ($imul(n, 2)))); + karatsubaAdd($subslice(z, n2), r, n); + karatsubaAdd($subslice(z, n2), $subslice(r, n), n); + if (s > 0) { + karatsubaAdd($subslice(z, n2), p, n); + } else { + karatsubaSub($subslice(z, n2), p, n); + } + }; + alias = function(x, y) { + var x, x$1, x$2, y; + return x.$capacity > 0 && y.$capacity > 0 && (x$1 = $subslice(x, 0, x.$capacity), $indexPtr(x$1.$array, x$1.$offset + (x.$capacity - 1 >> 0), ptrType$3)) === (x$2 = $subslice(y, 0, y.$capacity), $indexPtr(x$2.$array, x$2.$offset + (y.$capacity - 1 >> 0), ptrType$3)); + }; + addAt = function(z, x, i) { + var c, i, j, n, x, x$1, x$2, x$3, x$4, z; + n = x.$length; + if (n > 0) { + c = addVV((x$1 = $subslice(z, i, (i + n >> 0)), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), (x$2 = $subslice(z, i), $subslice(new sliceType$2(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length)); + if (!((c === 0))) { + j = i + n >> 0; + if (j < z.$length) { + addVW((x$3 = $subslice(z, j), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), (x$4 = $subslice(z, j), $subslice(new sliceType$2(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)), c); + } + } + } + }; + max = function(x, y) { + var x, y; + if (x > y) { + return x; + } + return y; + }; + karatsubaLen = function(n, threshold) { + var i, n, threshold, y; + i = 0; + while (true) { + if (!(n > threshold)) { break; } + n = (n >> $min((1), 31)) >> 0; + i = i + (1) >>> 0; + } + return (y = i, y < 32 ? (n << y) : 0) >> 0; + }; + nat.prototype.mul = function(x, y) { + var i, k, m, n, t, x, x0, x0$1, xi, y, y0, y0$1, y1, z; + z = this; + m = x.$length; + n = y.$length; + if (m < n) { + return z.mul(y, x); + } else if ((m === 0) || (n === 0)) { + return $subslice(z, 0, 0); + } else if ((n === 1)) { + return z.mulAddWW(x, (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]), 0); + } + if (alias(z, x) || alias(z, y)) { + z = nat.nil; + } + if (n < karatsubaThreshold) { + z = z.make(m + n >> 0); + basicMul(z, x, y); + return z.norm(); + } + k = karatsubaLen(n, karatsubaThreshold); + x0 = $subslice(x, 0, k); + y0 = $subslice(y, 0, k); + z = z.make(max($imul(6, k), m + n >> 0)); + karatsuba(z, x0, y0); + z = $subslice(z, 0, (m + n >> 0)); + $subslice(z, ($imul(2, k))).clear(); + if (k < n || !((m === n))) { + t = nat.nil; + x0$1 = x0.norm(); + y1 = $subslice(y, k); + t = t.mul(x0$1, y1); + addAt(z, t, k); + y0$1 = y0.norm(); + i = k; + while (true) { + if (!(i < x.$length)) { break; } + xi = $subslice(x, i); + if (xi.$length > k) { + xi = $subslice(xi, 0, k); + } + xi = xi.norm(); + t = t.mul(xi, y0$1); + addAt(z, t, i); + t = t.mul(xi, y1); + addAt(z, t, i + k >> 0); + i = i + (k) >> 0; + } + } + return z.norm(); + }; + $ptrType(nat).prototype.mul = function(x, y) { return this.$get().mul(x, y); }; + basicSqr = function(z, x) { + var _tuple, _tuple$1, d, i, n, t, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, z; + n = x.$length; + t = $makeSlice(nat, ($imul(2, n))); + _tuple = mulWW((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = _tuple[0]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = _tuple[1]); + i = 1; + while (true) { + if (!(i < n)) { break; } + d = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]); + _tuple$1 = mulWW(d, d); + (x$1 = ($imul(2, i)) + 1 >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = _tuple$1[0])); + (x$2 = $imul(2, i), ((x$2 < 0 || x$2 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$2] = _tuple$1[1])); + (x$5 = $imul(2, i), ((x$5 < 0 || x$5 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$5] = addMulVVW((x$3 = $subslice(t, i, ($imul(2, i))), $subslice(new sliceType$2(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), (x$4 = $subslice(x, 0, i), $subslice(new sliceType$2(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)), d))); + i = i + (1) >> 0; + } + (x$8 = ($imul(2, n)) - 1 >> 0, ((x$8 < 0 || x$8 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$8] = shlVU((x$6 = $subslice(t, 1, (($imul(2, n)) - 1 >> 0)), $subslice(new sliceType$2(x$6.$array), x$6.$offset, x$6.$offset + x$6.$length)), (x$7 = $subslice(t, 1, (($imul(2, n)) - 1 >> 0)), $subslice(new sliceType$2(x$7.$array), x$7.$offset, x$7.$offset + x$7.$length)), 1))); + addVV($subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), $subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), $subslice(new sliceType$2(t.$array), t.$offset, t.$offset + t.$length)); + }; + karatsubaSqr = function(z, x) { + var _tmp, _tmp$1, n, n2, p, r, x, x0, x1, xd, z; + n = x.$length; + if (!(((n & 1) === 0)) || n < karatsubaSqrThreshold || n < 2) { + basicSqr($subslice(z, 0, ($imul(2, n))), x); + return; + } + n2 = n >> 1 >> 0; + _tmp = $subslice(x, n2); + _tmp$1 = $subslice(x, 0, n2); + x1 = _tmp; + x0 = _tmp$1; + karatsubaSqr(z, x0); + karatsubaSqr($subslice(z, n), x1); + xd = $subslice(z, ($imul(2, n)), (($imul(2, n)) + n2 >> 0)); + if (!((subVV($subslice(new sliceType$2(xd.$array), xd.$offset, xd.$offset + xd.$length), $subslice(new sliceType$2(x1.$array), x1.$offset, x1.$offset + x1.$length), $subslice(new sliceType$2(x0.$array), x0.$offset, x0.$offset + x0.$length)) === 0))) { + subVV($subslice(new sliceType$2(xd.$array), xd.$offset, xd.$offset + xd.$length), $subslice(new sliceType$2(x0.$array), x0.$offset, x0.$offset + x0.$length), $subslice(new sliceType$2(x1.$array), x1.$offset, x1.$offset + x1.$length)); + } + p = $subslice(z, ($imul(n, 3))); + karatsubaSqr(p, xd); + r = $subslice(z, ($imul(n, 4))); + $copySlice(r, $subslice(z, 0, ($imul(n, 2)))); + karatsubaAdd($subslice(z, n2), r, n); + karatsubaAdd($subslice(z, n2), $subslice(r, n), n); + karatsubaSub($subslice(z, n2), p, n); + }; + nat.prototype.sqr = function(x) { + var _tuple, d, k, n, t, x, x0, x0$1, x1, z; + z = this; + n = x.$length; + if ((n === 0)) { + return $subslice(z, 0, 0); + } else if ((n === 1)) { + d = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]); + z = z.make(2); + _tuple = mulWW(d, d); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = _tuple[0]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = _tuple[1]); + return z.norm(); + } + if (alias(z, x)) { + z = nat.nil; + } + if (n < basicSqrThreshold) { + z = z.make($imul(2, n)); + basicMul(z, x, x); + return z.norm(); + } + if (n < karatsubaSqrThreshold) { + z = z.make($imul(2, n)); + basicSqr(z, x); + return z.norm(); + } + k = karatsubaLen(n, karatsubaSqrThreshold); + x0 = $subslice(x, 0, k); + z = z.make(max($imul(6, k), $imul(2, n))); + karatsubaSqr(z, x0); + z = $subslice(z, 0, ($imul(2, n))); + $subslice(z, ($imul(2, k))).clear(); + if (k < n) { + t = nat.nil; + x0$1 = x0.norm(); + x1 = $subslice(x, k); + t = t.mul(x0$1, x1); + addAt(z, t, k); + addAt(z, t, k); + t = t.sqr(x1); + addAt(z, t, $imul(2, k)); + } + return z.norm(); + }; + $ptrType(nat).prototype.sqr = function(x) { return this.$get().sqr(x); }; + nat.prototype.mulRange = function(a, b) { + var a, b, m, x, z; + z = this; + if ((a.$high === 0 && a.$low === 0)) { + return z.setUint64(new $Uint64(0, 0)); + } else if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { + return z.setUint64(new $Uint64(0, 1)); + } else if ((a.$high === b.$high && a.$low === b.$low)) { + return z.setUint64(a); + } else if ((x = new $Uint64(a.$high + 0, a.$low + 1), (x.$high === b.$high && x.$low === b.$low))) { + return z.mul((nat.nil).setUint64(a), (nat.nil).setUint64(b)); + } + m = $div64((new $Uint64(a.$high + b.$high, a.$low + b.$low)), new $Uint64(0, 2), false); + return z.mul((nat.nil).mulRange(a, m), (nat.nil).mulRange(new $Uint64(m.$high + 0, m.$low + 1), b)); + }; + $ptrType(nat).prototype.mulRange = function(a, b) { return this.$get().mulRange(a, b); }; + nat.prototype.divW = function(x, y) { + var m, q, r, x, y, z; + q = nat.nil; + r = 0; + z = this; + m = x.$length; + if ((y === 0)) { + $panic(new $String("division by zero")); + } else if ((y === 1)) { + q = z.set(x); + return [q, r]; + } else if ((m === 0)) { + q = $subslice(z, 0, 0); + return [q, r]; + } + z = z.make(m); + r = divWVW($subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), 0, $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), y); + q = z.norm(); + return [q, r]; + }; + $ptrType(nat).prototype.divW = function(x, y) { return this.$get().divW(x, y); }; + nat.prototype.div = function(z2, u, v) { + var _r$3, _tuple, _tuple$1, q, r, r2, u, v, z, z2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; q = $f.q; r = $f.r; r2 = $f.r2; u = $f.u; v = $f.v; z = $f.z; z2 = $f.z2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + q = nat.nil; + r = nat.nil; + z = this; + if (v.$length === 0) { + $panic(new $String("division by zero")); + } + if (u.cmp(v) < 0) { + q = $subslice(z, 0, 0); + r = z2.set(u); + $s = -1; return [q, r]; + } + if (v.$length === 1) { + r2 = 0; + _tuple = z.divW(u, (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); + q = _tuple[0]; + r2 = _tuple[1]; + r = z2.setWord(r2); + $s = -1; return [q, r]; + } + _r$3 = z.divLarge(z2, u, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + q = _tuple$1[0]; + r = _tuple$1[1]; + $s = -1; return [q, r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.div }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.q = q; $f.r = r; $f.r2 = r2; $f.u = u; $f.v = v; $f.z = z; $f.z2 = z2; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.div = function(z2, u, v) { return this.$get().div(z2, u, v); }; + getNat = function(n) { + var _r$3, n, v, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; n = $f.n; v = $f.v; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = ptrType$4.nil; + _r$3 = natPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + if (!($interfaceIsEqual(v, $ifaceNil))) { + z = $assertType(v, ptrType$4); + } + if (z === ptrType$4.nil) { + z = $newDataPointer(nat.nil, ptrType$4); + } + z.$set(z.make(n)); + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: getNat }; } $f._r$3 = _r$3; $f.n = n; $f.v = v; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + putNat = function(x) { + var x; + natPool.Put(x); + }; + nat.prototype.divLarge = function(u, uIn, v) { + var _index, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, c, c$1, j, m, n, prevRhat, q, qhat, qhatv, qhatvp, r, rhat, shift, u, uIn, ujn, ujn2, v, v1, v1p, vn1, vn2, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x2, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _index = $f._index; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; c = $f.c; c$1 = $f.c$1; j = $f.j; m = $f.m; n = $f.n; prevRhat = $f.prevRhat; q = $f.q; qhat = $f.qhat; qhatv = $f.qhatv; qhatvp = $f.qhatvp; r = $f.r; rhat = $f.rhat; shift = $f.shift; u = $f.u; uIn = $f.uIn; ujn = $f.ujn; ujn2 = $f.ujn2; v = $f.v; v1 = $f.v1; v1p = $f.v1p; vn1 = $f.vn1; vn2 = $f.vn2; x = $f.x; x$1 = $f.x$1; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; x1 = $f.x1; x2 = $f.x2; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + q = nat.nil; + r = nat.nil; + z = this; + n = v.$length; + m = uIn.$length - n >> 0; + if (alias(z, u) || alias(z, uIn) || alias(z, v)) { + z = nat.nil; + } + q = z.make(m + 1 >> 0); + _r$3 = getNat(n + 1 >> 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + qhatvp = _r$3; + qhatv = qhatvp.$get(); + if (alias(u, uIn) || alias(u, v)) { + u = nat.nil; + } + u = u.make(uIn.$length + 1 >> 0); + u.clear(); + v1p = ptrType$4.nil; + shift = nlz((x = n - 1 >> 0, ((x < 0 || x >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x]))); + /* */ if (shift > 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (shift > 0) { */ case 2: + _r$4 = getNat(n); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + v1p = _r$4; + v1 = v1p.$get(); + shlVU($subslice(new sliceType$2(v1.$array), v1.$offset, v1.$offset + v1.$length), $subslice(new sliceType$2(v.$array), v.$offset, v.$offset + v.$length), shift); + v = v1; + /* } */ case 3: + (x$2 = uIn.$length, ((x$2 < 0 || x$2 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$2] = shlVU((x$1 = $subslice(u, 0, uIn.$length), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(uIn.$array), uIn.$offset, uIn.$offset + uIn.$length), shift))); + vn1 = (x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$3])); + j = m; + while (true) { + if (!(j >= 0)) { break; } + qhat = 4294967295; + ujn = (x$4 = j + n >> 0, ((x$4 < 0 || x$4 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$4])); + if (!((ujn === vn1))) { + rhat = 0; + _tuple = divWW(ujn, (x$5 = (j + n >> 0) - 1 >> 0, ((x$5 < 0 || x$5 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$5])), vn1); + qhat = _tuple[0]; + rhat = _tuple[1]; + vn2 = (x$6 = n - 2 >> 0, ((x$6 < 0 || x$6 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$6])); + _tuple$1 = mulWW(qhat, vn2); + x1 = _tuple$1[0]; + x2 = _tuple$1[1]; + ujn2 = (x$7 = (j + n >> 0) - 2 >> 0, ((x$7 < 0 || x$7 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$7])); + while (true) { + if (!(greaterThan(x1, x2, rhat, ujn2))) { break; } + qhat = qhat - (1) >>> 0; + prevRhat = rhat; + rhat = rhat + (vn1) >>> 0; + if (rhat < prevRhat) { + break; + } + _tuple$2 = mulWW(qhat, vn2); + x1 = _tuple$2[0]; + x2 = _tuple$2[1]; + } + } + ((n < 0 || n >= qhatv.$length) ? ($throwRuntimeError("index out of range"), undefined) : qhatv.$array[qhatv.$offset + n] = mulAddVWW((x$8 = $subslice(qhatv, 0, n), $subslice(new sliceType$2(x$8.$array), x$8.$offset, x$8.$offset + x$8.$length)), $subslice(new sliceType$2(v.$array), v.$offset, v.$offset + v.$length), qhat, 0)); + c = subVV((x$9 = $subslice(u, j, (j + qhatv.$length >> 0)), $subslice(new sliceType$2(x$9.$array), x$9.$offset, x$9.$offset + x$9.$length)), (x$10 = $subslice(u, j), $subslice(new sliceType$2(x$10.$array), x$10.$offset, x$10.$offset + x$10.$length)), $subslice(new sliceType$2(qhatv.$array), qhatv.$offset, qhatv.$offset + qhatv.$length)); + if (!((c === 0))) { + c$1 = addVV((x$11 = $subslice(u, j, (j + n >> 0)), $subslice(new sliceType$2(x$11.$array), x$11.$offset, x$11.$offset + x$11.$length)), (x$12 = $subslice(u, j), $subslice(new sliceType$2(x$12.$array), x$12.$offset, x$12.$offset + x$12.$length)), $subslice(new sliceType$2(v.$array), v.$offset, v.$offset + v.$length)); + _index = j + n >> 0; + ((_index < 0 || _index >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + _index] = (((_index < 0 || _index >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + _index]) + (c$1) >>> 0)); + qhat = qhat - (1) >>> 0; + } + ((j < 0 || j >= q.$length) ? ($throwRuntimeError("index out of range"), undefined) : q.$array[q.$offset + j] = qhat); + j = j - (1) >> 0; + } + if (!(v1p === ptrType$4.nil)) { + putNat(v1p); + } + putNat(qhatvp); + q = q.norm(); + shrVU($subslice(new sliceType$2(u.$array), u.$offset, u.$offset + u.$length), $subslice(new sliceType$2(u.$array), u.$offset, u.$offset + u.$length), shift); + r = u.norm(); + _tmp = q; + _tmp$1 = r; + q = _tmp; + r = _tmp$1; + $s = -1; return [q, r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.divLarge }; } $f._index = _index; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.c = c; $f.c$1 = c$1; $f.j = j; $f.m = m; $f.n = n; $f.prevRhat = prevRhat; $f.q = q; $f.qhat = qhat; $f.qhatv = qhatv; $f.qhatvp = qhatvp; $f.r = r; $f.rhat = rhat; $f.shift = shift; $f.u = u; $f.uIn = uIn; $f.ujn = ujn; $f.ujn2 = ujn2; $f.v = v; $f.v1 = v1; $f.v1p = v1p; $f.vn1 = vn1; $f.vn2 = vn2; $f.x = x; $f.x$1 = x$1; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.x1 = x1; $f.x2 = x2; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.divLarge = function(u, uIn, v) { return this.$get().divLarge(u, uIn, v); }; + nat.prototype.bitLen = function() { + var i, x; + x = this; + i = x.$length - 1 >> 0; + if (i >= 0) { + return ($imul(i, 32)) + bits.Len(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0))) >> 0; + } + return 0; + }; + $ptrType(nat).prototype.bitLen = function() { return this.$get().bitLen(); }; + nat.prototype.trailingZeroBits = function() { + var i, x; + x = this; + if (x.$length === 0) { + return 0; + } + i = 0; + while (true) { + if (!(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) === 0)) { break; } + i = i + (1) >>> 0; + } + return (i * 32 >>> 0) + ((bits.TrailingZeros(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0))) >>> 0)) >>> 0; + }; + $ptrType(nat).prototype.trailingZeroBits = function() { return this.$get().trailingZeroBits(); }; + same = function(x, y) { + var x, y; + return (x.$length === y.$length) && x.$length > 0 && $indexPtr(x.$array, x.$offset + 0, ptrType$3) === $indexPtr(y.$array, y.$offset + 0, ptrType$3); + }; + nat.prototype.shl = function(x, s) { + var _q, _r$3, m, n, s, x, x$1, z; + z = this; + if (s === 0) { + if (same(z, x)) { + return z; + } + if (!alias(z, x)) { + return z.set(x); + } + } + m = x.$length; + if (m === 0) { + return $subslice(z, 0, 0); + } + n = m + (((_q = s / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) >> 0; + z = z.make(n + 1 >> 0); + ((n < 0 || n >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + n] = shlVU((x$1 = $subslice(z, (n - m >> 0), n), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), (_r$3 = s % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")))); + $subslice(z, 0, (n - m >> 0)).clear(); + return z.norm(); + }; + $ptrType(nat).prototype.shl = function(x, s) { return this.$get().shl(x, s); }; + nat.prototype.shr = function(x, s) { + var _q, _r$3, m, n, s, x, x$1, z; + z = this; + if (s === 0) { + if (same(z, x)) { + return z; + } + if (!alias(z, x)) { + return z.set(x); + } + } + m = x.$length; + n = m - (((_q = s / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) >> 0; + if (n <= 0) { + return $subslice(z, 0, 0); + } + z = z.make(n); + shrVU($subslice(new sliceType$2(z.$array), z.$offset, z.$offset + z.$length), (x$1 = $subslice(x, (m - n >> 0)), $subslice(new sliceType$2(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), (_r$3 = s % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero"))); + return z.norm(); + }; + $ptrType(nat).prototype.shr = function(x, s) { return this.$get().shr(x, s); }; + nat.prototype.setBit = function(x, i, b) { + var _1, _q, _r$3, b, i, j, m, n, x, y, z; + z = this; + j = (((_q = i / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)); + m = (y = ((_r$3 = i % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0; + n = x.$length; + _1 = b; + if (_1 === (0)) { + z = z.make(n); + $copySlice(z, x); + if (j >= n) { + return z; + } + ((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j] = ((((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j]) & ~(m)) >>> 0)); + return z.norm(); + } else if (_1 === (1)) { + if (j >= n) { + z = z.make(j + 1 >> 0); + $subslice(z, n).clear(); + } else { + z = z.make(n); + } + $copySlice(z, x); + ((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j] = ((((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j]) | (m)) >>> 0)); + return z; + } + $panic(new $String("set bit is not 0 or 1")); + }; + $ptrType(nat).prototype.setBit = function(x, i, b) { return this.$get().setBit(x, i, b); }; + nat.prototype.bit = function(i) { + var _q, _r$3, i, j, x, y; + x = this; + j = (_q = i / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + if (j >= ((x.$length >>> 0))) { + return 0; + } + return ((((((y = ((_r$3 = i % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero"))), y < 32 ? (((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]) >>> y) : 0) >>> 0) & 1) >>> 0) >>> 0)); + }; + $ptrType(nat).prototype.bit = function(i) { return this.$get().bit(i); }; + nat.prototype.sticky = function(i) { + var _i, _q, _r$3, _ref, i, j, x, x$1, y; + x = this; + j = (_q = i / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + if (j >= ((x.$length >>> 0))) { + if (x.$length === 0) { + return 0; + } + return 1; + } + _ref = $subslice(x, 0, j); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((x$1 === 0))) { + return 1; + } + _i++; + } + if (!((((y = ((32 - (_r$3 = i % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) >>> 0)), y < 32 ? (((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]) << y) : 0) >>> 0) === 0))) { + return 1; + } + return 0; + }; + $ptrType(nat).prototype.sticky = function(i) { return this.$get().sticky(i); }; + nat.prototype.and = function(x, y) { + var i, m, n, x, y, z; + z = this; + m = x.$length; + n = y.$length; + if (m > n) { + m = n; + } + z = z.make(m); + i = 0; + while (true) { + if (!(i < m)) { break; } + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + return z.norm(); + }; + $ptrType(nat).prototype.and = function(x, y) { return this.$get().and(x, y); }; + nat.prototype.andNot = function(x, y) { + var i, m, n, x, y, z; + z = this; + m = x.$length; + n = y.$length; + if (n > m) { + n = m; + } + z = z.make(m); + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & ~((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + $copySlice($subslice(z, n, m), $subslice(x, n, m)); + return z.norm(); + }; + $ptrType(nat).prototype.andNot = function(x, y) { return this.$get().andNot(x, y); }; + nat.prototype.or = function(x, y) { + var _tmp, _tmp$1, i, m, n, s, x, y, z; + z = this; + m = x.$length; + n = y.$length; + s = x; + if (m < n) { + _tmp = m; + _tmp$1 = n; + n = _tmp; + m = _tmp$1; + s = y; + } + z = z.make(m); + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) | ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + $copySlice($subslice(z, n, m), $subslice(s, n, m)); + return z.norm(); + }; + $ptrType(nat).prototype.or = function(x, y) { return this.$get().or(x, y); }; + nat.prototype.xor = function(x, y) { + var _tmp, _tmp$1, i, m, n, s, x, y, z; + z = this; + m = x.$length; + n = y.$length; + s = x; + if (m < n) { + _tmp = m; + _tmp$1 = n; + n = _tmp; + m = _tmp$1; + s = y; + } + z = z.make(m); + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) ^ ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + $copySlice($subslice(z, n, m), $subslice(s, n, m)); + return z.norm(); + }; + $ptrType(nat).prototype.xor = function(x, y) { return this.$get().xor(x, y); }; + greaterThan = function(x1, x2, y1, y2) { + var x1, x2, y1, y2; + return x1 > y1 || (x1 === y1) && x2 > y2; + }; + nat.prototype.modW = function(d) { + var d, q, r, x; + r = 0; + x = this; + q = nat.nil; + q = q.make(x.$length); + r = divWVW($subslice(new sliceType$2(q.$array), q.$offset, q.$offset + q.$length), 0, $subslice(new sliceType$2(x.$array), x.$offset, x.$offset + x.$length), d); + return r; + }; + $ptrType(nat).prototype.modW = function(d) { return this.$get().modW(d); }; + nat.prototype.random = function(rand$1, limit, n) { + var _1, _i, _i$1, _index, _r$3, _r$4, _r$5, _ref, _ref$1, bitLengthOfMSW, i, i$1, limit, mask, n, rand$1, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _i$1 = $f._i$1; _index = $f._index; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _ref$1 = $f._ref$1; bitLengthOfMSW = $f.bitLengthOfMSW; i = $f.i; i$1 = $f.i$1; limit = $f.limit; mask = $f.mask; n = $f.n; rand$1 = $f.rand$1; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (alias(z, limit)) { + z = nat.nil; + } + z = z.make(limit.$length); + bitLengthOfMSW = (((_r$3 = n % 32, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) >>> 0)); + if (bitLengthOfMSW === 0) { + bitLengthOfMSW = 32; + } + mask = (((((y = bitLengthOfMSW, y < 32 ? (1 << y) : 0) >>> 0)) - 1 >>> 0)); + /* while (true) { */ case 1: + _1 = 32; + /* */ if (_1 === (32)) { $s = 4; continue; } + /* */ if (_1 === (64)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_1 === (32)) { */ case 4: + _ref = z; + _i = 0; + /* while (true) { */ case 8: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } + i = _i; + _r$4 = rand$1.Uint32(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((_r$4 >>> 0))); + _i++; + /* } */ $s = 8; continue; case 9: + $s = 7; continue; + /* } else if (_1 === (64)) { */ case 5: + _ref$1 = z; + _i$1 = 0; + /* while (true) { */ case 11: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 12; continue; } + i$1 = _i$1; + _r$5 = rand$1.Uint32(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = ((((_r$5 >>> 0)) | 0) >>> 0)); + _i$1++; + /* } */ $s = 11; continue; case 12: + $s = 7; continue; + /* } else { */ case 6: + $panic(new $String("unknown word size")); + /* } */ case 7: + case 3: + _index = limit.$length - 1 >> 0; + ((_index < 0 || _index >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + _index] = ((((_index < 0 || _index >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + _index]) & (mask)) >>> 0)); + if (z.cmp(limit) < 0) { + /* break; */ $s = 2; continue; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return z.norm(); + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.random }; } $f._1 = _1; $f._i = _i; $f._i$1 = _i$1; $f._index = _index; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._ref$1 = _ref$1; $f.bitLengthOfMSW = bitLengthOfMSW; $f.i = i; $f.i$1 = i$1; $f.limit = limit; $f.mask = mask; $f.n = n; $f.rand$1 = rand$1; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.random = function(rand$1, limit, n) { return this.$get().random(rand$1, limit, n); }; + nat.prototype.expNN = function(x, y, m) { + var _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, i, j, j$1, m, q, r, shift, v, w, x, x$1, y, y$1, y$2, y$3, z, zz, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; i = $f.i; j = $f.j; j$1 = $f.j$1; m = $f.m; q = $f.q; r = $f.r; shift = $f.shift; v = $f.v; w = $f.w; x = $f.x; x$1 = $f.x$1; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; y$3 = $f.y$3; z = $f.z; zz = $f.zz; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (alias(z, x) || alias(z, y)) { + z = nat.nil; + } + if ((m.$length === 1) && ((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) === 1)) { + $s = -1; return z.setWord(0); + } + if (y.$length === 0) { + $s = -1; return z.setWord(1); + } + /* */ if ((y.$length === 1) && ((0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]) === 1) && !((m.$length === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((y.$length === 1) && ((0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]) === 1) && !((m.$length === 0))) { */ case 1: + _r$3 = (nat.nil).div(z, x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z = _tuple[1]; + $s = -1; return z; + /* } */ case 2: + if (!((m.$length === 0))) { + z = z.make(m.$length); + } + z = z.set(x); + /* */ if (x.cmp(natOne) > 0 && y.$length > 1 && m.$length > 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (x.cmp(natOne) > 0 && y.$length > 1 && m.$length > 0) { */ case 4: + /* */ if ((((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) & 1) >>> 0) === 1) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ((((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) & 1) >>> 0) === 1) { */ case 6: + _r$4 = z.expNNMontgomery(x, y, m); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 7: + _r$5 = z.expNNWindowed(x, y, m); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* } */ case 5: + v = (x$1 = y.$length - 1 >> 0, ((x$1 < 0 || x$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + x$1])); + shift = nlz(v) + 1 >>> 0; + v = (y$1 = (shift), y$1 < 32 ? (v << y$1) : 0) >>> 0; + q = nat.nil; + w = 32 - ((shift >> 0)) >> 0; + _tmp = nat.nil; + _tmp$1 = nat.nil; + zz = _tmp; + r = _tmp$1; + j = 0; + /* while (true) { */ case 10: + /* if (!(j < w)) { break; } */ if(!(j < w)) { $s = 11; continue; } + zz = zz.sqr(z); + _tmp$2 = z; + _tmp$3 = zz; + zz = _tmp$2; + z = _tmp$3; + if (!((((v & 2147483648) >>> 0) === 0))) { + zz = zz.mul(z, x); + _tmp$4 = z; + _tmp$5 = zz; + zz = _tmp$4; + z = _tmp$5; + } + /* */ if (!((m.$length === 0))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!((m.$length === 0))) { */ case 12: + _r$6 = zz.div(r, z, m); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + zz = _tuple$1[0]; + r = _tuple$1[1]; + _tmp$6 = q; + _tmp$7 = z; + _tmp$8 = zz; + _tmp$9 = r; + zz = _tmp$6; + r = _tmp$7; + q = _tmp$8; + z = _tmp$9; + /* } */ case 13: + v = (y$2 = (1), y$2 < 32 ? (v << y$2) : 0) >>> 0; + j = j + (1) >> 0; + /* } */ $s = 10; continue; case 11: + i = y.$length - 2 >> 0; + /* while (true) { */ case 15: + /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 16; continue; } + v = ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]); + j$1 = 0; + /* while (true) { */ case 17: + /* if (!(j$1 < 32)) { break; } */ if(!(j$1 < 32)) { $s = 18; continue; } + zz = zz.sqr(z); + _tmp$10 = z; + _tmp$11 = zz; + zz = _tmp$10; + z = _tmp$11; + if (!((((v & 2147483648) >>> 0) === 0))) { + zz = zz.mul(z, x); + _tmp$12 = z; + _tmp$13 = zz; + zz = _tmp$12; + z = _tmp$13; + } + /* */ if (!((m.$length === 0))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!((m.$length === 0))) { */ case 19: + _r$7 = zz.div(r, z, m); /* */ $s = 21; case 21: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$2 = _r$7; + zz = _tuple$2[0]; + r = _tuple$2[1]; + _tmp$14 = q; + _tmp$15 = z; + _tmp$16 = zz; + _tmp$17 = r; + zz = _tmp$14; + r = _tmp$15; + q = _tmp$16; + z = _tmp$17; + /* } */ case 20: + v = (y$3 = (1), y$3 < 32 ? (v << y$3) : 0) >>> 0; + j$1 = j$1 + (1) >> 0; + /* } */ $s = 17; continue; case 18: + i = i - (1) >> 0; + /* } */ $s = 15; continue; case 16: + $s = -1; return z.norm(); + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.expNN }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.i = i; $f.j = j; $f.j$1 = j$1; $f.m = m; $f.q = q; $f.r = r; $f.shift = shift; $f.v = v; $f.w = w; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.y$3 = y$3; $f.z = z; $f.zz = zz; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.expNN = function(x, y, m) { return this.$get().expNN(x, y, m); }; + nat.prototype.expNNWindowed = function(x, y, m) { + var _q, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, i, i$1, j, m, p, p1, p2, powers, r, x, x$1, y, y$1, yi, z, zz, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; i = $f.i; i$1 = $f.i$1; j = $f.j; m = $f.m; p = $f.p; p1 = $f.p1; p2 = $f.p2; powers = $f.powers; r = $f.r; x = $f.x; x$1 = $f.x$1; y = $f.y; y$1 = $f.y$1; yi = $f.yi; z = $f.z; zz = $f.zz; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _tmp = nat.nil; + _tmp$1 = nat.nil; + zz = _tmp; + r = _tmp$1; + powers = arrayType$1.zero(); + powers[0] = natOne; + powers[1] = x; + i = 2; + /* while (true) { */ case 1: + /* if (!(i < 16)) { break; } */ if(!(i < 16)) { $s = 2; continue; } + _tmp$2 = $indexPtr(powers, (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ptrType$4); + _tmp$3 = $indexPtr(powers, i, ptrType$4); + _tmp$4 = $indexPtr(powers, (i + 1 >> 0), ptrType$4); + p2 = _tmp$2; + p = _tmp$3; + p1 = _tmp$4; + p.$set(p.sqr(p2.$get())); + _r$3 = zz.div(r, p.$get(), m); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + zz = _tuple[0]; + r = _tuple[1]; + _tmp$5 = r; + _tmp$6 = p.$get(); + p.$set(_tmp$5); + r = _tmp$6; + p1.$set(p1.mul(p.$get(), x)); + _r$4 = zz.div(r, p1.$get(), m); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + zz = _tuple$1[0]; + r = _tuple$1[1]; + _tmp$7 = r; + _tmp$8 = p1.$get(); + p1.$set(_tmp$7); + r = _tmp$8; + i = i + (2) >> 0; + /* } */ $s = 1; continue; case 2: + z = z.setWord(1); + i$1 = y.$length - 1 >> 0; + /* while (true) { */ case 5: + /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 6; continue; } + yi = ((i$1 < 0 || i$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$1]); + j = 0; + /* while (true) { */ case 7: + /* if (!(j < 32)) { break; } */ if(!(j < 32)) { $s = 8; continue; } + /* */ if (!((i$1 === (y.$length - 1 >> 0))) || !((j === 0))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!((i$1 === (y.$length - 1 >> 0))) || !((j === 0))) { */ case 9: + zz = zz.sqr(z); + _tmp$9 = z; + _tmp$10 = zz; + zz = _tmp$9; + z = _tmp$10; + _r$5 = zz.div(r, z, m); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + zz = _tuple$2[0]; + r = _tuple$2[1]; + _tmp$11 = r; + _tmp$12 = z; + z = _tmp$11; + r = _tmp$12; + zz = zz.sqr(z); + _tmp$13 = z; + _tmp$14 = zz; + zz = _tmp$13; + z = _tmp$14; + _r$6 = zz.div(r, z, m); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$3 = _r$6; + zz = _tuple$3[0]; + r = _tuple$3[1]; + _tmp$15 = r; + _tmp$16 = z; + z = _tmp$15; + r = _tmp$16; + zz = zz.sqr(z); + _tmp$17 = z; + _tmp$18 = zz; + zz = _tmp$17; + z = _tmp$18; + _r$7 = zz.div(r, z, m); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$4 = _r$7; + zz = _tuple$4[0]; + r = _tuple$4[1]; + _tmp$19 = r; + _tmp$20 = z; + z = _tmp$19; + r = _tmp$20; + zz = zz.sqr(z); + _tmp$21 = z; + _tmp$22 = zz; + zz = _tmp$21; + z = _tmp$22; + _r$8 = zz.div(r, z, m); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$5 = _r$8; + zz = _tuple$5[0]; + r = _tuple$5[1]; + _tmp$23 = r; + _tmp$24 = z; + z = _tmp$23; + r = _tmp$24; + /* } */ case 10: + zz = zz.mul(z, (x$1 = yi >>> 28 >>> 0, ((x$1 < 0 || x$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$1]))); + _tmp$25 = z; + _tmp$26 = zz; + zz = _tmp$25; + z = _tmp$26; + _r$9 = zz.div(r, z, m); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$6 = _r$9; + zz = _tuple$6[0]; + r = _tuple$6[1]; + _tmp$27 = r; + _tmp$28 = z; + z = _tmp$27; + r = _tmp$28; + yi = (y$1 = (4), y$1 < 32 ? (yi << y$1) : 0) >>> 0; + j = j + (4) >> 0; + /* } */ $s = 7; continue; case 8: + i$1 = i$1 - (1) >> 0; + /* } */ $s = 5; continue; case 6: + $s = -1; return z.norm(); + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.expNNWindowed }; } $f._q = _q; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.i = i; $f.i$1 = i$1; $f.j = j; $f.m = m; $f.p = p; $f.p1 = p1; $f.p2 = p2; $f.powers = powers; $f.r = r; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.y$1 = y$1; $f.yi = yi; $f.z = z; $f.zz = zz; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.expNNWindowed = function(x, y, m) { return this.$get().expNNWindowed(x, y, m); }; + nat.prototype.expNNMontgomery = function(x, y, m) { + var RR, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, i, i$1, i$2, j, k0, m, numWords, one, powers, rr, t, x, x$1, x$2, y, y$1, y$2, yi, z, zz, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; RR = $f.RR; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; i = $f.i; i$1 = $f.i$1; i$2 = $f.i$2; j = $f.j; k0 = $f.k0; m = $f.m; numWords = $f.numWords; one = $f.one; powers = $f.powers; rr = $f.rr; t = $f.t; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; yi = $f.yi; z = $f.z; zz = $f.zz; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + numWords = m.$length; + /* */ if (x.$length > numWords) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (x.$length > numWords) { */ case 1: + _r$3 = (nat.nil).div(nat.nil, x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + x = _tuple[1]; + /* } */ case 2: + if (x.$length < numWords) { + rr = $makeSlice(nat, numWords); + $copySlice(rr, x); + x = rr; + } + k0 = 2 - (0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) >>> 0; + t = (0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) - 1 >>> 0; + i = 1; + while (true) { + if (!(i < 32)) { break; } + t = $imul(t, (t)) >>> 0; + k0 = $imul(k0, (((t + 1 >>> 0)))) >>> 0; + i = (y$1 = (1), y$1 < 32 ? (i << y$1) : 0) >> 0; + } + k0 = -k0 >>> 0; + RR = (nat.nil).setWord(1); + zz = (nat.nil).shl(RR, ((($imul(($imul(2, numWords)), 32)) >>> 0))); + _r$4 = (nat.nil).div(RR, zz, m); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + RR = _tuple$1[1]; + if (RR.$length < numWords) { + zz = zz.make(numWords); + $copySlice(zz, RR); + RR = zz; + } + one = $makeSlice(nat, numWords); + (0 >= one.$length ? ($throwRuntimeError("index out of range"), undefined) : one.$array[one.$offset + 0] = 1); + powers = arrayType$1.zero(); + powers[0] = powers[0].montgomery(one, RR, m, k0, numWords); + powers[1] = powers[1].montgomery(x, RR, m, k0, numWords); + i$1 = 2; + while (true) { + if (!(i$1 < 16)) { break; } + ((i$1 < 0 || i$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[i$1] = ((i$1 < 0 || i$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[i$1]).montgomery((x$1 = i$1 - 1 >> 0, ((x$1 < 0 || x$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$1])), powers[1], m, k0, numWords)); + i$1 = i$1 + (1) >> 0; + } + z = z.make(numWords); + $copySlice(z, powers[0]); + zz = zz.make(numWords); + i$2 = y.$length - 1 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + yi = ((i$2 < 0 || i$2 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$2]); + j = 0; + while (true) { + if (!(j < 32)) { break; } + if (!((i$2 === (y.$length - 1 >> 0))) || !((j === 0))) { + zz = zz.montgomery(z, z, m, k0, numWords); + z = z.montgomery(zz, zz, m, k0, numWords); + zz = zz.montgomery(z, z, m, k0, numWords); + z = z.montgomery(zz, zz, m, k0, numWords); + } + zz = zz.montgomery(z, (x$2 = yi >>> 28 >>> 0, ((x$2 < 0 || x$2 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$2])), m, k0, numWords); + _tmp = zz; + _tmp$1 = z; + z = _tmp; + zz = _tmp$1; + yi = (y$2 = (4), y$2 < 32 ? (yi << y$2) : 0) >>> 0; + j = j + (4) >> 0; + } + i$2 = i$2 - (1) >> 0; + } + zz = zz.montgomery(z, one, m, k0, numWords); + /* */ if (zz.cmp(m) >= 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (zz.cmp(m) >= 0) { */ case 5: + zz = zz.sub(zz, m); + /* */ if (zz.cmp(m) >= 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (zz.cmp(m) >= 0) { */ case 7: + _r$5 = (nat.nil).div(nat.nil, zz, m); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + zz = _tuple$2[1]; + /* } */ case 8: + /* } */ case 6: + $s = -1; return zz.norm(); + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.expNNMontgomery }; } $f.RR = RR; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.i = i; $f.i$1 = i$1; $f.i$2 = i$2; $f.j = j; $f.k0 = k0; $f.m = m; $f.numWords = numWords; $f.one = one; $f.powers = powers; $f.rr = rr; $f.t = t; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.yi = yi; $f.z = z; $f.zz = zz; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.expNNMontgomery = function(x, y, m) { return this.$get().expNNMontgomery(x, y, m); }; + nat.prototype.bytes = function(buf) { + var _i, _ref, buf, d, i, j, y, z; + i = 0; + z = this; + i = buf.$length; + _ref = z; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + j = 0; + while (true) { + if (!(j < 4)) { break; } + i = i - (1) >> 0; + ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = ((d << 24 >>> 24))); + d = (y = (8), y < 32 ? (d >>> y) : 0) >>> 0; + j = j + (1) >> 0; + } + _i++; + } + while (true) { + if (!(i < buf.$length && (((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i]) === 0))) { break; } + i = i + (1) >> 0; + } + return i; + }; + $ptrType(nat).prototype.bytes = function(buf) { return this.$get().bytes(buf); }; + bigEndianWord = function(buf) { + var buf; + if (false) { + return (($clone(binary.BigEndian, binary.bigEndian).Uint64(buf).$low >>> 0)); + } + return (($clone(binary.BigEndian, binary.bigEndian).Uint32(buf) >>> 0)); + }; + nat.prototype.setBytes = function(buf) { + var _q, buf, d, i, k, s, x, x$1, y, z; + z = this; + z = z.make((_q = (((buf.$length + 4 >> 0) - 1 >> 0)) / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + i = buf.$length; + k = 0; + while (true) { + if (!(i >= 4)) { break; } + ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k] = bigEndianWord($subslice(buf, (i - 4 >> 0), i))); + i = i - (4) >> 0; + k = k + (1) >> 0; + } + if (i > 0) { + d = 0; + s = 0; + while (true) { + if (!(i > 0)) { break; } + d = (d | (((y = s, y < 32 ? ((((x = i - 1 >> 0, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])) >>> 0)) << y) : 0) >>> 0))) >>> 0; + i = i - (1) >> 0; + s = s + (8) >>> 0; + } + (x$1 = z.$length - 1 >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = d)); + } + return z.norm(); + }; + $ptrType(nat).prototype.setBytes = function(buf) { return this.$get().setBytes(buf); }; + nat.prototype.sqrt = function(x) { + var _q, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, x, z, z1, z2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; n = $f.n; x = $f.x; z = $f.z; z1 = $f.z1; z2 = $f.z2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (x.cmp(natOne) <= 0) { + $s = -1; return z.set(x); + } + if (alias(z, x)) { + z = nat.nil; + } + _tmp = nat.nil; + _tmp$1 = nat.nil; + z1 = _tmp; + z2 = _tmp$1; + z1 = z; + z1 = z1.setUint64(new $Uint64(0, 1)); + z1 = z1.shl(z1, ((((_q = x.bitLen() / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0) >>> 0))); + n = 0; + /* while (true) { */ case 1: + _r$3 = z2.div(nat.nil, x, z1); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + z2 = _tuple[0]; + z2 = z2.add(z2, z1); + z2 = z2.shr(z2, 1); + if (z2.cmp(z1) >= 0) { + if ((n & 1) === 0) { + $s = -1; return z1; + } + $s = -1; return z.set(z1); + } + _tmp$2 = z2; + _tmp$3 = z1; + z1 = _tmp$2; + z2 = _tmp$3; + n = n + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return nat.nil; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.sqrt }; } $f._q = _q; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.n = n; $f.x = x; $f.z = z; $f.z1 = z1; $f.z2 = z2; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.sqrt = function(x) { return this.$get().sqrt(x); }; + maxPow = function(b) { + var _q, _tmp, _tmp$1, b, max$1, n, p; + p = 0; + n = 0; + _tmp = b; + _tmp$1 = 1; + p = _tmp; + n = _tmp$1; + max$1 = (_q = 4294967295 / b, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(p <= max$1)) { break; } + p = $imul(p, (b)) >>> 0; + n = n + (1) >> 0; + } + return [p, n]; + }; + pow = function(x, n) { + var n, p, x; + p = 0; + p = 1; + while (true) { + if (!(n > 0)) { break; } + if (!(((n & 1) === 0))) { + p = $imul(p, (x)) >>> 0; + } + x = $imul(x, (x)) >>> 0; + n = (n >> $min((1), 31)) >> 0; + } + return p; + }; + nat.prototype.scan = function(r, base, fracOk) { + var _1, _2, _3, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, b1, base, baseOk, bn, ch, count, d1, di, dp, err, fracOk, i, n, r, res, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _3 = $f._3; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; b = $f.b; b1 = $f.b1; base = $f.base; baseOk = $f.baseOk; bn = $f.bn; ch = $f.ch; count = $f.count; d1 = $f.d1; di = $f.di; dp = $f.dp; err = $f.err; fracOk = $f.fracOk; i = $f.i; n = $f.n; r = $f.r; res = $f.res; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + res = nat.nil; + b = 0; + count = 0; + err = $ifaceNil; + z = this; + baseOk = (base === 0) || !fracOk && 2 <= base && base <= 62 || fracOk && ((base === 2) || (base === 10) || (base === 16)); + /* */ if (!baseOk) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!baseOk) { */ case 1: + _r$3 = fmt.Sprintf("illegal number base %d", new sliceType([new $Int(base)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String(_r$3)); + /* } */ case 2: + _r$4 = r.ReadByte(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + ch = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [res, b, count, err]; + } + b = base; + /* */ if (base === 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (base === 0) { */ case 5: + b = 10; + /* */ if (ch === 48) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (ch === 48) { */ case 7: + count = 1; + _r$5 = r.ReadByte(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + ch = _tuple$1[0]; + err = _tuple$1[1]; + _1 = err; + /* */ if ($interfaceIsEqual(_1, $ifaceNil)) { $s = 11; continue; } + /* */ if ($interfaceIsEqual(_1, (io.EOF))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ($interfaceIsEqual(_1, $ifaceNil)) { */ case 11: + if (!fracOk) { + b = 8; + } + _2 = ch; + if ((_2 === (120)) || (_2 === (88))) { + b = 16; + } else if ((_2 === (98)) || (_2 === (66))) { + b = 2; + } + _3 = b; + /* */ if ((_3 === (16)) || (_3 === (2))) { $s = 16; continue; } + /* */ if (_3 === (8)) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if ((_3 === (16)) || (_3 === (2))) { */ case 16: + count = 0; + _r$6 = r.ReadByte(); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + ch = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [res, b, count, err]; + } + $s = 18; continue; + /* } else if (_3 === (8)) { */ case 17: + count = 0; + /* } */ case 18: + case 15: + $s = 14; continue; + /* } else if ($interfaceIsEqual(_1, (io.EOF))) { */ case 12: + res = $subslice(z, 0, 0); + err = $ifaceNil; + $s = -1; return [res, b, count, err]; + /* } else { */ case 13: + $s = -1; return [res, b, count, err]; + /* } */ case 14: + case 9: + /* } */ case 8: + /* } */ case 6: + z = $subslice(z, 0, 0); + b1 = ((b >>> 0)); + _tuple$3 = maxPow(b1); + bn = _tuple$3[0]; + n = _tuple$3[1]; + di = 0; + i = 0; + dp = -1; + /* while (true) { */ case 20: + /* */ if (fracOk && (ch === 46)) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (fracOk && (ch === 46)) { */ case 22: + fracOk = false; + dp = count; + _r$7 = r.ReadByte(); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$4 = _r$7; + ch = _tuple$4[0]; + err = _tuple$4[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = $ifaceNil; + /* break; */ $s = 21; continue; + } + $s = -1; return [res, b, count, err]; + } + /* } */ case 23: + d1 = 0; + if (48 <= ch && ch <= 57) { + d1 = (((ch - 48 << 24 >>> 24) >>> 0)); + } else if (97 <= ch && ch <= 122) { + d1 = ((((ch - 97 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)); + } else if (65 <= ch && ch <= 90) { + if (b <= 36) { + d1 = ((((ch - 65 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)); + } else { + d1 = ((((ch - 65 << 24 >>> 24) + 36 << 24 >>> 24) >>> 0)); + } + } else { + d1 = 63; + } + /* */ if (d1 >= b1) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (d1 >= b1) { */ case 25: + _r$8 = r.UnreadByte(); /* */ $s = 27; case 27: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + /* break; */ $s = 21; continue; + /* } */ case 26: + count = count + (1) >> 0; + di = ($imul(di, b1) >>> 0) + d1 >>> 0; + i = i + (1) >> 0; + if (i === n) { + z = z.mulAddWW(z, bn, di); + di = 0; + i = 0; + } + _r$9 = r.ReadByte(); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$5 = _r$9; + ch = _tuple$5[0]; + err = _tuple$5[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = $ifaceNil; + /* break; */ $s = 21; continue; + } + $s = -1; return [res, b, count, err]; + } + /* } */ $s = 20; continue; case 21: + if (count === 0) { + if ((base === 0) && (b === 8)) { + count = 1; + b = 10; + } else if (!((base === 0)) || !((b === 8))) { + err = errors.New("syntax error scanning number"); + } + $s = -1; return [res, b, count, err]; + } + if (i > 0) { + z = z.mulAddWW(z, pow(b1, i), di); + } + res = z.norm(); + if (dp >= 0) { + count = dp - count >> 0; + } + $s = -1; return [res, b, count, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.scan }; } $f._1 = _1; $f._2 = _2; $f._3 = _3; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.b = b; $f.b1 = b1; $f.base = base; $f.baseOk = baseOk; $f.bn = bn; $f.ch = ch; $f.count = count; $f.d1 = d1; $f.di = di; $f.dp = dp; $f.err = err; $f.fracOk = fracOk; $f.i = i; $f.n = n; $f.r = r; $f.res = res; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.scan = function(r, base, fracOk) { return this.$get().scan(r, base, fracOk); }; + nat.prototype.utoa = function(base) { + var _r$3, base, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; base = $f.base; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = x.itoa(false, base); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.utoa }; } $f._r$3 = _r$3; $f.base = base; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.utoa = function(base) { return this.$get().utoa(base); }; + nat.prototype.itoa = function(neg, base) { + var _r$3, _tuple, b, base, bb, i, k, mask, nbits, ndigits, neg, q, s, shift, table, w, x, y, y$1, y$2, y$3, y$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; b = $f.b; base = $f.base; bb = $f.bb; i = $f.i; k = $f.k; mask = $f.mask; nbits = $f.nbits; ndigits = $f.ndigits; neg = $f.neg; q = $f.q; s = $f.s; shift = $f.shift; table = $f.table; w = $f.w; x = $f.x; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; y$3 = $f.y$3; y$4 = $f.y$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (base < 2 || base > 62) { + $panic(new $String("invalid base")); + } + if (x.$length === 0) { + $s = -1; return (new sliceType$1($stringToBytes("0"))); + } + i = (((x.bitLen()) / math.Log2((base)) >> 0)) + 1 >> 0; + if (neg) { + i = i + (1) >> 0; + } + s = $makeSlice(sliceType$1, i); + b = ((base >>> 0)); + /* */ if (b === ((b & (-b >>> 0)) >>> 0)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (b === ((b & (-b >>> 0)) >>> 0)) { */ case 1: + shift = ((bits.TrailingZeros(((b >>> 0))) >>> 0)); + mask = ((((y = shift, y < 32 ? (1 << y) : 0) >>> 0) - 1 >>> 0)); + w = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]); + nbits = 32; + k = 1; + while (true) { + if (!(k < x.$length)) { break; } + while (true) { + if (!(nbits >= shift)) { break; } + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); + w = (y$1 = (shift), y$1 < 32 ? (w >>> y$1) : 0) >>> 0; + nbits = nbits - (shift) >>> 0; + } + if (nbits === 0) { + w = ((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]); + nbits = 32; + } else { + w = (w | (((y$2 = nbits, y$2 < 32 ? (((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]) << y$2) : 0) >>> 0))) >>> 0; + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); + w = (y$3 = ((shift - nbits >>> 0)), y$3 < 32 ? (((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]) >>> y$3) : 0) >>> 0; + nbits = 32 - ((shift - nbits >>> 0)) >>> 0; + } + k = k + (1) >> 0; + } + while (true) { + if (!(!((w === 0)))) { break; } + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); + w = (y$4 = (shift), y$4 < 32 ? (w >>> y$4) : 0) >>> 0; + } + $s = 3; continue; + /* } else { */ case 2: + _tuple = maxPow(b); + bb = _tuple[0]; + ndigits = _tuple[1]; + _r$3 = divisors(x.$length, b, ndigits, bb); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + table = _r$3; + q = (nat.nil).set(x); + $r = q.convertWords(s, b, ndigits, bb, table); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = 0; + while (true) { + if (!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 48)) { break; } + i = i + (1) >> 0; + } + /* } */ case 3: + if (neg) { + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = 45); + } + $s = -1; return $subslice(s, i); + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.itoa }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.b = b; $f.base = base; $f.bb = bb; $f.i = i; $f.k = k; $f.mask = mask; $f.nbits = nbits; $f.ndigits = ndigits; $f.neg = neg; $f.q = q; $f.s = s; $f.shift = shift; $f.table = table; $f.w = w; $f.x = x; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.y$3 = y$3; $f.y$4 = y$4; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.itoa = function(neg, base) { return this.$get().itoa(neg, base); }; + nat.prototype.convertWords = function(s, b, ndigits, bb, table) { + var _q, _q$1, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, b, bb, h, i, index, j, j$1, maxLength, minLength, ndigits, q, r, r$1, s, t, table, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; bb = $f.bb; h = $f.h; i = $f.i; index = $f.index; j = $f.j; j$1 = $f.j$1; maxLength = $f.maxLength; minLength = $f.minLength; ndigits = $f.ndigits; q = $f.q; r = $f.r; r$1 = $f.r$1; s = $f.s; t = $f.t; table = $f.table; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + q = this; + /* */ if (!(table === sliceType$3.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(table === sliceType$3.nil)) { */ case 1: + r = nat.nil; + index = table.$length - 1 >> 0; + /* while (true) { */ case 3: + /* if (!(q.$length > leafSize)) { break; } */ if(!(q.$length > leafSize)) { $s = 4; continue; } + maxLength = q.bitLen(); + minLength = maxLength >> 1 >> 0; + while (true) { + if (!(index > 0 && (x = index - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).nbits > minLength)) { break; } + index = index - (1) >> 0; + } + if (((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).nbits >= maxLength && ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).bbb.cmp(q) >= 0) { + index = index - (1) >> 0; + if (index < 0) { + $panic(new $String("internal inconsistency")); + } + } + _r$3 = q.div(r, q, ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).bbb); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + q = _tuple[0]; + r = _tuple[1]; + h = s.$length - ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).ndigits >> 0; + $r = r.convertWords($subslice(s, h), b, ndigits, bb, $subslice(table, 0, index)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + s = $subslice(s, 0, h); + /* } */ $s = 3; continue; case 4: + /* } */ case 2: + i = s.$length; + r$1 = 0; + if (b === 10) { + while (true) { + if (!(q.$length > 0)) { break; } + _tuple$1 = q.divW(q, bb); + q = _tuple$1[0]; + r$1 = _tuple$1[1]; + j = 0; + while (true) { + if (!(j < ndigits && i > 0)) { break; } + i = i - (1) >> 0; + t = (_q = r$1 / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = (48 + (((r$1 - ($imul(t, 10) >>> 0) >>> 0) << 24 >>> 24)) << 24 >>> 24)); + r$1 = t; + j = j + (1) >> 0; + } + } + } else { + while (true) { + if (!(q.$length > 0)) { break; } + _tuple$2 = q.divW(q, bb); + q = _tuple$2[0]; + r$1 = _tuple$2[1]; + j$1 = 0; + while (true) { + if (!(j$1 < ndigits && i > 0)) { break; } + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt((_r$4 = r$1 % b, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")))); + r$1 = (_q$1 = r$1 / (b), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + j$1 = j$1 + (1) >> 0; + } + } + } + while (true) { + if (!(i > 0)) { break; } + i = i - (1) >> 0; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = 48); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.convertWords }; } $f._q = _q; $f._q$1 = _q$1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.bb = bb; $f.h = h; $f.i = i; $f.index = index; $f.j = j; $f.j$1 = j$1; $f.maxLength = maxLength; $f.minLength = minLength; $f.ndigits = ndigits; $f.q = q; $f.r = r; $f.r$1 = r$1; $f.s = s; $f.t = t; $f.table = table; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.convertWords = function(s, b, ndigits, bb, table) { return this.$get().convertWords(s, b, ndigits, bb, table); }; + nat.prototype.expWW = function(x, y) { + var _r$3, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.expNN((nat.nil).setWord(x), (nat.nil).setWord(y), nat.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.expWW }; } $f._r$3 = _r$3; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.expWW = function(x, y) { return this.$get().expWW(x, y); }; + divisors = function(m, b, ndigits, bb) { + var _r$3, b, bb, i, k, larger, m, ndigits, table, words, x, x$1, x$2, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; b = $f.b; bb = $f.bb; i = $f.i; k = $f.k; larger = $f.larger; m = $f.m; ndigits = $f.ndigits; table = $f.table; words = $f.words; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ((leafSize === 0) || m <= leafSize) { + $s = -1; return sliceType$3.nil; + } + k = 1; + words = leafSize; + while (true) { + if (!(words < (m >> 1 >> 0) && k < 64)) { break; } + k = k + (1) >> 0; + words = (y = (1), y < 32 ? (words << y) : 0) >> 0; + } + table = sliceType$3.nil; + if (b === 10) { + cacheBase10.Mutex.Lock(); + table = $subslice(new sliceType$3(cacheBase10.table), 0, k); + } else { + table = $makeSlice(sliceType$3, k); + } + /* */ if ((x = k - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).ndigits === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = k - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).ndigits === 0) { */ case 1: + larger = nat.nil; + i = 0; + /* while (true) { */ case 3: + /* if (!(i < k)) { break; } */ if(!(i < k)) { $s = 4; continue; } + /* */ if (((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits === 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits === 0) { */ case 5: + /* */ if (i === 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (i === 0) { */ case 7: + _r$3 = (nat.nil).expWW(bb, ((leafSize >>> 0))); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + (0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]).bbb = _r$3; + (0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]).ndigits = $imul(ndigits, leafSize); + $s = 9; continue; + /* } else { */ case 8: + ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb = (nat.nil).sqr((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x$1])).bbb); + ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits = $imul(2, (x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x$2])).ndigits); + /* } */ case 9: + larger = (nat.nil).set(((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb); + while (true) { + if (!(mulAddVWW($subslice(new sliceType$2(larger.$array), larger.$offset, larger.$offset + larger.$length), $subslice(new sliceType$2(larger.$array), larger.$offset, larger.$offset + larger.$length), b, 0) === 0)) { break; } + ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb.set(larger); + ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits + (1) >> 0; + } + ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).nbits = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb.bitLen(); + /* } */ case 6: + i = i + (1) >> 0; + /* } */ $s = 3; continue; case 4: + /* } */ case 2: + if (b === 10) { + cacheBase10.Mutex.Unlock(); + } + $s = -1; return table; + /* */ } return; } if ($f === undefined) { $f = { $blk: divisors }; } $f._r$3 = _r$3; $f.b = b; $f.bb = bb; $f.i = i; $f.k = k; $f.larger = larger; $f.m = m; $f.ndigits = ndigits; $f.table = table; $f.words = words; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.ptr.prototype.ProbablyPrime = function(n) { + var _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, n, r, rA, rB, w, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _v = $f._v; n = $f.n; r = $f.r; rA = $f.rA; rB = $f.rB; w = $f.w; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (n < 0) { + $panic(new $String("negative n for ProbablyPrime")); + } + if (x.neg || (x.abs.$length === 0)) { + $s = -1; return false; + } + w = (x$1 = x.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); + if ((x.abs.$length === 1) && w < 64) { + $s = -1; return !((x$2 = (x$3 = $shiftLeft64(new $Uint64(0, 1), w), new $Uint64(673221152 & x$3.$high, (2693408940 & x$3.$low) >>> 0)), (x$2.$high === 0 && x$2.$low === 0))); + } + if (((w & 1) >>> 0) === 0) { + $s = -1; return false; + } + _tmp = 0; + _tmp$1 = 0; + rA = _tmp; + rB = _tmp$1; + _1 = 32; + if (_1 === (32)) { + rA = ((x.abs.modW(4127218095) >>> 0)); + rB = ((x.abs.modW(3948078067) >>> 0)); + } else if (_1 === (64)) { + r = x.abs.modW(820596253); + rA = (((_r$3 = r % 4127218095, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) >>> 0)); + rB = (((_r$4 = r % 3948078067, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >>> 0)); + } else { + $panic(new $String("math/big: invalid word size")); + } + if (((_r$5 = rA % 3, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$6 = rA % 5, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$7 = rA % 7, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$8 = rA % 11, _r$8 === _r$8 ? _r$8 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$9 = rA % 13, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$10 = rA % 17, _r$10 === _r$10 ? _r$10 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$11 = rA % 19, _r$11 === _r$11 ? _r$11 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$12 = rA % 23, _r$12 === _r$12 ? _r$12 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$13 = rA % 37, _r$13 === _r$13 ? _r$13 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$14 = rB % 29, _r$14 === _r$14 ? _r$14 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$15 = rB % 31, _r$15 === _r$15 ? _r$15 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$16 = rB % 41, _r$16 === _r$16 ? _r$16 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$17 = rB % 43, _r$17 === _r$17 ? _r$17 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$18 = rB % 47, _r$18 === _r$18 ? _r$18 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$19 = rB % 53, _r$19 === _r$19 ? _r$19 : $throwRuntimeError("integer divide by zero")) === 0)) { + $s = -1; return false; + } + _r$20 = x.abs.probablyPrimeMillerRabin(n + 1 >> 0, true); /* */ $s = 2; case 2: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + if (!(_r$20)) { _v = false; $s = 1; continue s; } + _r$21 = x.abs.probablyPrimeLucas(); /* */ $s = 3; case 3: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _v = _r$21; case 1: + $s = -1; return _v; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int.ptr.prototype.ProbablyPrime }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._v = _v; $f.n = n; $f.r = r; $f.rA = rA; $f.rB = rB; $f.w = w; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + Int.prototype.ProbablyPrime = function(n) { return this.$val.ProbablyPrime(n); }; + nat.prototype.probablyPrimeMillerRabin = function(reps, force2) { + var _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$2, _tuple, force2, i, j, k, n, nm1, nm3, nm3Len, q, quotient, rand$1, reps, x, x$1, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; force2 = $f.force2; i = $f.i; j = $f.j; k = $f.k; n = $f.n; nm1 = $f.nm1; nm3 = $f.nm3; nm3Len = $f.nm3Len; q = $f.q; quotient = $f.quotient; rand$1 = $f.rand$1; reps = $f.reps; x = $f.x; x$1 = $f.x$1; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = this; + nm1 = (nat.nil).sub(n, natOne); + k = nm1.trailingZeroBits(); + q = (nat.nil).shr(nm1, k); + nm3 = (nat.nil).sub(nm1, natTwo); + rand$1 = rand.New(rand.NewSource(((x = (0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]), new $Int64(0, x.constructor === Number ? x : 1))))); + _tmp = nat.nil; + _tmp$1 = nat.nil; + _tmp$2 = nat.nil; + x$1 = _tmp; + y = _tmp$1; + quotient = _tmp$2; + nm3Len = nm3.bitLen(); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < reps)) { break; } */ if(!(i < reps)) { $s = 2; continue; } + /* */ if ((i === (reps - 1 >> 0)) && force2) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ((i === (reps - 1 >> 0)) && force2) { */ case 3: + x$1 = x$1.set(natTwo); + $s = 5; continue; + /* } else { */ case 4: + _r$3 = x$1.random(rand$1, nm3, nm3Len); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + x$1 = _r$3; + x$1 = x$1.add(x$1, natTwo); + /* } */ case 5: + _r$4 = y.expNN(x$1, q, n); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + y = _r$4; + /* */ if ((y.cmp(natOne) === 0) || (y.cmp(nm1) === 0)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ((y.cmp(natOne) === 0) || (y.cmp(nm1) === 0)) { */ case 8: + i = i + (1) >> 0; + /* continue; */ $s = 1; continue; + /* } */ case 9: + j = 1; + /* while (true) { */ case 10: + /* if (!(j < k)) { break; } */ if(!(j < k)) { $s = 11; continue; } + y = y.sqr(y); + _r$5 = quotient.div(y, y, n); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple = _r$5; + quotient = _tuple[0]; + y = _tuple[1]; + if (y.cmp(nm1) === 0) { + i = i + (1) >> 0; + /* continue NextRandom; */ $s = 1; continue s; + } + if (y.cmp(natOne) === 0) { + $s = -1; return false; + } + j = j + (1) >>> 0; + /* } */ $s = 10; continue; case 11: + $s = -1; return false; + /* } */ $s = 1; continue; case 2: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.probablyPrimeMillerRabin }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.force2 = force2; $f.i = i; $f.j = j; $f.k = k; $f.n = n; $f.nm1 = nm1; $f.nm3 = nm3; $f.nm3Len = nm3Len; $f.q = q; $f.quotient = quotient; $f.rand$1 = rand$1; $f.reps = reps; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.probablyPrimeMillerRabin = function(reps, force2) { return this.$get().probablyPrimeMillerRabin(reps, force2); }; + nat.prototype.probablyPrimeLucas = function() { + var _r$10, _r$11, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, d, i, intD, intN, j, n, natP, nm2, p, r, s, t, t1, t1$1, t2, t2$1, t3, vk, vk1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; d = $f.d; i = $f.i; intD = $f.intD; intN = $f.intN; j = $f.j; n = $f.n; natP = $f.natP; nm2 = $f.nm2; p = $f.p; r = $f.r; s = $f.s; t = $f.t; t1 = $f.t1; t1$1 = $f.t1$1; t2 = $f.t2; t2$1 = $f.t2$1; t3 = $f.t3; vk = $f.vk; vk1 = $f.vk1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = this; + if ((n.$length === 0) || (n.cmp(natOne) === 0)) { + $s = -1; return false; + } + if ((((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) & 1) >>> 0) === 0) { + $s = -1; return n.cmp(natTwo) === 0; + } + p = 3; + d = new nat([1]); + t1 = (nat.nil); + intD = new Int.ptr(false, d); + intN = new Int.ptr(false, n); + /* while (true) { */ case 1: + /* */ if (p > 10000) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (p > 10000) { */ case 3: + _r$3 = intN.String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String("math/big: internal error: cannot find (D/n) = -1 for " + _r$3)); + /* } */ case 4: + (0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0] = (($imul(p, p) >>> 0) - 4 >>> 0)); + _r$4 = Jacobi(intD, intN); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + j = _r$4; + if (j === -1) { + /* break; */ $s = 2; continue; + } + if (j === 0) { + $s = -1; return (n.$length === 1) && ((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) === (p + 2 >>> 0)); + } + /* */ if (p === 40) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (p === 40) { */ case 7: + _r$5 = t1.sqrt(n); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + t1 = _r$5; + t1 = t1.sqr(t1); + if (t1.cmp(n) === 0) { + $s = -1; return false; + } + /* } */ case 8: + p = p + (1) >>> 0; + /* } */ $s = 1; continue; case 2: + s = (nat.nil).add(n, natOne); + r = ((s.trailingZeroBits() >> 0)); + s = s.shr(s, ((r >>> 0))); + nm2 = (nat.nil).sub(n, natTwo); + natP = (nat.nil).setWord(p); + vk = (nat.nil).setWord(2); + vk1 = (nat.nil).setWord(p); + t2 = (nat.nil); + i = (s.bitLen()); + /* while (true) { */ case 10: + /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 11; continue; } + /* */ if (!((s.bit(((i >>> 0))) === 0))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!((s.bit(((i >>> 0))) === 0))) { */ case 12: + t1 = t1.mul(vk, vk1); + t1 = t1.add(t1, n); + t1 = t1.sub(t1, natP); + _r$6 = t2.div(vk, t1, n); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple = _r$6; + t2 = _tuple[0]; + vk = _tuple[1]; + t1 = t1.sqr(vk1); + t1 = t1.add(t1, nm2); + _r$7 = t2.div(vk1, t1, n); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$1 = _r$7; + t2 = _tuple$1[0]; + vk1 = _tuple$1[1]; + $s = 14; continue; + /* } else { */ case 13: + t1 = t1.mul(vk, vk1); + t1 = t1.add(t1, n); + t1 = t1.sub(t1, natP); + _r$8 = t2.div(vk1, t1, n); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$2 = _r$8; + t2 = _tuple$2[0]; + vk1 = _tuple$2[1]; + t1 = t1.sqr(vk); + t1 = t1.add(t1, nm2); + _r$9 = t2.div(vk, t1, n); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$3 = _r$9; + t2 = _tuple$3[0]; + vk = _tuple$3[1]; + /* } */ case 14: + i = i - (1) >> 0; + /* } */ $s = 10; continue; case 11: + /* */ if ((vk.cmp(natTwo) === 0) || (vk.cmp(nm2) === 0)) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if ((vk.cmp(natTwo) === 0) || (vk.cmp(nm2) === 0)) { */ case 19: + t1$1 = t1.mul(vk, natP); + t2$1 = t2.shl(vk1, 1); + if (t1$1.cmp(t2$1) < 0) { + _tmp = t2$1; + _tmp$1 = t1$1; + t1$1 = _tmp; + t2$1 = _tmp$1; + } + t1$1 = t1$1.sub(t1$1, t2$1); + t3 = vk1; + vk1 = nat.nil; + $unused(vk1); + _r$10 = t2$1.div(t3, t1$1, n); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$4 = _r$10; + t2$1 = _tuple$4[0]; + t3 = _tuple$4[1]; + if (t3.$length === 0) { + $s = -1; return true; + } + /* } */ case 20: + t = 0; + /* while (true) { */ case 22: + /* if (!(t < (r - 1 >> 0))) { break; } */ if(!(t < (r - 1 >> 0))) { $s = 23; continue; } + if (vk.$length === 0) { + $s = -1; return true; + } + if ((vk.$length === 1) && ((0 >= vk.$length ? ($throwRuntimeError("index out of range"), undefined) : vk.$array[vk.$offset + 0]) === 2)) { + $s = -1; return false; + } + t1 = t1.sqr(vk); + t1 = t1.sub(t1, natTwo); + _r$11 = t2.div(vk, t1, n); /* */ $s = 24; case 24: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$5 = _r$11; + t2 = _tuple$5[0]; + vk = _tuple$5[1]; + t = t + (1) >> 0; + /* } */ $s = 22; continue; case 23: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: nat.prototype.probablyPrimeLucas }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.d = d; $f.i = i; $f.intD = intD; $f.intN = intN; $f.j = j; $f.n = n; $f.natP = natP; $f.nm2 = nm2; $f.p = p; $f.r = r; $f.s = s; $f.t = t; $f.t1 = t1; $f.t1$1 = t1$1; $f.t2 = t2; $f.t2$1 = t2$1; $f.t3 = t3; $f.vk = vk; $f.vk1 = vk1; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(nat).prototype.probablyPrimeLucas = function() { return this.$get().probablyPrimeLucas(); }; + Rat.ptr.prototype.SetFloat64 = function(f) { + var _1, _r$3, bits$1, exp, f, mantissa, shift, x, x$1, x$2, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; bits$1 = $f.bits$1; exp = $f.exp; f = $f.f; mantissa = $f.mantissa; shift = $f.shift; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + bits$1 = math.Float64bits(f); + mantissa = new $Uint64(bits$1.$high & 1048575, (bits$1.$low & 4294967295) >>> 0); + exp = (((x = $shiftRightUint64(bits$1, 52), new $Uint64(x.$high & 0, (x.$low & 2047) >>> 0)).$low >> 0)); + _1 = exp; + if (_1 === (2047)) { + $s = -1; return ptrType$2.nil; + } else if (_1 === (0)) { + exp = exp - (1022) >> 0; + } else { + mantissa = (x$1 = new $Uint64(1048576, 0), new $Uint64(mantissa.$high | x$1.$high, (mantissa.$low | x$1.$low) >>> 0)); + exp = exp - (1023) >> 0; + } + shift = 52 - exp >> 0; + while (true) { + if (!((x$2 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), (x$2.$high === 0 && x$2.$low === 0)) && shift > 0)) { break; } + mantissa = $shiftRightUint64(mantissa, (1)); + shift = shift - (1) >> 0; + } + z.a.SetUint64(mantissa); + z.a.neg = f < 0; + z.b.Set(intOne); + if (shift > 0) { + z.b.Lsh(z.b, ((shift >>> 0))); + } else { + z.a.Lsh(z.a, ((-shift >>> 0))); + } + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.SetFloat64 }; } $f._1 = _1; $f._r$3 = _r$3; $f.bits$1 = bits$1; $f.exp = exp; $f.f = f; $f.mantissa = mantissa; $f.shift = shift; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.SetFloat64 = function(f) { return this.$val.SetFloat64(f); }; + quotToFloat32 = function(a, b) { + var _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, a, a2, alen, b, b2, blen, exact, exp, f, haveRem, lostbits, mantissa, q, r, shift, shift$1, y, y$1, y$2, y$3, y$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; a = $f.a; a2 = $f.a2; alen = $f.alen; b = $f.b; b2 = $f.b2; blen = $f.blen; exact = $f.exact; exp = $f.exp; f = $f.f; haveRem = $f.haveRem; lostbits = $f.lostbits; mantissa = $f.mantissa; q = $f.q; r = $f.r; shift = $f.shift; shift$1 = $f.shift$1; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; y$3 = $f.y$3; y$4 = $f.y$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = 0; + exact = false; + alen = a.bitLen(); + if (alen === 0) { + _tmp = 0; + _tmp$1 = true; + f = _tmp; + exact = _tmp$1; + $s = -1; return [f, exact]; + } + blen = b.bitLen(); + if (blen === 0) { + $panic(new $String("division by zero")); + } + exp = alen - blen >> 0; + _tmp$2 = nat.nil; + _tmp$3 = nat.nil; + a2 = _tmp$2; + b2 = _tmp$3; + a2 = a2.set(a); + b2 = b2.set(b); + shift = 25 - exp >> 0; + if (shift > 0) { + a2 = a2.shl(a2, ((shift >>> 0))); + } else if (shift < 0) { + b2 = b2.shl(b2, ((-shift >>> 0))); + } + q = nat.nil; + _r$3 = q.div(a2, a2, b2); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + q = _tuple[0]; + r = _tuple[1]; + mantissa = low32(q); + haveRem = r.$length > 0; + if ((mantissa >>> 25 >>> 0) === 1) { + if (((mantissa & 1) >>> 0) === 1) { + haveRem = true; + } + mantissa = (y = (1), y < 32 ? (mantissa >>> y) : 0) >>> 0; + exp = exp + (1) >> 0; + } + /* */ if (!(((mantissa >>> 24 >>> 0) === 1))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(((mantissa >>> 24 >>> 0) === 1))) { */ case 2: + _r$4 = fmt.Sprintf("expected exactly %d bits of result", new sliceType([new $Int(25)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $panic(new $String(_r$4)); + /* } */ case 3: + if (-149 <= exp && exp <= -126) { + shift$1 = (((-126 - ((exp - 1 >> 0)) >> 0) >>> 0)); + lostbits = (mantissa & ((((y$1 = shift$1, y$1 < 32 ? (1 << y$1) : 0) >>> 0) - 1 >>> 0))) >>> 0; + haveRem = haveRem || !((lostbits === 0)); + mantissa = (y$2 = (shift$1), y$2 < 32 ? (mantissa >>> y$2) : 0) >>> 0; + exp = -125; + } + exact = !haveRem; + if (!((((mantissa & 1) >>> 0) === 0))) { + exact = false; + if (haveRem || !((((mantissa & 2) >>> 0) === 0))) { + mantissa = mantissa + (1) >>> 0; + if (mantissa >= 33554432) { + mantissa = (y$3 = (1), y$3 < 32 ? (mantissa >>> y$3) : 0) >>> 0; + exp = exp + (1) >> 0; + } + } + } + mantissa = (y$4 = (1), y$4 < 32 ? (mantissa >>> y$4) : 0) >>> 0; + f = ($fround(math.Ldexp((mantissa), exp - 24 >> 0))); + if (math.IsInf((f), 0)) { + exact = false; + } + $s = -1; return [f, exact]; + /* */ } return; } if ($f === undefined) { $f = { $blk: quotToFloat32 }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.a = a; $f.a2 = a2; $f.alen = alen; $f.b = b; $f.b2 = b2; $f.blen = blen; $f.exact = exact; $f.exp = exp; $f.f = f; $f.haveRem = haveRem; $f.lostbits = lostbits; $f.mantissa = mantissa; $f.q = q; $f.r = r; $f.shift = shift; $f.shift$1 = shift$1; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.y$3 = y$3; $f.y$4 = y$4; $f.$s = $s; $f.$r = $r; return $f; + }; + quotToFloat64 = function(a, b) { + var _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, a, a2, alen, b, b2, blen, exact, exp, f, haveRem, lostbits, mantissa, q, r, shift, shift$1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; a = $f.a; a2 = $f.a2; alen = $f.alen; b = $f.b; b2 = $f.b2; blen = $f.blen; exact = $f.exact; exp = $f.exp; f = $f.f; haveRem = $f.haveRem; lostbits = $f.lostbits; mantissa = $f.mantissa; q = $f.q; r = $f.r; shift = $f.shift; shift$1 = $f.shift$1; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = 0; + exact = false; + alen = a.bitLen(); + if (alen === 0) { + _tmp = 0; + _tmp$1 = true; + f = _tmp; + exact = _tmp$1; + $s = -1; return [f, exact]; + } + blen = b.bitLen(); + if (blen === 0) { + $panic(new $String("division by zero")); + } + exp = alen - blen >> 0; + _tmp$2 = nat.nil; + _tmp$3 = nat.nil; + a2 = _tmp$2; + b2 = _tmp$3; + a2 = a2.set(a); + b2 = b2.set(b); + shift = 54 - exp >> 0; + if (shift > 0) { + a2 = a2.shl(a2, ((shift >>> 0))); + } else if (shift < 0) { + b2 = b2.shl(b2, ((-shift >>> 0))); + } + q = nat.nil; + _r$3 = q.div(a2, a2, b2); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + q = _tuple[0]; + r = _tuple[1]; + mantissa = low64(q); + haveRem = r.$length > 0; + if ((x = $shiftRightUint64(mantissa, 54), (x.$high === 0 && x.$low === 1))) { + if ((x$1 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), (x$1.$high === 0 && x$1.$low === 1))) { + haveRem = true; + } + mantissa = $shiftRightUint64(mantissa, (1)); + exp = exp + (1) >> 0; + } + /* */ if (!((x$2 = $shiftRightUint64(mantissa, 53), (x$2.$high === 0 && x$2.$low === 1)))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((x$2 = $shiftRightUint64(mantissa, 53), (x$2.$high === 0 && x$2.$low === 1)))) { */ case 2: + _r$4 = fmt.Sprintf("expected exactly %d bits of result", new sliceType([new $Int(54)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $panic(new $String(_r$4)); + /* } */ case 3: + if (-1074 <= exp && exp <= -1022) { + shift$1 = (((-1022 - ((exp - 1 >> 0)) >> 0) >>> 0)); + lostbits = (x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), shift$1), new $Uint64(x$4.$high - 0, x$4.$low - 1)), new $Uint64(mantissa.$high & x$3.$high, (mantissa.$low & x$3.$low) >>> 0)); + haveRem = haveRem || !((lostbits.$high === 0 && lostbits.$low === 0)); + mantissa = $shiftRightUint64(mantissa, (shift$1)); + exp = -1021; + } + exact = !haveRem; + if (!((x$5 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), (x$5.$high === 0 && x$5.$low === 0)))) { + exact = false; + if (haveRem || !((x$6 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 2) >>> 0), (x$6.$high === 0 && x$6.$low === 0)))) { + mantissa = (x$7 = new $Uint64(0, 1), new $Uint64(mantissa.$high + x$7.$high, mantissa.$low + x$7.$low)); + if ((mantissa.$high > 4194304 || (mantissa.$high === 4194304 && mantissa.$low >= 0))) { + mantissa = $shiftRightUint64(mantissa, (1)); + exp = exp + (1) >> 0; + } + } + } + mantissa = $shiftRightUint64(mantissa, (1)); + f = math.Ldexp(($flatten64(mantissa)), exp - 53 >> 0); + if (math.IsInf(f, 0)) { + exact = false; + } + $s = -1; return [f, exact]; + /* */ } return; } if ($f === undefined) { $f = { $blk: quotToFloat64 }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.a = a; $f.a2 = a2; $f.alen = alen; $f.b = b; $f.b2 = b2; $f.blen = blen; $f.exact = exact; $f.exp = exp; $f.f = f; $f.haveRem = haveRem; $f.lostbits = lostbits; $f.mantissa = mantissa; $f.q = q; $f.r = r; $f.shift = shift; $f.shift$1 = shift$1; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.ptr.prototype.Float32 = function() { + var _r$3, _tuple, b, exact, f, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; b = $f.b; exact = $f.exact; f = $f.f; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = 0; + exact = false; + x = this; + b = x.b.abs; + if (b.$length === 0) { + b = b.set(natOne); + } + _r$3 = quotToFloat32(x.a.abs, b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + f = _tuple[0]; + exact = _tuple[1]; + if (x.a.neg) { + f = -f; + } + $s = -1; return [f, exact]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Float32 }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.b = b; $f.exact = exact; $f.f = f; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Float32 = function() { return this.$val.Float32(); }; + Rat.ptr.prototype.Float64 = function() { + var _r$3, _tuple, b, exact, f, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _tuple = $f._tuple; b = $f.b; exact = $f.exact; f = $f.f; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = 0; + exact = false; + x = this; + b = x.b.abs; + if (b.$length === 0) { + b = b.set(natOne); + } + _r$3 = quotToFloat64(x.a.abs, b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + f = _tuple[0]; + exact = _tuple[1]; + if (x.a.neg) { + f = -f; + } + $s = -1; return [f, exact]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Float64 }; } $f._r$3 = _r$3; $f._tuple = _tuple; $f.b = b; $f.exact = exact; $f.f = f; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Float64 = function() { return this.$val.Float64(); }; + Rat.ptr.prototype.SetFrac = function(a, b) { + var _r$3, a, b, babs, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a = $f.a; b = $f.b; babs = $f.babs; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + z.a.neg = !(a.neg === b.neg); + babs = b.abs; + if (babs.$length === 0) { + $panic(new $String("division by zero")); + } + if (z.a === b || alias(z.a.abs, babs)) { + babs = (nat.nil).set(babs); + } + z.a.abs = z.a.abs.set(a.abs); + z.b.abs = z.b.abs.set(babs); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.SetFrac }; } $f._r$3 = _r$3; $f.a = a; $f.b = b; $f.babs = babs; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.SetFrac = function(a, b) { return this.$val.SetFrac(a, b); }; + Rat.ptr.prototype.SetFrac64 = function(a, b) { + var _r$3, a, b, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a = $f.a; b = $f.b; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + z.a.SetInt64(a); + if ((b.$high === 0 && b.$low === 0)) { + $panic(new $String("division by zero")); + } + if ((b.$high < 0 || (b.$high === 0 && b.$low < 0))) { + b = new $Int64(-b.$high, -b.$low); + z.a.neg = !z.a.neg; + } + z.b.abs = z.b.abs.setUint64((new $Uint64(b.$high, b.$low))); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.SetFrac64 }; } $f._r$3 = _r$3; $f.a = a; $f.b = b; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.SetFrac64 = function(a, b) { return this.$val.SetFrac64(a, b); }; + Rat.ptr.prototype.SetInt = function(x) { + var x, z; + z = this; + z.a.Set(x); + z.b.abs = $subslice(z.b.abs, 0, 0); + return z; + }; + Rat.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; + Rat.ptr.prototype.SetInt64 = function(x) { + var x, z; + z = this; + z.a.SetInt64(x); + z.b.abs = $subslice(z.b.abs, 0, 0); + return z; + }; + Rat.prototype.SetInt64 = function(x) { return this.$val.SetInt64(x); }; + Rat.ptr.prototype.Set = function(x) { + var x, z; + z = this; + if (!(z === x)) { + z.a.Set(x.a); + z.b.Set(x.b); + } + return z; + }; + Rat.prototype.Set = function(x) { return this.$val.Set(x); }; + Rat.ptr.prototype.Abs = function(x) { + var x, z; + z = this; + z.Set(x); + z.a.neg = false; + return z; + }; + Rat.prototype.Abs = function(x) { return this.$val.Abs(x); }; + Rat.ptr.prototype.Neg = function(x) { + var x, z; + z = this; + z.Set(x); + z.a.neg = z.a.abs.$length > 0 && !z.a.neg; + return z; + }; + Rat.prototype.Neg = function(x) { return this.$val.Neg(x); }; + Rat.ptr.prototype.Inv = function(x) { + var _tmp, _tmp$1, a, b, x, z; + z = this; + if (x.a.abs.$length === 0) { + $panic(new $String("division by zero")); + } + z.Set(x); + a = z.b.abs; + if (a.$length === 0) { + a = a.set(natOne); + } + b = z.a.abs; + if (b.cmp(natOne) === 0) { + b = $subslice(b, 0, 0); + } + _tmp = a; + _tmp$1 = b; + z.a.abs = _tmp; + z.b.abs = _tmp$1; + return z; + }; + Rat.prototype.Inv = function(x) { return this.$val.Inv(x); }; + Rat.ptr.prototype.Sign = function() { + var x; + x = this; + return x.a.Sign(); + }; + Rat.prototype.Sign = function() { return this.$val.Sign(); }; + Rat.ptr.prototype.IsInt = function() { + var x; + x = this; + return (x.b.abs.$length === 0) || (x.b.abs.cmp(natOne) === 0); + }; + Rat.prototype.IsInt = function() { return this.$val.IsInt(); }; + Rat.ptr.prototype.Num = function() { + var x; + x = this; + return x.a; + }; + Rat.prototype.Num = function() { return this.$val.Num(); }; + Rat.ptr.prototype.Denom = function() { + var x; + x = this; + x.b.neg = false; + if (x.b.abs.$length === 0) { + x.b.abs = x.b.abs.set(natOne); + } + return x.b; + }; + Rat.prototype.Denom = function() { return this.$val.Denom(); }; + Rat.ptr.prototype.norm = function() { + var _r$3, _r$4, _r$5, _tuple, _tuple$1, f, neg, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; f = $f.f; neg = $f.neg; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if ((z.a.abs.$length === 0)) { $s = 2; continue; } + /* */ if ((z.b.abs.$length === 0)) { $s = 3; continue; } + /* */ if ((z.b.abs.cmp(natOne) === 0)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((z.a.abs.$length === 0)) { */ case 2: + z.a.neg = false; + z.b.abs = $subslice(z.b.abs, 0, 0); + $s = 6; continue; + /* } else if ((z.b.abs.$length === 0)) { */ case 3: + $s = 6; continue; + /* } else if ((z.b.abs.cmp(natOne) === 0)) { */ case 4: + z.b.abs = $subslice(z.b.abs, 0, 0); + $s = 6; continue; + /* } else { */ case 5: + neg = z.a.neg; + z.a.neg = false; + z.b.neg = false; + _r$3 = NewInt(new $Int64(0, 0)).lehmerGCD(ptrType$1.nil, ptrType$1.nil, z.a, z.b); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + f = _r$3; + /* */ if (!((f.Cmp(intOne) === 0))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!((f.Cmp(intOne) === 0))) { */ case 8: + _r$4 = z.a.abs.div(nat.nil, z.a.abs, f.abs); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + z.a.abs = _tuple[0]; + _r$5 = z.b.abs.div(nat.nil, z.b.abs, f.abs); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + z.b.abs = _tuple$1[0]; + if (z.b.abs.cmp(natOne) === 0) { + z.b.abs = $subslice(z.b.abs, 0, 0); + } + /* } */ case 9: + z.a.neg = neg; + /* } */ case 6: + case 1: + $s = -1; return z; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.norm }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.f = f; $f.neg = neg; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.norm = function() { return this.$val.norm(); }; + mulDenom = function(z, x, y) { + var x, y, z; + if ((x.$length === 0)) { + return z.set(y); + } else if ((y.$length === 0)) { + return z.set(x); + } + return z.mul(x, y); + }; + scaleDenom = function(x, f) { + var f, x, z; + z = new Int.ptr(false, nat.nil); + if (f.$length === 0) { + return z.Set(x); + } + z.abs = z.abs.mul(x.abs, f); + z.neg = x.neg; + return z; + }; + Rat.ptr.prototype.Cmp = function(y) { + var x, y; + x = this; + return scaleDenom(x.a, y.b.abs).Cmp(scaleDenom(y.a, x.b.abs)); + }; + Rat.prototype.Cmp = function(y) { return this.$val.Cmp(y); }; + Rat.ptr.prototype.Add = function(x, y) { + var _r$3, a1, a2, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a1 = $f.a1; a2 = $f.a2; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + a1 = scaleDenom(x.a, y.b.abs); + a2 = scaleDenom(y.a, x.b.abs); + z.a.Add(a1, a2); + z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Add }; } $f._r$3 = _r$3; $f.a1 = a1; $f.a2 = a2; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Add = function(x, y) { return this.$val.Add(x, y); }; + Rat.ptr.prototype.Sub = function(x, y) { + var _r$3, a1, a2, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a1 = $f.a1; a2 = $f.a2; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + a1 = scaleDenom(x.a, y.b.abs); + a2 = scaleDenom(y.a, x.b.abs); + z.a.Sub(a1, a2); + z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Sub }; } $f._r$3 = _r$3; $f.a1 = a1; $f.a2 = a2; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Sub = function(x, y) { return this.$val.Sub(x, y); }; + Rat.ptr.prototype.Mul = function(x, y) { + var _r$3, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (x === y) { + z.a.neg = false; + z.a.abs = z.a.abs.sqr(x.a.abs); + z.b.abs = z.b.abs.sqr(x.b.abs); + $s = -1; return z; + } + z.a.Mul(x.a, y.a); + z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Mul }; } $f._r$3 = _r$3; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Mul = function(x, y) { return this.$val.Mul(x, y); }; + Rat.ptr.prototype.Quo = function(x, y) { + var _r$3, a, b, x, y, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; a = $f.a; b = $f.b; x = $f.x; y = $f.y; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (y.a.abs.$length === 0) { + $panic(new $String("division by zero")); + } + a = scaleDenom(x.a, y.b.abs); + b = scaleDenom(y.a, x.b.abs); + z.a.abs = a.abs; + z.b.abs = b.abs; + z.a.neg = !(a.neg === b.neg); + _r$3 = z.norm(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Quo }; } $f._r$3 = _r$3; $f.a = a; $f.b = b; $f.x = x; $f.y = y; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Quo = function(x, y) { return this.$val.Quo(x, y); }; + ratTok = function(ch) { + var ch; + return strings.ContainsRune("+-/0123456789.eE", ch); + }; + Rat.ptr.prototype.Scan = function(s, ch) { + var _r$3, _r$4, _tuple, _tuple$1, ch, err, ok, s, tok, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ch = $f.ch; err = $f.err; ok = $f.ok; s = $f.s; tok = $f.tok; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = s.Token(true, ratTok); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + tok = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if (!strings.ContainsRune("efgEFGv", ch)) { + $s = -1; return errors.New("Rat.Scan: invalid verb"); + } + _r$4 = z.SetString(($bytesToString(tok))); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + ok = _tuple$1[1]; + if (!ok) { + $s = -1; return errors.New("Rat.Scan: invalid syntax"); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.Scan }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ch = ch; $f.err = err; $f.ok = ok; $f.s = s; $f.tok = tok; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.Scan = function(s, ch) { return this.$val.Scan(s, ch); }; + Rat.ptr.prototype.SetString = function(s) { + var _r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, ecorr, err, err$1, exp, expabs, neg, ok, powTen, r, r$1, s, sep, x, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; ecorr = $f.ecorr; err = $f.err; err$1 = $f.err$1; exp = $f.exp; expabs = $f.expabs; neg = $f.neg; ok = $f.ok; powTen = $f.powTen; r = $f.r; r$1 = $f.r$1; s = $f.s; sep = $f.sep; x = $f.x; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (s.length === 0) { + $s = -1; return [ptrType$2.nil, false]; + } + sep = strings.Index(s, "/"); + /* */ if (sep >= 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (sep >= 0) { */ case 1: + _r$3 = z.a.SetString($substring(s, 0, sep), 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [ptrType$2.nil, false]; + } + r = strings.NewReader($substring(s, (sep + 1 >> 0))); + err = $ifaceNil; + _r$4 = z.b.abs.scan(r, 0, false); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + z.b.abs = _tuple$1[0]; + err = _tuple$1[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$2.nil, false]; + } + _tuple$2 = r.ReadByte(); + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, io.EOF))) { + $s = -1; return [ptrType$2.nil, false]; + } + if (z.b.abs.$length === 0) { + $s = -1; return [ptrType$2.nil, false]; + } + _r$5 = z.norm(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [_r$5, true]; + /* } */ case 2: + r$1 = strings.NewReader(s); + _r$6 = scanSign(r$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$3 = _r$6; + neg = _tuple$3[0]; + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$2.nil, false]; + } + ecorr = 0; + _r$7 = z.a.abs.scan(r$1, 10, true); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$4 = _r$7; + z.a.abs = _tuple$4[0]; + ecorr = _tuple$4[2]; + err$1 = _tuple$4[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$2.nil, false]; + } + exp = new $Int64(0, 0); + _r$8 = scanExponent(r$1, false); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$5 = _r$8; + exp = _tuple$5[0]; + err$1 = _tuple$5[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$2.nil, false]; + } + _tuple$6 = r$1.ReadByte(); + err$1 = _tuple$6[1]; + if (!($interfaceIsEqual(err$1, io.EOF))) { + $s = -1; return [ptrType$2.nil, false]; + } + if (z.a.abs.$length === 0) { + $s = -1; return [z, true]; + } + if (ecorr < 0) { + exp = (x = (new $Int64(0, ecorr)), new $Int64(exp.$high + x.$high, exp.$low + x.$low)); + } + expabs = exp; + if ((expabs.$high < 0 || (expabs.$high === 0 && expabs.$low < 0))) { + expabs = new $Int64(-expabs.$high, -expabs.$low); + } + _r$9 = (nat.nil).expNN(natTen, (nat.nil).setWord(((expabs.$low >>> 0))), nat.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + powTen = _r$9; + /* */ if ((exp.$high < 0 || (exp.$high === 0 && exp.$low < 0))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ((exp.$high < 0 || (exp.$high === 0 && exp.$low < 0))) { */ case 10: + z.b.abs = powTen; + _r$10 = z.norm(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = 12; continue; + /* } else { */ case 11: + z.a.abs = z.a.abs.mul(z.a.abs, powTen); + z.b.abs = $subslice(z.b.abs, 0, 0); + /* } */ case 12: + z.a.neg = neg && z.a.abs.$length > 0; + $s = -1; return [z, true]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.SetString }; } $f._r$10 = _r$10; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.ecorr = ecorr; $f.err = err; $f.err$1 = err$1; $f.exp = exp; $f.expabs = expabs; $f.neg = neg; $f.ok = ok; $f.powTen = powTen; $f.r = r; $f.r$1 = r$1; $f.s = s; $f.sep = sep; $f.x = x; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.SetString = function(s) { return this.$val.SetString(s); }; + scanExponent = function(r, binExpOk) { + var _1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, base, binExpOk, ch, digits, err, exp, i, neg, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; base = $f.base; binExpOk = $f.binExpOk; ch = $f.ch; digits = $f.digits; err = $f.err; exp = $f.exp; i = $f.i; neg = $f.neg; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + exp = new $Int64(0, 0); + base = 0; + err = $ifaceNil; + base = 10; + ch = 0; + _r$3 = r.ReadByte(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ch = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = $ifaceNil; + } + $s = -1; return [exp, base, err]; + } + _1 = ch; + /* */ if ((_1 === (101)) || (_1 === (69))) { $s = 3; continue; } + /* */ if (_1 === (112)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((_1 === (101)) || (_1 === (69))) { */ case 3: + $s = 6; continue; + /* } else if (_1 === (112)) { */ case 4: + if (binExpOk) { + base = 2; + /* break; */ $s = 2; continue; + } + _r$4 = r.UnreadByte(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + $s = -1; return [exp, base, err]; + /* } else { */ case 5: + _r$5 = r.UnreadByte(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return [exp, base, err]; + /* } */ case 6: + case 2: + neg = false; + _r$6 = scanSign(r); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + neg = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [exp, base, err]; + } + digits = sliceType$1.nil; + if (neg) { + digits = $append(digits, 45); + } + i = 0; + /* while (true) { */ case 10: + _r$7 = r.ReadByte(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$2 = _r$7; + ch = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (!($interfaceIsEqual(err, io.EOF)) || (i === 0)) { + $s = -1; return [exp, base, err]; + } + err = $ifaceNil; + /* break; */ $s = 11; continue; + } + /* */ if (ch < 48 || 57 < ch) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (ch < 48 || 57 < ch) { */ case 13: + /* */ if (i === 0) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (i === 0) { */ case 15: + _r$8 = r.UnreadByte(); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = fmt.Errorf("invalid exponent (missing digits)", new sliceType([])); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + $s = -1; return [exp, base, err]; + /* } */ case 16: + /* break; */ $s = 11; continue; + /* } */ case 14: + digits = $append(digits, ch); + i = i + (1) >> 0; + /* } */ $s = 10; continue; case 11: + _tuple$3 = strconv.ParseInt(($bytesToString(digits)), 10, 64); + exp = _tuple$3[0]; + err = _tuple$3[1]; + $s = -1; return [exp, base, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: scanExponent }; } $f._1 = _1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.base = base; $f.binExpOk = binExpOk; $f.ch = ch; $f.digits = digits; $f.err = err; $f.exp = exp; $f.i = i; $f.neg = neg; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.ptr.prototype.String = function() { + var _r$3, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + _r$3 = x.marshal(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return ($bytesToString(_r$3)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.String }; } $f._r$3 = _r$3; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.String = function() { return this.$val.String(); }; + Rat.ptr.prototype.marshal = function() { + var _r$3, _r$4, buf, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; buf = $f.buf; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + buf = sliceType$1.nil; + _r$3 = x.a.Append(buf, 10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + buf = _r$3; + buf = $append(buf, 47); + /* */ if (!((x.b.abs.$length === 0))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((x.b.abs.$length === 0))) { */ case 2: + _r$4 = x.b.Append(buf, 10); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + buf = _r$4; + $s = 4; continue; + /* } else { */ case 3: + buf = $append(buf, 49); + /* } */ case 4: + $s = -1; return buf; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.marshal }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.buf = buf; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.marshal = function() { return this.$val.marshal(); }; + Rat.ptr.prototype.RatString = function() { + var _r$3, _r$4, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + /* */ if (x.IsInt()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (x.IsInt()) { */ case 1: + _r$3 = x.a.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + _r$4 = x.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.RatString }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.RatString = function() { return this.$val.RatString(); }; + Rat.ptr.prototype.FloatString = function(prec) { + var _arg, _arg$1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, buf, i, i$1, p, prec, q, r, r2, rs, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; buf = $f.buf; i = $f.i; i$1 = $f.i$1; p = $f.p; prec = $f.prec; q = $f.q; r = $f.r; r2 = $f.r2; rs = $f.rs; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + buf = sliceType$1.nil; + /* */ if (x.IsInt()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (x.IsInt()) { */ case 1: + _r$3 = x.a.Append(buf, 10); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + buf = _r$3; + if (prec > 0) { + buf = $append(buf, 46); + i = prec; + while (true) { + if (!(i > 0)) { break; } + buf = $append(buf, 48); + i = i - (1) >> 0; + } + } + $s = -1; return ($bytesToString(buf)); + /* } */ case 2: + _r$4 = (nat.nil).div((nat.nil), x.a.abs, x.b.abs); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + q = _tuple[0]; + r = _tuple[1]; + p = natOne; + /* */ if (prec > 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (prec > 0) { */ case 5: + _r$5 = (nat.nil).expNN(natTen, (nat.nil).setUint64((new $Uint64(0, prec))), nat.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + p = _r$5; + /* } */ case 6: + r = r.mul(r, p); + _r$6 = r.div((nat.nil), r, x.b.abs); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + r = _tuple$1[0]; + r2 = _tuple$1[1]; + r2 = r2.add(r2, r2); + if (x.b.abs.cmp(r2) <= 0) { + r = r.add(r, natOne); + if (r.cmp(p) >= 0) { + q = (nat.nil).add(q, natOne); + r = (nat.nil).sub(r, p); + } + } + if (x.a.neg) { + buf = $append(buf, 45); + } + _arg = buf; + _r$7 = q.utoa(10); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _arg$1 = _r$7; + buf = $appendSlice(_arg, _arg$1); + /* */ if (prec > 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (prec > 0) { */ case 10: + buf = $append(buf, 46); + _r$8 = r.utoa(10); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + rs = _r$8; + i$1 = prec - rs.$length >> 0; + while (true) { + if (!(i$1 > 0)) { break; } + buf = $append(buf, 48); + i$1 = i$1 - (1) >> 0; + } + buf = $appendSlice(buf, rs); + /* } */ case 11: + $s = -1; return ($bytesToString(buf)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.FloatString }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.buf = buf; $f.i = i; $f.i$1 = i$1; $f.p = p; $f.prec = prec; $f.q = q; $f.r = r; $f.r2 = r2; $f.rs = rs; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.FloatString = function(prec) { return this.$val.FloatString(prec); }; + Rat.ptr.prototype.GobEncode = function() { + var b, buf, i, j, n, x; + x = this; + if (x === ptrType$2.nil) { + return [sliceType$1.nil, $ifaceNil]; + } + buf = $makeSlice(sliceType$1, (5 + ($imul(((x.a.abs.$length + x.b.abs.$length >> 0)), 4)) >> 0)); + i = x.b.abs.bytes(buf); + j = x.a.abs.bytes($subslice(buf, 0, i)); + n = i - j >> 0; + if (!((((((n >>> 0)) >> 0)) === n))) { + return [sliceType$1.nil, errors.New("Rat.GobEncode: numerator too large")]; + } + $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(buf, (j - 4 >> 0), j), ((n >>> 0))); + j = j - (5) >> 0; + b = 2; + if (x.a.neg) { + b = (b | (1)) >>> 0; + } + ((j < 0 || j >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + j] = b); + return [$subslice(buf, j), $ifaceNil]; + }; + Rat.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Rat.ptr.prototype.GobDecode = function(buf) { + var _r$3, b, buf, i, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; b = $f.b; buf = $f.buf; i = $f.i; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + if (buf.$length === 0) { + Rat.copy(z, new Rat.ptr(new Int.ptr(false, nat.nil), new Int.ptr(false, nat.nil))); + $s = -1; return $ifaceNil; + } + b = (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]); + /* */ if (!(((b >>> 1 << 24 >>> 24) === 1))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(((b >>> 1 << 24 >>> 24) === 1))) { */ case 1: + _r$3 = fmt.Errorf("Rat.GobDecode: encoding version %d not supported", new sliceType([new $Uint8((b >>> 1 << 24 >>> 24))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 2: + i = 5 + $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, 1, 5)) >>> 0; + z.a.neg = !((((b & 1) >>> 0) === 0)); + z.a.abs = z.a.abs.setBytes($subslice(buf, 5, i)); + z.b.abs = z.b.abs.setBytes($subslice(buf, i)); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.GobDecode }; } $f._r$3 = _r$3; $f.b = b; $f.buf = buf; $f.i = i; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.GobDecode = function(buf) { return this.$val.GobDecode(buf); }; + Rat.ptr.prototype.MarshalText = function() { + var _r$3, _r$4, _tmp, _tmp$1, _tuple, err, text, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; text = $f.text; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + text = sliceType$1.nil; + err = $ifaceNil; + x = this; + /* */ if (x.IsInt()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (x.IsInt()) { */ case 1: + _r$3 = x.a.MarshalText(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + text = _tuple[0]; + err = _tuple[1]; + $s = -1; return [text, err]; + /* } */ case 2: + _r$4 = x.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp = _r$4; + _tmp$1 = $ifaceNil; + text = _tmp; + err = _tmp$1; + $s = -1; return [text, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.MarshalText }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.text = text; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Rat.ptr.prototype.UnmarshalText = function(text) { + var _r$3, _r$4, _tuple, ok, text, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; ok = $f.ok; text = $f.text; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + _r$3 = z.SetString(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + ok = _tuple[1]; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$4 = fmt.Errorf("math/big: cannot unmarshal %q into a *big.Rat", new sliceType([text])); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Rat.ptr.prototype.UnmarshalText }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.ok = ok; $f.text = text; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Rat.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; + RoundingMode.prototype.String = function() { + var i, x; + i = this.$val; + if (i >= 6) { + return "RoundingMode(" + strconv.FormatInt((new $Int64(0, i)), 10) + ")"; + } + return $substring("ToNearestEvenToNearestAwayToZeroAwayFromZeroToNegativeInfToPositiveInf", ((i < 0 || i >= _RoundingMode_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _RoundingMode_index[i]), (x = i + 1 << 24 >>> 24, ((x < 0 || x >= _RoundingMode_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _RoundingMode_index[x]))); + }; + $ptrType(RoundingMode).prototype.String = function() { return new RoundingMode(this.$get()).String(); }; + Float.ptr.prototype.Sqrt = function(x) { + var _1, _q, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, b, prec, x, x$1, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _q = $f._q; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; b = $f.b; prec = $f.prec; x = $f.x; x$1 = $f.x$1; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + z = this; + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + $r = x.validate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (z.prec === 0) { + z.prec = x.prec; + } + _r$3 = x.Sign(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3 === -1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$3 === -1) { */ case 4: + $panic((x$1 = new ErrNaN.ptr("square root of negative operand"), new x$1.constructor.elem(x$1))); + /* } */ case 5: + if (!((x.form === 1))) { + z.acc = 0; + z.form = x.form; + z.neg = x.neg; + $s = -1; return z; + } + prec = z.prec; + _r$4 = x.MantExp(z); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + b = _r$4; + z.prec = prec; + _1 = (_r$5 = b % 2, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")); + /* */ if (_1 === (0)) { $s = 9; continue; } + /* */ if (_1 === (1)) { $s = 10; continue; } + /* */ if (_1 === (-1)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (_1 === (0)) { */ case 9: + $s = 12; continue; + /* } else if (_1 === (1)) { */ case 10: + _r$6 = z.Mul(two, z); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = 12; continue; + /* } else if (_1 === (-1)) { */ case 11: + _r$7 = z.Mul(half, z); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + /* } */ case 12: + case 8: + /* */ if (z.prec <= 128) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (z.prec <= 128) { */ case 15: + $r = z.sqrtDirect(z); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 17; continue; + /* } else { */ case 16: + $r = z.sqrtInverse(z); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + _r$8 = z.SetMantExp(z, (_q = b / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return _r$8; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.Sqrt }; } $f._1 = _1; $f._q = _q; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f.b = b; $f.prec = prec; $f.x = x; $f.x$1 = x$1; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.Sqrt = function(x) { return this.$val.Sqrt(x); }; + Float.ptr.prototype.sqrtDirect = function(x) { + var _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, ng, sq, u, x, xf, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; ng = $f.ng; sq = $f.sq; u = $f.u; x = $f.x; xf = $f.xf; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u = [u]; + x = [x]; + z = this; + u[0] = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + ng = (function(u, x) { return function $b(t) { + var _r$3, _r$4, _r$5, _r$6, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u[0].prec = t.prec; + _r$3 = u[0].Mul(t, t); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = u[0].Add(u[0], x[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = u[0].Mul(half, u[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = t.Quo(u[0], t); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; })(u, x); + _r$3 = x[0].Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + xf = _tuple[0]; + _r$4 = NewFloat(math.Sqrt(xf)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + sq = _r$4; + /* */ if (z.prec > 128) { $s = 4; continue; } + /* */ if (z.prec > 64) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (z.prec > 128) { */ case 4: + $panic(new $String("sqrtDirect: only for z.prec <= 128")); + $s = 7; continue; + /* } else if (z.prec > 64) { */ case 5: + sq.prec = $imul(sq.prec, (2)) >>> 0; + _r$5 = ng(sq); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + sq = _r$5; + sq.prec = $imul(sq.prec, (2)) >>> 0; + _r$6 = ng(sq); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + sq = _r$6; + $s = 7; continue; + /* } else { */ case 6: + sq.prec = $imul(sq.prec, (2)) >>> 0; + _r$7 = ng(sq); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + sq = _r$7; + /* } */ case 7: + case 3: + _r$8 = z.Set(sq); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.sqrtDirect }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f.ng = ng; $f.sq = sq; $f.u = u; $f.x = x; $f.xf = xf; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.sqrtDirect = function(x) { return this.$val.sqrtDirect(x); }; + Float.ptr.prototype.sqrtInverse = function(x) { + var _r$3, _r$4, _r$5, _r$6, _tuple, ng, prec, sqi, u, v, x, xf, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; ng = $f.ng; prec = $f.prec; sqi = $f.sqi; u = $f.u; v = $f.v; x = $f.x; xf = $f.xf; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u = [u]; + v = [v]; + x = [x]; + z = this; + u[0] = newFloat(z.prec); + v[0] = newFloat(z.prec); + ng = (function(u, v, x) { return function $b(t) { + var _r$3, _r$4, _r$5, _r$6, _r$7, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u[0].prec = t.prec; + v[0].prec = t.prec; + _r$3 = u[0].Mul(t, t); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = u[0].Mul(x[0], u[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = v[0].Sub(three, u[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = u[0].Mul(t, v[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = t.Mul(half, u[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; })(u, v, x); + _r$3 = x[0].Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + xf = _tuple[0]; + sqi = newFloat(z.prec); + _r$4 = sqi.SetFloat64(1 / math.Sqrt(xf)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + prec = z.prec + 32 >>> 0; + /* while (true) { */ case 3: + /* if (!(sqi.prec < prec)) { break; } */ if(!(sqi.prec < prec)) { $s = 4; continue; } + sqi.prec = $imul(sqi.prec, (2)) >>> 0; + _r$5 = ng(sqi); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + sqi = _r$5; + /* } */ $s = 3; continue; case 4: + _r$6 = z.Mul(x[0], sqi); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Float.ptr.prototype.sqrtInverse }; } $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f.ng = ng; $f.prec = prec; $f.sqi = sqi; $f.u = u; $f.v = v; $f.x = x; $f.xf = xf; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + Float.prototype.sqrtInverse = function(x) { return this.$val.sqrtInverse(x); }; + newFloat = function(prec2) { + var _q, prec2, z; + z = new Float.ptr(0, 0, 0, 0, false, nat.nil, 0); + z.mant = z.mant.make($imul((((_q = prec2 / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)), 2)); + return z; + }; + ptrType$5.methods = [{prop: "at", name: "at", pkg: "math/big", typ: $funcType([$Int], [$Uint8], false)}, {prop: "init", name: "init", pkg: "math/big", typ: $funcType([nat, $Int], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "round", name: "round", pkg: "math/big", typ: $funcType([$Int], [], false)}, {prop: "roundUp", name: "roundUp", pkg: "math/big", typ: $funcType([$Int], [], false)}, {prop: "roundDown", name: "roundDown", pkg: "math/big", typ: $funcType([$Int], [], false)}]; + ptrType.methods = [{prop: "SetPrec", name: "SetPrec", pkg: "", typ: $funcType([$Uint], [ptrType], false)}, {prop: "SetMode", name: "SetMode", pkg: "", typ: $funcType([RoundingMode], [ptrType], false)}, {prop: "Prec", name: "Prec", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "MinPrec", name: "MinPrec", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [RoundingMode], false)}, {prop: "Acc", name: "Acc", pkg: "", typ: $funcType([], [Accuracy], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MantExp", name: "MantExp", pkg: "", typ: $funcType([ptrType], [$Int], false)}, {prop: "setExpAndRound", name: "setExpAndRound", pkg: "math/big", typ: $funcType([$Int64, $Uint], [], false)}, {prop: "SetMantExp", name: "SetMantExp", pkg: "", typ: $funcType([ptrType, $Int], [ptrType], false)}, {prop: "Signbit", name: "Signbit", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsInf", name: "IsInf", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsInt", name: "IsInt", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "validate", name: "validate", pkg: "math/big", typ: $funcType([], [], false)}, {prop: "round", name: "round", pkg: "math/big", typ: $funcType([$Uint], [], false)}, {prop: "setBits64", name: "setBits64", pkg: "math/big", typ: $funcType([$Bool, $Uint64], [ptrType], false)}, {prop: "SetUint64", name: "SetUint64", pkg: "", typ: $funcType([$Uint64], [ptrType], false)}, {prop: "SetInt64", name: "SetInt64", pkg: "", typ: $funcType([$Int64], [ptrType], false)}, {prop: "SetFloat64", name: "SetFloat64", pkg: "", typ: $funcType([$Float64], [ptrType], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([ptrType$1], [ptrType], false)}, {prop: "SetRat", name: "SetRat", pkg: "", typ: $funcType([ptrType$2], [ptrType], false)}, {prop: "SetInf", name: "SetInf", pkg: "", typ: $funcType([$Bool], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64, Accuracy], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64, Accuracy], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [$Float32, Accuracy], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64, Accuracy], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([ptrType$1], [ptrType$1, Accuracy], false)}, {prop: "Rat", name: "Rat", pkg: "", typ: $funcType([ptrType$2], [ptrType$2, Accuracy], false)}, {prop: "Abs", name: "Abs", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Neg", name: "Neg", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "uadd", name: "uadd", pkg: "math/big", typ: $funcType([ptrType, ptrType], [], false)}, {prop: "usub", name: "usub", pkg: "math/big", typ: $funcType([ptrType, ptrType], [], false)}, {prop: "umul", name: "umul", pkg: "math/big", typ: $funcType([ptrType, ptrType], [], false)}, {prop: "uquo", name: "uquo", pkg: "math/big", typ: $funcType([ptrType, ptrType], [], false)}, {prop: "ucmp", name: "ucmp", pkg: "math/big", typ: $funcType([ptrType], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Quo", name: "Quo", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Cmp", name: "Cmp", pkg: "", typ: $funcType([ptrType], [$Int], false)}, {prop: "ord", name: "ord", pkg: "math/big", typ: $funcType([], [$Int], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [ptrType, $Bool], false)}, {prop: "scan", name: "scan", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int], [ptrType, $Int, $error], false)}, {prop: "pow5", name: "pow5", pkg: "math/big", typ: $funcType([$Uint64], [ptrType], false)}, {prop: "Parse", name: "Parse", pkg: "", typ: $funcType([$String, $Int], [ptrType, $Int, $error], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([fmt.ScanState, $Int32], [$error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([$Uint8, $Int], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([sliceType$1, $Uint8, $Int], [sliceType$1], false)}, {prop: "fmtB", name: "fmtB", pkg: "math/big", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "fmtP", name: "fmtP", pkg: "math/big", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "Sqrt", name: "Sqrt", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "sqrtDirect", name: "sqrtDirect", pkg: "math/big", typ: $funcType([ptrType], [], false)}, {prop: "sqrtInverse", name: "sqrtInverse", pkg: "math/big", typ: $funcType([ptrType], [], false)}]; + ErrNaN.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + RoundingMode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Accuracy.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "Sign", name: "Sign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "SetInt64", name: "SetInt64", pkg: "", typ: $funcType([$Int64], [ptrType$1], false)}, {prop: "SetUint64", name: "SetUint64", pkg: "", typ: $funcType([$Uint64], [ptrType$1], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "SetBits", name: "SetBits", pkg: "", typ: $funcType([sliceType$2], [ptrType$1], false)}, {prop: "Abs", name: "Abs", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Neg", name: "Neg", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "MulRange", name: "MulRange", pkg: "", typ: $funcType([$Int64, $Int64], [ptrType$1], false)}, {prop: "Binomial", name: "Binomial", pkg: "", typ: $funcType([$Int64, $Int64], [ptrType$1], false)}, {prop: "Quo", name: "Quo", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Rem", name: "Rem", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "QuoRem", name: "QuoRem", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Div", name: "Div", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Mod", name: "Mod", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "DivMod", name: "DivMod", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Cmp", name: "Cmp", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "CmpAbs", name: "CmpAbs", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "IsInt64", name: "IsInt64", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsUint64", name: "IsUint64", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String, $Int], [ptrType$1, $Bool], false)}, {prop: "setFromScanner", name: "setFromScanner", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int], [ptrType$1, $Bool], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$1], [ptrType$1], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "BitLen", name: "BitLen", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Exp", name: "Exp", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "GCD", name: "GCD", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "lehmerGCD", name: "lehmerGCD", pkg: "math/big", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Rand", name: "Rand", pkg: "", typ: $funcType([ptrType$6, ptrType$1], [ptrType$1], false)}, {prop: "ModInverse", name: "ModInverse", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "modSqrt3Mod4Prime", name: "modSqrt3Mod4Prime", pkg: "math/big", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "modSqrt5Mod8Prime", name: "modSqrt5Mod8Prime", pkg: "math/big", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "modSqrtTonelliShanks", name: "modSqrtTonelliShanks", pkg: "math/big", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "ModSqrt", name: "ModSqrt", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Lsh", name: "Lsh", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$1], false)}, {prop: "Rsh", name: "Rsh", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$1], false)}, {prop: "Bit", name: "Bit", pkg: "", typ: $funcType([$Int], [$Uint], false)}, {prop: "SetBit", name: "SetBit", pkg: "", typ: $funcType([ptrType$1, $Int, $Uint], [ptrType$1], false)}, {prop: "And", name: "And", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "AndNot", name: "AndNot", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Or", name: "Or", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Xor", name: "Xor", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Not", name: "Not", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Sqrt", name: "Sqrt", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([$Int], [$String], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([sliceType$1, $Int], [sliceType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "scan", name: "scan", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int], [ptrType$1, $Int, $error], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([fmt.ScanState, $Int32], [$error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "ProbablyPrime", name: "ProbablyPrime", pkg: "", typ: $funcType([$Int], [$Bool], false)}]; + byteReader.methods = [{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}]; + nat.methods = [{prop: "clear", name: "clear", pkg: "math/big", typ: $funcType([], [], false)}, {prop: "norm", name: "norm", pkg: "math/big", typ: $funcType([], [nat], false)}, {prop: "make", name: "make", pkg: "math/big", typ: $funcType([$Int], [nat], false)}, {prop: "setWord", name: "setWord", pkg: "math/big", typ: $funcType([Word], [nat], false)}, {prop: "setUint64", name: "setUint64", pkg: "math/big", typ: $funcType([$Uint64], [nat], false)}, {prop: "set", name: "set", pkg: "math/big", typ: $funcType([nat], [nat], false)}, {prop: "add", name: "add", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "sub", name: "sub", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "cmp", name: "cmp", pkg: "math/big", typ: $funcType([nat], [$Int], false)}, {prop: "mulAddWW", name: "mulAddWW", pkg: "math/big", typ: $funcType([nat, Word, Word], [nat], false)}, {prop: "montgomery", name: "montgomery", pkg: "math/big", typ: $funcType([nat, nat, nat, Word, $Int], [nat], false)}, {prop: "mul", name: "mul", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "sqr", name: "sqr", pkg: "math/big", typ: $funcType([nat], [nat], false)}, {prop: "mulRange", name: "mulRange", pkg: "math/big", typ: $funcType([$Uint64, $Uint64], [nat], false)}, {prop: "divW", name: "divW", pkg: "math/big", typ: $funcType([nat, Word], [nat, Word], false)}, {prop: "div", name: "div", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat, nat], false)}, {prop: "divLarge", name: "divLarge", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat, nat], false)}, {prop: "bitLen", name: "bitLen", pkg: "math/big", typ: $funcType([], [$Int], false)}, {prop: "trailingZeroBits", name: "trailingZeroBits", pkg: "math/big", typ: $funcType([], [$Uint], false)}, {prop: "shl", name: "shl", pkg: "math/big", typ: $funcType([nat, $Uint], [nat], false)}, {prop: "shr", name: "shr", pkg: "math/big", typ: $funcType([nat, $Uint], [nat], false)}, {prop: "setBit", name: "setBit", pkg: "math/big", typ: $funcType([nat, $Uint, $Uint], [nat], false)}, {prop: "bit", name: "bit", pkg: "math/big", typ: $funcType([$Uint], [$Uint], false)}, {prop: "sticky", name: "sticky", pkg: "math/big", typ: $funcType([$Uint], [$Uint], false)}, {prop: "and", name: "and", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "andNot", name: "andNot", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "or", name: "or", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "xor", name: "xor", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "modW", name: "modW", pkg: "math/big", typ: $funcType([Word], [Word], false)}, {prop: "random", name: "random", pkg: "math/big", typ: $funcType([ptrType$6, nat, $Int], [nat], false)}, {prop: "expNN", name: "expNN", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "expNNWindowed", name: "expNNWindowed", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "expNNMontgomery", name: "expNNMontgomery", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "bytes", name: "bytes", pkg: "math/big", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "setBytes", name: "setBytes", pkg: "math/big", typ: $funcType([sliceType$1], [nat], false)}, {prop: "sqrt", name: "sqrt", pkg: "math/big", typ: $funcType([nat], [nat], false)}, {prop: "scan", name: "scan", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int, $Bool], [nat, $Int, $Int, $error], false)}, {prop: "utoa", name: "utoa", pkg: "math/big", typ: $funcType([$Int], [sliceType$1], false)}, {prop: "itoa", name: "itoa", pkg: "math/big", typ: $funcType([$Bool, $Int], [sliceType$1], false)}, {prop: "convertWords", name: "convertWords", pkg: "math/big", typ: $funcType([sliceType$1, Word, $Int, Word, sliceType$3], [], false)}, {prop: "expWW", name: "expWW", pkg: "math/big", typ: $funcType([Word, Word], [nat], false)}, {prop: "probablyPrimeMillerRabin", name: "probablyPrimeMillerRabin", pkg: "math/big", typ: $funcType([$Int, $Bool], [$Bool], false)}, {prop: "probablyPrimeLucas", name: "probablyPrimeLucas", pkg: "math/big", typ: $funcType([], [$Bool], false)}]; + ptrType$2.methods = [{prop: "SetFloat64", name: "SetFloat64", pkg: "", typ: $funcType([$Float64], [ptrType$2], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [$Float32, $Bool], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64, $Bool], false)}, {prop: "SetFrac", name: "SetFrac", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$2], false)}, {prop: "SetFrac64", name: "SetFrac64", pkg: "", typ: $funcType([$Int64, $Int64], [ptrType$2], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([ptrType$1], [ptrType$2], false)}, {prop: "SetInt64", name: "SetInt64", pkg: "", typ: $funcType([$Int64], [ptrType$2], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Abs", name: "Abs", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Neg", name: "Neg", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Inv", name: "Inv", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsInt", name: "IsInt", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Num", name: "Num", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Denom", name: "Denom", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "norm", name: "norm", pkg: "math/big", typ: $funcType([], [ptrType$2], false)}, {prop: "Cmp", name: "Cmp", pkg: "", typ: $funcType([ptrType$2], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Quo", name: "Quo", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([fmt.ScanState, $Int32], [$error], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [ptrType$2, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "marshal", name: "marshal", pkg: "math/big", typ: $funcType([], [sliceType$1], false)}, {prop: "RatString", name: "RatString", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FloatString", name: "FloatString", pkg: "", typ: $funcType([$Int], [$String], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}]; + decimal.init("math/big", [{prop: "mant", name: "mant", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "exp", name: "exp", embedded: false, exported: false, typ: $Int, tag: ""}]); + Float.init("math/big", [{prop: "prec", name: "prec", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "mode", name: "mode", embedded: false, exported: false, typ: RoundingMode, tag: ""}, {prop: "acc", name: "acc", embedded: false, exported: false, typ: Accuracy, tag: ""}, {prop: "form", name: "form", embedded: false, exported: false, typ: form, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mant", name: "mant", embedded: false, exported: false, typ: nat, tag: ""}, {prop: "exp", name: "exp", embedded: false, exported: false, typ: $Int32, tag: ""}]); + ErrNaN.init("math/big", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}]); + Int.init("math/big", [{prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "abs", name: "abs", embedded: false, exported: false, typ: nat, tag: ""}]); + byteReader.init("", [{prop: "ScanState", name: "ScanState", embedded: true, exported: true, typ: fmt.ScanState, tag: ""}]); + nat.init(Word); + divisor.init("math/big", [{prop: "bbb", name: "bbb", embedded: false, exported: false, typ: nat, tag: ""}, {prop: "nbits", name: "nbits", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ndigits", name: "ndigits", embedded: false, exported: false, typ: $Int, tag: ""}]); + Rat.init("math/big", [{prop: "a", name: "a", embedded: false, exported: false, typ: Int, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: Int, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nosync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bits.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + natPool = new nosync.Pool.ptr(sliceType.nil, $throwNilPointerError); + cacheBase10 = new structType.ptr(new nosync.Mutex.ptr(false), arrayType.zero()); + _Accuracy_index = $toNativeArray($kindUint8, [0, 5, 10, 15]); + pow5tab = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 5), new $Uint64(0, 25), new $Uint64(0, 125), new $Uint64(0, 625), new $Uint64(0, 3125), new $Uint64(0, 15625), new $Uint64(0, 78125), new $Uint64(0, 390625), new $Uint64(0, 1953125), new $Uint64(0, 9765625), new $Uint64(0, 48828125), new $Uint64(0, 244140625), new $Uint64(0, 1220703125), new $Uint64(1, 1808548329), new $Uint64(7, 452807053), new $Uint64(35, 2264035265), new $Uint64(177, 2730241733), new $Uint64(888, 766306777), new $Uint64(4440, 3831533885), new $Uint64(22204, 1977800241), new $Uint64(111022, 1299066613), new $Uint64(555111, 2200365769), new $Uint64(2775557, 2411894253), new $Uint64(13877787, 3469536673), new $Uint64(69388939, 167814181), new $Uint64(346944695, 839070905), new $Uint64(1734723475, 4195354525)]); + natOne = new nat([1]); + intOne = new Int.ptr(false, natOne); + natTwo = new nat([2]); + natTen = new nat([10]); + karatsubaThreshold = 40; + basicSqrThreshold = 20; + karatsubaSqrThreshold = 260; + leafSize = 8; + _RoundingMode_index = $toNativeArray($kindUint8, [0, 13, 26, 32, 44, 57, 70]); + _r = NewFloat(0.5); /* */ $s = 12; case 12: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + half = _r; + _r$1 = NewFloat(2); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + two = _r$1; + _r$2 = NewFloat(3); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + three = _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/rand"] = (function() { + var $pkg = {}, $init, errors, js, io, big, rngReader, sliceType, ptrType, ptrType$1, smallPrimesProduct, init, Read, Int; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + big = $packages["math/big"]; + rngReader = $pkg.rngReader = $newType(0, $kindStruct, "rand.rngReader", true, "crypto/rand", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(big.Int); + ptrType$1 = $ptrType(rngReader); + init = function() { + $pkg.Reader = new rngReader.ptr(); + }; + rngReader.ptr.prototype.Read = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, array, b, crypto, err, n, offset, r, randomBytes, require; + n = 0; + err = $ifaceNil; + r = this; + array = b.$array; + offset = $parseInt(b.$offset) >> 0; + crypto = $global.crypto; + if (crypto === undefined) { + crypto = $global.msCrypto; + } + if (!(crypto === undefined)) { + if (!(crypto.getRandomValues === undefined)) { + n = b.$length; + if (n > 65536) { + n = 65536; + } + crypto.getRandomValues(array.subarray(offset, offset + n >> 0)); + _tmp = n; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + return [n, err]; + } + } + require = $global.require; + if (!(require === undefined)) { + randomBytes = require($externalize("crypto", $String)).randomBytes; + if (!(randomBytes === undefined)) { + array.set(randomBytes(b.$length), offset); + _tmp$2 = b.$length; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + return [n, err]; + } + } + _tmp$4 = 0; + _tmp$5 = errors.New("crypto/rand not available in this environment"); + n = _tmp$4; + err = _tmp$5; + return [n, err]; + }; + rngReader.prototype.Read = function(b) { return this.$val.Read(b); }; + Read = function(b) { + var _r, _tuple, b, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + _r = io.ReadFull($pkg.Reader, b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Read }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Read = Read; + Int = function(rand, max) { + var _q, _r, _r$1, _tmp, _tmp$1, _tuple, b, bitLen, bytes, err, k, max, n, rand, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; b = $f.b; bitLen = $f.bitLen; bytes = $f.bytes; err = $f.err; k = $f.k; max = $f.max; n = $f.n; rand = $f.rand; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = ptrType.nil; + err = $ifaceNil; + if (max.Sign() <= 0) { + $panic(new $String("crypto/rand: argument to Int is <= 0")); + } + n = new big.Int.ptr(false, big.nat.nil); + n.Sub(max, n.SetUint64(new $Uint64(0, 1))); + bitLen = n.BitLen(); + if (bitLen === 0) { + $s = -1; return [n, err]; + } + k = (_q = ((bitLen + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + b = (((_r = bitLen % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)); + if (b === 0) { + b = 8; + } + bytes = $makeSlice(sliceType, k); + /* while (true) { */ case 1: + _r$1 = io.ReadFull(rand, bytes); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType.nil; + _tmp$1 = err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0] = (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & (((((((y = b, y < 32 ? (1 << y) : 0) >> 0)) - 1 >> 0) << 24 >>> 24)))) >>> 0)); + n.SetBytes(bytes); + if (n.Cmp(max) < 0) { + $s = -1; return [n, err]; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Int }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.b = b; $f.bitLen = bitLen; $f.bytes = bytes; $f.err = err; $f.k = k; $f.max = max; $f.n = n; $f.rand = rand; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Int = Int; + ptrType$1.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + rngReader.init("", []); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.Reader = $ifaceNil; + smallPrimesProduct = new big.Int.ptr(false, big.nat.nil).SetUint64(new $Uint64(3793877372, 820596253)); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto"] = (function() { + var $pkg = {}, $init, hash, io, strconv, Hash, PublicKey, PrivateKey, Signer, SignerOpts, Decrypter, DecrypterOpts, sliceType, funcType, sliceType$1, digestSizes, hashes, RegisterHash; + hash = $packages["hash"]; + io = $packages["io"]; + strconv = $packages["strconv"]; + Hash = $pkg.Hash = $newType(4, $kindUint, "crypto.Hash", true, "crypto", true, null); + PublicKey = $pkg.PublicKey = $newType(8, $kindInterface, "crypto.PublicKey", true, "crypto", true, null); + PrivateKey = $pkg.PrivateKey = $newType(8, $kindInterface, "crypto.PrivateKey", true, "crypto", true, null); + Signer = $pkg.Signer = $newType(8, $kindInterface, "crypto.Signer", true, "crypto", true, null); + SignerOpts = $pkg.SignerOpts = $newType(8, $kindInterface, "crypto.SignerOpts", true, "crypto", true, null); + Decrypter = $pkg.Decrypter = $newType(8, $kindInterface, "crypto.Decrypter", true, "crypto", true, null); + DecrypterOpts = $pkg.DecrypterOpts = $newType(8, $kindInterface, "crypto.DecrypterOpts", true, "crypto", true, null); + sliceType = $sliceType($Uint8); + funcType = $funcType([], [hash.Hash], false); + sliceType$1 = $sliceType(funcType); + Hash.prototype.HashFunc = function() { + var h; + h = this.$val; + return h; + }; + $ptrType(Hash).prototype.HashFunc = function() { return new Hash(this.$get()).HashFunc(); }; + Hash.prototype.Size = function() { + var h; + h = this.$val; + if (h > 0 && h < 20) { + return ((((h < 0 || h >= digestSizes.$length) ? ($throwRuntimeError("index out of range"), undefined) : digestSizes.$array[digestSizes.$offset + h]) >> 0)); + } + $panic(new $String("crypto: Size of unknown hash function")); + }; + $ptrType(Hash).prototype.Size = function() { return new Hash(this.$get()).Size(); }; + Hash.prototype.New = function() { + var _r, f, h, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; h = $f.h; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this.$val; + /* */ if (h > 0 && h < 20) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (h > 0 && h < 20) { */ case 1: + f = ((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h]); + /* */ if (!(f === $throwNilPointerError)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(f === $throwNilPointerError)) { */ case 3: + _r = f(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 4: + /* } */ case 2: + $panic(new $String("crypto: requested hash function #" + strconv.Itoa(((h >> 0))) + " is unavailable")); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Hash.prototype.New }; } $f._r = _r; $f.f = f; $f.h = h; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Hash).prototype.New = function() { return new Hash(this.$get()).New(); }; + Hash.prototype.Available = function() { + var h; + h = this.$val; + return h < 20 && !(((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h]) === $throwNilPointerError); + }; + $ptrType(Hash).prototype.Available = function() { return new Hash(this.$get()).Available(); }; + RegisterHash = function(h, f) { + var f, h; + if (h >= 20) { + $panic(new $String("crypto: RegisterHash of unknown hash function")); + } + ((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h] = f); + }; + $pkg.RegisterHash = RegisterHash; + Hash.methods = [{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [Hash], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [hash.Hash], false)}, {prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Bool], false)}]; + PublicKey.init([]); + PrivateKey.init([]); + Signer.init([{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [PublicKey], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, SignerOpts], [sliceType, $error], false)}]); + SignerOpts.init([{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [Hash], false)}]); + Decrypter.init([{prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([io.Reader, sliceType, DecrypterOpts], [sliceType, $error], false)}, {prop: "Public", name: "Public", pkg: "", typ: $funcType([], [PublicKey], false)}]); + DecrypterOpts.init([]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = hash.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + digestSizes = new sliceType([0, 16, 16, 20, 28, 32, 48, 64, 36, 20, 28, 32, 48, 64, 28, 32, 32, 32, 48, 64]); + hashes = $makeSlice(sliceType$1, 20); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/internal/subtle"] = (function() { + var $pkg = {}, $init, js, ptrType, AnyOverlap, InexactOverlap; + js = $packages["github.com/gopherjs/gopherjs/js"]; + ptrType = $ptrType($Uint8); + AnyOverlap = function(x, y) { + var x, y; + return x.$length > 0 && y.$length > 0 && x.$array === y.$array && ($parseInt(x.$offset) >> 0) <= ((($parseInt(y.$offset) >> 0) + y.$length >> 0) - 1 >> 0) && ($parseInt(y.$offset) >> 0) <= ((($parseInt(x.$offset) >> 0) + x.$length >> 0) - 1 >> 0); + }; + $pkg.AnyOverlap = AnyOverlap; + InexactOverlap = function(x, y) { + var x, y; + if ((x.$length === 0) || (y.$length === 0) || $indexPtr(x.$array, x.$offset + 0, ptrType) === $indexPtr(y.$array, y.$offset + 0, ptrType)) { + return false; + } + return AnyOverlap(x, y); + }; + $pkg.InexactOverlap = InexactOverlap; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/subtle"] = (function() { + var $pkg = {}, $init, ConstantTimeCompare, ConstantTimeSelect, ConstantTimeByteEq, ConstantTimeEq, ConstantTimeCopy, ConstantTimeLessOrEq; + ConstantTimeCompare = function(x, y) { + var i, v, x, y; + if (!((x.$length === y.$length))) { + return 0; + } + v = 0; + i = 0; + while (true) { + if (!(i < x.$length)) { break; } + v = (v | (((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) ^ ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) << 24 >>> 24))) >>> 0; + i = i + (1) >> 0; + } + return ConstantTimeByteEq(v, 0); + }; + $pkg.ConstantTimeCompare = ConstantTimeCompare; + ConstantTimeSelect = function(v, x, y) { + var v, x, y; + return ((~((v - 1 >> 0)) >> 0) & x) | (((v - 1 >> 0)) & y); + }; + $pkg.ConstantTimeSelect = ConstantTimeSelect; + ConstantTimeByteEq = function(x, y) { + var x, y; + return (((((((((x ^ y) << 24 >>> 24) >>> 0)) - 1 >>> 0)) >>> 31 >>> 0) >> 0)); + }; + $pkg.ConstantTimeByteEq = ConstantTimeByteEq; + ConstantTimeEq = function(x, y) { + var x, x$1, y; + return (($shiftRightUint64(((x$1 = (new $Uint64(0, ((((x ^ y) >> 0) >>> 0)))), new $Uint64(x$1.$high - 0, x$1.$low - 1))), 63).$low >> 0)); + }; + $pkg.ConstantTimeEq = ConstantTimeEq; + ConstantTimeCopy = function(v, x, y) { + var i, v, x, xmask, y, ymask; + if (!((x.$length === y.$length))) { + $panic(new $String("subtle: slices have different lengths")); + } + xmask = (((v - 1 >> 0) << 24 >>> 24)); + ymask = (((~((v - 1 >> 0)) >> 0) << 24 >>> 24)); + i = 0; + while (true) { + if (!(i < x.$length)) { break; } + ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = ((((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & xmask) >>> 0) | ((((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]) & ymask) >>> 0)) >>> 0)); + i = i + (1) >> 0; + } + }; + $pkg.ConstantTimeCopy = ConstantTimeCopy; + ConstantTimeLessOrEq = function(x, y) { + var x, x32, y, y32; + x32 = ((x >> 0)); + y32 = ((y >> 0)); + return ((((((((x32 - y32 >> 0) - 1 >> 0)) >> 31 >> 0)) & 1) >> 0)); + }; + $pkg.ConstantTimeLessOrEq = ConstantTimeLessOrEq; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/cipher"] = (function() { + var $pkg = {}, $init, subtle, subtle$1, errors, io, runtime, cbc, cbcEncrypter, cbcEncAble, cbcDecrypter, cbcDecAble, Block, Stream, BlockMode, ctr, ctrAble, AEAD, gcmAble, gcmFieldElement, gcm, StreamReader, sliceType, sliceType$1, ptrType, ptrType$1, arrayType, arrayType$1, ptrType$3, ptrType$4, ptrType$5, ptrType$6, errOpen, gcmReductionTable, newCBC, NewCBCEncrypter, NewCBCDecrypter, dup, NewCTR, NewGCM, newGCMWithNonceAndTagSize, reverseBits, gcmAdd, gcmDouble, gcmInc32, sliceForAppend, getUint64, putUint64, fastXORBytes, safeXORBytes, xorBytes, fastXORWords, xorWords; + subtle = $packages["crypto/internal/subtle"]; + subtle$1 = $packages["crypto/subtle"]; + errors = $packages["errors"]; + io = $packages["io"]; + runtime = $packages["runtime"]; + cbc = $pkg.cbc = $newType(0, $kindStruct, "cipher.cbc", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { + this.$val = this; + if (arguments.length === 0) { + this.b = $ifaceNil; + this.blockSize = 0; + this.iv = sliceType$1.nil; + this.tmp = sliceType$1.nil; + return; + } + this.b = b_; + this.blockSize = blockSize_; + this.iv = iv_; + this.tmp = tmp_; + }); + cbcEncrypter = $pkg.cbcEncrypter = $newType(0, $kindStruct, "cipher.cbcEncrypter", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { + this.$val = this; + if (arguments.length === 0) { + this.b = $ifaceNil; + this.blockSize = 0; + this.iv = sliceType$1.nil; + this.tmp = sliceType$1.nil; + return; + } + this.b = b_; + this.blockSize = blockSize_; + this.iv = iv_; + this.tmp = tmp_; + }); + cbcEncAble = $pkg.cbcEncAble = $newType(8, $kindInterface, "cipher.cbcEncAble", true, "crypto/cipher", false, null); + cbcDecrypter = $pkg.cbcDecrypter = $newType(0, $kindStruct, "cipher.cbcDecrypter", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { + this.$val = this; + if (arguments.length === 0) { + this.b = $ifaceNil; + this.blockSize = 0; + this.iv = sliceType$1.nil; + this.tmp = sliceType$1.nil; + return; + } + this.b = b_; + this.blockSize = blockSize_; + this.iv = iv_; + this.tmp = tmp_; + }); + cbcDecAble = $pkg.cbcDecAble = $newType(8, $kindInterface, "cipher.cbcDecAble", true, "crypto/cipher", false, null); + Block = $pkg.Block = $newType(8, $kindInterface, "cipher.Block", true, "crypto/cipher", true, null); + Stream = $pkg.Stream = $newType(8, $kindInterface, "cipher.Stream", true, "crypto/cipher", true, null); + BlockMode = $pkg.BlockMode = $newType(8, $kindInterface, "cipher.BlockMode", true, "crypto/cipher", true, null); + ctr = $pkg.ctr = $newType(0, $kindStruct, "cipher.ctr", true, "crypto/cipher", false, function(b_, ctr_, out_, outUsed_) { + this.$val = this; + if (arguments.length === 0) { + this.b = $ifaceNil; + this.ctr = sliceType$1.nil; + this.out = sliceType$1.nil; + this.outUsed = 0; + return; + } + this.b = b_; + this.ctr = ctr_; + this.out = out_; + this.outUsed = outUsed_; + }); + ctrAble = $pkg.ctrAble = $newType(8, $kindInterface, "cipher.ctrAble", true, "crypto/cipher", false, null); + AEAD = $pkg.AEAD = $newType(8, $kindInterface, "cipher.AEAD", true, "crypto/cipher", true, null); + gcmAble = $pkg.gcmAble = $newType(8, $kindInterface, "cipher.gcmAble", true, "crypto/cipher", false, null); + gcmFieldElement = $pkg.gcmFieldElement = $newType(0, $kindStruct, "cipher.gcmFieldElement", true, "crypto/cipher", false, function(low_, high_) { + this.$val = this; + if (arguments.length === 0) { + this.low = new $Uint64(0, 0); + this.high = new $Uint64(0, 0); + return; + } + this.low = low_; + this.high = high_; + }); + gcm = $pkg.gcm = $newType(0, $kindStruct, "cipher.gcm", true, "crypto/cipher", false, function(cipher_, nonceSize_, tagSize_, productTable_) { + this.$val = this; + if (arguments.length === 0) { + this.cipher = $ifaceNil; + this.nonceSize = 0; + this.tagSize = 0; + this.productTable = arrayType$1.zero(); + return; + } + this.cipher = cipher_; + this.nonceSize = nonceSize_; + this.tagSize = tagSize_; + this.productTable = productTable_; + }); + StreamReader = $pkg.StreamReader = $newType(0, $kindStruct, "cipher.StreamReader", true, "crypto/cipher", true, function(S_, R_) { + this.$val = this; + if (arguments.length === 0) { + this.S = $ifaceNil; + this.R = $ifaceNil; + return; + } + this.S = S_; + this.R = R_; + }); + sliceType = $sliceType($Uint16); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(cbcEncrypter); + ptrType$1 = $ptrType(cbcDecrypter); + arrayType = $arrayType($Uint8, 16); + arrayType$1 = $arrayType(gcmFieldElement, 16); + ptrType$3 = $ptrType(ctr); + ptrType$4 = $ptrType(gcmFieldElement); + ptrType$5 = $ptrType(arrayType); + ptrType$6 = $ptrType(gcm); + newCBC = function(b, iv) { + var _r, _r$1, b, iv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; b = $f.b; iv = $f.iv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = b.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = b.BlockSize(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return new cbc.ptr(b, _r, dup(iv), $makeSlice(sliceType$1, _r$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: newCBC }; } $f._r = _r; $f._r$1 = _r$1; $f.b = b; $f.iv = iv; $f.$s = $s; $f.$r = $r; return $f; + }; + NewCBCEncrypter = function(b, iv) { + var _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; b = $f.b; cbc$1 = $f.cbc$1; iv = $f.iv; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = b.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!((iv.$length === _r))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((iv.$length === _r))) { */ case 1: + $panic(new $String("cipher.NewCBCEncrypter: IV length must equal block size")); + /* } */ case 2: + _tuple = $assertType(b, cbcEncAble, true); + cbc$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ok) { */ case 4: + _r$1 = cbc$1.NewCBCEncrypter(iv); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 5: + _r$2 = newCBC(b, iv); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return ($pointerOfStructConversion(_r$2, ptrType)); + /* */ } return; } if ($f === undefined) { $f = { $blk: NewCBCEncrypter }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.b = b; $f.cbc$1 = cbc$1; $f.iv = iv; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewCBCEncrypter = NewCBCEncrypter; + cbcEncrypter.ptr.prototype.BlockSize = function() { + var x; + x = this; + return x.blockSize; + }; + cbcEncrypter.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + cbcEncrypter.ptr.prototype.CryptBlocks = function(dst, src) { + var _r, dst, iv, src, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; dst = $f.dst; iv = $f.iv; src = $f.src; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (!(((_r = src.$length % x.blockSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { + $panic(new $String("crypto/cipher: input not full blocks")); + } + if (dst.$length < src.$length) { + $panic(new $String("crypto/cipher: output smaller than input")); + } + if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { + $panic(new $String("crypto/cipher: invalid buffer overlap")); + } + iv = x.iv; + /* while (true) { */ case 1: + /* if (!(src.$length > 0)) { break; } */ if(!(src.$length > 0)) { $s = 2; continue; } + xorBytes($subslice(dst, 0, x.blockSize), $subslice(src, 0, x.blockSize), iv); + $r = x.b.Encrypt($subslice(dst, 0, x.blockSize), $subslice(dst, 0, x.blockSize)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + iv = $subslice(dst, 0, x.blockSize); + src = $subslice(src, x.blockSize); + dst = $subslice(dst, x.blockSize); + /* } */ $s = 1; continue; case 2: + $copySlice(x.iv, iv); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: cbcEncrypter.ptr.prototype.CryptBlocks }; } $f._r = _r; $f.dst = dst; $f.iv = iv; $f.src = src; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + cbcEncrypter.prototype.CryptBlocks = function(dst, src) { return this.$val.CryptBlocks(dst, src); }; + cbcEncrypter.ptr.prototype.SetIV = function(iv) { + var iv, x; + x = this; + if (!((iv.$length === x.iv.$length))) { + $panic(new $String("cipher: incorrect length IV")); + } + $copySlice(x.iv, iv); + }; + cbcEncrypter.prototype.SetIV = function(iv) { return this.$val.SetIV(iv); }; + NewCBCDecrypter = function(b, iv) { + var _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; b = $f.b; cbc$1 = $f.cbc$1; iv = $f.iv; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = b.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!((iv.$length === _r))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((iv.$length === _r))) { */ case 1: + $panic(new $String("cipher.NewCBCDecrypter: IV length must equal block size")); + /* } */ case 2: + _tuple = $assertType(b, cbcDecAble, true); + cbc$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ok) { */ case 4: + _r$1 = cbc$1.NewCBCDecrypter(iv); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 5: + _r$2 = newCBC(b, iv); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return ($pointerOfStructConversion(_r$2, ptrType$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: NewCBCDecrypter }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.b = b; $f.cbc$1 = cbc$1; $f.iv = iv; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewCBCDecrypter = NewCBCDecrypter; + cbcDecrypter.ptr.prototype.BlockSize = function() { + var x; + x = this; + return x.blockSize; + }; + cbcDecrypter.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + cbcDecrypter.ptr.prototype.CryptBlocks = function(dst, src) { + var _r, _tmp, _tmp$1, dst, end, prev, src, start, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; dst = $f.dst; end = $f.end; prev = $f.prev; src = $f.src; start = $f.start; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (!(((_r = src.$length % x.blockSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { + $panic(new $String("crypto/cipher: input not full blocks")); + } + if (dst.$length < src.$length) { + $panic(new $String("crypto/cipher: output smaller than input")); + } + if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { + $panic(new $String("crypto/cipher: invalid buffer overlap")); + } + if (src.$length === 0) { + $s = -1; return; + } + end = src.$length; + start = end - x.blockSize >> 0; + prev = start - x.blockSize >> 0; + $copySlice(x.tmp, $subslice(src, start, end)); + /* while (true) { */ case 1: + /* if (!(start > 0)) { break; } */ if(!(start > 0)) { $s = 2; continue; } + $r = x.b.Decrypt($subslice(dst, start, end), $subslice(src, start, end)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + xorBytes($subslice(dst, start, end), $subslice(dst, start, end), $subslice(src, prev, start)); + end = start; + start = prev; + prev = prev - (x.blockSize) >> 0; + /* } */ $s = 1; continue; case 2: + $r = x.b.Decrypt($subslice(dst, start, end), $subslice(src, start, end)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + xorBytes($subslice(dst, start, end), $subslice(dst, start, end), x.iv); + _tmp = x.tmp; + _tmp$1 = x.iv; + x.iv = _tmp; + x.tmp = _tmp$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: cbcDecrypter.ptr.prototype.CryptBlocks }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.dst = dst; $f.end = end; $f.prev = prev; $f.src = src; $f.start = start; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + cbcDecrypter.prototype.CryptBlocks = function(dst, src) { return this.$val.CryptBlocks(dst, src); }; + cbcDecrypter.ptr.prototype.SetIV = function(iv) { + var iv, x; + x = this; + if (!((iv.$length === x.iv.$length))) { + $panic(new $String("cipher: incorrect length IV")); + } + $copySlice(x.iv, iv); + }; + cbcDecrypter.prototype.SetIV = function(iv) { return this.$val.SetIV(iv); }; + dup = function(p) { + var p, q; + q = $makeSlice(sliceType$1, p.$length); + $copySlice(q, p); + return q; + }; + NewCTR = function(block, iv) { + var _r, _r$1, _r$2, _r$3, _tuple, block, bufSize, ctr$1, iv, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; block = $f.block; bufSize = $f.bufSize; ctr$1 = $f.ctr$1; iv = $f.iv; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = $assertType(block, ctrAble, true); + ctr$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r = ctr$1.NewCTR(iv); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _r$1 = block.BlockSize(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((iv.$length === _r$1))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((iv.$length === _r$1))) { */ case 4: + $panic(new $String("cipher.NewCTR: IV length must equal block size")); + /* } */ case 5: + bufSize = 512; + _r$2 = block.BlockSize(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (bufSize < _r$2) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (bufSize < _r$2) { */ case 7: + _r$3 = block.BlockSize(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + bufSize = _r$3; + /* } */ case 8: + $s = -1; return new ctr.ptr(block, dup(iv), $makeSlice(sliceType$1, 0, bufSize), 0); + /* */ } return; } if ($f === undefined) { $f = { $blk: NewCTR }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.block = block; $f.bufSize = bufSize; $f.ctr$1 = ctr$1; $f.iv = iv; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewCTR = NewCTR; + ctr.ptr.prototype.refill = function() { + var _r, bs, i, remain, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; bs = $f.bs; i = $f.i; remain = $f.remain; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + remain = x.out.$length - x.outUsed >> 0; + $copySlice(x.out, $subslice(x.out, x.outUsed)); + x.out = $subslice(x.out, 0, x.out.$capacity); + _r = x.b.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + bs = _r; + /* while (true) { */ case 2: + /* if (!(remain <= (x.out.$length - bs >> 0))) { break; } */ if(!(remain <= (x.out.$length - bs >> 0))) { $s = 3; continue; } + $r = x.b.Encrypt($subslice(x.out, remain), x.ctr); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + remain = remain + (bs) >> 0; + i = x.ctr.$length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + (x$2 = x.ctr, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = ((x$1 = x.ctr, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])) + (1) << 24 >>> 24))); + if (!(((x$3 = x.ctr, ((i < 0 || i >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i])) === 0))) { + break; + } + i = i - (1) >> 0; + } + /* } */ $s = 2; continue; case 3: + x.out = $subslice(x.out, 0, remain); + x.outUsed = 0; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: ctr.ptr.prototype.refill }; } $f._r = _r; $f.bs = bs; $f.i = i; $f.remain = remain; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + ctr.prototype.refill = function() { return this.$val.refill(); }; + ctr.ptr.prototype.XORKeyStream = function(dst, src) { + var _r, dst, n, src, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; dst = $f.dst; n = $f.n; src = $f.src; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = this; + if (dst.$length < src.$length) { + $panic(new $String("crypto/cipher: output smaller than input")); + } + if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { + $panic(new $String("crypto/cipher: invalid buffer overlap")); + } + /* while (true) { */ case 1: + /* if (!(src.$length > 0)) { break; } */ if(!(src.$length > 0)) { $s = 2; continue; } + _r = x.b.BlockSize(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (x.outUsed >= (x.out.$length - _r >> 0)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (x.outUsed >= (x.out.$length - _r >> 0)) { */ case 3: + $r = x.refill(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + n = xorBytes(dst, src, $subslice(x.out, x.outUsed)); + dst = $subslice(dst, n); + src = $subslice(src, n); + x.outUsed = x.outUsed + (n) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: ctr.ptr.prototype.XORKeyStream }; } $f._r = _r; $f.dst = dst; $f.n = n; $f.src = src; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + ctr.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; + NewGCM = function(cipher) { + var _r, cipher, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; cipher = $f.cipher; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = newGCMWithNonceAndTagSize(cipher, 12, 16); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: NewGCM }; } $f._r = _r; $f.cipher = cipher; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewGCM = NewGCM; + newGCMWithNonceAndTagSize = function(cipher, nonceSize, tagSize) { + var _q, _r, _r$1, _tuple, cipher, cipher$1, g, i, key, nonceSize, ok, tagSize, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; cipher = $f.cipher; cipher$1 = $f.cipher$1; g = $f.g; i = $f.i; key = $f.key; nonceSize = $f.nonceSize; ok = $f.ok; tagSize = $f.tagSize; x = $f.x; x$1 = $f.x$1; x$10 = $f.x$10; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = [x]; + if (tagSize < 12 || tagSize > 16) { + $s = -1; return [$ifaceNil, errors.New("cipher: incorrect tag size given to GCM")]; + } + _tuple = $assertType(cipher, gcmAble, true); + cipher$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r = cipher$1.NewGCM(nonceSize, tagSize); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _r$1 = cipher.BlockSize(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((_r$1 === 16))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((_r$1 === 16))) { */ case 4: + $s = -1; return [$ifaceNil, errors.New("cipher: NewGCM requires 128-bit block cipher")]; + /* } */ case 5: + key = arrayType.zero(); + $r = cipher.Encrypt(new sliceType$1(key), new sliceType$1(key)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + g = new gcm.ptr(cipher, nonceSize, tagSize, arrayType$1.zero()); + x[0] = new gcmFieldElement.ptr(getUint64($subslice(new sliceType$1(key), 0, 8)), getUint64($subslice(new sliceType$1(key), 8))); + gcmFieldElement.copy((x$1 = g.productTable, x$2 = reverseBits(1), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), x[0]); + i = 2; + while (true) { + if (!(i < 16)) { break; } + gcmFieldElement.copy((x$5 = g.productTable, x$6 = reverseBits(i), ((x$6 < 0 || x$6 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[x$6])), gcmDouble((x$3 = g.productTable, x$4 = reverseBits((_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((x$4 < 0 || x$4 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[x$4])))); + gcmFieldElement.copy((x$9 = g.productTable, x$10 = reverseBits(i + 1 >> 0), ((x$10 < 0 || x$10 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[x$10])), gcmAdd((x$7 = g.productTable, x$8 = reverseBits(i), ((x$8 < 0 || x$8 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[x$8])), x[0])); + i = i + (2) >> 0; + } + $s = -1; return [g, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: newGCMWithNonceAndTagSize }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.cipher = cipher; $f.cipher$1 = cipher$1; $f.g = g; $f.i = i; $f.key = key; $f.nonceSize = nonceSize; $f.ok = ok; $f.tagSize = tagSize; $f.x = x; $f.x$1 = x$1; $f.x$10 = x$10; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + gcm.ptr.prototype.NonceSize = function() { + var g; + g = this; + return g.nonceSize; + }; + gcm.prototype.NonceSize = function() { return this.$val.NonceSize(); }; + gcm.ptr.prototype.Overhead = function() { + var g; + g = this; + return g.tagSize; + }; + gcm.prototype.Overhead = function() { return this.$val.Overhead(); }; + gcm.ptr.prototype.Seal = function(dst, nonce, plaintext, data) { + var _r, _tmp, _tmp$1, _tuple, counter, data, dst, g, nonce, out, plaintext, ret, tag, tagMask, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; counter = $f.counter; data = $f.data; dst = $f.dst; g = $f.g; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; ret = $f.ret; tag = $f.tag; tagMask = $f.tagMask; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + counter = [counter]; + tagMask = [tagMask]; + g = this; + if (!((nonce.$length === g.nonceSize))) { + $panic(new $String("crypto/cipher: incorrect nonce length given to GCM")); + } + _r = g.cipher.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if ((x = (new $Uint64(0, plaintext.$length)), x$1 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = (new $Uint64(0, plaintext.$length)), x$1 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { */ case 1: + $panic(new $String("crypto/cipher: message too large for GCM")); + /* } */ case 2: + _tuple = sliceForAppend(dst, plaintext.$length + g.tagSize >> 0); + ret = _tuple[0]; + out = _tuple[1]; + if (subtle.InexactOverlap(out, plaintext)) { + $panic(new $String("crypto/cipher: invalid buffer overlap")); + } + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + counter[0] = $clone(_tmp, arrayType); + tagMask[0] = $clone(_tmp$1, arrayType); + g.deriveCounter(counter[0], nonce); + $r = g.cipher.Encrypt(new sliceType$1(tagMask[0]), new sliceType$1(counter[0])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + gcmInc32(counter[0]); + $r = g.counterCrypt(out, plaintext, counter[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + tag = arrayType.zero(); + g.auth(new sliceType$1(tag), $subslice(out, 0, plaintext.$length), data, tagMask[0]); + $copySlice($subslice(out, plaintext.$length), new sliceType$1(tag)); + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: gcm.ptr.prototype.Seal }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.counter = counter; $f.data = data; $f.dst = dst; $f.g = g; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.ret = ret; $f.tag = tag; $f.tagMask = tagMask; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + gcm.prototype.Seal = function(dst, nonce, plaintext, data) { return this.$val.Seal(dst, nonce, plaintext, data); }; + gcm.ptr.prototype.Open = function(dst, nonce, ciphertext, data) { + var _i, _r, _ref, _tmp, _tmp$1, _tuple, ciphertext, counter, data, dst, expectedTag, g, i, nonce, out, ret, tag, tagMask, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; ciphertext = $f.ciphertext; counter = $f.counter; data = $f.data; dst = $f.dst; expectedTag = $f.expectedTag; g = $f.g; i = $f.i; nonce = $f.nonce; out = $f.out; ret = $f.ret; tag = $f.tag; tagMask = $f.tagMask; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + counter = [counter]; + tagMask = [tagMask]; + g = this; + if (!((nonce.$length === g.nonceSize))) { + $panic(new $String("crypto/cipher: incorrect nonce length given to GCM")); + } + if (g.tagSize < 12) { + $panic(new $String("crypto/cipher: incorrect GCM tag size")); + } + if (ciphertext.$length < g.tagSize) { + $s = -1; return [sliceType$1.nil, errOpen]; + } + _r = g.cipher.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if ((x = (new $Uint64(0, ciphertext.$length)), x$1 = (x$2 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), x$3 = (new $Uint64(0, g.tagSize)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = (new $Uint64(0, ciphertext.$length)), x$1 = (x$2 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), x$3 = (new $Uint64(0, g.tagSize)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { */ case 1: + $s = -1; return [sliceType$1.nil, errOpen]; + /* } */ case 2: + tag = $subslice(ciphertext, (ciphertext.$length - g.tagSize >> 0)); + ciphertext = $subslice(ciphertext, 0, (ciphertext.$length - g.tagSize >> 0)); + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + counter[0] = $clone(_tmp, arrayType); + tagMask[0] = $clone(_tmp$1, arrayType); + g.deriveCounter(counter[0], nonce); + $r = g.cipher.Encrypt(new sliceType$1(tagMask[0]), new sliceType$1(counter[0])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + gcmInc32(counter[0]); + expectedTag = arrayType.zero(); + g.auth(new sliceType$1(expectedTag), ciphertext, data, tagMask[0]); + _tuple = sliceForAppend(dst, ciphertext.$length); + ret = _tuple[0]; + out = _tuple[1]; + if (subtle.InexactOverlap(out, ciphertext)) { + $panic(new $String("crypto/cipher: invalid buffer overlap")); + } + if (!((subtle$1.ConstantTimeCompare($subslice(new sliceType$1(expectedTag), 0, g.tagSize), tag) === 1))) { + _ref = out; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = 0); + _i++; + } + $s = -1; return [sliceType$1.nil, errOpen]; + } + $r = g.counterCrypt(out, ciphertext, counter[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ret, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: gcm.ptr.prototype.Open }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.ciphertext = ciphertext; $f.counter = counter; $f.data = data; $f.dst = dst; $f.expectedTag = expectedTag; $f.g = g; $f.i = i; $f.nonce = nonce; $f.out = out; $f.ret = ret; $f.tag = tag; $f.tagMask = tagMask; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + gcm.prototype.Open = function(dst, nonce, ciphertext, data) { return this.$val.Open(dst, nonce, ciphertext, data); }; + reverseBits = function(i) { + var i; + i = ((((i << 2 >> 0)) & 12)) | ((((i >> 2 >> 0)) & 3)); + i = ((((i << 1 >> 0)) & 10)) | ((((i >> 1 >> 0)) & 5)); + return i; + }; + gcmAdd = function(x, y) { + var x, x$1, x$2, x$3, x$4, y; + return new gcmFieldElement.ptr((x$1 = x.low, x$2 = y.low, new $Uint64(x$1.$high ^ x$2.$high, (x$1.$low ^ x$2.$low) >>> 0)), (x$3 = x.high, x$4 = y.high, new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0))); + }; + gcmDouble = function(x) { + var double$1, msbSet, x, x$1, x$2, x$3, x$4, x$5, x$6; + double$1 = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); + msbSet = (x$1 = (x$2 = x.high, new $Uint64(x$2.$high & 0, (x$2.$low & 1) >>> 0)), (x$1.$high === 0 && x$1.$low === 1)); + double$1.high = $shiftRightUint64(x.high, 1); + double$1.high = (x$3 = double$1.high, x$4 = $shiftLeft64(x.low, 63), new $Uint64(x$3.$high | x$4.$high, (x$3.$low | x$4.$low) >>> 0)); + double$1.low = $shiftRightUint64(x.low, 1); + if (msbSet) { + double$1.low = (x$5 = double$1.low, x$6 = new $Uint64(3774873600, 0), new $Uint64(x$5.$high ^ x$6.$high, (x$5.$low ^ x$6.$low) >>> 0)); + } + return double$1; + }; + gcm.ptr.prototype.mul = function(y) { + var g, i, j, msw, t, word, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, z; + g = this; + z = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); + i = 0; + while (true) { + if (!(i < 2)) { break; } + word = y.high; + if (i === 1) { + word = y.low; + } + j = 0; + while (true) { + if (!(j < 64)) { break; } + msw = (x = z.high, new $Uint64(x.$high & 0, (x.$low & 15) >>> 0)); + z.high = $shiftRightUint64(z.high, (4)); + z.high = (x$1 = z.high, x$2 = $shiftLeft64(z.low, 60), new $Uint64(x$1.$high | x$2.$high, (x$1.$low | x$2.$low) >>> 0)); + z.low = $shiftRightUint64(z.low, (4)); + z.low = (x$3 = z.low, x$4 = $shiftLeft64((new $Uint64(0, (($flatten64(msw) < 0 || $flatten64(msw) >= gcmReductionTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : gcmReductionTable.$array[gcmReductionTable.$offset + $flatten64(msw)]))), 48), new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0)); + t = (x$5 = g.productTable, x$6 = new $Uint64(word.$high & 0, (word.$low & 15) >>> 0), (($flatten64(x$6) < 0 || $flatten64(x$6) >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[$flatten64(x$6)])); + z.low = (x$7 = z.low, x$8 = t.low, new $Uint64(x$7.$high ^ x$8.$high, (x$7.$low ^ x$8.$low) >>> 0)); + z.high = (x$9 = z.high, x$10 = t.high, new $Uint64(x$9.$high ^ x$10.$high, (x$9.$low ^ x$10.$low) >>> 0)); + word = $shiftRightUint64(word, (4)); + j = j + (4) >> 0; + } + i = i + (1) >> 0; + } + gcmFieldElement.copy(y, z); + }; + gcm.prototype.mul = function(y) { return this.$val.mul(y); }; + gcm.ptr.prototype.updateBlocks = function(y, blocks) { + var blocks, g, x, x$1, x$2, x$3, y; + g = this; + while (true) { + if (!(blocks.$length > 0)) { break; } + y.low = (x = y.low, x$1 = getUint64(blocks), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); + y.high = (x$2 = y.high, x$3 = getUint64($subslice(blocks, 8)), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)); + g.mul(y); + blocks = $subslice(blocks, 16); + } + }; + gcm.prototype.updateBlocks = function(y, blocks) { return this.$val.updateBlocks(y, blocks); }; + gcm.ptr.prototype.update = function(y, data) { + var data, fullBlocks, g, partialBlock, y; + g = this; + fullBlocks = ((data.$length >> 4 >> 0)) << 4 >> 0; + g.updateBlocks(y, $subslice(data, 0, fullBlocks)); + if (!((data.$length === fullBlocks))) { + partialBlock = arrayType.zero(); + $copySlice(new sliceType$1(partialBlock), $subslice(data, fullBlocks)); + g.updateBlocks(y, new sliceType$1(partialBlock)); + } + }; + gcm.prototype.update = function(y, data) { return this.$val.update(y, data); }; + gcmInc32 = function(counterBlock) { + var counterBlock, i; + i = 15; + while (true) { + if (!(i >= 12)) { break; } + counterBlock.nilCheck, ((i < 0 || i >= counterBlock.length) ? ($throwRuntimeError("index out of range"), undefined) : counterBlock[i] = ((counterBlock.nilCheck, ((i < 0 || i >= counterBlock.length) ? ($throwRuntimeError("index out of range"), undefined) : counterBlock[i])) + (1) << 24 >>> 24)); + if (!(((counterBlock.nilCheck, ((i < 0 || i >= counterBlock.length) ? ($throwRuntimeError("index out of range"), undefined) : counterBlock[i])) === 0))) { + break; + } + i = i - (1) >> 0; + } + }; + sliceForAppend = function(in$1, n) { + var head, in$1, n, tail, total; + head = sliceType$1.nil; + tail = sliceType$1.nil; + total = in$1.$length + n >> 0; + if (in$1.$capacity >= total) { + head = $subslice(in$1, 0, total); + } else { + head = $makeSlice(sliceType$1, total); + $copySlice(head, in$1); + } + tail = $subslice(head, in$1.$length); + return [head, tail]; + }; + gcm.ptr.prototype.counterCrypt = function(out, in$1, counter) { + var counter, g, in$1, mask, out, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; counter = $f.counter; g = $f.g; in$1 = $f.in$1; mask = $f.mask; out = $f.out; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + mask = arrayType.zero(); + /* while (true) { */ case 1: + /* if (!(in$1.$length >= 16)) { break; } */ if(!(in$1.$length >= 16)) { $s = 2; continue; } + $r = g.cipher.Encrypt(new sliceType$1(mask), new sliceType$1(counter)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + gcmInc32(counter); + xorWords(out, in$1, new sliceType$1(mask)); + out = $subslice(out, 16); + in$1 = $subslice(in$1, 16); + /* } */ $s = 1; continue; case 2: + /* */ if (in$1.$length > 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (in$1.$length > 0) { */ case 4: + $r = g.cipher.Encrypt(new sliceType$1(mask), new sliceType$1(counter)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + gcmInc32(counter); + xorBytes(out, in$1, new sliceType$1(mask)); + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: gcm.ptr.prototype.counterCrypt }; } $f.counter = counter; $f.g = g; $f.in$1 = in$1; $f.mask = mask; $f.out = out; $f.$s = $s; $f.$r = $r; return $f; + }; + gcm.prototype.counterCrypt = function(out, in$1, counter) { return this.$val.counterCrypt(out, in$1, counter); }; + gcm.ptr.prototype.deriveCounter = function(counter, nonce) { + var counter, g, nonce, x, x$1, y; + g = this; + if (nonce.$length === 12) { + $copySlice(new sliceType$1(counter), nonce); + counter.nilCheck, counter[15] = 1; + } else { + y = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); + g.update(y, nonce); + y.high = (x = y.high, x$1 = $mul64((new $Uint64(0, nonce.$length)), new $Uint64(0, 8)), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); + g.mul(y); + putUint64($subslice(new sliceType$1(counter), 0, 8), y.low); + putUint64($subslice(new sliceType$1(counter), 8), y.high); + } + }; + gcm.prototype.deriveCounter = function(counter, nonce) { return this.$val.deriveCounter(counter, nonce); }; + gcm.ptr.prototype.auth = function(out, ciphertext, additionalData, tagMask) { + var additionalData, ciphertext, g, out, tagMask, x, x$1, x$2, x$3, y; + g = this; + y = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); + g.update(y, additionalData); + g.update(y, ciphertext); + y.low = (x = y.low, x$1 = $mul64((new $Uint64(0, additionalData.$length)), new $Uint64(0, 8)), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); + y.high = (x$2 = y.high, x$3 = $mul64((new $Uint64(0, ciphertext.$length)), new $Uint64(0, 8)), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)); + g.mul(y); + putUint64(out, y.low); + putUint64($subslice(out, 8), y.high); + xorWords(out, out, new sliceType$1(tagMask)); + }; + gcm.prototype.auth = function(out, ciphertext, additionalData, tagMask) { return this.$val.auth(out, ciphertext, additionalData, tagMask); }; + getUint64 = function(data) { + var data, r, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 7])); + r = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = $shiftLeft64((new $Uint64(0, (0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]))), 56), x$7 = $shiftLeft64((new $Uint64(0, (1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]))), 48), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]))), 40), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]))), 32), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]))), 24), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]))), 16), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (6 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 6]))), 8), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = (new $Uint64(0, (7 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 7]))), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + return r; + }; + putUint64 = function(out, v) { + var out, v; + $unused((7 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 7])); + (0 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 0] = (($shiftRightUint64(v, 56).$low << 24 >>> 24))); + (1 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 1] = (($shiftRightUint64(v, 48).$low << 24 >>> 24))); + (2 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 2] = (($shiftRightUint64(v, 40).$low << 24 >>> 24))); + (3 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 3] = (($shiftRightUint64(v, 32).$low << 24 >>> 24))); + (4 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 4] = (($shiftRightUint64(v, 24).$low << 24 >>> 24))); + (5 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 5] = (($shiftRightUint64(v, 16).$low << 24 >>> 24))); + (6 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 6] = (($shiftRightUint64(v, 8).$low << 24 >>> 24))); + (7 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 7] = ((v.$low << 24 >>> 24))); + }; + StreamReader.ptr.prototype.Read = function(dst) { + var _r, _tuple, dst, err, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; dst = $f.dst; err = $f.err; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + _r = r.R.Read(dst); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + $r = r.S.XORKeyStream($subslice(dst, 0, n), $subslice(dst, 0, n)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: StreamReader.ptr.prototype.Read }; } $f._r = _r; $f._tuple = _tuple; $f.dst = dst; $f.err = err; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + StreamReader.prototype.Read = function(dst) { return this.$val.Read(dst); }; + fastXORBytes = function(dst, a, b) { + var _q, _r, a, aw, b, bw, dst, dw, i, i$1, n, w, x; + n = a.$length; + if (b.$length < n) { + n = b.$length; + } + if (n === 0) { + return 0; + } + $unused((x = n - 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x]))); + w = (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (w > 0) { + dw = dst; + aw = a; + bw = b; + i = 0; + while (true) { + if (!(i < w)) { break; } + ((i < 0 || i >= dw.$length) ? ($throwRuntimeError("index out of range"), undefined) : dw.$array[dw.$offset + i] = ((((i < 0 || i >= aw.$length) ? ($throwRuntimeError("index out of range"), undefined) : aw.$array[aw.$offset + i]) ^ ((i < 0 || i >= bw.$length) ? ($throwRuntimeError("index out of range"), undefined) : bw.$array[bw.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + } + i$1 = (n - (_r = n % 4, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0); + while (true) { + if (!(i$1 < n)) { break; } + ((i$1 < 0 || i$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i$1] = ((((i$1 < 0 || i$1 >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i$1]) ^ ((i$1 < 0 || i$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i$1])) << 24 >>> 24)); + i$1 = i$1 + (1) >> 0; + } + return n; + }; + safeXORBytes = function(dst, a, b) { + var a, b, dst, i, n; + n = a.$length; + if (b.$length < n) { + n = b.$length; + } + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = ((((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]) ^ ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])) << 24 >>> 24)); + i = i + (1) >> 0; + } + return n; + }; + xorBytes = function(dst, a, b) { + var a, b, dst; + if (false) { + return fastXORBytes(dst, a, b); + } else { + return safeXORBytes(dst, a, b); + } + }; + fastXORWords = function(dst, a, b) { + var _q, a, aw, b, bw, dst, dw, i, n; + dw = dst; + aw = a; + bw = b; + n = (_q = b.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= dw.$length) ? ($throwRuntimeError("index out of range"), undefined) : dw.$array[dw.$offset + i] = ((((i < 0 || i >= aw.$length) ? ($throwRuntimeError("index out of range"), undefined) : aw.$array[aw.$offset + i]) ^ ((i < 0 || i >= bw.$length) ? ($throwRuntimeError("index out of range"), undefined) : bw.$array[bw.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + }; + xorWords = function(dst, a, b) { + var a, b, dst; + if (false) { + fastXORWords(dst, a, b); + } else { + safeXORBytes(dst, a, b); + } + }; + ptrType.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$1], [], false)}]; + ptrType$1.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$1], [], false)}]; + ptrType$3.methods = [{prop: "refill", name: "refill", pkg: "crypto/cipher", typ: $funcType([], [], false)}, {prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]; + ptrType$6.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1, $error], false)}, {prop: "mul", name: "mul", pkg: "crypto/cipher", typ: $funcType([ptrType$4], [], false)}, {prop: "updateBlocks", name: "updateBlocks", pkg: "crypto/cipher", typ: $funcType([ptrType$4, sliceType$1], [], false)}, {prop: "update", name: "update", pkg: "crypto/cipher", typ: $funcType([ptrType$4, sliceType$1], [], false)}, {prop: "counterCrypt", name: "counterCrypt", pkg: "crypto/cipher", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [], false)}, {prop: "deriveCounter", name: "deriveCounter", pkg: "crypto/cipher", typ: $funcType([ptrType$5, sliceType$1], [], false)}, {prop: "auth", name: "auth", pkg: "crypto/cipher", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, ptrType$5], [], false)}]; + StreamReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; + cbc.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + cbcEncrypter.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + cbcEncAble.init([{prop: "NewCBCEncrypter", name: "NewCBCEncrypter", pkg: "", typ: $funcType([sliceType$1], [BlockMode], false)}]); + cbcDecrypter.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + cbcDecAble.init([{prop: "NewCBCDecrypter", name: "NewCBCDecrypter", pkg: "", typ: $funcType([sliceType$1], [BlockMode], false)}]); + Block.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); + Stream.init([{prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); + BlockMode.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); + ctr.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "ctr", name: "ctr", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "outUsed", name: "outUsed", embedded: false, exported: false, typ: $Int, tag: ""}]); + ctrAble.init([{prop: "NewCTR", name: "NewCTR", pkg: "", typ: $funcType([sliceType$1], [Stream], false)}]); + AEAD.init([{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1, $error], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1], false)}]); + gcmAble.init([{prop: "NewGCM", name: "NewGCM", pkg: "", typ: $funcType([$Int, $Int], [AEAD, $error], false)}]); + gcmFieldElement.init("crypto/cipher", [{prop: "low", name: "low", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "high", name: "high", embedded: false, exported: false, typ: $Uint64, tag: ""}]); + gcm.init("crypto/cipher", [{prop: "cipher", name: "cipher", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "nonceSize", name: "nonceSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tagSize", name: "tagSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "productTable", name: "productTable", embedded: false, exported: false, typ: arrayType$1, tag: ""}]); + StreamReader.init("", [{prop: "S", name: "S", embedded: false, exported: true, typ: Stream, tag: ""}, {prop: "R", name: "R", embedded: false, exported: true, typ: io.Reader, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = subtle$1.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + errOpen = errors.New("cipher: message authentication failed"); + gcmReductionTable = new sliceType([0, 7200, 14400, 9312, 28800, 27808, 18624, 21728, 57600, 64800, 55616, 50528, 37248, 36256, 43456, 46560]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/aes"] = (function() { + var $pkg = {}, $init, cipher, subtle, strconv, aesCipher, KeySizeError, sliceType, sliceType$1, ptrType, powx, sbox0, sbox1, te0, te1, te2, te3, td0, td1, td2, td3, encryptBlockGo, decryptBlockGo, subw, rotw, expandKeyGo, NewCipher, newCipherGeneric, newCipher; + cipher = $packages["crypto/cipher"]; + subtle = $packages["crypto/internal/subtle"]; + strconv = $packages["strconv"]; + aesCipher = $pkg.aesCipher = $newType(0, $kindStruct, "aes.aesCipher", true, "crypto/aes", false, function(enc_, dec_) { + this.$val = this; + if (arguments.length === 0) { + this.enc = sliceType.nil; + this.dec = sliceType.nil; + return; + } + this.enc = enc_; + this.dec = dec_; + }); + KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "aes.KeySizeError", true, "crypto/aes", true, null); + sliceType = $sliceType($Uint32); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(aesCipher); + encryptBlockGo = function(xk, dst, src) { + var _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, dst, k, nr, r, s0, s1, s2, s3, src, t0, t1, t2, t3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$5, x$6, x$7, x$8, x$9, xk; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = 0; + _tmp$6 = 0; + _tmp$7 = 0; + s0 = _tmp; + s1 = _tmp$1; + s2 = _tmp$2; + s3 = _tmp$3; + t0 = _tmp$4; + t1 = _tmp$5; + t2 = _tmp$6; + t3 = _tmp$7; + s0 = (((((((((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) >>> 0)) << 24 >>> 0) | ((((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) >>> 0))) >>> 0; + s1 = (((((((((4 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 4]) >>> 0)) << 24 >>> 0) | ((((5 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 5]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((6 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 6]) >>> 0)) << 8 >>> 0)) >>> 0) | (((7 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 7]) >>> 0))) >>> 0; + s2 = (((((((((8 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 8]) >>> 0)) << 24 >>> 0) | ((((9 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 9]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((10 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 10]) >>> 0)) << 8 >>> 0)) >>> 0) | (((11 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 11]) >>> 0))) >>> 0; + s3 = (((((((((12 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 12]) >>> 0)) << 24 >>> 0) | ((((13 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 13]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((14 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 14]) >>> 0)) << 8 >>> 0)) >>> 0) | (((15 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 15]) >>> 0))) >>> 0; + s0 = (s0 ^ ((0 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 0]))) >>> 0; + s1 = (s1 ^ ((1 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 1]))) >>> 0; + s2 = (s2 ^ ((2 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 2]))) >>> 0; + s3 = (s3 ^ ((3 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 3]))) >>> 0; + nr = (_q = xk.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0; + k = 4; + r = 0; + while (true) { + if (!(r < nr)) { break; } + t0 = ((((((((x = k + 0 >> 0, ((x < 0 || x >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x])) ^ (x$1 = (((s0 >>> 24 >>> 0) << 24 >>> 24)), ((x$1 < 0 || x$1 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$1]))) >>> 0) ^ (x$2 = (((s1 >>> 16 >>> 0) << 24 >>> 24)), ((x$2 < 0 || x$2 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$2]))) >>> 0) ^ (x$3 = (((s2 >>> 8 >>> 0) << 24 >>> 24)), ((x$3 < 0 || x$3 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$3]))) >>> 0) ^ (x$4 = ((s3 << 24 >>> 24)), ((x$4 < 0 || x$4 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$4]))) >>> 0; + t1 = ((((((((x$5 = k + 1 >> 0, ((x$5 < 0 || x$5 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$5])) ^ (x$6 = (((s1 >>> 24 >>> 0) << 24 >>> 24)), ((x$6 < 0 || x$6 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$6]))) >>> 0) ^ (x$7 = (((s2 >>> 16 >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$7]))) >>> 0) ^ (x$8 = (((s3 >>> 8 >>> 0) << 24 >>> 24)), ((x$8 < 0 || x$8 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$8]))) >>> 0) ^ (x$9 = ((s0 << 24 >>> 24)), ((x$9 < 0 || x$9 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$9]))) >>> 0; + t2 = ((((((((x$10 = k + 2 >> 0, ((x$10 < 0 || x$10 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$10])) ^ (x$11 = (((s2 >>> 24 >>> 0) << 24 >>> 24)), ((x$11 < 0 || x$11 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$11]))) >>> 0) ^ (x$12 = (((s3 >>> 16 >>> 0) << 24 >>> 24)), ((x$12 < 0 || x$12 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$12]))) >>> 0) ^ (x$13 = (((s0 >>> 8 >>> 0) << 24 >>> 24)), ((x$13 < 0 || x$13 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$13]))) >>> 0) ^ (x$14 = ((s1 << 24 >>> 24)), ((x$14 < 0 || x$14 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$14]))) >>> 0; + t3 = ((((((((x$15 = k + 3 >> 0, ((x$15 < 0 || x$15 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$15])) ^ (x$16 = (((s3 >>> 24 >>> 0) << 24 >>> 24)), ((x$16 < 0 || x$16 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$16]))) >>> 0) ^ (x$17 = (((s0 >>> 16 >>> 0) << 24 >>> 24)), ((x$17 < 0 || x$17 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$17]))) >>> 0) ^ (x$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)), ((x$18 < 0 || x$18 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$18]))) >>> 0) ^ (x$19 = ((s2 << 24 >>> 24)), ((x$19 < 0 || x$19 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$19]))) >>> 0; + k = k + (4) >> 0; + _tmp$8 = t0; + _tmp$9 = t1; + _tmp$10 = t2; + _tmp$11 = t3; + s0 = _tmp$8; + s1 = _tmp$9; + s2 = _tmp$10; + s3 = _tmp$11; + r = r + (1) >> 0; + } + s0 = (((((((((x$20 = t0 >>> 24 >>> 0, ((x$20 < 0 || x$20 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$20])) >>> 0)) << 24 >>> 0) | ((((x$21 = ((t1 >>> 16 >>> 0) & 255) >>> 0, ((x$21 < 0 || x$21 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$21])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$22 = ((t2 >>> 8 >>> 0) & 255) >>> 0, ((x$22 < 0 || x$22 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$22])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$23 = (t3 & 255) >>> 0, ((x$23 < 0 || x$23 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$23])) >>> 0))) >>> 0; + s1 = (((((((((x$24 = t1 >>> 24 >>> 0, ((x$24 < 0 || x$24 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$24])) >>> 0)) << 24 >>> 0) | ((((x$25 = ((t2 >>> 16 >>> 0) & 255) >>> 0, ((x$25 < 0 || x$25 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$25])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$26 = ((t3 >>> 8 >>> 0) & 255) >>> 0, ((x$26 < 0 || x$26 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$26])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$27 = (t0 & 255) >>> 0, ((x$27 < 0 || x$27 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$27])) >>> 0))) >>> 0; + s2 = (((((((((x$28 = t2 >>> 24 >>> 0, ((x$28 < 0 || x$28 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$28])) >>> 0)) << 24 >>> 0) | ((((x$29 = ((t3 >>> 16 >>> 0) & 255) >>> 0, ((x$29 < 0 || x$29 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$29])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$30 = ((t0 >>> 8 >>> 0) & 255) >>> 0, ((x$30 < 0 || x$30 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$30])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$31 = (t1 & 255) >>> 0, ((x$31 < 0 || x$31 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$31])) >>> 0))) >>> 0; + s3 = (((((((((x$32 = t3 >>> 24 >>> 0, ((x$32 < 0 || x$32 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$32])) >>> 0)) << 24 >>> 0) | ((((x$33 = ((t0 >>> 16 >>> 0) & 255) >>> 0, ((x$33 < 0 || x$33 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$33])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$34 = ((t1 >>> 8 >>> 0) & 255) >>> 0, ((x$34 < 0 || x$34 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$34])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$35 = (t2 & 255) >>> 0, ((x$35 < 0 || x$35 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$35])) >>> 0))) >>> 0; + s0 = (s0 ^ ((x$36 = k + 0 >> 0, ((x$36 < 0 || x$36 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$36])))) >>> 0; + s1 = (s1 ^ ((x$37 = k + 1 >> 0, ((x$37 < 0 || x$37 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$37])))) >>> 0; + s2 = (s2 ^ ((x$38 = k + 2 >> 0, ((x$38 < 0 || x$38 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$38])))) >>> 0; + s3 = (s3 ^ ((x$39 = k + 3 >> 0, ((x$39 < 0 || x$39 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$39])))) >>> 0; + _tmp$12 = (((s0 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$13 = (((s0 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$14 = (((s0 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$15 = ((s0 << 24 >>> 24)); + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = _tmp$12); + (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = _tmp$13); + (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = _tmp$14); + (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = _tmp$15); + _tmp$16 = (((s1 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$17 = (((s1 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$19 = ((s1 << 24 >>> 24)); + (4 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 4] = _tmp$16); + (5 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 5] = _tmp$17); + (6 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 6] = _tmp$18); + (7 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 7] = _tmp$19); + _tmp$20 = (((s2 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$21 = (((s2 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$22 = (((s2 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$23 = ((s2 << 24 >>> 24)); + (8 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 8] = _tmp$20); + (9 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 9] = _tmp$21); + (10 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 10] = _tmp$22); + (11 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 11] = _tmp$23); + _tmp$24 = (((s3 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$25 = (((s3 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$26 = (((s3 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$27 = ((s3 << 24 >>> 24)); + (12 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 12] = _tmp$24); + (13 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 13] = _tmp$25); + (14 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 14] = _tmp$26); + (15 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 15] = _tmp$27); + }; + decryptBlockGo = function(xk, dst, src) { + var _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, dst, k, nr, r, s0, s1, s2, s3, src, t0, t1, t2, t3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$5, x$6, x$7, x$8, x$9, xk; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = 0; + _tmp$6 = 0; + _tmp$7 = 0; + s0 = _tmp; + s1 = _tmp$1; + s2 = _tmp$2; + s3 = _tmp$3; + t0 = _tmp$4; + t1 = _tmp$5; + t2 = _tmp$6; + t3 = _tmp$7; + s0 = (((((((((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) >>> 0)) << 24 >>> 0) | ((((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) >>> 0))) >>> 0; + s1 = (((((((((4 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 4]) >>> 0)) << 24 >>> 0) | ((((5 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 5]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((6 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 6]) >>> 0)) << 8 >>> 0)) >>> 0) | (((7 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 7]) >>> 0))) >>> 0; + s2 = (((((((((8 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 8]) >>> 0)) << 24 >>> 0) | ((((9 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 9]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((10 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 10]) >>> 0)) << 8 >>> 0)) >>> 0) | (((11 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 11]) >>> 0))) >>> 0; + s3 = (((((((((12 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 12]) >>> 0)) << 24 >>> 0) | ((((13 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 13]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((14 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 14]) >>> 0)) << 8 >>> 0)) >>> 0) | (((15 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 15]) >>> 0))) >>> 0; + s0 = (s0 ^ ((0 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 0]))) >>> 0; + s1 = (s1 ^ ((1 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 1]))) >>> 0; + s2 = (s2 ^ ((2 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 2]))) >>> 0; + s3 = (s3 ^ ((3 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 3]))) >>> 0; + nr = (_q = xk.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0; + k = 4; + r = 0; + while (true) { + if (!(r < nr)) { break; } + t0 = ((((((((x = k + 0 >> 0, ((x < 0 || x >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x])) ^ (x$1 = (((s0 >>> 24 >>> 0) << 24 >>> 24)), ((x$1 < 0 || x$1 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$1]))) >>> 0) ^ (x$2 = (((s3 >>> 16 >>> 0) << 24 >>> 24)), ((x$2 < 0 || x$2 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$2]))) >>> 0) ^ (x$3 = (((s2 >>> 8 >>> 0) << 24 >>> 24)), ((x$3 < 0 || x$3 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$3]))) >>> 0) ^ (x$4 = ((s1 << 24 >>> 24)), ((x$4 < 0 || x$4 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$4]))) >>> 0; + t1 = ((((((((x$5 = k + 1 >> 0, ((x$5 < 0 || x$5 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$5])) ^ (x$6 = (((s1 >>> 24 >>> 0) << 24 >>> 24)), ((x$6 < 0 || x$6 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$6]))) >>> 0) ^ (x$7 = (((s0 >>> 16 >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$7]))) >>> 0) ^ (x$8 = (((s3 >>> 8 >>> 0) << 24 >>> 24)), ((x$8 < 0 || x$8 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$8]))) >>> 0) ^ (x$9 = ((s2 << 24 >>> 24)), ((x$9 < 0 || x$9 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$9]))) >>> 0; + t2 = ((((((((x$10 = k + 2 >> 0, ((x$10 < 0 || x$10 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$10])) ^ (x$11 = (((s2 >>> 24 >>> 0) << 24 >>> 24)), ((x$11 < 0 || x$11 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$11]))) >>> 0) ^ (x$12 = (((s1 >>> 16 >>> 0) << 24 >>> 24)), ((x$12 < 0 || x$12 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$12]))) >>> 0) ^ (x$13 = (((s0 >>> 8 >>> 0) << 24 >>> 24)), ((x$13 < 0 || x$13 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$13]))) >>> 0) ^ (x$14 = ((s3 << 24 >>> 24)), ((x$14 < 0 || x$14 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$14]))) >>> 0; + t3 = ((((((((x$15 = k + 3 >> 0, ((x$15 < 0 || x$15 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$15])) ^ (x$16 = (((s3 >>> 24 >>> 0) << 24 >>> 24)), ((x$16 < 0 || x$16 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$16]))) >>> 0) ^ (x$17 = (((s2 >>> 16 >>> 0) << 24 >>> 24)), ((x$17 < 0 || x$17 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$17]))) >>> 0) ^ (x$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)), ((x$18 < 0 || x$18 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$18]))) >>> 0) ^ (x$19 = ((s0 << 24 >>> 24)), ((x$19 < 0 || x$19 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$19]))) >>> 0; + k = k + (4) >> 0; + _tmp$8 = t0; + _tmp$9 = t1; + _tmp$10 = t2; + _tmp$11 = t3; + s0 = _tmp$8; + s1 = _tmp$9; + s2 = _tmp$10; + s3 = _tmp$11; + r = r + (1) >> 0; + } + s0 = (((((((((x$20 = t0 >>> 24 >>> 0, ((x$20 < 0 || x$20 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$20])) >>> 0)) << 24 >>> 0) | ((((x$21 = ((t3 >>> 16 >>> 0) & 255) >>> 0, ((x$21 < 0 || x$21 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$21])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$22 = ((t2 >>> 8 >>> 0) & 255) >>> 0, ((x$22 < 0 || x$22 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$22])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$23 = (t1 & 255) >>> 0, ((x$23 < 0 || x$23 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$23])) >>> 0))) >>> 0; + s1 = (((((((((x$24 = t1 >>> 24 >>> 0, ((x$24 < 0 || x$24 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$24])) >>> 0)) << 24 >>> 0) | ((((x$25 = ((t0 >>> 16 >>> 0) & 255) >>> 0, ((x$25 < 0 || x$25 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$25])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$26 = ((t3 >>> 8 >>> 0) & 255) >>> 0, ((x$26 < 0 || x$26 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$26])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$27 = (t2 & 255) >>> 0, ((x$27 < 0 || x$27 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$27])) >>> 0))) >>> 0; + s2 = (((((((((x$28 = t2 >>> 24 >>> 0, ((x$28 < 0 || x$28 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$28])) >>> 0)) << 24 >>> 0) | ((((x$29 = ((t1 >>> 16 >>> 0) & 255) >>> 0, ((x$29 < 0 || x$29 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$29])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$30 = ((t0 >>> 8 >>> 0) & 255) >>> 0, ((x$30 < 0 || x$30 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$30])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$31 = (t3 & 255) >>> 0, ((x$31 < 0 || x$31 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$31])) >>> 0))) >>> 0; + s3 = (((((((((x$32 = t3 >>> 24 >>> 0, ((x$32 < 0 || x$32 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$32])) >>> 0)) << 24 >>> 0) | ((((x$33 = ((t2 >>> 16 >>> 0) & 255) >>> 0, ((x$33 < 0 || x$33 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$33])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$34 = ((t1 >>> 8 >>> 0) & 255) >>> 0, ((x$34 < 0 || x$34 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$34])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$35 = (t0 & 255) >>> 0, ((x$35 < 0 || x$35 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$35])) >>> 0))) >>> 0; + s0 = (s0 ^ ((x$36 = k + 0 >> 0, ((x$36 < 0 || x$36 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$36])))) >>> 0; + s1 = (s1 ^ ((x$37 = k + 1 >> 0, ((x$37 < 0 || x$37 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$37])))) >>> 0; + s2 = (s2 ^ ((x$38 = k + 2 >> 0, ((x$38 < 0 || x$38 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$38])))) >>> 0; + s3 = (s3 ^ ((x$39 = k + 3 >> 0, ((x$39 < 0 || x$39 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$39])))) >>> 0; + _tmp$12 = (((s0 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$13 = (((s0 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$14 = (((s0 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$15 = ((s0 << 24 >>> 24)); + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = _tmp$12); + (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = _tmp$13); + (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = _tmp$14); + (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = _tmp$15); + _tmp$16 = (((s1 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$17 = (((s1 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$19 = ((s1 << 24 >>> 24)); + (4 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 4] = _tmp$16); + (5 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 5] = _tmp$17); + (6 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 6] = _tmp$18); + (7 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 7] = _tmp$19); + _tmp$20 = (((s2 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$21 = (((s2 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$22 = (((s2 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$23 = ((s2 << 24 >>> 24)); + (8 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 8] = _tmp$20); + (9 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 9] = _tmp$21); + (10 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 10] = _tmp$22); + (11 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 11] = _tmp$23); + _tmp$24 = (((s3 >>> 24 >>> 0) << 24 >>> 24)); + _tmp$25 = (((s3 >>> 16 >>> 0) << 24 >>> 24)); + _tmp$26 = (((s3 >>> 8 >>> 0) << 24 >>> 24)); + _tmp$27 = ((s3 << 24 >>> 24)); + (12 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 12] = _tmp$24); + (13 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 13] = _tmp$25); + (14 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 14] = _tmp$26); + (15 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 15] = _tmp$27); + }; + subw = function(w) { + var w, x, x$1, x$2, x$3; + return (((((((((x = w >>> 24 >>> 0, ((x < 0 || x >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x])) >>> 0)) << 24 >>> 0) | ((((x$1 = ((w >>> 16 >>> 0) & 255) >>> 0, ((x$1 < 0 || x$1 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$1])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$2 = ((w >>> 8 >>> 0) & 255) >>> 0, ((x$2 < 0 || x$2 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$2])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$3 = (w & 255) >>> 0, ((x$3 < 0 || x$3 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$3])) >>> 0))) >>> 0; + }; + rotw = function(w) { + var w; + return ((w << 8 >>> 0) | (w >>> 24 >>> 0)) >>> 0; + }; + expandKeyGo = function(key, enc, dec) { + var _q, _q$1, _r, _r$1, dec, ei, enc, i, i$1, j, key, n, nk, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + i = 0; + nk = (_q = key.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + i = 0; + while (true) { + if (!(i < nk)) { break; } + ((i < 0 || i >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + i] = ((((((((((x = $imul(4, i), ((x < 0 || x >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x])) >>> 0)) << 24 >>> 0) | ((((x$1 = ($imul(4, i)) + 1 >> 0, ((x$1 < 0 || x$1 >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x$1])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$2 = ($imul(4, i)) + 2 >> 0, ((x$2 < 0 || x$2 >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x$2])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$3 = ($imul(4, i)) + 3 >> 0, ((x$3 < 0 || x$3 >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x$3])) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + while (true) { + if (!(i < enc.$length)) { break; } + t = (x$4 = i - 1 >> 0, ((x$4 < 0 || x$4 >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x$4])); + if ((_r = i % nk, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0) { + t = (subw(rotw(t)) ^ (((((x$5 = (_q$1 = i / nk, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) - 1 >> 0, ((x$5 < 0 || x$5 >= powx.length) ? ($throwRuntimeError("index out of range"), undefined) : powx[x$5])) >>> 0)) << 24 >>> 0))) >>> 0; + } else if (nk > 6 && ((_r$1 = i % nk, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 4)) { + t = subw(t); + } + ((i < 0 || i >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + i] = (((x$6 = i - nk >> 0, ((x$6 < 0 || x$6 >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x$6])) ^ t) >>> 0)); + i = i + (1) >> 0; + } + if (dec === sliceType.nil) { + return; + } + n = enc.$length; + i$1 = 0; + while (true) { + if (!(i$1 < n)) { break; } + ei = (n - i$1 >> 0) - 4 >> 0; + j = 0; + while (true) { + if (!(j < 4)) { break; } + x$8 = (x$7 = ei + j >> 0, ((x$7 < 0 || x$7 >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x$7])); + if (i$1 > 0 && (i$1 + 4 >> 0) < n) { + x$8 = ((((((x$9 = (x$10 = x$8 >>> 24 >>> 0, ((x$10 < 0 || x$10 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$10])), ((x$9 < 0 || x$9 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$9])) ^ (x$11 = (x$12 = ((x$8 >>> 16 >>> 0) & 255) >>> 0, ((x$12 < 0 || x$12 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$12])), ((x$11 < 0 || x$11 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$11]))) >>> 0) ^ (x$13 = (x$14 = ((x$8 >>> 8 >>> 0) & 255) >>> 0, ((x$14 < 0 || x$14 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$14])), ((x$13 < 0 || x$13 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$13]))) >>> 0) ^ (x$15 = (x$16 = (x$8 & 255) >>> 0, ((x$16 < 0 || x$16 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$16])), ((x$15 < 0 || x$15 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$15]))) >>> 0; + } + (x$17 = i$1 + j >> 0, ((x$17 < 0 || x$17 >= dec.$length) ? ($throwRuntimeError("index out of range"), undefined) : dec.$array[dec.$offset + x$17] = x$8)); + j = j + (1) >> 0; + } + i$1 = i$1 + (4) >> 0; + } + }; + KeySizeError.prototype.Error = function() { + var k; + k = this.$val; + return "crypto/aes: invalid key size " + strconv.Itoa(((k >> 0))); + }; + $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; + NewCipher = function(key) { + var _1, k, key; + k = key.$length; + switch (0) { default: + _1 = k; + if ((_1 === (16)) || (_1 === (24)) || (_1 === (32))) { + break; + } else { + return [$ifaceNil, new KeySizeError(((k >> 0)))]; + } + } + return newCipher(key); + }; + $pkg.NewCipher = NewCipher; + newCipherGeneric = function(key) { + var c, key, n; + n = key.$length + 28 >> 0; + c = new aesCipher.ptr($makeSlice(sliceType, n), $makeSlice(sliceType, n)); + expandKeyGo(key, c.enc, c.dec); + return [c, $ifaceNil]; + }; + aesCipher.ptr.prototype.BlockSize = function() { + var c; + c = this; + return 16; + }; + aesCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + aesCipher.ptr.prototype.Encrypt = function(dst, src) { + var c, dst, src; + c = this; + if (src.$length < 16) { + $panic(new $String("crypto/aes: input not full block")); + } + if (dst.$length < 16) { + $panic(new $String("crypto/aes: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 16), $subslice(src, 0, 16))) { + $panic(new $String("crypto/aes: invalid buffer overlap")); + } + encryptBlockGo(c.enc, dst, src); + }; + aesCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; + aesCipher.ptr.prototype.Decrypt = function(dst, src) { + var c, dst, src; + c = this; + if (src.$length < 16) { + $panic(new $String("crypto/aes: input not full block")); + } + if (dst.$length < 16) { + $panic(new $String("crypto/aes: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 16), $subslice(src, 0, 16))) { + $panic(new $String("crypto/aes: invalid buffer overlap")); + } + decryptBlockGo(c.dec, dst, src); + }; + aesCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; + newCipher = function(key) { + var key; + return newCipherGeneric(key); + }; + ptrType.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]; + KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + aesCipher.init("crypto/aes", [{prop: "enc", name: "enc", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "dec", name: "dec", embedded: false, exported: false, typ: sliceType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + powx = $toNativeArray($kindUint8, [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47]); + sbox0 = $toNativeArray($kindUint8, [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22]); + sbox1 = $toNativeArray($kindUint8, [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125]); + te0 = $toNativeArray($kindUint32, [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986]); + te1 = $toNativeArray($kindUint32, [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766]); + te2 = $toNativeArray($kindUint32, [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126]); + te3 = $toNativeArray($kindUint32, [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436]); + td0 = $toNativeArray($kindUint32, [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890]); + td1 = $toNativeArray($kindUint32, [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935]); + td2 = $toNativeArray($kindUint32, [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239000, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600]); + td3 = $toNativeArray($kindUint32, [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998000, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/des"] = (function() { + var $pkg = {}, $init, cipher, subtle, binary, strconv, KeySizeError, desCipher, tripleDESCipher, arrayType, arrayType$1, arrayType$2, arrayType$3, sliceType, sliceType$1, arrayType$4, sliceType$2, ptrType, ptrType$1, feistelBox, permutationFunction, permutedChoice1, permutedChoice2, sBoxes, ksRotations, cryptBlock, encryptBlock, decryptBlock, feistel, permuteBlock, init, permuteInitialBlock, permuteFinalBlock, ksRotate, unpack, NewTripleDESCipher; + cipher = $packages["crypto/cipher"]; + subtle = $packages["crypto/internal/subtle"]; + binary = $packages["encoding/binary"]; + strconv = $packages["strconv"]; + KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "des.KeySizeError", true, "crypto/des", true, null); + desCipher = $pkg.desCipher = $newType(0, $kindStruct, "des.desCipher", true, "crypto/des", false, function(subkeys_) { + this.$val = this; + if (arguments.length === 0) { + this.subkeys = arrayType$4.zero(); + return; + } + this.subkeys = subkeys_; + }); + tripleDESCipher = $pkg.tripleDESCipher = $newType(0, $kindStruct, "des.tripleDESCipher", true, "crypto/des", false, function(cipher1_, cipher2_, cipher3_) { + this.$val = this; + if (arguments.length === 0) { + this.cipher1 = new desCipher.ptr(arrayType$4.zero()); + this.cipher2 = new desCipher.ptr(arrayType$4.zero()); + this.cipher3 = new desCipher.ptr(arrayType$4.zero()); + return; + } + this.cipher1 = cipher1_; + this.cipher2 = cipher2_; + this.cipher3 = cipher3_; + }); + arrayType = $arrayType($Uint32, 64); + arrayType$1 = $arrayType(arrayType, 8); + arrayType$2 = $arrayType($Uint8, 16); + arrayType$3 = $arrayType(arrayType$2, 4); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($Uint32); + arrayType$4 = $arrayType($Uint64, 16); + sliceType$2 = $sliceType($Uint64); + ptrType = $ptrType(desCipher); + ptrType$1 = $ptrType(tripleDESCipher); + cryptBlock = function(subkeys, dst, src, decrypt) { + var _tmp, _tmp$1, _tuple, _tuple$1, b, decrypt, dst, i, i$1, left, preOutput, right, src, subkeys, x, x$1, x$2, x$3, x$4, x$5; + b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); + b = permuteInitialBlock(b); + _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); + _tmp$1 = ((b.$low >>> 0)); + left = _tmp; + right = _tmp$1; + left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; + right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; + if (decrypt) { + i = 0; + while (true) { + if (!(i < 8)) { break; } + _tuple = feistel(left, right, (x = 15 - ($imul(2, i)) >> 0, ((x < 0 || x >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x])), (x$1 = 15 - ((($imul(2, i)) + 1 >> 0)) >> 0, ((x$1 < 0 || x$1 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$1]))); + left = _tuple[0]; + right = _tuple[1]; + i = i + (1) >> 0; + } + } else { + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + _tuple$1 = feistel(left, right, (x$2 = $imul(2, i$1), ((x$2 < 0 || x$2 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$2])), (x$3 = ($imul(2, i$1)) + 1 >> 0, ((x$3 < 0 || x$3 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$3]))); + left = _tuple$1[0]; + right = _tuple$1[1]; + i$1 = i$1 + (1) >> 0; + } + } + left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; + right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; + preOutput = (x$4 = $shiftLeft64((new $Uint64(0, right)), 32), x$5 = (new $Uint64(0, left)), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)); + $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); + }; + encryptBlock = function(subkeys, dst, src) { + var dst, src, subkeys; + cryptBlock(subkeys, dst, src, false); + }; + decryptBlock = function(subkeys, dst, src) { + var dst, src, subkeys; + cryptBlock(subkeys, dst, src, true); + }; + feistel = function(l, r, k0, k1) { + var _tmp, _tmp$1, k0, k1, l, lout, r, rout, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$4, x$5, x$6, x$7, x$8, x$9; + lout = 0; + rout = 0; + t = 0; + t = (r ^ (($shiftRightUint64(k0, 32).$low >>> 0))) >>> 0; + l = (l ^ ((((((((x = feistelBox[7], x$1 = (t & 63) >>> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) ^ (x$2 = feistelBox[5], x$3 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))) >>> 0) ^ (x$4 = feistelBox[3], x$5 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5]))) >>> 0) ^ (x$6 = feistelBox[1], x$7 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))) >>> 0))) >>> 0; + t = ((((((r << 28 >>> 0)) | ((r >>> 4 >>> 0))) >>> 0)) ^ ((k0.$low >>> 0))) >>> 0; + l = (l ^ ((((((((x$8 = feistelBox[6], x$9 = ((t) & 63) >>> 0, ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])) ^ (x$10 = feistelBox[4], x$11 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))) >>> 0) ^ (x$12 = feistelBox[2], x$13 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$13 < 0 || x$13 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[x$13]))) >>> 0) ^ (x$14 = feistelBox[0], x$15 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$15 < 0 || x$15 >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[x$15]))) >>> 0))) >>> 0; + t = (l ^ (($shiftRightUint64(k1, 32).$low >>> 0))) >>> 0; + r = (r ^ ((((((((x$16 = feistelBox[7], x$17 = (t & 63) >>> 0, ((x$17 < 0 || x$17 >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[x$17])) ^ (x$18 = feistelBox[5], x$19 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$19 < 0 || x$19 >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[x$19]))) >>> 0) ^ (x$20 = feistelBox[3], x$21 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$21 < 0 || x$21 >= x$20.length) ? ($throwRuntimeError("index out of range"), undefined) : x$20[x$21]))) >>> 0) ^ (x$22 = feistelBox[1], x$23 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$23 < 0 || x$23 >= x$22.length) ? ($throwRuntimeError("index out of range"), undefined) : x$22[x$23]))) >>> 0))) >>> 0; + t = ((((((l << 28 >>> 0)) | ((l >>> 4 >>> 0))) >>> 0)) ^ ((k1.$low >>> 0))) >>> 0; + r = (r ^ ((((((((x$24 = feistelBox[6], x$25 = ((t) & 63) >>> 0, ((x$25 < 0 || x$25 >= x$24.length) ? ($throwRuntimeError("index out of range"), undefined) : x$24[x$25])) ^ (x$26 = feistelBox[4], x$27 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$27 < 0 || x$27 >= x$26.length) ? ($throwRuntimeError("index out of range"), undefined) : x$26[x$27]))) >>> 0) ^ (x$28 = feistelBox[2], x$29 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$29 < 0 || x$29 >= x$28.length) ? ($throwRuntimeError("index out of range"), undefined) : x$28[x$29]))) >>> 0) ^ (x$30 = feistelBox[0], x$31 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$31 < 0 || x$31 >= x$30.length) ? ($throwRuntimeError("index out of range"), undefined) : x$30[x$31]))) >>> 0))) >>> 0; + _tmp = l; + _tmp$1 = r; + lout = _tmp; + rout = _tmp$1; + return [lout, rout]; + }; + permuteBlock = function(src, permutation) { + var _i, _ref, bit, block, n, permutation, position, src, x, x$1; + block = new $Uint64(0, 0); + _ref = permutation; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + position = _i; + n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + bit = (x = $shiftRightUint64(src, n), new $Uint64(x.$high & 0, (x.$low & 1) >>> 0)); + block = (x$1 = $shiftLeft64(bit, (((((permutation.$length - 1 >> 0)) - position >> 0) >>> 0))), new $Uint64(block.$high | x$1.$high, (block.$low | x$1.$low) >>> 0)); + _i++; + } + return block; + }; + init = function() { + var _i, _ref, col, f, i, j, row, s, t, x, x$1, x$2, x$3, x$4; + _ref = sBoxes; + _i = 0; + while (true) { + if (!(_i < 8)) { break; } + s = _i; + i = 0; + while (true) { + if (!(i < 4)) { break; } + j = 0; + while (true) { + if (!(j < 16)) { break; } + f = $shiftLeft64((new $Uint64(0, (x = (x$1 = ((s < 0 || s >= sBoxes.length) ? ($throwRuntimeError("index out of range"), undefined) : sBoxes[s]), ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])), ((j < 0 || j >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[j])))), ((4 * ((7 - ((s >>> 0)) >>> 0)) >>> 0))); + f = permuteBlock(f, new sliceType(permutationFunction)); + row = (((((((i & 2)) << 4 >> 0)) | (i & 1)) << 24 >>> 24)); + col = (((j << 1 >> 0) << 24 >>> 24)); + t = (row | col) >>> 0; + f = (x$2 = $shiftLeft64(f, 1), x$3 = $shiftRightUint64(f, 31), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0)); + (x$4 = ((s < 0 || s >= feistelBox.length) ? ($throwRuntimeError("index out of range"), undefined) : feistelBox[s]), ((t < 0 || t >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[t] = ((f.$low >>> 0)))); + j = j + (1) >> 0; + } + i = i + (1) >> 0; + } + _i++; + } + }; + permuteInitialBlock = function(block) { + var b1, b2, block, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + b1 = $shiftRightUint64(block, 48); + b2 = $shiftLeft64(block, 48); + block = (x = (x$1 = (x$2 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$3 = $shiftLeft64(b1, 48), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)), x$4 = $shiftRightUint64(b2, 48), new $Uint64(x$1.$high ^ x$4.$high, (x$1.$low ^ x$4.$low) >>> 0)), new $Uint64(block.$high ^ x.$high, (block.$low ^ x.$low) >>> 0)); + b1 = (x$5 = $shiftRightUint64(block, 32), new $Uint64(x$5.$high & 0, (x$5.$low & 16711935) >>> 0)); + b2 = new $Uint64(block.$high & 0, (block.$low & 4278255360) >>> 0); + block = (x$6 = (x$7 = (x$8 = (x$9 = $shiftLeft64(b1, 32), new $Uint64(x$9.$high ^ b2.$high, (x$9.$low ^ b2.$low) >>> 0)), x$10 = $shiftLeft64(b1, 8), new $Uint64(x$8.$high ^ x$10.$high, (x$8.$low ^ x$10.$low) >>> 0)), x$11 = $shiftLeft64(b2, 24), new $Uint64(x$7.$high ^ x$11.$high, (x$7.$low ^ x$11.$low) >>> 0)), new $Uint64(block.$high ^ x$6.$high, (block.$low ^ x$6.$low) >>> 0)); + b1 = new $Uint64(block.$high & 252641280, (block.$low & 252641280) >>> 0); + b2 = new $Uint64(block.$high & 61680, (block.$low & 61680) >>> 0); + block = (x$12 = (x$13 = (x$14 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$15 = $shiftRightUint64(b1, 12), new $Uint64(x$14.$high ^ x$15.$high, (x$14.$low ^ x$15.$low) >>> 0)), x$16 = $shiftLeft64(b2, 12), new $Uint64(x$13.$high ^ x$16.$high, (x$13.$low ^ x$16.$low) >>> 0)), new $Uint64(block.$high ^ x$12.$high, (block.$low ^ x$12.$low) >>> 0)); + b1 = new $Uint64(block.$high & 855651072, (block.$low & 855651072) >>> 0); + b2 = new $Uint64(block.$high & 13369548, (block.$low & 13369548) >>> 0); + block = (x$17 = (x$18 = (x$19 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$20 = $shiftRightUint64(b1, 6), new $Uint64(x$19.$high ^ x$20.$high, (x$19.$low ^ x$20.$low) >>> 0)), x$21 = $shiftLeft64(b2, 6), new $Uint64(x$18.$high ^ x$21.$high, (x$18.$low ^ x$21.$low) >>> 0)), new $Uint64(block.$high ^ x$17.$high, (block.$low ^ x$17.$low) >>> 0)); + b1 = new $Uint64(block.$high & 2863311530, (block.$low & 1431655765) >>> 0); + block = (x$22 = (x$23 = (x$24 = $shiftRightUint64(b1, 33), new $Uint64(b1.$high ^ x$24.$high, (b1.$low ^ x$24.$low) >>> 0)), x$25 = $shiftLeft64(b1, 33), new $Uint64(x$23.$high ^ x$25.$high, (x$23.$low ^ x$25.$low) >>> 0)), new $Uint64(block.$high ^ x$22.$high, (block.$low ^ x$22.$low) >>> 0)); + return block; + }; + permuteFinalBlock = function(block) { + var b1, b2, block, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + b1 = new $Uint64(block.$high & 2863311530, (block.$low & 1431655765) >>> 0); + block = (x = (x$1 = (x$2 = $shiftRightUint64(b1, 33), new $Uint64(b1.$high ^ x$2.$high, (b1.$low ^ x$2.$low) >>> 0)), x$3 = $shiftLeft64(b1, 33), new $Uint64(x$1.$high ^ x$3.$high, (x$1.$low ^ x$3.$low) >>> 0)), new $Uint64(block.$high ^ x.$high, (block.$low ^ x.$low) >>> 0)); + b1 = new $Uint64(block.$high & 855651072, (block.$low & 855651072) >>> 0); + b2 = new $Uint64(block.$high & 13369548, (block.$low & 13369548) >>> 0); + block = (x$4 = (x$5 = (x$6 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$7 = $shiftRightUint64(b1, 6), new $Uint64(x$6.$high ^ x$7.$high, (x$6.$low ^ x$7.$low) >>> 0)), x$8 = $shiftLeft64(b2, 6), new $Uint64(x$5.$high ^ x$8.$high, (x$5.$low ^ x$8.$low) >>> 0)), new $Uint64(block.$high ^ x$4.$high, (block.$low ^ x$4.$low) >>> 0)); + b1 = new $Uint64(block.$high & 252641280, (block.$low & 252641280) >>> 0); + b2 = new $Uint64(block.$high & 61680, (block.$low & 61680) >>> 0); + block = (x$9 = (x$10 = (x$11 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$12 = $shiftRightUint64(b1, 12), new $Uint64(x$11.$high ^ x$12.$high, (x$11.$low ^ x$12.$low) >>> 0)), x$13 = $shiftLeft64(b2, 12), new $Uint64(x$10.$high ^ x$13.$high, (x$10.$low ^ x$13.$low) >>> 0)), new $Uint64(block.$high ^ x$9.$high, (block.$low ^ x$9.$low) >>> 0)); + b1 = (x$14 = $shiftRightUint64(block, 32), new $Uint64(x$14.$high & 0, (x$14.$low & 16711935) >>> 0)); + b2 = new $Uint64(block.$high & 0, (block.$low & 4278255360) >>> 0); + block = (x$15 = (x$16 = (x$17 = (x$18 = $shiftLeft64(b1, 32), new $Uint64(x$18.$high ^ b2.$high, (x$18.$low ^ b2.$low) >>> 0)), x$19 = $shiftLeft64(b1, 8), new $Uint64(x$17.$high ^ x$19.$high, (x$17.$low ^ x$19.$low) >>> 0)), x$20 = $shiftLeft64(b2, 24), new $Uint64(x$16.$high ^ x$20.$high, (x$16.$low ^ x$20.$low) >>> 0)), new $Uint64(block.$high ^ x$15.$high, (block.$low ^ x$15.$low) >>> 0)); + b1 = $shiftRightUint64(block, 48); + b2 = $shiftLeft64(block, 48); + block = (x$21 = (x$22 = (x$23 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$24 = $shiftLeft64(b1, 48), new $Uint64(x$23.$high ^ x$24.$high, (x$23.$low ^ x$24.$low) >>> 0)), x$25 = $shiftRightUint64(b2, 48), new $Uint64(x$22.$high ^ x$25.$high, (x$22.$low ^ x$25.$low) >>> 0)), new $Uint64(block.$high ^ x$21.$high, (block.$low ^ x$21.$low) >>> 0)); + return block; + }; + ksRotate = function(in$1) { + var i, in$1, last, left, out, right, y, y$1; + out = sliceType$1.nil; + out = $makeSlice(sliceType$1, 16); + last = in$1; + i = 0; + while (true) { + if (!(i < 16)) { break; } + left = (((y = ((4 + ((i < 0 || i >= ksRotations.length) ? ($throwRuntimeError("index out of range"), undefined) : ksRotations[i]) << 24 >>> 24)), y < 32 ? (last << y) : 0) >>> 0)) >>> 4 >>> 0; + right = (y$1 = ((32 - ((i < 0 || i >= ksRotations.length) ? ($throwRuntimeError("index out of range"), undefined) : ksRotations[i]) << 24 >>> 24)), y$1 < 32 ? (((last << 4 >>> 0)) >>> y$1) : 0) >>> 0; + ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = ((left | right) >>> 0)); + last = ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i]); + i = i + (1) >> 0; + } + return out; + }; + desCipher.ptr.prototype.generateSubkeys = function(keyBytes) { + var c, i, key, keyBytes, leftRotations, pc2Input, permutedKey, rightRotations, x, x$1, x$2; + c = this; + key = $clone(binary.BigEndian, binary.bigEndian).Uint64(keyBytes); + permutedKey = permuteBlock(key, new sliceType(permutedChoice1)); + leftRotations = ksRotate((($shiftRightUint64(permutedKey, 28).$low >>> 0))); + rightRotations = ksRotate((($shiftLeft64(permutedKey, 4).$low >>> 0)) >>> 4 >>> 0); + i = 0; + while (true) { + if (!(i < 16)) { break; } + pc2Input = (x = $shiftLeft64((new $Uint64(0, ((i < 0 || i >= leftRotations.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftRotations.$array[leftRotations.$offset + i]))), 28), x$1 = (new $Uint64(0, ((i < 0 || i >= rightRotations.$length) ? ($throwRuntimeError("index out of range"), undefined) : rightRotations.$array[rightRotations.$offset + i]))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); + (x$2 = c.subkeys, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = unpack(permuteBlock(pc2Input, new sliceType(permutedChoice2))))); + i = i + (1) >> 0; + } + }; + desCipher.prototype.generateSubkeys = function(keyBytes) { return this.$val.generateSubkeys(keyBytes); }; + unpack = function(x) { + var result, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + result = new $Uint64(0, 0); + result = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (x$7 = $shiftLeft64(((x$8 = $shiftRightUint64(x, 6), new $Uint64(x$8.$high & 0, (x$8.$low & 255) >>> 0))), 0), x$9 = $shiftLeft64(((x$10 = $shiftRightUint64(x, 18), new $Uint64(x$10.$high & 0, (x$10.$low & 255) >>> 0))), 8), new $Uint64(x$7.$high | x$9.$high, (x$7.$low | x$9.$low) >>> 0)), x$11 = $shiftLeft64(((x$12 = $shiftRightUint64(x, 30), new $Uint64(x$12.$high & 0, (x$12.$low & 255) >>> 0))), 16), new $Uint64(x$6.$high | x$11.$high, (x$6.$low | x$11.$low) >>> 0)), x$13 = $shiftLeft64(((x$14 = $shiftRightUint64(x, 42), new $Uint64(x$14.$high & 0, (x$14.$low & 255) >>> 0))), 24), new $Uint64(x$5.$high | x$13.$high, (x$5.$low | x$13.$low) >>> 0)), x$15 = $shiftLeft64(((x$16 = $shiftRightUint64(x, 0), new $Uint64(x$16.$high & 0, (x$16.$low & 255) >>> 0))), 32), new $Uint64(x$4.$high | x$15.$high, (x$4.$low | x$15.$low) >>> 0)), x$17 = $shiftLeft64(((x$18 = $shiftRightUint64(x, 12), new $Uint64(x$18.$high & 0, (x$18.$low & 255) >>> 0))), 40), new $Uint64(x$3.$high | x$17.$high, (x$3.$low | x$17.$low) >>> 0)), x$19 = $shiftLeft64(((x$20 = $shiftRightUint64(x, 24), new $Uint64(x$20.$high & 0, (x$20.$low & 255) >>> 0))), 48), new $Uint64(x$2.$high | x$19.$high, (x$2.$low | x$19.$low) >>> 0)), x$21 = $shiftLeft64(((x$22 = $shiftRightUint64(x, 36), new $Uint64(x$22.$high & 0, (x$22.$low & 255) >>> 0))), 56), new $Uint64(x$1.$high | x$21.$high, (x$1.$low | x$21.$low) >>> 0)); + return result; + }; + KeySizeError.prototype.Error = function() { + var k; + k = this.$val; + return "crypto/des: invalid key size " + strconv.Itoa(((k >> 0))); + }; + $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; + desCipher.ptr.prototype.BlockSize = function() { + var c; + c = this; + return 8; + }; + desCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + desCipher.ptr.prototype.Encrypt = function(dst, src) { + var c, dst, src; + c = this; + if (src.$length < 8) { + $panic(new $String("crypto/des: input not full block")); + } + if (dst.$length < 8) { + $panic(new $String("crypto/des: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { + $panic(new $String("crypto/des: invalid buffer overlap")); + } + encryptBlock(new sliceType$2(c.subkeys), dst, src); + }; + desCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; + desCipher.ptr.prototype.Decrypt = function(dst, src) { + var c, dst, src; + c = this; + if (src.$length < 8) { + $panic(new $String("crypto/des: input not full block")); + } + if (dst.$length < 8) { + $panic(new $String("crypto/des: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { + $panic(new $String("crypto/des: invalid buffer overlap")); + } + decryptBlock(new sliceType$2(c.subkeys), dst, src); + }; + desCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; + NewTripleDESCipher = function(key) { + var c, key; + if (!((key.$length === 24))) { + return [$ifaceNil, new KeySizeError(((key.$length >> 0)))]; + } + c = new tripleDESCipher.ptr(new desCipher.ptr(arrayType$4.zero()), new desCipher.ptr(arrayType$4.zero()), new desCipher.ptr(arrayType$4.zero())); + c.cipher1.generateSubkeys($subslice(key, 0, 8)); + c.cipher2.generateSubkeys($subslice(key, 8, 16)); + c.cipher3.generateSubkeys($subslice(key, 16)); + return [c, $ifaceNil]; + }; + $pkg.NewTripleDESCipher = NewTripleDESCipher; + tripleDESCipher.ptr.prototype.BlockSize = function() { + var c; + c = this; + return 8; + }; + tripleDESCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + tripleDESCipher.ptr.prototype.Encrypt = function(dst, src) { + var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, dst, i, i$1, i$2, left, preOutput, right, src, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + c = this; + if (src.$length < 8) { + $panic(new $String("crypto/des: input not full block")); + } + if (dst.$length < 8) { + $panic(new $String("crypto/des: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { + $panic(new $String("crypto/des: invalid buffer overlap")); + } + b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); + b = permuteInitialBlock(b); + _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); + _tmp$1 = ((b.$low >>> 0)); + left = _tmp; + right = _tmp$1; + left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; + right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; + i = 0; + while (true) { + if (!(i < 8)) { break; } + _tuple = feistel(left, right, (x = c.cipher1.subkeys, x$1 = $imul(2, i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = c.cipher1.subkeys, x$3 = ($imul(2, i)) + 1 >> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))); + left = _tuple[0]; + right = _tuple[1]; + i = i + (1) >> 0; + } + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + _tuple$1 = feistel(right, left, (x$4 = c.cipher2.subkeys, x$5 = 15 - ($imul(2, i$1)) >> 0, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), (x$6 = c.cipher2.subkeys, x$7 = 15 - ((($imul(2, i$1)) + 1 >> 0)) >> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))); + right = _tuple$1[0]; + left = _tuple$1[1]; + i$1 = i$1 + (1) >> 0; + } + i$2 = 0; + while (true) { + if (!(i$2 < 8)) { break; } + _tuple$2 = feistel(left, right, (x$8 = c.cipher3.subkeys, x$9 = $imul(2, i$2), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])), (x$10 = c.cipher3.subkeys, x$11 = ($imul(2, i$2)) + 1 >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))); + left = _tuple$2[0]; + right = _tuple$2[1]; + i$2 = i$2 + (1) >> 0; + } + left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; + right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; + preOutput = (x$12 = $shiftLeft64((new $Uint64(0, right)), 32), x$13 = (new $Uint64(0, left)), new $Uint64(x$12.$high | x$13.$high, (x$12.$low | x$13.$low) >>> 0)); + $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); + }; + tripleDESCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; + tripleDESCipher.ptr.prototype.Decrypt = function(dst, src) { + var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, dst, i, i$1, i$2, left, preOutput, right, src, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + c = this; + if (src.$length < 8) { + $panic(new $String("crypto/des: input not full block")); + } + if (dst.$length < 8) { + $panic(new $String("crypto/des: output not full block")); + } + if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { + $panic(new $String("crypto/des: invalid buffer overlap")); + } + b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); + b = permuteInitialBlock(b); + _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); + _tmp$1 = ((b.$low >>> 0)); + left = _tmp; + right = _tmp$1; + left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; + right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; + i = 0; + while (true) { + if (!(i < 8)) { break; } + _tuple = feistel(left, right, (x = c.cipher3.subkeys, x$1 = 15 - ($imul(2, i)) >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = c.cipher3.subkeys, x$3 = 15 - ((($imul(2, i)) + 1 >> 0)) >> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))); + left = _tuple[0]; + right = _tuple[1]; + i = i + (1) >> 0; + } + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + _tuple$1 = feistel(right, left, (x$4 = c.cipher2.subkeys, x$5 = $imul(2, i$1), ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), (x$6 = c.cipher2.subkeys, x$7 = ($imul(2, i$1)) + 1 >> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))); + right = _tuple$1[0]; + left = _tuple$1[1]; + i$1 = i$1 + (1) >> 0; + } + i$2 = 0; + while (true) { + if (!(i$2 < 8)) { break; } + _tuple$2 = feistel(left, right, (x$8 = c.cipher1.subkeys, x$9 = 15 - ($imul(2, i$2)) >> 0, ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])), (x$10 = c.cipher1.subkeys, x$11 = 15 - ((($imul(2, i$2)) + 1 >> 0)) >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))); + left = _tuple$2[0]; + right = _tuple$2[1]; + i$2 = i$2 + (1) >> 0; + } + left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; + right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; + preOutput = (x$12 = $shiftLeft64((new $Uint64(0, right)), 32), x$13 = (new $Uint64(0, left)), new $Uint64(x$12.$high | x$13.$high, (x$12.$low | x$13.$low) >>> 0)); + $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); + }; + tripleDESCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; + KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType.methods = [{prop: "generateSubkeys", name: "generateSubkeys", pkg: "crypto/des", typ: $funcType([sliceType], [], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}]; + ptrType$1.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}]; + desCipher.init("crypto/des", [{prop: "subkeys", name: "subkeys", embedded: false, exported: false, typ: arrayType$4, tag: ""}]); + tripleDESCipher.init("crypto/des", [{prop: "cipher1", name: "cipher1", embedded: false, exported: false, typ: desCipher, tag: ""}, {prop: "cipher2", name: "cipher2", embedded: false, exported: false, typ: desCipher, tag: ""}, {prop: "cipher3", name: "cipher3", embedded: false, exported: false, typ: desCipher, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + feistelBox = arrayType$1.zero(); + permutationFunction = $toNativeArray($kindUint8, [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7]); + permutedChoice1 = $toNativeArray($kindUint8, [7, 15, 23, 31, 39, 47, 55, 63, 6, 14, 22, 30, 38, 46, 54, 62, 5, 13, 21, 29, 37, 45, 53, 61, 4, 12, 20, 28, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 36, 44, 52, 60]); + permutedChoice2 = $toNativeArray($kindUint8, [42, 39, 45, 32, 55, 51, 53, 28, 41, 50, 35, 46, 33, 37, 44, 52, 30, 48, 40, 49, 29, 36, 43, 54, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24]); + sBoxes = $toNativeArray($kindArray, [$toNativeArray($kindArray, [$toNativeArray($kindUint8, [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7]), $toNativeArray($kindUint8, [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8]), $toNativeArray($kindUint8, [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0]), $toNativeArray($kindUint8, [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10]), $toNativeArray($kindUint8, [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5]), $toNativeArray($kindUint8, [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15]), $toNativeArray($kindUint8, [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8]), $toNativeArray($kindUint8, [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1]), $toNativeArray($kindUint8, [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7]), $toNativeArray($kindUint8, [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15]), $toNativeArray($kindUint8, [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9]), $toNativeArray($kindUint8, [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4]), $toNativeArray($kindUint8, [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9]), $toNativeArray($kindUint8, [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6]), $toNativeArray($kindUint8, [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14]), $toNativeArray($kindUint8, [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11]), $toNativeArray($kindUint8, [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8]), $toNativeArray($kindUint8, [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6]), $toNativeArray($kindUint8, [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1]), $toNativeArray($kindUint8, [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6]), $toNativeArray($kindUint8, [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2]), $toNativeArray($kindUint8, [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7]), $toNativeArray($kindUint8, [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2]), $toNativeArray($kindUint8, [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8]), $toNativeArray($kindUint8, [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11])])]); + ksRotations = $toNativeArray($kindUint8, [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/elliptic"] = (function() { + var $pkg = {}, $init, io, big, sync, Curve, CurveParams, p224Curve, p224FieldElement, p256Curve, ptrType, arrayType, ptrType$1, sliceType, sliceType$1, arrayType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, arrayType$6, arrayType$7, arrayType$8, mask, initonce, p384, p521, p224, p224P, p224ZeroModP31, p224ZeroModP63, p256Params, p256RInverse, p256One, p256One$24ptr, p256Precomputed, p256Zero31, p256, zForAffine, GenerateKey, Marshal, Unmarshal, initAll, initP384, initP521, P256, P384, P521, initP224, P224, p224IsZero, p224Add, p224Sub, p224Mul, p224Square, p224ReduceLarge, p224Reduce, p224Invert, p224Contract, p224AddJacobian, p224DoubleJacobian, p224CopyConditional, p224ScalarMult, p224ToAffine, get28BitsFromEnd, p224FromBig, p224ToBig, initP256, p256GetScalar, nonZeroToAllOnes, p256ReduceCarry, p256Sum, p256Diff, p256ReduceDegree, p256Square, p256Mul, p256Assign, p256Invert, p256Scalar3, p256Scalar4, p256Scalar8, p256PointDouble, p256PointAddMixed, p256PointAdd, p256CopyConditional, p256SelectAffinePoint, p256SelectJacobianPoint, p256GetBit, p256ScalarBaseMult, p256PointToAffine, p256ToAffine, p256ScalarMult, p256FromBig, p256ToBig, initP256Arch; + io = $packages["io"]; + big = $packages["math/big"]; + sync = $packages["sync"]; + Curve = $pkg.Curve = $newType(8, $kindInterface, "elliptic.Curve", true, "crypto/elliptic", true, null); + CurveParams = $pkg.CurveParams = $newType(0, $kindStruct, "elliptic.CurveParams", true, "crypto/elliptic", true, function(P_, N_, B_, Gx_, Gy_, BitSize_, Name_) { + this.$val = this; + if (arguments.length === 0) { + this.P = ptrType$1.nil; + this.N = ptrType$1.nil; + this.B = ptrType$1.nil; + this.Gx = ptrType$1.nil; + this.Gy = ptrType$1.nil; + this.BitSize = 0; + this.Name = ""; + return; + } + this.P = P_; + this.N = N_; + this.B = B_; + this.Gx = Gx_; + this.Gy = Gy_; + this.BitSize = BitSize_; + this.Name = Name_; + }); + p224Curve = $pkg.p224Curve = $newType(0, $kindStruct, "elliptic.p224Curve", true, "crypto/elliptic", false, function(CurveParams_, gx_, gy_, b_) { + this.$val = this; + if (arguments.length === 0) { + this.CurveParams = ptrType.nil; + this.gx = arrayType.zero(); + this.gy = arrayType.zero(); + this.b = arrayType.zero(); + return; + } + this.CurveParams = CurveParams_; + this.gx = gx_; + this.gy = gy_; + this.b = b_; + }); + p224FieldElement = $pkg.p224FieldElement = $newType(32, $kindArray, "elliptic.p224FieldElement", true, "crypto/elliptic", false, null); + p256Curve = $pkg.p256Curve = $newType(0, $kindStruct, "elliptic.p256Curve", true, "crypto/elliptic", false, function(CurveParams_) { + this.$val = this; + if (arguments.length === 0) { + this.CurveParams = ptrType.nil; + return; + } + this.CurveParams = CurveParams_; + }); + ptrType = $ptrType(CurveParams); + arrayType = $arrayType($Uint32, 8); + ptrType$1 = $ptrType(big.Int); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($Uint32); + arrayType$1 = $arrayType($Uint64, 15); + arrayType$2 = $arrayType($Uint8, 28); + arrayType$3 = $arrayType($Uint8, 32); + arrayType$4 = $arrayType($Uint32, 9); + arrayType$5 = $arrayType($Uint32, 18); + arrayType$6 = $arrayType($Uint64, 17); + arrayType$7 = $arrayType(arrayType$4, 3); + arrayType$8 = $arrayType(arrayType$7, 16); + CurveParams.ptr.prototype.Params = function() { + var curve; + curve = this; + return curve; + }; + CurveParams.prototype.Params = function() { return this.$val.Params(); }; + CurveParams.ptr.prototype.IsOnCurve = function(x, y) { + var _r, _r$1, curve, threeX, x, x3, y, y2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; curve = $f.curve; threeX = $f.threeX; x = $f.x; x3 = $f.x3; y = $f.y; y2 = $f.y2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + y2 = new big.Int.ptr(false, big.nat.nil).Mul(y, y); + _r = y2.Mod(y2, curve.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + x3 = new big.Int.ptr(false, big.nat.nil).Mul(x, x); + x3.Mul(x3, x); + threeX = new big.Int.ptr(false, big.nat.nil).Lsh(x, 1); + threeX.Add(threeX, x); + x3.Sub(x3, threeX); + x3.Add(x3, curve.B); + _r$1 = x3.Mod(x3, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return x3.Cmp(y2) === 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.IsOnCurve }; } $f._r = _r; $f._r$1 = _r$1; $f.curve = curve; $f.threeX = threeX; $f.x = x; $f.x3 = x3; $f.y = y; $f.y2 = y2; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.IsOnCurve = function(x, y) { return this.$val.IsOnCurve(x, y); }; + zForAffine = function(x, y) { + var x, y, z; + z = new big.Int.ptr(false, big.nat.nil); + if (!((x.Sign() === 0)) || !((y.Sign() === 0))) { + z.SetInt64(new $Int64(0, 1)); + } + return z; + }; + CurveParams.ptr.prototype.affineFromJacobian = function(x, y, z) { + var _r, _r$1, _r$2, _tmp, _tmp$1, curve, x, xOut, y, yOut, z, zinv, zinvsq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; curve = $f.curve; x = $f.x; xOut = $f.xOut; y = $f.y; yOut = $f.yOut; z = $f.z; zinv = $f.zinv; zinvsq = $f.zinvsq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + xOut = ptrType$1.nil; + yOut = ptrType$1.nil; + curve = this; + if (z.Sign() === 0) { + _tmp = new big.Int.ptr(false, big.nat.nil); + _tmp$1 = new big.Int.ptr(false, big.nat.nil); + xOut = _tmp; + yOut = _tmp$1; + $s = -1; return [xOut, yOut]; + } + _r = new big.Int.ptr(false, big.nat.nil).ModInverse(z, curve.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + zinv = _r; + zinvsq = new big.Int.ptr(false, big.nat.nil).Mul(zinv, zinv); + xOut = new big.Int.ptr(false, big.nat.nil).Mul(x, zinvsq); + _r$1 = xOut.Mod(xOut, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + zinvsq.Mul(zinvsq, zinv); + yOut = new big.Int.ptr(false, big.nat.nil).Mul(y, zinvsq); + _r$2 = yOut.Mod(yOut, curve.P); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return [xOut, yOut]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.affineFromJacobian }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.curve = curve; $f.x = x; $f.xOut = xOut; $f.y = y; $f.yOut = yOut; $f.z = z; $f.zinv = zinv; $f.zinvsq = zinvsq; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.affineFromJacobian = function(x, y, z) { return this.$val.affineFromJacobian(x, y, z); }; + CurveParams.ptr.prototype.Add = function(x1, y1, x2, y2) { + var _r, _r$1, _tuple, curve, x1, x2, y1, y2, z1, z2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; curve = $f.curve; x1 = $f.x1; x2 = $f.x2; y1 = $f.y1; y2 = $f.y2; z1 = $f.z1; z2 = $f.z2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + z1 = zForAffine(x1, y1); + z2 = zForAffine(x2, y2); + _r = curve.addJacobian(x1, y1, z1, x2, y2, z2); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + _r$1 = curve.affineFromJacobian(_tuple[0], _tuple[1], _tuple[2]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.Add }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.curve = curve; $f.x1 = x1; $f.x2 = x2; $f.y1 = y1; $f.y2 = y2; $f.z1 = z1; $f.z2 = z2; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.Add = function(x1, y1, x2, y2) { return this.$val.Add(x1, y1, x2, y2); }; + CurveParams.ptr.prototype.addJacobian = function(x1, y1, z1, x2, y2, z2) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, curve, h, i, j, r, s1, s2, u1, u2, v, x1, x2, x3, xEqual, y1, y2, y3, yEqual, z1, z1z1, z2, z2z2, z3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; curve = $f.curve; h = $f.h; i = $f.i; j = $f.j; r = $f.r; s1 = $f.s1; s2 = $f.s2; u1 = $f.u1; u2 = $f.u2; v = $f.v; x1 = $f.x1; x2 = $f.x2; x3 = $f.x3; xEqual = $f.xEqual; y1 = $f.y1; y2 = $f.y2; y3 = $f.y3; yEqual = $f.yEqual; z1 = $f.z1; z1z1 = $f.z1z1; z2 = $f.z2; z2z2 = $f.z2z2; z3 = $f.z3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + _tmp = new big.Int.ptr(false, big.nat.nil); + _tmp$1 = new big.Int.ptr(false, big.nat.nil); + _tmp$2 = new big.Int.ptr(false, big.nat.nil); + x3 = _tmp; + y3 = _tmp$1; + z3 = _tmp$2; + if (z1.Sign() === 0) { + x3.Set(x2); + y3.Set(y2); + z3.Set(z2); + $s = -1; return [x3, y3, z3]; + } + if (z2.Sign() === 0) { + x3.Set(x1); + y3.Set(y1); + z3.Set(z1); + $s = -1; return [x3, y3, z3]; + } + z1z1 = new big.Int.ptr(false, big.nat.nil).Mul(z1, z1); + _r = z1z1.Mod(z1z1, curve.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + z2z2 = new big.Int.ptr(false, big.nat.nil).Mul(z2, z2); + _r$1 = z2z2.Mod(z2z2, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + u1 = new big.Int.ptr(false, big.nat.nil).Mul(x1, z2z2); + _r$2 = u1.Mod(u1, curve.P); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + u2 = new big.Int.ptr(false, big.nat.nil).Mul(x2, z1z1); + _r$3 = u2.Mod(u2, curve.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + h = new big.Int.ptr(false, big.nat.nil).Sub(u2, u1); + xEqual = h.Sign() === 0; + if (h.Sign() === -1) { + h.Add(h, curve.P); + } + i = new big.Int.ptr(false, big.nat.nil).Lsh(h, 1); + i.Mul(i, i); + j = new big.Int.ptr(false, big.nat.nil).Mul(h, i); + s1 = new big.Int.ptr(false, big.nat.nil).Mul(y1, z2); + s1.Mul(s1, z2z2); + _r$4 = s1.Mod(s1, curve.P); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + s2 = new big.Int.ptr(false, big.nat.nil).Mul(y2, z1); + s2.Mul(s2, z1z1); + _r$5 = s2.Mod(s2, curve.P); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + r = new big.Int.ptr(false, big.nat.nil).Sub(s2, s1); + if (r.Sign() === -1) { + r.Add(r, curve.P); + } + yEqual = r.Sign() === 0; + /* */ if (xEqual && yEqual) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (xEqual && yEqual) { */ case 7: + _r$6 = curve.doubleJacobian(x1, y1, z1); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 8: + r.Lsh(r, 1); + v = new big.Int.ptr(false, big.nat.nil).Mul(u1, i); + x3.Set(r); + x3.Mul(x3, x3); + x3.Sub(x3, j); + x3.Sub(x3, v); + x3.Sub(x3, v); + _r$7 = x3.Mod(x3, curve.P); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + y3.Set(r); + v.Sub(v, x3); + y3.Mul(y3, v); + s1.Mul(s1, j); + s1.Lsh(s1, 1); + y3.Sub(y3, s1); + _r$8 = y3.Mod(y3, curve.P); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + z3.Add(z1, z2); + z3.Mul(z3, z3); + z3.Sub(z3, z1z1); + z3.Sub(z3, z2z2); + z3.Mul(z3, h); + _r$9 = z3.Mod(z3, curve.P); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + $s = -1; return [x3, y3, z3]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.addJacobian }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f.curve = curve; $f.h = h; $f.i = i; $f.j = j; $f.r = r; $f.s1 = s1; $f.s2 = s2; $f.u1 = u1; $f.u2 = u2; $f.v = v; $f.x1 = x1; $f.x2 = x2; $f.x3 = x3; $f.xEqual = xEqual; $f.y1 = y1; $f.y2 = y2; $f.y3 = y3; $f.yEqual = yEqual; $f.z1 = z1; $f.z1z1 = z1z1; $f.z2 = z2; $f.z2z2 = z2z2; $f.z3 = z3; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.addJacobian = function(x1, y1, z1, x2, y2, z2) { return this.$val.addJacobian(x1, y1, z1, x2, y2, z2); }; + CurveParams.ptr.prototype.Double = function(x1, y1) { + var _r, _r$1, _tuple, curve, x1, y1, z1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; curve = $f.curve; x1 = $f.x1; y1 = $f.y1; z1 = $f.z1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + z1 = zForAffine(x1, y1); + _r = curve.doubleJacobian(x1, y1, z1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + _r$1 = curve.affineFromJacobian(_tuple[0], _tuple[1], _tuple[2]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.Double }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.curve = curve; $f.x1 = x1; $f.y1 = y1; $f.z1 = z1; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.Double = function(x1, y1) { return this.$val.Double(x1, y1); }; + CurveParams.ptr.prototype.doubleJacobian = function(x, y, z) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, alpha, alpha2, beta, beta8, curve, delta, gamma, x, x3, y, y3, z, z3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; alpha = $f.alpha; alpha2 = $f.alpha2; beta = $f.beta; beta8 = $f.beta8; curve = $f.curve; delta = $f.delta; gamma = $f.gamma; x = $f.x; x3 = $f.x3; y = $f.y; y3 = $f.y3; z = $f.z; z3 = $f.z3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + delta = new big.Int.ptr(false, big.nat.nil).Mul(z, z); + _r = delta.Mod(delta, curve.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + gamma = new big.Int.ptr(false, big.nat.nil).Mul(y, y); + _r$1 = gamma.Mod(gamma, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + alpha = new big.Int.ptr(false, big.nat.nil).Sub(x, delta); + if (alpha.Sign() === -1) { + alpha.Add(alpha, curve.P); + } + alpha2 = new big.Int.ptr(false, big.nat.nil).Add(x, delta); + alpha.Mul(alpha, alpha2); + alpha2.Set(alpha); + alpha.Lsh(alpha, 1); + alpha.Add(alpha, alpha2); + beta = alpha2.Mul(x, gamma); + x3 = new big.Int.ptr(false, big.nat.nil).Mul(alpha, alpha); + beta8 = new big.Int.ptr(false, big.nat.nil).Lsh(beta, 3); + x3.Sub(x3, beta8); + while (true) { + if (!(x3.Sign() === -1)) { break; } + x3.Add(x3, curve.P); + } + _r$2 = x3.Mod(x3, curve.P); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + z3 = new big.Int.ptr(false, big.nat.nil).Add(y, z); + z3.Mul(z3, z3); + z3.Sub(z3, gamma); + if (z3.Sign() === -1) { + z3.Add(z3, curve.P); + } + z3.Sub(z3, delta); + if (z3.Sign() === -1) { + z3.Add(z3, curve.P); + } + _r$3 = z3.Mod(z3, curve.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + beta.Lsh(beta, 2); + beta.Sub(beta, x3); + if (beta.Sign() === -1) { + beta.Add(beta, curve.P); + } + y3 = alpha.Mul(alpha, beta); + gamma.Mul(gamma, gamma); + gamma.Lsh(gamma, 3); + _r$4 = gamma.Mod(gamma, curve.P); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + y3.Sub(y3, gamma); + if (y3.Sign() === -1) { + y3.Add(y3, curve.P); + } + _r$5 = y3.Mod(y3, curve.P); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return [x3, y3, z3]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.doubleJacobian }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.alpha = alpha; $f.alpha2 = alpha2; $f.beta = beta; $f.beta8 = beta8; $f.curve = curve; $f.delta = delta; $f.gamma = gamma; $f.x = x; $f.x3 = x3; $f.y = y; $f.y3 = y3; $f.z = z; $f.z3 = z3; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.doubleJacobian = function(x, y, z) { return this.$val.doubleJacobian(x, y, z); }; + CurveParams.ptr.prototype.ScalarMult = function(Bx, By, k) { + var Bx, By, Bz, _i, _r, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, bitNum, byte$1, curve, k, x, y, y$1, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; Bx = $f.Bx; By = $f.By; Bz = $f.Bz; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; bitNum = $f.bitNum; byte$1 = $f.byte$1; curve = $f.curve; k = $f.k; x = $f.x; y = $f.y; y$1 = $f.y$1; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + Bz = new big.Int.ptr(false, big.nat.nil).SetInt64(new $Int64(0, 1)); + _tmp = new big.Int.ptr(false, big.nat.nil); + _tmp$1 = new big.Int.ptr(false, big.nat.nil); + _tmp$2 = new big.Int.ptr(false, big.nat.nil); + x = _tmp; + y = _tmp$1; + z = _tmp$2; + _ref = k; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + bitNum = 0; + /* while (true) { */ case 3: + /* if (!(bitNum < 8)) { break; } */ if(!(bitNum < 8)) { $s = 4; continue; } + _r = curve.doubleJacobian(x, y, z); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + x = _tuple[0]; + y = _tuple[1]; + z = _tuple[2]; + /* */ if (((byte$1 & 128) >>> 0) === 128) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (((byte$1 & 128) >>> 0) === 128) { */ case 6: + _r$1 = curve.addJacobian(Bx, By, Bz, x, y, z); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + x = _tuple$1[0]; + y = _tuple$1[1]; + z = _tuple$1[2]; + /* } */ case 7: + byte$1 = (y$1 = (1), y$1 < 32 ? (byte$1 << y$1) : 0) << 24 >>> 24; + bitNum = bitNum + (1) >> 0; + /* } */ $s = 3; continue; case 4: + _i++; + /* } */ $s = 1; continue; case 2: + _r$2 = curve.affineFromJacobian(x, y, z); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.ScalarMult }; } $f.Bx = Bx; $f.By = By; $f.Bz = Bz; $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.bitNum = bitNum; $f.byte$1 = byte$1; $f.curve = curve; $f.k = k; $f.x = x; $f.y = y; $f.y$1 = y$1; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.ScalarMult = function(Bx, By, k) { return this.$val.ScalarMult(Bx, By, k); }; + CurveParams.ptr.prototype.ScalarBaseMult = function(k) { + var _r, curve, k, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; curve = $f.curve; k = $f.k; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + curve = this; + _r = curve.ScalarMult(curve.Gx, curve.Gy, k); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: CurveParams.ptr.prototype.ScalarBaseMult }; } $f._r = _r; $f.curve = curve; $f.k = k; $f.$s = $s; $f.$r = $r; return $f; + }; + CurveParams.prototype.ScalarBaseMult = function(k) { return this.$val.ScalarBaseMult(k); }; + GenerateKey = function(curve, rand) { + var N, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, bitSize, byteLen, curve, err, priv, rand, x, x$1, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; N = $f.N; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; bitSize = $f.bitSize; byteLen = $f.byteLen; curve = $f.curve; err = $f.err; priv = $f.priv; rand = $f.rand; x = $f.x; x$1 = $f.x$1; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = sliceType.nil; + x = ptrType$1.nil; + y = ptrType$1.nil; + err = $ifaceNil; + _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + N = _r.N; + bitSize = N.BitLen(); + byteLen = ((bitSize + 7 >> 0)) >> 3 >> 0; + priv = $makeSlice(sliceType, byteLen); + /* while (true) { */ case 2: + /* if (!(x === ptrType$1.nil)) { break; } */ if(!(x === ptrType$1.nil)) { $s = 3; continue; } + _r$1 = io.ReadFull(rand, priv); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [priv, x, y, err]; + } + (0 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 0] = (((0 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 0]) & ((x$1 = (_r$2 = bitSize % 8, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + x$1])))) >>> 0)); + (1 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 1] = (((1 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 1]) ^ (66)) << 24 >>> 24)); + /* */ if (new big.Int.ptr(false, big.nat.nil).SetBytes(priv).Cmp(N) >= 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (new big.Int.ptr(false, big.nat.nil).SetBytes(priv).Cmp(N) >= 0) { */ case 5: + /* continue; */ $s = 2; continue; + /* } */ case 6: + _r$3 = curve.ScalarBaseMult(priv); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + x = _tuple$1[0]; + y = _tuple$1[1]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [priv, x, y, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: GenerateKey }; } $f.N = N; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.bitSize = bitSize; $f.byteLen = byteLen; $f.curve = curve; $f.err = err; $f.priv = priv; $f.rand = rand; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.GenerateKey = GenerateKey; + Marshal = function(curve, x, y) { + var _r, byteLen, curve, ret, x, xBytes, y, yBytes, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; byteLen = $f.byteLen; curve = $f.curve; ret = $f.ret; x = $f.x; xBytes = $f.xBytes; y = $f.y; yBytes = $f.yBytes; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + byteLen = ((_r.BitSize + 7 >> 0)) >> 3 >> 0; + ret = $makeSlice(sliceType, (1 + ($imul(2, byteLen)) >> 0)); + (0 >= ret.$length ? ($throwRuntimeError("index out of range"), undefined) : ret.$array[ret.$offset + 0] = 4); + xBytes = x.Bytes(); + $copySlice($subslice(ret, ((1 + byteLen >> 0) - xBytes.$length >> 0)), xBytes); + yBytes = y.Bytes(); + $copySlice($subslice(ret, ((1 + ($imul(2, byteLen)) >> 0) - yBytes.$length >> 0)), yBytes); + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: Marshal }; } $f._r = _r; $f.byteLen = byteLen; $f.curve = curve; $f.ret = ret; $f.x = x; $f.xBytes = xBytes; $f.y = y; $f.yBytes = yBytes; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Marshal = Marshal; + Unmarshal = function(curve, data) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, byteLen, curve, data, p, x, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; byteLen = $f.byteLen; curve = $f.curve; data = $f.data; p = $f.p; x = $f.x; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = ptrType$1.nil; + y = ptrType$1.nil; + _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + byteLen = ((_r.BitSize + 7 >> 0)) >> 3 >> 0; + if (!((data.$length === (1 + ($imul(2, byteLen)) >> 0)))) { + $s = -1; return [x, y]; + } + if (!(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 4))) { + $s = -1; return [x, y]; + } + _r$1 = curve.Params(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + p = _r$1.P; + x = new big.Int.ptr(false, big.nat.nil).SetBytes($subslice(data, 1, (1 + byteLen >> 0))); + y = new big.Int.ptr(false, big.nat.nil).SetBytes($subslice(data, (1 + byteLen >> 0))); + if (x.Cmp(p) >= 0 || y.Cmp(p) >= 0) { + _tmp = ptrType$1.nil; + _tmp$1 = ptrType$1.nil; + x = _tmp; + y = _tmp$1; + $s = -1; return [x, y]; + } + _r$2 = curve.IsOnCurve(x, y); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!_r$2) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!_r$2) { */ case 3: + _tmp$2 = ptrType$1.nil; + _tmp$3 = ptrType$1.nil; + x = _tmp$2; + y = _tmp$3; + $s = -1; return [x, y]; + /* } */ case 4: + $s = -1; return [x, y]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Unmarshal }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.byteLen = byteLen; $f.curve = curve; $f.data = data; $f.p = p; $f.x = x; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Unmarshal = Unmarshal; + initAll = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = initP224(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = initP256(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = initP384(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = initP521(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initAll }; } $f.$s = $s; $f.$r = $r; return $f; + }; + initP384 = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p384 = new CurveParams.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, "P-384"); + _r = new big.Int.ptr(false, big.nat.nil).SetString("39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319", 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p384.P = _tuple[0]; + _r$1 = new big.Int.ptr(false, big.nat.nil).SetString("39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643", 10); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + p384.N = _tuple$1[0]; + _r$2 = new big.Int.ptr(false, big.nat.nil).SetString("b3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef", 16); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + p384.B = _tuple$2[0]; + _r$3 = new big.Int.ptr(false, big.nat.nil).SetString("aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", 16); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + p384.Gx = _tuple$3[0]; + _r$4 = new big.Int.ptr(false, big.nat.nil).SetString("3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", 16); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$4 = _r$4; + p384.Gy = _tuple$4[0]; + p384.BitSize = 384; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initP384 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.$s = $s; $f.$r = $r; return $f; + }; + initP521 = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p521 = new CurveParams.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, "P-521"); + _r = new big.Int.ptr(false, big.nat.nil).SetString("6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151", 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p521.P = _tuple[0]; + _r$1 = new big.Int.ptr(false, big.nat.nil).SetString("6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449", 10); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + p521.N = _tuple$1[0]; + _r$2 = new big.Int.ptr(false, big.nat.nil).SetString("051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00", 16); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + p521.B = _tuple$2[0]; + _r$3 = new big.Int.ptr(false, big.nat.nil).SetString("c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", 16); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + p521.Gx = _tuple$3[0]; + _r$4 = new big.Int.ptr(false, big.nat.nil).SetString("11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", 16); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$4 = _r$4; + p521.Gy = _tuple$4[0]; + p521.BitSize = 521; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initP521 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.$s = $s; $f.$r = $r; return $f; + }; + P256 = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new p256.constructor.elem(p256); + /* */ } return; } if ($f === undefined) { $f = { $blk: P256 }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.P256 = P256; + P384 = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return p384; + /* */ } return; } if ($f === undefined) { $f = { $blk: P384 }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.P384 = P384; + P521 = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return p521; + /* */ } return; } if ($f === undefined) { $f = { $blk: P521 }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.P521 = P521; + initP224 = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p224.CurveParams = new CurveParams.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, "P-224"); + _r = new big.Int.ptr(false, big.nat.nil).SetString("26959946667150639794667015087019630673557916260026308143510066298881", 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p224.CurveParams.P = _tuple[0]; + _r$1 = new big.Int.ptr(false, big.nat.nil).SetString("26959946667150639794667015087019625940457807714424391721682722368061", 10); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + p224.CurveParams.N = _tuple$1[0]; + _r$2 = new big.Int.ptr(false, big.nat.nil).SetString("b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4", 16); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + p224.CurveParams.B = _tuple$2[0]; + _r$3 = new big.Int.ptr(false, big.nat.nil).SetString("b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21", 16); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + p224.CurveParams.Gx = _tuple$3[0]; + _r$4 = new big.Int.ptr(false, big.nat.nil).SetString("bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34", 16); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$4 = _r$4; + p224.CurveParams.Gy = _tuple$4[0]; + p224.CurveParams.BitSize = 224; + p224FromBig(p224.gx, p224.CurveParams.Gx); + p224FromBig(p224.gy, p224.CurveParams.Gy); + p224FromBig(p224.b, p224.CurveParams.B); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initP224 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.$s = $s; $f.$r = $r; return $f; + }; + P224 = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new p224.constructor.elem(p224); + /* */ } return; } if ($f === undefined) { $f = { $blk: P224 }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.P224 = P224; + p224Curve.ptr.prototype.Params = function() { + var curve; + curve = this; + return curve.CurveParams; + }; + p224Curve.prototype.Params = function() { return this.$val.Params(); }; + p224Curve.ptr.prototype.IsOnCurve = function(bigX, bigY) { + var _tmp, _tmp$1, bigX, bigY, curve, i, i$1, tmp, x, x3, y; + curve = this; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + x = $clone(_tmp, p224FieldElement); + y = $clone(_tmp$1, p224FieldElement); + p224FromBig(x, bigX); + p224FromBig(y, bigY); + tmp = arrayType$1.zero(); + x3 = arrayType.zero(); + p224Square(x3, x, tmp); + p224Mul(x3, x3, x, tmp); + i = 0; + while (true) { + if (!(i < 8)) { break; } + ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = ($imul(((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i]), (3)) >>> 0)); + i = i + (1) >> 0; + } + p224Sub(x3, x3, x); + p224Reduce(x3); + p224Add(x3, x3, curve.b); + p224Contract(x3, x3); + p224Square(y, y, tmp); + p224Contract(y, y); + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + if (!((((i$1 < 0 || i$1 >= y.length) ? ($throwRuntimeError("index out of range"), undefined) : y[i$1]) === ((i$1 < 0 || i$1 >= x3.length) ? ($throwRuntimeError("index out of range"), undefined) : x3[i$1])))) { + return false; + } + i$1 = i$1 + (1) >> 0; + } + return true; + }; + p224Curve.prototype.IsOnCurve = function(bigX, bigY) { return this.$val.IsOnCurve(bigX, bigY); }; + p224Curve.ptr.prototype.Add = function(bigX1, bigY1, bigX2, bigY2) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, bigX1, bigX2, bigY1, bigY2, x, x1, x2, x3, y, y1, y2, y3, z1, z2, z3; + x = ptrType$1.nil; + y = ptrType$1.nil; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + _tmp$5 = arrayType.zero(); + _tmp$6 = arrayType.zero(); + _tmp$7 = arrayType.zero(); + _tmp$8 = arrayType.zero(); + x1 = $clone(_tmp, p224FieldElement); + y1 = $clone(_tmp$1, p224FieldElement); + z1 = $clone(_tmp$2, p224FieldElement); + x2 = $clone(_tmp$3, p224FieldElement); + y2 = $clone(_tmp$4, p224FieldElement); + z2 = $clone(_tmp$5, p224FieldElement); + x3 = $clone(_tmp$6, p224FieldElement); + y3 = $clone(_tmp$7, p224FieldElement); + z3 = $clone(_tmp$8, p224FieldElement); + p224FromBig(x1, bigX1); + p224FromBig(y1, bigY1); + if (!((bigX1.Sign() === 0)) || !((bigY1.Sign() === 0))) { + z1[0] = 1; + } + p224FromBig(x2, bigX2); + p224FromBig(y2, bigY2); + if (!((bigX2.Sign() === 0)) || !((bigY2.Sign() === 0))) { + z2[0] = 1; + } + p224AddJacobian(x3, y3, z3, x1, y1, z1, x2, y2, z2); + _tuple = p224ToAffine(x3, y3, z3); + x = _tuple[0]; + y = _tuple[1]; + return [x, y]; + }; + p224Curve.prototype.Add = function(bigX1, bigY1, bigX2, bigY2) { return this.$val.Add(bigX1, bigY1, bigX2, bigY2); }; + p224Curve.ptr.prototype.Double = function(bigX1, bigY1) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, bigX1, bigY1, x, x1, x2, y, y1, y2, z1, z2; + x = ptrType$1.nil; + y = ptrType$1.nil; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + _tmp$5 = arrayType.zero(); + x1 = $clone(_tmp, p224FieldElement); + y1 = $clone(_tmp$1, p224FieldElement); + z1 = $clone(_tmp$2, p224FieldElement); + x2 = $clone(_tmp$3, p224FieldElement); + y2 = $clone(_tmp$4, p224FieldElement); + z2 = $clone(_tmp$5, p224FieldElement); + p224FromBig(x1, bigX1); + p224FromBig(y1, bigY1); + z1[0] = 1; + p224DoubleJacobian(x2, y2, z2, x1, y1, z1); + _tuple = p224ToAffine(x2, y2, z2); + x = _tuple[0]; + y = _tuple[1]; + return [x, y]; + }; + p224Curve.prototype.Double = function(bigX1, bigY1) { return this.$val.Double(bigX1, bigY1); }; + p224Curve.ptr.prototype.ScalarMult = function(bigX1, bigY1, scalar) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, bigX1, bigY1, scalar, x, x1, x2, y, y1, y2, z1, z2; + x = ptrType$1.nil; + y = ptrType$1.nil; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + _tmp$5 = arrayType.zero(); + x1 = $clone(_tmp, p224FieldElement); + y1 = $clone(_tmp$1, p224FieldElement); + z1 = $clone(_tmp$2, p224FieldElement); + x2 = $clone(_tmp$3, p224FieldElement); + y2 = $clone(_tmp$4, p224FieldElement); + z2 = $clone(_tmp$5, p224FieldElement); + p224FromBig(x1, bigX1); + p224FromBig(y1, bigY1); + z1[0] = 1; + p224ScalarMult(x2, y2, z2, x1, y1, z1, scalar); + _tuple = p224ToAffine(x2, y2, z2); + x = _tuple[0]; + y = _tuple[1]; + return [x, y]; + }; + p224Curve.prototype.ScalarMult = function(bigX1, bigY1, scalar) { return this.$val.ScalarMult(bigX1, bigY1, scalar); }; + p224Curve.ptr.prototype.ScalarBaseMult = function(scalar) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, curve, scalar, x, x2, y, y2, z1, z2; + x = ptrType$1.nil; + y = ptrType$1.nil; + curve = this; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + z1 = $clone(_tmp, p224FieldElement); + x2 = $clone(_tmp$1, p224FieldElement); + y2 = $clone(_tmp$2, p224FieldElement); + z2 = $clone(_tmp$3, p224FieldElement); + z1[0] = 1; + p224ScalarMult(x2, y2, z2, curve.gx, curve.gy, z1, scalar); + _tuple = p224ToAffine(x2, y2, z2); + x = _tuple[0]; + y = _tuple[1]; + return [x, y]; + }; + p224Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; + p224IsZero = function(a) { + var _i, _ref, _tmp, _tmp$1, a, i, isP, isZero, minimal, result, v; + minimal = arrayType.zero(); + p224Contract(minimal, a); + _tmp = 0; + _tmp$1 = 0; + isZero = _tmp; + isP = _tmp$1; + _ref = minimal; + _i = 0; + while (true) { + if (!(_i < 8)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + isZero = (isZero | (v)) >>> 0; + isP = (isP | ((v - ((i < 0 || i >= p224P.length) ? ($throwRuntimeError("index out of range"), undefined) : p224P[i]) >>> 0))) >>> 0; + _i++; + } + isZero = (isZero | ((isZero >>> 16 >>> 0))) >>> 0; + isZero = (isZero | ((isZero >>> 8 >>> 0))) >>> 0; + isZero = (isZero | ((isZero >>> 4 >>> 0))) >>> 0; + isZero = (isZero | ((isZero >>> 2 >>> 0))) >>> 0; + isZero = (isZero | ((isZero >>> 1 >>> 0))) >>> 0; + isP = (isP | ((isP >>> 16 >>> 0))) >>> 0; + isP = (isP | ((isP >>> 8 >>> 0))) >>> 0; + isP = (isP | ((isP >>> 4 >>> 0))) >>> 0; + isP = (isP | ((isP >>> 2 >>> 0))) >>> 0; + isP = (isP | ((isP >>> 1 >>> 0))) >>> 0; + result = (isZero & isP) >>> 0; + result = (((~result >>> 0)) & 1) >>> 0; + return result; + }; + p224Add = function(out, a, b) { + var a, b, i, out; + i = 0; + while (true) { + if (!(i < 8)) { break; } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) + (b.nilCheck, ((i < 0 || i >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[i])) >>> 0)); + i = i + (1) >> 0; + } + }; + p224Sub = function(out, a, b) { + var a, b, i, out; + i = 0; + while (true) { + if (!(i < 8)) { break; } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) + ((i < 0 || i >= p224ZeroModP31.$length) ? ($throwRuntimeError("index out of range"), undefined) : p224ZeroModP31.$array[p224ZeroModP31.$offset + i]) >>> 0) - (b.nilCheck, ((i < 0 || i >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[i])) >>> 0)); + i = i + (1) >> 0; + } + }; + p224Mul = function(out, a, b, tmp) { + var _index, a, b, i, i$1, j, out, tmp, x, x$1; + i = 0; + while (true) { + if (!(i < 15)) { break; } + tmp.nilCheck, ((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i] = new $Uint64(0, 0)); + i = i + (1) >> 0; + } + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + j = 0; + while (true) { + if (!(j < 8)) { break; } + _index = i$1 + j >> 0; + tmp.nilCheck, ((_index < 0 || _index >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index] = (x = (tmp.nilCheck, ((_index < 0 || _index >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index])), x$1 = $mul64((new $Uint64(0, (a.nilCheck, ((i$1 < 0 || i$1 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i$1])))), (new $Uint64(0, (b.nilCheck, ((j < 0 || j >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[j]))))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low))); + j = j + (1) >> 0; + } + i$1 = i$1 + (1) >> 0; + } + p224ReduceLarge(out, tmp); + }; + p224Square = function(out, a, tmp) { + var _index, _index$1, a, i, i$1, j, out, r, tmp, x, x$1, x$2, x$3; + i = 0; + while (true) { + if (!(i < 15)) { break; } + tmp.nilCheck, ((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i] = new $Uint64(0, 0)); + i = i + (1) >> 0; + } + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + j = 0; + while (true) { + if (!(j <= i$1)) { break; } + r = $mul64((new $Uint64(0, (a.nilCheck, ((i$1 < 0 || i$1 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i$1])))), (new $Uint64(0, (a.nilCheck, ((j < 0 || j >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[j]))))); + if (i$1 === j) { + _index = i$1 + j >> 0; + tmp.nilCheck, ((_index < 0 || _index >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index] = (x = (tmp.nilCheck, ((_index < 0 || _index >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index])), x$1 = r, new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low))); + } else { + _index$1 = i$1 + j >> 0; + tmp.nilCheck, ((_index$1 < 0 || _index$1 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index$1] = (x$2 = (tmp.nilCheck, ((_index$1 < 0 || _index$1 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[_index$1])), x$3 = $shiftLeft64(r, 1), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low))); + } + j = j + (1) >> 0; + } + i$1 = i$1 + (1) >> 0; + } + p224ReduceLarge(out, tmp); + }; + p224ReduceLarge = function(out, in$1) { + var _index, _index$1, _index$2, _index$3, i, i$1, i$2, in$1, out, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + i = 0; + while (true) { + if (!(i < 8)) { break; } + in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i] = (x = (in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])), x$1 = ((i < 0 || i >= p224ZeroModP63.length) ? ($throwRuntimeError("index out of range"), undefined) : p224ZeroModP63[i]), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low))); + i = i + (1) >> 0; + } + i$1 = 14; + while (true) { + if (!(i$1 >= 8)) { break; } + _index = i$1 - 8 >> 0; + in$1.nilCheck, ((_index < 0 || _index >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index] = (x$2 = (in$1.nilCheck, ((_index < 0 || _index >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index])), x$3 = (in$1.nilCheck, ((i$1 < 0 || i$1 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i$1])), new $Uint64(x$2.$high - x$3.$high, x$2.$low - x$3.$low))); + _index$1 = i$1 - 5 >> 0; + in$1.nilCheck, ((_index$1 < 0 || _index$1 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$1] = (x$4 = (in$1.nilCheck, ((_index$1 < 0 || _index$1 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$1])), x$5 = $shiftLeft64(((x$6 = (in$1.nilCheck, ((i$1 < 0 || i$1 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i$1])), new $Uint64(x$6.$high & 0, (x$6.$low & 65535) >>> 0))), 12), new $Uint64(x$4.$high + x$5.$high, x$4.$low + x$5.$low))); + _index$2 = i$1 - 4 >> 0; + in$1.nilCheck, ((_index$2 < 0 || _index$2 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$2] = (x$7 = (in$1.nilCheck, ((_index$2 < 0 || _index$2 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$2])), x$8 = $shiftRightUint64((in$1.nilCheck, ((i$1 < 0 || i$1 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i$1])), 16), new $Uint64(x$7.$high + x$8.$high, x$7.$low + x$8.$low))); + i$1 = i$1 - (1) >> 0; + } + in$1.nilCheck, in$1[8] = new $Uint64(0, 0); + i$2 = 1; + while (true) { + if (!(i$2 < 8)) { break; } + _index$3 = i$2 + 1 >> 0; + in$1.nilCheck, ((_index$3 < 0 || _index$3 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$3] = (x$9 = (in$1.nilCheck, ((_index$3 < 0 || _index$3 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[_index$3])), x$10 = $shiftRightUint64((in$1.nilCheck, ((i$2 < 0 || i$2 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i$2])), 28), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low))); + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (((x$11 = (in$1.nilCheck, ((i$2 < 0 || i$2 >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i$2])), new $Uint64(x$11.$high & 0, (x$11.$low & 268435455) >>> 0)).$low >>> 0))); + i$2 = i$2 + (1) >> 0; + } + in$1.nilCheck, in$1[0] = (x$12 = (in$1.nilCheck, in$1[0]), x$13 = (in$1.nilCheck, in$1[8]), new $Uint64(x$12.$high - x$13.$high, x$12.$low - x$13.$low)); + out.nilCheck, out[3] = ((out.nilCheck, out[3]) + (((((x$14 = (in$1.nilCheck, in$1[8]), new $Uint64(x$14.$high & 0, (x$14.$low & 65535) >>> 0)).$low >>> 0)) << 12 >>> 0)) >>> 0); + out.nilCheck, out[4] = ((out.nilCheck, out[4]) + ((($shiftRightUint64((in$1.nilCheck, in$1[8]), 16).$low >>> 0))) >>> 0); + out.nilCheck, out[0] = (((x$15 = (in$1.nilCheck, in$1[0]), new $Uint64(x$15.$high & 0, (x$15.$low & 268435455) >>> 0)).$low >>> 0)); + out.nilCheck, out[1] = ((out.nilCheck, out[1]) + ((((x$16 = $shiftRightUint64((in$1.nilCheck, in$1[0]), 28), new $Uint64(x$16.$high & 0, (x$16.$low & 268435455) >>> 0)).$low >>> 0))) >>> 0); + out.nilCheck, out[2] = ((out.nilCheck, out[2]) + ((($shiftRightUint64((in$1.nilCheck, in$1[0]), 56).$low >>> 0))) >>> 0); + }; + p224Reduce = function(a) { + var _index, a, i, mask$1, top, y; + i = 0; + while (true) { + if (!(i < 7)) { break; } + _index = i + 1 >> 0; + a.nilCheck, ((_index < 0 || _index >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[_index] = ((a.nilCheck, ((_index < 0 || _index >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[_index])) + (((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) >>> 28 >>> 0)) >>> 0)); + a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = (((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + top = (a.nilCheck, a[7]) >>> 28 >>> 0; + a.nilCheck, a[7] = (((a.nilCheck, a[7]) & (268435455)) >>> 0); + mask$1 = top; + mask$1 = (mask$1 | ((mask$1 >>> 2 >>> 0))) >>> 0; + mask$1 = (mask$1 | ((mask$1 >>> 1 >>> 0))) >>> 0; + mask$1 = (y = (31), y < 32 ? (mask$1 << y) : 0) >>> 0; + mask$1 = (((((mask$1 >> 0)) >> 31 >> 0) >>> 0)); + a.nilCheck, a[0] = ((a.nilCheck, a[0]) - (top) >>> 0); + a.nilCheck, a[3] = ((a.nilCheck, a[3]) + ((top << 12 >>> 0)) >>> 0); + a.nilCheck, a[3] = ((a.nilCheck, a[3]) - (((1 & mask$1) >>> 0)) >>> 0); + a.nilCheck, a[2] = ((a.nilCheck, a[2]) + (((mask$1 & 268435455) >>> 0)) >>> 0); + a.nilCheck, a[1] = ((a.nilCheck, a[1]) + (((mask$1 & 268435455) >>> 0)) >>> 0); + a.nilCheck, a[0] = ((a.nilCheck, a[0]) + (((mask$1 & 268435456) >>> 0)) >>> 0); + }; + p224Invert = function(out, in$1) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, c, f1, f2, f3, f4, i, i$1, i$2, i$3, i$4, i$5, i$6, in$1, out; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + f1 = $clone(_tmp, p224FieldElement); + f2 = $clone(_tmp$1, p224FieldElement); + f3 = $clone(_tmp$2, p224FieldElement); + f4 = $clone(_tmp$3, p224FieldElement); + c = arrayType$1.zero(); + p224Square(f1, in$1, c); + p224Mul(f1, f1, in$1, c); + p224Square(f1, f1, c); + p224Mul(f1, f1, in$1, c); + p224Square(f2, f1, c); + p224Square(f2, f2, c); + p224Square(f2, f2, c); + p224Mul(f1, f1, f2, c); + p224Square(f2, f1, c); + i = 0; + while (true) { + if (!(i < 5)) { break; } + p224Square(f2, f2, c); + i = i + (1) >> 0; + } + p224Mul(f2, f2, f1, c); + p224Square(f3, f2, c); + i$1 = 0; + while (true) { + if (!(i$1 < 11)) { break; } + p224Square(f3, f3, c); + i$1 = i$1 + (1) >> 0; + } + p224Mul(f2, f3, f2, c); + p224Square(f3, f2, c); + i$2 = 0; + while (true) { + if (!(i$2 < 23)) { break; } + p224Square(f3, f3, c); + i$2 = i$2 + (1) >> 0; + } + p224Mul(f3, f3, f2, c); + p224Square(f4, f3, c); + i$3 = 0; + while (true) { + if (!(i$3 < 47)) { break; } + p224Square(f4, f4, c); + i$3 = i$3 + (1) >> 0; + } + p224Mul(f3, f3, f4, c); + p224Square(f4, f3, c); + i$4 = 0; + while (true) { + if (!(i$4 < 23)) { break; } + p224Square(f4, f4, c); + i$4 = i$4 + (1) >> 0; + } + p224Mul(f2, f4, f2, c); + i$5 = 0; + while (true) { + if (!(i$5 < 6)) { break; } + p224Square(f2, f2, c); + i$5 = i$5 + (1) >> 0; + } + p224Mul(f1, f1, f2, c); + p224Square(f1, f1, c); + p224Mul(f1, f1, in$1, c); + i$6 = 0; + while (true) { + if (!(i$6 < 97)) { break; } + p224Square(f1, f1, c); + i$6 = i$6 + (1) >> 0; + } + p224Mul(out, f1, f3, c); + }; + p224Contract = function(out, in$1) { + var _index, _index$1, _index$2, _index$3, bottom3NonZero, i, i$1, i$2, i$3, i$4, in$1, mask$1, mask$2, mask$3, n, out, out3Equal, out3GT, top, top4AllOnes; + $copySlice(new sliceType$1(out), new sliceType$1(in$1)); + i = 0; + while (true) { + if (!(i < 7)) { break; } + _index = i + 1 >> 0; + out.nilCheck, ((_index < 0 || _index >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index] = ((out.nilCheck, ((_index < 0 || _index >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index])) + (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + top = (out.nilCheck, out[7]) >>> 28 >>> 0; + out.nilCheck, out[7] = (((out.nilCheck, out[7]) & (268435455)) >>> 0); + out.nilCheck, out[0] = ((out.nilCheck, out[0]) - (top) >>> 0); + out.nilCheck, out[3] = ((out.nilCheck, out[3]) + ((top << 12 >>> 0)) >>> 0); + i$1 = 0; + while (true) { + if (!(i$1 < 3)) { break; } + mask$1 = ((((((out.nilCheck, ((i$1 < 0 || i$1 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$1])) >> 0)) >> 31 >> 0) >>> 0)); + out.nilCheck, ((i$1 < 0 || i$1 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$1] = ((out.nilCheck, ((i$1 < 0 || i$1 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$1])) + (((268435456 & mask$1) >>> 0)) >>> 0)); + _index$1 = i$1 + 1 >> 0; + out.nilCheck, ((_index$1 < 0 || _index$1 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$1] = ((out.nilCheck, ((_index$1 < 0 || _index$1 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$1])) - (((1 & mask$1) >>> 0)) >>> 0)); + i$1 = i$1 + (1) >> 0; + } + i$2 = 3; + while (true) { + if (!(i$2 < 7)) { break; } + _index$2 = i$2 + 1 >> 0; + out.nilCheck, ((_index$2 < 0 || _index$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$2] = ((out.nilCheck, ((_index$2 < 0 || _index$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$2])) + (((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) >>> 28 >>> 0)) >>> 0)); + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) & (268435455)) >>> 0)); + i$2 = i$2 + (1) >> 0; + } + top = (out.nilCheck, out[7]) >>> 28 >>> 0; + out.nilCheck, out[7] = (((out.nilCheck, out[7]) & (268435455)) >>> 0); + out.nilCheck, out[0] = ((out.nilCheck, out[0]) - (top) >>> 0); + out.nilCheck, out[3] = ((out.nilCheck, out[3]) + ((top << 12 >>> 0)) >>> 0); + i$3 = 0; + while (true) { + if (!(i$3 < 3)) { break; } + mask$2 = ((((((out.nilCheck, ((i$3 < 0 || i$3 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$3])) >> 0)) >> 31 >> 0) >>> 0)); + out.nilCheck, ((i$3 < 0 || i$3 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$3] = ((out.nilCheck, ((i$3 < 0 || i$3 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$3])) + (((268435456 & mask$2) >>> 0)) >>> 0)); + _index$3 = i$3 + 1 >> 0; + out.nilCheck, ((_index$3 < 0 || _index$3 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$3] = ((out.nilCheck, ((_index$3 < 0 || _index$3 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[_index$3])) - (((1 & mask$2) >>> 0)) >>> 0)); + i$3 = i$3 + (1) >> 0; + } + top4AllOnes = 4294967295; + i$4 = 4; + while (true) { + if (!(i$4 < 8)) { break; } + top4AllOnes = (top4AllOnes & ((out.nilCheck, ((i$4 < 0 || i$4 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$4])))) >>> 0; + i$4 = i$4 + (1) >> 0; + } + top4AllOnes = (top4AllOnes | (4026531840)) >>> 0; + top4AllOnes = (top4AllOnes & ((top4AllOnes >>> 16 >>> 0))) >>> 0; + top4AllOnes = (top4AllOnes & ((top4AllOnes >>> 8 >>> 0))) >>> 0; + top4AllOnes = (top4AllOnes & ((top4AllOnes >>> 4 >>> 0))) >>> 0; + top4AllOnes = (top4AllOnes & ((top4AllOnes >>> 2 >>> 0))) >>> 0; + top4AllOnes = (top4AllOnes & ((top4AllOnes >>> 1 >>> 0))) >>> 0; + top4AllOnes = ((((((top4AllOnes << 31 >>> 0) >> 0)) >> 31 >> 0) >>> 0)); + bottom3NonZero = ((((out.nilCheck, out[0]) | (out.nilCheck, out[1])) >>> 0) | (out.nilCheck, out[2])) >>> 0; + bottom3NonZero = (bottom3NonZero | ((bottom3NonZero >>> 16 >>> 0))) >>> 0; + bottom3NonZero = (bottom3NonZero | ((bottom3NonZero >>> 8 >>> 0))) >>> 0; + bottom3NonZero = (bottom3NonZero | ((bottom3NonZero >>> 4 >>> 0))) >>> 0; + bottom3NonZero = (bottom3NonZero | ((bottom3NonZero >>> 2 >>> 0))) >>> 0; + bottom3NonZero = (bottom3NonZero | ((bottom3NonZero >>> 1 >>> 0))) >>> 0; + bottom3NonZero = ((((((bottom3NonZero << 31 >>> 0) >> 0)) >> 31 >> 0) >>> 0)); + n = (out.nilCheck, out[3]) - 268431360 >>> 0; + out3Equal = n; + out3Equal = (out3Equal | ((out3Equal >>> 16 >>> 0))) >>> 0; + out3Equal = (out3Equal | ((out3Equal >>> 8 >>> 0))) >>> 0; + out3Equal = (out3Equal | ((out3Equal >>> 4 >>> 0))) >>> 0; + out3Equal = (out3Equal | ((out3Equal >>> 2 >>> 0))) >>> 0; + out3Equal = (out3Equal | ((out3Equal >>> 1 >>> 0))) >>> 0; + out3Equal = ~((((((out3Equal << 31 >>> 0) >> 0)) >> 31 >> 0) >>> 0)) >>> 0; + out3GT = ~(((((n >> 0)) >> 31 >> 0) >>> 0)) >>> 0; + mask$3 = (top4AllOnes & ((((((out3Equal & bottom3NonZero) >>> 0)) | out3GT) >>> 0))) >>> 0; + out.nilCheck, out[0] = ((out.nilCheck, out[0]) - (((1 & mask$3) >>> 0)) >>> 0); + out.nilCheck, out[3] = ((out.nilCheck, out[3]) - (((268431360 & mask$3) >>> 0)) >>> 0); + out.nilCheck, out[4] = ((out.nilCheck, out[4]) - (((268435455 & mask$3) >>> 0)) >>> 0); + out.nilCheck, out[5] = ((out.nilCheck, out[5]) - (((268435455 & mask$3) >>> 0)) >>> 0); + out.nilCheck, out[6] = ((out.nilCheck, out[6]) - (((268435455 & mask$3) >>> 0)) >>> 0); + out.nilCheck, out[7] = ((out.nilCheck, out[7]) - (((268435455 & mask$3) >>> 0)) >>> 0); + }; + p224AddJacobian = function(x3, y3, z3, x1, y1, z1, x2, y2, z2) { + var _tmp, _tmp$1, _tmp$10, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, h, i, i$1, i$2, i$3, j, j$1, r, s1, s2, u1, u2, v, x1, x2, x3, xEqual, y, y$1, y1, y2, y3, yEqual, z1, z1IsZero, z1z1, z2, z2IsZero, z2z2, z3; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + _tmp$5 = arrayType.zero(); + _tmp$6 = arrayType.zero(); + _tmp$7 = arrayType.zero(); + _tmp$8 = arrayType.zero(); + _tmp$9 = arrayType.zero(); + _tmp$10 = arrayType.zero(); + z1z1 = $clone(_tmp, p224FieldElement); + z2z2 = $clone(_tmp$1, p224FieldElement); + u1 = $clone(_tmp$2, p224FieldElement); + u2 = $clone(_tmp$3, p224FieldElement); + s1 = $clone(_tmp$4, p224FieldElement); + s2 = $clone(_tmp$5, p224FieldElement); + h = $clone(_tmp$6, p224FieldElement); + i = $clone(_tmp$7, p224FieldElement); + j = $clone(_tmp$8, p224FieldElement); + r = $clone(_tmp$9, p224FieldElement); + v = $clone(_tmp$10, p224FieldElement); + c = arrayType$1.zero(); + z1IsZero = p224IsZero(z1); + z2IsZero = p224IsZero(z2); + p224Square(z1z1, z1, c); + p224Square(z2z2, z2, c); + p224Mul(u1, x1, z2z2, c); + p224Mul(u2, x2, z1z1, c); + p224Mul(s1, z2, z2z2, c); + p224Mul(s1, y1, s1, c); + p224Mul(s2, z1, z1z1, c); + p224Mul(s2, y2, s2, c); + p224Sub(h, u2, u1); + p224Reduce(h); + xEqual = p224IsZero(h); + j$1 = 0; + while (true) { + if (!(j$1 < 8)) { break; } + ((j$1 < 0 || j$1 >= i.length) ? ($throwRuntimeError("index out of range"), undefined) : i[j$1] = (((j$1 < 0 || j$1 >= h.length) ? ($throwRuntimeError("index out of range"), undefined) : h[j$1]) << 1 >>> 0)); + j$1 = j$1 + (1) >> 0; + } + p224Reduce(i); + p224Square(i, i, c); + p224Mul(j, h, i, c); + p224Sub(r, s2, s1); + p224Reduce(r); + yEqual = p224IsZero(r); + if ((xEqual === 1) && (yEqual === 1) && (z1IsZero === 0) && (z2IsZero === 0)) { + p224DoubleJacobian(x3, y3, z3, x1, y1, z1); + return; + } + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + ((i$1 < 0 || i$1 >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[i$1] = ((y = (1), y < 32 ? (((i$1 < 0 || i$1 >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[i$1]) << y) : 0) >>> 0)); + i$1 = i$1 + (1) >> 0; + } + p224Reduce(r); + p224Mul(v, u1, i, c); + p224Add(z1z1, z1z1, z2z2); + p224Add(z2z2, z1, z2); + p224Reduce(z2z2); + p224Square(z2z2, z2z2, c); + p224Sub(z3, z2z2, z1z1); + p224Reduce(z3); + p224Mul(z3, z3, h, c); + i$2 = 0; + while (true) { + if (!(i$2 < 8)) { break; } + ((i$2 < 0 || i$2 >= z1z1.length) ? ($throwRuntimeError("index out of range"), undefined) : z1z1[i$2] = (((i$2 < 0 || i$2 >= v.length) ? ($throwRuntimeError("index out of range"), undefined) : v[i$2]) << 1 >>> 0)); + i$2 = i$2 + (1) >> 0; + } + p224Add(z1z1, j, z1z1); + p224Reduce(z1z1); + p224Square(x3, r, c); + p224Sub(x3, x3, z1z1); + p224Reduce(x3); + i$3 = 0; + while (true) { + if (!(i$3 < 8)) { break; } + ((i$3 < 0 || i$3 >= s1.length) ? ($throwRuntimeError("index out of range"), undefined) : s1[i$3] = ((y$1 = (1), y$1 < 32 ? (((i$3 < 0 || i$3 >= s1.length) ? ($throwRuntimeError("index out of range"), undefined) : s1[i$3]) << y$1) : 0) >>> 0)); + i$3 = i$3 + (1) >> 0; + } + p224Mul(s1, s1, j, c); + p224Sub(z1z1, v, x3); + p224Reduce(z1z1); + p224Mul(z1z1, z1z1, r, c); + p224Sub(y3, z1z1, s1); + p224Reduce(y3); + p224CopyConditional(x3, x2, z1IsZero); + p224CopyConditional(x3, x1, z2IsZero); + p224CopyConditional(y3, y2, z1IsZero); + p224CopyConditional(y3, y1, z2IsZero); + p224CopyConditional(z3, z2, z1IsZero); + p224CopyConditional(z3, z1, z2IsZero); + }; + p224DoubleJacobian = function(x3, y3, z3, x1, y1, z1) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, alpha, beta, c, delta, gamma, i, i$1, i$2, i$3, t, x1, x3, y, y$1, y1, y3, z1, z3; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + delta = $clone(_tmp, p224FieldElement); + gamma = $clone(_tmp$1, p224FieldElement); + beta = $clone(_tmp$2, p224FieldElement); + alpha = $clone(_tmp$3, p224FieldElement); + t = $clone(_tmp$4, p224FieldElement); + c = arrayType$1.zero(); + p224Square(delta, z1, c); + p224Square(gamma, y1, c); + p224Mul(beta, x1, gamma, c); + p224Add(t, x1, delta); + i = 0; + while (true) { + if (!(i < 8)) { break; } + ((i < 0 || i >= t.length) ? ($throwRuntimeError("index out of range"), undefined) : t[i] = (((i < 0 || i >= t.length) ? ($throwRuntimeError("index out of range"), undefined) : t[i]) + ((((i < 0 || i >= t.length) ? ($throwRuntimeError("index out of range"), undefined) : t[i]) << 1 >>> 0)) >>> 0)); + i = i + (1) >> 0; + } + p224Reduce(t); + p224Sub(alpha, x1, delta); + p224Reduce(alpha); + p224Mul(alpha, alpha, t, c); + p224Add(z3, y1, z1); + p224Reduce(z3); + p224Square(z3, z3, c); + p224Sub(z3, z3, gamma); + p224Reduce(z3); + p224Sub(z3, z3, delta); + p224Reduce(z3); + i$1 = 0; + while (true) { + if (!(i$1 < 8)) { break; } + ((i$1 < 0 || i$1 >= delta.length) ? ($throwRuntimeError("index out of range"), undefined) : delta[i$1] = (((i$1 < 0 || i$1 >= beta.length) ? ($throwRuntimeError("index out of range"), undefined) : beta[i$1]) << 3 >>> 0)); + i$1 = i$1 + (1) >> 0; + } + p224Reduce(delta); + p224Square(x3, alpha, c); + p224Sub(x3, x3, delta); + p224Reduce(x3); + i$2 = 0; + while (true) { + if (!(i$2 < 8)) { break; } + ((i$2 < 0 || i$2 >= beta.length) ? ($throwRuntimeError("index out of range"), undefined) : beta[i$2] = ((y = (2), y < 32 ? (((i$2 < 0 || i$2 >= beta.length) ? ($throwRuntimeError("index out of range"), undefined) : beta[i$2]) << y) : 0) >>> 0)); + i$2 = i$2 + (1) >> 0; + } + p224Sub(beta, beta, x3); + p224Reduce(beta); + p224Square(gamma, gamma, c); + i$3 = 0; + while (true) { + if (!(i$3 < 8)) { break; } + ((i$3 < 0 || i$3 >= gamma.length) ? ($throwRuntimeError("index out of range"), undefined) : gamma[i$3] = ((y$1 = (3), y$1 < 32 ? (((i$3 < 0 || i$3 >= gamma.length) ? ($throwRuntimeError("index out of range"), undefined) : gamma[i$3]) << y$1) : 0) >>> 0)); + i$3 = i$3 + (1) >> 0; + } + p224Reduce(gamma); + p224Mul(y3, alpha, beta, c); + p224Sub(y3, y3, gamma); + p224Reduce(y3); + }; + p224CopyConditional = function(out, in$1, control) { + var control, i, in$1, out, y; + control = (y = (31), y < 32 ? (control << y) : 0) >>> 0; + control = (((((control >> 0)) >> 31 >> 0) >>> 0)); + i = 0; + while (true) { + if (!(i < 8)) { break; } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) ^ (((((((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) ^ (in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i]))) >>> 0)) & control) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + }; + p224ScalarMult = function(outX, outY, outZ, inX, inY, inZ, scalar) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, bit, bitNum, byte$1, i, inX, inY, inZ, outX, outY, outZ, scalar, xx, y, yy, zz; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + xx = $clone(_tmp, p224FieldElement); + yy = $clone(_tmp$1, p224FieldElement); + zz = $clone(_tmp$2, p224FieldElement); + i = 0; + while (true) { + if (!(i < 8)) { break; } + outX.nilCheck, ((i < 0 || i >= outX.length) ? ($throwRuntimeError("index out of range"), undefined) : outX[i] = 0); + outY.nilCheck, ((i < 0 || i >= outY.length) ? ($throwRuntimeError("index out of range"), undefined) : outY[i] = 0); + outZ.nilCheck, ((i < 0 || i >= outZ.length) ? ($throwRuntimeError("index out of range"), undefined) : outZ[i] = 0); + i = i + (1) >> 0; + } + _ref = scalar; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + bitNum = 0; + while (true) { + if (!(bitNum < 8)) { break; } + p224DoubleJacobian(outX, outY, outZ, outX, outY, outZ); + bit = (((((((y = ((7 - bitNum >>> 0)), y < 32 ? (byte$1 >>> y) : 0) << 24 >>> 24)) & 1) >>> 0) >>> 0)); + p224AddJacobian(xx, yy, zz, inX, inY, inZ, outX, outY, outZ); + p224CopyConditional(outX, xx, bit); + p224CopyConditional(outY, yy, bit); + p224CopyConditional(outZ, zz, bit); + bitNum = bitNum + (1) >>> 0; + } + _i++; + } + }; + p224ToAffine = function(x, y, z) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, isPointAtInfinity, outx, outy, tmp, x, y, z, zinv, zinvsq; + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + zinv = $clone(_tmp, p224FieldElement); + zinvsq = $clone(_tmp$1, p224FieldElement); + outx = $clone(_tmp$2, p224FieldElement); + outy = $clone(_tmp$3, p224FieldElement); + tmp = arrayType$1.zero(); + isPointAtInfinity = p224IsZero(z); + if (isPointAtInfinity === 1) { + return [new big.Int.ptr(false, big.nat.nil), new big.Int.ptr(false, big.nat.nil)]; + } + p224Invert(zinv, z); + p224Square(zinvsq, zinv, tmp); + p224Mul(x, x, zinvsq, tmp); + p224Mul(zinvsq, zinvsq, zinv, tmp); + p224Mul(y, y, zinvsq, tmp); + p224Contract(outx, x); + p224Contract(outy, y); + return [p224ToBig(outx), p224ToBig(outy)]; + }; + get28BitsFromEnd = function(buf, shift) { + var b, buf, i, l, ret, shift, x, y, y$1; + ret = 0; + i = 0; + while (true) { + if (!(i < 4)) { break; } + b = 0; + l = buf.$length; + if (l > 0) { + b = (x = l - 1 >> 0, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])); + if (!((i === 3)) || (shift === 4)) { + buf = $subslice(buf, 0, (l - 1 >> 0)); + } + } + ret = (ret | (((y = shift, y < 32 ? (((y$1 = ((8 * i >>> 0)), y$1 < 32 ? (((b >>> 0)) << y$1) : 0) >>> 0) >>> y) : 0) >>> 0))) >>> 0; + i = i + (1) >>> 0; + } + ret = (ret & (268435455)) >>> 0; + return [ret, buf]; + }; + p224FromBig = function(out, in$1) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, bytes, in$1, out; + bytes = in$1.Bytes(); + _tuple = get28BitsFromEnd(bytes, 0); + out.nilCheck, out[0] = _tuple[0]; + bytes = _tuple[1]; + _tuple$1 = get28BitsFromEnd(bytes, 4); + out.nilCheck, out[1] = _tuple$1[0]; + bytes = _tuple$1[1]; + _tuple$2 = get28BitsFromEnd(bytes, 0); + out.nilCheck, out[2] = _tuple$2[0]; + bytes = _tuple$2[1]; + _tuple$3 = get28BitsFromEnd(bytes, 4); + out.nilCheck, out[3] = _tuple$3[0]; + bytes = _tuple$3[1]; + _tuple$4 = get28BitsFromEnd(bytes, 0); + out.nilCheck, out[4] = _tuple$4[0]; + bytes = _tuple$4[1]; + _tuple$5 = get28BitsFromEnd(bytes, 4); + out.nilCheck, out[5] = _tuple$5[0]; + bytes = _tuple$5[1]; + _tuple$6 = get28BitsFromEnd(bytes, 0); + out.nilCheck, out[6] = _tuple$6[0]; + bytes = _tuple$6[1]; + _tuple$7 = get28BitsFromEnd(bytes, 4); + out.nilCheck, out[7] = _tuple$7[0]; + bytes = _tuple$7[1]; + }; + p224ToBig = function(in$1) { + var buf, in$1; + buf = arrayType$2.zero(); + buf[27] = (((in$1.nilCheck, in$1[0]) << 24 >>> 24)); + buf[26] = ((((in$1.nilCheck, in$1[0]) >>> 8 >>> 0) << 24 >>> 24)); + buf[25] = ((((in$1.nilCheck, in$1[0]) >>> 16 >>> 0) << 24 >>> 24)); + buf[24] = ((((((((((in$1.nilCheck, in$1[0]) >>> 24 >>> 0)) & 15) >>> 0)) | (((((in$1.nilCheck, in$1[1]) << 4 >>> 0)) & 240) >>> 0)) >>> 0) << 24 >>> 24)); + buf[23] = ((((in$1.nilCheck, in$1[1]) >>> 4 >>> 0) << 24 >>> 24)); + buf[22] = ((((in$1.nilCheck, in$1[1]) >>> 12 >>> 0) << 24 >>> 24)); + buf[21] = ((((in$1.nilCheck, in$1[1]) >>> 20 >>> 0) << 24 >>> 24)); + buf[20] = (((in$1.nilCheck, in$1[2]) << 24 >>> 24)); + buf[19] = ((((in$1.nilCheck, in$1[2]) >>> 8 >>> 0) << 24 >>> 24)); + buf[18] = ((((in$1.nilCheck, in$1[2]) >>> 16 >>> 0) << 24 >>> 24)); + buf[17] = ((((((((((in$1.nilCheck, in$1[2]) >>> 24 >>> 0)) & 15) >>> 0)) | (((((in$1.nilCheck, in$1[3]) << 4 >>> 0)) & 240) >>> 0)) >>> 0) << 24 >>> 24)); + buf[16] = ((((in$1.nilCheck, in$1[3]) >>> 4 >>> 0) << 24 >>> 24)); + buf[15] = ((((in$1.nilCheck, in$1[3]) >>> 12 >>> 0) << 24 >>> 24)); + buf[14] = ((((in$1.nilCheck, in$1[3]) >>> 20 >>> 0) << 24 >>> 24)); + buf[13] = (((in$1.nilCheck, in$1[4]) << 24 >>> 24)); + buf[12] = ((((in$1.nilCheck, in$1[4]) >>> 8 >>> 0) << 24 >>> 24)); + buf[11] = ((((in$1.nilCheck, in$1[4]) >>> 16 >>> 0) << 24 >>> 24)); + buf[10] = ((((((((((in$1.nilCheck, in$1[4]) >>> 24 >>> 0)) & 15) >>> 0)) | (((((in$1.nilCheck, in$1[5]) << 4 >>> 0)) & 240) >>> 0)) >>> 0) << 24 >>> 24)); + buf[9] = ((((in$1.nilCheck, in$1[5]) >>> 4 >>> 0) << 24 >>> 24)); + buf[8] = ((((in$1.nilCheck, in$1[5]) >>> 12 >>> 0) << 24 >>> 24)); + buf[7] = ((((in$1.nilCheck, in$1[5]) >>> 20 >>> 0) << 24 >>> 24)); + buf[6] = (((in$1.nilCheck, in$1[6]) << 24 >>> 24)); + buf[5] = ((((in$1.nilCheck, in$1[6]) >>> 8 >>> 0) << 24 >>> 24)); + buf[4] = ((((in$1.nilCheck, in$1[6]) >>> 16 >>> 0) << 24 >>> 24)); + buf[3] = ((((((((((in$1.nilCheck, in$1[6]) >>> 24 >>> 0)) & 15) >>> 0)) | (((((in$1.nilCheck, in$1[7]) << 4 >>> 0)) & 240) >>> 0)) >>> 0) << 24 >>> 24)); + buf[2] = ((((in$1.nilCheck, in$1[7]) >>> 4 >>> 0) << 24 >>> 24)); + buf[1] = ((((in$1.nilCheck, in$1[7]) >>> 12 >>> 0) << 24 >>> 24)); + buf[0] = ((((in$1.nilCheck, in$1[7]) >>> 20 >>> 0) << 24 >>> 24)); + return new big.Int.ptr(false, big.nat.nil).SetBytes(new sliceType(buf)); + }; + initP256 = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p256Params = new CurveParams.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, "P-256"); + _r = new big.Int.ptr(false, big.nat.nil).SetString("115792089210356248762697446949407573530086143415290314195533631308867097853951", 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p256Params.P = _tuple[0]; + _r$1 = new big.Int.ptr(false, big.nat.nil).SetString("115792089210356248762697446949407573529996955224135760342422259061068512044369", 10); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + p256Params.N = _tuple$1[0]; + _r$2 = new big.Int.ptr(false, big.nat.nil).SetString("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + p256Params.B = _tuple$2[0]; + _r$3 = new big.Int.ptr(false, big.nat.nil).SetString("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + p256Params.Gx = _tuple$3[0]; + _r$4 = new big.Int.ptr(false, big.nat.nil).SetString("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$4 = _r$4; + p256Params.Gy = _tuple$4[0]; + p256Params.BitSize = 256; + _r$5 = new big.Int.ptr(false, big.nat.nil).SetString("7fffffff00000001fffffffe8000000100000000ffffffff0000000180000000", 16); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$5 = _r$5; + p256RInverse = _tuple$5[0]; + initP256Arch(); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initP256 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.$s = $s; $f.$r = $r; return $f; + }; + p256Curve.ptr.prototype.Params = function() { + var curve; + curve = this; + return curve.CurveParams; + }; + p256Curve.prototype.Params = function() { return this.$val.Params(); }; + p256GetScalar = function(out, in$1) { + var _i, _r, _ref, i, in$1, n, out, scalarBytes, v, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; i = $f.i; in$1 = $f.in$1; n = $f.n; out = $f.out; scalarBytes = $f.scalarBytes; v = $f.v; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new big.Int.ptr(false, big.nat.nil).SetBytes(in$1); + scalarBytes = sliceType.nil; + /* */ if (n.Cmp(p256Params.N) >= 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (n.Cmp(p256Params.N) >= 0) { */ case 1: + _r = n.Mod(n, p256Params.N); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + scalarBytes = n.Bytes(); + $s = 3; continue; + /* } else { */ case 2: + scalarBytes = in$1; + /* } */ case 3: + _ref = scalarBytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + (x = scalarBytes.$length - ((1 + i >> 0)) >> 0, out.nilCheck, ((x < 0 || x >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[x] = v)); + _i++; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256GetScalar }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.i = i; $f.in$1 = in$1; $f.n = n; $f.out = out; $f.scalarBytes = scalarBytes; $f.v = v; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + p256Curve.ptr.prototype.ScalarBaseMult = function(scalar) { + var _r, _tmp, _tmp$1, _tmp$2, _tuple, scalar, scalarReversed, x, x1, y, y1, z1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; scalar = $f.scalar; scalarReversed = $f.scalarReversed; x = $f.x; x1 = $f.x1; y = $f.y; y1 = $f.y1; z1 = $f.z1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + scalarReversed = [scalarReversed]; + x1 = [x1]; + y1 = [y1]; + z1 = [z1]; + x = ptrType$1.nil; + y = ptrType$1.nil; + scalarReversed[0] = arrayType$3.zero(); + $r = p256GetScalar(scalarReversed[0], scalar); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + x1[0] = $clone(_tmp, arrayType$4); + y1[0] = $clone(_tmp$1, arrayType$4); + z1[0] = $clone(_tmp$2, arrayType$4); + p256ScalarBaseMult(x1[0], y1[0], z1[0], scalarReversed[0]); + _r = p256ToAffine(x1[0], y1[0], z1[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + x = _tuple[0]; + y = _tuple[1]; + $s = -1; return [x, y]; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256Curve.ptr.prototype.ScalarBaseMult }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.scalar = scalar; $f.scalarReversed = scalarReversed; $f.x = x; $f.x1 = x1; $f.y = y; $f.y1 = y1; $f.z1 = z1; $f.$s = $s; $f.$r = $r; return $f; + }; + p256Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; + p256Curve.ptr.prototype.ScalarMult = function(bigX, bigY, scalar) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, bigX, bigY, px, py, scalar, scalarReversed, x, x1, y, y1, z1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tuple = $f._tuple; bigX = $f.bigX; bigY = $f.bigY; px = $f.px; py = $f.py; scalar = $f.scalar; scalarReversed = $f.scalarReversed; x = $f.x; x1 = $f.x1; y = $f.y; y1 = $f.y1; z1 = $f.z1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + px = [px]; + py = [py]; + scalarReversed = [scalarReversed]; + x1 = [x1]; + y1 = [y1]; + z1 = [z1]; + x = ptrType$1.nil; + y = ptrType$1.nil; + scalarReversed[0] = arrayType$3.zero(); + $r = p256GetScalar(scalarReversed[0], scalar); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + px[0] = $clone(_tmp, arrayType$4); + py[0] = $clone(_tmp$1, arrayType$4); + x1[0] = $clone(_tmp$2, arrayType$4); + y1[0] = $clone(_tmp$3, arrayType$4); + z1[0] = $clone(_tmp$4, arrayType$4); + $r = p256FromBig(px[0], bigX); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = p256FromBig(py[0], bigY); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p256ScalarMult(x1[0], y1[0], z1[0], px[0], py[0], scalarReversed[0]); + _r = p256ToAffine(x1[0], y1[0], z1[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + x = _tuple[0]; + y = _tuple[1]; + $s = -1; return [x, y]; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256Curve.ptr.prototype.ScalarMult }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tuple = _tuple; $f.bigX = bigX; $f.bigY = bigY; $f.px = px; $f.py = py; $f.scalar = scalar; $f.scalarReversed = scalarReversed; $f.x = x; $f.x1 = x1; $f.y = y; $f.y1 = y1; $f.z1 = z1; $f.$s = $s; $f.$r = $r; return $f; + }; + p256Curve.prototype.ScalarMult = function(bigX, bigY, scalar) { return this.$val.ScalarMult(bigX, bigY, scalar); }; + nonZeroToAllOnes = function(x) { + var x; + return ((((x - 1 >>> 0)) >>> 31 >>> 0)) - 1 >>> 0; + }; + p256ReduceCarry = function(inout, carry) { + var carry, carry_mask, inout; + carry_mask = nonZeroToAllOnes(carry); + inout.nilCheck, inout[0] = ((inout.nilCheck, inout[0]) + ((carry << 1 >>> 0)) >>> 0); + inout.nilCheck, inout[3] = ((inout.nilCheck, inout[3]) + (((268435456 & carry_mask) >>> 0)) >>> 0); + inout.nilCheck, inout[3] = ((inout.nilCheck, inout[3]) - ((carry << 11 >>> 0)) >>> 0); + inout.nilCheck, inout[4] = ((inout.nilCheck, inout[4]) + (((536870911 & carry_mask) >>> 0)) >>> 0); + inout.nilCheck, inout[5] = ((inout.nilCheck, inout[5]) + (((268435455 & carry_mask) >>> 0)) >>> 0); + inout.nilCheck, inout[6] = ((inout.nilCheck, inout[6]) + (((536870911 & carry_mask) >>> 0)) >>> 0); + inout.nilCheck, inout[6] = ((inout.nilCheck, inout[6]) - ((carry << 22 >>> 0)) >>> 0); + inout.nilCheck, inout[7] = ((inout.nilCheck, inout[7]) - (((1 & carry_mask) >>> 0)) >>> 0); + inout.nilCheck, inout[7] = ((inout.nilCheck, inout[7]) + ((carry << 25 >>> 0)) >>> 0); + }; + p256Sum = function(out, in$1, in2) { + var carry, i, in$1, in2, out; + carry = 0; + i = 0; + while (true) { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])) + (in2.nilCheck, ((i < 0 || i >= in2.length) ? ($throwRuntimeError("index out of range"), undefined) : in2[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 29 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 9) { + break; + } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])) + (in2.nilCheck, ((i < 0 || i >= in2.length) ? ($throwRuntimeError("index out of range"), undefined) : in2[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + p256ReduceCarry(out, carry); + }; + p256Diff = function(out, in$1, in2) { + var carry, i, in$1, in2, out; + carry = 0; + i = 0; + while (true) { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])) - (in2.nilCheck, ((i < 0 || i >= in2.length) ? ($throwRuntimeError("index out of range"), undefined) : in2[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (((i < 0 || i >= p256Zero31.length) ? ($throwRuntimeError("index out of range"), undefined) : p256Zero31[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 29 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 9) { + break; + } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])) - (in2.nilCheck, ((i < 0 || i >= in2.length) ? ($throwRuntimeError("index out of range"), undefined) : in2[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (((i < 0 || i >= p256Zero31.length) ? ($throwRuntimeError("index out of range"), undefined) : p256Zero31[i])) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + p256ReduceCarry(out, carry); + }; + p256ReduceDegree = function(out, tmp) { + var _index, _index$1, _index$10, _index$11, _index$12, _index$13, _index$14, _index$15, _index$16, _index$17, _index$18, _index$19, _index$2, _index$20, _index$21, _index$22, _index$23, _index$24, _index$3, _index$4, _index$5, _index$6, _index$7, _index$8, _index$9, _tmp, _tmp$1, _tmp$2, carry, i, i$1, i$2, out, tmp, tmp2, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xMask; + tmp2 = arrayType$5.zero(); + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + carry = _tmp; + x = _tmp$1; + xMask = _tmp$2; + tmp2[0] = ((((tmp[0].$low >>> 0)) & 536870911) >>> 0); + tmp2[1] = (((tmp[0].$low >>> 0)) >>> 29 >>> 0); + tmp2[1] = ((tmp2[1] | ((((((($shiftRightUint64(tmp[0], 32).$low >>> 0)) << 3 >>> 0)) & 268435455) >>> 0))) >>> 0); + tmp2[1] = (tmp2[1] + (((((tmp[1].$low >>> 0)) & 268435455) >>> 0)) >>> 0); + carry = tmp2[1] >>> 28 >>> 0; + tmp2[1] = ((tmp2[1] & (268435455)) >>> 0); + i = 2; + while (true) { + if (!(i < 17)) { break; } + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((($shiftRightUint64((x$1 = i - 2 >> 0, ((x$1 < 0 || x$1 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$1])), 32).$low >>> 0))) >>> 25 >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + ((((((x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$2])).$low >>> 0))) >>> 28 >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + ((((((($shiftRightUint64((x$3 = i - 1 >> 0, ((x$3 < 0 || x$3 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$3])), 32).$low >>> 0)) << 4 >>> 0)) & 536870911) >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i]).$low >>> 0)) & 536870911) >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (carry) >>> 0)); + carry = ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) >>> 29 >>> 0; + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 17) { + break; + } + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((($shiftRightUint64((x$4 = i - 2 >> 0, ((x$4 < 0 || x$4 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$4])), 32).$low >>> 0)) >>> 25 >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$5])).$low >>> 0)) >>> 29 >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((($shiftRightUint64((x$6 = i - 1 >> 0, ((x$6 < 0 || x$6 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$6])), 32).$low >>> 0))) << 3 >>> 0)) & 268435455) >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i]).$low >>> 0)) & 268435455) >>> 0)) >>> 0)); + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (carry) >>> 0)); + carry = ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) >>> 28 >>> 0; + ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + tmp2[17] = ((($shiftRightUint64(tmp[15], 32).$low >>> 0)) >>> 25 >>> 0); + tmp2[17] = (tmp2[17] + ((((tmp[16].$low >>> 0)) >>> 29 >>> 0)) >>> 0); + tmp2[17] = (tmp2[17] + (((($shiftRightUint64(tmp[16], 32).$low >>> 0)) << 3 >>> 0)) >>> 0); + tmp2[17] = (tmp2[17] + (carry) >>> 0); + i$1 = 0; + while (true) { + _index = i$1 + 1 >> 0; + ((_index < 0 || _index >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index] = (((_index < 0 || _index >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index]) + ((((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1]) >>> 29 >>> 0)) >>> 0)); + x = (((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1]) & 536870911) >>> 0; + xMask = nonZeroToAllOnes(x); + ((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1] = 0); + _index$1 = i$1 + 3 >> 0; + ((_index$1 < 0 || _index$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$1] = (((_index$1 < 0 || _index$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$1]) + (((((x << 10 >>> 0)) & 268435455) >>> 0)) >>> 0)); + _index$2 = i$1 + 4 >> 0; + ((_index$2 < 0 || _index$2 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$2] = (((_index$2 < 0 || _index$2 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$2]) + (((x >>> 18 >>> 0))) >>> 0)); + _index$3 = i$1 + 6 >> 0; + ((_index$3 < 0 || _index$3 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$3] = (((_index$3 < 0 || _index$3 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$3]) + (((((x << 21 >>> 0)) & 536870911) >>> 0)) >>> 0)); + _index$4 = i$1 + 7 >> 0; + ((_index$4 < 0 || _index$4 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$4] = (((_index$4 < 0 || _index$4 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$4]) + ((x >>> 8 >>> 0)) >>> 0)); + _index$5 = i$1 + 7 >> 0; + ((_index$5 < 0 || _index$5 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$5] = (((_index$5 < 0 || _index$5 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$5]) + (((268435456 & xMask) >>> 0)) >>> 0)); + _index$6 = i$1 + 8 >> 0; + ((_index$6 < 0 || _index$6 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$6] = (((_index$6 < 0 || _index$6 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$6]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); + _index$7 = i$1 + 7 >> 0; + ((_index$7 < 0 || _index$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$7] = (((_index$7 < 0 || _index$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$7]) - (((((x << 24 >>> 0)) & 268435455) >>> 0)) >>> 0)); + _index$8 = i$1 + 8 >> 0; + ((_index$8 < 0 || _index$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$8] = (((_index$8 < 0 || _index$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$8]) - ((x >>> 4 >>> 0)) >>> 0)); + _index$9 = i$1 + 8 >> 0; + ((_index$9 < 0 || _index$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$9] = (((_index$9 < 0 || _index$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$9]) + (((536870912 & xMask) >>> 0)) >>> 0)); + _index$10 = i$1 + 8 >> 0; + ((_index$10 < 0 || _index$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$10] = (((_index$10 < 0 || _index$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$10]) - (x) >>> 0)); + _index$11 = i$1 + 8 >> 0; + ((_index$11 < 0 || _index$11 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$11] = (((_index$11 < 0 || _index$11 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$11]) + (((((x << 28 >>> 0)) & 536870911) >>> 0)) >>> 0)); + _index$12 = i$1 + 9 >> 0; + ((_index$12 < 0 || _index$12 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$12] = (((_index$12 < 0 || _index$12 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$12]) + (((((((x >>> 1 >>> 0)) - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); + if ((i$1 + 1 >> 0) === 9) { + break; + } + _index$13 = i$1 + 2 >> 0; + ((_index$13 < 0 || _index$13 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$13] = (((_index$13 < 0 || _index$13 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$13]) + (((x$7 = i$1 + 1 >> 0, ((x$7 < 0 || x$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$7])) >>> 28 >>> 0)) >>> 0)); + x = ((x$8 = i$1 + 1 >> 0, ((x$8 < 0 || x$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$8])) & 268435455) >>> 0; + xMask = nonZeroToAllOnes(x); + (x$9 = i$1 + 1 >> 0, ((x$9 < 0 || x$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$9] = 0)); + _index$14 = i$1 + 4 >> 0; + ((_index$14 < 0 || _index$14 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$14] = (((_index$14 < 0 || _index$14 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$14]) + (((((x << 11 >>> 0)) & 536870911) >>> 0)) >>> 0)); + _index$15 = i$1 + 5 >> 0; + ((_index$15 < 0 || _index$15 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$15] = (((_index$15 < 0 || _index$15 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$15]) + (((x >>> 18 >>> 0))) >>> 0)); + _index$16 = i$1 + 7 >> 0; + ((_index$16 < 0 || _index$16 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$16] = (((_index$16 < 0 || _index$16 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$16]) + (((((x << 21 >>> 0)) & 268435455) >>> 0)) >>> 0)); + _index$17 = i$1 + 8 >> 0; + ((_index$17 < 0 || _index$17 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$17] = (((_index$17 < 0 || _index$17 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$17]) + ((x >>> 7 >>> 0)) >>> 0)); + _index$18 = i$1 + 8 >> 0; + ((_index$18 < 0 || _index$18 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$18] = (((_index$18 < 0 || _index$18 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$18]) + (((536870912 & xMask) >>> 0)) >>> 0)); + _index$19 = i$1 + 9 >> 0; + ((_index$19 < 0 || _index$19 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$19] = (((_index$19 < 0 || _index$19 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$19]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); + _index$20 = i$1 + 8 >> 0; + ((_index$20 < 0 || _index$20 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$20] = (((_index$20 < 0 || _index$20 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$20]) - (((((x << 25 >>> 0)) & 536870911) >>> 0)) >>> 0)); + _index$21 = i$1 + 9 >> 0; + ((_index$21 < 0 || _index$21 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$21] = (((_index$21 < 0 || _index$21 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$21]) - ((x >>> 4 >>> 0)) >>> 0)); + _index$22 = i$1 + 9 >> 0; + ((_index$22 < 0 || _index$22 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$22] = (((_index$22 < 0 || _index$22 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$22]) + (((268435456 & xMask) >>> 0)) >>> 0)); + _index$23 = i$1 + 9 >> 0; + ((_index$23 < 0 || _index$23 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$23] = (((_index$23 < 0 || _index$23 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$23]) - (x) >>> 0)); + _index$24 = i$1 + 10 >> 0; + ((_index$24 < 0 || _index$24 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$24] = (((_index$24 < 0 || _index$24 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$24]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); + i$1 = i$1 + (2) >> 0; + } + carry = 0; + i$2 = 0; + while (true) { + if (!(i$2 < 8)) { break; } + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (x$10 = i$2 + 9 >> 0, ((x$10 < 0 || x$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$10]))); + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = ((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) + (carry) >>> 0)); + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = ((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) + ((((((x$11 = i$2 + 10 >> 0, ((x$11 < 0 || x$11 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$11])) << 28 >>> 0)) & 536870911) >>> 0)) >>> 0)); + carry = (out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) >>> 29 >>> 0; + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) & (536870911)) >>> 0)); + i$2 = i$2 + (1) >> 0; + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = ((x$12 = i$2 + 9 >> 0, ((x$12 < 0 || x$12 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$12])) >>> 1 >>> 0)); + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = ((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) >>> 28 >>> 0; + out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (((out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2])) & (268435455)) >>> 0)); + i$2 = i$2 + (1) >> 0; + } + out.nilCheck, out[8] = tmp2[17]; + out.nilCheck, out[8] = ((out.nilCheck, out[8]) + (carry) >>> 0); + carry = (out.nilCheck, out[8]) >>> 29 >>> 0; + out.nilCheck, out[8] = (((out.nilCheck, out[8]) & (536870911)) >>> 0); + p256ReduceCarry(out, carry); + }; + p256Square = function(out, in$1) { + var in$1, out, tmp, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$6, x$7, x$8, x$9; + tmp = arrayType$6.zero(); + tmp[0] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), (new $Uint64(0, (in$1.nilCheck, in$1[0])))); + tmp[1] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), 1))); + tmp[2] = (x = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), 1))), x$1 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), 1))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + tmp[3] = (x$2 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), 1))), x$3 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), 1))), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); + tmp[4] = (x$4 = (x$5 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), 1))), x$6 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), 2))), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), x$7 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), (new $Uint64(0, (in$1.nilCheck, in$1[2])))), new $Uint64(x$4.$high + x$7.$high, x$4.$low + x$7.$low)); + tmp[5] = (x$8 = (x$9 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 1))), x$10 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), 1))), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), 1))), new $Uint64(x$8.$high + x$11.$high, x$8.$low + x$11.$low)); + tmp[6] = (x$12 = (x$13 = (x$14 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), x$15 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 2))), new $Uint64(x$14.$high + x$15.$high, x$14.$low + x$15.$low)), x$16 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), 1))), new $Uint64(x$13.$high + x$16.$high, x$13.$low + x$16.$low)), x$17 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), 1))), new $Uint64(x$12.$high + x$17.$high, x$12.$low + x$17.$low)); + tmp[7] = (x$18 = (x$19 = (x$20 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 1))), x$21 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), new $Uint64(x$20.$high + x$21.$high, x$20.$low + x$21.$low)), x$22 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 1))), new $Uint64(x$19.$high + x$22.$high, x$19.$low + x$22.$low)), x$23 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), 1))), new $Uint64(x$18.$high + x$23.$high, x$18.$low + x$23.$low)); + tmp[8] = (x$24 = (x$25 = (x$26 = (x$27 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$28 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 2))), new $Uint64(x$27.$high + x$28.$high, x$27.$low + x$28.$low)), x$29 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), new $Uint64(x$26.$high + x$29.$high, x$26.$low + x$29.$low)), x$30 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 2))), new $Uint64(x$25.$high + x$30.$high, x$25.$low + x$30.$low)), x$31 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), (new $Uint64(0, (in$1.nilCheck, in$1[4])))), new $Uint64(x$24.$high + x$31.$high, x$24.$low + x$31.$low)); + tmp[9] = (x$32 = (x$33 = (x$34 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$35 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 1))), new $Uint64(x$34.$high + x$35.$high, x$34.$low + x$35.$low)), x$36 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), new $Uint64(x$33.$high + x$36.$high, x$33.$low + x$36.$low)), x$37 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 1))), new $Uint64(x$32.$high + x$37.$high, x$32.$low + x$37.$low)); + tmp[10] = (x$38 = (x$39 = (x$40 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$41 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 2))), new $Uint64(x$40.$high + x$41.$high, x$40.$low + x$41.$low)), x$42 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), new $Uint64(x$39.$high + x$42.$high, x$39.$low + x$42.$low)), x$43 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), 1))), new $Uint64(x$38.$high + x$43.$high, x$38.$low + x$43.$low)); + tmp[11] = (x$44 = (x$45 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$46 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 1))), new $Uint64(x$45.$high + x$46.$high, x$45.$low + x$46.$low)), x$47 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), 1))), new $Uint64(x$44.$high + x$47.$high, x$44.$low + x$47.$low)); + tmp[12] = (x$48 = (x$49 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$50 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 2))), new $Uint64(x$49.$high + x$50.$high, x$49.$low + x$50.$low)), x$51 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), (new $Uint64(0, (in$1.nilCheck, in$1[6])))), new $Uint64(x$48.$high + x$51.$high, x$48.$low + x$51.$low)); + tmp[13] = (x$52 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$53 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 1))), new $Uint64(x$52.$high + x$53.$high, x$52.$low + x$53.$low)); + tmp[14] = (x$54 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))), x$55 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), 1))), new $Uint64(x$54.$high + x$55.$high, x$54.$low + x$55.$low)); + tmp[15] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), 1))); + tmp[16] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), (new $Uint64(0, (in$1.nilCheck, in$1[8])))); + p256ReduceDegree(out, $clone(tmp, arrayType$6)); + }; + p256Mul = function(out, in$1, in2) { + var in$1, in2, out, tmp, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; + tmp = arrayType$6.zero(); + tmp[0] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), (new $Uint64(0, (in2.nilCheck, in2[0])))); + tmp[1] = (x = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 0))), x$1 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + tmp[2] = (x$2 = (x$3 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), x$4 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 1))), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), x$5 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$2.$high + x$5.$high, x$2.$low + x$5.$low)); + tmp[3] = (x$6 = (x$7 = (x$8 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 0))), x$9 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)), x$10 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 0))), new $Uint64(x$7.$high + x$10.$high, x$7.$low + x$10.$low)), x$11 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$6.$high + x$11.$high, x$6.$low + x$11.$low)); + tmp[4] = (x$12 = (x$13 = (x$14 = (x$15 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), x$16 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 1))), new $Uint64(x$15.$high + x$16.$high, x$15.$low + x$16.$low)), x$17 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$14.$high + x$17.$high, x$14.$low + x$17.$low)), x$18 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 1))), new $Uint64(x$13.$high + x$18.$high, x$13.$low + x$18.$low)), x$19 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$12.$high + x$19.$high, x$12.$low + x$19.$low)); + tmp[5] = (x$20 = (x$21 = (x$22 = (x$23 = (x$24 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 0))), x$25 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$24.$high + x$25.$high, x$24.$low + x$25.$low)), x$26 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 0))), new $Uint64(x$23.$high + x$26.$high, x$23.$low + x$26.$low)), x$27 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$22.$high + x$27.$high, x$22.$low + x$27.$low)), x$28 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 0))), new $Uint64(x$21.$high + x$28.$high, x$21.$low + x$28.$low)), x$29 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$20.$high + x$29.$high, x$20.$low + x$29.$low)); + tmp[6] = (x$30 = (x$31 = (x$32 = (x$33 = (x$34 = (x$35 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), x$36 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 1))), new $Uint64(x$35.$high + x$36.$high, x$35.$low + x$36.$low)), x$37 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$34.$high + x$37.$high, x$34.$low + x$37.$low)), x$38 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 1))), new $Uint64(x$33.$high + x$38.$high, x$33.$low + x$38.$low)), x$39 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$32.$high + x$39.$high, x$32.$low + x$39.$low)), x$40 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 1))), new $Uint64(x$31.$high + x$40.$high, x$31.$low + x$40.$low)), x$41 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$30.$high + x$41.$high, x$30.$low + x$41.$low)); + tmp[7] = (x$42 = (x$43 = (x$44 = (x$45 = (x$46 = (x$47 = (x$48 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 0))), x$49 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$48.$high + x$49.$high, x$48.$low + x$49.$low)), x$50 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 0))), new $Uint64(x$47.$high + x$50.$high, x$47.$low + x$50.$low)), x$51 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$46.$high + x$51.$high, x$46.$low + x$51.$low)), x$52 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 0))), new $Uint64(x$45.$high + x$52.$high, x$45.$low + x$52.$low)), x$53 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$44.$high + x$53.$high, x$44.$low + x$53.$low)), x$54 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 0))), new $Uint64(x$43.$high + x$54.$high, x$43.$low + x$54.$low)), x$55 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$42.$high + x$55.$high, x$42.$low + x$55.$low)); + tmp[8] = (x$56 = (x$57 = (x$58 = (x$59 = (x$60 = (x$61 = (x$62 = (x$63 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[0]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$64 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 1))), new $Uint64(x$63.$high + x$64.$high, x$63.$low + x$64.$low)), x$65 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$62.$high + x$65.$high, x$62.$low + x$65.$low)), x$66 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 1))), new $Uint64(x$61.$high + x$66.$high, x$61.$low + x$66.$low)), x$67 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$60.$high + x$67.$high, x$60.$low + x$67.$low)), x$68 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 1))), new $Uint64(x$59.$high + x$68.$high, x$59.$low + x$68.$low)), x$69 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$58.$high + x$69.$high, x$58.$low + x$69.$low)), x$70 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 1))), new $Uint64(x$57.$high + x$70.$high, x$57.$low + x$70.$low)), x$71 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[0]))), 0))), new $Uint64(x$56.$high + x$71.$high, x$56.$low + x$71.$low)); + tmp[9] = (x$72 = (x$73 = (x$74 = (x$75 = (x$76 = (x$77 = (x$78 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[1]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$79 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 0))), new $Uint64(x$78.$high + x$79.$high, x$78.$low + x$79.$low)), x$80 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$77.$high + x$80.$high, x$77.$low + x$80.$low)), x$81 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 0))), new $Uint64(x$76.$high + x$81.$high, x$76.$low + x$81.$low)), x$82 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$75.$high + x$82.$high, x$75.$low + x$82.$low)), x$83 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 0))), new $Uint64(x$74.$high + x$83.$high, x$74.$low + x$83.$low)), x$84 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$73.$high + x$84.$high, x$73.$low + x$84.$low)), x$85 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[1]))), 0))), new $Uint64(x$72.$high + x$85.$high, x$72.$low + x$85.$low)); + tmp[10] = (x$86 = (x$87 = (x$88 = (x$89 = (x$90 = (x$91 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[2]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$92 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 1))), new $Uint64(x$91.$high + x$92.$high, x$91.$low + x$92.$low)), x$93 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$90.$high + x$93.$high, x$90.$low + x$93.$low)), x$94 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 1))), new $Uint64(x$89.$high + x$94.$high, x$89.$low + x$94.$low)), x$95 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$88.$high + x$95.$high, x$88.$low + x$95.$low)), x$96 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 1))), new $Uint64(x$87.$high + x$96.$high, x$87.$low + x$96.$low)), x$97 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[2]))), 0))), new $Uint64(x$86.$high + x$97.$high, x$86.$low + x$97.$low)); + tmp[11] = (x$98 = (x$99 = (x$100 = (x$101 = (x$102 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[3]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$103 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 0))), new $Uint64(x$102.$high + x$103.$high, x$102.$low + x$103.$low)), x$104 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$101.$high + x$104.$high, x$101.$low + x$104.$low)), x$105 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 0))), new $Uint64(x$100.$high + x$105.$high, x$100.$low + x$105.$low)), x$106 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$99.$high + x$106.$high, x$99.$low + x$106.$low)), x$107 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[3]))), 0))), new $Uint64(x$98.$high + x$107.$high, x$98.$low + x$107.$low)); + tmp[12] = (x$108 = (x$109 = (x$110 = (x$111 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[4]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$112 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 1))), new $Uint64(x$111.$high + x$112.$high, x$111.$low + x$112.$low)), x$113 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$110.$high + x$113.$high, x$110.$low + x$113.$low)), x$114 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 1))), new $Uint64(x$109.$high + x$114.$high, x$109.$low + x$114.$low)), x$115 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[4]))), 0))), new $Uint64(x$108.$high + x$115.$high, x$108.$low + x$115.$low)); + tmp[13] = (x$116 = (x$117 = (x$118 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[5]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$119 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 0))), new $Uint64(x$118.$high + x$119.$high, x$118.$low + x$119.$low)), x$120 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$117.$high + x$120.$high, x$117.$low + x$120.$low)), x$121 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[5]))), 0))), new $Uint64(x$116.$high + x$121.$high, x$116.$low + x$121.$low)); + tmp[14] = (x$122 = (x$123 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[6]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$124 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 1))), new $Uint64(x$123.$high + x$124.$high, x$123.$low + x$124.$low)), x$125 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[6]))), 0))), new $Uint64(x$122.$high + x$125.$high, x$122.$low + x$125.$low)); + tmp[15] = (x$126 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[7]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))), x$127 = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[7]))), 0))), new $Uint64(x$126.$high + x$127.$high, x$126.$low + x$127.$low)); + tmp[16] = $mul64((new $Uint64(0, (in$1.nilCheck, in$1[8]))), ($shiftLeft64((new $Uint64(0, (in2.nilCheck, in2[8]))), 0))); + p256ReduceDegree(out, $clone(tmp, arrayType$6)); + }; + p256Assign = function(out, in$1) { + var in$1, out; + arrayType$4.copy(out, in$1); + }; + p256Invert = function(out, in$1) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, e16, e2, e32, e4, e64, e8, ftmp, ftmp2, i, i$1, i$2, i$3, i$4, i$5, i$6, in$1, out; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + ftmp = $clone(_tmp, arrayType$4); + ftmp2 = $clone(_tmp$1, arrayType$4); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + _tmp$6 = arrayType$4.zero(); + _tmp$7 = arrayType$4.zero(); + e2 = $clone(_tmp$2, arrayType$4); + e4 = $clone(_tmp$3, arrayType$4); + e8 = $clone(_tmp$4, arrayType$4); + e16 = $clone(_tmp$5, arrayType$4); + e32 = $clone(_tmp$6, arrayType$4); + e64 = $clone(_tmp$7, arrayType$4); + p256Square(ftmp, in$1); + p256Mul(ftmp, in$1, ftmp); + p256Assign(e2, ftmp); + p256Square(ftmp, ftmp); + p256Square(ftmp, ftmp); + p256Mul(ftmp, ftmp, e2); + p256Assign(e4, ftmp); + p256Square(ftmp, ftmp); + p256Square(ftmp, ftmp); + p256Square(ftmp, ftmp); + p256Square(ftmp, ftmp); + p256Mul(ftmp, ftmp, e4); + p256Assign(e8, ftmp); + i = 0; + while (true) { + if (!(i < 8)) { break; } + p256Square(ftmp, ftmp); + i = i + (1) >> 0; + } + p256Mul(ftmp, ftmp, e8); + p256Assign(e16, ftmp); + i$1 = 0; + while (true) { + if (!(i$1 < 16)) { break; } + p256Square(ftmp, ftmp); + i$1 = i$1 + (1) >> 0; + } + p256Mul(ftmp, ftmp, e16); + p256Assign(e32, ftmp); + i$2 = 0; + while (true) { + if (!(i$2 < 32)) { break; } + p256Square(ftmp, ftmp); + i$2 = i$2 + (1) >> 0; + } + p256Assign(e64, ftmp); + p256Mul(ftmp, ftmp, in$1); + i$3 = 0; + while (true) { + if (!(i$3 < 192)) { break; } + p256Square(ftmp, ftmp); + i$3 = i$3 + (1) >> 0; + } + p256Mul(ftmp2, e64, e32); + i$4 = 0; + while (true) { + if (!(i$4 < 16)) { break; } + p256Square(ftmp2, ftmp2); + i$4 = i$4 + (1) >> 0; + } + p256Mul(ftmp2, ftmp2, e16); + i$5 = 0; + while (true) { + if (!(i$5 < 8)) { break; } + p256Square(ftmp2, ftmp2); + i$5 = i$5 + (1) >> 0; + } + p256Mul(ftmp2, ftmp2, e8); + i$6 = 0; + while (true) { + if (!(i$6 < 4)) { break; } + p256Square(ftmp2, ftmp2); + i$6 = i$6 + (1) >> 0; + } + p256Mul(ftmp2, ftmp2, e4); + p256Square(ftmp2, ftmp2); + p256Square(ftmp2, ftmp2); + p256Mul(ftmp2, ftmp2, e2); + p256Square(ftmp2, ftmp2); + p256Square(ftmp2, ftmp2); + p256Mul(ftmp2, ftmp2, in$1); + p256Mul(out, ftmp2, ftmp); + }; + p256Scalar3 = function(out) { + var carry, i, out; + carry = 0; + i = 0; + while (true) { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ($imul((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])), (3)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 29 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 9) { + break; + } + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ($imul((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])), (3)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + p256ReduceCarry(out, carry); + }; + p256Scalar4 = function(out) { + var _tmp, _tmp$1, carry, i, nextCarry, out, y, y$1; + _tmp = 0; + _tmp$1 = 0; + carry = _tmp; + nextCarry = _tmp$1; + i = 0; + while (true) { + nextCarry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 27 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((y = (2), y < 32 ? ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) << y) : 0) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = nextCarry + (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 29 >>> 0)) >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 9) { + break; + } + nextCarry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 26 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((y$1 = (2), y$1 < 32 ? ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) << y$1) : 0) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = nextCarry + (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0)) >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + p256ReduceCarry(out, carry); + }; + p256Scalar8 = function(out) { + var _tmp, _tmp$1, carry, i, nextCarry, out, y, y$1; + _tmp = 0; + _tmp$1 = 0; + carry = _tmp; + nextCarry = _tmp$1; + i = 0; + while (true) { + nextCarry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 26 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((y = (3), y < 32 ? ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) << y) : 0) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = nextCarry + (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 29 >>> 0)) >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (536870911)) >>> 0)); + i = i + (1) >> 0; + if (i === 9) { + break; + } + nextCarry = (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 25 >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((y$1 = (3), y$1 < 32 ? ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) << y$1) : 0) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) + (carry) >>> 0)); + carry = nextCarry + (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) >>> 28 >>> 0)) >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) & (268435455)) >>> 0)); + i = i + (1) >> 0; + } + p256ReduceCarry(out, carry); + }; + p256PointDouble = function(xOut, yOut, zOut, x, y, z) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, alpha, beta, delta, gamma, tmp, tmp2, x, xOut, y, yOut, z, zOut; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + delta = $clone(_tmp, arrayType$4); + gamma = $clone(_tmp$1, arrayType$4); + alpha = $clone(_tmp$2, arrayType$4); + beta = $clone(_tmp$3, arrayType$4); + tmp = $clone(_tmp$4, arrayType$4); + tmp2 = $clone(_tmp$5, arrayType$4); + p256Square(delta, z); + p256Square(gamma, y); + p256Mul(beta, x, gamma); + p256Sum(tmp, x, delta); + p256Diff(tmp2, x, delta); + p256Mul(alpha, tmp, tmp2); + p256Scalar3(alpha); + p256Sum(tmp, y, z); + p256Square(tmp, tmp); + p256Diff(tmp, tmp, gamma); + p256Diff(zOut, tmp, delta); + p256Scalar4(beta); + p256Square(xOut, alpha); + p256Diff(xOut, xOut, beta); + p256Diff(xOut, xOut, beta); + p256Diff(tmp, beta, xOut); + p256Mul(tmp, alpha, tmp); + p256Square(tmp2, gamma); + p256Scalar8(tmp2); + p256Diff(yOut, tmp, tmp2); + }; + p256PointAddMixed = function(xOut, yOut, zOut, x1, y1, z1, x2, y2) { + var _tmp, _tmp$1, _tmp$10, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, h, i, j, r, rr, s2, tmp, u2, v, x1, x2, xOut, y1, y2, yOut, z1, z1z1, z1z1z1, zOut; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + _tmp$6 = arrayType$4.zero(); + _tmp$7 = arrayType$4.zero(); + _tmp$8 = arrayType$4.zero(); + _tmp$9 = arrayType$4.zero(); + _tmp$10 = arrayType$4.zero(); + z1z1 = $clone(_tmp, arrayType$4); + z1z1z1 = $clone(_tmp$1, arrayType$4); + s2 = $clone(_tmp$2, arrayType$4); + u2 = $clone(_tmp$3, arrayType$4); + h = $clone(_tmp$4, arrayType$4); + i = $clone(_tmp$5, arrayType$4); + j = $clone(_tmp$6, arrayType$4); + r = $clone(_tmp$7, arrayType$4); + rr = $clone(_tmp$8, arrayType$4); + v = $clone(_tmp$9, arrayType$4); + tmp = $clone(_tmp$10, arrayType$4); + p256Square(z1z1, z1); + p256Sum(tmp, z1, z1); + p256Mul(u2, x2, z1z1); + p256Mul(z1z1z1, z1, z1z1); + p256Mul(s2, y2, z1z1z1); + p256Diff(h, u2, x1); + p256Sum(i, h, h); + p256Square(i, i); + p256Mul(j, h, i); + p256Diff(r, s2, y1); + p256Sum(r, r, r); + p256Mul(v, x1, i); + p256Mul(zOut, tmp, h); + p256Square(rr, r); + p256Diff(xOut, rr, j); + p256Diff(xOut, xOut, v); + p256Diff(xOut, xOut, v); + p256Diff(tmp, v, xOut); + p256Mul(yOut, tmp, r); + p256Mul(tmp, y1, j); + p256Diff(yOut, yOut, tmp); + p256Diff(yOut, yOut, tmp); + }; + p256PointAdd = function(xOut, yOut, zOut, x1, y1, z1, x2, y2, z2) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, h, i, j, r, rr, s1, s2, tmp, u1, u2, v, x1, x2, xOut, y1, y2, yOut, z1, z1z1, z1z1z1, z2, z2z2, z2z2z2, zOut; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + _tmp$6 = arrayType$4.zero(); + _tmp$7 = arrayType$4.zero(); + _tmp$8 = arrayType$4.zero(); + _tmp$9 = arrayType$4.zero(); + _tmp$10 = arrayType$4.zero(); + _tmp$11 = arrayType$4.zero(); + _tmp$12 = arrayType$4.zero(); + _tmp$13 = arrayType$4.zero(); + _tmp$14 = arrayType$4.zero(); + z1z1 = $clone(_tmp, arrayType$4); + z1z1z1 = $clone(_tmp$1, arrayType$4); + z2z2 = $clone(_tmp$2, arrayType$4); + z2z2z2 = $clone(_tmp$3, arrayType$4); + s1 = $clone(_tmp$4, arrayType$4); + s2 = $clone(_tmp$5, arrayType$4); + u1 = $clone(_tmp$6, arrayType$4); + u2 = $clone(_tmp$7, arrayType$4); + h = $clone(_tmp$8, arrayType$4); + i = $clone(_tmp$9, arrayType$4); + j = $clone(_tmp$10, arrayType$4); + r = $clone(_tmp$11, arrayType$4); + rr = $clone(_tmp$12, arrayType$4); + v = $clone(_tmp$13, arrayType$4); + tmp = $clone(_tmp$14, arrayType$4); + p256Square(z1z1, z1); + p256Square(z2z2, z2); + p256Mul(u1, x1, z2z2); + p256Sum(tmp, z1, z2); + p256Square(tmp, tmp); + p256Diff(tmp, tmp, z1z1); + p256Diff(tmp, tmp, z2z2); + p256Mul(z2z2z2, z2, z2z2); + p256Mul(s1, y1, z2z2z2); + p256Mul(u2, x2, z1z1); + p256Mul(z1z1z1, z1, z1z1); + p256Mul(s2, y2, z1z1z1); + p256Diff(h, u2, u1); + p256Sum(i, h, h); + p256Square(i, i); + p256Mul(j, h, i); + p256Diff(r, s2, s1); + p256Sum(r, r, r); + p256Mul(v, u1, i); + p256Mul(zOut, tmp, h); + p256Square(rr, r); + p256Diff(xOut, rr, j); + p256Diff(xOut, xOut, v); + p256Diff(xOut, xOut, v); + p256Diff(tmp, v, xOut); + p256Mul(yOut, tmp, r); + p256Mul(tmp, s1, j); + p256Diff(yOut, yOut, tmp); + p256Diff(yOut, yOut, tmp); + }; + p256CopyConditional = function(out, in$1, mask$1) { + var i, in$1, mask$1, out, tmp; + i = 0; + while (true) { + if (!(i < 9)) { break; } + tmp = (mask$1 & ((((in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i])) ^ (out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i]))) >>> 0))) >>> 0; + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i])) ^ (tmp)) >>> 0)); + i = i + (1) >> 0; + } + }; + p256SelectAffinePoint = function(xOut, yOut, table, index) { + var _i, _i$1, _i$2, _i$3, _ref, _ref$1, _ref$2, _ref$3, i, i$1, i$2, index, j, j$1, mask$1, table, xOut, yOut; + _ref = xOut; + _i = 0; + while (true) { + if (!(_i < 9)) { break; } + i = _i; + xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); + _i++; + } + _ref$1 = yOut; + _i$1 = 0; + while (true) { + if (!(_i$1 < 9)) { break; } + i$1 = _i$1; + yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); + _i$1++; + } + i$2 = 1; + while (true) { + if (!(i$2 < 16)) { break; } + mask$1 = (i$2 ^ index) >>> 0; + mask$1 = (mask$1 | ((mask$1 >>> 2 >>> 0))) >>> 0; + mask$1 = (mask$1 | ((mask$1 >>> 1 >>> 0))) >>> 0; + mask$1 = (mask$1 & (1)) >>> 0; + mask$1 = mask$1 - (1) >>> 0; + _ref$2 = xOut; + _i$2 = 0; + while (true) { + if (!(_i$2 < 9)) { break; } + j = _i$2; + xOut.nilCheck, ((j < 0 || j >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[j] = (((xOut.nilCheck, ((j < 0 || j >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[j])) | ((((0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]) & mask$1) >>> 0))) >>> 0)); + table = $subslice(table, 1); + _i$2++; + } + _ref$3 = yOut; + _i$3 = 0; + while (true) { + if (!(_i$3 < 9)) { break; } + j$1 = _i$3; + yOut.nilCheck, ((j$1 < 0 || j$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[j$1] = (((yOut.nilCheck, ((j$1 < 0 || j$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[j$1])) | ((((0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]) & mask$1) >>> 0))) >>> 0)); + table = $subslice(table, 1); + _i$3++; + } + i$2 = i$2 + (1) >>> 0; + } + }; + p256SelectJacobianPoint = function(xOut, yOut, zOut, table, index) { + var _i, _i$1, _i$2, _i$3, _i$4, _i$5, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, i, i$1, i$2, i$3, index, j, j$1, j$2, mask$1, table, x, x$1, x$2, xOut, yOut, zOut; + _ref = xOut; + _i = 0; + while (true) { + if (!(_i < 9)) { break; } + i = _i; + xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); + _i++; + } + _ref$1 = yOut; + _i$1 = 0; + while (true) { + if (!(_i$1 < 9)) { break; } + i$1 = _i$1; + yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); + _i$1++; + } + _ref$2 = zOut; + _i$2 = 0; + while (true) { + if (!(_i$2 < 9)) { break; } + i$2 = _i$2; + zOut.nilCheck, ((i$2 < 0 || i$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$2] = 0); + _i$2++; + } + i$3 = 1; + while (true) { + if (!(i$3 < 16)) { break; } + mask$1 = (i$3 ^ index) >>> 0; + mask$1 = (mask$1 | ((mask$1 >>> 2 >>> 0))) >>> 0; + mask$1 = (mask$1 | ((mask$1 >>> 1 >>> 0))) >>> 0; + mask$1 = (mask$1 & (1)) >>> 0; + mask$1 = mask$1 - (1) >>> 0; + _ref$3 = xOut; + _i$3 = 0; + while (true) { + if (!(_i$3 < 9)) { break; } + j = _i$3; + xOut.nilCheck, ((j < 0 || j >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[j] = (((xOut.nilCheck, ((j < 0 || j >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[j])) | ((((x = (table.nilCheck, ((i$3 < 0 || i$3 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$3]))[0], ((j < 0 || j >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[j])) & mask$1) >>> 0))) >>> 0)); + _i$3++; + } + _ref$4 = yOut; + _i$4 = 0; + while (true) { + if (!(_i$4 < 9)) { break; } + j$1 = _i$4; + yOut.nilCheck, ((j$1 < 0 || j$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[j$1] = (((yOut.nilCheck, ((j$1 < 0 || j$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[j$1])) | ((((x$1 = (table.nilCheck, ((i$3 < 0 || i$3 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$3]))[1], ((j$1 < 0 || j$1 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[j$1])) & mask$1) >>> 0))) >>> 0)); + _i$4++; + } + _ref$5 = zOut; + _i$5 = 0; + while (true) { + if (!(_i$5 < 9)) { break; } + j$2 = _i$5; + zOut.nilCheck, ((j$2 < 0 || j$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[j$2] = (((zOut.nilCheck, ((j$2 < 0 || j$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[j$2])) | ((((x$2 = (table.nilCheck, ((i$3 < 0 || i$3 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$3]))[2], ((j$2 < 0 || j$2 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[j$2])) & mask$1) >>> 0))) >>> 0)); + _i$5++; + } + i$3 = i$3 + (1) >>> 0; + } + }; + p256GetBit = function(scalar, bit) { + var bit, scalar, x, y; + return (((((((y = (((bit & 7) >>> 0)), y < 32 ? (((x = bit >>> 3 >>> 0, (scalar.nilCheck, ((x < 0 || x >= scalar.length) ? ($throwRuntimeError("index out of range"), undefined) : scalar[x])))) >>> y) : 0) << 24 >>> 24)) & 1) >>> 0) >>> 0)); + }; + p256ScalarBaseMult = function(xOut, yOut, zOut, scalar) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, bit0, bit1, bit2, bit3, i, i$1, i$2, i$3, index, j, mask$1, nIsInfinityMask, pIsNoninfiniteMask, px, py, scalar, tableOffset, tx, ty, tz, xOut, yOut, zOut; + nIsInfinityMask = 4294967295; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + pIsNoninfiniteMask = _tmp; + mask$1 = _tmp$1; + tableOffset = _tmp$2; + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + _tmp$6 = arrayType$4.zero(); + _tmp$7 = arrayType$4.zero(); + px = $clone(_tmp$3, arrayType$4); + py = $clone(_tmp$4, arrayType$4); + tx = $clone(_tmp$5, arrayType$4); + ty = $clone(_tmp$6, arrayType$4); + tz = $clone(_tmp$7, arrayType$4); + _ref = xOut; + _i = 0; + while (true) { + if (!(_i < 9)) { break; } + i = _i; + xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); + _i++; + } + _ref$1 = yOut; + _i$1 = 0; + while (true) { + if (!(_i$1 < 9)) { break; } + i$1 = _i$1; + yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); + _i$1++; + } + _ref$2 = zOut; + _i$2 = 0; + while (true) { + if (!(_i$2 < 9)) { break; } + i$2 = _i$2; + zOut.nilCheck, ((i$2 < 0 || i$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$2] = 0); + _i$2++; + } + i$3 = 0; + while (true) { + if (!(i$3 < 32)) { break; } + if (!((i$3 === 0))) { + p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); + } + tableOffset = 0; + j = 0; + while (true) { + if (!(j <= 32)) { break; } + bit0 = p256GetBit(scalar, (31 - i$3 >>> 0) + j >>> 0); + bit1 = p256GetBit(scalar, (95 - i$3 >>> 0) + j >>> 0); + bit2 = p256GetBit(scalar, (159 - i$3 >>> 0) + j >>> 0); + bit3 = p256GetBit(scalar, (223 - i$3 >>> 0) + j >>> 0); + index = (((((bit0 | ((bit1 << 1 >>> 0))) >>> 0) | ((bit2 << 2 >>> 0))) >>> 0) | ((bit3 << 3 >>> 0))) >>> 0; + p256SelectAffinePoint(px, py, $subslice(new sliceType$1(p256Precomputed), tableOffset), index); + tableOffset = tableOffset + (270) >>> 0; + p256PointAddMixed(tx, ty, tz, xOut, yOut, zOut, px, py); + p256CopyConditional(xOut, px, nIsInfinityMask); + p256CopyConditional(yOut, py, nIsInfinityMask); + p256CopyConditional(zOut, p256One, nIsInfinityMask); + pIsNoninfiniteMask = nonZeroToAllOnes(index); + mask$1 = (pIsNoninfiniteMask & (~nIsInfinityMask >>> 0)) >>> 0; + p256CopyConditional(xOut, tx, mask$1); + p256CopyConditional(yOut, ty, mask$1); + p256CopyConditional(zOut, tz, mask$1); + nIsInfinityMask = (nIsInfinityMask & ~(pIsNoninfiniteMask)) >>> 0; + j = j + (32) >>> 0; + } + i$3 = i$3 + (1) >>> 0; + } + }; + p256PointToAffine = function(xOut, yOut, x, y, z) { + var _tmp, _tmp$1, x, xOut, y, yOut, z, zInv, zInvSq; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + zInv = $clone(_tmp, arrayType$4); + zInvSq = $clone(_tmp$1, arrayType$4); + p256Invert(zInv, z); + p256Square(zInvSq, zInv); + p256Mul(xOut, x, zInvSq); + p256Mul(zInv, zInv, zInvSq); + p256Mul(yOut, y, zInv); + }; + p256ToAffine = function(x, y, z) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, x, xOut, xx, y, yOut, yy, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; x = $f.x; xOut = $f.xOut; xx = $f.xx; y = $f.y; yOut = $f.yOut; yy = $f.yy; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + xx = [xx]; + yy = [yy]; + xOut = ptrType$1.nil; + yOut = ptrType$1.nil; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + xx[0] = $clone(_tmp, arrayType$4); + yy[0] = $clone(_tmp$1, arrayType$4); + p256PointToAffine(xx[0], yy[0], x, y, z); + _r = p256ToBig(xx[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tmp$2 = _r; + _r$1 = p256ToBig(yy[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$3 = _r$1; + xOut = _tmp$2; + yOut = _tmp$3; + $s = -1; return [xOut, yOut]; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256ToAffine }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.x = x; $f.xOut = xOut; $f.xx = xx; $f.y = y; $f.yOut = yOut; $f.yy = yy; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + p256ScalarMult = function(xOut, yOut, zOut, x, y, scalar) { + var _i, _i$1, _i$2, _q, _q$1, _q$2, _q$3, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, i, i$1, i$2, i$3, i$4, index, mask$1, nIsInfinityMask, pIsNoninfiniteMask, precomp, px, py, pz, scalar, tx, ty, tz, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, xOut, y, y$1, yOut, zOut; + _tmp = arrayType$4.zero(); + _tmp$1 = arrayType$4.zero(); + _tmp$2 = arrayType$4.zero(); + _tmp$3 = arrayType$4.zero(); + _tmp$4 = arrayType$4.zero(); + _tmp$5 = arrayType$4.zero(); + px = $clone(_tmp, arrayType$4); + py = $clone(_tmp$1, arrayType$4); + pz = $clone(_tmp$2, arrayType$4); + tx = $clone(_tmp$3, arrayType$4); + ty = $clone(_tmp$4, arrayType$4); + tz = $clone(_tmp$5, arrayType$4); + precomp = arrayType$8.zero(); + _tmp$6 = 0; + _tmp$7 = 0; + _tmp$8 = 0; + _tmp$9 = 0; + nIsInfinityMask = _tmp$6; + index = _tmp$7; + pIsNoninfiniteMask = _tmp$8; + mask$1 = _tmp$9; + arrayType$4.copy(precomp[1][0], x); + arrayType$4.copy(precomp[1][1], y); + arrayType$4.copy(precomp[1][2], p256One); + i = 2; + while (true) { + if (!(i < 16)) { break; } + p256PointDouble(((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[0], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[1], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[2], (x$1 = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$1]))[0], (x$2 = (_q$1 = i / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$2]))[1], (x$3 = (_q$2 = i / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), ((x$3 < 0 || x$3 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$3]))[2]); + p256PointAddMixed((x$4 = i + 1 >> 0, ((x$4 < 0 || x$4 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$4]))[0], (x$5 = i + 1 >> 0, ((x$5 < 0 || x$5 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$5]))[1], (x$6 = i + 1 >> 0, ((x$6 < 0 || x$6 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$6]))[2], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[0], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[1], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[2], x, y); + i = i + (2) >> 0; + } + _ref = xOut; + _i = 0; + while (true) { + if (!(_i < 9)) { break; } + i$1 = _i; + xOut.nilCheck, ((i$1 < 0 || i$1 >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i$1] = 0); + _i++; + } + _ref$1 = yOut; + _i$1 = 0; + while (true) { + if (!(_i$1 < 9)) { break; } + i$2 = _i$1; + yOut.nilCheck, ((i$2 < 0 || i$2 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$2] = 0); + _i$1++; + } + _ref$2 = zOut; + _i$2 = 0; + while (true) { + if (!(_i$2 < 9)) { break; } + i$3 = _i$2; + zOut.nilCheck, ((i$3 < 0 || i$3 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$3] = 0); + _i$2++; + } + nIsInfinityMask = 4294967295; + i$4 = 0; + while (true) { + if (!(i$4 < 64)) { break; } + if (!((i$4 === 0))) { + p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); + p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); + p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); + p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); + } + index = (((x$7 = 31 - (_q$3 = i$4 / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0, (scalar.nilCheck, ((x$7 < 0 || x$7 >= scalar.length) ? ($throwRuntimeError("index out of range"), undefined) : scalar[x$7]))) >>> 0)); + if (((i$4 & 1)) === 1) { + index = (index & (15)) >>> 0; + } else { + index = (y$1 = (4), y$1 < 32 ? (index >>> y$1) : 0) >>> 0; + } + p256SelectJacobianPoint(px, py, pz, precomp, index); + p256PointAdd(tx, ty, tz, xOut, yOut, zOut, px, py, pz); + p256CopyConditional(xOut, px, nIsInfinityMask); + p256CopyConditional(yOut, py, nIsInfinityMask); + p256CopyConditional(zOut, pz, nIsInfinityMask); + pIsNoninfiniteMask = nonZeroToAllOnes(index); + mask$1 = (pIsNoninfiniteMask & (~nIsInfinityMask >>> 0)) >>> 0; + p256CopyConditional(xOut, tx, mask$1); + p256CopyConditional(yOut, ty, mask$1); + p256CopyConditional(zOut, tz, mask$1); + nIsInfinityMask = (nIsInfinityMask & ~(pIsNoninfiniteMask)) >>> 0; + i$4 = i$4 + (1) >> 0; + } + }; + p256FromBig = function(out, in$1) { + var _r, bits, bits$1, i, in$1, out, tmp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; bits = $f.bits; bits$1 = $f.bits$1; i = $f.i; in$1 = $f.in$1; out = $f.out; tmp = $f.tmp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + tmp = new big.Int.ptr(false, big.nat.nil).Lsh(in$1, 257); + _r = tmp.Mod(tmp, p256Params.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + i = 0; + while (true) { + if (!(i < 9)) { break; } + bits = tmp.Bits(); + if (bits.$length > 0) { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((((0 >= bits.$length ? ($throwRuntimeError("index out of range"), undefined) : bits.$array[bits.$offset + 0]) >>> 0)) & 536870911) >>> 0)); + } else { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = 0); + } + tmp.Rsh(tmp, 29); + i = i + (1) >> 0; + if (i === 9) { + break; + } + bits$1 = tmp.Bits(); + if (bits$1.$length > 0) { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((((0 >= bits$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bits$1.$array[bits$1.$offset + 0]) >>> 0)) & 268435455) >>> 0)); + } else { + out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = 0); + } + tmp.Rsh(tmp, 28); + i = i + (1) >> 0; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256FromBig }; } $f._r = _r; $f.bits = bits; $f.bits$1 = bits$1; $f.i = i; $f.in$1 = in$1; $f.out = out; $f.tmp = tmp; $f.$s = $s; $f.$r = $r; return $f; + }; + p256ToBig = function(in$1) { + var _r, _tmp, _tmp$1, i, in$1, result, tmp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; i = $f.i; in$1 = $f.in$1; result = $f.result; tmp = $f.tmp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tmp = new big.Int.ptr(false, big.nat.nil); + _tmp$1 = new big.Int.ptr(false, big.nat.nil); + result = _tmp; + tmp = _tmp$1; + result.SetInt64((new $Int64(0, (in$1.nilCheck, in$1[8])))); + i = 7; + while (true) { + if (!(i >= 0)) { break; } + if (((i & 1)) === 0) { + result.Lsh(result, 29); + } else { + result.Lsh(result, 28); + } + tmp.SetInt64((new $Int64(0, (in$1.nilCheck, ((i < 0 || i >= in$1.length) ? ($throwRuntimeError("index out of range"), undefined) : in$1[i]))))); + result.Add(result, tmp); + i = i - (1) >> 0; + } + result.Mul(result, p256RInverse); + _r = result.Mod(result, p256Params.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return result; + /* */ } return; } if ($f === undefined) { $f = { $blk: p256ToBig }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.i = i; $f.in$1 = in$1; $f.result = result; $f.tmp = tmp; $f.$s = $s; $f.$r = $r; return $f; + }; + initP256Arch = function() { + p256Curve.copy(p256, new p256Curve.ptr(p256Params)); + }; + ptrType.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "affineFromJacobian", name: "affineFromJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "addJacobian", name: "addJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "doubleJacobian", name: "doubleJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; + p224Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; + p256Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}]; + Curve.init([{prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}]); + CurveParams.init("", [{prop: "P", name: "P", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "B", name: "B", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Gx", name: "Gx", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Gy", name: "Gy", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "BitSize", name: "BitSize", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}]); + p224Curve.init("crypto/elliptic", [{prop: "CurveParams", name: "CurveParams", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "gx", name: "gx", embedded: false, exported: false, typ: p224FieldElement, tag: ""}, {prop: "gy", name: "gy", embedded: false, exported: false, typ: p224FieldElement, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: p224FieldElement, tag: ""}]); + p224FieldElement.init($Uint32, 8); + p256Curve.init("", [{prop: "CurveParams", name: "CurveParams", embedded: true, exported: true, typ: ptrType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = io.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + initonce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + p384 = ptrType.nil; + p521 = ptrType.nil; + p224 = new p224Curve.ptr(ptrType.nil, arrayType.zero(), arrayType.zero(), arrayType.zero()); + p256Params = ptrType.nil; + p256RInverse = ptrType$1.nil; + p256 = new p256Curve.ptr(ptrType.nil); + mask = new sliceType([255, 1, 3, 7, 15, 31, 63, 127]); + p224P = $toNativeArray($kindUint32, [1, 0, 0, 268431360, 268435455, 268435455, 268435455, 268435455]); + p224ZeroModP31 = new sliceType$1([2147483656, 2147483640, 2147483640, 2147450872, 2147483640, 2147483640, 2147483640, 2147483640]); + p224ZeroModP63 = $toNativeArray($kindUint64, [new $Uint64(2147483656, 0), new $Uint64(2147483640, 0), new $Uint64(2147483640, 0), new $Uint64(2147483640, 0), new $Uint64(2147483639, 4294443008), new $Uint64(2147483640, 0), new $Uint64(2147483640, 0), new $Uint64(2147483640, 0)]); + p256One = $toNativeArray($kindUint32, [2, 0, 0, 268433408, 536870911, 268435455, 532676607, 33554431, 0]); + p256Precomputed = $toNativeArray($kindUint32, [290596984, 242421057, 230031737, 78635775, 310917853, 212721032, 295599836, 222981803, 51514350, 489335829, 254096764, 434396381, 96936400, 429049253, 170095751, 22329889, 21696699, 11419619, 222406006, 153287761, 37001551, 101408979, 373655214, 216620824, 535072883, 66729676, 99339564, 188755759, 22835391, 358715996, 94529284, 229187216, 215751807, 513877062, 236641822, 248061730, 40859512, 90604670, 168553630, 37024851, 439480858, 226879324, 90992905, 170293760, 190300240, 10025815, 178796492, 101451666, 217734681, 102476702, 92922779, 10691781, 131522279, 43478603, 532943434, 176956491, 484992866, 215358590, 405915872, 123172065, 496412073, 138651209, 205172986, 115533781, 124205610, 395011560, 67124891, 438243778, 7870186, 258227729, 93078495, 255999938, 425934842, 143782578, 305931036, 74112396, 88539357, 94251799, 388871183, 138291069, 185456137, 265411090, 56389202, 435020300, 219799744, 159190848, 184638233, 71951349, 14748830, 54179201, 90859435, 91714381, 501071970, 207073549, 21607325, 40541819, 204857247, 75982029, 124632266, 212120422, 244515755, 443842791, 92184193, 504621904, 256273651, 116484896, 79311219, 202804275, 365646905, 111382033, 121002173, 187258447, 66509915, 5486974, 321045696, 106813439, 60941558, 350622890, 153379607, 466107082, 182025965, 221826634, 260222982, 54653047, 174775689, 76106445, 166814421, 260313327, 455502422, 14152227, 65063826, 238663282, 111317018, 110789974, 518080, 163043539, 3185280, 449863551, 204453341, 213898269, 164542008, 273777244, 228642651, 135456897, 116610665, 111505196, 502845828, 3430432, 343397495, 23354801, 199756881, 203603518, 238413402, 451639968, 204952341, 258456729, 134076345, 421511614, 6366045, 46236905, 29730873, 75111974, 192722006, 155066973, 351520493, 214702793, 402536435, 77105545, 445695234, 49487938, 169309851, 184388732, 135863406, 500019767, 23199936, 276509345, 107743451, 282094082, 261267, 90308643, 376580903, 109796441, 40959228, 262999756, 241033666, 246105707, 50090300, 67630940, 195735859, 158359529, 193509607, 120899987, 31588239, 420833648, 180162304, 273063591, 53033664, 215783594, 30950397, 236240872, 364806751, 9130514, 246676327, 136101161, 197537558, 45546695, 257576489, 324406118, 202074818, 85649040, 222421617, 255761364, 30870187, 16949106, 121510965, 250023868, 181935023, 166511770, 141325342, 266780208, 392647399, 2348054, 528735877, 41804168, 107966648, 404542751, 158035532, 412033845, 173930329, 396852918, 267062899, 357230868, 49540177, 58878809, 194113917, 29829449, 325238538, 237239775, 173413552, 1015183, 495713, 136567250, 136396601, 287878667, 218717445, 193315010, 32289519, 38657156, 238414081, 406919754, 257809469, 58222217, 86139112, 95303012, 88256781, 148453957, 429206180, 160877633, 273786665, 79574169, 86713258, 278868094, 116766395, 528802279, 125439226, 281337663, 39453418, 184844341, 238149222, 208587427, 42902325, 42491940, 326299680, 16080181, 367290444, 254451223, 441087273, 213368497, 187332769, 447880991, 104209615, 113842077, 185816615, 308787572, 71338925, 482342488, 238904593, 13096815, 30177897, 243196699, 89107279, 2855247, 450001456, 215177118, 206574156, 84781712, 11616114, 184986229, 118447302, 373941674, 139088658, 53019708, 68960273, 332604433, 184854584, 225840429, 387167538, 195693571, 138420907, 113046977, 49566585, 25878640, 415883550, 34327194, 107956587, 65991316, 108331218, 226451772, 2997227, 192155704, 235148095, 360879757, 199853559, 28097562, 443192223, 54415606, 224812756, 189496278, 509228953, 112408647, 402282239, 106887472, 2219082, 45315673, 72416791, 188054373, 234221484, 356088815, 164846207, 288014687, 103081518, 177253935, 276753618, 32938942, 125660110, 91493268, 331777276, 156289296, 119886379, 231179651, 68086459, 534655626, 198581654, 220775303, 166165897, 307563584, 123325309, 57143092, 182626656, 152800220, 154428073, 16017903, 187603695, 221030257, 89005890, 8038985, 103901883, 37829774, 88235001, 468532794, 254222964, 526283558, 104949015, 245526642, 164552359, 7239219, 130619730, 226520526, 149071841, 239214106, 68733409, 31180944, 456743990, 169722229, 499445619, 144011060, 239820018, 453851672, 51989046, 113402911, 239342156, 170872490, 176956858, 261258967, 103265812, 121052362, 195126932, 68664323, 130066403, 163798041, 292069893, 146190349, 283373001, 163683314, 92807721, 455819618, 173862682, 356737579, 163398462, 56942669, 122161042, 97105331, 243662629, 67694423, 404017060, 18986011, 220498447, 61887010, 60535146, 209032813, 168001811, 172627817, 18857068, 152560910, 250363304, 379416236, 17569433, 172056915, 259148050, 365781175, 78428889, 99599866, 253038295, 1190737, 285520906, 213382210, 263923967, 111956938, 425804492, 129961897, 9795153, 81850901, 248789496, 66350037, 95217711, 285808310, 7188600, 268270935, 254724780, 212364780, 366392026, 157674697, 479376578, 2045969, 481329397, 47757316, 433176877, 253803846, 26550183, 171333315, 86221861, 265094802, 222617032, 320802651, 184028746, 215612532, 161199640, 47944780, 174534800, 29495521, 395087139, 21447555, 280523837, 159753563, 48711545, 5726520, 156793127, 321990906, 199251222, 167040537, 196486512, 161400209, 227830014, 487028781, 264711691, 117551768, 409175611, 140072120, 303696950, 166199007, 258257961, 163174174, 350418392, 260410682, 155381416, 228964197, 116240383, 178067660, 208004282, 477396614, 240036117, 427939745, 137975385, 86955234, 142427063, 58372379, 433230542, 260916882, 415434047, 143015443, 79775424, 113112410, 82068861, 370483849, 180850370, 442090914, 33721239, 119287041, 43353375, 67400827, 142103949, 131242660, 332936223, 148565975, 329029421, 112716405, 222993886, 267477976, 136140247, 173797224, 192622808, 199703919, 178815297, 228027521, 132622796, 415151985, 225918141, 334829905, 164675959, 29661816]); + p256Zero31 = $toNativeArray($kindUint32, [2147483640, 1073741820, 2147483644, 1073750012, 2147483644, 1073741820, 2164260860, 939524092, 2147483644]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/internal/randutil"] = (function() { + var $pkg = {}, $init, io, sync, structType, arrayType, sliceType, closedChanOnce, closedChan, MaybeReadByte; + io = $packages["io"]; + sync = $packages["sync"]; + structType = $structType("", []); + arrayType = $arrayType($Uint8, 1); + sliceType = $sliceType($Uint8); + MaybeReadByte = function(r) { + var _r, _r$1, _selection, buf, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _selection = $f._selection; buf = $f.buf; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = closedChanOnce.Do((function() { + closedChan = new $Chan(structType, 0); + $close(closedChan); + })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = $select([[closedChan], [closedChan]]); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _selection = _r; + /* */ if (_selection[0] === 0) { $s = 3; continue; } + /* */ if (_selection[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 3: + $s = -1; return; + /* } else if (_selection[0] === 1) { */ case 4: + buf = arrayType.zero(); + _r$1 = r.Read(new sliceType(buf)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: MaybeReadByte }; } $f._r = _r; $f._r$1 = _r$1; $f._selection = _selection; $f.buf = buf; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.MaybeReadByte = MaybeReadByte; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = io.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + closedChanOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + closedChan = $chanNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/sha512"] = (function() { + var $pkg = {}, $init, crypto, errors, hash, digest, sliceType, sliceType$1, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$7, ptrType, _K, block, init, putUint64, appendUint64, consumeUint64, New, New512_224, New512_256, New384, Sum512, blockGeneric; + crypto = $packages["crypto"]; + errors = $packages["errors"]; + hash = $packages["hash"]; + digest = $pkg.digest = $newType(0, $kindStruct, "sha512.digest", true, "crypto/sha512", false, function(h_, x_, nx_, len_, function$4_) { + this.$val = this; + if (arguments.length === 0) { + this.h = arrayType$1.zero(); + this.x = arrayType$2.zero(); + this.nx = 0; + this.len = new $Uint64(0, 0); + this.function$4 = 0; + return; + } + this.h = h_; + this.x = x_; + this.nx = nx_; + this.len = len_; + this.function$4 = function$4_; + }); + sliceType = $sliceType($Uint64); + sliceType$1 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 8); + arrayType$1 = $arrayType($Uint64, 8); + arrayType$2 = $arrayType($Uint8, 128); + arrayType$3 = $arrayType($Uint8, 64); + arrayType$7 = $arrayType($Uint64, 80); + ptrType = $ptrType(digest); + init = function() { + crypto.RegisterHash(6, New384); + crypto.RegisterHash(7, New); + crypto.RegisterHash(14, New512_224); + crypto.RegisterHash(15, New512_256); + }; + digest.ptr.prototype.Reset = function() { + var _1, d; + d = this; + _1 = d.function$4; + if (_1 === (6)) { + d.h[0] = new $Uint64(3418070365, 3238371032); + d.h[1] = new $Uint64(1654270250, 914150663); + d.h[2] = new $Uint64(2438529370, 812702999); + d.h[3] = new $Uint64(355462360, 4144912697); + d.h[4] = new $Uint64(1731405415, 4290775857); + d.h[5] = new $Uint64(2394180231, 1750603025); + d.h[6] = new $Uint64(3675008525, 1694076839); + d.h[7] = new $Uint64(1203062813, 3204075428); + } else if (_1 === (14)) { + d.h[0] = new $Uint64(2352822216, 424955298); + d.h[1] = new $Uint64(1944164710, 2312950998); + d.h[2] = new $Uint64(502970286, 855612546); + d.h[3] = new $Uint64(1738396948, 1479516111); + d.h[4] = new $Uint64(258812777, 2077511080); + d.h[5] = new $Uint64(2011393907, 79989058); + d.h[6] = new $Uint64(1067287976, 1780299464); + d.h[7] = new $Uint64(286451373, 2446758561); + } else if (_1 === (15)) { + d.h[0] = new $Uint64(573645204, 4230739756); + d.h[1] = new $Uint64(2673172387, 3360449730); + d.h[2] = new $Uint64(596883563, 1867755857); + d.h[3] = new $Uint64(2520282905, 1497426621); + d.h[4] = new $Uint64(2519219938, 2827943907); + d.h[5] = new $Uint64(3193839141, 1401305490); + d.h[6] = new $Uint64(721525244, 746961066); + d.h[7] = new $Uint64(246885852, 2177182882); + } else { + d.h[0] = new $Uint64(1779033703, 4089235720); + d.h[1] = new $Uint64(3144134277, 2227873595); + d.h[2] = new $Uint64(1013904242, 4271175723); + d.h[3] = new $Uint64(2773480762, 1595750129); + d.h[4] = new $Uint64(1359893119, 2917565137); + d.h[5] = new $Uint64(2600822924, 725511199); + d.h[6] = new $Uint64(528734635, 4215389547); + d.h[7] = new $Uint64(1541459225, 327033209); + } + d.nx = 0; + d.len = new $Uint64(0, 0); + }; + digest.prototype.Reset = function() { return this.$val.Reset(); }; + digest.ptr.prototype.MarshalBinary = function() { + var _1, b, d; + d = this; + b = $makeSlice(sliceType$1, 0, 204); + _1 = d.function$4; + if (_1 === (6)) { + b = $appendSlice(b, "sha\x04"); + } else if (_1 === (14)) { + b = $appendSlice(b, "sha\x05"); + } else if (_1 === (15)) { + b = $appendSlice(b, "sha\x06"); + } else if (_1 === (7)) { + b = $appendSlice(b, "sha\x07"); + } else { + return [sliceType$1.nil, errors.New("crypto/sha512: invalid hash function")]; + } + b = appendUint64(b, d.h[0]); + b = appendUint64(b, d.h[1]); + b = appendUint64(b, d.h[2]); + b = appendUint64(b, d.h[3]); + b = appendUint64(b, d.h[4]); + b = appendUint64(b, d.h[5]); + b = appendUint64(b, d.h[6]); + b = appendUint64(b, d.h[7]); + b = $appendSlice(b, $subslice(new sliceType$1(d.x), 0, d.nx)); + b = $subslice(b, 0, ((b.$length + 128 >> 0) - (d.nx) >> 0)); + b = appendUint64(b, d.len); + return [b, $ifaceNil]; + }; + digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + digest.ptr.prototype.UnmarshalBinary = function(b) { + var _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, b, d; + d = this; + if (b.$length < 4) { + return errors.New("crypto/sha512: invalid hash state identifier"); + } + if ((d.function$4 === 6) && ($bytesToString($subslice(b, 0, 4))) === "sha\x04") { + } else if ((d.function$4 === 14) && ($bytesToString($subslice(b, 0, 4))) === "sha\x05") { + } else if ((d.function$4 === 15) && ($bytesToString($subslice(b, 0, 4))) === "sha\x06") { + } else if ((d.function$4 === 7) && ($bytesToString($subslice(b, 0, 4))) === "sha\x07") { + } else { + return errors.New("crypto/sha512: invalid hash state identifier"); + } + if (!((b.$length === 204))) { + return errors.New("crypto/sha512: invalid hash state size"); + } + b = $subslice(b, 4); + _tuple = consumeUint64(b); + b = _tuple[0]; + d.h[0] = _tuple[1]; + _tuple$1 = consumeUint64(b); + b = _tuple$1[0]; + d.h[1] = _tuple$1[1]; + _tuple$2 = consumeUint64(b); + b = _tuple$2[0]; + d.h[2] = _tuple$2[1]; + _tuple$3 = consumeUint64(b); + b = _tuple$3[0]; + d.h[3] = _tuple$3[1]; + _tuple$4 = consumeUint64(b); + b = _tuple$4[0]; + d.h[4] = _tuple$4[1]; + _tuple$5 = consumeUint64(b); + b = _tuple$5[0]; + d.h[5] = _tuple$5[1]; + _tuple$6 = consumeUint64(b); + b = _tuple$6[0]; + d.h[6] = _tuple$6[1]; + _tuple$7 = consumeUint64(b); + b = _tuple$7[0]; + d.h[7] = _tuple$7[1]; + b = $subslice(b, $copySlice(new sliceType$1(d.x), b)); + _tuple$8 = consumeUint64(b); + b = _tuple$8[0]; + d.len = _tuple$8[1]; + d.nx = (_r = ((d.len.$low >> 0)) % 128, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + return $ifaceNil; + }; + digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; + putUint64 = function(x, s) { + var s, x; + $unused((7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7])); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (($shiftRightUint64(s, 56).$low << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (($shiftRightUint64(s, 48).$low << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (($shiftRightUint64(s, 40).$low << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = (($shiftRightUint64(s, 32).$low << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (($shiftRightUint64(s, 24).$low << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (($shiftRightUint64(s, 16).$low << 24 >>> 24))); + (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = (($shiftRightUint64(s, 8).$low << 24 >>> 24))); + (7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7] = ((s.$low << 24 >>> 24))); + }; + appendUint64 = function(b, x) { + var a, b, x; + a = arrayType.zero(); + putUint64(new sliceType$1(a), x); + return $appendSlice(b, new sliceType$1(a)); + }; + consumeUint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + return [$subslice(b, 8), x$14]; + }; + New = function() { + var d; + d = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 7); + d.Reset(); + return d; + }; + $pkg.New = New; + New512_224 = function() { + var d; + d = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 14); + d.Reset(); + return d; + }; + $pkg.New512_224 = New512_224; + New512_256 = function() { + var d; + d = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 15); + d.Reset(); + return d; + }; + $pkg.New512_256 = New512_256; + New384 = function() { + var d; + d = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 6); + d.Reset(); + return d; + }; + $pkg.New384 = New384; + digest.ptr.prototype.Size = function() { + var _1, d; + d = this; + _1 = d.function$4; + if (_1 === (14)) { + return 28; + } else if (_1 === (15)) { + return 32; + } else if (_1 === (6)) { + return 48; + } else { + return 64; + } + }; + digest.prototype.Size = function() { return this.$val.Size(); }; + digest.ptr.prototype.BlockSize = function() { + var d; + d = this; + return 128; + }; + digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + digest.ptr.prototype.Write = function(p) { + var d, err, n, n$1, nn, p, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; err = $f.err; n = $f.n; n$1 = $f.n$1; nn = $f.nn; p = $f.p; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + d = this; + nn = p.$length; + d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + /* */ if (d.nx > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (d.nx > 0) { */ case 1: + n = $copySlice($subslice(new sliceType$1(d.x), d.nx), p); + d.nx = d.nx + (n) >> 0; + /* */ if (d.nx === 128) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (d.nx === 128) { */ case 3: + $r = block(d, new sliceType$1(d.x)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d.nx = 0; + /* } */ case 4: + p = $subslice(p, n); + /* } */ case 2: + /* */ if (p.$length >= 128) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (p.$length >= 128) { */ case 6: + n$1 = (p.$length & ~127) >> 0; + $r = block(d, $subslice(p, 0, n$1)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p = $subslice(p, n$1); + /* } */ case 7: + if (p.$length > 0) { + d.nx = $copySlice(new sliceType$1(d.x), p); + } + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Write }; } $f.d = d; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Write = function(p) { return this.$val.Write(p); }; + digest.ptr.prototype.Sum = function(in$1) { + var _1, _r, d, d0, hash$1, in$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; d = $f.d; d0 = $f.d0; hash$1 = $f.hash$1; in$1 = $f.in$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + d0 = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 0); + digest.copy(d0, d); + _r = d0.checkSum(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hash$1 = $clone(_r, arrayType$3); + _1 = d0.function$4; + if (_1 === (6)) { + $s = -1; return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 48)); + } else if (_1 === (14)) { + $s = -1; return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 28)); + } else if (_1 === (15)) { + $s = -1; return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 32)); + } else { + $s = -1; return $appendSlice(in$1, new sliceType$1(hash$1)); + } + $s = -1; return sliceType$1.nil; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Sum }; } $f._1 = _1; $f._r = _r; $f.d = d; $f.d0 = d0; $f.hash$1 = hash$1; $f.in$1 = in$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; + digest.ptr.prototype.checkSum = function() { + var _r, _r$1, _r$2, d, digest$1, len, tmp, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; d = $f.d; digest$1 = $f.digest$1; len = $f.len; tmp = $f.tmp; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + len = d.len; + tmp = arrayType$2.zero(); + tmp[0] = 128; + /* */ if ((x = $div64(len, new $Uint64(0, 128), true), (x.$high < 0 || (x.$high === 0 && x.$low < 112)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = $div64(len, new $Uint64(0, 128), true), (x.$high < 0 || (x.$high === 0 && x.$low < 112)))) { */ case 1: + _r = d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 128), true), new $Uint64(0 - x$1.$high, 112 - x$1.$low))))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = 3; continue; + /* } else { */ case 2: + _r$1 = d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 128), true), new $Uint64(0 - x$2.$high, 240 - x$2.$low))))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 3: + len = $shiftLeft64(len, (3)); + putUint64($subslice(new sliceType$1(tmp), 0), new $Uint64(0, 0)); + putUint64($subslice(new sliceType$1(tmp), 8), len); + _r$2 = d.Write($subslice(new sliceType$1(tmp), 0, 16)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + if (!((d.nx === 0))) { + $panic(new $String("d.nx != 0")); + } + digest$1 = arrayType$3.zero(); + putUint64($subslice(new sliceType$1(digest$1), 0), d.h[0]); + putUint64($subslice(new sliceType$1(digest$1), 8), d.h[1]); + putUint64($subslice(new sliceType$1(digest$1), 16), d.h[2]); + putUint64($subslice(new sliceType$1(digest$1), 24), d.h[3]); + putUint64($subslice(new sliceType$1(digest$1), 32), d.h[4]); + putUint64($subslice(new sliceType$1(digest$1), 40), d.h[5]); + if (!((d.function$4 === 6))) { + putUint64($subslice(new sliceType$1(digest$1), 48), d.h[6]); + putUint64($subslice(new sliceType$1(digest$1), 56), d.h[7]); + } + $s = -1; return digest$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.checkSum }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.d = d; $f.digest$1 = digest$1; $f.len = len; $f.tmp = tmp; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.checkSum = function() { return this.$val.checkSum(); }; + Sum512 = function(data) { + var _r, _r$1, d, data, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; d = $f.d; data = $f.data; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = new digest.ptr(arrayType$1.zero(), arrayType$2.zero(), 0, new $Uint64(0, 0), 7); + d.Reset(); + _r = d.Write(data); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = d.checkSum(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Sum512 }; } $f._r = _r; $f._r$1 = _r$1; $f.d = d; $f.data = data; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Sum512 = Sum512; + blockGeneric = function(dig, p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, b, c, d, dig, e, f, g, h, h0, h1, h2, h3, h4, h5, h6, h7, i, i$1, i$2, j, p, t1, t1$1, t2, t2$1, v1, v2, w, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$9; + w = arrayType$7.zero(); + _tmp = dig.h[0]; + _tmp$1 = dig.h[1]; + _tmp$2 = dig.h[2]; + _tmp$3 = dig.h[3]; + _tmp$4 = dig.h[4]; + _tmp$5 = dig.h[5]; + _tmp$6 = dig.h[6]; + _tmp$7 = dig.h[7]; + h0 = _tmp; + h1 = _tmp$1; + h2 = _tmp$2; + h3 = _tmp$3; + h4 = _tmp$4; + h5 = _tmp$5; + h6 = _tmp$6; + h7 = _tmp$7; + while (true) { + if (!(p.$length >= 128)) { break; } + i = 0; + while (true) { + if (!(i < 16)) { break; } + j = $imul(i, 8); + ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = $shiftLeft64((new $Uint64(0, ((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]))), 56), x$7 = $shiftLeft64((new $Uint64(0, (x$8 = j + 1 >> 0, ((x$8 < 0 || x$8 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$8])))), 48), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (x$10 = j + 2 >> 0, ((x$10 < 0 || x$10 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$10])))), 40), new $Uint64(x$5.$high | x$9.$high, (x$5.$low | x$9.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (x$12 = j + 3 >> 0, ((x$12 < 0 || x$12 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$12])))), 32), new $Uint64(x$4.$high | x$11.$high, (x$4.$low | x$11.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (x$14 = j + 4 >> 0, ((x$14 < 0 || x$14 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$14])))), 24), new $Uint64(x$3.$high | x$13.$high, (x$3.$low | x$13.$low) >>> 0)), x$15 = $shiftLeft64((new $Uint64(0, (x$16 = j + 5 >> 0, ((x$16 < 0 || x$16 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$16])))), 16), new $Uint64(x$2.$high | x$15.$high, (x$2.$low | x$15.$low) >>> 0)), x$17 = $shiftLeft64((new $Uint64(0, (x$18 = j + 6 >> 0, ((x$18 < 0 || x$18 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$18])))), 8), new $Uint64(x$1.$high | x$17.$high, (x$1.$low | x$17.$low) >>> 0)), x$19 = (new $Uint64(0, (x$20 = j + 7 >> 0, ((x$20 < 0 || x$20 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$20])))), new $Uint64(x.$high | x$19.$high, (x.$low | x$19.$low) >>> 0))); + i = i + (1) >> 0; + } + i$1 = 16; + while (true) { + if (!(i$1 < 80)) { break; } + v1 = (x$21 = i$1 - 2 >> 0, ((x$21 < 0 || x$21 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$21])); + t1 = (x$22 = (x$23 = (x$24 = $shiftRightUint64(v1, 19), x$25 = $shiftLeft64(v1, 45), new $Uint64(x$24.$high | x$25.$high, (x$24.$low | x$25.$low) >>> 0)), x$26 = (x$27 = $shiftRightUint64(v1, 61), x$28 = $shiftLeft64(v1, 3), new $Uint64(x$27.$high | x$28.$high, (x$27.$low | x$28.$low) >>> 0)), new $Uint64(x$23.$high ^ x$26.$high, (x$23.$low ^ x$26.$low) >>> 0)), x$29 = $shiftRightUint64(v1, 6), new $Uint64(x$22.$high ^ x$29.$high, (x$22.$low ^ x$29.$low) >>> 0)); + v2 = (x$30 = i$1 - 15 >> 0, ((x$30 < 0 || x$30 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$30])); + t2 = (x$31 = (x$32 = (x$33 = $shiftRightUint64(v2, 1), x$34 = $shiftLeft64(v2, 63), new $Uint64(x$33.$high | x$34.$high, (x$33.$low | x$34.$low) >>> 0)), x$35 = (x$36 = $shiftRightUint64(v2, 8), x$37 = $shiftLeft64(v2, 56), new $Uint64(x$36.$high | x$37.$high, (x$36.$low | x$37.$low) >>> 0)), new $Uint64(x$32.$high ^ x$35.$high, (x$32.$low ^ x$35.$low) >>> 0)), x$38 = $shiftRightUint64(v2, 7), new $Uint64(x$31.$high ^ x$38.$high, (x$31.$low ^ x$38.$low) >>> 0)); + ((i$1 < 0 || i$1 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$1] = (x$39 = (x$40 = (x$41 = (x$42 = i$1 - 7 >> 0, ((x$42 < 0 || x$42 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$42])), new $Uint64(t1.$high + x$41.$high, t1.$low + x$41.$low)), new $Uint64(x$40.$high + t2.$high, x$40.$low + t2.$low)), x$43 = (x$44 = i$1 - 16 >> 0, ((x$44 < 0 || x$44 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$44])), new $Uint64(x$39.$high + x$43.$high, x$39.$low + x$43.$low))); + i$1 = i$1 + (1) >> 0; + } + _tmp$8 = h0; + _tmp$9 = h1; + _tmp$10 = h2; + _tmp$11 = h3; + _tmp$12 = h4; + _tmp$13 = h5; + _tmp$14 = h6; + _tmp$15 = h7; + a = _tmp$8; + b = _tmp$9; + c = _tmp$10; + d = _tmp$11; + e = _tmp$12; + f = _tmp$13; + g = _tmp$14; + h = _tmp$15; + i$2 = 0; + while (true) { + if (!(i$2 < 80)) { break; } + t1$1 = (x$45 = (x$46 = (x$47 = (x$48 = (x$49 = (x$50 = (x$51 = $shiftRightUint64(e, 14), x$52 = $shiftLeft64(e, 50), new $Uint64(x$51.$high | x$52.$high, (x$51.$low | x$52.$low) >>> 0)), x$53 = (x$54 = $shiftRightUint64(e, 18), x$55 = $shiftLeft64(e, 46), new $Uint64(x$54.$high | x$55.$high, (x$54.$low | x$55.$low) >>> 0)), new $Uint64(x$50.$high ^ x$53.$high, (x$50.$low ^ x$53.$low) >>> 0)), x$56 = (x$57 = $shiftRightUint64(e, 41), x$58 = $shiftLeft64(e, 23), new $Uint64(x$57.$high | x$58.$high, (x$57.$low | x$58.$low) >>> 0)), new $Uint64(x$49.$high ^ x$56.$high, (x$49.$low ^ x$56.$low) >>> 0)), new $Uint64(h.$high + x$48.$high, h.$low + x$48.$low)), x$59 = (x$60 = new $Uint64(e.$high & f.$high, (e.$low & f.$low) >>> 0), x$61 = (x$62 = new $Uint64(~e.$high, ~e.$low >>> 0), new $Uint64(x$62.$high & g.$high, (x$62.$low & g.$low) >>> 0)), new $Uint64(x$60.$high ^ x$61.$high, (x$60.$low ^ x$61.$low) >>> 0)), new $Uint64(x$47.$high + x$59.$high, x$47.$low + x$59.$low)), x$63 = ((i$2 < 0 || i$2 >= _K.$length) ? ($throwRuntimeError("index out of range"), undefined) : _K.$array[_K.$offset + i$2]), new $Uint64(x$46.$high + x$63.$high, x$46.$low + x$63.$low)), x$64 = ((i$2 < 0 || i$2 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$2]), new $Uint64(x$45.$high + x$64.$high, x$45.$low + x$64.$low)); + t2$1 = (x$65 = (x$66 = (x$67 = (x$68 = $shiftRightUint64(a, 28), x$69 = $shiftLeft64(a, 36), new $Uint64(x$68.$high | x$69.$high, (x$68.$low | x$69.$low) >>> 0)), x$70 = (x$71 = $shiftRightUint64(a, 34), x$72 = $shiftLeft64(a, 30), new $Uint64(x$71.$high | x$72.$high, (x$71.$low | x$72.$low) >>> 0)), new $Uint64(x$67.$high ^ x$70.$high, (x$67.$low ^ x$70.$low) >>> 0)), x$73 = (x$74 = $shiftRightUint64(a, 39), x$75 = $shiftLeft64(a, 25), new $Uint64(x$74.$high | x$75.$high, (x$74.$low | x$75.$low) >>> 0)), new $Uint64(x$66.$high ^ x$73.$high, (x$66.$low ^ x$73.$low) >>> 0)), x$76 = (x$77 = (x$78 = new $Uint64(a.$high & b.$high, (a.$low & b.$low) >>> 0), x$79 = new $Uint64(a.$high & c.$high, (a.$low & c.$low) >>> 0), new $Uint64(x$78.$high ^ x$79.$high, (x$78.$low ^ x$79.$low) >>> 0)), x$80 = new $Uint64(b.$high & c.$high, (b.$low & c.$low) >>> 0), new $Uint64(x$77.$high ^ x$80.$high, (x$77.$low ^ x$80.$low) >>> 0)), new $Uint64(x$65.$high + x$76.$high, x$65.$low + x$76.$low)); + h = g; + g = f; + f = e; + e = new $Uint64(d.$high + t1$1.$high, d.$low + t1$1.$low); + d = c; + c = b; + b = a; + a = new $Uint64(t1$1.$high + t2$1.$high, t1$1.$low + t2$1.$low); + i$2 = i$2 + (1) >> 0; + } + h0 = (x$81 = a, new $Uint64(h0.$high + x$81.$high, h0.$low + x$81.$low)); + h1 = (x$82 = b, new $Uint64(h1.$high + x$82.$high, h1.$low + x$82.$low)); + h2 = (x$83 = c, new $Uint64(h2.$high + x$83.$high, h2.$low + x$83.$low)); + h3 = (x$84 = d, new $Uint64(h3.$high + x$84.$high, h3.$low + x$84.$low)); + h4 = (x$85 = e, new $Uint64(h4.$high + x$85.$high, h4.$low + x$85.$low)); + h5 = (x$86 = f, new $Uint64(h5.$high + x$86.$high, h5.$low + x$86.$low)); + h6 = (x$87 = g, new $Uint64(h6.$high + x$87.$high, h6.$low + x$87.$low)); + h7 = (x$88 = h, new $Uint64(h7.$high + x$88.$high, h7.$low + x$88.$low)); + p = $subslice(p, 128); + } + _tmp$16 = h0; + _tmp$17 = h1; + _tmp$18 = h2; + _tmp$19 = h3; + _tmp$20 = h4; + _tmp$21 = h5; + _tmp$22 = h6; + _tmp$23 = h7; + dig.h[0] = _tmp$16; + dig.h[1] = _tmp$17; + dig.h[2] = _tmp$18; + dig.h[3] = _tmp$19; + dig.h[4] = _tmp$20; + dig.h[5] = _tmp$21; + dig.h[6] = _tmp$22; + dig.h[7] = _tmp$23; + }; + ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha512", typ: $funcType([], [arrayType$3], false)}]; + digest.init("crypto/sha512", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "function$4", name: "function", embedded: false, exported: false, typ: crypto.Hash, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _K = new sliceType([new $Uint64(1116352408, 3609767458), new $Uint64(1899447441, 602891725), new $Uint64(3049323471, 3964484399), new $Uint64(3921009573, 2173295548), new $Uint64(961987163, 4081628472), new $Uint64(1508970993, 3053834265), new $Uint64(2453635748, 2937671579), new $Uint64(2870763221, 3664609560), new $Uint64(3624381080, 2734883394), new $Uint64(310598401, 1164996542), new $Uint64(607225278, 1323610764), new $Uint64(1426881987, 3590304994), new $Uint64(1925078388, 4068182383), new $Uint64(2162078206, 991336113), new $Uint64(2614888103, 633803317), new $Uint64(3248222580, 3479774868), new $Uint64(3835390401, 2666613458), new $Uint64(4022224774, 944711139), new $Uint64(264347078, 2341262773), new $Uint64(604807628, 2007800933), new $Uint64(770255983, 1495990901), new $Uint64(1249150122, 1856431235), new $Uint64(1555081692, 3175218132), new $Uint64(1996064986, 2198950837), new $Uint64(2554220882, 3999719339), new $Uint64(2821834349, 766784016), new $Uint64(2952996808, 2566594879), new $Uint64(3210313671, 3203337956), new $Uint64(3336571891, 1034457026), new $Uint64(3584528711, 2466948901), new $Uint64(113926993, 3758326383), new $Uint64(338241895, 168717936), new $Uint64(666307205, 1188179964), new $Uint64(773529912, 1546045734), new $Uint64(1294757372, 1522805485), new $Uint64(1396182291, 2643833823), new $Uint64(1695183700, 2343527390), new $Uint64(1986661051, 1014477480), new $Uint64(2177026350, 1206759142), new $Uint64(2456956037, 344077627), new $Uint64(2730485921, 1290863460), new $Uint64(2820302411, 3158454273), new $Uint64(3259730800, 3505952657), new $Uint64(3345764771, 106217008), new $Uint64(3516065817, 3606008344), new $Uint64(3600352804, 1432725776), new $Uint64(4094571909, 1467031594), new $Uint64(275423344, 851169720), new $Uint64(430227734, 3100823752), new $Uint64(506948616, 1363258195), new $Uint64(659060556, 3750685593), new $Uint64(883997877, 3785050280), new $Uint64(958139571, 3318307427), new $Uint64(1322822218, 3812723403), new $Uint64(1537002063, 2003034995), new $Uint64(1747873779, 3602036899), new $Uint64(1955562222, 1575990012), new $Uint64(2024104815, 1125592928), new $Uint64(2227730452, 2716904306), new $Uint64(2361852424, 442776044), new $Uint64(2428436474, 593698344), new $Uint64(2756734187, 3733110249), new $Uint64(3204031479, 2999351573), new $Uint64(3329325298, 3815920427), new $Uint64(3391569614, 3928383900), new $Uint64(3515267271, 566280711), new $Uint64(3940187606, 3454069534), new $Uint64(4118630271, 4000239992), new $Uint64(116418474, 1914138554), new $Uint64(174292421, 2731055270), new $Uint64(289380356, 3203993006), new $Uint64(460393269, 320620315), new $Uint64(685471733, 587496836), new $Uint64(852142971, 1086792851), new $Uint64(1017036298, 365543100), new $Uint64(1126000580, 2618297676), new $Uint64(1288033470, 3409855158), new $Uint64(1501505948, 4234509866), new $Uint64(1607167915, 987167468), new $Uint64(1816402316, 1246189591)]); + block = blockGeneric; + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["encoding/asn1"] = (function() { + var $pkg = {}, $init, errors, fmt, math, big, reflect, strconv, strings, time, utf8, StructuralError, SyntaxError, BitString, ObjectIdentifier, Enumerated, Flag, RawValue, RawContent, tagAndLength, fieldParameters, encoder, byteEncoder, bytesEncoder, stringEncoder, multiEncoder, taggedEncoder, int64Encoder, bitStringEncoder, oidEncoder, sliceType, ptrType, ptrType$1, sliceType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, sliceType$3, arrayType, arrayType$1, ptrType$5, bigOne, bitStringType, objectIdentifierType, enumeratedType, flagType, timeType, rawValueType, rawContentsType, bigIntType, byte00Encoder, byteFFEncoder, x, x$1, x$2, parseBool, checkInteger, parseInt64, parseInt32, parseBigInt, parseBitString, parseObjectIdentifier, parseBase128Int, parseUTCTime, parseGeneralizedTime, parseNumericString, isNumeric, parsePrintableString, isPrintable, parseIA5String, parseT61String, parseUTF8String, parseTagAndLength, parseSequenceOf, invalidLength, parseField, canHaveDefaultValue, setDefaultValue, Unmarshal, UnmarshalWithParams, parseFieldParameters, getUniversalType, base128IntLength, appendBase128Int, makeBigInt, appendLength, lengthLength, appendTagAndLength, makeObjectIdentifier, makePrintableString, makeIA5String, makeNumericString, makeUTF8String, appendTwoDigits, appendFourDigits, outsideUTCRange, makeUTCTime, makeGeneralizedTime, appendUTCTime, appendGeneralizedTime, appendTimeCommon, stripTagAndLength, makeBody, makeField, Marshal, MarshalWithParams; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + math = $packages["math"]; + big = $packages["math/big"]; + reflect = $packages["reflect"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + time = $packages["time"]; + utf8 = $packages["unicode/utf8"]; + StructuralError = $pkg.StructuralError = $newType(0, $kindStruct, "asn1.StructuralError", true, "encoding/asn1", true, function(Msg_) { + this.$val = this; + if (arguments.length === 0) { + this.Msg = ""; + return; + } + this.Msg = Msg_; + }); + SyntaxError = $pkg.SyntaxError = $newType(0, $kindStruct, "asn1.SyntaxError", true, "encoding/asn1", true, function(Msg_) { + this.$val = this; + if (arguments.length === 0) { + this.Msg = ""; + return; + } + this.Msg = Msg_; + }); + BitString = $pkg.BitString = $newType(0, $kindStruct, "asn1.BitString", true, "encoding/asn1", true, function(Bytes_, BitLength_) { + this.$val = this; + if (arguments.length === 0) { + this.Bytes = sliceType.nil; + this.BitLength = 0; + return; + } + this.Bytes = Bytes_; + this.BitLength = BitLength_; + }); + ObjectIdentifier = $pkg.ObjectIdentifier = $newType(12, $kindSlice, "asn1.ObjectIdentifier", true, "encoding/asn1", true, null); + Enumerated = $pkg.Enumerated = $newType(4, $kindInt, "asn1.Enumerated", true, "encoding/asn1", true, null); + Flag = $pkg.Flag = $newType(1, $kindBool, "asn1.Flag", true, "encoding/asn1", true, null); + RawValue = $pkg.RawValue = $newType(0, $kindStruct, "asn1.RawValue", true, "encoding/asn1", true, function(Class_, Tag_, IsCompound_, Bytes_, FullBytes_) { + this.$val = this; + if (arguments.length === 0) { + this.Class = 0; + this.Tag = 0; + this.IsCompound = false; + this.Bytes = sliceType.nil; + this.FullBytes = sliceType.nil; + return; + } + this.Class = Class_; + this.Tag = Tag_; + this.IsCompound = IsCompound_; + this.Bytes = Bytes_; + this.FullBytes = FullBytes_; + }); + RawContent = $pkg.RawContent = $newType(12, $kindSlice, "asn1.RawContent", true, "encoding/asn1", true, null); + tagAndLength = $pkg.tagAndLength = $newType(0, $kindStruct, "asn1.tagAndLength", true, "encoding/asn1", false, function(class$0_, tag_, length_, isCompound_) { + this.$val = this; + if (arguments.length === 0) { + this.class$0 = 0; + this.tag = 0; + this.length = 0; + this.isCompound = false; + return; + } + this.class$0 = class$0_; + this.tag = tag_; + this.length = length_; + this.isCompound = isCompound_; + }); + fieldParameters = $pkg.fieldParameters = $newType(0, $kindStruct, "asn1.fieldParameters", true, "encoding/asn1", false, function(optional_, explicit_, application_, private$3_, defaultValue_, tag_, stringType_, timeType_, set_, omitEmpty_) { + this.$val = this; + if (arguments.length === 0) { + this.optional = false; + this.explicit = false; + this.application = false; + this.private$3 = false; + this.defaultValue = ptrType$3.nil; + this.tag = ptrType$4.nil; + this.stringType = 0; + this.timeType = 0; + this.set = false; + this.omitEmpty = false; + return; + } + this.optional = optional_; + this.explicit = explicit_; + this.application = application_; + this.private$3 = private$3_; + this.defaultValue = defaultValue_; + this.tag = tag_; + this.stringType = stringType_; + this.timeType = timeType_; + this.set = set_; + this.omitEmpty = omitEmpty_; + }); + encoder = $pkg.encoder = $newType(8, $kindInterface, "asn1.encoder", true, "encoding/asn1", false, null); + byteEncoder = $pkg.byteEncoder = $newType(1, $kindUint8, "asn1.byteEncoder", true, "encoding/asn1", false, null); + bytesEncoder = $pkg.bytesEncoder = $newType(12, $kindSlice, "asn1.bytesEncoder", true, "encoding/asn1", false, null); + stringEncoder = $pkg.stringEncoder = $newType(8, $kindString, "asn1.stringEncoder", true, "encoding/asn1", false, null); + multiEncoder = $pkg.multiEncoder = $newType(12, $kindSlice, "asn1.multiEncoder", true, "encoding/asn1", false, null); + taggedEncoder = $pkg.taggedEncoder = $newType(0, $kindStruct, "asn1.taggedEncoder", true, "encoding/asn1", false, function(scratch_, tag_, body_) { + this.$val = this; + if (arguments.length === 0) { + this.scratch = arrayType$1.zero(); + this.tag = $ifaceNil; + this.body = $ifaceNil; + return; + } + this.scratch = scratch_; + this.tag = tag_; + this.body = body_; + }); + int64Encoder = $pkg.int64Encoder = $newType(8, $kindInt64, "asn1.int64Encoder", true, "encoding/asn1", false, null); + bitStringEncoder = $pkg.bitStringEncoder = $newType(0, $kindStruct, "asn1.bitStringEncoder", true, "encoding/asn1", false, function(Bytes_, BitLength_) { + this.$val = this; + if (arguments.length === 0) { + this.Bytes = sliceType.nil; + this.BitLength = 0; + return; + } + this.Bytes = Bytes_; + this.BitLength = BitLength_; + }); + oidEncoder = $pkg.oidEncoder = $newType(12, $kindSlice, "asn1.oidEncoder", true, "encoding/asn1", false, null); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(time.Location); + ptrType$1 = $ptrType(big.Int); + sliceType$1 = $sliceType($Int); + sliceType$2 = $sliceType($emptyInterface); + ptrType$2 = $ptrType(reflect.rtype); + ptrType$3 = $ptrType($Int64); + ptrType$4 = $ptrType($Int); + sliceType$3 = $sliceType(encoder); + arrayType = $arrayType($Uint8, 4); + arrayType$1 = $arrayType($Uint8, 8); + ptrType$5 = $ptrType(taggedEncoder); + StructuralError.ptr.prototype.Error = function() { + var e; + e = this; + return "asn1: structure error: " + e.Msg; + }; + StructuralError.prototype.Error = function() { return this.$val.Error(); }; + SyntaxError.ptr.prototype.Error = function() { + var e; + e = this; + return "asn1: syntax error: " + e.Msg; + }; + SyntaxError.prototype.Error = function() { return this.$val.Error(); }; + parseBool = function(bytes) { + var _1, bytes, err, ret, x$3, x$4; + ret = false; + err = $ifaceNil; + if (!((bytes.$length === 1))) { + err = (x$3 = new SyntaxError.ptr("invalid boolean"), new x$3.constructor.elem(x$3)); + return [ret, err]; + } + _1 = (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]); + if (_1 === (0)) { + ret = false; + } else if (_1 === (255)) { + ret = true; + } else { + err = (x$4 = new SyntaxError.ptr("invalid boolean"), new x$4.constructor.elem(x$4)); + } + return [ret, err]; + }; + checkInteger = function(bytes) { + var bytes, x$3, x$4; + if (bytes.$length === 0) { + return (x$3 = new StructuralError.ptr("empty integer"), new x$3.constructor.elem(x$3)); + } + if (bytes.$length === 1) { + return $ifaceNil; + } + if ((((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 0) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 0)) || (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 255) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 128))) { + return (x$4 = new StructuralError.ptr("integer not minimally-encoded"), new x$4.constructor.elem(x$4)); + } + return $ifaceNil; + }; + parseInt64 = function(bytes) { + var bytes, bytesRead, err, ret, x$3, x$4; + ret = new $Int64(0, 0); + err = $ifaceNil; + err = checkInteger(bytes); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ret, err]; + } + if (bytes.$length > 8) { + err = (x$3 = new StructuralError.ptr("integer too large"), new x$3.constructor.elem(x$3)); + return [ret, err]; + } + bytesRead = 0; + while (true) { + if (!(bytesRead < bytes.$length)) { break; } + ret = $shiftLeft64(ret, (8)); + ret = (x$4 = (new $Int64(0, ((bytesRead < 0 || bytesRead >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + bytesRead]))), new $Int64(ret.$high | x$4.$high, (ret.$low | x$4.$low) >>> 0)); + bytesRead = bytesRead + (1) >> 0; + } + ret = $shiftLeft64(ret, ((64 - (((bytes.$length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24))); + ret = $shiftRightInt64(ret, ((64 - (((bytes.$length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24))); + return [ret, err]; + }; + parseInt32 = function(bytes) { + var _tuple, bytes, err, err$1, ret64, x$3, x$4; + err = checkInteger(bytes); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [0, err]; + } + _tuple = parseInt64(bytes); + ret64 = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [0, err$1]; + } + if (!((x$3 = (new $Int64(0, (((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)))), (ret64.$high === x$3.$high && ret64.$low === x$3.$low)))) { + return [0, (x$4 = new StructuralError.ptr("integer too large"), new x$4.constructor.elem(x$4))]; + } + return [(((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)), $ifaceNil]; + }; + parseBigInt = function(bytes) { + var _i, _ref, bytes, err, i, notBytes, ret; + err = checkInteger(bytes); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ptrType$1.nil, err]; + } + ret = new big.Int.ptr(false, big.nat.nil); + if (bytes.$length > 0 && ((((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & 128) >>> 0) === 128)) { + notBytes = $makeSlice(sliceType, bytes.$length); + _ref = notBytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= notBytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : notBytes.$array[notBytes.$offset + i] = (~((i < 0 || i >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i]) << 24 >>> 24)); + _i++; + } + ret.SetBytes(notBytes); + ret.Add(ret, bigOne); + ret.Neg(ret); + return [ret, $ifaceNil]; + } + ret.SetBytes(bytes); + return [ret, $ifaceNil]; + }; + BitString.ptr.prototype.At = function(i) { + var _q, _r, b, i, x$3, x$4, y, y$1; + b = this; + if (i < 0 || i >= b.BitLength) { + return 0; + } + x$3 = (_q = i / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + y = 7 - (((_r = i % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)) >>> 0; + return ((((y$1 = y, y$1 < 32 ? ((x$4 = b.Bytes, ((x$3 < 0 || x$3 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$3])) >>> y$1) : 0) << 24 >>> 24) >> 0)) & 1; + }; + BitString.prototype.At = function(i) { return this.$val.At(i); }; + BitString.ptr.prototype.RightAlign = function() { + var _r, a, b, i, shift, x$3, x$4, x$5, x$6, y, y$1, y$2; + b = this; + shift = (((8 - ((_r = b.BitLength % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) >> 0) >>> 0)); + if ((shift === 8) || (b.Bytes.$length === 0)) { + return b.Bytes; + } + a = $makeSlice(sliceType, b.Bytes.$length); + (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0] = ((y = shift, y < 32 ? ((x$3 = b.Bytes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) >>> y) : 0) << 24 >>> 24)); + i = 1; + while (true) { + if (!(i < b.Bytes.$length)) { break; } + ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = ((y$1 = ((8 - shift >>> 0)), y$1 < 32 ? ((x$4 = b.Bytes, x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])) << y$1) : 0) << 24 >>> 24)); + ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = ((((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]) | (((y$2 = shift, y$2 < 32 ? ((x$6 = b.Bytes, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])) >>> y$2) : 0) << 24 >>> 24))) >>> 0)); + i = i + (1) >> 0; + } + return a; + }; + BitString.prototype.RightAlign = function() { return this.$val.RightAlign(); }; + parseBitString = function(bytes) { + var bytes, err, paddingBits, ret, x$3, x$4, x$5, y; + ret = new BitString.ptr(sliceType.nil, 0); + err = $ifaceNil; + if (bytes.$length === 0) { + err = (x$3 = new SyntaxError.ptr("zero length BIT STRING"), new x$3.constructor.elem(x$3)); + return [ret, err]; + } + paddingBits = (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) >> 0)); + if (paddingBits > 7 || (bytes.$length === 1) && paddingBits > 0 || !(((((x$4 = bytes.$length - 1 >> 0, ((x$4 < 0 || x$4 >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + x$4])) & (((((y = (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]), y < 32 ? (1 << y) : 0) << 24 >>> 24)) - 1 << 24 >>> 24))) >>> 0) === 0))) { + err = (x$5 = new SyntaxError.ptr("invalid padding bits in BIT STRING"), new x$5.constructor.elem(x$5)); + return [ret, err]; + } + ret.BitLength = ($imul(((bytes.$length - 1 >> 0)), 8)) - paddingBits >> 0; + ret.Bytes = $subslice(bytes, 1); + return [ret, err]; + }; + ObjectIdentifier.prototype.Equal = function(other) { + var i, oi, other; + oi = this; + if (!((oi.$length === other.$length))) { + return false; + } + i = 0; + while (true) { + if (!(i < oi.$length)) { break; } + if (!((((i < 0 || i >= oi.$length) ? ($throwRuntimeError("index out of range"), undefined) : oi.$array[oi.$offset + i]) === ((i < 0 || i >= other.$length) ? ($throwRuntimeError("index out of range"), undefined) : other.$array[other.$offset + i])))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + $ptrType(ObjectIdentifier).prototype.Equal = function(other) { return this.$get().Equal(other); }; + ObjectIdentifier.prototype.String = function() { + var _i, _ref, i, oi, s, v; + oi = this; + s = ""; + _ref = oi; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + s = s + ("."); + } + s = s + (strconv.Itoa(v)); + _i++; + } + return s; + }; + $ptrType(ObjectIdentifier).prototype.String = function() { return this.$get().String(); }; + parseObjectIdentifier = function(bytes) { + var _q, _r, _tuple, _tuple$1, bytes, err, i, offset, s, v, x$3, x$4; + s = ObjectIdentifier.nil; + err = $ifaceNil; + if (bytes.$length === 0) { + err = (x$3 = new SyntaxError.ptr("zero length OBJECT IDENTIFIER"), new x$3.constructor.elem(x$3)); + return [s, err]; + } + s = (x$4 = $makeSlice(sliceType$1, (bytes.$length + 1 >> 0)), $subslice(new ObjectIdentifier(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)); + _tuple = parseBase128Int(bytes, 0); + v = _tuple[0]; + offset = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [s, err]; + } + if (v < 80) { + (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0] = (_q = v / 40, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1] = (_r = v % 40, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))); + } else { + (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0] = 2); + (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1] = (v - 80 >> 0)); + } + i = 2; + while (true) { + if (!(offset < bytes.$length)) { break; } + _tuple$1 = parseBase128Int(bytes, offset); + v = _tuple$1[0]; + offset = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [s, err]; + } + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = v); + i = i + (1) >> 0; + } + s = $subslice(s, 0, i); + return [s, err]; + }; + parseBase128Int = function(bytes, initOffset) { + var b, bytes, err, initOffset, offset, ret, ret64, shifted, x$3, x$4, x$5, x$6; + ret = 0; + offset = 0; + err = $ifaceNil; + offset = initOffset; + ret64 = new $Int64(0, 0); + shifted = 0; + while (true) { + if (!(offset < bytes.$length)) { break; } + if (shifted === 5) { + err = (x$3 = new StructuralError.ptr("base 128 integer too large"), new x$3.constructor.elem(x$3)); + return [ret, offset, err]; + } + ret64 = $shiftLeft64(ret64, (7)); + b = ((offset < 0 || offset >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + offset]); + ret64 = (x$4 = (new $Int64(0, ((b & 127) >>> 0))), new $Int64(ret64.$high | x$4.$high, (ret64.$low | x$4.$low) >>> 0)); + offset = offset + (1) >> 0; + if (((b & 128) >>> 0) === 0) { + ret = (((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)); + if ((ret64.$high > 0 || (ret64.$high === 0 && ret64.$low > 2147483647))) { + err = (x$5 = new StructuralError.ptr("base 128 integer too large"), new x$5.constructor.elem(x$5)); + } + return [ret, offset, err]; + } + shifted = shifted + (1) >> 0; + } + err = (x$6 = new SyntaxError.ptr("truncated base 128 integer"), new x$6.constructor.elem(x$6)); + return [ret, offset, err]; + }; + parseUTCTime = function(bytes) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, bytes, err, formatStr, ret, s, serialized, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; bytes = $f.bytes; err = $f.err; formatStr = $f.formatStr; ret = $f.ret; s = $f.s; serialized = $f.serialized; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ret = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + err = $ifaceNil; + s = ($bytesToString(bytes)); + formatStr = "0601021504Z0700"; + _r = time.Parse(formatStr, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + time.Time.copy(ret, _tuple[0]); + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + formatStr = "060102150405Z0700"; + _r$1 = time.Parse(formatStr, s); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + time.Time.copy(ret, _tuple$1[0]); + err = _tuple$1[1]; + /* } */ case 3: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ret, err]; + } + _r$2 = $clone(ret, time.Time).Format(formatStr); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + serialized = _r$2; + /* */ if (!(serialized === s)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(serialized === s)) { */ case 6: + _r$3 = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", new sliceType$2([new $String(s), new $String(serialized)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + $s = -1; return [ret, err]; + /* } */ case 7: + _r$4 = $clone(ret, time.Time).Year(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4 >= 2050) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_r$4 >= 2050) { */ case 9: + _r$5 = $clone(ret, time.Time).AddDate(-100, 0, 0); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + time.Time.copy(ret, _r$5); + /* } */ case 10: + $s = -1; return [ret, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseUTCTime }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.bytes = bytes; $f.err = err; $f.formatStr = formatStr; $f.ret = ret; $f.s = s; $f.serialized = serialized; $f.$s = $s; $f.$r = $r; return $f; + }; + parseGeneralizedTime = function(bytes) { + var _r, _r$1, _r$2, _tuple, bytes, err, ret, s, serialized, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; bytes = $f.bytes; err = $f.err; ret = $f.ret; s = $f.s; serialized = $f.serialized; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ret = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + err = $ifaceNil; + s = ($bytesToString(bytes)); + _r = time.Parse("20060102150405Z0700", s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + time.Time.copy(ret, _tuple[0]); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ret, err]; + } + _r$1 = $clone(ret, time.Time).Format("20060102150405Z0700"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + serialized = _r$1; + /* */ if (!(serialized === s)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(serialized === s)) { */ case 3: + _r$2 = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", new sliceType$2([new $String(s), new $String(serialized)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + /* } */ case 4: + $s = -1; return [ret, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseGeneralizedTime }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.bytes = bytes; $f.err = err; $f.ret = ret; $f.s = s; $f.serialized = serialized; $f.$s = $s; $f.$r = $r; return $f; + }; + parseNumericString = function(bytes) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, b, bytes, err, ret, x$3; + ret = ""; + err = $ifaceNil; + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!isNumeric(b)) { + _tmp = ""; + _tmp$1 = (x$3 = new SyntaxError.ptr("NumericString contains invalid character"), new x$3.constructor.elem(x$3)); + ret = _tmp; + err = _tmp$1; + return [ret, err]; + } + _i++; + } + _tmp$2 = ($bytesToString(bytes)); + _tmp$3 = $ifaceNil; + ret = _tmp$2; + err = _tmp$3; + return [ret, err]; + }; + isNumeric = function(b) { + var b; + return 48 <= b && b <= 57 || (b === 32); + }; + parsePrintableString = function(bytes) { + var _i, _ref, b, bytes, err, ret, x$3; + ret = ""; + err = $ifaceNil; + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!isPrintable(b, true, true)) { + err = (x$3 = new SyntaxError.ptr("PrintableString contains invalid character"), new x$3.constructor.elem(x$3)); + return [ret, err]; + } + _i++; + } + ret = ($bytesToString(bytes)); + return [ret, err]; + }; + isPrintable = function(b, asterisk, ampersand) { + var ampersand, asterisk, b; + return 97 <= b && b <= 122 || 65 <= b && b <= 90 || 48 <= b && b <= 57 || 39 <= b && b <= 41 || 43 <= b && b <= 47 || (b === 32) || (b === 58) || (b === 61) || (b === 63) || ((asterisk) && (b === 42)) || ((ampersand) && (b === 38)); + }; + parseIA5String = function(bytes) { + var _i, _ref, b, bytes, err, ret, x$3; + ret = ""; + err = $ifaceNil; + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (b >= 128) { + err = (x$3 = new SyntaxError.ptr("IA5String contains invalid character"), new x$3.constructor.elem(x$3)); + return [ret, err]; + } + _i++; + } + ret = ($bytesToString(bytes)); + return [ret, err]; + }; + parseT61String = function(bytes) { + var _tmp, _tmp$1, bytes, err, ret; + ret = ""; + err = $ifaceNil; + _tmp = ($bytesToString(bytes)); + _tmp$1 = $ifaceNil; + ret = _tmp; + err = _tmp$1; + return [ret, err]; + }; + parseUTF8String = function(bytes) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, bytes, err, ret; + ret = ""; + err = $ifaceNil; + if (!utf8.Valid(bytes)) { + _tmp = ""; + _tmp$1 = errors.New("asn1: invalid UTF-8 string"); + ret = _tmp; + err = _tmp$1; + return [ret, err]; + } + _tmp$2 = ($bytesToString(bytes)); + _tmp$3 = $ifaceNil; + ret = _tmp$2; + err = _tmp$3; + return [ret, err]; + }; + parseTagAndLength = function(bytes, initOffset) { + var _tuple, b, bytes, err, i, initOffset, numBytes, offset, ret, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; + ret = new tagAndLength.ptr(0, 0, 0, false); + offset = 0; + err = $ifaceNil; + offset = initOffset; + if (offset >= bytes.$length) { + err = errors.New("asn1: internal error in parseTagAndLength"); + return [ret, offset, err]; + } + b = ((offset < 0 || offset >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + offset]); + offset = offset + (1) >> 0; + ret.class$0 = (((b >>> 6 << 24 >>> 24) >> 0)); + ret.isCompound = ((b & 32) >>> 0) === 32; + ret.tag = ((((b & 31) >>> 0) >> 0)); + if (ret.tag === 31) { + _tuple = parseBase128Int(bytes, offset); + ret.tag = _tuple[0]; + offset = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ret, offset, err]; + } + if (ret.tag < 31) { + err = (x$3 = new SyntaxError.ptr("non-minimal tag"), new x$3.constructor.elem(x$3)); + return [ret, offset, err]; + } + } + if (offset >= bytes.$length) { + err = (x$4 = new SyntaxError.ptr("truncated tag or length"), new x$4.constructor.elem(x$4)); + return [ret, offset, err]; + } + b = ((offset < 0 || offset >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + offset]); + offset = offset + (1) >> 0; + if (((b & 128) >>> 0) === 0) { + ret.length = ((((b & 127) >>> 0) >> 0)); + } else { + numBytes = ((((b & 127) >>> 0) >> 0)); + if (numBytes === 0) { + err = (x$5 = new SyntaxError.ptr("indefinite length found (not DER)"), new x$5.constructor.elem(x$5)); + return [ret, offset, err]; + } + ret.length = 0; + i = 0; + while (true) { + if (!(i < numBytes)) { break; } + if (offset >= bytes.$length) { + err = (x$6 = new SyntaxError.ptr("truncated tag or length"), new x$6.constructor.elem(x$6)); + return [ret, offset, err]; + } + b = ((offset < 0 || offset >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + offset]); + offset = offset + (1) >> 0; + if (ret.length >= 8388608) { + err = (x$7 = new StructuralError.ptr("length too large"), new x$7.constructor.elem(x$7)); + return [ret, offset, err]; + } + ret.length = (y = (8), y < 32 ? (ret.length << y) : 0) >> 0; + ret.length = ret.length | (((b >> 0))); + if (ret.length === 0) { + err = (x$8 = new StructuralError.ptr("superfluous leading zeros in length"), new x$8.constructor.elem(x$8)); + return [ret, offset, err]; + } + i = i + (1) >> 0; + } + if (ret.length < 128) { + err = (x$9 = new StructuralError.ptr("non-minimal length"), new x$9.constructor.elem(x$9)); + return [ret, offset, err]; + } + } + return [ret, offset, err]; + }; + parseSequenceOf = function(bytes, sliceType$3, elemType) { + var _1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, bytes, compoundType, elemType, err, expectedTag, i, matchAny, numElements, offset, offset$1, ok, params, ret, sliceType$3, t, x$3, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; bytes = $f.bytes; compoundType = $f.compoundType; elemType = $f.elemType; err = $f.err; expectedTag = $f.expectedTag; i = $f.i; matchAny = $f.matchAny; numElements = $f.numElements; offset = $f.offset; offset$1 = $f.offset$1; ok = $f.ok; params = $f.params; ret = $f.ret; sliceType$3 = $f.sliceType$3; t = $f.t; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ret = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + err = $ifaceNil; + _r = getUniversalType(elemType); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + matchAny = _tuple[0]; + expectedTag = _tuple[1]; + compoundType = _tuple[2]; + ok = _tuple[3]; + if (!ok) { + err = (x$3 = new StructuralError.ptr("unknown Go type for slice"), new x$3.constructor.elem(x$3)); + $s = -1; return [ret, err]; + } + numElements = 0; + offset = 0; + while (true) { + if (!(offset < bytes.$length)) { break; } + t = new tagAndLength.ptr(0, 0, 0, false); + _tuple$1 = parseTagAndLength(bytes, offset); + tagAndLength.copy(t, _tuple$1[0]); + offset = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ret, err]; + } + _1 = t.tag; + if ((_1 === (22)) || (_1 === (27)) || (_1 === (20)) || (_1 === (12)) || (_1 === (18))) { + t.tag = 19; + } else if ((_1 === (24)) || (_1 === (23))) { + t.tag = 23; + } + if (!matchAny && (!((t.class$0 === 0)) || !(t.isCompound === compoundType) || !((t.tag === expectedTag)))) { + err = (x$4 = new StructuralError.ptr("sequence tag mismatch"), new x$4.constructor.elem(x$4)); + $s = -1; return [ret, err]; + } + if (invalidLength(offset, t.length, bytes.$length)) { + err = (x$5 = new SyntaxError.ptr("truncated sequence"), new x$5.constructor.elem(x$5)); + $s = -1; return [ret, err]; + } + offset = offset + (t.length) >> 0; + numElements = numElements + (1) >> 0; + } + _r$1 = reflect.MakeSlice(sliceType$3, numElements, numElements); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ret = _r$1; + params = new fieldParameters.ptr(false, false, false, false, ptrType$3.nil, ptrType$4.nil, 0, 0, false, false); + offset$1 = 0; + i = 0; + /* while (true) { */ case 3: + /* if (!(i < numElements)) { break; } */ if(!(i < numElements)) { $s = 4; continue; } + _r$2 = $clone(ret, reflect.Value).Index(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = parseField($clone(_r$2, reflect.Value), bytes, offset$1, $clone(params, fieldParameters)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + offset$1 = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ret, err]; + } + i = i + (1) >> 0; + /* } */ $s = 3; continue; case 4: + $s = -1; return [ret, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseSequenceOf }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.bytes = bytes; $f.compoundType = compoundType; $f.elemType = elemType; $f.err = err; $f.expectedTag = expectedTag; $f.i = i; $f.matchAny = matchAny; $f.numElements = numElements; $f.offset = offset; $f.offset$1 = offset$1; $f.ok = ok; $f.params = params; $f.ret = ret; $f.sliceType$3 = sliceType$3; $f.t = t; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + invalidLength = function(offset, length, sliceLength) { + var length, offset, sliceLength; + return (offset + length >> 0) < offset || (offset + length >> 0) > sliceLength; + }; + parseField = function(v, bytes, initOffset, params) { + var _1, _2, _3, _4, _5, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, _v$1, bs, bytes, bytes$1, compoundType, err, err1, err1$1, err1$2, err1$3, err1$4, err1$5, err1$6, err1$7, err1$8, expectedClass, expectedClass$1, expectedTag, field, fieldType, i, i$1, ifaceType, initOffset, innerBytes, innerBytes$1, innerOffset, matchAny, matchAnyClassAndTag, newSlice, newSlice$1, offset, ok, ok$1, ok1, params, parsedBool, parsedInt, parsedInt$1, parsedInt$2, parsedInt$3, result, result$1, sliceType$3, structType, t, t$1, time$1, universalTag, v, v$1, val, x$10, x$11, x$12, x$13, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _3 = $f._3; _4 = $f._4; _5 = $f._5; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$10 = $f._arg$10; _arg$11 = $f._arg$11; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _arg$5 = $f._arg$5; _arg$6 = $f._arg$6; _arg$7 = $f._arg$7; _arg$8 = $f._arg$8; _arg$9 = $f._arg$9; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$27 = $f._r$27; _r$28 = $f._r$28; _r$29 = $f._r$29; _r$3 = $f._r$3; _r$30 = $f._r$30; _r$31 = $f._r$31; _r$32 = $f._r$32; _r$33 = $f._r$33; _r$34 = $f._r$34; _r$35 = $f._r$35; _r$36 = $f._r$36; _r$37 = $f._r$37; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$11 = $f._tuple$11; _tuple$12 = $f._tuple$12; _tuple$13 = $f._tuple$13; _tuple$14 = $f._tuple$14; _tuple$15 = $f._tuple$15; _tuple$16 = $f._tuple$16; _tuple$17 = $f._tuple$17; _tuple$18 = $f._tuple$18; _tuple$19 = $f._tuple$19; _tuple$2 = $f._tuple$2; _tuple$20 = $f._tuple$20; _tuple$21 = $f._tuple$21; _tuple$22 = $f._tuple$22; _tuple$23 = $f._tuple$23; _tuple$24 = $f._tuple$24; _tuple$25 = $f._tuple$25; _tuple$26 = $f._tuple$26; _tuple$27 = $f._tuple$27; _tuple$28 = $f._tuple$28; _tuple$29 = $f._tuple$29; _tuple$3 = $f._tuple$3; _tuple$30 = $f._tuple$30; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; _v = $f._v; _v$1 = $f._v$1; bs = $f.bs; bytes = $f.bytes; bytes$1 = $f.bytes$1; compoundType = $f.compoundType; err = $f.err; err1 = $f.err1; err1$1 = $f.err1$1; err1$2 = $f.err1$2; err1$3 = $f.err1$3; err1$4 = $f.err1$4; err1$5 = $f.err1$5; err1$6 = $f.err1$6; err1$7 = $f.err1$7; err1$8 = $f.err1$8; expectedClass = $f.expectedClass; expectedClass$1 = $f.expectedClass$1; expectedTag = $f.expectedTag; field = $f.field; fieldType = $f.fieldType; i = $f.i; i$1 = $f.i$1; ifaceType = $f.ifaceType; initOffset = $f.initOffset; innerBytes = $f.innerBytes; innerBytes$1 = $f.innerBytes$1; innerOffset = $f.innerOffset; matchAny = $f.matchAny; matchAnyClassAndTag = $f.matchAnyClassAndTag; newSlice = $f.newSlice; newSlice$1 = $f.newSlice$1; offset = $f.offset; ok = $f.ok; ok$1 = $f.ok$1; ok1 = $f.ok1; params = $f.params; parsedBool = $f.parsedBool; parsedInt = $f.parsedInt; parsedInt$1 = $f.parsedInt$1; parsedInt$2 = $f.parsedInt$2; parsedInt$3 = $f.parsedInt$3; result = $f.result; result$1 = $f.result$1; sliceType$3 = $f.sliceType$3; structType = $f.structType; t = $f.t; t$1 = $f.t$1; time$1 = $f.time$1; universalTag = $f.universalTag; v = $f.v; v$1 = $f.v$1; val = $f.val; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$13 = $f.x$13; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + offset = 0; + err = $ifaceNil; + offset = initOffset; + fieldType = $clone(v, reflect.Value).Type(); + if (offset === bytes.$length) { + if (!setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters))) { + err = (x$3 = new SyntaxError.ptr("sequence truncated"), new x$3.constructor.elem(x$3)); + } + $s = -1; return [offset, err]; + } + ifaceType = fieldType; + _r = ifaceType.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + if (!(_r === 20)) { _v = false; $s = 3; continue s; } + _r$1 = ifaceType.NumMethod(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1 === 0; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + t = new tagAndLength.ptr(0, 0, 0, false); + _tuple = parseTagAndLength(bytes, offset); + tagAndLength.copy(t, _tuple[0]); + offset = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [offset, err]; + } + if (invalidLength(offset, t.length, bytes.$length)) { + err = (x$4 = new SyntaxError.ptr("data truncated"), new x$4.constructor.elem(x$4)); + $s = -1; return [offset, err]; + } + result = $ifaceNil; + /* */ if (!t.isCompound && (t.class$0 === 0)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!t.isCompound && (t.class$0 === 0)) { */ case 6: + innerBytes = $subslice(bytes, offset, (offset + t.length >> 0)); + _1 = t.tag; + /* */ if (_1 === (19)) { $s = 9; continue; } + /* */ if (_1 === (18)) { $s = 10; continue; } + /* */ if (_1 === (22)) { $s = 11; continue; } + /* */ if (_1 === (20)) { $s = 12; continue; } + /* */ if (_1 === (12)) { $s = 13; continue; } + /* */ if (_1 === (2)) { $s = 14; continue; } + /* */ if (_1 === (3)) { $s = 15; continue; } + /* */ if (_1 === (6)) { $s = 16; continue; } + /* */ if (_1 === (23)) { $s = 17; continue; } + /* */ if (_1 === (24)) { $s = 18; continue; } + /* */ if (_1 === (4)) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (_1 === (19)) { */ case 9: + _tuple$1 = parsePrintableString(innerBytes); + result = new $String(_tuple$1[0]); + err = _tuple$1[1]; + $s = 20; continue; + /* } else if (_1 === (18)) { */ case 10: + _tuple$2 = parseNumericString(innerBytes); + result = new $String(_tuple$2[0]); + err = _tuple$2[1]; + $s = 20; continue; + /* } else if (_1 === (22)) { */ case 11: + _tuple$3 = parseIA5String(innerBytes); + result = new $String(_tuple$3[0]); + err = _tuple$3[1]; + $s = 20; continue; + /* } else if (_1 === (20)) { */ case 12: + _tuple$4 = parseT61String(innerBytes); + result = new $String(_tuple$4[0]); + err = _tuple$4[1]; + $s = 20; continue; + /* } else if (_1 === (12)) { */ case 13: + _tuple$5 = parseUTF8String(innerBytes); + result = new $String(_tuple$5[0]); + err = _tuple$5[1]; + $s = 20; continue; + /* } else if (_1 === (2)) { */ case 14: + _tuple$6 = parseInt64(innerBytes); + result = _tuple$6[0]; + err = _tuple$6[1]; + $s = 20; continue; + /* } else if (_1 === (3)) { */ case 15: + _tuple$7 = parseBitString(innerBytes); + result = new _tuple$7[0].constructor.elem(_tuple$7[0]); + err = _tuple$7[1]; + $s = 20; continue; + /* } else if (_1 === (6)) { */ case 16: + _tuple$8 = parseObjectIdentifier(innerBytes); + result = _tuple$8[0]; + err = _tuple$8[1]; + $s = 20; continue; + /* } else if (_1 === (23)) { */ case 17: + _r$2 = parseUTCTime(innerBytes); /* */ $s = 21; case 21: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$9 = _r$2; + result = new _tuple$9[0].constructor.elem(_tuple$9[0]); + err = _tuple$9[1]; + $s = 20; continue; + /* } else if (_1 === (24)) { */ case 18: + _r$3 = parseGeneralizedTime(innerBytes); /* */ $s = 22; case 22: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$10 = _r$3; + result = new _tuple$10[0].constructor.elem(_tuple$10[0]); + err = _tuple$10[1]; + $s = 20; continue; + /* } else if (_1 === (4)) { */ case 19: + result = innerBytes; + /* } */ case 20: + case 8: + /* } */ case 7: + offset = offset + (t.length) >> 0; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [offset, err]; + } + /* */ if (!($interfaceIsEqual(result, $ifaceNil))) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!($interfaceIsEqual(result, $ifaceNil))) { */ case 23: + _r$4 = reflect.ValueOf(result); /* */ $s = 25; case 25: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$4, reflect.Value)); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 24: + $s = -1; return [offset, err]; + /* } */ case 2: + _tuple$11 = parseTagAndLength(bytes, offset); + t$1 = $clone(_tuple$11[0], tagAndLength); + offset = _tuple$11[1]; + err = _tuple$11[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [offset, err]; + } + if (params.explicit) { + expectedClass = 2; + if (params.application) { + expectedClass = 1; + } + if (offset === bytes.$length) { + err = (x$5 = new StructuralError.ptr("explicit tag has no child"), new x$5.constructor.elem(x$5)); + $s = -1; return [offset, err]; + } + if ((t$1.class$0 === expectedClass) && (t$1.tag === params.tag.$get()) && ((t$1.length === 0) || t$1.isCompound)) { + if ($interfaceIsEqual(fieldType, rawValueType)) { + } else if (t$1.length > 0) { + _tuple$12 = parseTagAndLength(bytes, offset); + tagAndLength.copy(t$1, _tuple$12[0]); + offset = _tuple$12[1]; + err = _tuple$12[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [offset, err]; + } + } else { + if (!($interfaceIsEqual(fieldType, flagType))) { + err = (x$6 = new StructuralError.ptr("zero length explicit tag was not an asn1.Flag"), new x$6.constructor.elem(x$6)); + $s = -1; return [offset, err]; + } + $clone(v, reflect.Value).SetBool(true); + $s = -1; return [offset, err]; + } + } else { + ok = setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters)); + if (ok) { + offset = initOffset; + } else { + err = (x$7 = new StructuralError.ptr("explicitly tagged member didn't match"), new x$7.constructor.elem(x$7)); + } + $s = -1; return [offset, err]; + } + } + _r$5 = getUniversalType(fieldType); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$13 = _r$5; + matchAny = _tuple$13[0]; + universalTag = _tuple$13[1]; + compoundType = _tuple$13[2]; + ok1 = _tuple$13[3]; + /* */ if (!ok1) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (!ok1) { */ case 28: + _r$6 = fmt.Sprintf("unknown Go type: %v", new sliceType$2([fieldType])); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err = (x$8 = new StructuralError.ptr(_r$6), new x$8.constructor.elem(x$8)); + $s = -1; return [offset, err]; + /* } */ case 29: + if (universalTag === 19) { + if (t$1.class$0 === 0) { + _2 = t$1.tag; + if ((_2 === (22)) || (_2 === (27)) || (_2 === (20)) || (_2 === (12)) || (_2 === (18))) { + universalTag = t$1.tag; + } + } else if (!((params.stringType === 0))) { + universalTag = params.stringType; + } + } + if ((universalTag === 23) && (t$1.tag === 24) && (t$1.class$0 === 0)) { + universalTag = 24; + } + if (params.set) { + universalTag = 17; + } + matchAnyClassAndTag = matchAny; + expectedClass$1 = 0; + expectedTag = universalTag; + if (!params.explicit && !(params.tag === ptrType$4.nil)) { + expectedClass$1 = 2; + expectedTag = params.tag.$get(); + matchAnyClassAndTag = false; + } + if (!params.explicit && params.application && !(params.tag === ptrType$4.nil)) { + expectedClass$1 = 1; + expectedTag = params.tag.$get(); + matchAnyClassAndTag = false; + } + if (!params.explicit && params.private$3 && !(params.tag === ptrType$4.nil)) { + expectedClass$1 = 3; + expectedTag = params.tag.$get(); + matchAnyClassAndTag = false; + } + /* */ if (!matchAnyClassAndTag && (!((t$1.class$0 === expectedClass$1)) || !((t$1.tag === expectedTag))) || (!matchAny && !(t$1.isCompound === compoundType))) { $s = 31; continue; } + /* */ $s = 32; continue; + /* if (!matchAnyClassAndTag && (!((t$1.class$0 === expectedClass$1)) || !((t$1.tag === expectedTag))) || (!matchAny && !(t$1.isCompound === compoundType))) { */ case 31: + ok$1 = setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters)); + /* */ if (ok$1) { $s = 33; continue; } + /* */ $s = 34; continue; + /* if (ok$1) { */ case 33: + offset = initOffset; + $s = 35; continue; + /* } else { */ case 34: + _arg = new $Int(expectedTag); + _arg$1 = new t$1.constructor.elem(t$1); + _arg$2 = new params.constructor.elem(params); + _r$7 = fieldType.Name(); /* */ $s = 36; case 36: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _arg$3 = new $String(_r$7); + _arg$4 = new $Int(offset); + _r$8 = fmt.Sprintf("tags don't match (%d vs %+v) %+v %s @%d", new sliceType$2([_arg, _arg$1, _arg$2, _arg$3, _arg$4])); /* */ $s = 37; case 37: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err = (x$9 = new StructuralError.ptr(_r$8), new x$9.constructor.elem(x$9)); + /* } */ case 35: + $s = -1; return [offset, err]; + /* } */ case 32: + if (invalidLength(offset, t$1.length, bytes.$length)) { + err = (x$10 = new SyntaxError.ptr("data truncated"), new x$10.constructor.elem(x$10)); + $s = -1; return [offset, err]; + } + innerBytes$1 = $subslice(bytes, offset, (offset + t$1.length >> 0)); + offset = offset + (t$1.length) >> 0; + _3 = fieldType; + /* */ if ($interfaceIsEqual(_3, (rawValueType))) { $s = 39; continue; } + /* */ if ($interfaceIsEqual(_3, (objectIdentifierType))) { $s = 40; continue; } + /* */ if ($interfaceIsEqual(_3, (bitStringType))) { $s = 41; continue; } + /* */ if ($interfaceIsEqual(_3, (timeType))) { $s = 42; continue; } + /* */ if ($interfaceIsEqual(_3, (enumeratedType))) { $s = 43; continue; } + /* */ if ($interfaceIsEqual(_3, (flagType))) { $s = 44; continue; } + /* */ if ($interfaceIsEqual(_3, (bigIntType))) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if ($interfaceIsEqual(_3, (rawValueType))) { */ case 39: + result$1 = new RawValue.ptr(t$1.class$0, t$1.tag, t$1.isCompound, innerBytes$1, $subslice(bytes, initOffset, offset)); + _r$9 = reflect.ValueOf(new result$1.constructor.elem(result$1)); /* */ $s = 47; case 47: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (objectIdentifierType))) { */ case 40: + _tuple$14 = parseObjectIdentifier(innerBytes$1); + newSlice = _tuple$14[0]; + err1 = _tuple$14[1]; + _r$10 = reflect.MakeSlice($clone(v, reflect.Value).Type(), newSlice.$length, newSlice.$length); /* */ $s = 49; case 49: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$10, reflect.Value)); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if ($interfaceIsEqual(err1, $ifaceNil)) { $s = 51; continue; } + /* */ $s = 52; continue; + /* if ($interfaceIsEqual(err1, $ifaceNil)) { */ case 51: + _arg$5 = $clone(v, reflect.Value); + _r$11 = reflect.ValueOf(newSlice); /* */ $s = 53; case 53: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _arg$6 = $clone(_r$11, reflect.Value); + _r$12 = reflect.Copy(_arg$5, _arg$6); /* */ $s = 54; case 54: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + /* } */ case 52: + err = err1; + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (bitStringType))) { */ case 41: + _tuple$15 = parseBitString(innerBytes$1); + bs = $clone(_tuple$15[0], BitString); + err1$1 = _tuple$15[1]; + /* */ if ($interfaceIsEqual(err1$1, $ifaceNil)) { $s = 55; continue; } + /* */ $s = 56; continue; + /* if ($interfaceIsEqual(err1$1, $ifaceNil)) { */ case 55: + _r$13 = reflect.ValueOf(new bs.constructor.elem(bs)); /* */ $s = 57; case 57: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$13, reflect.Value)); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 56: + err = err1$1; + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (timeType))) { */ case 42: + time$1 = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + err1$2 = $ifaceNil; + /* */ if (universalTag === 23) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (universalTag === 23) { */ case 59: + _r$14 = parseUTCTime(innerBytes$1); /* */ $s = 62; case 62: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$16 = _r$14; + time.Time.copy(time$1, _tuple$16[0]); + err1$2 = _tuple$16[1]; + $s = 61; continue; + /* } else { */ case 60: + _r$15 = parseGeneralizedTime(innerBytes$1); /* */ $s = 63; case 63: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$17 = _r$15; + time.Time.copy(time$1, _tuple$17[0]); + err1$2 = _tuple$17[1]; + /* } */ case 61: + /* */ if ($interfaceIsEqual(err1$2, $ifaceNil)) { $s = 64; continue; } + /* */ $s = 65; continue; + /* if ($interfaceIsEqual(err1$2, $ifaceNil)) { */ case 64: + _r$16 = reflect.ValueOf(new time$1.constructor.elem(time$1)); /* */ $s = 66; case 66: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$16, reflect.Value)); /* */ $s = 67; case 67: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 65: + err = err1$2; + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (enumeratedType))) { */ case 43: + _tuple$18 = parseInt32(innerBytes$1); + parsedInt = _tuple$18[0]; + err1$3 = _tuple$18[1]; + if ($interfaceIsEqual(err1$3, $ifaceNil)) { + $clone(v, reflect.Value).SetInt((new $Int64(0, parsedInt))); + } + err = err1$3; + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (flagType))) { */ case 44: + $clone(v, reflect.Value).SetBool(true); + $s = -1; return [offset, err]; + /* } else if ($interfaceIsEqual(_3, (bigIntType))) { */ case 45: + _tuple$19 = parseBigInt(innerBytes$1); + parsedInt$1 = _tuple$19[0]; + err1$4 = _tuple$19[1]; + /* */ if ($interfaceIsEqual(err1$4, $ifaceNil)) { $s = 68; continue; } + /* */ $s = 69; continue; + /* if ($interfaceIsEqual(err1$4, $ifaceNil)) { */ case 68: + _r$17 = reflect.ValueOf(parsedInt$1); /* */ $s = 70; case 70: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + $r = $clone(v, reflect.Value).Set($clone(_r$17, reflect.Value)); /* */ $s = 71; case 71: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 69: + err = err1$4; + $s = -1; return [offset, err]; + /* } */ case 46: + case 38: + val = v; + _4 = $clone(val, reflect.Value).Kind(); + /* */ if (_4 === (1)) { $s = 73; continue; } + /* */ if ((_4 === (2)) || (_4 === (5)) || (_4 === (6))) { $s = 74; continue; } + /* */ if (_4 === (25)) { $s = 75; continue; } + /* */ if (_4 === (23)) { $s = 76; continue; } + /* */ if (_4 === (24)) { $s = 77; continue; } + /* */ $s = 78; continue; + /* if (_4 === (1)) { */ case 73: + _tuple$20 = parseBool(innerBytes$1); + parsedBool = _tuple$20[0]; + err1$5 = _tuple$20[1]; + if ($interfaceIsEqual(err1$5, $ifaceNil)) { + $clone(val, reflect.Value).SetBool(parsedBool); + } + err = err1$5; + $s = -1; return [offset, err]; + /* } else if ((_4 === (2)) || (_4 === (5)) || (_4 === (6))) { */ case 74: + _r$18 = $clone(val, reflect.Value).Type().Size(); /* */ $s = 82; case 82: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + /* */ if (_r$18 === 4) { $s = 79; continue; } + /* */ $s = 80; continue; + /* if (_r$18 === 4) { */ case 79: + _tuple$21 = parseInt32(innerBytes$1); + parsedInt$2 = _tuple$21[0]; + err1$6 = _tuple$21[1]; + if ($interfaceIsEqual(err1$6, $ifaceNil)) { + $clone(val, reflect.Value).SetInt((new $Int64(0, parsedInt$2))); + } + err = err1$6; + $s = 81; continue; + /* } else { */ case 80: + _tuple$22 = parseInt64(innerBytes$1); + parsedInt$3 = _tuple$22[0]; + err1$7 = _tuple$22[1]; + if ($interfaceIsEqual(err1$7, $ifaceNil)) { + $clone(val, reflect.Value).SetInt(parsedInt$3); + } + err = err1$7; + /* } */ case 81: + $s = -1; return [offset, err]; + /* } else if (_4 === (25)) { */ case 75: + structType = fieldType; + i = 0; + /* while (true) { */ case 83: + _r$19 = structType.NumField(); /* */ $s = 85; case 85: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + /* if (!(i < _r$19)) { break; } */ if(!(i < _r$19)) { $s = 84; continue; } + _r$20 = structType.Field(i); /* */ $s = 88; case 88: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + /* */ if (!(_r$20.PkgPath === "")) { $s = 86; continue; } + /* */ $s = 87; continue; + /* if (!(_r$20.PkgPath === "")) { */ case 86: + err = (x$11 = new StructuralError.ptr("struct contains unexported fields"), new x$11.constructor.elem(x$11)); + $s = -1; return [offset, err]; + /* } */ case 87: + i = i + (1) >> 0; + /* } */ $s = 83; continue; case 84: + _r$21 = structType.NumField(); /* */ $s = 92; case 92: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + if (!(_r$21 > 0)) { _v$1 = false; $s = 91; continue s; } + _r$22 = structType.Field(0); /* */ $s = 93; case 93: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _v$1 = $interfaceIsEqual(_r$22.Type, rawContentsType); case 91: + /* */ if (_v$1) { $s = 89; continue; } + /* */ $s = 90; continue; + /* if (_v$1) { */ case 89: + bytes$1 = $subslice(bytes, initOffset, offset); + _r$23 = $clone(val, reflect.Value).Field(0); /* */ $s = 94; case 94: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _r$24 = reflect.ValueOf(($subslice(new RawContent(bytes$1.$array), bytes$1.$offset, bytes$1.$offset + bytes$1.$length))); /* */ $s = 95; case 95: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + $r = $clone(_r$23, reflect.Value).Set($clone(_r$24, reflect.Value)); /* */ $s = 96; case 96: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 90: + innerOffset = 0; + i$1 = 0; + /* while (true) { */ case 97: + _r$25 = structType.NumField(); /* */ $s = 99; case 99: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + /* if (!(i$1 < _r$25)) { break; } */ if(!(i$1 < _r$25)) { $s = 98; continue; } + _r$26 = structType.Field(i$1); /* */ $s = 100; case 100: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + field = $clone(_r$26, reflect.StructField); + /* */ if ((i$1 === 0) && $interfaceIsEqual(field.Type, rawContentsType)) { $s = 101; continue; } + /* */ $s = 102; continue; + /* if ((i$1 === 0) && $interfaceIsEqual(field.Type, rawContentsType)) { */ case 101: + i$1 = i$1 + (1) >> 0; + /* continue; */ $s = 97; continue; + /* } */ case 102: + _r$27 = $clone(val, reflect.Value).Field(i$1); /* */ $s = 103; case 103: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } + _r$28 = parseField($clone(_r$27, reflect.Value), innerBytes$1, innerOffset, $clone(parseFieldParameters(new reflect.StructTag(field.Tag).Get("asn1")), fieldParameters)); /* */ $s = 104; case 104: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } + _tuple$23 = _r$28; + innerOffset = _tuple$23[0]; + err = _tuple$23[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [offset, err]; + } + i$1 = i$1 + (1) >> 0; + /* } */ $s = 97; continue; case 98: + $s = -1; return [offset, err]; + /* } else if (_4 === (23)) { */ case 76: + sliceType$3 = fieldType; + _r$29 = sliceType$3.Elem(); /* */ $s = 107; case 107: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } + _r$30 = _r$29.Kind(); /* */ $s = 108; case 108: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } + /* */ if (_r$30 === 8) { $s = 105; continue; } + /* */ $s = 106; continue; + /* if (_r$30 === 8) { */ case 105: + _r$31 = reflect.MakeSlice(sliceType$3, innerBytes$1.$length, innerBytes$1.$length); /* */ $s = 109; case 109: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } + $r = $clone(val, reflect.Value).Set($clone(_r$31, reflect.Value)); /* */ $s = 110; case 110: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _arg$7 = $clone(val, reflect.Value); + _r$32 = reflect.ValueOf(innerBytes$1); /* */ $s = 111; case 111: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } + _arg$8 = $clone(_r$32, reflect.Value); + _r$33 = reflect.Copy(_arg$7, _arg$8); /* */ $s = 112; case 112: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } + _r$33; + $s = -1; return [offset, err]; + /* } */ case 106: + _arg$9 = innerBytes$1; + _arg$10 = sliceType$3; + _r$34 = sliceType$3.Elem(); /* */ $s = 113; case 113: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } + _arg$11 = _r$34; + _r$35 = parseSequenceOf(_arg$9, _arg$10, _arg$11); /* */ $s = 114; case 114: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } + _tuple$24 = _r$35; + newSlice$1 = _tuple$24[0]; + err1$8 = _tuple$24[1]; + /* */ if ($interfaceIsEqual(err1$8, $ifaceNil)) { $s = 115; continue; } + /* */ $s = 116; continue; + /* if ($interfaceIsEqual(err1$8, $ifaceNil)) { */ case 115: + $r = $clone(val, reflect.Value).Set($clone(newSlice$1, reflect.Value)); /* */ $s = 117; case 117: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 116: + err = err1$8; + $s = -1; return [offset, err]; + /* } else if (_4 === (24)) { */ case 77: + v$1 = ""; + _5 = universalTag; + /* */ if (_5 === (19)) { $s = 119; continue; } + /* */ if (_5 === (18)) { $s = 120; continue; } + /* */ if (_5 === (22)) { $s = 121; continue; } + /* */ if (_5 === (20)) { $s = 122; continue; } + /* */ if (_5 === (12)) { $s = 123; continue; } + /* */ if (_5 === (27)) { $s = 124; continue; } + /* */ $s = 125; continue; + /* if (_5 === (19)) { */ case 119: + _tuple$25 = parsePrintableString(innerBytes$1); + v$1 = _tuple$25[0]; + err = _tuple$25[1]; + $s = 126; continue; + /* } else if (_5 === (18)) { */ case 120: + _tuple$26 = parseNumericString(innerBytes$1); + v$1 = _tuple$26[0]; + err = _tuple$26[1]; + $s = 126; continue; + /* } else if (_5 === (22)) { */ case 121: + _tuple$27 = parseIA5String(innerBytes$1); + v$1 = _tuple$27[0]; + err = _tuple$27[1]; + $s = 126; continue; + /* } else if (_5 === (20)) { */ case 122: + _tuple$28 = parseT61String(innerBytes$1); + v$1 = _tuple$28[0]; + err = _tuple$28[1]; + $s = 126; continue; + /* } else if (_5 === (12)) { */ case 123: + _tuple$29 = parseUTF8String(innerBytes$1); + v$1 = _tuple$29[0]; + err = _tuple$29[1]; + $s = 126; continue; + /* } else if (_5 === (27)) { */ case 124: + _tuple$30 = parseT61String(innerBytes$1); + v$1 = _tuple$30[0]; + err = _tuple$30[1]; + $s = 126; continue; + /* } else { */ case 125: + _r$36 = fmt.Sprintf("internal error: unknown string type %d", new sliceType$2([new $Int(universalTag)])); /* */ $s = 127; case 127: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } + err = (x$12 = new SyntaxError.ptr(_r$36), new x$12.constructor.elem(x$12)); + /* } */ case 126: + case 118: + if ($interfaceIsEqual(err, $ifaceNil)) { + $clone(val, reflect.Value).SetString(v$1); + } + $s = -1; return [offset, err]; + /* } */ case 78: + case 72: + _r$37 = $clone(v, reflect.Value).Type().String(); /* */ $s = 128; case 128: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } + err = (x$13 = new StructuralError.ptr("unsupported: " + _r$37), new x$13.constructor.elem(x$13)); + $s = -1; return [offset, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseField }; } $f._1 = _1; $f._2 = _2; $f._3 = _3; $f._4 = _4; $f._5 = _5; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$10 = _arg$10; $f._arg$11 = _arg$11; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._arg$5 = _arg$5; $f._arg$6 = _arg$6; $f._arg$7 = _arg$7; $f._arg$8 = _arg$8; $f._arg$9 = _arg$9; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$27 = _r$27; $f._r$28 = _r$28; $f._r$29 = _r$29; $f._r$3 = _r$3; $f._r$30 = _r$30; $f._r$31 = _r$31; $f._r$32 = _r$32; $f._r$33 = _r$33; $f._r$34 = _r$34; $f._r$35 = _r$35; $f._r$36 = _r$36; $f._r$37 = _r$37; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$11 = _tuple$11; $f._tuple$12 = _tuple$12; $f._tuple$13 = _tuple$13; $f._tuple$14 = _tuple$14; $f._tuple$15 = _tuple$15; $f._tuple$16 = _tuple$16; $f._tuple$17 = _tuple$17; $f._tuple$18 = _tuple$18; $f._tuple$19 = _tuple$19; $f._tuple$2 = _tuple$2; $f._tuple$20 = _tuple$20; $f._tuple$21 = _tuple$21; $f._tuple$22 = _tuple$22; $f._tuple$23 = _tuple$23; $f._tuple$24 = _tuple$24; $f._tuple$25 = _tuple$25; $f._tuple$26 = _tuple$26; $f._tuple$27 = _tuple$27; $f._tuple$28 = _tuple$28; $f._tuple$29 = _tuple$29; $f._tuple$3 = _tuple$3; $f._tuple$30 = _tuple$30; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f._v = _v; $f._v$1 = _v$1; $f.bs = bs; $f.bytes = bytes; $f.bytes$1 = bytes$1; $f.compoundType = compoundType; $f.err = err; $f.err1 = err1; $f.err1$1 = err1$1; $f.err1$2 = err1$2; $f.err1$3 = err1$3; $f.err1$4 = err1$4; $f.err1$5 = err1$5; $f.err1$6 = err1$6; $f.err1$7 = err1$7; $f.err1$8 = err1$8; $f.expectedClass = expectedClass; $f.expectedClass$1 = expectedClass$1; $f.expectedTag = expectedTag; $f.field = field; $f.fieldType = fieldType; $f.i = i; $f.i$1 = i$1; $f.ifaceType = ifaceType; $f.initOffset = initOffset; $f.innerBytes = innerBytes; $f.innerBytes$1 = innerBytes$1; $f.innerOffset = innerOffset; $f.matchAny = matchAny; $f.matchAnyClassAndTag = matchAnyClassAndTag; $f.newSlice = newSlice; $f.newSlice$1 = newSlice$1; $f.offset = offset; $f.ok = ok; $f.ok$1 = ok$1; $f.ok1 = ok1; $f.params = params; $f.parsedBool = parsedBool; $f.parsedInt = parsedInt; $f.parsedInt$1 = parsedInt$1; $f.parsedInt$2 = parsedInt$2; $f.parsedInt$3 = parsedInt$3; $f.result = result; $f.result$1 = result$1; $f.sliceType$3 = sliceType$3; $f.structType = structType; $f.t = t; $f.t$1 = t$1; $f.time$1 = time$1; $f.universalTag = universalTag; $f.v = v; $f.v$1 = v$1; $f.val = val; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$13 = x$13; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + canHaveDefaultValue = function(k) { + var _1, k; + _1 = k; + if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { + return true; + } + return false; + }; + setDefaultValue = function(v, params) { + var ok, params, v; + ok = false; + if (!params.optional) { + return ok; + } + ok = true; + if (params.defaultValue === ptrType$3.nil) { + return ok; + } + if (canHaveDefaultValue($clone(v, reflect.Value).Kind())) { + $clone(v, reflect.Value).SetInt(params.defaultValue.$get()); + } + return ok; + }; + Unmarshal = function(b, val) { + var _r, _tuple, b, err, rest, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; b = $f.b; err = $f.err; rest = $f.rest; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rest = sliceType.nil; + err = $ifaceNil; + _r = UnmarshalWithParams(b, val, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + rest = _tuple[0]; + err = _tuple[1]; + $s = -1; return [rest, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Unmarshal }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.rest = rest; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Unmarshal = Unmarshal; + UnmarshalWithParams = function(b, val, params) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, offset, params, rest, v, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; b = $f.b; err = $f.err; offset = $f.offset; params = $f.params; rest = $f.rest; v = $f.v; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rest = sliceType.nil; + err = $ifaceNil; + _r = reflect.ValueOf(val); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = $clone(_r, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + _r$2 = parseField($clone(v, reflect.Value), b, 0, $clone(parseFieldParameters(params), fieldParameters)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + offset = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType.nil; + _tmp$1 = err; + rest = _tmp; + err = _tmp$1; + $s = -1; return [rest, err]; + } + _tmp$2 = $subslice(b, offset); + _tmp$3 = $ifaceNil; + rest = _tmp$2; + err = _tmp$3; + $s = -1; return [rest, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnmarshalWithParams }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.offset = offset; $f.params = params; $f.rest = rest; $f.v = v; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.UnmarshalWithParams = UnmarshalWithParams; + parseFieldParameters = function(str) { + var _i, _ref, _tuple, _tuple$1, err, err$1, i, i$1, part, ret, str; + ret = new fieldParameters.ptr(false, false, false, false, ptrType$3.nil, ptrType$4.nil, 0, 0, false, false); + _ref = strings.Split(str, ","); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + part = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (part === "optional") { + ret.optional = true; + } else if (part === "explicit") { + ret.explicit = true; + if (ret.tag === ptrType$4.nil) { + ret.tag = $newDataPointer(0, ptrType$4); + } + } else if (part === "generalized") { + ret.timeType = 24; + } else if (part === "utc") { + ret.timeType = 23; + } else if (part === "ia5") { + ret.stringType = 22; + } else if (part === "printable") { + ret.stringType = 19; + } else if (part === "numeric") { + ret.stringType = 18; + } else if (part === "utf8") { + ret.stringType = 12; + } else if (strings.HasPrefix(part, "default:")) { + _tuple = strconv.ParseInt($substring(part, 8), 10, 64); + i = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + ret.defaultValue = $newDataPointer(new $Int64(0, 0), ptrType$3); + ret.defaultValue.$set(i); + } + } else if (strings.HasPrefix(part, "tag:")) { + _tuple$1 = strconv.Atoi($substring(part, 4)); + i$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + ret.tag = $newDataPointer(0, ptrType$4); + ret.tag.$set(i$1); + } + } else if (part === "set") { + ret.set = true; + } else if (part === "application") { + ret.application = true; + if (ret.tag === ptrType$4.nil) { + ret.tag = $newDataPointer(0, ptrType$4); + } + } else if (part === "private") { + ret.private$3 = true; + if (ret.tag === ptrType$4.nil) { + ret.tag = $newDataPointer(0, ptrType$4); + } + } else if (part === "omitempty") { + ret.omitEmpty = true; + } + _i++; + } + return ret; + }; + getUniversalType = function(t) { + var _1, _2, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$6, _tmp$7, _tmp$8, _tmp$9, isCompound, matchAny, ok, t, tagNumber, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$3 = $f._tmp$3; _tmp$30 = $f._tmp$30; _tmp$31 = $f._tmp$31; _tmp$32 = $f._tmp$32; _tmp$33 = $f._tmp$33; _tmp$34 = $f._tmp$34; _tmp$35 = $f._tmp$35; _tmp$36 = $f._tmp$36; _tmp$37 = $f._tmp$37; _tmp$38 = $f._tmp$38; _tmp$39 = $f._tmp$39; _tmp$4 = $f._tmp$4; _tmp$40 = $f._tmp$40; _tmp$41 = $f._tmp$41; _tmp$42 = $f._tmp$42; _tmp$43 = $f._tmp$43; _tmp$44 = $f._tmp$44; _tmp$45 = $f._tmp$45; _tmp$46 = $f._tmp$46; _tmp$47 = $f._tmp$47; _tmp$48 = $f._tmp$48; _tmp$49 = $f._tmp$49; _tmp$5 = $f._tmp$5; _tmp$50 = $f._tmp$50; _tmp$51 = $f._tmp$51; _tmp$52 = $f._tmp$52; _tmp$53 = $f._tmp$53; _tmp$54 = $f._tmp$54; _tmp$55 = $f._tmp$55; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; isCompound = $f.isCompound; matchAny = $f.matchAny; ok = $f.ok; t = $f.t; tagNumber = $f.tagNumber; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + matchAny = false; + tagNumber = 0; + isCompound = false; + ok = false; + _1 = t; + if ($interfaceIsEqual(_1, (rawValueType))) { + _tmp = true; + _tmp$1 = -1; + _tmp$2 = false; + _tmp$3 = true; + matchAny = _tmp; + tagNumber = _tmp$1; + isCompound = _tmp$2; + ok = _tmp$3; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } else if ($interfaceIsEqual(_1, (objectIdentifierType))) { + _tmp$4 = false; + _tmp$5 = 6; + _tmp$6 = false; + _tmp$7 = true; + matchAny = _tmp$4; + tagNumber = _tmp$5; + isCompound = _tmp$6; + ok = _tmp$7; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } else if ($interfaceIsEqual(_1, (bitStringType))) { + _tmp$8 = false; + _tmp$9 = 3; + _tmp$10 = false; + _tmp$11 = true; + matchAny = _tmp$8; + tagNumber = _tmp$9; + isCompound = _tmp$10; + ok = _tmp$11; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } else if ($interfaceIsEqual(_1, (timeType))) { + _tmp$12 = false; + _tmp$13 = 23; + _tmp$14 = false; + _tmp$15 = true; + matchAny = _tmp$12; + tagNumber = _tmp$13; + isCompound = _tmp$14; + ok = _tmp$15; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } else if ($interfaceIsEqual(_1, (enumeratedType))) { + _tmp$16 = false; + _tmp$17 = 10; + _tmp$18 = false; + _tmp$19 = true; + matchAny = _tmp$16; + tagNumber = _tmp$17; + isCompound = _tmp$18; + ok = _tmp$19; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } else if ($interfaceIsEqual(_1, (bigIntType))) { + _tmp$20 = false; + _tmp$21 = 2; + _tmp$22 = false; + _tmp$23 = true; + matchAny = _tmp$20; + tagNumber = _tmp$21; + isCompound = _tmp$22; + ok = _tmp$23; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + } + _r = t.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _2 = _r; + /* */ if (_2 === (1)) { $s = 3; continue; } + /* */ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { $s = 4; continue; } + /* */ if (_2 === (25)) { $s = 5; continue; } + /* */ if (_2 === (23)) { $s = 6; continue; } + /* */ if (_2 === (24)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_2 === (1)) { */ case 3: + _tmp$24 = false; + _tmp$25 = 1; + _tmp$26 = false; + _tmp$27 = true; + matchAny = _tmp$24; + tagNumber = _tmp$25; + isCompound = _tmp$26; + ok = _tmp$27; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } else if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { */ case 4: + _tmp$28 = false; + _tmp$29 = 2; + _tmp$30 = false; + _tmp$31 = true; + matchAny = _tmp$28; + tagNumber = _tmp$29; + isCompound = _tmp$30; + ok = _tmp$31; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } else if (_2 === (25)) { */ case 5: + _tmp$32 = false; + _tmp$33 = 16; + _tmp$34 = true; + _tmp$35 = true; + matchAny = _tmp$32; + tagNumber = _tmp$33; + isCompound = _tmp$34; + ok = _tmp$35; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } else if (_2 === (23)) { */ case 6: + _r$1 = t.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2 === 8) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_r$2 === 8) { */ case 9: + _tmp$36 = false; + _tmp$37 = 4; + _tmp$38 = false; + _tmp$39 = true; + matchAny = _tmp$36; + tagNumber = _tmp$37; + isCompound = _tmp$38; + ok = _tmp$39; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } */ case 10: + _r$3 = t.Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = strings.HasSuffix(_r$3, "SET"); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (_r$4) { */ case 13: + _tmp$40 = false; + _tmp$41 = 17; + _tmp$42 = true; + _tmp$43 = true; + matchAny = _tmp$40; + tagNumber = _tmp$41; + isCompound = _tmp$42; + ok = _tmp$43; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } */ case 14: + _tmp$44 = false; + _tmp$45 = 16; + _tmp$46 = true; + _tmp$47 = true; + matchAny = _tmp$44; + tagNumber = _tmp$45; + isCompound = _tmp$46; + ok = _tmp$47; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } else if (_2 === (24)) { */ case 7: + _tmp$48 = false; + _tmp$49 = 19; + _tmp$50 = false; + _tmp$51 = true; + matchAny = _tmp$48; + tagNumber = _tmp$49; + isCompound = _tmp$50; + ok = _tmp$51; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* } */ case 8: + case 1: + _tmp$52 = false; + _tmp$53 = 0; + _tmp$54 = false; + _tmp$55 = false; + matchAny = _tmp$52; + tagNumber = _tmp$53; + isCompound = _tmp$54; + ok = _tmp$55; + $s = -1; return [matchAny, tagNumber, isCompound, ok]; + /* */ } return; } if ($f === undefined) { $f = { $blk: getUniversalType }; } $f._1 = _1; $f._2 = _2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$3 = _tmp$3; $f._tmp$30 = _tmp$30; $f._tmp$31 = _tmp$31; $f._tmp$32 = _tmp$32; $f._tmp$33 = _tmp$33; $f._tmp$34 = _tmp$34; $f._tmp$35 = _tmp$35; $f._tmp$36 = _tmp$36; $f._tmp$37 = _tmp$37; $f._tmp$38 = _tmp$38; $f._tmp$39 = _tmp$39; $f._tmp$4 = _tmp$4; $f._tmp$40 = _tmp$40; $f._tmp$41 = _tmp$41; $f._tmp$42 = _tmp$42; $f._tmp$43 = _tmp$43; $f._tmp$44 = _tmp$44; $f._tmp$45 = _tmp$45; $f._tmp$46 = _tmp$46; $f._tmp$47 = _tmp$47; $f._tmp$48 = _tmp$48; $f._tmp$49 = _tmp$49; $f._tmp$5 = _tmp$5; $f._tmp$50 = _tmp$50; $f._tmp$51 = _tmp$51; $f._tmp$52 = _tmp$52; $f._tmp$53 = _tmp$53; $f._tmp$54 = _tmp$54; $f._tmp$55 = _tmp$55; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f.isCompound = isCompound; $f.matchAny = matchAny; $f.ok = ok; $f.t = t; $f.tagNumber = tagNumber; $f.$s = $s; $f.$r = $r; return $f; + }; + byteEncoder.prototype.Len = function() { + var c; + c = this.$val; + return 1; + }; + $ptrType(byteEncoder).prototype.Len = function() { return new byteEncoder(this.$get()).Len(); }; + byteEncoder.prototype.Encode = function(dst) { + var c, dst; + c = this.$val; + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = ((c << 24 >>> 24))); + }; + $ptrType(byteEncoder).prototype.Encode = function(dst) { return new byteEncoder(this.$get()).Encode(dst); }; + bytesEncoder.prototype.Len = function() { + var b; + b = this; + return b.$length; + }; + $ptrType(bytesEncoder).prototype.Len = function() { return this.$get().Len(); }; + bytesEncoder.prototype.Encode = function(dst) { + var b, dst; + b = this; + if (!(($copySlice(dst, b) === b.$length))) { + $panic(new $String("internal error")); + } + }; + $ptrType(bytesEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; + stringEncoder.prototype.Len = function() { + var s; + s = this.$val; + return s.length; + }; + $ptrType(stringEncoder).prototype.Len = function() { return new stringEncoder(this.$get()).Len(); }; + stringEncoder.prototype.Encode = function(dst) { + var dst, s; + s = this.$val; + if (!(($copyString(dst, s) === s.length))) { + $panic(new $String("internal error")); + } + }; + $ptrType(stringEncoder).prototype.Encode = function(dst) { return new stringEncoder(this.$get()).Encode(dst); }; + multiEncoder.prototype.Len = function() { + var _i, _r, _ref, e, m, size, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; e = $f.e; m = $f.m; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + size = 0; + _ref = m; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + size = size + (_r) >> 0; + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return size; + /* */ } return; } if ($f === undefined) { $f = { $blk: multiEncoder.prototype.Len }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.e = e; $f.m = m; $f.size = size; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(multiEncoder).prototype.Len = function() { return this.$get().Len(); }; + multiEncoder.prototype.Encode = function(dst) { + var _i, _r, _ref, dst, e, m, off, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; dst = $f.dst; e = $f.e; m = $f.m; off = $f.off; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + off = 0; + _ref = m; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = e.Encode($subslice(dst, off)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = e.Len(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + off = off + (_r) >> 0; + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: multiEncoder.prototype.Encode }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.dst = dst; $f.e = e; $f.m = m; $f.off = off; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(multiEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; + taggedEncoder.ptr.prototype.Len = function() { + var _r, _r$1, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r = t.tag.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = t.body.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r + _r$1 >> 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: taggedEncoder.ptr.prototype.Len }; } $f._r = _r; $f._r$1 = _r$1; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + taggedEncoder.prototype.Len = function() { return this.$val.Len(); }; + taggedEncoder.ptr.prototype.Encode = function(dst) { + var _r, dst, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; dst = $f.dst; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.tag.Encode(dst); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = t.tag.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $r = t.body.Encode($subslice(dst, _r)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: taggedEncoder.ptr.prototype.Encode }; } $f._r = _r; $f.dst = dst; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + taggedEncoder.prototype.Encode = function(dst) { return this.$val.Encode(dst); }; + int64Encoder.prototype.Len = function() { + var i, n; + i = this; + n = 1; + while (true) { + if (!((i.$high > 0 || (i.$high === 0 && i.$low > 127)))) { break; } + n = n + (1) >> 0; + i = $shiftRightInt64(i, (8)); + } + while (true) { + if (!((i.$high < -1 || (i.$high === -1 && i.$low < 4294967168)))) { break; } + n = n + (1) >> 0; + i = $shiftRightInt64(i, (8)); + } + return n; + }; + $ptrType(int64Encoder).prototype.Len = function() { return this.$get().Len(); }; + int64Encoder.prototype.Encode = function(dst) { + var dst, i, j, n; + i = this; + n = i.Len(); + j = 0; + while (true) { + if (!(j < n)) { break; } + ((j < 0 || j >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + j] = (($shiftRightInt64(i, ((($imul((((n - 1 >> 0) - j >> 0)), 8)) >>> 0))).$low << 24 >>> 24))); + j = j + (1) >> 0; + } + }; + $ptrType(int64Encoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; + base128IntLength = function(n) { + var i, l, n; + if ((n.$high === 0 && n.$low === 0)) { + return 1; + } + l = 0; + i = n; + while (true) { + if (!((i.$high > 0 || (i.$high === 0 && i.$low > 0)))) { break; } + l = l + (1) >> 0; + i = $shiftRightInt64(i, (7)); + } + return l; + }; + appendBase128Int = function(dst, n) { + var dst, i, l, n, o; + l = base128IntLength(n); + i = l - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + o = (($shiftRightInt64(n, ((($imul(i, 7)) >>> 0))).$low << 24 >>> 24)); + o = (o & (127)) >>> 0; + if (!((i === 0))) { + o = (o | (128)) >>> 0; + } + dst = $append(dst, o); + i = i - (1) >> 0; + } + return dst; + }; + makeBigInt = function(n) { + var _i, _ref, bytes, bytes$1, i, n, nMinus1, x$3, x$4, x$5; + if (n === ptrType$1.nil) { + return [$ifaceNil, (x$3 = new StructuralError.ptr("empty integer"), new x$3.constructor.elem(x$3))]; + } + if (n.Sign() < 0) { + nMinus1 = new big.Int.ptr(false, big.nat.nil).Neg(n); + nMinus1.Sub(nMinus1, bigOne); + bytes = nMinus1.Bytes(); + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i] = ((((i < 0 || i >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i]) ^ (255)) << 24 >>> 24)); + _i++; + } + if ((bytes.$length === 0) || ((((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & 128) >>> 0) === 0)) { + return [((x$4 = new sliceType$3([byteFFEncoder, ($subslice(new bytesEncoder(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length))]), $subslice(new multiEncoder(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length))), $ifaceNil]; + } + return [($subslice(new bytesEncoder(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)), $ifaceNil]; + } else if (n.Sign() === 0) { + return [byte00Encoder, $ifaceNil]; + } else { + bytes$1 = n.Bytes(); + if (bytes$1.$length > 0 && !(((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) & 128) >>> 0) === 0))) { + return [((x$5 = new sliceType$3([byte00Encoder, ($subslice(new bytesEncoder(bytes$1.$array), bytes$1.$offset, bytes$1.$offset + bytes$1.$length))]), $subslice(new multiEncoder(x$5.$array), x$5.$offset, x$5.$offset + x$5.$length))), $ifaceNil]; + } + return [($subslice(new bytesEncoder(bytes$1.$array), bytes$1.$offset, bytes$1.$offset + bytes$1.$length)), $ifaceNil]; + } + }; + appendLength = function(dst, i) { + var dst, i, n; + n = lengthLength(i); + while (true) { + if (!(n > 0)) { break; } + dst = $append(dst, ((((i >> $min(((($imul(((n - 1 >> 0)), 8)) >>> 0)), 31)) >> 0) << 24 >>> 24))); + n = n - (1) >> 0; + } + return dst; + }; + lengthLength = function(i) { + var i, numBytes; + numBytes = 0; + numBytes = 1; + while (true) { + if (!(i > 255)) { break; } + numBytes = numBytes + (1) >> 0; + i = (i >> $min((8), 31)) >> 0; + } + return numBytes; + }; + appendTagAndLength = function(dst, t) { + var b, dst, l, t; + b = ((t.class$0 << 24 >>> 24)) << 6 << 24 >>> 24; + if (t.isCompound) { + b = (b | (32)) >>> 0; + } + if (t.tag >= 31) { + b = (b | (31)) >>> 0; + dst = $append(dst, b); + dst = appendBase128Int(dst, (new $Int64(0, t.tag))); + } else { + b = (b | (((t.tag << 24 >>> 24)))) >>> 0; + dst = $append(dst, b); + } + if (t.length >= 128) { + l = lengthLength(t.length); + dst = $append(dst, (128 | ((l << 24 >>> 24))) >>> 0); + dst = appendLength(dst, t.length); + } else { + dst = $append(dst, ((t.length << 24 >>> 24))); + } + return dst; + }; + bitStringEncoder.ptr.prototype.Len = function() { + var b; + b = this; + return b.Bytes.$length + 1 >> 0; + }; + bitStringEncoder.prototype.Len = function() { return this.$val.Len(); }; + bitStringEncoder.ptr.prototype.Encode = function(dst) { + var _r, _r$1, b, dst; + b = this; + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = (((_r = ((8 - (_r$1 = b.BitLength % 8, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0)) % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24))); + if (!(($copySlice($subslice(dst, 1), b.Bytes) === b.Bytes.$length))) { + $panic(new $String("internal error")); + } + }; + bitStringEncoder.prototype.Encode = function(dst) { return this.$val.Encode(dst); }; + oidEncoder.prototype.Len = function() { + var i, l, oid; + oid = this; + l = base128IntLength((new $Int64(0, (($imul((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]), 40)) + (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >> 0)))); + i = 2; + while (true) { + if (!(i < oid.$length)) { break; } + l = l + (base128IntLength((new $Int64(0, ((i < 0 || i >= oid.$length) ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + i]))))) >> 0; + i = i + (1) >> 0; + } + return l; + }; + $ptrType(oidEncoder).prototype.Len = function() { return this.$get().Len(); }; + oidEncoder.prototype.Encode = function(dst) { + var dst, i, oid; + oid = this; + dst = appendBase128Int($subslice(dst, 0, 0), (new $Int64(0, (($imul((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]), 40)) + (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >> 0)))); + i = 2; + while (true) { + if (!(i < oid.$length)) { break; } + dst = appendBase128Int(dst, (new $Int64(0, ((i < 0 || i >= oid.$length) ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + i])))); + i = i + (1) >> 0; + } + }; + $ptrType(oidEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; + makeObjectIdentifier = function(oid) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, oid, x$3; + e = $ifaceNil; + err = $ifaceNil; + if (oid.$length < 2 || (0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) > 2 || ((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) < 2 && (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >= 40)) { + _tmp = $ifaceNil; + _tmp$1 = (x$3 = new StructuralError.ptr("invalid object identifier"), new x$3.constructor.elem(x$3)); + e = _tmp; + err = _tmp$1; + return [e, err]; + } + _tmp$2 = ($subslice(new oidEncoder(oid.$array), oid.$offset, oid.$offset + oid.$length)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + return [e, err]; + }; + makePrintableString = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; + e = $ifaceNil; + err = $ifaceNil; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (!isPrintable(s.charCodeAt(i), true, false)) { + _tmp = $ifaceNil; + _tmp$1 = (x$3 = new StructuralError.ptr("PrintableString contains invalid character"), new x$3.constructor.elem(x$3)); + e = _tmp; + err = _tmp$1; + return [e, err]; + } + i = i + (1) >> 0; + } + _tmp$2 = new stringEncoder((s)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + return [e, err]; + }; + makeIA5String = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; + e = $ifaceNil; + err = $ifaceNil; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) > 127) { + _tmp = $ifaceNil; + _tmp$1 = (x$3 = new StructuralError.ptr("IA5String contains invalid character"), new x$3.constructor.elem(x$3)); + e = _tmp; + err = _tmp$1; + return [e, err]; + } + i = i + (1) >> 0; + } + _tmp$2 = new stringEncoder((s)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + return [e, err]; + }; + makeNumericString = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; + e = $ifaceNil; + err = $ifaceNil; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (!isNumeric(s.charCodeAt(i))) { + _tmp = $ifaceNil; + _tmp$1 = (x$3 = new StructuralError.ptr("NumericString contains invalid character"), new x$3.constructor.elem(x$3)); + e = _tmp; + err = _tmp$1; + return [e, err]; + } + i = i + (1) >> 0; + } + _tmp$2 = new stringEncoder((s)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + return [e, err]; + }; + makeUTF8String = function(s) { + var s; + return new stringEncoder((s)); + }; + appendTwoDigits = function(dst, v) { + var _q, _r, _r$1, dst, v; + return $append(dst, (((48 + (_r = ((_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$1 = v % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24))); + }; + appendFourDigits = function(dst, v) { + var _i, _q, _r, _ref, bytes, dst, i, v, x$3; + bytes = arrayType.zero(); + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < 4)) { break; } + i = _i; + (x$3 = 3 - i >> 0, ((x$3 < 0 || x$3 >= bytes.length) ? ($throwRuntimeError("index out of range"), undefined) : bytes[x$3] = (48 + (((_r = v % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) << 24 >>> 24))); + v = (_q = v / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + _i++; + } + return $appendSlice(dst, new sliceType(bytes)); + }; + outsideUTCRange = function(t) { + var _r, t, year, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; t = $f.t; year = $f.year; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + year = _r; + $s = -1; return year < 1950 || year >= 2050; + /* */ } return; } if ($f === undefined) { $f = { $blk: outsideUTCRange }; } $f._r = _r; $f.t = t; $f.year = year; $f.$s = $s; $f.$r = $r; return $f; + }; + makeUTCTime = function(t) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; dst = $f.dst; e = $f.e; err = $f.err; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = $ifaceNil; + err = $ifaceNil; + dst = $makeSlice(sliceType, 0, 18); + _r = appendUTCTime(dst, $clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + dst = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; + _tmp$1 = err; + e = _tmp; + err = _tmp$1; + $s = -1; return [e, err]; + } + _tmp$2 = ($subslice(new bytesEncoder(dst.$array), dst.$offset, dst.$offset + dst.$length)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + $s = -1; return [e, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: makeUTCTime }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.dst = dst; $f.e = e; $f.err = err; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + makeGeneralizedTime = function(t) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; dst = $f.dst; e = $f.e; err = $f.err; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = $ifaceNil; + err = $ifaceNil; + dst = $makeSlice(sliceType, 0, 20); + _r = appendGeneralizedTime(dst, $clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + dst = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; + _tmp$1 = err; + e = _tmp; + err = _tmp$1; + $s = -1; return [e, err]; + } + _tmp$2 = ($subslice(new bytesEncoder(dst.$array), dst.$offset, dst.$offset + dst.$length)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + $s = -1; return [e, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: makeGeneralizedTime }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.dst = dst; $f.e = e; $f.err = err; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + appendUTCTime = function(dst, t) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; dst = $f.dst; err = $f.err; ret = $f.ret; t = $f.t; x$3 = $f.x$3; year = $f.year; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ret = sliceType.nil; + err = $ifaceNil; + _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + year = _r; + if (1950 <= year && year < 2000) { + dst = appendTwoDigits(dst, year - 1900 >> 0); + } else if (2000 <= year && year < 2050) { + dst = appendTwoDigits(dst, year - 2000 >> 0); + } else { + _tmp = sliceType.nil; + _tmp$1 = (x$3 = new StructuralError.ptr("cannot represent time as UTCTime"), new x$3.constructor.elem(x$3)); + ret = _tmp; + err = _tmp$1; + $s = -1; return [ret, err]; + } + _r$1 = appendTimeCommon(dst, $clone(t, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$2 = _r$1; + _tmp$3 = $ifaceNil; + ret = _tmp$2; + err = _tmp$3; + $s = -1; return [ret, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: appendUTCTime }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.dst = dst; $f.err = err; $f.ret = ret; $f.t = t; $f.x$3 = x$3; $f.year = year; $f.$s = $s; $f.$r = $r; return $f; + }; + appendGeneralizedTime = function(dst, t) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; dst = $f.dst; err = $f.err; ret = $f.ret; t = $f.t; x$3 = $f.x$3; year = $f.year; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ret = sliceType.nil; + err = $ifaceNil; + _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + year = _r; + if (year < 0 || year > 9999) { + _tmp = sliceType.nil; + _tmp$1 = (x$3 = new StructuralError.ptr("cannot represent time as GeneralizedTime"), new x$3.constructor.elem(x$3)); + ret = _tmp; + err = _tmp$1; + $s = -1; return [ret, err]; + } + dst = appendFourDigits(dst, year); + _r$1 = appendTimeCommon(dst, $clone(t, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$2 = _r$1; + _tmp$3 = $ifaceNil; + ret = _tmp$2; + err = _tmp$3; + $s = -1; return [ret, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: appendGeneralizedTime }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.dst = dst; $f.err = err; $f.ret = ret; $f.t = t; $f.x$3 = x$3; $f.year = year; $f.$s = $s; $f.$r = $r; return $f; + }; + appendTimeCommon = function(dst, t) { + var _q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, day, dst, hour, min, month, offset, offsetMinutes, sec, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; day = $f.day; dst = $f.dst; hour = $f.hour; min = $f.min; month = $f.month; offset = $f.offset; offsetMinutes = $f.offsetMinutes; sec = $f.sec; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = $clone(t, time.Time).Date(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + month = _tuple[1]; + day = _tuple[2]; + dst = appendTwoDigits(dst, ((month >> 0))); + dst = appendTwoDigits(dst, day); + _r$1 = $clone(t, time.Time).Clock(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + hour = _tuple$1[0]; + min = _tuple$1[1]; + sec = _tuple$1[2]; + dst = appendTwoDigits(dst, hour); + dst = appendTwoDigits(dst, min); + dst = appendTwoDigits(dst, sec); + _r$2 = $clone(t, time.Time).Zone(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + offset = _tuple$2[1]; + if (((_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === 0)) { + $s = -1; return $append(dst, 90); + } else if (offset > 0) { + dst = $append(dst, 43); + } else if (offset < 0) { + dst = $append(dst, 45); + } + offsetMinutes = (_q$1 = offset / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + if (offsetMinutes < 0) { + offsetMinutes = -offsetMinutes; + } + dst = appendTwoDigits(dst, (_q$2 = offsetMinutes / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))); + dst = appendTwoDigits(dst, (_r$3 = offsetMinutes % 60, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero"))); + $s = -1; return dst; + /* */ } return; } if ($f === undefined) { $f = { $blk: appendTimeCommon }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.day = day; $f.dst = dst; $f.hour = hour; $f.min = min; $f.month = month; $f.offset = offset; $f.offsetMinutes = offsetMinutes; $f.sec = sec; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + stripTagAndLength = function(in$1) { + var _tuple, err, in$1, offset; + _tuple = parseTagAndLength(in$1, 0); + offset = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return in$1; + } + return $subslice(in$1, offset); + }; + makeBody = function(value, params) { + var _1, _2, _3, _4, _5, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, bytes, e, err, fp, i, i$1, i$2, l, m, m$1, n, n1, params, s, sliceType$4, startingField, t, t$1, v, value, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _3 = $f._3; _4 = $f._4; _5 = $f._5; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$27 = $f._r$27; _r$28 = $f._r$28; _r$29 = $f._r$29; _r$3 = $f._r$3; _r$30 = $f._r$30; _r$31 = $f._r$31; _r$32 = $f._r$32; _r$33 = $f._r$33; _r$34 = $f._r$34; _r$35 = $f._r$35; _r$36 = $f._r$36; _r$37 = $f._r$37; _r$38 = $f._r$38; _r$39 = $f._r$39; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$3 = $f._tmp$3; _tmp$30 = $f._tmp$30; _tmp$31 = $f._tmp$31; _tmp$32 = $f._tmp$32; _tmp$33 = $f._tmp$33; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; _v = $f._v; bytes = $f.bytes; e = $f.e; err = $f.err; fp = $f.fp; i = $f.i; i$1 = $f.i$1; i$2 = $f.i$2; l = $f.l; m = $f.m; m$1 = $f.m$1; n = $f.n; n1 = $f.n1; params = $f.params; s = $f.s; sliceType$4 = $f.sliceType$4; startingField = $f.startingField; t = $f.t; t$1 = $f.t$1; v = $f.v; value = $f.value; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = $ifaceNil; + err = $ifaceNil; + _1 = $clone(value, reflect.Value).Type(); + /* */ if ($interfaceIsEqual(_1, (flagType))) { $s = 2; continue; } + /* */ if ($interfaceIsEqual(_1, (timeType))) { $s = 3; continue; } + /* */ if ($interfaceIsEqual(_1, (bitStringType))) { $s = 4; continue; } + /* */ if ($interfaceIsEqual(_1, (objectIdentifierType))) { $s = 5; continue; } + /* */ if ($interfaceIsEqual(_1, (bigIntType))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ($interfaceIsEqual(_1, (flagType))) { */ case 2: + _tmp = (bytesEncoder.nil); + _tmp$1 = $ifaceNil; + e = _tmp; + err = _tmp$1; + $s = -1; return [e, err]; + /* } else if ($interfaceIsEqual(_1, (timeType))) { */ case 3: + _r = $clone(value, reflect.Value).Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + t = $clone($assertType(_r, time.Time), time.Time); + if (params.timeType === 24) { _v = true; $s = 11; continue s; } + _r$1 = outsideUTCRange($clone(t, time.Time)); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 11: + /* */ if (_v) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_v) { */ case 9: + _r$2 = makeGeneralizedTime($clone(t, time.Time)); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + e = _tuple[0]; + err = _tuple[1]; + $s = -1; return [e, err]; + /* } */ case 10: + _r$3 = makeUTCTime($clone(t, time.Time)); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + e = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [e, err]; + /* } else if ($interfaceIsEqual(_1, (bitStringType))) { */ case 4: + _r$4 = $clone(value, reflect.Value).Interface(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp$2 = (x$3 = ($clone($assertType(_r$4, BitString), bitStringEncoder)), new x$3.constructor.elem(x$3)); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + $s = -1; return [e, err]; + /* } else if ($interfaceIsEqual(_1, (objectIdentifierType))) { */ case 5: + _r$5 = $clone(value, reflect.Value).Interface(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = makeObjectIdentifier((x$4 = $assertType(_r$5, ObjectIdentifier), $subslice(new sliceType$1(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length))); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + e = _tuple$2[0]; + err = _tuple$2[1]; + $s = -1; return [e, err]; + /* } else if ($interfaceIsEqual(_1, (bigIntType))) { */ case 6: + _r$7 = $clone(value, reflect.Value).Interface(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = makeBigInt($assertType(_r$7, ptrType$1)); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$3 = _r$8; + e = _tuple$3[0]; + err = _tuple$3[1]; + $s = -1; return [e, err]; + /* } */ case 7: + case 1: + v = value; + _2 = $clone(v, reflect.Value).Kind(); + /* */ if (_2 === (1)) { $s = 21; continue; } + /* */ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { $s = 22; continue; } + /* */ if (_2 === (25)) { $s = 23; continue; } + /* */ if (_2 === (23)) { $s = 24; continue; } + /* */ if (_2 === (24)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (_2 === (1)) { */ case 21: + if ($clone(v, reflect.Value).Bool()) { + _tmp$4 = byteFFEncoder; + _tmp$5 = $ifaceNil; + e = _tmp$4; + err = _tmp$5; + $s = -1; return [e, err]; + } + _tmp$6 = byte00Encoder; + _tmp$7 = $ifaceNil; + e = _tmp$6; + err = _tmp$7; + $s = -1; return [e, err]; + /* } else if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { */ case 22: + _tmp$8 = ((x$5 = $clone(v, reflect.Value).Int(), new int64Encoder(x$5.$high, x$5.$low))); + _tmp$9 = $ifaceNil; + e = _tmp$8; + err = _tmp$9; + $s = -1; return [e, err]; + /* } else if (_2 === (25)) { */ case 23: + t$1 = $clone(v, reflect.Value).Type(); + i = 0; + /* while (true) { */ case 27: + _r$9 = t$1.NumField(); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + /* if (!(i < _r$9)) { break; } */ if(!(i < _r$9)) { $s = 28; continue; } + _r$10 = t$1.Field(i); /* */ $s = 32; case 32: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + /* */ if (!(_r$10.PkgPath === "")) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!(_r$10.PkgPath === "")) { */ case 30: + _tmp$10 = $ifaceNil; + _tmp$11 = (x$6 = new StructuralError.ptr("struct contains unexported fields"), new x$6.constructor.elem(x$6)); + e = _tmp$10; + err = _tmp$11; + $s = -1; return [e, err]; + /* } */ case 31: + i = i + (1) >> 0; + /* } */ $s = 27; continue; case 28: + startingField = 0; + _r$11 = t$1.NumField(); /* */ $s = 33; case 33: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + n = _r$11; + if (n === 0) { + _tmp$12 = (bytesEncoder.nil); + _tmp$13 = $ifaceNil; + e = _tmp$12; + err = _tmp$13; + $s = -1; return [e, err]; + } + _r$12 = t$1.Field(0); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + /* */ if ($interfaceIsEqual(_r$12.Type, rawContentsType)) { $s = 34; continue; } + /* */ $s = 35; continue; + /* if ($interfaceIsEqual(_r$12.Type, rawContentsType)) { */ case 34: + _r$13 = $clone(v, reflect.Value).Field(0); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + s = _r$13; + /* */ if ($clone(s, reflect.Value).Len() > 0) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if ($clone(s, reflect.Value).Len() > 0) { */ case 38: + _r$14 = $clone(s, reflect.Value).Bytes(); /* */ $s = 40; case 40: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + bytes = _r$14; + _tmp$14 = ((x$7 = stripTagAndLength(bytes), $subslice(new bytesEncoder(x$7.$array), x$7.$offset, x$7.$offset + x$7.$length))); + _tmp$15 = $ifaceNil; + e = _tmp$14; + err = _tmp$15; + $s = -1; return [e, err]; + /* } */ case 39: + startingField = 1; + /* } */ case 35: + n1 = n - startingField >> 0; + _3 = n1; + /* */ if (_3 === (0)) { $s = 42; continue; } + /* */ if (_3 === (1)) { $s = 43; continue; } + /* */ $s = 44; continue; + /* if (_3 === (0)) { */ case 42: + _tmp$16 = (bytesEncoder.nil); + _tmp$17 = $ifaceNil; + e = _tmp$16; + err = _tmp$17; + $s = -1; return [e, err]; + /* } else if (_3 === (1)) { */ case 43: + _r$15 = $clone(v, reflect.Value).Field(startingField); /* */ $s = 46; case 46: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _arg = $clone(_r$15, reflect.Value); + _r$16 = t$1.Field(startingField); /* */ $s = 47; case 47: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$17 = new reflect.StructTag(_r$16.Tag).Get("asn1"); /* */ $s = 48; case 48: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$18 = parseFieldParameters(_r$17); /* */ $s = 49; case 49: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _arg$1 = $clone(_r$18, fieldParameters); + _r$19 = makeField(_arg, _arg$1); /* */ $s = 50; case 50: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _tuple$4 = _r$19; + e = _tuple$4[0]; + err = _tuple$4[1]; + $s = -1; return [e, err]; + /* } else { */ case 44: + m = $makeSlice(sliceType$3, n1); + i$1 = 0; + /* while (true) { */ case 51: + /* if (!(i$1 < n1)) { break; } */ if(!(i$1 < n1)) { $s = 52; continue; } + _r$20 = $clone(v, reflect.Value).Field(i$1 + startingField >> 0); /* */ $s = 53; case 53: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _arg$2 = $clone(_r$20, reflect.Value); + _r$21 = t$1.Field(i$1 + startingField >> 0); /* */ $s = 54; case 54: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$22 = new reflect.StructTag(_r$21.Tag).Get("asn1"); /* */ $s = 55; case 55: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _r$23 = parseFieldParameters(_r$22); /* */ $s = 56; case 56: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _arg$3 = $clone(_r$23, fieldParameters); + _r$24 = makeField(_arg$2, _arg$3); /* */ $s = 57; case 57: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _tuple$5 = _r$24; + ((i$1 < 0 || i$1 >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i$1] = _tuple$5[0]); + err = _tuple$5[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$18 = $ifaceNil; + _tmp$19 = err; + e = _tmp$18; + err = _tmp$19; + $s = -1; return [e, err]; + } + i$1 = i$1 + (1) >> 0; + /* } */ $s = 51; continue; case 52: + _tmp$20 = ($subslice(new multiEncoder(m.$array), m.$offset, m.$offset + m.$length)); + _tmp$21 = $ifaceNil; + e = _tmp$20; + err = _tmp$21; + $s = -1; return [e, err]; + /* } */ case 45: + case 41: + $s = 26; continue; + /* } else if (_2 === (23)) { */ case 24: + sliceType$4 = $clone(v, reflect.Value).Type(); + _r$25 = sliceType$4.Elem(); /* */ $s = 60; case 60: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + _r$26 = _r$25.Kind(); /* */ $s = 61; case 61: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + /* */ if (_r$26 === 8) { $s = 58; continue; } + /* */ $s = 59; continue; + /* if (_r$26 === 8) { */ case 58: + _r$27 = $clone(v, reflect.Value).Bytes(); /* */ $s = 62; case 62: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } + _tmp$22 = ((x$8 = _r$27, $subslice(new bytesEncoder(x$8.$array), x$8.$offset, x$8.$offset + x$8.$length))); + _tmp$23 = $ifaceNil; + e = _tmp$22; + err = _tmp$23; + $s = -1; return [e, err]; + /* } */ case 59: + fp = new fieldParameters.ptr(false, false, false, false, ptrType$3.nil, ptrType$4.nil, 0, 0, false, false); + l = $clone(v, reflect.Value).Len(); + _4 = l; + /* */ if (_4 === (0)) { $s = 64; continue; } + /* */ if (_4 === (1)) { $s = 65; continue; } + /* */ $s = 66; continue; + /* if (_4 === (0)) { */ case 64: + _tmp$24 = (bytesEncoder.nil); + _tmp$25 = $ifaceNil; + e = _tmp$24; + err = _tmp$25; + $s = -1; return [e, err]; + /* } else if (_4 === (1)) { */ case 65: + _r$28 = $clone(v, reflect.Value).Index(0); /* */ $s = 68; case 68: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } + _r$29 = makeField($clone(_r$28, reflect.Value), $clone(fp, fieldParameters)); /* */ $s = 69; case 69: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } + _tuple$6 = _r$29; + e = _tuple$6[0]; + err = _tuple$6[1]; + $s = -1; return [e, err]; + /* } else { */ case 66: + m$1 = $makeSlice(sliceType$3, l); + i$2 = 0; + /* while (true) { */ case 70: + /* if (!(i$2 < l)) { break; } */ if(!(i$2 < l)) { $s = 71; continue; } + _r$30 = $clone(v, reflect.Value).Index(i$2); /* */ $s = 72; case 72: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } + _r$31 = makeField($clone(_r$30, reflect.Value), $clone(fp, fieldParameters)); /* */ $s = 73; case 73: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } + _tuple$7 = _r$31; + ((i$2 < 0 || i$2 >= m$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : m$1.$array[m$1.$offset + i$2] = _tuple$7[0]); + err = _tuple$7[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$26 = $ifaceNil; + _tmp$27 = err; + e = _tmp$26; + err = _tmp$27; + $s = -1; return [e, err]; + } + i$2 = i$2 + (1) >> 0; + /* } */ $s = 70; continue; case 71: + _tmp$28 = ($subslice(new multiEncoder(m$1.$array), m$1.$offset, m$1.$offset + m$1.$length)); + _tmp$29 = $ifaceNil; + e = _tmp$28; + err = _tmp$29; + $s = -1; return [e, err]; + /* } */ case 67: + case 63: + $s = 26; continue; + /* } else if (_2 === (24)) { */ case 25: + _5 = params.stringType; + /* */ if (_5 === (22)) { $s = 75; continue; } + /* */ if (_5 === (19)) { $s = 76; continue; } + /* */ if (_5 === (18)) { $s = 77; continue; } + /* */ $s = 78; continue; + /* if (_5 === (22)) { */ case 75: + _r$32 = $clone(v, reflect.Value).String(); /* */ $s = 80; case 80: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } + _r$33 = makeIA5String(_r$32); /* */ $s = 81; case 81: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } + _tuple$8 = _r$33; + e = _tuple$8[0]; + err = _tuple$8[1]; + $s = -1; return [e, err]; + /* } else if (_5 === (19)) { */ case 76: + _r$34 = $clone(v, reflect.Value).String(); /* */ $s = 82; case 82: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } + _r$35 = makePrintableString(_r$34); /* */ $s = 83; case 83: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } + _tuple$9 = _r$35; + e = _tuple$9[0]; + err = _tuple$9[1]; + $s = -1; return [e, err]; + /* } else if (_5 === (18)) { */ case 77: + _r$36 = $clone(v, reflect.Value).String(); /* */ $s = 84; case 84: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } + _r$37 = makeNumericString(_r$36); /* */ $s = 85; case 85: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } + _tuple$10 = _r$37; + e = _tuple$10[0]; + err = _tuple$10[1]; + $s = -1; return [e, err]; + /* } else { */ case 78: + _r$38 = $clone(v, reflect.Value).String(); /* */ $s = 86; case 86: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } + _r$39 = makeUTF8String(_r$38); /* */ $s = 87; case 87: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } + _tmp$30 = _r$39; + _tmp$31 = $ifaceNil; + e = _tmp$30; + err = _tmp$31; + $s = -1; return [e, err]; + /* } */ case 79: + case 74: + /* } */ case 26: + case 20: + _tmp$32 = $ifaceNil; + _tmp$33 = (x$9 = new StructuralError.ptr("unknown Go type"), new x$9.constructor.elem(x$9)); + e = _tmp$32; + err = _tmp$33; + $s = -1; return [e, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: makeBody }; } $f._1 = _1; $f._2 = _2; $f._3 = _3; $f._4 = _4; $f._5 = _5; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$27 = _r$27; $f._r$28 = _r$28; $f._r$29 = _r$29; $f._r$3 = _r$3; $f._r$30 = _r$30; $f._r$31 = _r$31; $f._r$32 = _r$32; $f._r$33 = _r$33; $f._r$34 = _r$34; $f._r$35 = _r$35; $f._r$36 = _r$36; $f._r$37 = _r$37; $f._r$38 = _r$38; $f._r$39 = _r$39; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$3 = _tmp$3; $f._tmp$30 = _tmp$30; $f._tmp$31 = _tmp$31; $f._tmp$32 = _tmp$32; $f._tmp$33 = _tmp$33; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f._v = _v; $f.bytes = bytes; $f.e = e; $f.err = err; $f.fp = fp; $f.i = i; $f.i$1 = i$1; $f.i$2 = i$2; $f.l = l; $f.m = m; $f.m$1 = m$1; $f.n = n; $f.n1 = n1; $f.params = params; $f.s = s; $f.sliceType$4 = sliceType$4; $f.startingField = startingField; $f.t = t; $f.t$1 = t$1; $f.v = v; $f.value = value; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + makeField = function(v, params) { + var _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _rune, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, bodyLen, class$1, defaultValue, e, err, isCompound, matchAny, ok, params, r, rv, t, t$1, tag, tt, v, x$10, x$11, x$12, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _arg$5 = $f._arg$5; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _rune = $f._rune; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; _v$1 = $f._v$1; bodyLen = $f.bodyLen; class$1 = $f.class$1; defaultValue = $f.defaultValue; e = $f.e; err = $f.err; isCompound = $f.isCompound; matchAny = $f.matchAny; ok = $f.ok; params = $f.params; r = $f.r; rv = $f.rv; t = $f.t; t$1 = $f.t$1; tag = $f.tag; tt = $f.tt; v = $f.v; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = $ifaceNil; + err = $ifaceNil; + /* */ if (!$clone(v, reflect.Value).IsValid()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!$clone(v, reflect.Value).IsValid()) { */ case 1: + _tmp = $ifaceNil; + _r = fmt.Errorf("asn1: cannot marshal nil value", new sliceType$2([])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tmp$1 = _r; + e = _tmp; + err = _tmp$1; + $s = -1; return [e, err]; + /* } */ case 2: + if (!($clone(v, reflect.Value).Kind() === 20)) { _v = false; $s = 6; continue s; } + _r$1 = $clone(v, reflect.Value).Type().NumMethod(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1 === 0; case 6: + /* */ if (_v) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_v) { */ case 4: + _r$2 = $clone(v, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = makeField($clone(_r$2, reflect.Value), $clone(params, fieldParameters)); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + e = _tuple[0]; + err = _tuple[1]; + $s = -1; return [e, err]; + /* } */ case 5: + if (($clone(v, reflect.Value).Kind() === 23) && ($clone(v, reflect.Value).Len() === 0) && params.omitEmpty) { + _tmp$2 = (bytesEncoder.nil); + _tmp$3 = $ifaceNil; + e = _tmp$2; + err = _tmp$3; + $s = -1; return [e, err]; + } + /* */ if (params.optional && !(params.defaultValue === ptrType$3.nil) && canHaveDefaultValue($clone(v, reflect.Value).Kind())) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (params.optional && !(params.defaultValue === ptrType$3.nil) && canHaveDefaultValue($clone(v, reflect.Value).Kind())) { */ case 10: + _r$4 = $clone(reflect.New($clone(v, reflect.Value).Type()), reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + defaultValue = _r$4; + $clone(defaultValue, reflect.Value).SetInt(params.defaultValue.$get()); + _r$5 = $clone(v, reflect.Value).Interface(); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _arg = _r$5; + _r$6 = $clone(defaultValue, reflect.Value).Interface(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _arg$1 = _r$6; + _r$7 = reflect.DeepEqual(_arg, _arg$1); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + /* */ if (_r$7) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (_r$7) { */ case 13: + _tmp$4 = (bytesEncoder.nil); + _tmp$5 = $ifaceNil; + e = _tmp$4; + err = _tmp$5; + $s = -1; return [e, err]; + /* } */ case 14: + /* } */ case 11: + /* */ if (params.optional && params.defaultValue === ptrType$3.nil) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (params.optional && params.defaultValue === ptrType$3.nil) { */ case 18: + _r$8 = $clone(v, reflect.Value).Interface(); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _arg$2 = _r$8; + _r$9 = reflect.Zero($clone(v, reflect.Value).Type()); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = $clone(_r$9, reflect.Value).Interface(); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg$3 = _r$10; + _r$11 = reflect.DeepEqual(_arg$2, _arg$3); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + /* */ if (_r$11) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (_r$11) { */ case 20: + _tmp$6 = (bytesEncoder.nil); + _tmp$7 = $ifaceNil; + e = _tmp$6; + err = _tmp$7; + $s = -1; return [e, err]; + /* } */ case 21: + /* } */ case 19: + /* */ if ($interfaceIsEqual($clone(v, reflect.Value).Type(), rawValueType)) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if ($interfaceIsEqual($clone(v, reflect.Value).Type(), rawValueType)) { */ case 26: + _r$12 = $clone(v, reflect.Value).Interface(); /* */ $s = 28; case 28: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + rv = $clone($assertType(_r$12, RawValue), RawValue); + if (!((rv.FullBytes.$length === 0))) { + _tmp$8 = ((x$3 = rv.FullBytes, $subslice(new bytesEncoder(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length))); + _tmp$9 = $ifaceNil; + e = _tmp$8; + err = _tmp$9; + $s = -1; return [e, err]; + } + t = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); + t.tag = ((x$4 = appendTagAndLength($subslice(new sliceType(t.scratch), 0, 0), new tagAndLength.ptr(rv.Class, rv.Tag, rv.Bytes.$length, rv.IsCompound)), $subslice(new bytesEncoder(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length))); + t.body = ((x$5 = rv.Bytes, $subslice(new bytesEncoder(x$5.$array), x$5.$offset, x$5.$offset + x$5.$length))); + _tmp$10 = t; + _tmp$11 = $ifaceNil; + e = _tmp$10; + err = _tmp$11; + $s = -1; return [e, err]; + /* } */ case 27: + _r$13 = getUniversalType($clone(v, reflect.Value).Type()); /* */ $s = 29; case 29: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$1 = _r$13; + matchAny = _tuple$1[0]; + tag = _tuple$1[1]; + isCompound = _tuple$1[2]; + ok = _tuple$1[3]; + /* */ if (!ok || matchAny) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!ok || matchAny) { */ case 30: + _tmp$12 = $ifaceNil; + _r$14 = fmt.Sprintf("unknown Go type: %v", new sliceType$2([$clone(v, reflect.Value).Type()])); /* */ $s = 32; case 32: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tmp$13 = (x$6 = new StructuralError.ptr(_r$14), new x$6.constructor.elem(x$6)); + e = _tmp$12; + err = _tmp$13; + $s = -1; return [e, err]; + /* } */ case 31: + if (!((params.timeType === 0)) && !((tag === 23))) { + _tmp$14 = $ifaceNil; + _tmp$15 = (x$7 = new StructuralError.ptr("explicit time type given to non-time member"), new x$7.constructor.elem(x$7)); + e = _tmp$14; + err = _tmp$15; + $s = -1; return [e, err]; + } + if (!((params.stringType === 0)) && !((tag === 19))) { + _tmp$16 = $ifaceNil; + _tmp$17 = (x$8 = new StructuralError.ptr("explicit string type given to non-string member"), new x$8.constructor.elem(x$8)); + e = _tmp$16; + err = _tmp$17; + $s = -1; return [e, err]; + } + _1 = tag; + /* */ if (_1 === (19)) { $s = 34; continue; } + /* */ if (_1 === (23)) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if (_1 === (19)) { */ case 34: + /* */ if (params.stringType === 0) { $s = 37; continue; } + /* */ $s = 38; continue; + /* if (params.stringType === 0) { */ case 37: + _r$15 = $clone(v, reflect.Value).String(); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _ref = _r$15; + _i = 0; + /* while (true) { */ case 41: + /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 42; continue; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + /* */ if (r >= 128 || !isPrintable(((r << 24 >>> 24)), false, false)) { $s = 43; continue; } + /* */ $s = 44; continue; + /* if (r >= 128 || !isPrintable(((r << 24 >>> 24)), false, false)) { */ case 43: + _r$16 = $clone(v, reflect.Value).String(); /* */ $s = 47; case 47: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$17 = utf8.ValidString(_r$16); /* */ $s = 48; case 48: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + /* */ if (!_r$17) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!_r$17) { */ case 45: + _tmp$18 = $ifaceNil; + _tmp$19 = errors.New("asn1: string not valid UTF-8"); + e = _tmp$18; + err = _tmp$19; + $s = -1; return [e, err]; + /* } */ case 46: + tag = 12; + /* break; */ $s = 42; continue; + /* } */ case 44: + _i += _rune[1]; + /* } */ $s = 41; continue; case 42: + $s = 39; continue; + /* } else { */ case 38: + tag = params.stringType; + /* } */ case 39: + $s = 36; continue; + /* } else if (_1 === (23)) { */ case 35: + if (params.timeType === 24) { _v$1 = true; $s = 51; continue s; } + _r$18 = $clone(v, reflect.Value).Interface(); /* */ $s = 52; case 52: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _r$19 = outsideUTCRange($clone($assertType(_r$18, time.Time), time.Time)); /* */ $s = 53; case 53: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _v$1 = _r$19; case 51: + /* */ if (_v$1) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (_v$1) { */ case 49: + tag = 24; + /* } */ case 50: + /* } */ case 36: + case 33: + if (params.set) { + if (!((tag === 16))) { + _tmp$20 = $ifaceNil; + _tmp$21 = (x$9 = new StructuralError.ptr("non sequence tagged as set"), new x$9.constructor.elem(x$9)); + e = _tmp$20; + err = _tmp$21; + $s = -1; return [e, err]; + } + tag = 17; + } + t$1 = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); + _r$20 = makeBody($clone(v, reflect.Value), $clone(params, fieldParameters)); /* */ $s = 54; case 54: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _tuple$2 = _r$20; + t$1.body = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$22 = $ifaceNil; + _tmp$23 = err; + e = _tmp$22; + err = _tmp$23; + $s = -1; return [e, err]; + } + _r$21 = t$1.body.Len(); /* */ $s = 55; case 55: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + bodyLen = _r$21; + class$1 = 0; + /* */ if (!(params.tag === ptrType$4.nil)) { $s = 56; continue; } + /* */ $s = 57; continue; + /* if (!(params.tag === ptrType$4.nil)) { */ case 56: + if (params.application) { + class$1 = 1; + } else if (params.private$3) { + class$1 = 3; + } else { + class$1 = 2; + } + /* */ if (params.explicit) { $s = 58; continue; } + /* */ $s = 59; continue; + /* if (params.explicit) { */ case 58: + t$1.tag = ((x$10 = appendTagAndLength($subslice(new sliceType(t$1.scratch), 0, 0), new tagAndLength.ptr(0, tag, bodyLen, isCompound)), $subslice(new bytesEncoder(x$10.$array), x$10.$offset, x$10.$offset + x$10.$length))); + tt = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); + tt.body = t$1; + _arg$4 = $subslice(new sliceType(tt.scratch), 0, 0); + _r$22 = t$1.tag.Len(); /* */ $s = 60; case 60: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _arg$5 = new tagAndLength.ptr(class$1, params.tag.$get(), bodyLen + _r$22 >> 0, true); + _r$23 = appendTagAndLength(_arg$4, _arg$5); /* */ $s = 61; case 61: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + tt.tag = ((x$11 = _r$23, $subslice(new bytesEncoder(x$11.$array), x$11.$offset, x$11.$offset + x$11.$length))); + _tmp$24 = tt; + _tmp$25 = $ifaceNil; + e = _tmp$24; + err = _tmp$25; + $s = -1; return [e, err]; + /* } */ case 59: + tag = params.tag.$get(); + /* } */ case 57: + t$1.tag = ((x$12 = appendTagAndLength($subslice(new sliceType(t$1.scratch), 0, 0), new tagAndLength.ptr(class$1, tag, bodyLen, isCompound)), $subslice(new bytesEncoder(x$12.$array), x$12.$offset, x$12.$offset + x$12.$length))); + _tmp$26 = t$1; + _tmp$27 = $ifaceNil; + e = _tmp$26; + err = _tmp$27; + $s = -1; return [e, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: makeField }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._arg$5 = _arg$5; $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._rune = _rune; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f._v$1 = _v$1; $f.bodyLen = bodyLen; $f.class$1 = class$1; $f.defaultValue = defaultValue; $f.e = e; $f.err = err; $f.isCompound = isCompound; $f.matchAny = matchAny; $f.ok = ok; $f.params = params; $f.r = r; $f.rv = rv; $f.t = t; $f.t$1 = t$1; $f.tag = tag; $f.tt = tt; $f.v = v; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + Marshal = function(val) { + var _r, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = MarshalWithParams(val, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Marshal }; } $f._r = _r; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Marshal = Marshal; + MarshalWithParams = function(val, params) { + var _r, _r$1, _r$2, _tuple, b, e, err, params, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; b = $f.b; e = $f.e; err = $f.err; params = $f.params; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = reflect.ValueOf(val); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = makeField($clone(_r, reflect.Value), $clone(parseFieldParameters(params), fieldParameters)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + e = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + _r$2 = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + b = $makeSlice(sliceType, _r$2); + $r = e.Encode(b); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [b, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: MarshalWithParams }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.b = b; $f.e = e; $f.err = err; $f.params = params; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.MarshalWithParams = MarshalWithParams; + StructuralError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + SyntaxError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + BitString.methods = [{prop: "At", name: "At", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "RightAlign", name: "RightAlign", pkg: "", typ: $funcType([], [sliceType], false)}]; + ObjectIdentifier.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ObjectIdentifier], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + byteEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + bytesEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + stringEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + multiEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + ptrType$5.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + int64Encoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + bitStringEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + oidEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; + StructuralError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); + SyntaxError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); + BitString.init("", [{prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "BitLength", name: "BitLength", embedded: false, exported: true, typ: $Int, tag: ""}]); + ObjectIdentifier.init($Int); + RawValue.init("", [{prop: "Class", name: "Class", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Tag", name: "Tag", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "IsCompound", name: "IsCompound", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "FullBytes", name: "FullBytes", embedded: false, exported: true, typ: sliceType, tag: ""}]); + RawContent.init($Uint8); + tagAndLength.init("encoding/asn1", [{prop: "class$0", name: "class", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "length", name: "length", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isCompound", name: "isCompound", embedded: false, exported: false, typ: $Bool, tag: ""}]); + fieldParameters.init("encoding/asn1", [{prop: "optional", name: "optional", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "explicit", name: "explicit", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "application", name: "application", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "private$3", name: "private", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "defaultValue", name: "defaultValue", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "stringType", name: "stringType", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "timeType", name: "timeType", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "set", name: "set", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "omitEmpty", name: "omitEmpty", embedded: false, exported: false, typ: $Bool, tag: ""}]); + encoder.init([{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}]); + bytesEncoder.init($Uint8); + multiEncoder.init(encoder); + taggedEncoder.init("encoding/asn1", [{prop: "scratch", name: "scratch", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: encoder, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: encoder, tag: ""}]); + bitStringEncoder.init("", [{prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "BitLength", name: "BitLength", embedded: false, exported: true, typ: $Int, tag: ""}]); + oidEncoder.init($Int); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + bigOne = big.NewInt(new $Int64(0, 1)); + bitStringType = reflect.TypeOf((x = new BitString.ptr(sliceType.nil, 0), new x.constructor.elem(x))); + objectIdentifierType = reflect.TypeOf(new ObjectIdentifier([])); + enumeratedType = reflect.TypeOf(new Enumerated(0)); + flagType = reflect.TypeOf(new Flag(false)); + timeType = reflect.TypeOf((x$1 = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new x$1.constructor.elem(x$1))); + rawValueType = reflect.TypeOf((x$2 = new RawValue.ptr(0, 0, false, sliceType.nil, sliceType.nil), new x$2.constructor.elem(x$2))); + rawContentsType = reflect.TypeOf((RawContent.nil)); + bigIntType = reflect.TypeOf(new big.Int.ptr(false, big.nat.nil)); + $pkg.NullRawValue = new RawValue.ptr(0, 5, false, sliceType.nil, sliceType.nil); + $pkg.NullBytes = new sliceType([5, 0]); + byte00Encoder = new byteEncoder(0); + byteFFEncoder = new byteEncoder(255); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/ecdsa"] = (function() { + var $pkg = {}, $init, crypto, aes, cipher, elliptic, randutil, sha512, asn1, errors, io, big, invertible, combinedMult, PublicKey, PrivateKey, ecdsaSignature, zr, sliceType, ptrType, ptrType$1, ptrType$2, one, errZeroParam, zeroReader, randFieldElement, hashToInt, fermatInverse, Sign, Verify; + crypto = $packages["crypto"]; + aes = $packages["crypto/aes"]; + cipher = $packages["crypto/cipher"]; + elliptic = $packages["crypto/elliptic"]; + randutil = $packages["crypto/internal/randutil"]; + sha512 = $packages["crypto/sha512"]; + asn1 = $packages["encoding/asn1"]; + errors = $packages["errors"]; + io = $packages["io"]; + big = $packages["math/big"]; + invertible = $pkg.invertible = $newType(8, $kindInterface, "ecdsa.invertible", true, "crypto/ecdsa", false, null); + combinedMult = $pkg.combinedMult = $newType(8, $kindInterface, "ecdsa.combinedMult", true, "crypto/ecdsa", false, null); + PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "ecdsa.PublicKey", true, "crypto/ecdsa", true, function(Curve_, X_, Y_) { + this.$val = this; + if (arguments.length === 0) { + this.Curve = $ifaceNil; + this.X = ptrType.nil; + this.Y = ptrType.nil; + return; + } + this.Curve = Curve_; + this.X = X_; + this.Y = Y_; + }); + PrivateKey = $pkg.PrivateKey = $newType(0, $kindStruct, "ecdsa.PrivateKey", true, "crypto/ecdsa", true, function(PublicKey_, D_) { + this.$val = this; + if (arguments.length === 0) { + this.PublicKey = new PublicKey.ptr($ifaceNil, ptrType.nil, ptrType.nil); + this.D = ptrType.nil; + return; + } + this.PublicKey = PublicKey_; + this.D = D_; + }); + ecdsaSignature = $pkg.ecdsaSignature = $newType(0, $kindStruct, "ecdsa.ecdsaSignature", true, "crypto/ecdsa", false, function(R_, S_) { + this.$val = this; + if (arguments.length === 0) { + this.R = ptrType.nil; + this.S = ptrType.nil; + return; + } + this.R = R_; + this.S = S_; + }); + zr = $pkg.zr = $newType(0, $kindStruct, "ecdsa.zr", true, "crypto/ecdsa", false, function(Reader_) { + this.$val = this; + if (arguments.length === 0) { + this.Reader = $ifaceNil; + return; + } + this.Reader = Reader_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(big.Int); + ptrType$1 = $ptrType(PrivateKey); + ptrType$2 = $ptrType(zr); + PrivateKey.ptr.prototype.Public = function() { + var priv; + priv = this; + return priv.PublicKey; + }; + PrivateKey.prototype.Public = function() { return this.$val.Public(); }; + PrivateKey.ptr.prototype.Sign = function(rand, digest, opts) { + var _r, _r$1, _tuple, digest, err, opts, priv, r, rand, s, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; digest = $f.digest; err = $f.err; opts = $f.opts; priv = $f.priv; r = $f.r; rand = $f.rand; s = $f.s; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = this; + _r = Sign(rand, priv, digest); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + r = _tuple[0]; + s = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + _r$1 = asn1.Marshal((x = new ecdsaSignature.ptr(r, s), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: PrivateKey.ptr.prototype.Sign }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.digest = digest; $f.err = err; $f.opts = opts; $f.priv = priv; $f.r = r; $f.rand = rand; $f.s = s; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.prototype.Sign = function(rand, digest, opts) { return this.$val.Sign(rand, digest, opts); }; + randFieldElement = function(c, rand) { + var _q, _r, _r$1, _r$2, _tuple, b, c, err, k, n, params, rand, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; b = $f.b; c = $f.c; err = $f.err; k = $f.k; n = $f.n; params = $f.params; rand = $f.rand; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + k = ptrType.nil; + err = $ifaceNil; + _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + params = _r; + b = $makeSlice(sliceType, ((_q = params.BitSize / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 8 >> 0)); + _r$1 = io.ReadFull(rand, b); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [k, err]; + } + k = new big.Int.ptr(false, big.nat.nil).SetBytes(b); + n = new big.Int.ptr(false, big.nat.nil).Sub(params.N, one); + _r$2 = k.Mod(k, n); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + k.Add(k, one); + $s = -1; return [k, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: randFieldElement }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.b = b; $f.c = c; $f.err = err; $f.k = k; $f.n = n; $f.params = params; $f.rand = rand; $f.$s = $s; $f.$r = $r; return $f; + }; + hashToInt = function(hash, c) { + var _q, _r, _r$1, c, excess, hash, orderBits, orderBytes, ret, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; c = $f.c; excess = $f.excess; hash = $f.hash; orderBits = $f.orderBits; orderBytes = $f.orderBytes; ret = $f.ret; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = _r.N.BitLen(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + orderBits = _r$1; + orderBytes = (_q = ((orderBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (hash.$length > orderBytes) { + hash = $subslice(hash, 0, orderBytes); + } + ret = new big.Int.ptr(false, big.nat.nil).SetBytes(hash); + excess = ($imul(hash.$length, 8)) - orderBits >> 0; + if (excess > 0) { + ret.Rsh(ret, ((excess >>> 0))); + } + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: hashToInt }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f.c = c; $f.excess = excess; $f.hash = hash; $f.orderBits = orderBits; $f.orderBytes = orderBytes; $f.ret = ret; $f.$s = $s; $f.$r = $r; return $f; + }; + fermatInverse = function(k, N) { + var N, _r, k, nMinus2, two, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; N = $f.N; _r = $f._r; k = $f.k; nMinus2 = $f.nMinus2; two = $f.two; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + two = big.NewInt(new $Int64(0, 2)); + nMinus2 = new big.Int.ptr(false, big.nat.nil).Sub(N, two); + _r = new big.Int.ptr(false, big.nat.nil).Exp(k, nMinus2, N); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: fermatInverse }; } $f.N = N; $f._r = _r; $f.k = k; $f.nMinus2 = nMinus2; $f.two = two; $f.$s = $s; $f.$r = $r; return $f; + }; + Sign = function(rand, priv, hash) { + var N, _q, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, block, c, csprng, e, entropy, entropylen, err, hash, in$1, k, kInv, key, md, ok, priv, r, rand, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; N = $f.N; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; block = $f.block; c = $f.c; csprng = $f.csprng; e = $f.e; entropy = $f.entropy; entropylen = $f.entropylen; err = $f.err; hash = $f.hash; in$1 = $f.in$1; k = $f.k; kInv = $f.kInv; key = $f.key; md = $f.md; ok = $f.ok; priv = $f.priv; r = $f.r; rand = $f.rand; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = ptrType.nil; + s = ptrType.nil; + err = $ifaceNil; + $r = randutil.MaybeReadByte(rand); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = priv.PublicKey.Curve.Params(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + entropylen = (_q = ((_r.BitSize + 7 >> 0)) / 16, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (entropylen > 32) { + entropylen = 32; + } + entropy = $makeSlice(sliceType, entropylen); + _r$1 = io.ReadFull(rand, entropy); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [r, s, err]; + } + md = sha512.New(); + _r$2 = md.Write(priv.D.Bytes()); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = md.Write(entropy); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = md.Write(hash); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = md.Sum(sliceType.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + key = $subslice(_r$5, 0, 32); + _tuple$1 = aes.NewCipher(key); + block = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType.nil; + _tmp$1 = ptrType.nil; + _tmp$2 = err; + r = _tmp; + s = _tmp$1; + err = _tmp$2; + $s = -1; return [r, s, err]; + } + _r$6 = cipher.NewCTR(block, (new sliceType($stringToBytes("IV for ECDSA CTR")))); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + csprng = new cipher.StreamReader.ptr(_r$6, zeroReader); + c = priv.PublicKey.Curve; + _r$7 = c.Params(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + N = _r$7.N; + if (N.Sign() === 0) { + _tmp$3 = ptrType.nil; + _tmp$4 = ptrType.nil; + _tmp$5 = errZeroParam; + r = _tmp$3; + s = _tmp$4; + err = _tmp$5; + $s = -1; return [r, s, err]; + } + _tmp$6 = ptrType.nil; + _tmp$7 = ptrType.nil; + k = _tmp$6; + kInv = _tmp$7; + /* while (true) { */ case 10: + /* while (true) { */ case 12: + _r$8 = randFieldElement(c, new csprng.constructor.elem(csprng)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$2 = _r$8; + k = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + r = ptrType.nil; + $s = -1; return [r, s, err]; + } + _tuple$3 = $assertType(priv.PublicKey.Curve, invertible, true); + in$1 = _tuple$3[0]; + ok = _tuple$3[1]; + /* */ if (ok) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (ok) { */ case 15: + _r$9 = in$1.Inverse(k); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + kInv = _r$9; + $s = 17; continue; + /* } else { */ case 16: + _r$10 = fermatInverse(k, N); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + kInv = _r$10; + /* } */ case 17: + _r$11 = priv.PublicKey.Curve.ScalarBaseMult(k.Bytes()); /* */ $s = 20; case 20: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$4 = _r$11; + r = _tuple$4[0]; + _r$12 = r.Mod(r, N); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + if (!((r.Sign() === 0))) { + /* break; */ $s = 13; continue; + } + /* } */ $s = 12; continue; case 13: + _r$13 = hashToInt(hash, c); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + e = _r$13; + s = new big.Int.ptr(false, big.nat.nil).Mul(priv.D, r); + s.Add(s, e); + s.Mul(s, kInv); + _r$14 = s.Mod(s, N); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + if (!((s.Sign() === 0))) { + /* break; */ $s = 11; continue; + } + /* } */ $s = 10; continue; case 11: + $s = -1; return [r, s, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Sign }; } $f.N = N; $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.block = block; $f.c = c; $f.csprng = csprng; $f.e = e; $f.entropy = entropy; $f.entropylen = entropylen; $f.err = err; $f.hash = hash; $f.in$1 = in$1; $f.k = k; $f.kInv = kInv; $f.key = key; $f.md = md; $f.ok = ok; $f.priv = priv; $f.r = r; $f.rand = rand; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Sign = Sign; + Verify = function(pub, hash, r, s) { + var N, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, e, hash, in$1, ok, ok$1, opt, pub, r, s, u1, u2, w, x, x1, x2, y, y1, y2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; N = $f.N; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; c = $f.c; e = $f.e; hash = $f.hash; in$1 = $f.in$1; ok = $f.ok; ok$1 = $f.ok$1; opt = $f.opt; pub = $f.pub; r = $f.r; s = $f.s; u1 = $f.u1; u2 = $f.u2; w = $f.w; x = $f.x; x1 = $f.x1; x2 = $f.x2; y = $f.y; y1 = $f.y1; y2 = $f.y2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = pub.Curve; + _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + N = _r.N; + if (r.Sign() <= 0 || s.Sign() <= 0) { + $s = -1; return false; + } + if (r.Cmp(N) >= 0 || s.Cmp(N) >= 0) { + $s = -1; return false; + } + _r$1 = hashToInt(hash, c); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + e = _r$1; + w = ptrType.nil; + _tuple = $assertType(c, invertible, true); + in$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (ok) { */ case 3: + _r$2 = in$1.Inverse(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + w = _r$2; + $s = 5; continue; + /* } else { */ case 4: + _r$3 = new big.Int.ptr(false, big.nat.nil).ModInverse(s, N); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + w = _r$3; + /* } */ case 5: + u1 = e.Mul(e, w); + _r$4 = u1.Mod(u1, N); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + u2 = w.Mul(r, w); + _r$5 = u2.Mod(u2, N); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _tmp = ptrType.nil; + _tmp$1 = ptrType.nil; + x = _tmp; + y = _tmp$1; + _tuple$1 = $assertType(c, combinedMult, true); + opt = _tuple$1[0]; + ok$1 = _tuple$1[1]; + /* */ if (ok$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (ok$1) { */ case 10: + _r$6 = opt.CombinedMult(pub.X, pub.Y, u1.Bytes(), u2.Bytes()); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + x = _tuple$2[0]; + y = _tuple$2[1]; + $s = 12; continue; + /* } else { */ case 11: + _r$7 = c.ScalarBaseMult(u1.Bytes()); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$3 = _r$7; + x1 = _tuple$3[0]; + y1 = _tuple$3[1]; + _r$8 = c.ScalarMult(pub.X, pub.Y, u2.Bytes()); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$4 = _r$8; + x2 = _tuple$4[0]; + y2 = _tuple$4[1]; + _r$9 = c.Add(x1, y1, x2, y2); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$5 = _r$9; + x = _tuple$5[0]; + y = _tuple$5[1]; + /* } */ case 12: + if ((x.Sign() === 0) && (y.Sign() === 0)) { + $s = -1; return false; + } + _r$10 = x.Mod(x, N); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return x.Cmp(r) === 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Verify }; } $f.N = N; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.c = c; $f.e = e; $f.hash = hash; $f.in$1 = in$1; $f.ok = ok; $f.ok$1 = ok$1; $f.opt = opt; $f.pub = pub; $f.r = r; $f.s = s; $f.u1 = u1; $f.u2 = u2; $f.w = w; $f.x = x; $f.x1 = x1; $f.x2 = x2; $f.y = y; $f.y1 = y1; $f.y2 = y2; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Verify = Verify; + zr.ptr.prototype.Read = function(dst) { + var _i, _ref, _tmp, _tmp$1, dst, err, i, n, z; + n = 0; + err = $ifaceNil; + z = this; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = 0); + _i++; + } + _tmp = dst.$length; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + return [n, err]; + }; + zr.prototype.Read = function(dst) { return this.$val.Read(dst); }; + ptrType$1.methods = [{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [crypto.PublicKey], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.SignerOpts], [sliceType, $error], false)}]; + ptrType$2.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + invertible.init([{prop: "Inverse", name: "Inverse", pkg: "", typ: $funcType([ptrType], [ptrType], false)}]); + combinedMult.init([{prop: "CombinedMult", name: "CombinedMult", pkg: "", typ: $funcType([ptrType, ptrType, sliceType, sliceType], [ptrType, ptrType], false)}]); + PublicKey.init("", [{prop: "Curve", name: "Curve", embedded: true, exported: true, typ: elliptic.Curve, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: ptrType, tag: ""}]); + PrivateKey.init("", [{prop: "PublicKey", name: "PublicKey", embedded: true, exported: true, typ: PublicKey, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType, tag: ""}]); + ecdsaSignature.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "S", name: "S", embedded: false, exported: true, typ: ptrType, tag: ""}]); + zr.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = aes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cipher.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = elliptic.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = randutil.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha512.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = asn1.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + one = new big.Int.ptr(false, big.nat.nil).SetInt64(new $Int64(0, 1)); + errZeroParam = errors.New("zero parameter"); + zeroReader = new zr.ptr($ifaceNil); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/hmac"] = (function() { + var $pkg = {}, $init, subtle, hash, hmac, sliceType, ptrType, New; + subtle = $packages["crypto/subtle"]; + hash = $packages["hash"]; + hmac = $pkg.hmac = $newType(0, $kindStruct, "hmac.hmac", true, "crypto/hmac", false, function(size_, blocksize_, opad_, ipad_, outer_, inner_) { + this.$val = this; + if (arguments.length === 0) { + this.size = 0; + this.blocksize = 0; + this.opad = sliceType.nil; + this.ipad = sliceType.nil; + this.outer = $ifaceNil; + this.inner = $ifaceNil; + return; + } + this.size = size_; + this.blocksize = blocksize_; + this.opad = opad_; + this.ipad = ipad_; + this.outer = outer_; + this.inner = inner_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(hmac); + hmac.ptr.prototype.Sum = function(in$1) { + var _r, _r$1, _r$2, _r$3, h, in$1, origLen, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; h = $f.h; in$1 = $f.in$1; origLen = $f.origLen; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + origLen = in$1.$length; + _r = h.inner.Sum(in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + in$1 = _r; + $r = h.outer.Reset(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = h.outer.Write(h.opad); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = h.outer.Write($subslice(in$1, origLen)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = h.outer.Sum($subslice(in$1, 0, origLen)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: hmac.ptr.prototype.Sum }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.h = h; $f.in$1 = in$1; $f.origLen = origLen; $f.$s = $s; $f.$r = $r; return $f; + }; + hmac.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; + hmac.ptr.prototype.Write = function(p) { + var _r, _tuple, err, h, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; h = $f.h; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + h = this; + _r = h.inner.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: hmac.ptr.prototype.Write }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.h = h; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + hmac.prototype.Write = function(p) { return this.$val.Write(p); }; + hmac.ptr.prototype.Size = function() { + var h; + h = this; + return h.size; + }; + hmac.prototype.Size = function() { return this.$val.Size(); }; + hmac.ptr.prototype.BlockSize = function() { + var h; + h = this; + return h.blocksize; + }; + hmac.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + hmac.ptr.prototype.Reset = function() { + var _r, h, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; h = $f.h; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + $r = h.inner.Reset(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = h.inner.Write(h.ipad); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: hmac.ptr.prototype.Reset }; } $f._r = _r; $f.h = h; $f.$s = $s; $f.$r = $r; return $f; + }; + hmac.prototype.Reset = function() { return this.$val.Reset(); }; + New = function(h, key) { + var _i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _ref$1, h, hm, i, i$1, key, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _ref$1 = $f._ref$1; h = $f.h; hm = $f.hm; i = $f.i; i$1 = $f.i$1; key = $f.key; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hm = new hmac.ptr(0, 0, sliceType.nil, sliceType.nil, $ifaceNil, $ifaceNil); + _r = h(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hm.outer = _r; + _r$1 = h(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + hm.inner = _r$1; + _r$2 = hm.inner.Size(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + hm.size = _r$2; + _r$3 = hm.inner.BlockSize(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + hm.blocksize = _r$3; + hm.ipad = $makeSlice(sliceType, hm.blocksize); + hm.opad = $makeSlice(sliceType, hm.blocksize); + /* */ if (key.$length > hm.blocksize) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (key.$length > hm.blocksize) { */ case 5: + _r$4 = hm.outer.Write(key); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = hm.outer.Sum(sliceType.nil); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + key = _r$5; + /* } */ case 6: + $copySlice(hm.ipad, key); + $copySlice(hm.opad, key); + _ref = hm.ipad; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + (x$1 = hm.ipad, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i] = (((x = hm.ipad, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])) ^ (54)) << 24 >>> 24))); + _i++; + } + _ref$1 = hm.opad; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + (x$3 = hm.opad, ((i$1 < 0 || i$1 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$1] = (((x$2 = hm.opad, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1])) ^ (92)) << 24 >>> 24))); + _i$1++; + } + _r$6 = hm.inner.Write(hm.ipad); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = -1; return hm; + /* */ } return; } if ($f === undefined) { $f = { $blk: New }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._ref$1 = _ref$1; $f.h = h; $f.hm = hm; $f.i = i; $f.i$1 = i$1; $f.key = key; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.New = New; + ptrType.methods = [{prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}]; + hmac.init("crypto/hmac", [{prop: "size", name: "size", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "blocksize", name: "blocksize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "opad", name: "opad", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "ipad", name: "ipad", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "outer", name: "outer", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "inner", name: "inner", embedded: false, exported: false, typ: hash.Hash, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/md5"] = (function() { + var $pkg = {}, $init, crypto, errors, hash, runtime, digest, sliceType, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, ptrType, ptrType$1, littleEndian, block, init, appendUint64, appendUint32, consumeUint64, consumeUint32, New, init$1, blockGeneric; + crypto = $packages["crypto"]; + errors = $packages["errors"]; + hash = $packages["hash"]; + runtime = $packages["runtime"]; + digest = $pkg.digest = $newType(0, $kindStruct, "md5.digest", true, "crypto/md5", false, function(s_, x_, nx_, len_) { + this.$val = this; + if (arguments.length === 0) { + this.s = arrayType.zero(); + this.x = arrayType$1.zero(); + this.nx = 0; + this.len = new $Uint64(0, 0); + return; + } + this.s = s_; + this.x = x_; + this.nx = nx_; + this.len = len_; + }); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint32, 4); + arrayType$1 = $arrayType($Uint8, 64); + arrayType$2 = $arrayType($Uint8, 16); + arrayType$3 = $arrayType($Uint8, 4); + arrayType$4 = $arrayType($Uint32, 16); + ptrType = $ptrType(arrayType$4); + ptrType$1 = $ptrType(digest); + init = function() { + crypto.RegisterHash(2, New); + }; + digest.ptr.prototype.Reset = function() { + var d; + d = this; + d.s[0] = 1732584193; + d.s[1] = 4023233417; + d.s[2] = 2562383102; + d.s[3] = 271733878; + d.nx = 0; + d.len = new $Uint64(0, 0); + }; + digest.prototype.Reset = function() { return this.$val.Reset(); }; + digest.ptr.prototype.MarshalBinary = function() { + var b, d; + d = this; + b = $makeSlice(sliceType, 0, 92); + b = $appendSlice(b, "md5\x01"); + b = appendUint32(b, d.s[0]); + b = appendUint32(b, d.s[1]); + b = appendUint32(b, d.s[2]); + b = appendUint32(b, d.s[3]); + b = $appendSlice(b, $subslice(new sliceType(d.x), 0, d.nx)); + b = $subslice(b, 0, ((b.$length + 64 >> 0) - d.nx >> 0)); + b = appendUint64(b, d.len); + return [b, $ifaceNil]; + }; + digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + digest.ptr.prototype.UnmarshalBinary = function(b) { + var _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, d; + d = this; + if (b.$length < 4 || !(($bytesToString($subslice(b, 0, 4))) === "md5\x01")) { + return errors.New("crypto/md5: invalid hash state identifier"); + } + if (!((b.$length === 92))) { + return errors.New("crypto/md5: invalid hash state size"); + } + b = $subslice(b, 4); + _tuple = consumeUint32(b); + b = _tuple[0]; + d.s[0] = _tuple[1]; + _tuple$1 = consumeUint32(b); + b = _tuple$1[0]; + d.s[1] = _tuple$1[1]; + _tuple$2 = consumeUint32(b); + b = _tuple$2[0]; + d.s[2] = _tuple$2[1]; + _tuple$3 = consumeUint32(b); + b = _tuple$3[0]; + d.s[3] = _tuple$3[1]; + b = $subslice(b, $copySlice(new sliceType(d.x), b)); + _tuple$4 = consumeUint64(b); + b = _tuple$4[0]; + d.len = _tuple$4[1]; + d.nx = (_r = ((d.len.$low >> 0)) % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + return $ifaceNil; + }; + digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; + appendUint64 = function(b, x) { + var a, b, x; + a = $toNativeArray($kindUint8, [(($shiftRightUint64(x, 56).$low << 24 >>> 24)), (($shiftRightUint64(x, 48).$low << 24 >>> 24)), (($shiftRightUint64(x, 40).$low << 24 >>> 24)), (($shiftRightUint64(x, 32).$low << 24 >>> 24)), (($shiftRightUint64(x, 24).$low << 24 >>> 24)), (($shiftRightUint64(x, 16).$low << 24 >>> 24)), (($shiftRightUint64(x, 8).$low << 24 >>> 24)), ((x.$low << 24 >>> 24))]); + return $appendSlice(b, new sliceType(a)); + }; + appendUint32 = function(b, x) { + var a, b, x; + a = $toNativeArray($kindUint8, [(((x >>> 24 >>> 0) << 24 >>> 24)), (((x >>> 16 >>> 0) << 24 >>> 24)), (((x >>> 8 >>> 0) << 24 >>> 24)), ((x << 24 >>> 24))]); + return $appendSlice(b, new sliceType(a)); + }; + consumeUint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + return [$subslice(b, 8), x$14]; + }; + consumeUint32 = function(b) { + var b, x; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + x = ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; + return [$subslice(b, 4), x]; + }; + New = function() { + var d; + d = new digest.ptr(arrayType.zero(), arrayType$1.zero(), 0, new $Uint64(0, 0)); + d.Reset(); + return d; + }; + $pkg.New = New; + digest.ptr.prototype.Size = function() { + var d; + d = this; + return 16; + }; + digest.prototype.Size = function() { return this.$val.Size(); }; + digest.ptr.prototype.BlockSize = function() { + var d; + d = this; + return 64; + }; + digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + digest.ptr.prototype.Write = function(p) { + var d, err, n, n$1, nn, p, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; err = $f.err; n = $f.n; n$1 = $f.n$1; nn = $f.nn; p = $f.p; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + d = this; + nn = p.$length; + d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + /* */ if (d.nx > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (d.nx > 0) { */ case 1: + n = $copySlice($subslice(new sliceType(d.x), d.nx), p); + d.nx = d.nx + (n) >> 0; + /* */ if (d.nx === 64) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (d.nx === 64) { */ case 3: + $r = block(d, new sliceType(d.x)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d.nx = 0; + /* } */ case 4: + p = $subslice(p, n); + /* } */ case 2: + /* */ if (p.$length >= 64) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (p.$length >= 64) { */ case 6: + n$1 = (p.$length & ~63) >> 0; + $r = block(d, $subslice(p, 0, n$1)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p = $subslice(p, n$1); + /* } */ case 7: + if (p.$length > 0) { + d.nx = $copySlice(new sliceType(d.x), p); + } + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Write }; } $f.d = d; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Write = function(p) { return this.$val.Write(p); }; + digest.ptr.prototype.Sum = function(in$1) { + var _r, d, d0, hash$1, in$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; d = $f.d; d0 = $f.d0; hash$1 = $f.hash$1; in$1 = $f.in$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + d0 = $clone(d, digest); + _r = d0.checkSum(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hash$1 = $clone(_r, arrayType$2); + $s = -1; return $appendSlice(in$1, new sliceType(hash$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Sum }; } $f._r = _r; $f.d = d; $f.d0 = d0; $f.hash$1 = hash$1; $f.in$1 = in$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; + digest.ptr.prototype.checkSum = function() { + var _i, _r, _r$1, _r$2, _ref, d, digest$1, i, i$1, len, s, tmp, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; d = $f.d; digest$1 = $f.digest$1; i = $f.i; i$1 = $f.i$1; len = $f.len; s = $f.s; tmp = $f.tmp; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + len = d.len; + tmp = arrayType$1.zero(); + tmp[0] = 128; + /* */ if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { */ case 1: + _r = d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$1.$high, 56 - x$1.$low))))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = 3; continue; + /* } else { */ case 2: + _r$1 = d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$2.$high, 120 - x$2.$low))))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 3: + len = $shiftLeft64(len, (3)); + i = 0; + while (true) { + if (!(i < 8)) { break; } + ((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i] = (($shiftRightUint64(len, ((8 * i >>> 0))).$low << 24 >>> 24))); + i = i + (1) >>> 0; + } + _r$2 = d.Write($subslice(new sliceType(tmp), 0, 8)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + if (!((d.nx === 0))) { + $panic(new $String("d.nx != 0")); + } + digest$1 = arrayType$2.zero(); + _ref = d.s; + _i = 0; + while (true) { + if (!(_i < 4)) { break; } + i$1 = _i; + s = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + (x$3 = $imul(i$1, 4), ((x$3 < 0 || x$3 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$3] = ((s << 24 >>> 24)))); + (x$4 = ($imul(i$1, 4)) + 1 >> 0, ((x$4 < 0 || x$4 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$4] = (((s >>> 8 >>> 0) << 24 >>> 24)))); + (x$5 = ($imul(i$1, 4)) + 2 >> 0, ((x$5 < 0 || x$5 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$5] = (((s >>> 16 >>> 0) << 24 >>> 24)))); + (x$6 = ($imul(i$1, 4)) + 3 >> 0, ((x$6 < 0 || x$6 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$6] = (((s >>> 24 >>> 0) << 24 >>> 24)))); + _i++; + } + $s = -1; return digest$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.checkSum }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f.d = d; $f.digest$1 = digest$1; $f.i = i; $f.i$1 = i$1; $f.len = len; $f.s = s; $f.tmp = tmp; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.checkSum = function() { return this.$val.checkSum(); }; + init$1 = function() { + var x, y; + x = 67305985; + y = $toNativeArray($kindUint8, [1, 2, 3, 4]); + littleEndian = $equal(x, y, arrayType$3); + }; + blockGeneric = function(dig, p) { + var X, _tmp, _tmp$1, _tmp$2, _tmp$3, a, aa, b, bb, c, cc, d, dd, dig, i, j, p, x, x$1, x$2, x$3, xbuf; + a = dig.s[0]; + b = dig.s[1]; + c = dig.s[2]; + d = dig.s[3]; + X = ptrType.nil; + xbuf = arrayType$4.zero(); + while (true) { + if (!(p.$length >= 64)) { break; } + _tmp = a; + _tmp$1 = b; + _tmp$2 = c; + _tmp$3 = d; + aa = _tmp; + bb = _tmp$1; + cc = _tmp$2; + dd = _tmp$3; + if (false) { + X = (($sliceToArray(p))); + } else if (littleEndian && ((((($sliceToArray(p))) & 3) >>> 0) === 0)) { + X = (($sliceToArray(p))); + } else { + X = xbuf; + j = 0; + i = 0; + while (true) { + if (!(i < 16)) { break; } + (x$3 = i & 15, X.nilCheck, ((x$3 < 0 || x$3 >= X.length) ? ($throwRuntimeError("index out of range"), undefined) : X[x$3] = ((((((((((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) >>> 0)) | ((((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >>> 0)) << 8 >>> 0)) >>> 0) | ((((x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$2 = j + 3 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])) >>> 0)) << 24 >>> 0)) >>> 0))); + j = j + (4) >> 0; + i = i + (1) >> 0; + } + } + a = a + ((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[0]) >>> 0) + 3614090360 >>> 0)) >>> 0; + a = (((a << 7 >>> 0) | (a >>> 25 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[1]) >>> 0) + 3905402710 >>> 0)) >>> 0; + d = (((d << 12 >>> 0) | (d >>> 20 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[2]) >>> 0) + 606105819 >>> 0)) >>> 0; + c = (((c << 17 >>> 0) | (c >>> 15 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[3]) >>> 0) + 3250441966 >>> 0)) >>> 0; + b = (((b << 22 >>> 0) | (b >>> 10 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[4]) >>> 0) + 4118548399 >>> 0)) >>> 0; + a = (((a << 7 >>> 0) | (a >>> 25 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[5]) >>> 0) + 1200080426 >>> 0)) >>> 0; + d = (((d << 12 >>> 0) | (d >>> 20 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[6]) >>> 0) + 2821735955 >>> 0)) >>> 0; + c = (((c << 17 >>> 0) | (c >>> 15 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[7]) >>> 0) + 4249261313 >>> 0)) >>> 0; + b = (((b << 22 >>> 0) | (b >>> 10 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[8]) >>> 0) + 1770035416 >>> 0)) >>> 0; + a = (((a << 7 >>> 0) | (a >>> 25 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[9]) >>> 0) + 2336552879 >>> 0)) >>> 0; + d = (((d << 12 >>> 0) | (d >>> 20 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[10]) >>> 0) + 4294925233 >>> 0)) >>> 0; + c = (((c << 17 >>> 0) | (c >>> 15 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[11]) >>> 0) + 2304563134 >>> 0)) >>> 0; + b = (((b << 22 >>> 0) | (b >>> 10 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[12]) >>> 0) + 1804603682 >>> 0)) >>> 0; + a = (((a << 7 >>> 0) | (a >>> 25 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[13]) >>> 0) + 4254626195 >>> 0)) >>> 0; + d = (((d << 12 >>> 0) | (d >>> 20 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[14]) >>> 0) + 2792965006 >>> 0)) >>> 0; + c = (((c << 17 >>> 0) | (c >>> 15 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[15]) >>> 0) + 1236535329 >>> 0)) >>> 0; + b = (((b << 22 >>> 0) | (b >>> 10 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[1]) >>> 0) + 4129170786 >>> 0)) >>> 0; + a = (((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[6]) >>> 0) + 3225465664 >>> 0)) >>> 0; + d = (((d << 9 >>> 0) | (d >>> 23 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[11]) >>> 0) + 643717713 >>> 0)) >>> 0; + c = (((c << 14 >>> 0) | (c >>> 18 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[0]) >>> 0) + 3921069994 >>> 0)) >>> 0; + b = (((b << 20 >>> 0) | (b >>> 12 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[5]) >>> 0) + 3593408605 >>> 0)) >>> 0; + a = (((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[10]) >>> 0) + 38016083 >>> 0)) >>> 0; + d = (((d << 9 >>> 0) | (d >>> 23 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[15]) >>> 0) + 3634488961 >>> 0)) >>> 0; + c = (((c << 14 >>> 0) | (c >>> 18 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[4]) >>> 0) + 3889429448 >>> 0)) >>> 0; + b = (((b << 20 >>> 0) | (b >>> 12 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[9]) >>> 0) + 568446438 >>> 0)) >>> 0; + a = (((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[14]) >>> 0) + 3275163606 >>> 0)) >>> 0; + d = (((d << 9 >>> 0) | (d >>> 23 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[3]) >>> 0) + 4107603335 >>> 0)) >>> 0; + c = (((c << 14 >>> 0) | (c >>> 18 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[8]) >>> 0) + 1163531501 >>> 0)) >>> 0; + b = (((b << 20 >>> 0) | (b >>> 12 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + (X.nilCheck, X[13]) >>> 0) + 2850285829 >>> 0)) >>> 0; + a = (((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + (X.nilCheck, X[2]) >>> 0) + 4243563512 >>> 0)) >>> 0; + d = (((d << 9 >>> 0) | (d >>> 23 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + (X.nilCheck, X[7]) >>> 0) + 1735328473 >>> 0)) >>> 0; + c = (((c << 14 >>> 0) | (c >>> 18 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + (X.nilCheck, X[12]) >>> 0) + 2368359562 >>> 0)) >>> 0; + b = (((b << 20 >>> 0) | (b >>> 12 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((b ^ c) >>> 0) ^ d) >>> 0)) + (X.nilCheck, X[5]) >>> 0) + 4294588738 >>> 0)) >>> 0; + a = (((a << 4 >>> 0) | (a >>> 28 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((a ^ b) >>> 0) ^ c) >>> 0)) + (X.nilCheck, X[8]) >>> 0) + 2272392833 >>> 0)) >>> 0; + d = (((d << 11 >>> 0) | (d >>> 21 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((d ^ a) >>> 0) ^ b) >>> 0)) + (X.nilCheck, X[11]) >>> 0) + 1839030562 >>> 0)) >>> 0; + c = (((c << 16 >>> 0) | (c >>> 16 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((c ^ d) >>> 0) ^ a) >>> 0)) + (X.nilCheck, X[14]) >>> 0) + 4259657740 >>> 0)) >>> 0; + b = (((b << 23 >>> 0) | (b >>> 9 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((b ^ c) >>> 0) ^ d) >>> 0)) + (X.nilCheck, X[1]) >>> 0) + 2763975236 >>> 0)) >>> 0; + a = (((a << 4 >>> 0) | (a >>> 28 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((a ^ b) >>> 0) ^ c) >>> 0)) + (X.nilCheck, X[4]) >>> 0) + 1272893353 >>> 0)) >>> 0; + d = (((d << 11 >>> 0) | (d >>> 21 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((d ^ a) >>> 0) ^ b) >>> 0)) + (X.nilCheck, X[7]) >>> 0) + 4139469664 >>> 0)) >>> 0; + c = (((c << 16 >>> 0) | (c >>> 16 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((c ^ d) >>> 0) ^ a) >>> 0)) + (X.nilCheck, X[10]) >>> 0) + 3200236656 >>> 0)) >>> 0; + b = (((b << 23 >>> 0) | (b >>> 9 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((b ^ c) >>> 0) ^ d) >>> 0)) + (X.nilCheck, X[13]) >>> 0) + 681279174 >>> 0)) >>> 0; + a = (((a << 4 >>> 0) | (a >>> 28 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((a ^ b) >>> 0) ^ c) >>> 0)) + (X.nilCheck, X[0]) >>> 0) + 3936430074 >>> 0)) >>> 0; + d = (((d << 11 >>> 0) | (d >>> 21 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((d ^ a) >>> 0) ^ b) >>> 0)) + (X.nilCheck, X[3]) >>> 0) + 3572445317 >>> 0)) >>> 0; + c = (((c << 16 >>> 0) | (c >>> 16 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((c ^ d) >>> 0) ^ a) >>> 0)) + (X.nilCheck, X[6]) >>> 0) + 76029189 >>> 0)) >>> 0; + b = (((b << 23 >>> 0) | (b >>> 9 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((((b ^ c) >>> 0) ^ d) >>> 0)) + (X.nilCheck, X[9]) >>> 0) + 3654602809 >>> 0)) >>> 0; + a = (((a << 4 >>> 0) | (a >>> 28 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((((a ^ b) >>> 0) ^ c) >>> 0)) + (X.nilCheck, X[12]) >>> 0) + 3873151461 >>> 0)) >>> 0; + d = (((d << 11 >>> 0) | (d >>> 21 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((((d ^ a) >>> 0) ^ b) >>> 0)) + (X.nilCheck, X[15]) >>> 0) + 530742520 >>> 0)) >>> 0; + c = (((c << 16 >>> 0) | (c >>> 16 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((((c ^ d) >>> 0) ^ a) >>> 0)) + (X.nilCheck, X[2]) >>> 0) + 3299628645 >>> 0)) >>> 0; + b = (((b << 23 >>> 0) | (b >>> 9 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[0]) >>> 0) + 4096336452 >>> 0)) >>> 0; + a = (((a << 6 >>> 0) | (a >>> 26 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[7]) >>> 0) + 1126891415 >>> 0)) >>> 0; + d = (((d << 10 >>> 0) | (d >>> 22 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[14]) >>> 0) + 2878612391 >>> 0)) >>> 0; + c = (((c << 15 >>> 0) | (c >>> 17 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[5]) >>> 0) + 4237533241 >>> 0)) >>> 0; + b = (((b << 21 >>> 0) | (b >>> 11 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[12]) >>> 0) + 1700485571 >>> 0)) >>> 0; + a = (((a << 6 >>> 0) | (a >>> 26 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[3]) >>> 0) + 2399980690 >>> 0)) >>> 0; + d = (((d << 10 >>> 0) | (d >>> 22 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[10]) >>> 0) + 4293915773 >>> 0)) >>> 0; + c = (((c << 15 >>> 0) | (c >>> 17 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[1]) >>> 0) + 2240044497 >>> 0)) >>> 0; + b = (((b << 21 >>> 0) | (b >>> 11 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[8]) >>> 0) + 1873313359 >>> 0)) >>> 0; + a = (((a << 6 >>> 0) | (a >>> 26 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[15]) >>> 0) + 4264355552 >>> 0)) >>> 0; + d = (((d << 10 >>> 0) | (d >>> 22 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[6]) >>> 0) + 2734768916 >>> 0)) >>> 0; + c = (((c << 15 >>> 0) | (c >>> 17 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[13]) >>> 0) + 1309151649 >>> 0)) >>> 0; + b = (((b << 21 >>> 0) | (b >>> 11 >>> 0)) >>> 0) + c >>> 0; + a = a + ((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[4]) >>> 0) + 4149444226 >>> 0)) >>> 0; + a = (((a << 6 >>> 0) | (a >>> 26 >>> 0)) >>> 0) + b >>> 0; + d = d + ((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[11]) >>> 0) + 3174756917 >>> 0)) >>> 0; + d = (((d << 10 >>> 0) | (d >>> 22 >>> 0)) >>> 0) + a >>> 0; + c = c + ((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[2]) >>> 0) + 718787259 >>> 0)) >>> 0; + c = (((c << 15 >>> 0) | (c >>> 17 >>> 0)) >>> 0) + d >>> 0; + b = b + ((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + (X.nilCheck, X[9]) >>> 0) + 3951481745 >>> 0)) >>> 0; + b = (((b << 21 >>> 0) | (b >>> 11 >>> 0)) >>> 0) + c >>> 0; + a = a + (aa) >>> 0; + b = b + (bb) >>> 0; + c = c + (cc) >>> 0; + d = d + (dd) >>> 0; + p = $subslice(p, 64); + } + dig.s[0] = a; + dig.s[1] = b; + dig.s[2] = c; + dig.s[3] = d; + }; + ptrType$1.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/md5", typ: $funcType([], [arrayType$2], false)}]; + digest.init("crypto/md5", [{prop: "s", name: "s", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + littleEndian = false; + block = blockGeneric; + init(); + init$1(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/rc4"] = (function() { + var $pkg = {}, $init, subtle, strconv, Cipher, KeySizeError, ptrType, arrayType, sliceType, NewCipher; + subtle = $packages["crypto/internal/subtle"]; + strconv = $packages["strconv"]; + Cipher = $pkg.Cipher = $newType(0, $kindStruct, "rc4.Cipher", true, "crypto/rc4", true, function(s_, i_, j_) { + this.$val = this; + if (arguments.length === 0) { + this.s = arrayType.zero(); + this.i = 0; + this.j = 0; + return; + } + this.s = s_; + this.i = i_; + this.j = j_; + }); + KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "rc4.KeySizeError", true, "crypto/rc4", true, null); + ptrType = $ptrType(Cipher); + arrayType = $arrayType($Uint32, 256); + sliceType = $sliceType($Uint8); + KeySizeError.prototype.Error = function() { + var k; + k = this.$val; + return "crypto/rc4: invalid key size " + strconv.Itoa(((k >> 0))); + }; + $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; + NewCipher = function(key) { + var _r, _tmp, _tmp$1, c, i, i$1, j, k, key, x, x$1, x$2, x$3, x$4, x$5, x$6; + k = key.$length; + if (k < 1 || k > 256) { + return [ptrType.nil, new KeySizeError(((k >> 0)))]; + } + c = new Cipher.ptr(arrayType.zero(), 0, 0); + i = 0; + while (true) { + if (!(i < 256)) { break; } + (x = c.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = ((i >>> 0)))); + i = i + (1) >> 0; + } + j = 0; + i$1 = 0; + while (true) { + if (!(i$1 < 256)) { break; } + j = j + (((((x$1 = c.s, ((i$1 < 0 || i$1 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i$1])) << 24 >>> 24)) + (x$2 = (_r = i$1 % k, _r === _r ? _r : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x$2])) << 24 >>> 24)) << 24 >>> 24; + _tmp = (x$3 = c.s, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j])); + _tmp$1 = (x$4 = c.s, ((i$1 < 0 || i$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i$1])); + (x$5 = c.s, ((i$1 < 0 || i$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i$1] = _tmp)); + (x$6 = c.s, ((j < 0 || j >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[j] = _tmp$1)); + i$1 = i$1 + (1) >> 0; + } + return [c, $ifaceNil]; + }; + $pkg.NewCipher = NewCipher; + Cipher.ptr.prototype.Reset = function() { + var _i, _ref, _tmp, _tmp$1, c, i, x; + c = this; + _ref = c.s; + _i = 0; + while (true) { + if (!(_i < 256)) { break; } + i = _i; + (x = c.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = 0)); + _i++; + } + _tmp = 0; + _tmp$1 = 0; + c.i = _tmp; + c.j = _tmp$1; + }; + Cipher.prototype.Reset = function() { return this.$val.Reset(); }; + Cipher.ptr.prototype.xorKeyStreamGeneric = function(dst, src) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, dst, i, j, k, src, v, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y; + c = this; + if (src.$length === 0) { + return; + } + if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { + $panic(new $String("crypto/rc4: invalid buffer overlap")); + } + _tmp = c.i; + _tmp$1 = c.j; + i = _tmp; + j = _tmp$1; + $unused((x = src.$length - 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x]))); + dst = $subslice(dst, 0, src.$length); + _ref = src; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + k = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + i = i + (1) << 24 >>> 24; + x$2 = (x$1 = c.s, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])); + j = j + (((x$2 << 24 >>> 24))) << 24 >>> 24; + y = (x$3 = c.s, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j])); + _tmp$2 = y; + _tmp$3 = x$2; + (x$4 = c.s, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i] = _tmp$2)); + (x$5 = c.s, ((j < 0 || j >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[j] = _tmp$3)); + ((k < 0 || k >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + k] = ((v ^ (((x$6 = c.s, x$7 = (((x$2 + y >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])) << 24 >>> 24))) << 24 >>> 24)); + _i++; + } + _tmp$4 = i; + _tmp$5 = j; + c.i = _tmp$4; + c.j = _tmp$5; + }; + Cipher.prototype.xorKeyStreamGeneric = function(dst, src) { return this.$val.xorKeyStreamGeneric(dst, src); }; + Cipher.ptr.prototype.XORKeyStream = function(dst, src) { + var c, dst, src; + c = this; + c.xorKeyStreamGeneric(dst, src); + }; + Cipher.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; + ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "xorKeyStreamGeneric", name: "xorKeyStreamGeneric", pkg: "crypto/rc4", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}]; + KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + Cipher.init("crypto/rc4", [{prop: "s", name: "s", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "j", name: "j", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/rsa"] = (function() { + var $pkg = {}, $init, bytes, crypto, randutil, rand, subtle, errors, hash, io, math, big, PKCS1v15DecryptOptions, PSSOptions, PublicKey, OAEPOptions, PrivateKey, PrecomputedValues, CRTValue, sliceType, arrayType, ptrType, ptrType$1, ptrType$2, ptrType$3, sliceType$1, sliceType$2, ptrType$4, arrayType$1, ptrType$5, hashPrefixes, bigZero, bigOne, errPublicModulus, errPublicExponentSmall, errPublicExponentLarge, EncryptPKCS1v15, DecryptPKCS1v15, DecryptPKCS1v15SessionKey, decryptPKCS1v15, nonZeroRandomBytes, SignPKCS1v15, VerifyPKCS1v15, pkcs1v15HashInfo, copyWithLeftPad, emsaPSSEncode, emsaPSSVerify, signPSSWithSalt, SignPSS, VerifyPSS, verifyPSS, checkPub, incCounter, mgf1XOR, encrypt, decrypt, decryptAndCheck, DecryptOAEP, leftPad; + bytes = $packages["bytes"]; + crypto = $packages["crypto"]; + randutil = $packages["crypto/internal/randutil"]; + rand = $packages["crypto/rand"]; + subtle = $packages["crypto/subtle"]; + errors = $packages["errors"]; + hash = $packages["hash"]; + io = $packages["io"]; + math = $packages["math"]; + big = $packages["math/big"]; + PKCS1v15DecryptOptions = $pkg.PKCS1v15DecryptOptions = $newType(0, $kindStruct, "rsa.PKCS1v15DecryptOptions", true, "crypto/rsa", true, function(SessionKeyLen_) { + this.$val = this; + if (arguments.length === 0) { + this.SessionKeyLen = 0; + return; + } + this.SessionKeyLen = SessionKeyLen_; + }); + PSSOptions = $pkg.PSSOptions = $newType(0, $kindStruct, "rsa.PSSOptions", true, "crypto/rsa", true, function(SaltLength_, Hash_) { + this.$val = this; + if (arguments.length === 0) { + this.SaltLength = 0; + this.Hash = 0; + return; + } + this.SaltLength = SaltLength_; + this.Hash = Hash_; + }); + PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "rsa.PublicKey", true, "crypto/rsa", true, function(N_, E_) { + this.$val = this; + if (arguments.length === 0) { + this.N = ptrType$1.nil; + this.E = 0; + return; + } + this.N = N_; + this.E = E_; + }); + OAEPOptions = $pkg.OAEPOptions = $newType(0, $kindStruct, "rsa.OAEPOptions", true, "crypto/rsa", true, function(Hash_, Label_) { + this.$val = this; + if (arguments.length === 0) { + this.Hash = 0; + this.Label = sliceType.nil; + return; + } + this.Hash = Hash_; + this.Label = Label_; + }); + PrivateKey = $pkg.PrivateKey = $newType(0, $kindStruct, "rsa.PrivateKey", true, "crypto/rsa", true, function(PublicKey_, D_, Primes_, Precomputed_) { + this.$val = this; + if (arguments.length === 0) { + this.PublicKey = new PublicKey.ptr(ptrType$1.nil, 0); + this.D = ptrType$1.nil; + this.Primes = sliceType$1.nil; + this.Precomputed = new PrecomputedValues.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$2.nil); + return; + } + this.PublicKey = PublicKey_; + this.D = D_; + this.Primes = Primes_; + this.Precomputed = Precomputed_; + }); + PrecomputedValues = $pkg.PrecomputedValues = $newType(0, $kindStruct, "rsa.PrecomputedValues", true, "crypto/rsa", true, function(Dp_, Dq_, Qinv_, CRTValues_) { + this.$val = this; + if (arguments.length === 0) { + this.Dp = ptrType$1.nil; + this.Dq = ptrType$1.nil; + this.Qinv = ptrType$1.nil; + this.CRTValues = sliceType$2.nil; + return; + } + this.Dp = Dp_; + this.Dq = Dq_; + this.Qinv = Qinv_; + this.CRTValues = CRTValues_; + }); + CRTValue = $pkg.CRTValue = $newType(0, $kindStruct, "rsa.CRTValue", true, "crypto/rsa", true, function(Exp_, Coeff_, R_) { + this.$val = this; + if (arguments.length === 0) { + this.Exp = ptrType$1.nil; + this.Coeff = ptrType$1.nil; + this.R = ptrType$1.nil; + return; + } + this.Exp = Exp_; + this.Coeff = Coeff_; + this.R = R_; + }); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 8); + ptrType = $ptrType(PSSOptions); + ptrType$1 = $ptrType(big.Int); + ptrType$2 = $ptrType(OAEPOptions); + ptrType$3 = $ptrType(PKCS1v15DecryptOptions); + sliceType$1 = $sliceType(ptrType$1); + sliceType$2 = $sliceType(CRTValue); + ptrType$4 = $ptrType(PrivateKey); + arrayType$1 = $arrayType($Uint8, 4); + ptrType$5 = $ptrType(PublicKey); + EncryptPKCS1v15 = function(rand$1, pub, msg) { + var _r, _r$1, _tmp, _tmp$1, c, em, err, err$1, k, m, mm, msg, ps, pub, rand$1, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; c = $f.c; em = $f.em; err = $f.err; err$1 = $f.err$1; k = $f.k; m = $f.m; mm = $f.mm; msg = $f.msg; ps = $f.ps; pub = $f.pub; rand$1 = $f.rand$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = randutil.MaybeReadByte(rand$1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err = checkPub(pub); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + k = pub.Size(); + if (msg.$length > (k - 11 >> 0)) { + $s = -1; return [sliceType.nil, $pkg.ErrMessageTooLong]; + } + em = $makeSlice(sliceType, k); + (1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1] = 2); + _tmp = $subslice(em, 2, ((em.$length - msg.$length >> 0) - 1 >> 0)); + _tmp$1 = $subslice(em, (em.$length - msg.$length >> 0)); + ps = _tmp; + mm = _tmp$1; + _r = nonZeroRandomBytes(ps, rand$1); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err$1 = _r; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, err$1]; + } + (x = (em.$length - msg.$length >> 0) - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x] = 0)); + $copySlice(mm, msg); + m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); + _r$1 = encrypt(new big.Int.ptr(false, big.nat.nil), pub, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + c = _r$1; + copyWithLeftPad(em, c.Bytes()); + $s = -1; return [em, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: EncryptPKCS1v15 }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.c = c; $f.em = em; $f.err = err; $f.err$1 = err$1; $f.k = k; $f.m = m; $f.mm = mm; $f.msg = msg; $f.ps = ps; $f.pub = pub; $f.rand$1 = rand$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.EncryptPKCS1v15 = EncryptPKCS1v15; + DecryptPKCS1v15 = function(rand$1, priv, ciphertext) { + var _r, _tuple, ciphertext, err, err$1, index, out, priv, rand$1, valid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; ciphertext = $f.ciphertext; err = $f.err; err$1 = $f.err$1; index = $f.index; out = $f.out; priv = $f.priv; rand$1 = $f.rand$1; valid = $f.valid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = checkPub(priv.PublicKey); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + _r = decryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + valid = _tuple[0]; + out = _tuple[1]; + index = _tuple[2]; + err$1 = _tuple[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, err$1]; + } + if (valid === 0) { + $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; + } + $s = -1; return [$subslice(out, index), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: DecryptPKCS1v15 }; } $f._r = _r; $f._tuple = _tuple; $f.ciphertext = ciphertext; $f.err = err; $f.err$1 = err$1; $f.index = index; $f.out = out; $f.priv = priv; $f.rand$1 = rand$1; $f.valid = valid; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DecryptPKCS1v15 = DecryptPKCS1v15; + DecryptPKCS1v15SessionKey = function(rand$1, priv, ciphertext, key) { + var _r, _tuple, ciphertext, em, err, err$1, index, k, key, priv, rand$1, valid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; ciphertext = $f.ciphertext; em = $f.em; err = $f.err; err$1 = $f.err$1; index = $f.index; k = $f.k; key = $f.key; priv = $f.priv; rand$1 = $f.rand$1; valid = $f.valid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = checkPub(priv.PublicKey); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + k = priv.PublicKey.Size(); + if ((k - (((key.$length + 3 >> 0) + 8 >> 0)) >> 0) < 0) { + $s = -1; return $pkg.ErrDecryption; + } + _r = decryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + valid = _tuple[0]; + em = _tuple[1]; + index = _tuple[2]; + err$1 = _tuple[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + if (!((em.$length === k))) { + $s = -1; return $pkg.ErrDecryption; + } + valid = valid & (subtle.ConstantTimeEq((((em.$length - index >> 0) >> 0)), ((key.$length >> 0)))); + subtle.ConstantTimeCopy(valid, key, $subslice(em, (em.$length - key.$length >> 0))); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: DecryptPKCS1v15SessionKey }; } $f._r = _r; $f._tuple = _tuple; $f.ciphertext = ciphertext; $f.em = em; $f.err = err; $f.err$1 = err$1; $f.index = index; $f.k = k; $f.key = key; $f.priv = priv; $f.rand$1 = rand$1; $f.valid = valid; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DecryptPKCS1v15SessionKey = DecryptPKCS1v15SessionKey; + decryptPKCS1v15 = function(rand$1, priv, ciphertext) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, ciphertext, em, equals0, err, firstByteIsZero, i, index, k, lookingForIndex, m, priv, rand$1, secondByteIsTwo, valid, validPS, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; c = $f.c; ciphertext = $f.ciphertext; em = $f.em; equals0 = $f.equals0; err = $f.err; firstByteIsZero = $f.firstByteIsZero; i = $f.i; index = $f.index; k = $f.k; lookingForIndex = $f.lookingForIndex; m = $f.m; priv = $f.priv; rand$1 = $f.rand$1; secondByteIsTwo = $f.secondByteIsTwo; valid = $f.valid; validPS = $f.validPS; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + valid = 0; + em = sliceType.nil; + index = 0; + err = $ifaceNil; + k = priv.PublicKey.Size(); + if (k < 11) { + err = $pkg.ErrDecryption; + $s = -1; return [valid, em, index, err]; + } + c = new big.Int.ptr(false, big.nat.nil).SetBytes(ciphertext); + _r = decrypt(rand$1, priv, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + m = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [valid, em, index, err]; + } + em = leftPad(m.Bytes(), k); + firstByteIsZero = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); + secondByteIsTwo = subtle.ConstantTimeByteEq((1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1]), 2); + lookingForIndex = 1; + i = 2; + while (true) { + if (!(i < em.$length)) { break; } + equals0 = subtle.ConstantTimeByteEq(((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i]), 0); + index = subtle.ConstantTimeSelect(lookingForIndex & equals0, i, index); + lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex); + i = i + (1) >> 0; + } + validPS = subtle.ConstantTimeLessOrEq(10, index); + valid = ((firstByteIsZero & secondByteIsTwo) & (((~lookingForIndex >> 0) & 1))) & validPS; + index = subtle.ConstantTimeSelect(valid, index + 1 >> 0, 0); + _tmp = valid; + _tmp$1 = em; + _tmp$2 = index; + _tmp$3 = $ifaceNil; + valid = _tmp; + em = _tmp$1; + index = _tmp$2; + err = _tmp$3; + $s = -1; return [valid, em, index, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: decryptPKCS1v15 }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.c = c; $f.ciphertext = ciphertext; $f.em = em; $f.equals0 = equals0; $f.err = err; $f.firstByteIsZero = firstByteIsZero; $f.i = i; $f.index = index; $f.k = k; $f.lookingForIndex = lookingForIndex; $f.m = m; $f.priv = priv; $f.rand$1 = rand$1; $f.secondByteIsTwo = secondByteIsTwo; $f.valid = valid; $f.validPS = validPS; $f.$s = $s; $f.$r = $r; return $f; + }; + nonZeroRandomBytes = function(s, rand$1) { + var _r, _r$1, _tuple, _tuple$1, err, i, rand$1, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; i = $f.i; rand$1 = $f.rand$1; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + _r = io.ReadFull(rand$1, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + i = 0; + /* while (true) { */ case 2: + /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 3; continue; } + /* while (true) { */ case 4: + /* if (!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 0)) { break; } */ if(!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 0)) { $s = 5; continue; } + _r$1 = io.ReadFull(rand$1, $subslice(s, i, (i + 1 >> 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) ^ (66)) << 24 >>> 24)); + /* } */ $s = 4; continue; case 5: + i = i + (1) >> 0; + /* } */ $s = 2; continue; case 3: + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: nonZeroRandomBytes }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.i = i; $f.rand$1 = rand$1; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + SignPKCS1v15 = function(rand$1, priv, hash$1, hashed) { + var _r, _tuple, _tuple$1, c, em, err, hash$1, hashLen, hashed, i, k, m, prefix, priv, rand$1, tLen, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; em = $f.em; err = $f.err; hash$1 = $f.hash$1; hashLen = $f.hashLen; hashed = $f.hashed; i = $f.i; k = $f.k; m = $f.m; prefix = $f.prefix; priv = $f.priv; rand$1 = $f.rand$1; tLen = $f.tLen; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = pkcs1v15HashInfo(hash$1, hashed.$length); + hashLen = _tuple[0]; + prefix = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + tLen = prefix.$length + hashLen >> 0; + k = priv.PublicKey.Size(); + if (k < (tLen + 11 >> 0)) { + $s = -1; return [sliceType.nil, $pkg.ErrMessageTooLong]; + } + em = $makeSlice(sliceType, k); + (1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1] = 1); + i = 2; + while (true) { + if (!(i < ((k - tLen >> 0) - 1 >> 0))) { break; } + ((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i] = 255); + i = i + (1) >> 0; + } + $copySlice($subslice(em, (k - tLen >> 0), (k - hashLen >> 0)), prefix); + $copySlice($subslice(em, (k - hashLen >> 0), k), hashed); + m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); + _r = decryptAndCheck(rand$1, priv, m); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + c = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + copyWithLeftPad(em, c.Bytes()); + $s = -1; return [em, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: SignPKCS1v15 }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.em = em; $f.err = err; $f.hash$1 = hash$1; $f.hashLen = hashLen; $f.hashed = hashed; $f.i = i; $f.k = k; $f.m = m; $f.prefix = prefix; $f.priv = priv; $f.rand$1 = rand$1; $f.tLen = tLen; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.SignPKCS1v15 = SignPKCS1v15; + VerifyPKCS1v15 = function(pub, hash$1, hashed, sig) { + var _r, _tuple, c, em, err, hash$1, hashLen, hashed, i, k, m, ok, prefix, pub, sig, tLen, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; em = $f.em; err = $f.err; hash$1 = $f.hash$1; hashLen = $f.hashLen; hashed = $f.hashed; i = $f.i; k = $f.k; m = $f.m; ok = $f.ok; prefix = $f.prefix; pub = $f.pub; sig = $f.sig; tLen = $f.tLen; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = pkcs1v15HashInfo(hash$1, hashed.$length); + hashLen = _tuple[0]; + prefix = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + tLen = prefix.$length + hashLen >> 0; + k = pub.Size(); + if (k < (tLen + 11 >> 0)) { + $s = -1; return $pkg.ErrVerification; + } + c = new big.Int.ptr(false, big.nat.nil).SetBytes(sig); + _r = encrypt(new big.Int.ptr(false, big.nat.nil), pub, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + m = _r; + em = leftPad(m.Bytes(), k); + ok = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); + ok = ok & (subtle.ConstantTimeByteEq((1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1]), 1)); + ok = ok & (subtle.ConstantTimeCompare($subslice(em, (k - hashLen >> 0), k), hashed)); + ok = ok & (subtle.ConstantTimeCompare($subslice(em, (k - tLen >> 0), (k - hashLen >> 0)), prefix)); + ok = ok & (subtle.ConstantTimeByteEq((x = (k - tLen >> 0) - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x])), 0)); + i = 2; + while (true) { + if (!(i < ((k - tLen >> 0) - 1 >> 0))) { break; } + ok = ok & (subtle.ConstantTimeByteEq(((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i]), 255)); + i = i + (1) >> 0; + } + if (!((ok === 1))) { + $s = -1; return $pkg.ErrVerification; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: VerifyPKCS1v15 }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.em = em; $f.err = err; $f.hash$1 = hash$1; $f.hashLen = hashLen; $f.hashed = hashed; $f.i = i; $f.k = k; $f.m = m; $f.ok = ok; $f.prefix = prefix; $f.pub = pub; $f.sig = sig; $f.tLen = tLen; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.VerifyPKCS1v15 = VerifyPKCS1v15; + pkcs1v15HashInfo = function(hash$1, inLen) { + var _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, err, hash$1, hashLen, inLen, ok, prefix; + hashLen = 0; + prefix = sliceType.nil; + err = $ifaceNil; + if (hash$1 === 0) { + _tmp = inLen; + _tmp$1 = sliceType.nil; + _tmp$2 = $ifaceNil; + hashLen = _tmp; + prefix = _tmp$1; + err = _tmp$2; + return [hashLen, prefix, err]; + } + hashLen = new crypto.Hash(hash$1).Size(); + if (!((inLen === hashLen))) { + _tmp$3 = 0; + _tmp$4 = sliceType.nil; + _tmp$5 = errors.New("crypto/rsa: input must be hashed message"); + hashLen = _tmp$3; + prefix = _tmp$4; + err = _tmp$5; + return [hashLen, prefix, err]; + } + _tuple = (_entry = hashPrefixes[crypto.Hash.keyFor(hash$1)], _entry !== undefined ? [_entry.v, true] : [sliceType.nil, false]); + prefix = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _tmp$6 = 0; + _tmp$7 = sliceType.nil; + _tmp$8 = errors.New("crypto/rsa: unsupported hash function"); + hashLen = _tmp$6; + prefix = _tmp$7; + err = _tmp$8; + return [hashLen, prefix, err]; + } + return [hashLen, prefix, err]; + }; + copyWithLeftPad = function(dest, src) { + var dest, i, numPaddingBytes, src; + numPaddingBytes = dest.$length - src.$length >> 0; + i = 0; + while (true) { + if (!(i < numPaddingBytes)) { break; } + ((i < 0 || i >= dest.$length) ? ($throwRuntimeError("index out of range"), undefined) : dest.$array[dest.$offset + i] = 0); + i = i + (1) >> 0; + } + $copySlice($subslice(dest, numPaddingBytes), src); + }; + emsaPSSEncode = function(mHash, emBits, salt, hash$1) { + var _q, _r, _r$1, _r$2, _r$3, _r$4, db, em, emBits, emLen, h, hLen, hash$1, mHash, prefix, sLen, salt, x, x$1, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; db = $f.db; em = $f.em; emBits = $f.emBits; emLen = $f.emLen; h = $f.h; hLen = $f.hLen; hash$1 = $f.hash$1; mHash = $f.mHash; prefix = $f.prefix; sLen = $f.sLen; salt = $f.salt; x = $f.x; x$1 = $f.x$1; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = hash$1.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hLen = _r; + sLen = salt.$length; + emLen = (_q = ((emBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (!((mHash.$length === hLen))) { + $s = -1; return [sliceType.nil, errors.New("crypto/rsa: input must be hashed message")]; + } + if (emLen < ((hLen + sLen >> 0) + 2 >> 0)) { + $s = -1; return [sliceType.nil, errors.New("crypto/rsa: key size too small for PSS signature")]; + } + em = $makeSlice(sliceType, emLen); + db = $subslice(em, 0, (((((emLen - sLen >> 0) - hLen >> 0) - 2 >> 0) + 1 >> 0) + sLen >> 0)); + h = $subslice(em, (((((emLen - sLen >> 0) - hLen >> 0) - 2 >> 0) + 1 >> 0) + sLen >> 0), (emLen - 1 >> 0)); + prefix = arrayType.zero(); + _r$1 = hash$1.Write(new sliceType(prefix)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hash$1.Write(mHash); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = hash$1.Write(salt); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = hash$1.Sum($subslice(h, 0, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + h = _r$4; + $r = hash$1.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + (x = ((emLen - sLen >> 0) - hLen >> 0) - 2 >> 0, ((x < 0 || x >= db.$length) ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + x] = 1)); + $copySlice($subslice(db, (((emLen - sLen >> 0) - hLen >> 0) - 1 >> 0)), salt); + $r = mgf1XOR(db, hash$1, h); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + (0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0] = (((0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0]) & ((((y = (((($imul(8, emLen)) - emBits >> 0) >>> 0)), y < 32 ? (255 >>> y) : 0) << 24 >>> 24)))) >>> 0)); + (x$1 = emLen - 1 >> 0, ((x$1 < 0 || x$1 >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x$1] = 188)); + $s = -1; return [em, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: emsaPSSEncode }; } $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.db = db; $f.em = em; $f.emBits = emBits; $f.emLen = emLen; $f.h = h; $f.hLen = hLen; $f.hash$1 = hash$1; $f.mHash = mHash; $f.prefix = prefix; $f.sLen = sLen; $f.salt = salt; $f.x = x; $f.x$1 = x$1; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + emsaPSSVerify = function(mHash, em, emBits, sLen, hash$1) { + var _1, _i, _q, _r, _r$1, _r$2, _r$3, _r$4, _ref, db, e, em, emBits, emLen, h, h0, hLen, hash$1, mHash, prefix, sLen, salt, x, x$1, x$2, y, y$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; db = $f.db; e = $f.e; em = $f.em; emBits = $f.emBits; emLen = $f.emLen; h = $f.h; h0 = $f.h0; hLen = $f.hLen; hash$1 = $f.hash$1; mHash = $f.mHash; prefix = $f.prefix; sLen = $f.sLen; salt = $f.salt; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; y = $f.y; y$1 = $f.y$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = hash$1.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hLen = _r; + if (!((hLen === mHash.$length))) { + $s = -1; return $pkg.ErrVerification; + } + emLen = (_q = ((emBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (emLen < ((hLen + sLen >> 0) + 2 >> 0)) { + $s = -1; return $pkg.ErrVerification; + } + if (!(((x = em.$length - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x])) === 188))) { + $s = -1; return $pkg.ErrVerification; + } + db = $subslice(em, 0, ((emLen - hLen >> 0) - 1 >> 0)); + h = $subslice(em, ((emLen - hLen >> 0) - 1 >> 0), (em.$length - 1 >> 0)); + if (!(((((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]) & (((y = (((8 - ((($imul(8, emLen)) - emBits >> 0)) >> 0) >>> 0)), y < 32 ? (255 << y) : 0) << 24 >>> 24))) >>> 0) === 0))) { + $s = -1; return $pkg.ErrVerification; + } + $r = mgf1XOR(db, hash$1, h); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + (0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0] = (((0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0]) & ((((y$1 = (((($imul(8, emLen)) - emBits >> 0) >>> 0)), y$1 < 32 ? (255 >>> y$1) : 0) << 24 >>> 24)))) >>> 0)); + /* */ if (sLen === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (sLen === 0) { */ case 3: + sLen = emLen - ((hLen + 2 >> 0)) >> 0; + FindSaltLength: + while (true) { + if (!(sLen >= 0)) { break; } + _1 = (x$1 = ((emLen - hLen >> 0) - sLen >> 0) - 2 >> 0, ((x$1 < 0 || x$1 >= db.$length) ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + x$1])); + if (_1 === (1)) { + break FindSaltLength; + } else if (_1 === (0)) { + sLen = sLen - (1) >> 0; + continue; + } else { + $s = -1; return $pkg.ErrVerification; + } + sLen = sLen - (1) >> 0; + } + if (sLen < 0) { + $s = -1; return $pkg.ErrVerification; + } + $s = 5; continue; + /* } else { */ case 4: + _ref = $subslice(db, 0, (((emLen - hLen >> 0) - sLen >> 0) - 2 >> 0)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((e === 0))) { + $s = -1; return $pkg.ErrVerification; + } + _i++; + } + if (!(((x$2 = ((emLen - hLen >> 0) - sLen >> 0) - 2 >> 0, ((x$2 < 0 || x$2 >= db.$length) ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + x$2])) === 1))) { + $s = -1; return $pkg.ErrVerification; + } + /* } */ case 5: + salt = $subslice(db, (db.$length - sLen >> 0)); + prefix = arrayType.zero(); + _r$1 = hash$1.Write(new sliceType(prefix)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hash$1.Write(mHash); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = hash$1.Write(salt); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = hash$1.Sum(sliceType.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + h0 = _r$4; + if (!bytes.Equal(h0, h)) { + $s = -1; return $pkg.ErrVerification; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: emsaPSSVerify }; } $f._1 = _1; $f._i = _i; $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.db = db; $f.e = e; $f.em = em; $f.emBits = emBits; $f.emLen = emLen; $f.h = h; $f.h0 = h0; $f.hLen = hLen; $f.hash$1 = hash$1; $f.mHash = mHash; $f.prefix = prefix; $f.sLen = sLen; $f.salt = salt; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.y = y; $f.y$1 = y$1; $f.$s = $s; $f.$r = $r; return $f; + }; + signPSSWithSalt = function(rand$1, priv, hash$1, hashed, salt) { + var _arg, _arg$1, _arg$2, _arg$3, _q, _r, _r$1, _r$2, _tuple, _tuple$1, c, em, err, hash$1, hashed, m, nBits, priv, rand$1, s, salt, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; em = $f.em; err = $f.err; hash$1 = $f.hash$1; hashed = $f.hashed; m = $f.m; nBits = $f.nBits; priv = $f.priv; rand$1 = $f.rand$1; s = $f.s; salt = $f.salt; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = sliceType.nil; + err = $ifaceNil; + nBits = priv.PublicKey.N.BitLen(); + _arg = hashed; + _arg$1 = nBits - 1 >> 0; + _arg$2 = salt; + _r = new crypto.Hash(hash$1).New(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _arg$3 = _r; + _r$1 = emsaPSSEncode(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + em = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [s, err]; + } + m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); + _r$2 = decryptAndCheck(rand$1, priv, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + c = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [s, err]; + } + s = $makeSlice(sliceType, (_q = ((nBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + copyWithLeftPad(s, c.Bytes()); + $s = -1; return [s, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: signPSSWithSalt }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.em = em; $f.err = err; $f.hash$1 = hash$1; $f.hashed = hashed; $f.m = m; $f.nBits = nBits; $f.priv = priv; $f.rand$1 = rand$1; $f.s = s; $f.salt = salt; $f.$s = $s; $f.$r = $r; return $f; + }; + PSSOptions.ptr.prototype.HashFunc = function() { + var pssOpts; + pssOpts = this; + return pssOpts.Hash; + }; + PSSOptions.prototype.HashFunc = function() { return this.$val.HashFunc(); }; + PSSOptions.ptr.prototype.saltLength = function() { + var opts; + opts = this; + if (opts === ptrType.nil) { + return 0; + } + return opts.SaltLength; + }; + PSSOptions.prototype.saltLength = function() { return this.$val.saltLength(); }; + SignPSS = function(rand$1, priv, hash$1, hashed, opts) { + var _1, _q, _r, _r$1, _tuple, err, hash$1, hashed, opts, priv, rand$1, salt, saltLength, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _q = $f._q; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; hash$1 = $f.hash$1; hashed = $f.hashed; opts = $f.opts; priv = $f.priv; rand$1 = $f.rand$1; salt = $f.salt; saltLength = $f.saltLength; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + saltLength = opts.saltLength(); + _1 = saltLength; + if (_1 === (0)) { + saltLength = ((_q = ((priv.PublicKey.N.BitLen() + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0) - new crypto.Hash(hash$1).Size() >> 0; + } else if (_1 === (-1)) { + saltLength = new crypto.Hash(hash$1).Size(); + } + if (!(opts === ptrType.nil) && !((opts.Hash === 0))) { + hash$1 = opts.Hash; + } + salt = $makeSlice(sliceType, saltLength); + _r = io.ReadFull(rand$1, salt); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + _r$1 = signPSSWithSalt(rand$1, priv, hash$1, hashed, salt); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: SignPSS }; } $f._1 = _1; $f._q = _q; $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.hash$1 = hash$1; $f.hashed = hashed; $f.opts = opts; $f.priv = priv; $f.rand$1 = rand$1; $f.salt = salt; $f.saltLength = saltLength; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.SignPSS = SignPSS; + VerifyPSS = function(pub, hash$1, hashed, sig, opts) { + var _r, hash$1, hashed, opts, pub, sig, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; hash$1 = $f.hash$1; hashed = $f.hashed; opts = $f.opts; pub = $f.pub; sig = $f.sig; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = verifyPSS(pub, hash$1, hashed, sig, opts.saltLength()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: VerifyPSS }; } $f._r = _r; $f.hash$1 = hash$1; $f.hashed = hashed; $f.opts = opts; $f.pub = pub; $f.sig = sig; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.VerifyPSS = VerifyPSS; + verifyPSS = function(pub, hash$1, hashed, sig, saltLen) { + var _arg, _arg$1, _arg$2, _arg$3, _arg$4, _q, _q$1, _r, _r$1, _r$2, em, emBits, emLen, hash$1, hashed, m, nBits, pub, s, saltLen, sig, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _q = $f._q; _q$1 = $f._q$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; em = $f.em; emBits = $f.emBits; emLen = $f.emLen; hash$1 = $f.hash$1; hashed = $f.hashed; m = $f.m; nBits = $f.nBits; pub = $f.pub; s = $f.s; saltLen = $f.saltLen; sig = $f.sig; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nBits = pub.N.BitLen(); + if (!((sig.$length === (_q = ((nBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))))) { + $s = -1; return $pkg.ErrVerification; + } + s = new big.Int.ptr(false, big.nat.nil).SetBytes(sig); + _r = encrypt(new big.Int.ptr(false, big.nat.nil), pub, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + m = _r; + emBits = nBits - 1 >> 0; + emLen = (_q$1 = ((emBits + 7 >> 0)) / 8, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + if (emLen < m.Bytes().$length) { + $s = -1; return $pkg.ErrVerification; + } + em = $makeSlice(sliceType, emLen); + copyWithLeftPad(em, m.Bytes()); + if (saltLen === -1) { + saltLen = new crypto.Hash(hash$1).Size(); + } + _arg = hashed; + _arg$1 = em; + _arg$2 = emBits; + _arg$3 = saltLen; + _r$1 = new crypto.Hash(hash$1).New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$4 = _r$1; + _r$2 = emsaPSSVerify(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: verifyPSS }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._q = _q; $f._q$1 = _q$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.em = em; $f.emBits = emBits; $f.emLen = emLen; $f.hash$1 = hash$1; $f.hashed = hashed; $f.m = m; $f.nBits = nBits; $f.pub = pub; $f.s = s; $f.saltLen = saltLen; $f.sig = sig; $f.$s = $s; $f.$r = $r; return $f; + }; + PublicKey.ptr.prototype.Size = function() { + var _q, pub; + pub = this; + return (_q = ((pub.N.BitLen() + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + PublicKey.prototype.Size = function() { return this.$val.Size(); }; + checkPub = function(pub) { + var pub; + if (pub.N === ptrType$1.nil) { + return errPublicModulus; + } + if (pub.E < 2) { + return errPublicExponentSmall; + } + if (pub.E > 2147483647) { + return errPublicExponentLarge; + } + return $ifaceNil; + }; + PrivateKey.ptr.prototype.Public = function() { + var priv; + priv = this; + return priv.PublicKey; + }; + PrivateKey.prototype.Public = function() { return this.$val.Public(); }; + PrivateKey.ptr.prototype.Sign = function(rand$1, digest, opts) { + var _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _tuple, digest, ok, opts, priv, pssOpts, rand$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; digest = $f.digest; ok = $f.ok; opts = $f.opts; priv = $f.priv; pssOpts = $f.pssOpts; rand$1 = $f.rand$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = this; + _tuple = $assertType(opts, ptrType, true); + pssOpts = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r = SignPSS(rand$1, priv, pssOpts.Hash, digest, pssOpts); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _arg = rand$1; + _arg$1 = priv; + _r$1 = opts.HashFunc(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$2 = _r$1; + _arg$3 = digest; + _r$2 = SignPKCS1v15(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: PrivateKey.ptr.prototype.Sign }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.digest = digest; $f.ok = ok; $f.opts = opts; $f.priv = priv; $f.pssOpts = pssOpts; $f.rand$1 = rand$1; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.prototype.Sign = function(rand$1, digest, opts) { return this.$val.Sign(rand$1, digest, opts); }; + PrivateKey.ptr.prototype.Decrypt = function(rand$1, ciphertext, opts) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, ciphertext, err, err$1, err$2, l, opts, opts$1, opts$2, opts$3, plaintext, priv, rand$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; ciphertext = $f.ciphertext; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; l = $f.l; opts = $f.opts; opts$1 = $f.opts$1; opts$2 = $f.opts$2; opts$3 = $f.opts$3; plaintext = $f.plaintext; priv = $f.priv; rand$1 = $f.rand$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + plaintext = sliceType.nil; + err = $ifaceNil; + priv = this; + /* */ if ($interfaceIsEqual(opts, $ifaceNil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(opts, $ifaceNil)) { */ case 1: + _r = DecryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + plaintext = _tuple[0]; + err = _tuple[1]; + $s = -1; return [plaintext, err]; + /* } */ case 2: + _ref = opts; + /* */ if ($assertType(_ref, ptrType$2, true)[1]) { $s = 4; continue; } + /* */ if ($assertType(_ref, ptrType$3, true)[1]) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($assertType(_ref, ptrType$2, true)[1]) { */ case 4: + opts$1 = _ref.$val; + _r$1 = new crypto.Hash(opts$1.Hash).New(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = DecryptOAEP(_r$1, rand$1, priv, ciphertext, opts$1.Label); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + plaintext = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [plaintext, err]; + /* } else if ($assertType(_ref, ptrType$3, true)[1]) { */ case 5: + opts$2 = _ref.$val; + l = opts$2.SessionKeyLen; + /* */ if (l > 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (l > 0) { */ case 10: + plaintext = $makeSlice(sliceType, l); + _r$3 = io.ReadFull(rand$1, plaintext); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = sliceType.nil; + _tmp$1 = err$1; + plaintext = _tmp; + err = _tmp$1; + $s = -1; return [plaintext, err]; + } + _r$4 = DecryptPKCS1v15SessionKey(rand$1, priv, ciphertext, plaintext); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$2 = _r$4; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$2 = sliceType.nil; + _tmp$3 = err$2; + plaintext = _tmp$2; + err = _tmp$3; + $s = -1; return [plaintext, err]; + } + _tmp$4 = plaintext; + _tmp$5 = $ifaceNil; + plaintext = _tmp$4; + err = _tmp$5; + $s = -1; return [plaintext, err]; + /* } else { */ case 11: + _r$5 = DecryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + plaintext = _tuple$3[0]; + err = _tuple$3[1]; + $s = -1; return [plaintext, err]; + /* } */ case 12: + $s = 7; continue; + /* } else { */ case 6: + opts$3 = _ref; + _tmp$6 = sliceType.nil; + _tmp$7 = errors.New("crypto/rsa: invalid options for Decrypt"); + plaintext = _tmp$6; + err = _tmp$7; + $s = -1; return [plaintext, err]; + /* } */ case 7: + $s = -1; return [plaintext, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: PrivateKey.ptr.prototype.Decrypt }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.ciphertext = ciphertext; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.l = l; $f.opts = opts; $f.opts$1 = opts$1; $f.opts$2 = opts$2; $f.opts$3 = opts$3; $f.plaintext = plaintext; $f.priv = priv; $f.rand$1 = rand$1; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.prototype.Decrypt = function(rand$1, ciphertext, opts) { return this.$val.Decrypt(rand$1, ciphertext, opts); }; + PrivateKey.ptr.prototype.Validate = function() { + var _i, _i$1, _r, _ref, _ref$1, congruence, de, err, modulus, pminus1, prime, prime$1, priv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; congruence = $f.congruence; de = $f.de; err = $f.err; modulus = $f.modulus; pminus1 = $f.pminus1; prime = $f.prime; prime$1 = $f.prime$1; priv = $f.priv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = this; + err = checkPub(priv.PublicKey); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + modulus = new big.Int.ptr(false, big.nat.nil).Set(bigOne); + _ref = priv.Primes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + prime = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (prime.Cmp(bigOne) <= 0) { + $s = -1; return errors.New("crypto/rsa: invalid prime value"); + } + modulus.Mul(modulus, prime); + _i++; + } + if (!((modulus.Cmp(priv.PublicKey.N) === 0))) { + $s = -1; return errors.New("crypto/rsa: invalid modulus"); + } + congruence = new big.Int.ptr(false, big.nat.nil); + de = new big.Int.ptr(false, big.nat.nil).SetInt64((new $Int64(0, priv.PublicKey.E))); + de.Mul(de, priv.D); + _ref$1 = priv.Primes; + _i$1 = 0; + /* while (true) { */ case 1: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } + prime$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + pminus1 = new big.Int.ptr(false, big.nat.nil).Sub(prime$1, bigOne); + _r = congruence.Mod(de, pminus1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + if (!((congruence.Cmp(bigOne) === 0))) { + $s = -1; return errors.New("crypto/rsa: invalid exponents"); + } + _i$1++; + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: PrivateKey.ptr.prototype.Validate }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f.congruence = congruence; $f.de = de; $f.err = err; $f.modulus = modulus; $f.pminus1 = pminus1; $f.prime = prime; $f.prime$1 = prime$1; $f.priv = priv; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.prototype.Validate = function() { return this.$val.Validate(); }; + incCounter = function(c) { + var c; + c.nilCheck, c[3] = ((c.nilCheck, c[3]) + (1) << 24 >>> 24); + if (!(((c.nilCheck, c[3]) === 0))) { + return; + } + c.nilCheck, c[2] = ((c.nilCheck, c[2]) + (1) << 24 >>> 24); + if (!(((c.nilCheck, c[2]) === 0))) { + return; + } + c.nilCheck, c[1] = ((c.nilCheck, c[1]) + (1) << 24 >>> 24); + if (!(((c.nilCheck, c[1]) === 0))) { + return; + } + c.nilCheck, c[0] = ((c.nilCheck, c[0]) + (1) << 24 >>> 24); + }; + mgf1XOR = function(out, hash$1, seed) { + var _r, _r$1, _r$2, counter, digest, done, hash$1, i, out, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; counter = $f.counter; digest = $f.digest; done = $f.done; hash$1 = $f.hash$1; i = $f.i; out = $f.out; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + counter = [counter]; + counter[0] = arrayType$1.zero(); + digest = sliceType.nil; + done = 0; + /* while (true) { */ case 1: + /* if (!(done < out.$length)) { break; } */ if(!(done < out.$length)) { $s = 2; continue; } + _r = hash$1.Write(seed); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = hash$1.Write($subslice(new sliceType(counter[0]), 0, 4)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hash$1.Sum($subslice(digest, 0, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + digest = _r$2; + $r = hash$1.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = 0; + while (true) { + if (!(i < digest.$length && done < out.$length)) { break; } + ((done < 0 || done >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + done] = ((((done < 0 || done >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + done]) ^ (((i < 0 || i >= digest.$length) ? ($throwRuntimeError("index out of range"), undefined) : digest.$array[digest.$offset + i]))) << 24 >>> 24)); + done = done + (1) >> 0; + i = i + (1) >> 0; + } + incCounter(counter[0]); + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: mgf1XOR }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.counter = counter; $f.digest = digest; $f.done = done; $f.hash$1 = hash$1; $f.i = i; $f.out = out; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + encrypt = function(c, pub, m) { + var _r, c, e, m, pub, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; e = $f.e; m = $f.m; pub = $f.pub; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = big.NewInt((new $Int64(0, pub.E))); + _r = c.Exp(m, e, pub.N); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return c; + /* */ } return; } if ($f === undefined) { $f = { $blk: encrypt }; } $f._r = _r; $f.c = c; $f.e = e; $f.m = m; $f.pub = pub; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.ptr.prototype.Precompute = function() { + var _r, _r$1, _r$2, _r$3, _r$4, i, prime, priv, r, values, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; i = $f.i; prime = $f.prime; priv = $f.priv; r = $f.r; values = $f.values; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = this; + if (!(priv.Precomputed.Dp === ptrType$1.nil)) { + $s = -1; return; + } + priv.Precomputed.Dp = new big.Int.ptr(false, big.nat.nil).Sub((x = priv.Primes, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), bigOne); + _r = priv.Precomputed.Dp.Mod(priv.D, priv.Precomputed.Dp); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + priv.Precomputed.Dq = new big.Int.ptr(false, big.nat.nil).Sub((x$1 = priv.Primes, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])), bigOne); + _r$1 = priv.Precomputed.Dq.Mod(priv.D, priv.Precomputed.Dq); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = new big.Int.ptr(false, big.nat.nil).ModInverse((x$2 = priv.Primes, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])), (x$3 = priv.Primes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + priv.Precomputed.Qinv = _r$2; + r = new big.Int.ptr(false, big.nat.nil).Mul((x$4 = priv.Primes, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), (x$5 = priv.Primes, (1 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 1]))); + priv.Precomputed.CRTValues = $makeSlice(sliceType$2, (priv.Primes.$length - 2 >> 0)); + i = 2; + /* while (true) { */ case 4: + /* if (!(i < priv.Primes.$length)) { break; } */ if(!(i < priv.Primes.$length)) { $s = 5; continue; } + prime = (x$6 = priv.Primes, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])); + values = (x$7 = priv.Precomputed.CRTValues, x$8 = i - 2 >> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8])); + values.Exp = new big.Int.ptr(false, big.nat.nil).Sub(prime, bigOne); + _r$3 = values.Exp.Mod(priv.D, values.Exp); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + values.R = new big.Int.ptr(false, big.nat.nil).Set(r); + _r$4 = new big.Int.ptr(false, big.nat.nil).ModInverse(r, prime); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + values.Coeff = _r$4; + r.Mul(r, prime); + i = i + (1) >> 0; + /* } */ $s = 4; continue; case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: PrivateKey.ptr.prototype.Precompute }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.i = i; $f.prime = prime; $f.priv = priv; $f.r = r; $f.values = values; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.$s = $s; $f.$r = $r; return $f; + }; + PrivateKey.prototype.Precompute = function() { return this.$val.Precompute(); }; + decrypt = function(random, priv, c) { + var _i, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tuple, bigE, c, cCopy, err, i, ir, m, m2, ok, prime, priv, r, random, rpowe, values, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; bigE = $f.bigE; c = $f.c; cCopy = $f.cCopy; err = $f.err; i = $f.i; ir = $f.ir; m = $f.m; m2 = $f.m2; ok = $f.ok; prime = $f.prime; priv = $f.priv; r = $f.r; random = $f.random; rpowe = $f.rpowe; values = $f.values; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = ptrType$1.nil; + err = $ifaceNil; + if (c.Cmp(priv.PublicKey.N) > 0) { + err = $pkg.ErrDecryption; + $s = -1; return [m, err]; + } + if (priv.PublicKey.N.Sign() === 0) { + _tmp = ptrType$1.nil; + _tmp$1 = $pkg.ErrDecryption; + m = _tmp; + err = _tmp$1; + $s = -1; return [m, err]; + } + ir = ptrType$1.nil; + /* */ if (!($interfaceIsEqual(random, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(random, $ifaceNil))) { */ case 1: + $r = randutil.MaybeReadByte(random); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r = ptrType$1.nil; + ir = new big.Int.ptr(false, big.nat.nil); + /* while (true) { */ case 4: + _r = rand.Int(random, priv.PublicKey.N); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + r = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [m, err]; + } + if (r.Cmp(bigZero) === 0) { + r = bigOne; + } + _r$1 = ir.ModInverse(r, priv.PublicKey.N); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ok = _r$1; + if (!(ok === ptrType$1.nil)) { + /* break; */ $s = 5; continue; + } + /* } */ $s = 4; continue; case 5: + bigE = big.NewInt((new $Int64(0, priv.PublicKey.E))); + _r$2 = new big.Int.ptr(false, big.nat.nil).Exp(r, bigE, priv.PublicKey.N); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + rpowe = _r$2; + cCopy = new big.Int.ptr(false, big.nat.nil).Set(c); + cCopy.Mul(cCopy, rpowe); + _r$3 = cCopy.Mod(cCopy, priv.PublicKey.N); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + c = cCopy; + /* } */ case 2: + /* */ if (priv.Precomputed.Dp === ptrType$1.nil) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (priv.Precomputed.Dp === ptrType$1.nil) { */ case 10: + _r$4 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.D, priv.PublicKey.N); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + m = _r$4; + $s = 12; continue; + /* } else { */ case 11: + _r$5 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.Precomputed.Dp, (x = priv.Primes, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + m = _r$5; + _r$6 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.Precomputed.Dq, (x$1 = priv.Primes, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + m2 = _r$6; + m.Sub(m, m2); + if (m.Sign() < 0) { + m.Add(m, (x$2 = priv.Primes, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0]))); + } + m.Mul(m, priv.Precomputed.Qinv); + _r$7 = m.Mod(m, (x$3 = priv.Primes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + m.Mul(m, (x$4 = priv.Primes, (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1]))); + m.Add(m, m2); + _ref = priv.Precomputed.CRTValues; + _i = 0; + /* while (true) { */ case 17: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 18; continue; } + i = _i; + values = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), CRTValue); + prime = (x$5 = priv.Primes, x$6 = 2 + i >> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); + _r$8 = m2.Exp(c, values.Exp, prime); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + m2.Sub(m2, m); + m2.Mul(m2, values.Coeff); + _r$9 = m2.Mod(m2, prime); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + if (m2.Sign() < 0) { + m2.Add(m2, prime); + } + m2.Mul(m2, values.R); + m.Add(m, m2); + _i++; + /* } */ $s = 17; continue; case 18: + /* } */ case 12: + /* */ if (!(ir === ptrType$1.nil)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!(ir === ptrType$1.nil)) { */ case 21: + m.Mul(m, ir); + _r$10 = m.Mod(m, priv.PublicKey.N); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + /* } */ case 22: + $s = -1; return [m, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: decrypt }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.bigE = bigE; $f.c = c; $f.cCopy = cCopy; $f.err = err; $f.i = i; $f.ir = ir; $f.m = m; $f.m2 = m2; $f.ok = ok; $f.prime = prime; $f.priv = priv; $f.r = r; $f.random = random; $f.rpowe = rpowe; $f.values = values; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + decryptAndCheck = function(random, priv, c) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, check, err, m, priv, random, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; c = $f.c; check = $f.check; err = $f.err; m = $f.m; priv = $f.priv; random = $f.random; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = ptrType$1.nil; + err = $ifaceNil; + _r = decrypt(random, priv, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + m = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$1.nil; + _tmp$1 = err; + m = _tmp; + err = _tmp$1; + $s = -1; return [m, err]; + } + _r$1 = encrypt(new big.Int.ptr(false, big.nat.nil), priv.PublicKey, m); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + check = _r$1; + if (!((c.Cmp(check) === 0))) { + _tmp$2 = ptrType$1.nil; + _tmp$3 = errors.New("rsa: internal error"); + m = _tmp$2; + err = _tmp$3; + $s = -1; return [m, err]; + } + _tmp$4 = m; + _tmp$5 = $ifaceNil; + m = _tmp$4; + err = _tmp$5; + $s = -1; return [m, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: decryptAndCheck }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.c = c; $f.check = check; $f.err = err; $f.m = m; $f.priv = priv; $f.random = random; $f.$s = $s; $f.$r = $r; return $f; + }; + DecryptOAEP = function(hash$1, random, priv, ciphertext, label) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tuple, _v, c, ciphertext, db, em, equals0, equals1, err, err$1, firstByteIsZero, hash$1, i, index, invalid, k, lHash, lHash2, lHash2Good, label, lookingForIndex, m, priv, random, rest, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; _v = $f._v; c = $f.c; ciphertext = $f.ciphertext; db = $f.db; em = $f.em; equals0 = $f.equals0; equals1 = $f.equals1; err = $f.err; err$1 = $f.err$1; firstByteIsZero = $f.firstByteIsZero; hash$1 = $f.hash$1; i = $f.i; index = $f.index; invalid = $f.invalid; k = $f.k; lHash = $f.lHash; lHash2 = $f.lHash2; lHash2Good = $f.lHash2Good; label = $f.label; lookingForIndex = $f.lookingForIndex; m = $f.m; priv = $f.priv; random = $f.random; rest = $f.rest; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = checkPub(priv.PublicKey); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + k = priv.PublicKey.Size(); + if (ciphertext.$length > k) { _v = true; $s = 3; continue s; } + _r = hash$1.Size(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _v = k < (($imul(_r, 2)) + 2 >> 0); case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; + /* } */ case 2: + c = new big.Int.ptr(false, big.nat.nil).SetBytes(ciphertext); + _r$1 = decrypt(random, priv, c); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + m = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, err$1]; + } + _r$2 = hash$1.Write(label); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = hash$1.Sum(sliceType.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + lHash = _r$3; + $r = hash$1.Reset(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + em = leftPad(m.Bytes(), k); + firstByteIsZero = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); + _r$4 = hash$1.Size(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + seed = $subslice(em, 1, (_r$4 + 1 >> 0)); + _r$5 = hash$1.Size(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + db = $subslice(em, (_r$5 + 1 >> 0)); + $r = mgf1XOR(seed, hash$1, db); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = mgf1XOR(db, hash$1, seed); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$6 = hash$1.Size(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + lHash2 = $subslice(db, 0, _r$6); + lHash2Good = subtle.ConstantTimeCompare(lHash, lHash2); + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + lookingForIndex = _tmp; + index = _tmp$1; + invalid = _tmp$2; + lookingForIndex = 1; + _r$7 = hash$1.Size(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + rest = $subslice(db, _r$7); + i = 0; + while (true) { + if (!(i < rest.$length)) { break; } + equals0 = subtle.ConstantTimeByteEq(((i < 0 || i >= rest.$length) ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + i]), 0); + equals1 = subtle.ConstantTimeByteEq(((i < 0 || i >= rest.$length) ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + i]), 1); + index = subtle.ConstantTimeSelect(lookingForIndex & equals1, i, index); + lookingForIndex = subtle.ConstantTimeSelect(equals1, 0, lookingForIndex); + invalid = subtle.ConstantTimeSelect((lookingForIndex & ~equals0) >> 0, 1, invalid); + i = i + (1) >> 0; + } + if (!(((((((firstByteIsZero & lHash2Good) & ~invalid) >> 0) & ~lookingForIndex) >> 0) === 1))) { + $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; + } + $s = -1; return [$subslice(rest, (index + 1 >> 0)), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: DecryptOAEP }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f._v = _v; $f.c = c; $f.ciphertext = ciphertext; $f.db = db; $f.em = em; $f.equals0 = equals0; $f.equals1 = equals1; $f.err = err; $f.err$1 = err$1; $f.firstByteIsZero = firstByteIsZero; $f.hash$1 = hash$1; $f.i = i; $f.index = index; $f.invalid = invalid; $f.k = k; $f.lHash = lHash; $f.lHash2 = lHash2; $f.lHash2Good = lHash2Good; $f.label = label; $f.lookingForIndex = lookingForIndex; $f.m = m; $f.priv = priv; $f.random = random; $f.rest = rest; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DecryptOAEP = DecryptOAEP; + leftPad = function(input, size) { + var input, n, out, size; + out = sliceType.nil; + n = input.$length; + if (n > size) { + n = size; + } + out = $makeSlice(sliceType, size); + $copySlice($subslice(out, (out.$length - n >> 0)), input); + return out; + }; + ptrType.methods = [{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [crypto.Hash], false)}, {prop: "saltLength", name: "saltLength", pkg: "crypto/rsa", typ: $funcType([], [$Int], false)}]; + ptrType$5.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}]; + ptrType$4.methods = [{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [crypto.PublicKey], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.SignerOpts], [sliceType, $error], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.DecrypterOpts], [sliceType, $error], false)}, {prop: "Validate", name: "Validate", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Precompute", name: "Precompute", pkg: "", typ: $funcType([], [], false)}]; + PKCS1v15DecryptOptions.init("", [{prop: "SessionKeyLen", name: "SessionKeyLen", embedded: false, exported: true, typ: $Int, tag: ""}]); + PSSOptions.init("", [{prop: "SaltLength", name: "SaltLength", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Hash", name: "Hash", embedded: false, exported: true, typ: crypto.Hash, tag: ""}]); + PublicKey.init("", [{prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}]); + OAEPOptions.init("", [{prop: "Hash", name: "Hash", embedded: false, exported: true, typ: crypto.Hash, tag: ""}, {prop: "Label", name: "Label", embedded: false, exported: true, typ: sliceType, tag: ""}]); + PrivateKey.init("", [{prop: "PublicKey", name: "PublicKey", embedded: true, exported: true, typ: PublicKey, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Primes", name: "Primes", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Precomputed", name: "Precomputed", embedded: false, exported: true, typ: PrecomputedValues, tag: ""}]); + PrecomputedValues.init("", [{prop: "Dp", name: "Dp", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Dq", name: "Dq", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Qinv", name: "Qinv", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "CRTValues", name: "CRTValues", embedded: false, exported: true, typ: sliceType$2, tag: ""}]); + CRTValue.init("", [{prop: "Exp", name: "Exp", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Coeff", name: "Coeff", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$1, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = crypto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = randutil.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = subtle.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + hashPrefixes = $makeMap(crypto.Hash.keyFor, [{ k: 2, v: new sliceType([48, 32, 48, 12, 6, 8, 42, 134, 72, 134, 247, 13, 2, 5, 5, 0, 4, 16]) }, { k: 3, v: new sliceType([48, 33, 48, 9, 6, 5, 43, 14, 3, 2, 26, 5, 0, 4, 20]) }, { k: 4, v: new sliceType([48, 45, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 4, 5, 0, 4, 28]) }, { k: 5, v: new sliceType([48, 49, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 4, 32]) }, { k: 6, v: new sliceType([48, 65, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 4, 48]) }, { k: 7, v: new sliceType([48, 81, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 4, 64]) }, { k: 8, v: new sliceType([]) }, { k: 9, v: new sliceType([48, 32, 48, 8, 6, 6, 40, 207, 6, 3, 0, 49, 4, 20]) }]); + bigZero = big.NewInt(new $Int64(0, 0)); + bigOne = big.NewInt(new $Int64(0, 1)); + errPublicModulus = errors.New("crypto/rsa: missing public modulus"); + errPublicExponentSmall = errors.New("crypto/rsa: public exponent too small"); + errPublicExponentLarge = errors.New("crypto/rsa: public exponent too large"); + $pkg.ErrMessageTooLong = errors.New("crypto/rsa: message too long for RSA public key size"); + $pkg.ErrDecryption = errors.New("crypto/rsa: decryption error"); + $pkg.ErrVerification = errors.New("crypto/rsa: verification error"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/sha1"] = (function() { + var $pkg = {}, $init, crypto, errors, hash, digest, sliceType, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, ptrType, block, init, appendUint64, appendUint32, consumeUint64, consumeUint32, New, putUint64, putUint32, blockGeneric; + crypto = $packages["crypto"]; + errors = $packages["errors"]; + hash = $packages["hash"]; + digest = $pkg.digest = $newType(0, $kindStruct, "sha1.digest", true, "crypto/sha1", false, function(h_, x_, nx_, len_) { + this.$val = this; + if (arguments.length === 0) { + this.h = arrayType$2.zero(); + this.x = arrayType$3.zero(); + this.nx = 0; + this.len = new $Uint64(0, 0); + return; + } + this.h = h_; + this.x = x_; + this.nx = nx_; + this.len = len_; + }); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 8); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint32, 5); + arrayType$3 = $arrayType($Uint8, 64); + arrayType$4 = $arrayType($Uint8, 20); + arrayType$5 = $arrayType($Uint32, 16); + ptrType = $ptrType(digest); + init = function() { + crypto.RegisterHash(3, New); + }; + digest.ptr.prototype.MarshalBinary = function() { + var b, d; + d = this; + b = $makeSlice(sliceType, 0, 96); + b = $appendSlice(b, "sha\x01"); + b = appendUint32(b, d.h[0]); + b = appendUint32(b, d.h[1]); + b = appendUint32(b, d.h[2]); + b = appendUint32(b, d.h[3]); + b = appendUint32(b, d.h[4]); + b = $appendSlice(b, $subslice(new sliceType(d.x), 0, d.nx)); + b = $subslice(b, 0, ((b.$length + 64 >> 0) - (d.nx) >> 0)); + b = appendUint64(b, d.len); + return [b, $ifaceNil]; + }; + digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + digest.ptr.prototype.UnmarshalBinary = function(b) { + var _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, d; + d = this; + if (b.$length < 4 || !(($bytesToString($subslice(b, 0, 4))) === "sha\x01")) { + return errors.New("crypto/sha1: invalid hash state identifier"); + } + if (!((b.$length === 96))) { + return errors.New("crypto/sha1: invalid hash state size"); + } + b = $subslice(b, 4); + _tuple = consumeUint32(b); + b = _tuple[0]; + d.h[0] = _tuple[1]; + _tuple$1 = consumeUint32(b); + b = _tuple$1[0]; + d.h[1] = _tuple$1[1]; + _tuple$2 = consumeUint32(b); + b = _tuple$2[0]; + d.h[2] = _tuple$2[1]; + _tuple$3 = consumeUint32(b); + b = _tuple$3[0]; + d.h[3] = _tuple$3[1]; + _tuple$4 = consumeUint32(b); + b = _tuple$4[0]; + d.h[4] = _tuple$4[1]; + b = $subslice(b, $copySlice(new sliceType(d.x), b)); + _tuple$5 = consumeUint64(b); + b = _tuple$5[0]; + d.len = _tuple$5[1]; + d.nx = (_r = ((d.len.$low >> 0)) % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + return $ifaceNil; + }; + digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; + appendUint64 = function(b, x) { + var a, b, x; + a = arrayType.zero(); + putUint64(new sliceType(a), x); + return $appendSlice(b, new sliceType(a)); + }; + appendUint32 = function(b, x) { + var a, b, x; + a = arrayType$1.zero(); + putUint32(new sliceType(a), x); + return $appendSlice(b, new sliceType(a)); + }; + consumeUint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + return [$subslice(b, 8), x$14]; + }; + consumeUint32 = function(b) { + var b, x; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + x = ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; + return [$subslice(b, 4), x]; + }; + digest.ptr.prototype.Reset = function() { + var d; + d = this; + d.h[0] = 1732584193; + d.h[1] = 4023233417; + d.h[2] = 2562383102; + d.h[3] = 271733878; + d.h[4] = 3285377520; + d.nx = 0; + d.len = new $Uint64(0, 0); + }; + digest.prototype.Reset = function() { return this.$val.Reset(); }; + New = function() { + var d; + d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0)); + d.Reset(); + return d; + }; + $pkg.New = New; + digest.ptr.prototype.Size = function() { + var d; + d = this; + return 20; + }; + digest.prototype.Size = function() { return this.$val.Size(); }; + digest.ptr.prototype.BlockSize = function() { + var d; + d = this; + return 64; + }; + digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + digest.ptr.prototype.Write = function(p) { + var d, err, n, n$1, nn, p, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; err = $f.err; n = $f.n; n$1 = $f.n$1; nn = $f.nn; p = $f.p; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + d = this; + nn = p.$length; + d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + /* */ if (d.nx > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (d.nx > 0) { */ case 1: + n = $copySlice($subslice(new sliceType(d.x), d.nx), p); + d.nx = d.nx + (n) >> 0; + /* */ if (d.nx === 64) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (d.nx === 64) { */ case 3: + $r = block(d, new sliceType(d.x)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d.nx = 0; + /* } */ case 4: + p = $subslice(p, n); + /* } */ case 2: + /* */ if (p.$length >= 64) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (p.$length >= 64) { */ case 6: + n$1 = (p.$length & ~63) >> 0; + $r = block(d, $subslice(p, 0, n$1)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p = $subslice(p, n$1); + /* } */ case 7: + if (p.$length > 0) { + d.nx = $copySlice(new sliceType(d.x), p); + } + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Write }; } $f.d = d; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Write = function(p) { return this.$val.Write(p); }; + digest.ptr.prototype.Sum = function(in$1) { + var _r, d, d0, hash$1, in$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; d = $f.d; d0 = $f.d0; hash$1 = $f.hash$1; in$1 = $f.in$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + d0 = $clone(d, digest); + _r = d0.checkSum(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hash$1 = $clone(_r, arrayType$4); + $s = -1; return $appendSlice(in$1, new sliceType(hash$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Sum }; } $f._r = _r; $f.d = d; $f.d0 = d0; $f.hash$1 = hash$1; $f.in$1 = in$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; + digest.ptr.prototype.checkSum = function() { + var _r, _r$1, _r$2, d, digest$1, len, tmp, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; d = $f.d; digest$1 = $f.digest$1; len = $f.len; tmp = $f.tmp; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + len = d.len; + tmp = arrayType$3.zero(); + tmp[0] = 128; + /* */ if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { */ case 1: + _r = d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$1.$high, 56 - x$1.$low))))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = 3; continue; + /* } else { */ case 2: + _r$1 = d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$2.$high, 120 - x$2.$low))))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 3: + len = $shiftLeft64(len, (3)); + putUint64(new sliceType(tmp), len); + _r$2 = d.Write($subslice(new sliceType(tmp), 0, 8)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + if (!((d.nx === 0))) { + $panic(new $String("d.nx != 0")); + } + digest$1 = arrayType$4.zero(); + putUint32($subslice(new sliceType(digest$1), 0), d.h[0]); + putUint32($subslice(new sliceType(digest$1), 4), d.h[1]); + putUint32($subslice(new sliceType(digest$1), 8), d.h[2]); + putUint32($subslice(new sliceType(digest$1), 12), d.h[3]); + putUint32($subslice(new sliceType(digest$1), 16), d.h[4]); + $s = -1; return digest$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.checkSum }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.d = d; $f.digest$1 = digest$1; $f.len = len; $f.tmp = tmp; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.checkSum = function() { return this.$val.checkSum(); }; + digest.ptr.prototype.ConstantTimeSum = function(in$1) { + var _r, d, d0, hash$1, in$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; d = $f.d; d0 = $f.d0; hash$1 = $f.hash$1; in$1 = $f.in$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + d0 = $clone(d, digest); + _r = d0.constSum(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hash$1 = $clone(_r, arrayType$4); + $s = -1; return $appendSlice(in$1, new sliceType(hash$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.ConstantTimeSum }; } $f._r = _r; $f.d = d; $f.d0 = d0; $f.hash$1 = hash$1; $f.in$1 = in$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.ConstantTimeSum = function(in$1) { return this.$val.ConstantTimeSum(in$1); }; + digest.ptr.prototype.constSum = function() { + var _i, _i$1, _index, _index$1, _index$2, _index$3, _ref, _ref$1, d, digest$1, i, i$1, i$2, i$3, i$4, l, length, mask, mask1b, nx, s, s$1, separator, t, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _index = $f._index; _index$1 = $f._index$1; _index$2 = $f._index$2; _index$3 = $f._index$3; _ref = $f._ref; _ref$1 = $f._ref$1; d = $f.d; digest$1 = $f.digest$1; i = $f.i; i$1 = $f.i$1; i$2 = $f.i$2; i$3 = $f.i$3; i$4 = $f.i$4; l = $f.l; length = $f.length; mask = $f.mask; mask1b = $f.mask1b; nx = $f.nx; s = $f.s; s$1 = $f.s$1; separator = $f.separator; t = $f.t; x = $f.x; x$1 = $f.x$1; x$10 = $f.x$10; x$11 = $f.x$11; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + length = arrayType.zero(); + l = $shiftLeft64(d.len, 3); + i = 0; + while (true) { + if (!(i < 8)) { break; } + ((i < 0 || i >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[i] = (($shiftRightUint64(l, ((56 - (8 * i >>> 0) >>> 0))).$low << 24 >>> 24))); + i = i + (1) >>> 0; + } + nx = ((d.nx << 24 >>> 24)); + t = nx - 56 << 24 >>> 24; + mask1b = (((((t << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); + separator = 128; + i$1 = 0; + while (true) { + if (!(i$1 < 64)) { break; } + mask = ((((((i$1 - nx << 24 >>> 24) << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); + (x$1 = d.x, ((i$1 < 0 || i$1 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i$1] = ((((((~mask << 24 >>> 24) & separator) >>> 0)) | (((mask & (x = d.x, ((i$1 < 0 || i$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i$1]))) >>> 0))) >>> 0))); + separator = (separator & (mask)) >>> 0; + if (i$1 >= 56) { + (x$4 = d.x, ((i$1 < 0 || i$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i$1] = (((x$2 = d.x, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1])) | (((mask1b & (x$3 = i$1 - 56 << 24 >>> 24, ((x$3 < 0 || x$3 >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[x$3]))) >>> 0))) >>> 0))); + } + i$1 = i$1 + (1) << 24 >>> 24; + } + $r = block(d, new sliceType(d.x)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + digest$1 = arrayType$4.zero(); + _ref = d.h; + _i = 0; + while (true) { + if (!(_i < 5)) { break; } + i$2 = _i; + s = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + (x$5 = $imul(i$2, 4), ((x$5 < 0 || x$5 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$5] = ((mask1b & (((s >>> 24 >>> 0) << 24 >>> 24))) >>> 0))); + (x$6 = ($imul(i$2, 4)) + 1 >> 0, ((x$6 < 0 || x$6 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$6] = ((mask1b & (((s >>> 16 >>> 0) << 24 >>> 24))) >>> 0))); + (x$7 = ($imul(i$2, 4)) + 2 >> 0, ((x$7 < 0 || x$7 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$7] = ((mask1b & (((s >>> 8 >>> 0) << 24 >>> 24))) >>> 0))); + (x$8 = ($imul(i$2, 4)) + 3 >> 0, ((x$8 < 0 || x$8 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$8] = ((mask1b & ((s << 24 >>> 24))) >>> 0))); + _i++; + } + i$3 = 0; + while (true) { + if (!(i$3 < 64)) { break; } + if (i$3 < 56) { + (x$9 = d.x, ((i$3 < 0 || i$3 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i$3] = separator)); + separator = 0; + } else { + (x$11 = d.x, ((i$3 < 0 || i$3 >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i$3] = (x$10 = i$3 - 56 << 24 >>> 24, ((x$10 < 0 || x$10 >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[x$10])))); + } + i$3 = i$3 + (1) << 24 >>> 24; + } + $r = block(d, new sliceType(d.x)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref$1 = d.h; + _i$1 = 0; + while (true) { + if (!(_i$1 < 5)) { break; } + i$4 = _i$1; + s$1 = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); + _index = $imul(i$4, 4); + ((_index < 0 || _index >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index] = ((((_index < 0 || _index >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 24 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); + _index$1 = ($imul(i$4, 4)) + 1 >> 0; + ((_index$1 < 0 || _index$1 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$1] = ((((_index$1 < 0 || _index$1 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$1]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 16 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); + _index$2 = ($imul(i$4, 4)) + 2 >> 0; + ((_index$2 < 0 || _index$2 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$2] = ((((_index$2 < 0 || _index$2 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$2]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 8 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); + _index$3 = ($imul(i$4, 4)) + 3 >> 0; + ((_index$3 < 0 || _index$3 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$3] = ((((_index$3 < 0 || _index$3 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$3]) | ((((~mask1b << 24 >>> 24) & ((s$1 << 24 >>> 24))) >>> 0))) >>> 0)); + _i$1++; + } + $s = -1; return digest$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.constSum }; } $f._i = _i; $f._i$1 = _i$1; $f._index = _index; $f._index$1 = _index$1; $f._index$2 = _index$2; $f._index$3 = _index$3; $f._ref = _ref; $f._ref$1 = _ref$1; $f.d = d; $f.digest$1 = digest$1; $f.i = i; $f.i$1 = i$1; $f.i$2 = i$2; $f.i$3 = i$3; $f.i$4 = i$4; $f.l = l; $f.length = length; $f.mask = mask; $f.mask1b = mask1b; $f.nx = nx; $f.s = s; $f.s$1 = s$1; $f.separator = separator; $f.t = t; $f.x = x; $f.x$1 = x$1; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.constSum = function() { return this.$val.constSum(); }; + putUint64 = function(x, s) { + var s, x; + $unused((7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7])); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (($shiftRightUint64(s, 56).$low << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (($shiftRightUint64(s, 48).$low << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (($shiftRightUint64(s, 40).$low << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = (($shiftRightUint64(s, 32).$low << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (($shiftRightUint64(s, 24).$low << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (($shiftRightUint64(s, 16).$low << 24 >>> 24))); + (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = (($shiftRightUint64(s, 8).$low << 24 >>> 24))); + (7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7] = ((s.$low << 24 >>> 24))); + }; + putUint32 = function(x, s) { + var s, x; + $unused((3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3])); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((s >>> 24 >>> 0) << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((s >>> 16 >>> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((s >>> 8 >>> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((s << 24 >>> 24))); + }; + blockGeneric = function(dig, p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, a5, a5$1, a5$2, a5$3, a5$4, b, b30, b30$1, b30$2, b30$3, b30$4, c, d, dig, e, f, f$1, f$2, f$3, f$4, h0, h1, h2, h3, h4, i, i$1, j, p, t, t$1, t$2, t$3, t$4, tmp, tmp$1, tmp$2, tmp$3, w, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + w = arrayType$5.zero(); + _tmp = dig.h[0]; + _tmp$1 = dig.h[1]; + _tmp$2 = dig.h[2]; + _tmp$3 = dig.h[3]; + _tmp$4 = dig.h[4]; + h0 = _tmp; + h1 = _tmp$1; + h2 = _tmp$2; + h3 = _tmp$3; + h4 = _tmp$4; + while (true) { + if (!(p.$length >= 64)) { break; } + i = 0; + while (true) { + if (!(i < 16)) { break; } + j = $imul(i, 4); + ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (((((((((((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) >>> 0)) << 24 >>> 0) | ((((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = j + 3 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + _tmp$5 = h0; + _tmp$6 = h1; + _tmp$7 = h2; + _tmp$8 = h3; + _tmp$9 = h4; + a = _tmp$5; + b = _tmp$6; + c = _tmp$7; + d = _tmp$8; + e = _tmp$9; + i$1 = 0; + while (true) { + if (!(i$1 < 16)) { break; } + f = (((b & c) >>> 0) | ((((~b >>> 0)) & d) >>> 0)) >>> 0; + a5 = ((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0; + b30 = ((b << 30 >>> 0) | (b >>> 2 >>> 0)) >>> 0; + t = (((a5 + f >>> 0) + e >>> 0) + (x$3 = i$1 & 15, ((x$3 < 0 || x$3 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$3])) >>> 0) + 1518500249 >>> 0; + _tmp$10 = t; + _tmp$11 = a; + _tmp$12 = b30; + _tmp$13 = c; + _tmp$14 = d; + a = _tmp$10; + b = _tmp$11; + c = _tmp$12; + d = _tmp$13; + e = _tmp$14; + i$1 = i$1 + (1) >> 0; + } + while (true) { + if (!(i$1 < 20)) { break; } + tmp = ((((((x$4 = ((i$1 - 3 >> 0)) & 15, ((x$4 < 0 || x$4 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$4])) ^ (x$5 = ((i$1 - 8 >> 0)) & 15, ((x$5 < 0 || x$5 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$5]))) >>> 0) ^ (x$6 = ((i$1 - 14 >> 0)) & 15, ((x$6 < 0 || x$6 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$6]))) >>> 0) ^ (x$7 = (i$1) & 15, ((x$7 < 0 || x$7 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$7]))) >>> 0; + (x$8 = i$1 & 15, ((x$8 < 0 || x$8 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$8] = (((tmp << 1 >>> 0) | (tmp >>> 31 >>> 0)) >>> 0))); + f$1 = (((b & c) >>> 0) | ((((~b >>> 0)) & d) >>> 0)) >>> 0; + a5$1 = ((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0; + b30$1 = ((b << 30 >>> 0) | (b >>> 2 >>> 0)) >>> 0; + t$1 = (((a5$1 + f$1 >>> 0) + e >>> 0) + (x$9 = i$1 & 15, ((x$9 < 0 || x$9 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$9])) >>> 0) + 1518500249 >>> 0; + _tmp$15 = t$1; + _tmp$16 = a; + _tmp$17 = b30$1; + _tmp$18 = c; + _tmp$19 = d; + a = _tmp$15; + b = _tmp$16; + c = _tmp$17; + d = _tmp$18; + e = _tmp$19; + i$1 = i$1 + (1) >> 0; + } + while (true) { + if (!(i$1 < 40)) { break; } + tmp$1 = ((((((x$10 = ((i$1 - 3 >> 0)) & 15, ((x$10 < 0 || x$10 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$10])) ^ (x$11 = ((i$1 - 8 >> 0)) & 15, ((x$11 < 0 || x$11 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$11]))) >>> 0) ^ (x$12 = ((i$1 - 14 >> 0)) & 15, ((x$12 < 0 || x$12 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$12]))) >>> 0) ^ (x$13 = (i$1) & 15, ((x$13 < 0 || x$13 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$13]))) >>> 0; + (x$14 = i$1 & 15, ((x$14 < 0 || x$14 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$14] = (((tmp$1 << 1 >>> 0) | (tmp$1 >>> 31 >>> 0)) >>> 0))); + f$2 = (((b ^ c) >>> 0) ^ d) >>> 0; + a5$2 = ((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0; + b30$2 = ((b << 30 >>> 0) | (b >>> 2 >>> 0)) >>> 0; + t$2 = (((a5$2 + f$2 >>> 0) + e >>> 0) + (x$15 = i$1 & 15, ((x$15 < 0 || x$15 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$15])) >>> 0) + 1859775393 >>> 0; + _tmp$20 = t$2; + _tmp$21 = a; + _tmp$22 = b30$2; + _tmp$23 = c; + _tmp$24 = d; + a = _tmp$20; + b = _tmp$21; + c = _tmp$22; + d = _tmp$23; + e = _tmp$24; + i$1 = i$1 + (1) >> 0; + } + while (true) { + if (!(i$1 < 60)) { break; } + tmp$2 = ((((((x$16 = ((i$1 - 3 >> 0)) & 15, ((x$16 < 0 || x$16 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$16])) ^ (x$17 = ((i$1 - 8 >> 0)) & 15, ((x$17 < 0 || x$17 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$17]))) >>> 0) ^ (x$18 = ((i$1 - 14 >> 0)) & 15, ((x$18 < 0 || x$18 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$18]))) >>> 0) ^ (x$19 = (i$1) & 15, ((x$19 < 0 || x$19 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$19]))) >>> 0; + (x$20 = i$1 & 15, ((x$20 < 0 || x$20 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$20] = (((tmp$2 << 1 >>> 0) | (tmp$2 >>> 31 >>> 0)) >>> 0))); + f$3 = (((((((b | c) >>> 0)) & d) >>> 0)) | (((b & c) >>> 0))) >>> 0; + a5$3 = ((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0; + b30$3 = ((b << 30 >>> 0) | (b >>> 2 >>> 0)) >>> 0; + t$3 = (((a5$3 + f$3 >>> 0) + e >>> 0) + (x$21 = i$1 & 15, ((x$21 < 0 || x$21 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$21])) >>> 0) + 2400959708 >>> 0; + _tmp$25 = t$3; + _tmp$26 = a; + _tmp$27 = b30$3; + _tmp$28 = c; + _tmp$29 = d; + a = _tmp$25; + b = _tmp$26; + c = _tmp$27; + d = _tmp$28; + e = _tmp$29; + i$1 = i$1 + (1) >> 0; + } + while (true) { + if (!(i$1 < 80)) { break; } + tmp$3 = ((((((x$22 = ((i$1 - 3 >> 0)) & 15, ((x$22 < 0 || x$22 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$22])) ^ (x$23 = ((i$1 - 8 >> 0)) & 15, ((x$23 < 0 || x$23 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$23]))) >>> 0) ^ (x$24 = ((i$1 - 14 >> 0)) & 15, ((x$24 < 0 || x$24 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$24]))) >>> 0) ^ (x$25 = (i$1) & 15, ((x$25 < 0 || x$25 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$25]))) >>> 0; + (x$26 = i$1 & 15, ((x$26 < 0 || x$26 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$26] = (((tmp$3 << 1 >>> 0) | (tmp$3 >>> 31 >>> 0)) >>> 0))); + f$4 = (((b ^ c) >>> 0) ^ d) >>> 0; + a5$4 = ((a << 5 >>> 0) | (a >>> 27 >>> 0)) >>> 0; + b30$4 = ((b << 30 >>> 0) | (b >>> 2 >>> 0)) >>> 0; + t$4 = (((a5$4 + f$4 >>> 0) + e >>> 0) + (x$27 = i$1 & 15, ((x$27 < 0 || x$27 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$27])) >>> 0) + 3395469782 >>> 0; + _tmp$30 = t$4; + _tmp$31 = a; + _tmp$32 = b30$4; + _tmp$33 = c; + _tmp$34 = d; + a = _tmp$30; + b = _tmp$31; + c = _tmp$32; + d = _tmp$33; + e = _tmp$34; + i$1 = i$1 + (1) >> 0; + } + h0 = h0 + (a) >>> 0; + h1 = h1 + (b) >>> 0; + h2 = h2 + (c) >>> 0; + h3 = h3 + (d) >>> 0; + h4 = h4 + (e) >>> 0; + p = $subslice(p, 64); + } + _tmp$35 = h0; + _tmp$36 = h1; + _tmp$37 = h2; + _tmp$38 = h3; + _tmp$39 = h4; + dig.h[0] = _tmp$35; + dig.h[1] = _tmp$36; + dig.h[2] = _tmp$37; + dig.h[3] = _tmp$38; + dig.h[4] = _tmp$39; + }; + ptrType.methods = [{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha1", typ: $funcType([], [arrayType$4], false)}, {prop: "ConstantTimeSum", name: "ConstantTimeSum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "constSum", name: "constSum", pkg: "crypto/sha1", typ: $funcType([], [arrayType$4], false)}]; + digest.init("crypto/sha1", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + block = blockGeneric; + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/sha256"] = (function() { + var $pkg = {}, $init, crypto, errors, hash, digest, sliceType, sliceType$1, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$6, ptrType, _K, block, init, putUint32, putUint64, appendUint64, appendUint32, consumeUint64, consumeUint32, New, New224, blockGeneric; + crypto = $packages["crypto"]; + errors = $packages["errors"]; + hash = $packages["hash"]; + digest = $pkg.digest = $newType(0, $kindStruct, "sha256.digest", true, "crypto/sha256", false, function(h_, x_, nx_, len_, is224_) { + this.$val = this; + if (arguments.length === 0) { + this.h = arrayType$2.zero(); + this.x = arrayType$3.zero(); + this.nx = 0; + this.len = new $Uint64(0, 0); + this.is224 = false; + return; + } + this.h = h_; + this.x = x_; + this.nx = nx_; + this.len = len_; + this.is224 = is224_; + }); + sliceType = $sliceType($Uint32); + sliceType$1 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 8); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint32, 8); + arrayType$3 = $arrayType($Uint8, 64); + arrayType$4 = $arrayType($Uint8, 32); + arrayType$6 = $arrayType($Uint32, 64); + ptrType = $ptrType(digest); + init = function() { + crypto.RegisterHash(4, New224); + crypto.RegisterHash(5, New); + }; + digest.ptr.prototype.MarshalBinary = function() { + var b, d; + d = this; + b = $makeSlice(sliceType$1, 0, 108); + if (d.is224) { + b = $appendSlice(b, "sha\x02"); + } else { + b = $appendSlice(b, "sha\x03"); + } + b = appendUint32(b, d.h[0]); + b = appendUint32(b, d.h[1]); + b = appendUint32(b, d.h[2]); + b = appendUint32(b, d.h[3]); + b = appendUint32(b, d.h[4]); + b = appendUint32(b, d.h[5]); + b = appendUint32(b, d.h[6]); + b = appendUint32(b, d.h[7]); + b = $appendSlice(b, $subslice(new sliceType$1(d.x), 0, d.nx)); + b = $subslice(b, 0, ((b.$length + 64 >> 0) - (d.nx) >> 0)); + b = appendUint64(b, d.len); + return [b, $ifaceNil]; + }; + digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + digest.ptr.prototype.UnmarshalBinary = function(b) { + var _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, b, d; + d = this; + if (b.$length < 4 || (d.is224 && !(($bytesToString($subslice(b, 0, 4))) === "sha\x02")) || (!d.is224 && !(($bytesToString($subslice(b, 0, 4))) === "sha\x03"))) { + return errors.New("crypto/sha256: invalid hash state identifier"); + } + if (!((b.$length === 108))) { + return errors.New("crypto/sha256: invalid hash state size"); + } + b = $subslice(b, 4); + _tuple = consumeUint32(b); + b = _tuple[0]; + d.h[0] = _tuple[1]; + _tuple$1 = consumeUint32(b); + b = _tuple$1[0]; + d.h[1] = _tuple$1[1]; + _tuple$2 = consumeUint32(b); + b = _tuple$2[0]; + d.h[2] = _tuple$2[1]; + _tuple$3 = consumeUint32(b); + b = _tuple$3[0]; + d.h[3] = _tuple$3[1]; + _tuple$4 = consumeUint32(b); + b = _tuple$4[0]; + d.h[4] = _tuple$4[1]; + _tuple$5 = consumeUint32(b); + b = _tuple$5[0]; + d.h[5] = _tuple$5[1]; + _tuple$6 = consumeUint32(b); + b = _tuple$6[0]; + d.h[6] = _tuple$6[1]; + _tuple$7 = consumeUint32(b); + b = _tuple$7[0]; + d.h[7] = _tuple$7[1]; + b = $subslice(b, $copySlice(new sliceType$1(d.x), b)); + _tuple$8 = consumeUint64(b); + b = _tuple$8[0]; + d.len = _tuple$8[1]; + d.nx = (_r = ((d.len.$low >> 0)) % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + return $ifaceNil; + }; + digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; + putUint32 = function(x, s) { + var s, x; + $unused((3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3])); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((s >>> 24 >>> 0) << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((s >>> 16 >>> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((s >>> 8 >>> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((s << 24 >>> 24))); + }; + putUint64 = function(x, s) { + var s, x; + $unused((7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7])); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (($shiftRightUint64(s, 56).$low << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (($shiftRightUint64(s, 48).$low << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (($shiftRightUint64(s, 40).$low << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = (($shiftRightUint64(s, 32).$low << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (($shiftRightUint64(s, 24).$low << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (($shiftRightUint64(s, 16).$low << 24 >>> 24))); + (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = (($shiftRightUint64(s, 8).$low << 24 >>> 24))); + (7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7] = ((s.$low << 24 >>> 24))); + }; + appendUint64 = function(b, x) { + var a, b, x; + a = arrayType.zero(); + putUint64(new sliceType$1(a), x); + return $appendSlice(b, new sliceType$1(a)); + }; + appendUint32 = function(b, x) { + var a, b, x; + a = arrayType$1.zero(); + putUint32(new sliceType$1(a), x); + return $appendSlice(b, new sliceType$1(a)); + }; + consumeUint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + return [$subslice(b, 8), x$14]; + }; + consumeUint32 = function(b) { + var b, x; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + x = ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; + return [$subslice(b, 4), x]; + }; + digest.ptr.prototype.Reset = function() { + var d; + d = this; + if (!d.is224) { + d.h[0] = 1779033703; + d.h[1] = 3144134277; + d.h[2] = 1013904242; + d.h[3] = 2773480762; + d.h[4] = 1359893119; + d.h[5] = 2600822924; + d.h[6] = 528734635; + d.h[7] = 1541459225; + } else { + d.h[0] = 3238371032; + d.h[1] = 914150663; + d.h[2] = 812702999; + d.h[3] = 4144912697; + d.h[4] = 4290775857; + d.h[5] = 1750603025; + d.h[6] = 1694076839; + d.h[7] = 3204075428; + } + d.nx = 0; + d.len = new $Uint64(0, 0); + }; + digest.prototype.Reset = function() { return this.$val.Reset(); }; + New = function() { + var d; + d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), false); + d.Reset(); + return d; + }; + $pkg.New = New; + New224 = function() { + var d; + d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), false); + d.is224 = true; + d.Reset(); + return d; + }; + $pkg.New224 = New224; + digest.ptr.prototype.Size = function() { + var d; + d = this; + if (!d.is224) { + return 32; + } + return 28; + }; + digest.prototype.Size = function() { return this.$val.Size(); }; + digest.ptr.prototype.BlockSize = function() { + var d; + d = this; + return 64; + }; + digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + digest.ptr.prototype.Write = function(p) { + var d, err, n, n$1, nn, p, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; err = $f.err; n = $f.n; n$1 = $f.n$1; nn = $f.nn; p = $f.p; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + d = this; + nn = p.$length; + d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + /* */ if (d.nx > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (d.nx > 0) { */ case 1: + n = $copySlice($subslice(new sliceType$1(d.x), d.nx), p); + d.nx = d.nx + (n) >> 0; + /* */ if (d.nx === 64) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (d.nx === 64) { */ case 3: + $r = block(d, new sliceType$1(d.x)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d.nx = 0; + /* } */ case 4: + p = $subslice(p, n); + /* } */ case 2: + /* */ if (p.$length >= 64) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (p.$length >= 64) { */ case 6: + n$1 = (p.$length & ~63) >> 0; + $r = block(d, $subslice(p, 0, n$1)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p = $subslice(p, n$1); + /* } */ case 7: + if (p.$length > 0) { + d.nx = $copySlice(new sliceType$1(d.x), p); + } + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Write }; } $f.d = d; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.nn = nn; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Write = function(p) { return this.$val.Write(p); }; + digest.ptr.prototype.Sum = function(in$1) { + var _r, d, d0, hash$1, in$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; d = $f.d; d0 = $f.d0; hash$1 = $f.hash$1; in$1 = $f.in$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + d0 = $clone(d, digest); + _r = d0.checkSum(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hash$1 = $clone(_r, arrayType$4); + if (d0.is224) { + $s = -1; return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 28)); + } + $s = -1; return $appendSlice(in$1, new sliceType$1(hash$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.Sum }; } $f._r = _r; $f.d = d; $f.d0 = d0; $f.hash$1 = hash$1; $f.in$1 = in$1; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; + digest.ptr.prototype.checkSum = function() { + var _r, _r$1, _r$2, d, digest$1, len, tmp, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; d = $f.d; digest$1 = $f.digest$1; len = $f.len; tmp = $f.tmp; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + len = d.len; + tmp = arrayType$3.zero(); + tmp[0] = 128; + /* */ if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { */ case 1: + _r = d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$1.$high, 56 - x$1.$low))))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = 3; continue; + /* } else { */ case 2: + _r$1 = d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$2.$high, 120 - x$2.$low))))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 3: + len = $shiftLeft64(len, (3)); + putUint64(new sliceType$1(tmp), len); + _r$2 = d.Write($subslice(new sliceType$1(tmp), 0, 8)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + if (!((d.nx === 0))) { + $panic(new $String("d.nx != 0")); + } + digest$1 = arrayType$4.zero(); + putUint32($subslice(new sliceType$1(digest$1), 0), d.h[0]); + putUint32($subslice(new sliceType$1(digest$1), 4), d.h[1]); + putUint32($subslice(new sliceType$1(digest$1), 8), d.h[2]); + putUint32($subslice(new sliceType$1(digest$1), 12), d.h[3]); + putUint32($subslice(new sliceType$1(digest$1), 16), d.h[4]); + putUint32($subslice(new sliceType$1(digest$1), 20), d.h[5]); + putUint32($subslice(new sliceType$1(digest$1), 24), d.h[6]); + if (!d.is224) { + putUint32($subslice(new sliceType$1(digest$1), 28), d.h[7]); + } + $s = -1; return digest$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: digest.ptr.prototype.checkSum }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.d = d; $f.digest$1 = digest$1; $f.len = len; $f.tmp = tmp; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + digest.prototype.checkSum = function() { return this.$val.checkSum(); }; + blockGeneric = function(dig, p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, b, c, d, dig, e, f, g, h, h0, h1, h2, h3, h4, h5, h6, h7, i, i$1, i$2, j, p, t1, t1$1, t2, t2$1, v1, v2, w, x, x$1, x$2, x$3, x$4, x$5, x$6; + w = arrayType$6.zero(); + _tmp = dig.h[0]; + _tmp$1 = dig.h[1]; + _tmp$2 = dig.h[2]; + _tmp$3 = dig.h[3]; + _tmp$4 = dig.h[4]; + _tmp$5 = dig.h[5]; + _tmp$6 = dig.h[6]; + _tmp$7 = dig.h[7]; + h0 = _tmp; + h1 = _tmp$1; + h2 = _tmp$2; + h3 = _tmp$3; + h4 = _tmp$4; + h5 = _tmp$5; + h6 = _tmp$6; + h7 = _tmp$7; + while (true) { + if (!(p.$length >= 64)) { break; } + i = 0; + while (true) { + if (!(i < 16)) { break; } + j = $imul(i, 4); + ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (((((((((((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) >>> 0)) << 24 >>> 0) | ((((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = j + 3 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])) >>> 0))) >>> 0)); + i = i + (1) >> 0; + } + i$1 = 16; + while (true) { + if (!(i$1 < 64)) { break; } + v1 = (x$3 = i$1 - 2 >> 0, ((x$3 < 0 || x$3 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$3])); + t1 = (((((((v1 >>> 17 >>> 0) | (v1 << 15 >>> 0)) >>> 0)) ^ ((((v1 >>> 19 >>> 0) | (v1 << 13 >>> 0)) >>> 0))) >>> 0) ^ ((v1 >>> 10 >>> 0))) >>> 0; + v2 = (x$4 = i$1 - 15 >> 0, ((x$4 < 0 || x$4 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$4])); + t2 = (((((((v2 >>> 7 >>> 0) | (v2 << 25 >>> 0)) >>> 0)) ^ ((((v2 >>> 18 >>> 0) | (v2 << 14 >>> 0)) >>> 0))) >>> 0) ^ ((v2 >>> 3 >>> 0))) >>> 0; + ((i$1 < 0 || i$1 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$1] = (((t1 + (x$5 = i$1 - 7 >> 0, ((x$5 < 0 || x$5 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$5])) >>> 0) + t2 >>> 0) + (x$6 = i$1 - 16 >> 0, ((x$6 < 0 || x$6 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$6])) >>> 0)); + i$1 = i$1 + (1) >> 0; + } + _tmp$8 = h0; + _tmp$9 = h1; + _tmp$10 = h2; + _tmp$11 = h3; + _tmp$12 = h4; + _tmp$13 = h5; + _tmp$14 = h6; + _tmp$15 = h7; + a = _tmp$8; + b = _tmp$9; + c = _tmp$10; + d = _tmp$11; + e = _tmp$12; + f = _tmp$13; + g = _tmp$14; + h = _tmp$15; + i$2 = 0; + while (true) { + if (!(i$2 < 64)) { break; } + t1$1 = (((h + (((((((((e >>> 6 >>> 0) | (e << 26 >>> 0)) >>> 0)) ^ ((((e >>> 11 >>> 0) | (e << 21 >>> 0)) >>> 0))) >>> 0) ^ ((((e >>> 25 >>> 0) | (e << 7 >>> 0)) >>> 0))) >>> 0)) >>> 0) + ((((((e & f) >>> 0)) ^ ((((~e >>> 0) & g) >>> 0))) >>> 0)) >>> 0) + ((i$2 < 0 || i$2 >= _K.$length) ? ($throwRuntimeError("index out of range"), undefined) : _K.$array[_K.$offset + i$2]) >>> 0) + ((i$2 < 0 || i$2 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$2]) >>> 0; + t2$1 = (((((((((a >>> 2 >>> 0) | (a << 30 >>> 0)) >>> 0)) ^ ((((a >>> 13 >>> 0) | (a << 19 >>> 0)) >>> 0))) >>> 0) ^ ((((a >>> 22 >>> 0) | (a << 10 >>> 0)) >>> 0))) >>> 0)) + ((((((((a & b) >>> 0)) ^ (((a & c) >>> 0))) >>> 0) ^ (((b & c) >>> 0))) >>> 0)) >>> 0; + h = g; + g = f; + f = e; + e = d + t1$1 >>> 0; + d = c; + c = b; + b = a; + a = t1$1 + t2$1 >>> 0; + i$2 = i$2 + (1) >> 0; + } + h0 = h0 + (a) >>> 0; + h1 = h1 + (b) >>> 0; + h2 = h2 + (c) >>> 0; + h3 = h3 + (d) >>> 0; + h4 = h4 + (e) >>> 0; + h5 = h5 + (f) >>> 0; + h6 = h6 + (g) >>> 0; + h7 = h7 + (h) >>> 0; + p = $subslice(p, 64); + } + _tmp$16 = h0; + _tmp$17 = h1; + _tmp$18 = h2; + _tmp$19 = h3; + _tmp$20 = h4; + _tmp$21 = h5; + _tmp$22 = h6; + _tmp$23 = h7; + dig.h[0] = _tmp$16; + dig.h[1] = _tmp$17; + dig.h[2] = _tmp$18; + dig.h[3] = _tmp$19; + dig.h[4] = _tmp$20; + dig.h[5] = _tmp$21; + dig.h[6] = _tmp$22; + dig.h[7] = _tmp$23; + }; + ptrType.methods = [{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha256", typ: $funcType([], [arrayType$4], false)}]; + digest.init("crypto/sha256", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "is224", name: "is224", embedded: false, exported: false, typ: $Bool, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _K = new sliceType([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]); + block = blockGeneric; + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/dsa"] = (function() { + var $pkg = {}, $init, randutil, errors, io, big, Parameters, PublicKey, ptrType, Verify; + randutil = $packages["crypto/internal/randutil"]; + errors = $packages["errors"]; + io = $packages["io"]; + big = $packages["math/big"]; + Parameters = $pkg.Parameters = $newType(0, $kindStruct, "dsa.Parameters", true, "crypto/dsa", true, function(P_, Q_, G_) { + this.$val = this; + if (arguments.length === 0) { + this.P = ptrType.nil; + this.Q = ptrType.nil; + this.G = ptrType.nil; + return; + } + this.P = P_; + this.Q = Q_; + this.G = G_; + }); + PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "dsa.PublicKey", true, "crypto/dsa", true, function(Parameters_, Y_) { + this.$val = this; + if (arguments.length === 0) { + this.Parameters = new Parameters.ptr(ptrType.nil, ptrType.nil, ptrType.nil); + this.Y = ptrType.nil; + return; + } + this.Parameters = Parameters_; + this.Y = Y_; + }); + ptrType = $ptrType(big.Int); + Verify = function(pub, hash, r, s) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, hash, n, pub, r, s, u1, u2, v, w, z, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; hash = $f.hash; n = $f.n; pub = $f.pub; r = $f.r; s = $f.s; u1 = $f.u1; u2 = $f.u2; v = $f.v; w = $f.w; z = $f.z; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (pub.Parameters.P.Sign() === 0) { + $s = -1; return false; + } + if (r.Sign() < 1 || r.Cmp(pub.Parameters.Q) >= 0) { + $s = -1; return false; + } + if (s.Sign() < 1 || s.Cmp(pub.Parameters.Q) >= 0) { + $s = -1; return false; + } + _r = new big.Int.ptr(false, big.nat.nil).ModInverse(s, pub.Parameters.Q); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + w = _r; + n = pub.Parameters.Q.BitLen(); + if (!(((n & 7) === 0))) { + $s = -1; return false; + } + z = new big.Int.ptr(false, big.nat.nil).SetBytes(hash); + u1 = new big.Int.ptr(false, big.nat.nil).Mul(z, w); + _r$1 = u1.Mod(u1, pub.Parameters.Q); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + u2 = w.Mul(r, w); + _r$2 = u2.Mod(u2, pub.Parameters.Q); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = u1.Exp(pub.Parameters.G, u1, pub.Parameters.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + _r$4 = u2.Exp(pub.Y, u2, pub.Parameters.P); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + v.Mul(v, u2); + _r$5 = v.Mod(v, pub.Parameters.P); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = v.Mod(v, pub.Parameters.Q); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = -1; return v.Cmp(r) === 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Verify }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f.hash = hash; $f.n = n; $f.pub = pub; $f.r = r; $f.s = s; $f.u1 = u1; $f.u2 = u2; $f.v = v; $f.w = w; $f.z = z; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Verify = Verify; + Parameters.init("", [{prop: "P", name: "P", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Q", name: "Q", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "G", name: "G", embedded: false, exported: true, typ: ptrType, tag: ""}]); + PublicKey.init("", [{prop: "Parameters", name: "Parameters", embedded: true, exported: true, typ: Parameters, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: ptrType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = randutil.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrInvalidPublicKey = errors.New("crypto/dsa: invalid public key"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["encoding/hex"] = (function() { + var $pkg = {}, $init, bytes, errors, fmt, io, sliceType$1, EncodedLen, Encode, EncodeToString; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + sliceType$1 = $sliceType($Uint8); + EncodedLen = function(n) { + var n; + return $imul(n, 2); + }; + $pkg.EncodedLen = EncodedLen; + Encode = function(dst, src) { + var _i, _ref, dst, i, src, v, x, x$1; + _ref = src; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + (x = $imul(i, 2), ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x] = "0123456789abcdef".charCodeAt((v >>> 4 << 24 >>> 24)))); + (x$1 = ($imul(i, 2)) + 1 >> 0, ((x$1 < 0 || x$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$1] = "0123456789abcdef".charCodeAt(((v & 15) >>> 0)))); + _i++; + } + return $imul(src.$length, 2); + }; + $pkg.Encode = Encode; + EncodeToString = function(src) { + var dst, src; + dst = $makeSlice(sliceType$1, EncodedLen(src.$length)); + Encode(dst, src); + return ($bytesToString(dst)); + }; + $pkg.EncodeToString = EncodeToString; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrLength = errors.New("encoding/hex: odd length hex string"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/x509/pkix"] = (function() { + var $pkg = {}, $init, asn1, hex, fmt, big, time, AlgorithmIdentifier, RDNSequence, RelativeDistinguishedNameSET, AttributeTypeAndValue, Extension, Name, CertificateList, TBSCertificateList, RevokedCertificate, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, ptrType, ptrType$1, ptrType$2, sliceType$7, sliceType$8, ptrType$3, ptrType$4, attributeTypeNames, oidCountry, oidOrganization, oidOrganizationalUnit, oidCommonName, oidSerialNumber, oidLocality, oidProvince, oidStreetAddress, oidPostalCode, oidInAttributeTypeAndValue; + asn1 = $packages["encoding/asn1"]; + hex = $packages["encoding/hex"]; + fmt = $packages["fmt"]; + big = $packages["math/big"]; + time = $packages["time"]; + AlgorithmIdentifier = $pkg.AlgorithmIdentifier = $newType(0, $kindStruct, "pkix.AlgorithmIdentifier", true, "crypto/x509/pkix", true, function(Algorithm_, Parameters_) { + this.$val = this; + if (arguments.length === 0) { + this.Algorithm = asn1.ObjectIdentifier.nil; + this.Parameters = new asn1.RawValue.ptr(0, 0, false, sliceType$5.nil, sliceType$5.nil); + return; + } + this.Algorithm = Algorithm_; + this.Parameters = Parameters_; + }); + RDNSequence = $pkg.RDNSequence = $newType(12, $kindSlice, "pkix.RDNSequence", true, "crypto/x509/pkix", true, null); + RelativeDistinguishedNameSET = $pkg.RelativeDistinguishedNameSET = $newType(12, $kindSlice, "pkix.RelativeDistinguishedNameSET", true, "crypto/x509/pkix", true, null); + AttributeTypeAndValue = $pkg.AttributeTypeAndValue = $newType(0, $kindStruct, "pkix.AttributeTypeAndValue", true, "crypto/x509/pkix", true, function(Type_, Value_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = asn1.ObjectIdentifier.nil; + this.Value = $ifaceNil; + return; + } + this.Type = Type_; + this.Value = Value_; + }); + Extension = $pkg.Extension = $newType(0, $kindStruct, "pkix.Extension", true, "crypto/x509/pkix", true, function(Id_, Critical_, Value_) { + this.$val = this; + if (arguments.length === 0) { + this.Id = asn1.ObjectIdentifier.nil; + this.Critical = false; + this.Value = sliceType$5.nil; + return; + } + this.Id = Id_; + this.Critical = Critical_; + this.Value = Value_; + }); + Name = $pkg.Name = $newType(0, $kindStruct, "pkix.Name", true, "crypto/x509/pkix", true, function(Country_, Organization_, OrganizationalUnit_, Locality_, Province_, StreetAddress_, PostalCode_, SerialNumber_, CommonName_, Names_, ExtraNames_) { + this.$val = this; + if (arguments.length === 0) { + this.Country = sliceType$4.nil; + this.Organization = sliceType$4.nil; + this.OrganizationalUnit = sliceType$4.nil; + this.Locality = sliceType$4.nil; + this.Province = sliceType$4.nil; + this.StreetAddress = sliceType$4.nil; + this.PostalCode = sliceType$4.nil; + this.SerialNumber = ""; + this.CommonName = ""; + this.Names = sliceType$3.nil; + this.ExtraNames = sliceType$3.nil; + return; + } + this.Country = Country_; + this.Organization = Organization_; + this.OrganizationalUnit = OrganizationalUnit_; + this.Locality = Locality_; + this.Province = Province_; + this.StreetAddress = StreetAddress_; + this.PostalCode = PostalCode_; + this.SerialNumber = SerialNumber_; + this.CommonName = CommonName_; + this.Names = Names_; + this.ExtraNames = ExtraNames_; + }); + CertificateList = $pkg.CertificateList = $newType(0, $kindStruct, "pkix.CertificateList", true, "crypto/x509/pkix", true, function(TBSCertList_, SignatureAlgorithm_, SignatureValue_) { + this.$val = this; + if (arguments.length === 0) { + this.TBSCertList = new TBSCertificateList.ptr(asn1.RawContent.nil, 0, new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$5.nil, sliceType$5.nil)), RDNSequence.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), sliceType$7.nil, sliceType$8.nil); + this.SignatureAlgorithm = new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$5.nil, sliceType$5.nil)); + this.SignatureValue = new asn1.BitString.ptr(sliceType$5.nil, 0); + return; + } + this.TBSCertList = TBSCertList_; + this.SignatureAlgorithm = SignatureAlgorithm_; + this.SignatureValue = SignatureValue_; + }); + TBSCertificateList = $pkg.TBSCertificateList = $newType(0, $kindStruct, "pkix.TBSCertificateList", true, "crypto/x509/pkix", true, function(Raw_, Version_, Signature_, Issuer_, ThisUpdate_, NextUpdate_, RevokedCertificates_, Extensions_) { + this.$val = this; + if (arguments.length === 0) { + this.Raw = asn1.RawContent.nil; + this.Version = 0; + this.Signature = new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$5.nil, sliceType$5.nil)); + this.Issuer = RDNSequence.nil; + this.ThisUpdate = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); + this.NextUpdate = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); + this.RevokedCertificates = sliceType$7.nil; + this.Extensions = sliceType$8.nil; + return; + } + this.Raw = Raw_; + this.Version = Version_; + this.Signature = Signature_; + this.Issuer = Issuer_; + this.ThisUpdate = ThisUpdate_; + this.NextUpdate = NextUpdate_; + this.RevokedCertificates = RevokedCertificates_; + this.Extensions = Extensions_; + }); + RevokedCertificate = $pkg.RevokedCertificate = $newType(0, $kindStruct, "pkix.RevokedCertificate", true, "crypto/x509/pkix", true, function(SerialNumber_, RevocationTime_, Extensions_) { + this.$val = this; + if (arguments.length === 0) { + this.SerialNumber = ptrType$4.nil; + this.RevocationTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); + this.Extensions = sliceType$8.nil; + return; + } + this.SerialNumber = SerialNumber_; + this.RevocationTime = RevocationTime_; + this.Extensions = Extensions_; + }); + sliceType = $sliceType($Int); + sliceType$1 = $sliceType($emptyInterface); + sliceType$2 = $sliceType($Int32); + sliceType$3 = $sliceType(AttributeTypeAndValue); + sliceType$4 = $sliceType($String); + sliceType$5 = $sliceType($Uint8); + ptrType = $ptrType(RDNSequence); + ptrType$1 = $ptrType(Name); + ptrType$2 = $ptrType(time.Location); + sliceType$7 = $sliceType(RevokedCertificate); + sliceType$8 = $sliceType(Extension); + ptrType$3 = $ptrType(CertificateList); + ptrType$4 = $ptrType(big.Int); + RDNSequence.prototype.String = function() { + var _1, _entry, _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _tuple, _tuple$1, c, derBytes, err, escape, escaped, i, j, k, oidString, ok, r, rdn, s, tv, typeName, valueString, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; _ref$1 = $f._ref$1; _rune = $f._rune; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; derBytes = $f.derBytes; err = $f.err; escape = $f.escape; escaped = $f.escaped; i = $f.i; j = $f.j; k = $f.k; oidString = $f.oidString; ok = $f.ok; r = $f.r; rdn = $f.rdn; s = $f.s; tv = $f.tv; typeName = $f.typeName; valueString = $f.valueString; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + s = ""; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < r.$length)) { break; } */ if(!(i < r.$length)) { $s = 2; continue; } + rdn = (x = (r.$length - 1 >> 0) - i >> 0, ((x < 0 || x >= r.$length) ? ($throwRuntimeError("index out of range"), undefined) : r.$array[r.$offset + x])); + if (i > 0) { + s = s + (","); + } + _ref = rdn; + _i = 0; + /* while (true) { */ case 3: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } + j = _i; + tv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); + if (j > 0) { + s = s + ("+"); + } + oidString = tv.Type.String(); + _tuple = (_entry = attributeTypeNames[$String.keyFor(oidString)], _entry !== undefined ? [_entry.v, true] : ["", false]); + typeName = _tuple[0]; + ok = _tuple[1]; + /* */ if (!ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!ok) { */ case 5: + _r = asn1.Marshal(tv.Value); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + derBytes = _tuple$1[0]; + err = _tuple$1[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + s = s + (oidString + "=#" + hex.EncodeToString(derBytes)); + _i++; + /* continue; */ $s = 3; continue; + } + typeName = oidString; + /* } */ case 6: + _r$1 = fmt.Sprint(new sliceType$1([tv.Value])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + valueString = _r$1; + escaped = $makeSlice(sliceType$2, 0, valueString.length); + _ref$1 = valueString; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune = $decodeRune(_ref$1, _i$1); + k = _i$1; + c = _rune[0]; + escape = false; + _1 = c; + if ((_1 === (44)) || (_1 === (43)) || (_1 === (34)) || (_1 === (92)) || (_1 === (60)) || (_1 === (62)) || (_1 === (59))) { + escape = true; + } else if (_1 === (32)) { + escape = (k === 0) || (k === (valueString.length - 1 >> 0)); + } else if (_1 === (35)) { + escape = k === 0; + } + if (escape) { + escaped = $append(escaped, 92, c); + } else { + escaped = $append(escaped, c); + } + _i$1 += _rune[1]; + } + s = s + (typeName + "=" + ($runesToString(escaped))); + _i++; + /* } */ $s = 3; continue; case 4: + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return s; + /* */ } return; } if ($f === undefined) { $f = { $blk: RDNSequence.prototype.String }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f._ref$1 = _ref$1; $f._rune = _rune; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.derBytes = derBytes; $f.err = err; $f.escape = escape; $f.escaped = escaped; $f.i = i; $f.j = j; $f.k = k; $f.oidString = oidString; $f.ok = ok; $f.r = r; $f.rdn = rdn; $f.s = s; $f.tv = tv; $f.typeName = typeName; $f.valueString = valueString; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(RDNSequence).prototype.String = function() { return this.$get().String(); }; + Name.ptr.prototype.FillFromRDNSequence = function(rdns) { + var _1, _i, _i$1, _ref, _ref$1, _tuple, atv, n, ok, rdn, rdns, t, value; + n = this; + _ref = rdns.$get(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + rdn = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (rdn.$length === 0) { + _i++; + continue; + } + _ref$1 = rdn; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + atv = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), AttributeTypeAndValue); + n.Names = $append(n.Names, atv); + _tuple = $assertType(atv.Value, $String, true); + value = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _i$1++; + continue; + } + t = atv.Type; + if ((t.$length === 4) && ((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) === 2) && ((1 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 1]) === 5) && ((2 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 2]) === 4)) { + _1 = (3 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 3]); + if (_1 === (3)) { + n.CommonName = value; + } else if (_1 === (5)) { + n.SerialNumber = value; + } else if (_1 === (6)) { + n.Country = $append(n.Country, value); + } else if (_1 === (7)) { + n.Locality = $append(n.Locality, value); + } else if (_1 === (8)) { + n.Province = $append(n.Province, value); + } else if (_1 === (9)) { + n.StreetAddress = $append(n.StreetAddress, value); + } else if (_1 === (10)) { + n.Organization = $append(n.Organization, value); + } else if (_1 === (11)) { + n.OrganizationalUnit = $append(n.OrganizationalUnit, value); + } else if (_1 === (17)) { + n.PostalCode = $append(n.PostalCode, value); + } + } + _i$1++; + } + _i++; + } + }; + Name.prototype.FillFromRDNSequence = function(rdns) { return this.$val.FillFromRDNSequence(rdns); }; + Name.ptr.prototype.appendRDNs = function(in$1, values, oid) { + var _i, _ref, i, in$1, n, oid, s, value, values; + n = this; + if ((values.$length === 0) || oidInAttributeTypeAndValue(oid, n.ExtraNames)) { + return in$1; + } + s = $makeSlice(sliceType$3, values.$length); + _ref = values; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + value = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Type = oid; + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Value = new $String(value); + _i++; + } + return $append(in$1, $subslice(new RelativeDistinguishedNameSET(s.$array), s.$offset, s.$offset + s.$length)); + }; + Name.prototype.appendRDNs = function(in$1, values, oid) { return this.$val.appendRDNs(in$1, values, oid); }; + Name.ptr.prototype.ToRDNSequence = function() { + var _i, _ref, atv, n, ret, x; + ret = RDNSequence.nil; + n = this; + ret = $clone(n, Name).appendRDNs(ret, n.Country, $subslice(new asn1.ObjectIdentifier(oidCountry.$array), oidCountry.$offset, oidCountry.$offset + oidCountry.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.Province, $subslice(new asn1.ObjectIdentifier(oidProvince.$array), oidProvince.$offset, oidProvince.$offset + oidProvince.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.Locality, $subslice(new asn1.ObjectIdentifier(oidLocality.$array), oidLocality.$offset, oidLocality.$offset + oidLocality.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.StreetAddress, $subslice(new asn1.ObjectIdentifier(oidStreetAddress.$array), oidStreetAddress.$offset, oidStreetAddress.$offset + oidStreetAddress.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.PostalCode, $subslice(new asn1.ObjectIdentifier(oidPostalCode.$array), oidPostalCode.$offset, oidPostalCode.$offset + oidPostalCode.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.Organization, $subslice(new asn1.ObjectIdentifier(oidOrganization.$array), oidOrganization.$offset, oidOrganization.$offset + oidOrganization.$length)); + ret = $clone(n, Name).appendRDNs(ret, n.OrganizationalUnit, $subslice(new asn1.ObjectIdentifier(oidOrganizationalUnit.$array), oidOrganizationalUnit.$offset, oidOrganizationalUnit.$offset + oidOrganizationalUnit.$length)); + if (n.CommonName.length > 0) { + ret = $clone(n, Name).appendRDNs(ret, new sliceType$4([n.CommonName]), $subslice(new asn1.ObjectIdentifier(oidCommonName.$array), oidCommonName.$offset, oidCommonName.$offset + oidCommonName.$length)); + } + if (n.SerialNumber.length > 0) { + ret = $clone(n, Name).appendRDNs(ret, new sliceType$4([n.SerialNumber]), $subslice(new asn1.ObjectIdentifier(oidSerialNumber.$array), oidSerialNumber.$offset, oidSerialNumber.$offset + oidSerialNumber.$length)); + } + _ref = n.ExtraNames; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + atv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); + ret = $append(ret, (x = new sliceType$3([$clone(atv, AttributeTypeAndValue)]), $subslice(new RelativeDistinguishedNameSET(x.$array), x.$offset, x.$offset + x.$length))); + _i++; + } + ret = ret; + return ret; + }; + Name.prototype.ToRDNSequence = function() { return this.$val.ToRDNSequence(); }; + Name.ptr.prototype.String = function() { + var _r, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = this; + _r = $clone(n, Name).ToRDNSequence().String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Name.ptr.prototype.String }; } $f._r = _r; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + Name.prototype.String = function() { return this.$val.String(); }; + oidInAttributeTypeAndValue = function(oid, atv) { + var _i, _ref, a, atv, oid; + _ref = atv; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + a = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); + if (a.Type.Equal(oid)) { + return true; + } + _i++; + } + return false; + }; + CertificateList.ptr.prototype.HasExpired = function(now) { + var certList, now; + certList = this; + return !$clone(now, time.Time).Before($clone(certList.TBSCertList.NextUpdate, time.Time)); + }; + CertificateList.prototype.HasExpired = function(now) { return this.$val.HasExpired(now); }; + RDNSequence.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Name.methods = [{prop: "appendRDNs", name: "appendRDNs", pkg: "crypto/x509/pkix", typ: $funcType([RDNSequence, sliceType$4, asn1.ObjectIdentifier], [RDNSequence], false)}, {prop: "ToRDNSequence", name: "ToRDNSequence", pkg: "", typ: $funcType([], [RDNSequence], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "FillFromRDNSequence", name: "FillFromRDNSequence", pkg: "", typ: $funcType([ptrType], [], false)}]; + ptrType$3.methods = [{prop: "HasExpired", name: "HasExpired", pkg: "", typ: $funcType([time.Time], [$Bool], false)}]; + AlgorithmIdentifier.init("", [{prop: "Algorithm", name: "Algorithm", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Parameters", name: "Parameters", embedded: false, exported: true, typ: asn1.RawValue, tag: "asn1:\"optional\""}]); + RDNSequence.init(RelativeDistinguishedNameSET); + RelativeDistinguishedNameSET.init(AttributeTypeAndValue); + AttributeTypeAndValue.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $emptyInterface, tag: ""}]); + Extension.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Critical", name: "Critical", embedded: false, exported: true, typ: $Bool, tag: "asn1:\"optional\""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: sliceType$5, tag: ""}]); + Name.init("", [{prop: "Country", name: "Country", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Organization", name: "Organization", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "OrganizationalUnit", name: "OrganizationalUnit", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Locality", name: "Locality", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Province", name: "Province", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "StreetAddress", name: "StreetAddress", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "PostalCode", name: "PostalCode", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "CommonName", name: "CommonName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Names", name: "Names", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "ExtraNames", name: "ExtraNames", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); + CertificateList.init("", [{prop: "TBSCertList", name: "TBSCertList", embedded: false, exported: true, typ: TBSCertificateList, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: AlgorithmIdentifier, tag: ""}, {prop: "SignatureValue", name: "SignatureValue", embedded: false, exported: true, typ: asn1.BitString, tag: ""}]); + TBSCertificateList.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,default:0\""}, {prop: "Signature", name: "Signature", embedded: false, exported: true, typ: AlgorithmIdentifier, tag: ""}, {prop: "Issuer", name: "Issuer", embedded: false, exported: true, typ: RDNSequence, tag: ""}, {prop: "ThisUpdate", name: "ThisUpdate", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "NextUpdate", name: "NextUpdate", embedded: false, exported: true, typ: time.Time, tag: "asn1:\"optional\""}, {prop: "RevokedCertificates", name: "RevokedCertificates", embedded: false, exported: true, typ: sliceType$7, tag: "asn1:\"optional\""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$8, tag: "asn1:\"tag:0,optional,explicit\""}]); + RevokedCertificate.init("", [{prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "RevocationTime", name: "RevocationTime", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$8, tag: "asn1:\"optional\""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = asn1.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hex.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + attributeTypeNames = $makeMap($String.keyFor, [{ k: "2.5.4.6", v: "C" }, { k: "2.5.4.10", v: "O" }, { k: "2.5.4.11", v: "OU" }, { k: "2.5.4.3", v: "CN" }, { k: "2.5.4.5", v: "SERIALNUMBER" }, { k: "2.5.4.7", v: "L" }, { k: "2.5.4.8", v: "ST" }, { k: "2.5.4.9", v: "STREET" }, { k: "2.5.4.17", v: "POSTALCODE" }]); + oidCountry = new sliceType([2, 5, 4, 6]); + oidOrganization = new sliceType([2, 5, 4, 10]); + oidOrganizationalUnit = new sliceType([2, 5, 4, 11]); + oidCommonName = new sliceType([2, 5, 4, 3]); + oidSerialNumber = new sliceType([2, 5, 4, 5]); + oidLocality = new sliceType([2, 5, 4, 7]); + oidProvince = new sliceType([2, 5, 4, 8]); + oidStreetAddress = new sliceType([2, 5, 4, 9]); + oidPostalCode = new sliceType([2, 5, 4, 17]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["encoding/pem"] = (function() { + var $pkg = {}, $init, bytes, base64, errors, io, sort, strings, Block, sliceType, ptrType, mapType, pemStart, pemEnd, pemEndOfLine, getLine, removeWhitespace, Decode, decodeError; + bytes = $packages["bytes"]; + base64 = $packages["encoding/base64"]; + errors = $packages["errors"]; + io = $packages["io"]; + sort = $packages["sort"]; + strings = $packages["strings"]; + Block = $pkg.Block = $newType(0, $kindStruct, "pem.Block", true, "encoding/pem", true, function(Type_, Headers_, Bytes_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = ""; + this.Headers = false; + this.Bytes = sliceType.nil; + return; + } + this.Type = Type_; + this.Headers = Headers_; + this.Bytes = Bytes_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(Block); + mapType = $mapType($String, $String); + getLine = function(data) { + var _r, _tmp, _tmp$1, data, i, j, line, rest, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; data = $f.data; i = $f.i; j = $f.j; line = $f.line; rest = $f.rest; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + line = sliceType.nil; + rest = sliceType.nil; + i = bytes.IndexByte(data, 10); + j = 0; + if (i < 0) { + i = data.$length; + j = i; + } else { + j = i + 1 >> 0; + if (i > 0 && ((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) === 13)) { + i = i - (1) >> 0; + } + } + _r = bytes.TrimRight($subslice(data, 0, i), " \t"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tmp = _r; + _tmp$1 = $subslice(data, j); + line = _tmp; + rest = _tmp$1; + $s = -1; return [line, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: getLine }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.data = data; $f.i = i; $f.j = j; $f.line = line; $f.rest = rest; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + removeWhitespace = function(data) { + var _i, _ref, b, data, n, result; + result = $makeSlice(sliceType, data.$length); + n = 0; + _ref = data; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((b === 32) || (b === 9) || (b === 13) || (b === 10)) { + _i++; + continue; + } + ((n < 0 || n >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + n] = b); + n = n + (1) >> 0; + _i++; + } + return $subslice(result, 0, n); + }; + Decode = function(data) { + var _key, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, base64Data, data, endIndex, endTrailer, endTrailerIndex, endTrailerLen, err, i, i$1, key, line, n, next, p, rest, restOfEndLine, s, typeLine, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; base64Data = $f.base64Data; data = $f.data; endIndex = $f.endIndex; endTrailer = $f.endTrailer; endTrailerIndex = $f.endTrailerIndex; endTrailerLen = $f.endTrailerLen; err = $f.err; i = $f.i; i$1 = $f.i$1; key = $f.key; line = $f.line; n = $f.n; next = $f.next; p = $f.p; rest = $f.rest; restOfEndLine = $f.restOfEndLine; s = $f.s; typeLine = $f.typeLine; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = ptrType.nil; + rest = sliceType.nil; + rest = data; + if (bytes.HasPrefix(data, $subslice(pemStart, 1))) { + rest = $subslice(rest, (pemStart.$length - 1 >> 0), data.$length); + } else { + i = bytes.Index(data, pemStart); + if (i >= 0) { + rest = $subslice(rest, (i + pemStart.$length >> 0), data.$length); + } else { + _tmp = ptrType.nil; + _tmp$1 = data; + p = _tmp; + rest = _tmp$1; + $s = -1; return [p, rest]; + } + } + _r = getLine(rest); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + typeLine = _tuple[0]; + rest = _tuple[1]; + /* */ if (!bytes.HasSuffix(typeLine, pemEndOfLine)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!bytes.HasSuffix(typeLine, pemEndOfLine)) { */ case 2: + _r$1 = decodeError(data, rest); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + p = _tuple$1[0]; + rest = _tuple$1[1]; + $s = -1; return [p, rest]; + /* } */ case 3: + typeLine = $subslice(typeLine, 0, (typeLine.$length - pemEndOfLine.$length >> 0)); + p = new Block.ptr(($bytesToString(typeLine)), {}, sliceType.nil); + /* while (true) { */ case 5: + if (rest.$length === 0) { + _tmp$2 = ptrType.nil; + _tmp$3 = data; + p = _tmp$2; + rest = _tmp$3; + $s = -1; return [p, rest]; + } + _r$2 = getLine(rest); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + line = _tuple$2[0]; + next = _tuple$2[1]; + i$1 = bytes.IndexByte(line, 58); + if (i$1 === -1) { + /* break; */ $s = 6; continue; + } + _tmp$4 = $subslice(line, 0, i$1); + _tmp$5 = $subslice(line, (i$1 + 1 >> 0)); + key = _tmp$4; + val = _tmp$5; + _r$3 = bytes.TrimSpace(key); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + key = _r$3; + _r$4 = bytes.TrimSpace(val); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + val = _r$4; + _key = ($bytesToString(key)); (p.Headers || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: ($bytesToString(val)) }; + rest = next; + /* } */ $s = 5; continue; case 6: + _tmp$6 = 0; + _tmp$7 = 0; + endIndex = _tmp$6; + endTrailerIndex = _tmp$7; + if (($keys(p.Headers).length === 0) && bytes.HasPrefix(rest, $subslice(pemEnd, 1))) { + endIndex = 0; + endTrailerIndex = pemEnd.$length - 1 >> 0; + } else { + endIndex = bytes.Index(rest, pemEnd); + endTrailerIndex = endIndex + pemEnd.$length >> 0; + } + /* */ if (endIndex < 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (endIndex < 0) { */ case 10: + _r$5 = decodeError(data, rest); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + p = _tuple$3[0]; + rest = _tuple$3[1]; + $s = -1; return [p, rest]; + /* } */ case 11: + endTrailer = $subslice(rest, endTrailerIndex); + endTrailerLen = typeLine.$length + pemEndOfLine.$length >> 0; + /* */ if (endTrailer.$length < endTrailerLen) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (endTrailer.$length < endTrailerLen) { */ case 13: + _r$6 = decodeError(data, rest); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + p = _tuple$4[0]; + rest = _tuple$4[1]; + $s = -1; return [p, rest]; + /* } */ case 14: + restOfEndLine = $subslice(endTrailer, endTrailerLen); + endTrailer = $subslice(endTrailer, 0, endTrailerLen); + /* */ if (!bytes.HasPrefix(endTrailer, typeLine) || !bytes.HasSuffix(endTrailer, pemEndOfLine)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!bytes.HasPrefix(endTrailer, typeLine) || !bytes.HasSuffix(endTrailer, pemEndOfLine)) { */ case 16: + _r$7 = decodeError(data, rest); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$5 = _r$7; + p = _tuple$5[0]; + rest = _tuple$5[1]; + $s = -1; return [p, rest]; + /* } */ case 17: + _r$8 = getLine(restOfEndLine); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$6 = _r$8; + s = _tuple$6[0]; + /* */ if (!((s.$length === 0))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!((s.$length === 0))) { */ case 20: + _r$9 = decodeError(data, rest); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$7 = _r$9; + p = _tuple$7[0]; + rest = _tuple$7[1]; + $s = -1; return [p, rest]; + /* } */ case 21: + base64Data = removeWhitespace($subslice(rest, 0, endIndex)); + p.Bytes = $makeSlice(sliceType, base64.StdEncoding.DecodedLen(base64Data.$length)); + _tuple$8 = base64.StdEncoding.Decode(p.Bytes, base64Data); + n = _tuple$8[0]; + err = _tuple$8[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 23: + _r$10 = decodeError(data, rest); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$9 = _r$10; + p = _tuple$9[0]; + rest = _tuple$9[1]; + $s = -1; return [p, rest]; + /* } */ case 24: + p.Bytes = $subslice(p.Bytes, 0, n); + _r$11 = getLine($subslice(rest, ((endIndex + pemEnd.$length >> 0) - 1 >> 0))); /* */ $s = 26; case 26: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$10 = _r$11; + rest = _tuple$10[1]; + $s = -1; return [p, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decode }; } $f._key = _key; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.base64Data = base64Data; $f.data = data; $f.endIndex = endIndex; $f.endTrailer = endTrailer; $f.endTrailerIndex = endTrailerIndex; $f.endTrailerLen = endTrailerLen; $f.err = err; $f.i = i; $f.i$1 = i$1; $f.key = key; $f.line = line; $f.n = n; $f.next = next; $f.p = p; $f.rest = rest; $f.restOfEndLine = restOfEndLine; $f.s = s; $f.typeLine = typeLine; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Decode = Decode; + decodeError = function(data, rest) { + var _r, _tuple, data, p, rest, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; data = $f.data; p = $f.p; rest = $f.rest; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = Decode(rest); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p = _tuple[0]; + rest = _tuple[1]; + if (p === ptrType.nil) { + rest = data; + } + $s = -1; return [p, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: decodeError }; } $f._r = _r; $f._tuple = _tuple; $f.data = data; $f.p = p; $f.rest = rest; $f.$s = $s; $f.$r = $r; return $f; + }; + Block.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Headers", name: "Headers", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = base64.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + pemStart = (new sliceType($stringToBytes("\n-----BEGIN "))); + pemEnd = (new sliceType($stringToBytes("\n-----END "))); + pemEndOfLine = (new sliceType($stringToBytes("-----"))); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["io/ioutil"] = (function() { + var $pkg = {}, $init, bytes, io, os, filepath, sort, strconv, strings, sync, time, nopCloser, devNull, sliceType, sliceType$1, ptrType, arrayType, ptrType$1, sliceType$3, blackHolePool, rand, randmu, readAll, ReadAll, ReadFile, NopCloser, reseed, nextRandom, TempFile; + bytes = $packages["bytes"]; + io = $packages["io"]; + os = $packages["os"]; + filepath = $packages["path/filepath"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + time = $packages["time"]; + nopCloser = $pkg.nopCloser = $newType(0, $kindStruct, "ioutil.nopCloser", true, "io/ioutil", false, function(Reader_) { + this.$val = this; + if (arguments.length === 0) { + this.Reader = $ifaceNil; + return; + } + this.Reader = Reader_; + }); + devNull = $pkg.devNull = $newType(4, $kindInt, "ioutil.devNull", true, "io/ioutil", false, null); + sliceType = $sliceType($emptyInterface); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(sliceType$1); + arrayType = $arrayType($Uint8, 64); + ptrType$1 = $ptrType(os.File); + sliceType$3 = $sliceType($String); + readAll = function(r, capacity) { + var _r, _tmp, _tmp$1, _tuple, b, buf, capacity, err, r, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; b = $f.b; buf = $f.buf; capacity = $f.capacity; err = $f.err; r = $f.r; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + b = sliceType$1.nil; + err[0] = $ifaceNil; + buf = new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + $deferred.push([(function(err) { return function() { + var _tuple, e, ok, panicErr; + e = $recover(); + if ($interfaceIsEqual(e, $ifaceNil)) { + return; + } + _tuple = $assertType(e, $error, true); + panicErr = _tuple[0]; + ok = _tuple[1]; + if (ok && $interfaceIsEqual(panicErr, bytes.ErrTooLarge)) { + err[0] = panicErr; + } else { + $panic(e); + } + }; })(err), []]); + if ((x = (new $Int64(0, (((capacity.$low + ((capacity.$high >> 31) * 4294967296)) >> 0)))), (x.$high === capacity.$high && x.$low === capacity.$low))) { + buf.Grow((((capacity.$low + ((capacity.$high >> 31) * 4294967296)) >> 0))); + } + _r = buf.ReadFrom(r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err[0] = _tuple[1]; + _tmp = buf.Bytes(); + _tmp$1 = err[0]; + b = _tmp; + err[0] = _tmp$1; + $s = -1; return [b, err[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [b, err[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: readAll }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.b = b; $f.buf = buf; $f.capacity = capacity; $f.err = err; $f.r = r; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ReadAll = function(r) { + var _r, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = readAll(r, new $Int64(0, 512)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: ReadAll }; } $f._r = _r; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ReadAll = ReadAll; + ReadFile = function(filename) { + var _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, err, err$1, f, fi, filename, n, size, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; err$1 = $f.err$1; f = $f.f; fi = $f.fi; filename = $f.filename; n = $f.n; size = $f.size; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r = os.Open(filename); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err]; + } + $deferred.push([$methodVal(f, "Close"), []]); + n = new $Int64(0, 512); + _r$1 = f.Stat(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + fi = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 3: + _r$2 = fi.Size(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + size = (x = _r$2, new $Int64(x.$high + 0, x.$low + 512)); + if ((size.$high > n.$high || (size.$high === n.$high && size.$low > n.$low))) { + n = size; + } + /* } */ case 4: + _r$3 = readAll(f, n); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType$1.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ReadFile }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.err$1 = err$1; $f.f = f; $f.fi = fi; $f.filename = filename; $f.n = n; $f.size = size; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + $pkg.ReadFile = ReadFile; + nopCloser.ptr.prototype.Close = function() { + return $ifaceNil; + }; + nopCloser.prototype.Close = function() { return this.$val.Close(); }; + NopCloser = function(r) { + var r, x; + return (x = new nopCloser.ptr(r), new x.constructor.elem(x)); + }; + $pkg.NopCloser = NopCloser; + devNull.prototype.Write = function(p) { + var p; + return [p.$length, $ifaceNil]; + }; + $ptrType(devNull).prototype.Write = function(p) { return new devNull(this.$get()).Write(p); }; + devNull.prototype.WriteString = function(s) { + var s; + return [s.length, $ifaceNil]; + }; + $ptrType(devNull).prototype.WriteString = function(s) { return new devNull(this.$get()).WriteString(s); }; + devNull.prototype.ReadFrom = function(r) { + var _r, _r$1, _tmp, _tmp$1, _tuple, bufp, err, n, r, readSize, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; bufp = $f.bufp; err = $f.err; n = $f.n; r = $f.r; readSize = $f.readSize; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + _r = blackHolePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + bufp = $assertType(_r, ptrType); + readSize = 0; + /* while (true) { */ case 2: + _r$1 = r.Read(bufp.$get()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + readSize = _tuple[0]; + err = _tuple[1]; + n = (x = (new $Int64(0, readSize)), new $Int64(n.$high + x.$high, n.$low + x.$low)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + blackHolePool.Put(bufp); + if ($interfaceIsEqual(err, io.EOF)) { + _tmp = n; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + $s = -1; return [n, err]; + } + /* } */ $s = 2; continue; case 3: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: devNull.prototype.ReadFrom }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.bufp = bufp; $f.err = err; $f.n = n; $f.r = r; $f.readSize = readSize; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(devNull).prototype.ReadFrom = function(r) { return new devNull(this.$get()).ReadFrom(r); }; + reseed = function() { + var x, x$1; + return (((x = $clone(time.Now(), time.Time).UnixNano(), x$1 = (new $Int64(0, os.Getpid())), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)).$low >>> 0)); + }; + nextRandom = function() { + var _r, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = randmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r = rand; + if (r === 0) { + r = reseed(); + } + r = ($imul(r, 1664525) >>> 0) + 1013904223 >>> 0; + rand = r; + $r = randmu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $substring(strconv.Itoa((((1000000000 + (_r = r % 1000000000, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0) >> 0))), 1); + /* */ } return; } if ($f === undefined) { $f = { $blk: nextRandom }; } $f._r = _r; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + TempFile = function(dir, pattern) { + var _arg, _arg$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dir, err, f, i, name, nconflict, pattern, pos, prefix, suffix, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; dir = $f.dir; err = $f.err; f = $f.f; i = $f.i; name = $f.name; nconflict = $f.nconflict; pattern = $f.pattern; pos = $f.pos; prefix = $f.prefix; suffix = $f.suffix; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType$1.nil; + err = $ifaceNil; + /* */ if (dir === "") { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (dir === "") { */ case 1: + _r = os.TempDir(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + dir = _r; + /* } */ case 2: + _tmp = ""; + _tmp$1 = ""; + prefix = _tmp; + suffix = _tmp$1; + pos = strings.LastIndex(pattern, "*"); + if (!((pos === -1))) { + _tmp$2 = $substring(pattern, 0, pos); + _tmp$3 = $substring(pattern, (pos + 1 >> 0)); + prefix = _tmp$2; + suffix = _tmp$3; + } else { + prefix = pattern; + } + nconflict = 0; + i = 0; + /* while (true) { */ case 4: + /* if (!(i < 10000)) { break; } */ if(!(i < 10000)) { $s = 5; continue; } + _arg = dir; + _r$1 = nextRandom(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = prefix + _r$1 + suffix; + _r$2 = filepath.Join(new sliceType$3([_arg, _arg$1])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + name = _r$2; + _r$3 = os.OpenFile(name, 2562, 384); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + f = _tuple[0]; + err = _tuple[1]; + /* */ if (os.IsExist(err)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (os.IsExist(err)) { */ case 9: + nconflict = nconflict + (1) >> 0; + /* */ if (nconflict > 10) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (nconflict > 10) { */ case 11: + $r = randmu.Lock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + rand = reseed(); + $r = randmu.Unlock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + i = i + (1) >> 0; + /* continue; */ $s = 4; continue; + /* } */ case 10: + /* break; */ $s = 5; continue; + /* } */ $s = 4; continue; case 5: + $s = -1; return [f, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TempFile }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.dir = dir; $f.err = err; $f.f = f; $f.i = i; $f.name = name; $f.nconflict = nconflict; $f.pattern = pattern; $f.pos = pos; $f.prefix = prefix; $f.suffix = suffix; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.TempFile = TempFile; + nopCloser.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + devNull.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}]; + nopCloser.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = filepath.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + rand = 0; + randmu = new sync.Mutex.ptr(0, 0); + blackHolePool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var b, b$24ptr; + b = $makeSlice(sliceType$1, 8192); + return (b$24ptr || (b$24ptr = new ptrType(function() { return b; }, function($v) { b = $subslice(new sliceType$1($v.$array), $v.$offset, $v.$offset + $v.$length); }))); + })); + $pkg.Discard = new devNull(0); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["internal/nettrace"] = (function() { + var $pkg = {}, $init, TraceKey, LookupIPAltResolverKey, Trace, funcType, sliceType, funcType$1, funcType$2, funcType$3; + TraceKey = $pkg.TraceKey = $newType(0, $kindStruct, "nettrace.TraceKey", true, "internal/nettrace", true, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + LookupIPAltResolverKey = $pkg.LookupIPAltResolverKey = $newType(0, $kindStruct, "nettrace.LookupIPAltResolverKey", true, "internal/nettrace", true, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + Trace = $pkg.Trace = $newType(0, $kindStruct, "nettrace.Trace", true, "internal/nettrace", true, function(DNSStart_, DNSDone_, ConnectStart_, ConnectDone_) { + this.$val = this; + if (arguments.length === 0) { + this.DNSStart = $throwNilPointerError; + this.DNSDone = $throwNilPointerError; + this.ConnectStart = $throwNilPointerError; + this.ConnectDone = $throwNilPointerError; + return; + } + this.DNSStart = DNSStart_; + this.DNSDone = DNSDone_; + this.ConnectStart = ConnectStart_; + this.ConnectDone = ConnectDone_; + }); + funcType = $funcType([$String], [], false); + sliceType = $sliceType($emptyInterface); + funcType$1 = $funcType([sliceType, $Bool, $error], [], false); + funcType$2 = $funcType([$String, $String], [], false); + funcType$3 = $funcType([$String, $String, $error], [], false); + TraceKey.init("", []); + LookupIPAltResolverKey.init("", []); + Trace.init("", [{prop: "DNSStart", name: "DNSStart", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "DNSDone", name: "DNSDone", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "ConnectStart", name: "ConnectStart", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "ConnectDone", name: "ConnectDone", embedded: false, exported: true, typ: funcType$3, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["internal/singleflight"] = (function() { + var $pkg = {}, $init, sync, call, Group, Result, ptrType, arrayType, chanType, sliceType, funcType, chanType$1, ptrType$1, mapType; + sync = $packages["sync"]; + call = $pkg.call = $newType(0, $kindStruct, "singleflight.call", true, "internal/singleflight", false, function(wg_, val_, err_, dups_, chans_) { + this.$val = this; + if (arguments.length === 0) { + this.wg = new sync.WaitGroup.ptr(0, $chanNil, arrayType.zero()); + this.val = $ifaceNil; + this.err = $ifaceNil; + this.dups = 0; + this.chans = sliceType.nil; + return; + } + this.wg = wg_; + this.val = val_; + this.err = err_; + this.dups = dups_; + this.chans = chans_; + }); + Group = $pkg.Group = $newType(0, $kindStruct, "singleflight.Group", true, "internal/singleflight", true, function(mu_, m_) { + this.$val = this; + if (arguments.length === 0) { + this.mu = new sync.Mutex.ptr(0, 0); + this.m = false; + return; + } + this.mu = mu_; + this.m = m_; + }); + Result = $pkg.Result = $newType(0, $kindStruct, "singleflight.Result", true, "internal/singleflight", true, function(Val_, Err_, Shared_) { + this.$val = this; + if (arguments.length === 0) { + this.Val = $ifaceNil; + this.Err = $ifaceNil; + this.Shared = false; + return; + } + this.Val = Val_; + this.Err = Err_; + this.Shared = Shared_; + }); + ptrType = $ptrType(call); + arrayType = $arrayType($Uint32, 3); + chanType = $chanType(Result, true, false); + sliceType = $sliceType(chanType); + funcType = $funcType([], [$emptyInterface, $error], false); + chanType$1 = $chanType(Result, false, true); + ptrType$1 = $ptrType(Group); + mapType = $mapType($String, ptrType); + Group.ptr.prototype.Do = function(key, fn) { + var _entry, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, c$1, err, fn, g, key, ok, shared, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; c = $f.c; c$1 = $f.c$1; err = $f.err; fn = $f.fn; g = $f.g; key = $f.key; ok = $f.ok; shared = $f.shared; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + v = $ifaceNil; + err = $ifaceNil; + shared = false; + g = this; + $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (g.m === false) { + g.m = {}; + } + _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); + c = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + c.dups = c.dups + (1) >> 0; + $r = g.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = c.wg.Wait(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = c.val; + _tmp$1 = c.err; + _tmp$2 = true; + v = _tmp; + err = _tmp$1; + shared = _tmp$2; + $s = -1; return [v, err, shared]; + /* } */ case 3: + c$1 = new call.ptr(new sync.WaitGroup.ptr(0, $chanNil, arrayType.zero()), $ifaceNil, $ifaceNil, 0, sliceType.nil); + c$1.wg.Add(1); + _key = key; (g.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: c$1 }; + $r = g.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = g.doCall(c$1, key, fn); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$3 = c$1.val; + _tmp$4 = c$1.err; + _tmp$5 = c$1.dups > 0; + v = _tmp$3; + err = _tmp$4; + shared = _tmp$5; + $s = -1; return [v, err, shared]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Group.ptr.prototype.Do }; } $f._entry = _entry; $f._key = _key; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.c = c; $f.c$1 = c$1; $f.err = err; $f.fn = fn; $f.g = g; $f.key = key; $f.ok = ok; $f.shared = shared; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Group.prototype.Do = function(key, fn) { return this.$val.Do(key, fn); }; + Group.ptr.prototype.DoChan = function(key, fn) { + var _entry, _key, _tuple, c, c$1, ch, fn, g, key, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _tuple = $f._tuple; c = $f.c; c$1 = $f.c$1; ch = $f.ch; fn = $f.fn; g = $f.g; key = $f.key; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + ch = new $Chan(Result, 1); + $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (g.m === false) { + g.m = {}; + } + _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); + c = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + c.dups = c.dups + (1) >> 0; + c.chans = $append(c.chans, ch); + $r = g.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ch, false]; + /* } */ case 3: + c$1 = new call.ptr(new sync.WaitGroup.ptr(0, $chanNil, arrayType.zero()), $ifaceNil, $ifaceNil, 0, new sliceType([ch])); + c$1.wg.Add(1); + _key = key; (g.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: c$1 }; + $r = g.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $go($methodVal(g, "doCall"), [c$1, key, fn]); + $s = -1; return [ch, true]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Group.ptr.prototype.DoChan }; } $f._entry = _entry; $f._key = _key; $f._tuple = _tuple; $f.c = c; $f.c$1 = c$1; $f.ch = ch; $f.fn = fn; $f.g = g; $f.key = key; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + Group.prototype.DoChan = function(key, fn) { return this.$val.DoChan(key, fn); }; + Group.ptr.prototype.doCall = function(c, key, fn) { + var _i, _r, _ref, _tuple, c, ch, fn, g, key, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; _tuple = $f._tuple; c = $f.c; ch = $f.ch; fn = $f.fn; g = $f.g; key = $f.key; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + _r = fn(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + c.val = _tuple[0]; + c.err = _tuple[1]; + c.wg.Done(); + $r = g.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + delete g.m[$String.keyFor(key)]; + _ref = c.chans; + _i = 0; + /* while (true) { */ case 3: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } + ch = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = $send(ch, $clone(new Result.ptr(c.val, c.err, c.dups > 0), Result)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 3; continue; case 4: + $r = g.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Group.ptr.prototype.doCall }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f._tuple = _tuple; $f.c = c; $f.ch = ch; $f.fn = fn; $f.g = g; $f.key = key; $f.$s = $s; $f.$r = $r; return $f; + }; + Group.prototype.doCall = function(c, key, fn) { return this.$val.doCall(c, key, fn); }; + Group.ptr.prototype.ForgetUnshared = function(key) { + var _entry, _tuple, c, g, key, ok, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; c = $f.c; g = $f.g; key = $f.key; ok = $f.ok; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + g = this; + $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(g.mu, "Unlock"), []]); + _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); + c = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return true; + } + if (c.dups === 0) { + delete g.m[$String.keyFor(key)]; + $s = -1; return true; + } + $s = -1; return false; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Group.ptr.prototype.ForgetUnshared }; } $f._entry = _entry; $f._tuple = _tuple; $f.c = c; $f.g = g; $f.key = key; $f.ok = ok; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Group.prototype.ForgetUnshared = function(key) { return this.$val.ForgetUnshared(key); }; + ptrType$1.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([$String, funcType], [$emptyInterface, $error, $Bool], false)}, {prop: "DoChan", name: "DoChan", pkg: "", typ: $funcType([$String, funcType], [chanType$1, $Bool], false)}, {prop: "doCall", name: "doCall", pkg: "internal/singleflight", typ: $funcType([ptrType, $String, funcType], [], false)}, {prop: "ForgetUnshared", name: "ForgetUnshared", pkg: "", typ: $funcType([$String], [$Bool], false)}]; + call.init("internal/singleflight", [{prop: "wg", name: "wg", embedded: false, exported: false, typ: sync.WaitGroup, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "dups", name: "dups", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "chans", name: "chans", embedded: false, exported: false, typ: sliceType, tag: ""}]); + Group.init("internal/singleflight", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}]); + Result.init("", [{prop: "Val", name: "Val", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "Shared", name: "Shared", embedded: false, exported: true, typ: $Bool, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = sync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/dns/dnsmessage"] = (function() { + var $pkg = {}, $init, errors, Type, Class, OpCode, RCode, nestedError, Header, section, header, Resource, ResourceBody, Parser, Builder, ResourceHeader, Name, Question, CNAMEResource, MXResource, NSResource, PTRResource, SOAResource, TXTResource, SRVResource, AResource, AAAAResource, sliceType, arrayType, sliceType$1, sliceType$2, sliceType$3, arrayType$1, arrayType$2, arrayType$3, ptrType, ptrType$1, ptrType$2, ptrType$4, mapType, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, errBaseLen, errCalcLen, errReserved, errTooManyPtr, errInvalidPtr, errNilResouceBody, errResourceLen, errSegTooLong, errZeroSegLen, errResTooLong, errTooManyQuestions, errTooManyAnswers, errTooManyAuthorities, errTooManyAdditionals, errNonCanonicalName, errStringTooLong, errCompressedSRV, sectionNames, NewBuilder, skipResource, packUint16, unpackUint16, skipUint16, packType, unpackType, skipType, packClass, unpackClass, skipClass, packUint32, unpackUint32, skipUint32, packText, unpackText, packBytes, unpackBytes, NewName, skipName, unpackResourceBody, unpackCNAMEResource, unpackMXResource, unpackNSResource, unpackPTRResource, unpackSOAResource, unpackTXTResource, unpackSRVResource, unpackAResource, unpackAAAAResource; + errors = $packages["errors"]; + Type = $pkg.Type = $newType(2, $kindUint16, "dnsmessage.Type", true, "vendor/golang_org/x/net/dns/dnsmessage", true, null); + Class = $pkg.Class = $newType(2, $kindUint16, "dnsmessage.Class", true, "vendor/golang_org/x/net/dns/dnsmessage", true, null); + OpCode = $pkg.OpCode = $newType(2, $kindUint16, "dnsmessage.OpCode", true, "vendor/golang_org/x/net/dns/dnsmessage", true, null); + RCode = $pkg.RCode = $newType(2, $kindUint16, "dnsmessage.RCode", true, "vendor/golang_org/x/net/dns/dnsmessage", true, null); + nestedError = $pkg.nestedError = $newType(0, $kindStruct, "dnsmessage.nestedError", true, "vendor/golang_org/x/net/dns/dnsmessage", false, function(s_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.s = ""; + this.err = $ifaceNil; + return; + } + this.s = s_; + this.err = err_; + }); + Header = $pkg.Header = $newType(0, $kindStruct, "dnsmessage.Header", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(ID_, Response_, OpCode_, Authoritative_, Truncated_, RecursionDesired_, RecursionAvailable_, RCode_) { + this.$val = this; + if (arguments.length === 0) { + this.ID = 0; + this.Response = false; + this.OpCode = 0; + this.Authoritative = false; + this.Truncated = false; + this.RecursionDesired = false; + this.RecursionAvailable = false; + this.RCode = 0; + return; + } + this.ID = ID_; + this.Response = Response_; + this.OpCode = OpCode_; + this.Authoritative = Authoritative_; + this.Truncated = Truncated_; + this.RecursionDesired = RecursionDesired_; + this.RecursionAvailable = RecursionAvailable_; + this.RCode = RCode_; + }); + section = $pkg.section = $newType(1, $kindUint8, "dnsmessage.section", true, "vendor/golang_org/x/net/dns/dnsmessage", false, null); + header = $pkg.header = $newType(0, $kindStruct, "dnsmessage.header", true, "vendor/golang_org/x/net/dns/dnsmessage", false, function(id_, bits_, questions_, answers_, authorities_, additionals_) { + this.$val = this; + if (arguments.length === 0) { + this.id = 0; + this.bits = 0; + this.questions = 0; + this.answers = 0; + this.authorities = 0; + this.additionals = 0; + return; + } + this.id = id_; + this.bits = bits_; + this.questions = questions_; + this.answers = answers_; + this.authorities = authorities_; + this.additionals = additionals_; + }); + Resource = $pkg.Resource = $newType(0, $kindStruct, "dnsmessage.Resource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Header_, Body_) { + this.$val = this; + if (arguments.length === 0) { + this.Header = new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0); + this.Body = $ifaceNil; + return; + } + this.Header = Header_; + this.Body = Body_; + }); + ResourceBody = $pkg.ResourceBody = $newType(8, $kindInterface, "dnsmessage.ResourceBody", true, "vendor/golang_org/x/net/dns/dnsmessage", true, null); + Parser = $pkg.Parser = $newType(0, $kindStruct, "dnsmessage.Parser", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(msg_, header_, section_, off_, index_, resHeaderValid_, resHeader_) { + this.$val = this; + if (arguments.length === 0) { + this.msg = sliceType.nil; + this.header = new header.ptr(0, 0, 0, 0, 0, 0); + this.section = 0; + this.off = 0; + this.index = 0; + this.resHeaderValid = false; + this.resHeader = new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0); + return; + } + this.msg = msg_; + this.header = header_; + this.section = section_; + this.off = off_; + this.index = index_; + this.resHeaderValid = resHeaderValid_; + this.resHeader = resHeader_; + }); + Builder = $pkg.Builder = $newType(0, $kindStruct, "dnsmessage.Builder", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(msg_, section_, header_, start_, compression_) { + this.$val = this; + if (arguments.length === 0) { + this.msg = sliceType.nil; + this.section = 0; + this.header = new header.ptr(0, 0, 0, 0, 0, 0); + this.start = 0; + this.compression = false; + return; + } + this.msg = msg_; + this.section = section_; + this.header = header_; + this.start = start_; + this.compression = compression_; + }); + ResourceHeader = $pkg.ResourceHeader = $newType(0, $kindStruct, "dnsmessage.ResourceHeader", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Name_, Type_, Class_, TTL_, Length_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = new Name.ptr(arrayType.zero(), 0); + this.Type = 0; + this.Class = 0; + this.TTL = 0; + this.Length = 0; + return; + } + this.Name = Name_; + this.Type = Type_; + this.Class = Class_; + this.TTL = TTL_; + this.Length = Length_; + }); + Name = $pkg.Name = $newType(0, $kindStruct, "dnsmessage.Name", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Data_, Length_) { + this.$val = this; + if (arguments.length === 0) { + this.Data = arrayType.zero(); + this.Length = 0; + return; + } + this.Data = Data_; + this.Length = Length_; + }); + Question = $pkg.Question = $newType(0, $kindStruct, "dnsmessage.Question", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Name_, Type_, Class_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = new Name.ptr(arrayType.zero(), 0); + this.Type = 0; + this.Class = 0; + return; + } + this.Name = Name_; + this.Type = Type_; + this.Class = Class_; + }); + CNAMEResource = $pkg.CNAMEResource = $newType(0, $kindStruct, "dnsmessage.CNAMEResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(CNAME_) { + this.$val = this; + if (arguments.length === 0) { + this.CNAME = new Name.ptr(arrayType.zero(), 0); + return; + } + this.CNAME = CNAME_; + }); + MXResource = $pkg.MXResource = $newType(0, $kindStruct, "dnsmessage.MXResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Pref_, MX_) { + this.$val = this; + if (arguments.length === 0) { + this.Pref = 0; + this.MX = new Name.ptr(arrayType.zero(), 0); + return; + } + this.Pref = Pref_; + this.MX = MX_; + }); + NSResource = $pkg.NSResource = $newType(0, $kindStruct, "dnsmessage.NSResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(NS_) { + this.$val = this; + if (arguments.length === 0) { + this.NS = new Name.ptr(arrayType.zero(), 0); + return; + } + this.NS = NS_; + }); + PTRResource = $pkg.PTRResource = $newType(0, $kindStruct, "dnsmessage.PTRResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(PTR_) { + this.$val = this; + if (arguments.length === 0) { + this.PTR = new Name.ptr(arrayType.zero(), 0); + return; + } + this.PTR = PTR_; + }); + SOAResource = $pkg.SOAResource = $newType(0, $kindStruct, "dnsmessage.SOAResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(NS_, MBox_, Serial_, Refresh_, Retry_, Expire_, MinTTL_) { + this.$val = this; + if (arguments.length === 0) { + this.NS = new Name.ptr(arrayType.zero(), 0); + this.MBox = new Name.ptr(arrayType.zero(), 0); + this.Serial = 0; + this.Refresh = 0; + this.Retry = 0; + this.Expire = 0; + this.MinTTL = 0; + return; + } + this.NS = NS_; + this.MBox = MBox_; + this.Serial = Serial_; + this.Refresh = Refresh_; + this.Retry = Retry_; + this.Expire = Expire_; + this.MinTTL = MinTTL_; + }); + TXTResource = $pkg.TXTResource = $newType(0, $kindStruct, "dnsmessage.TXTResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(TXT_) { + this.$val = this; + if (arguments.length === 0) { + this.TXT = sliceType$3.nil; + return; + } + this.TXT = TXT_; + }); + SRVResource = $pkg.SRVResource = $newType(0, $kindStruct, "dnsmessage.SRVResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(Priority_, Weight_, Port_, Target_) { + this.$val = this; + if (arguments.length === 0) { + this.Priority = 0; + this.Weight = 0; + this.Port = 0; + this.Target = new Name.ptr(arrayType.zero(), 0); + return; + } + this.Priority = Priority_; + this.Weight = Weight_; + this.Port = Port_; + this.Target = Target_; + }); + AResource = $pkg.AResource = $newType(0, $kindStruct, "dnsmessage.AResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(A_) { + this.$val = this; + if (arguments.length === 0) { + this.A = arrayType$1.zero(); + return; + } + this.A = A_; + }); + AAAAResource = $pkg.AAAAResource = $newType(0, $kindStruct, "dnsmessage.AAAAResource", true, "vendor/golang_org/x/net/dns/dnsmessage", true, function(AAAA_) { + this.$val = this; + if (arguments.length === 0) { + this.AAAA = arrayType$2.zero(); + return; + } + this.AAAA = AAAA_; + }); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 255); + sliceType$1 = $sliceType(Question); + sliceType$2 = $sliceType(Resource); + sliceType$3 = $sliceType($String); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint8, 16); + arrayType$3 = $arrayType($Uint8, 12); + ptrType = $ptrType($Uint16); + ptrType$1 = $ptrType(nestedError); + ptrType$2 = $ptrType(Header); + ptrType$4 = $ptrType(header); + mapType = $mapType($String, $Int); + ptrType$5 = $ptrType(Resource); + ptrType$6 = $ptrType(Parser); + ptrType$7 = $ptrType(Builder); + ptrType$8 = $ptrType(ResourceHeader); + ptrType$9 = $ptrType(Name); + ptrType$10 = $ptrType(Question); + ptrType$11 = $ptrType(CNAMEResource); + ptrType$12 = $ptrType(MXResource); + ptrType$13 = $ptrType(NSResource); + ptrType$14 = $ptrType(PTRResource); + ptrType$15 = $ptrType(SOAResource); + ptrType$16 = $ptrType(TXTResource); + ptrType$17 = $ptrType(SRVResource); + ptrType$18 = $ptrType(AResource); + ptrType$19 = $ptrType(AAAAResource); + nestedError.ptr.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r = e.err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return e.s + ": " + _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: nestedError.ptr.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + nestedError.prototype.Error = function() { return this.$val.Error(); }; + Header.ptr.prototype.pack = function() { + var bits, id, m; + id = 0; + bits = 0; + m = this; + id = m.ID; + bits = ((((m.OpCode << 16 >>> 16)) << 11 << 16 >>> 16) | ((m.RCode << 16 >>> 16))) >>> 0; + if (m.RecursionAvailable) { + bits = (bits | (128)) >>> 0; + } + if (m.RecursionDesired) { + bits = (bits | (256)) >>> 0; + } + if (m.Truncated) { + bits = (bits | (512)) >>> 0; + } + if (m.Authoritative) { + bits = (bits | (1024)) >>> 0; + } + if (m.Response) { + bits = (bits | (32768)) >>> 0; + } + return [id, bits]; + }; + Header.prototype.pack = function() { return this.$val.pack(); }; + header.ptr.prototype.count = function(sec) { + var _1, h, sec; + h = this; + _1 = sec; + if (_1 === (2)) { + return h.questions; + } else if (_1 === (3)) { + return h.answers; + } else if (_1 === (4)) { + return h.authorities; + } else if (_1 === (5)) { + return h.additionals; + } + return 0; + }; + header.prototype.count = function(sec) { return this.$val.count(sec); }; + header.ptr.prototype.pack = function(msg) { + var h, msg; + h = this; + msg = packUint16(msg, h.id); + msg = packUint16(msg, h.bits); + msg = packUint16(msg, h.questions); + msg = packUint16(msg, h.answers); + msg = packUint16(msg, h.authorities); + return packUint16(msg, h.additionals); + }; + header.prototype.pack = function(msg) { return this.$val.pack(msg); }; + header.ptr.prototype.unpack = function(msg, off) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, err, h, msg, newOff, off; + h = this; + newOff = off; + err = $ifaceNil; + _tuple = unpackUint16(msg, newOff); + h.id = _tuple[0]; + newOff = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("id", err)]; + } + _tuple$1 = unpackUint16(msg, newOff); + h.bits = _tuple$1[0]; + newOff = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("bits", err)]; + } + _tuple$2 = unpackUint16(msg, newOff); + h.questions = _tuple$2[0]; + newOff = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("questions", err)]; + } + _tuple$3 = unpackUint16(msg, newOff); + h.answers = _tuple$3[0]; + newOff = _tuple$3[1]; + err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("answers", err)]; + } + _tuple$4 = unpackUint16(msg, newOff); + h.authorities = _tuple$4[0]; + newOff = _tuple$4[1]; + err = _tuple$4[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("authorities", err)]; + } + _tuple$5 = unpackUint16(msg, newOff); + h.additionals = _tuple$5[0]; + newOff = _tuple$5[1]; + err = _tuple$5[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("additionals", err)]; + } + return [newOff, $ifaceNil]; + }; + header.prototype.unpack = function(msg, off) { return this.$val.unpack(msg, off); }; + header.ptr.prototype.header = function() { + var h; + h = this; + return new Header.ptr(h.id, !(((((h.bits & 32768) >>> 0)) === 0)), ((((h.bits >>> 11 << 16 >>> 16) << 16 >>> 16)) & 15) >>> 0, !(((((h.bits & 1024) >>> 0)) === 0)), !(((((h.bits & 512) >>> 0)) === 0)), !(((((h.bits & 256) >>> 0)) === 0)), !(((((h.bits & 128) >>> 0)) === 0)), ((((h.bits & 15) >>> 0) << 16 >>> 16))); + }; + header.prototype.header = function() { return this.$val.header(); }; + Resource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _r, _r$1, _tuple, _tuple$1, compression, compressionOff, err, err$1, length, msg, oldMsg, preLen, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; compression = $f.compression; compressionOff = $f.compressionOff; err = $f.err; err$1 = $f.err$1; length = $f.length; msg = $f.msg; oldMsg = $f.oldMsg; preLen = $f.preLen; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if ($interfaceIsEqual(r.Body, $ifaceNil)) { + $s = -1; return [msg, errNilResouceBody]; + } + oldMsg = msg; + _r = r.Body.realType(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + r.Header.Type = _r; + _tuple = r.Header.pack(msg, compression, compressionOff); + msg = _tuple[0]; + length = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [msg, new nestedError.ptr("ResourceHeader", err)]; + } + preLen = msg.$length; + _r$1 = r.Body.pack(msg, compression, compressionOff); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + msg = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [msg, new nestedError.ptr("content", err)]; + } + err$1 = r.Header.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [oldMsg, err$1]; + } + $s = -1; return [msg, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resource.ptr.prototype.pack }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.compression = compression; $f.compressionOff = compressionOff; $f.err = err; $f.err$1 = err$1; $f.length = length; $f.msg = msg; $f.oldMsg = oldMsg; $f.preLen = preLen; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + Parser.ptr.prototype.Start = function(msg) { + var _tuple, err, msg, p; + p = this; + if (!(p.msg === sliceType.nil)) { + Parser.copy(p, new Parser.ptr(sliceType.nil, new header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0))); + } + p.msg = msg; + err = $ifaceNil; + _tuple = p.header.unpack(msg, 0); + p.off = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Header.ptr(0, false, 0, false, false, false, false, 0), new nestedError.ptr("unpacking header", err)]; + } + p.section = 2; + return [p.header.header(), $ifaceNil]; + }; + Parser.prototype.Start = function(msg) { return this.$val.Start(msg); }; + Parser.ptr.prototype.checkAdvance = function(sec) { + var p, sec; + p = this; + if (p.section < sec) { + return $pkg.ErrNotStarted; + } + if (p.section > sec) { + return $pkg.ErrSectionDone; + } + p.resHeaderValid = false; + if (p.index === ((p.header.count(sec) >> 0))) { + p.index = 0; + p.section = p.section + (1) << 24 >>> 24; + return $pkg.ErrSectionDone; + } + return $ifaceNil; + }; + Parser.prototype.checkAdvance = function(sec) { return this.$val.checkAdvance(sec); }; + Parser.ptr.prototype.resource = function(sec) { + var _entry, _tuple, _tuple$1, err, p, r, sec; + p = this; + r = new Resource.ptr(new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0), $ifaceNil); + err = $ifaceNil; + _tuple = p.resourceHeader(sec); + ResourceHeader.copy(r.Header, _tuple[0]); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [r, err]; + } + p.resHeaderValid = false; + _tuple$1 = unpackResourceBody(p.msg, p.off, $clone(r.Header, ResourceHeader)); + r.Body = _tuple$1[0]; + p.off = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Resource.ptr(new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0), $ifaceNil), new nestedError.ptr("unpacking " + (_entry = sectionNames[section.keyFor(sec)], _entry !== undefined ? _entry.v : ""), err)]; + } + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.resource = function(sec) { return this.$val.resource(sec); }; + Parser.ptr.prototype.resourceHeader = function(sec) { + var _tuple, err, err$1, hdr, off, p, sec; + p = this; + if (p.resHeaderValid) { + return [p.resHeader, $ifaceNil]; + } + err = p.checkAdvance(sec); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0), err]; + } + hdr = new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0); + _tuple = hdr.unpack(p.msg, p.off); + off = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new ResourceHeader.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0), err$1]; + } + p.resHeaderValid = true; + ResourceHeader.copy(p.resHeader, hdr); + p.off = off; + return [hdr, $ifaceNil]; + }; + Parser.prototype.resourceHeader = function(sec) { return this.$val.resourceHeader(sec); }; + Parser.ptr.prototype.skipResource = function(sec) { + var _entry, _tuple, err, err$1, newOff, p, sec; + p = this; + if (p.resHeaderValid) { + newOff = p.off + ((p.resHeader.Length >> 0)) >> 0; + if (newOff > p.msg.$length) { + return errResourceLen; + } + p.off = newOff; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return $ifaceNil; + } + err = p.checkAdvance(sec); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + err$1 = $ifaceNil; + _tuple = skipResource(p.msg, p.off); + p.off = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("skipping: " + (_entry = sectionNames[section.keyFor(sec)], _entry !== undefined ? _entry.v : ""), err$1); + } + p.index = p.index + (1) >> 0; + return $ifaceNil; + }; + Parser.prototype.skipResource = function(sec) { return this.$val.skipResource(sec); }; + Parser.ptr.prototype.Question = function() { + var _tuple, _tuple$1, _tuple$2, class$1, err, err$1, name, off, p, typ; + p = this; + err = p.checkAdvance(2); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Question.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0), err]; + } + name = new Name.ptr(arrayType.zero(), 0); + _tuple = name.unpack(p.msg, p.off); + off = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new Question.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0), new nestedError.ptr("unpacking Question.Name", err$1)]; + } + _tuple$1 = unpackType(p.msg, off); + typ = _tuple$1[0]; + off = _tuple$1[1]; + err$1 = _tuple$1[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new Question.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0), new nestedError.ptr("unpacking Question.Type", err$1)]; + } + _tuple$2 = unpackClass(p.msg, off); + class$1 = _tuple$2[0]; + off = _tuple$2[1]; + err$1 = _tuple$2[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new Question.ptr(new Name.ptr(arrayType.zero(), 0), 0, 0), new nestedError.ptr("unpacking Question.Class", err$1)]; + } + p.off = off; + p.index = p.index + (1) >> 0; + return [new Question.ptr($clone(name, Name), typ, class$1), $ifaceNil]; + }; + Parser.prototype.Question = function() { return this.$val.Question(); }; + Parser.ptr.prototype.AllQuestions = function() { + var _tuple, err, p, q, qs; + p = this; + qs = new sliceType$1([]); + while (true) { + _tuple = p.Question(); + q = $clone(_tuple[0], Question); + err = _tuple[1]; + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return [qs, $ifaceNil]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$1.nil, err]; + } + qs = $append(qs, q); + } + }; + Parser.prototype.AllQuestions = function() { return this.$val.AllQuestions(); }; + Parser.ptr.prototype.SkipQuestion = function() { + var _tuple, _tuple$1, _tuple$2, err, err$1, off, p; + p = this; + err = p.checkAdvance(2); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _tuple = skipName(p.msg, p.off); + off = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("skipping Question Name", err$1); + } + _tuple$1 = skipType(p.msg, off); + off = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("skipping Question Type", err$1); + } + _tuple$2 = skipClass(p.msg, off); + off = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("skipping Question Class", err$1); + } + p.off = off; + p.index = p.index + (1) >> 0; + return $ifaceNil; + }; + Parser.prototype.SkipQuestion = function() { return this.$val.SkipQuestion(); }; + Parser.ptr.prototype.SkipAllQuestions = function() { + var err, p; + p = this; + while (true) { + err = p.SkipQuestion(); + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return $ifaceNil; + } else if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + } + }; + Parser.prototype.SkipAllQuestions = function() { return this.$val.SkipAllQuestions(); }; + Parser.ptr.prototype.AnswerHeader = function() { + var p; + p = this; + return p.resourceHeader(3); + }; + Parser.prototype.AnswerHeader = function() { return this.$val.AnswerHeader(); }; + Parser.ptr.prototype.Answer = function() { + var p; + p = this; + return p.resource(3); + }; + Parser.prototype.Answer = function() { return this.$val.Answer(); }; + Parser.ptr.prototype.AllAnswers = function() { + var _tuple, a, as, err, n, p; + p = this; + n = ((p.header.answers >> 0)); + if (n > 20) { + n = 20; + } + as = $makeSlice(sliceType$2, 0, n); + while (true) { + _tuple = p.Answer(); + a = $clone(_tuple[0], Resource); + err = _tuple[1]; + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return [as, $ifaceNil]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$2.nil, err]; + } + as = $append(as, a); + } + }; + Parser.prototype.AllAnswers = function() { return this.$val.AllAnswers(); }; + Parser.ptr.prototype.SkipAnswer = function() { + var p; + p = this; + return p.skipResource(3); + }; + Parser.prototype.SkipAnswer = function() { return this.$val.SkipAnswer(); }; + Parser.ptr.prototype.SkipAllAnswers = function() { + var err, p; + p = this; + while (true) { + err = p.SkipAnswer(); + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return $ifaceNil; + } else if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + } + }; + Parser.prototype.SkipAllAnswers = function() { return this.$val.SkipAllAnswers(); }; + Parser.ptr.prototype.AuthorityHeader = function() { + var p; + p = this; + return p.resourceHeader(4); + }; + Parser.prototype.AuthorityHeader = function() { return this.$val.AuthorityHeader(); }; + Parser.ptr.prototype.Authority = function() { + var p; + p = this; + return p.resource(4); + }; + Parser.prototype.Authority = function() { return this.$val.Authority(); }; + Parser.ptr.prototype.AllAuthorities = function() { + var _tuple, a, as, err, n, p; + p = this; + n = ((p.header.authorities >> 0)); + if (n > 10) { + n = 10; + } + as = $makeSlice(sliceType$2, 0, n); + while (true) { + _tuple = p.Authority(); + a = $clone(_tuple[0], Resource); + err = _tuple[1]; + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return [as, $ifaceNil]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$2.nil, err]; + } + as = $append(as, a); + } + }; + Parser.prototype.AllAuthorities = function() { return this.$val.AllAuthorities(); }; + Parser.ptr.prototype.SkipAuthority = function() { + var p; + p = this; + return p.skipResource(4); + }; + Parser.prototype.SkipAuthority = function() { return this.$val.SkipAuthority(); }; + Parser.ptr.prototype.SkipAllAuthorities = function() { + var err, p; + p = this; + while (true) { + err = p.SkipAuthority(); + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return $ifaceNil; + } else if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + } + }; + Parser.prototype.SkipAllAuthorities = function() { return this.$val.SkipAllAuthorities(); }; + Parser.ptr.prototype.AdditionalHeader = function() { + var p; + p = this; + return p.resourceHeader(5); + }; + Parser.prototype.AdditionalHeader = function() { return this.$val.AdditionalHeader(); }; + Parser.ptr.prototype.Additional = function() { + var p; + p = this; + return p.resource(5); + }; + Parser.prototype.Additional = function() { return this.$val.Additional(); }; + Parser.ptr.prototype.AllAdditionals = function() { + var _tuple, a, as, err, n, p; + p = this; + n = ((p.header.additionals >> 0)); + if (n > 10) { + n = 10; + } + as = $makeSlice(sliceType$2, 0, n); + while (true) { + _tuple = p.Additional(); + a = $clone(_tuple[0], Resource); + err = _tuple[1]; + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return [as, $ifaceNil]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$2.nil, err]; + } + as = $append(as, a); + } + }; + Parser.prototype.AllAdditionals = function() { return this.$val.AllAdditionals(); }; + Parser.ptr.prototype.SkipAdditional = function() { + var p; + p = this; + return p.skipResource(5); + }; + Parser.prototype.SkipAdditional = function() { return this.$val.SkipAdditional(); }; + Parser.ptr.prototype.SkipAllAdditionals = function() { + var err, p; + p = this; + while (true) { + err = p.SkipAdditional(); + if ($interfaceIsEqual(err, $pkg.ErrSectionDone)) { + return $ifaceNil; + } else if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + } + }; + Parser.prototype.SkipAllAdditionals = function() { return this.$val.SkipAllAdditionals(); }; + Parser.ptr.prototype.CNAMEResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 5))) { + return [new CNAMEResource.ptr(new Name.ptr(arrayType.zero(), 0)), $pkg.ErrNotStarted]; + } + _tuple = unpackCNAMEResource(p.msg, p.off); + r = $clone(_tuple[0], CNAMEResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new CNAMEResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.CNAMEResource = function() { return this.$val.CNAMEResource(); }; + Parser.ptr.prototype.MXResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 15))) { + return [new MXResource.ptr(0, new Name.ptr(arrayType.zero(), 0)), $pkg.ErrNotStarted]; + } + _tuple = unpackMXResource(p.msg, p.off); + r = $clone(_tuple[0], MXResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new MXResource.ptr(0, new Name.ptr(arrayType.zero(), 0)), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.MXResource = function() { return this.$val.MXResource(); }; + Parser.ptr.prototype.NSResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 2))) { + return [new NSResource.ptr(new Name.ptr(arrayType.zero(), 0)), $pkg.ErrNotStarted]; + } + _tuple = unpackNSResource(p.msg, p.off); + r = $clone(_tuple[0], NSResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new NSResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.NSResource = function() { return this.$val.NSResource(); }; + Parser.ptr.prototype.PTRResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 12))) { + return [new PTRResource.ptr(new Name.ptr(arrayType.zero(), 0)), $pkg.ErrNotStarted]; + } + _tuple = unpackPTRResource(p.msg, p.off); + r = $clone(_tuple[0], PTRResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new PTRResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.PTRResource = function() { return this.$val.PTRResource(); }; + Parser.ptr.prototype.SOAResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 6))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), $pkg.ErrNotStarted]; + } + _tuple = unpackSOAResource(p.msg, p.off); + r = $clone(_tuple[0], SOAResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.SOAResource = function() { return this.$val.SOAResource(); }; + Parser.ptr.prototype.TXTResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 16))) { + return [new TXTResource.ptr(sliceType$3.nil), $pkg.ErrNotStarted]; + } + _tuple = unpackTXTResource(p.msg, p.off, p.resHeader.Length); + r = $clone(_tuple[0], TXTResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new TXTResource.ptr(sliceType$3.nil), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.TXTResource = function() { return this.$val.TXTResource(); }; + Parser.ptr.prototype.SRVResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 33))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), $pkg.ErrNotStarted]; + } + _tuple = unpackSRVResource(p.msg, p.off); + r = $clone(_tuple[0], SRVResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.SRVResource = function() { return this.$val.SRVResource(); }; + Parser.ptr.prototype.AResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 1))) { + return [new AResource.ptr(arrayType$1.zero()), $pkg.ErrNotStarted]; + } + _tuple = unpackAResource(p.msg, p.off); + r = $clone(_tuple[0], AResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new AResource.ptr(arrayType$1.zero()), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.AResource = function() { return this.$val.AResource(); }; + Parser.ptr.prototype.AAAAResource = function() { + var _tuple, err, p, r; + p = this; + if (!p.resHeaderValid || !((p.resHeader.Type === 28))) { + return [new AAAAResource.ptr(arrayType$2.zero()), $pkg.ErrNotStarted]; + } + _tuple = unpackAAAAResource(p.msg, p.off); + r = $clone(_tuple[0], AAAAResource); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new AAAAResource.ptr(arrayType$2.zero()), err]; + } + p.off = p.off + (((p.resHeader.Length >> 0))) >> 0; + p.resHeaderValid = false; + p.index = p.index + (1) >> 0; + return [r, $ifaceNil]; + }; + Parser.prototype.AAAAResource = function() { return this.$val.AAAAResource(); }; + NewBuilder = function(buf, h) { + var _tuple, b, buf, h, hb; + if (buf === sliceType.nil) { + buf = $makeSlice(sliceType, 0, 512); + } + b = new Builder.ptr(buf, 0, new header.ptr(0, 0, 0, 0, 0, 0), buf.$length, false); + _tuple = h.pack(); + b.header.id = _tuple[0]; + b.header.bits = _tuple[1]; + hb = arrayType$3.zero(); + b.msg = $appendSlice(b.msg, new sliceType(hb)); + b.section = 1; + return b; + }; + $pkg.NewBuilder = NewBuilder; + Builder.ptr.prototype.EnableCompression = function() { + var b; + b = this; + b.compression = $makeMap($String.keyFor, []); + }; + Builder.prototype.EnableCompression = function() { return this.$val.EnableCompression(); }; + Builder.ptr.prototype.startCheck = function(s) { + var b, s; + b = this; + if (b.section <= 0) { + return $pkg.ErrNotStarted; + } + if (b.section > s) { + return $pkg.ErrSectionDone; + } + return $ifaceNil; + }; + Builder.prototype.startCheck = function(s) { return this.$val.startCheck(s); }; + Builder.ptr.prototype.StartQuestions = function() { + var b, err; + b = this; + err = b.startCheck(2); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + b.section = 2; + return $ifaceNil; + }; + Builder.prototype.StartQuestions = function() { return this.$val.StartQuestions(); }; + Builder.ptr.prototype.StartAnswers = function() { + var b, err; + b = this; + err = b.startCheck(3); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + b.section = 3; + return $ifaceNil; + }; + Builder.prototype.StartAnswers = function() { return this.$val.StartAnswers(); }; + Builder.ptr.prototype.StartAuthorities = function() { + var b, err; + b = this; + err = b.startCheck(4); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + b.section = 4; + return $ifaceNil; + }; + Builder.prototype.StartAuthorities = function() { return this.$val.StartAuthorities(); }; + Builder.ptr.prototype.StartAdditionals = function() { + var b, err; + b = this; + err = b.startCheck(5); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + b.section = 5; + return $ifaceNil; + }; + Builder.prototype.StartAdditionals = function() { return this.$val.StartAdditionals(); }; + Builder.ptr.prototype.incrementSectionCount = function() { + var _1, b, count, err, x, x$1, x$2, x$3; + b = this; + count = ptrType.nil; + err = $ifaceNil; + _1 = b.section; + if (_1 === (2)) { + count = (x = b.header, (x.$ptr_questions || (x.$ptr_questions = new ptrType(function() { return this.$target.questions; }, function($v) { this.$target.questions = $v; }, x)))); + err = errTooManyQuestions; + } else if (_1 === (3)) { + count = (x$1 = b.header, (x$1.$ptr_answers || (x$1.$ptr_answers = new ptrType(function() { return this.$target.answers; }, function($v) { this.$target.answers = $v; }, x$1)))); + err = errTooManyAnswers; + } else if (_1 === (4)) { + count = (x$2 = b.header, (x$2.$ptr_authorities || (x$2.$ptr_authorities = new ptrType(function() { return this.$target.authorities; }, function($v) { this.$target.authorities = $v; }, x$2)))); + err = errTooManyAuthorities; + } else if (_1 === (5)) { + count = (x$3 = b.header, (x$3.$ptr_additionals || (x$3.$ptr_additionals = new ptrType(function() { return this.$target.additionals; }, function($v) { this.$target.additionals = $v; }, x$3)))); + err = errTooManyAdditionals; + } + if (count.$get() === 65535) { + return err; + } + count.$set(count.$get() + (1) << 16 >>> 16); + return $ifaceNil; + }; + Builder.prototype.incrementSectionCount = function() { return this.$val.incrementSectionCount(); }; + Builder.ptr.prototype.Question = function(q) { + var _tuple, b, err, err$1, msg, q; + b = this; + if (b.section < 2) { + return $pkg.ErrNotStarted; + } + if (b.section > 2) { + return $pkg.ErrSectionDone; + } + _tuple = q.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + err$1 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return err$1; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.Question = function(q) { return this.$val.Question(q); }; + Builder.ptr.prototype.checkResourceSection = function() { + var b; + b = this; + if (b.section < 3) { + return $pkg.ErrNotStarted; + } + if (b.section > 5) { + return $pkg.ErrSectionDone; + } + return $ifaceNil; + }; + Builder.prototype.checkResourceSection = function() { return this.$val.checkResourceSection(); }; + Builder.ptr.prototype.CNAMEResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("CNAMEResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.CNAMEResource = function(h, r) { return this.$val.CNAMEResource(h, r); }; + Builder.ptr.prototype.MXResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("MXResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.MXResource = function(h, r) { return this.$val.MXResource(h, r); }; + Builder.ptr.prototype.NSResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("NSResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.NSResource = function(h, r) { return this.$val.NSResource(h, r); }; + Builder.ptr.prototype.PTRResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("PTRResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.PTRResource = function(h, r) { return this.$val.PTRResource(h, r); }; + Builder.ptr.prototype.SOAResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("SOAResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.SOAResource = function(h, r) { return this.$val.SOAResource(h, r); }; + Builder.ptr.prototype.TXTResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("TXTResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.TXTResource = function(h, r) { return this.$val.TXTResource(h, r); }; + Builder.ptr.prototype.SRVResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("SRVResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.SRVResource = function(h, r) { return this.$val.SRVResource(h, r); }; + Builder.ptr.prototype.AResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("AResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.AResource = function(h, r) { return this.$val.AResource(h, r); }; + Builder.ptr.prototype.AAAAResource = function(h, r) { + var _tuple, _tuple$1, b, err, err$1, err$2, err$3, h, length, msg, preLen, r; + b = this; + err = b.checkResourceSection(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + h.Type = r.realType(); + _tuple = h.pack(b.msg, b.compression, b.start); + msg = _tuple[0]; + length = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("ResourceHeader", err$1); + } + preLen = msg.$length; + _tuple$1 = r.pack(msg, b.compression, b.start); + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return new nestedError.ptr("AAAAResource body", err$1); + } + err$2 = h.fixLen(msg, length, preLen); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return err$2; + } + err$3 = b.incrementSectionCount(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + return err$3; + } + b.msg = msg; + return $ifaceNil; + }; + Builder.prototype.AAAAResource = function(h, r) { return this.$val.AAAAResource(h, r); }; + Builder.ptr.prototype.Finish = function() { + var b; + b = this; + if (b.section < 1) { + return [sliceType.nil, $pkg.ErrNotStarted]; + } + b.section = 6; + b.header.pack($subslice(b.msg, b.start, b.start)); + return [b.msg, $ifaceNil]; + }; + Builder.prototype.Finish = function() { return this.$val.Finish(); }; + ResourceHeader.ptr.prototype.pack = function(oldMsg, compression, compressionOff) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, compression, compressionOff, err, h, lenBegin, length, msg, oldMsg; + msg = sliceType.nil; + length = sliceType.nil; + err = $ifaceNil; + h = this; + msg = oldMsg; + _tuple = h.Name.pack(msg, compression, compressionOff); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = oldMsg; + _tmp$1 = sliceType.nil; + _tmp$2 = new nestedError.ptr("Name", err); + msg = _tmp; + length = _tmp$1; + err = _tmp$2; + return [msg, length, err]; + } + msg = packType(msg, h.Type); + msg = packClass(msg, h.Class); + msg = packUint32(msg, h.TTL); + lenBegin = msg.$length; + msg = packUint16(msg, h.Length); + _tmp$3 = msg; + _tmp$4 = $subslice(msg, lenBegin, (lenBegin + 2 >> 0)); + _tmp$5 = $ifaceNil; + msg = _tmp$3; + length = _tmp$4; + err = _tmp$5; + return [msg, length, err]; + }; + ResourceHeader.prototype.pack = function(oldMsg, compression, compressionOff) { return this.$val.pack(oldMsg, compression, compressionOff); }; + ResourceHeader.ptr.prototype.unpack = function(msg, off) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, err, h, msg, newOff, off; + h = this; + newOff = off; + err = $ifaceNil; + _tuple = h.Name.unpack(msg, newOff); + newOff = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Name", err)]; + } + _tuple$1 = unpackType(msg, newOff); + h.Type = _tuple$1[0]; + newOff = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Type", err)]; + } + _tuple$2 = unpackClass(msg, newOff); + h.Class = _tuple$2[0]; + newOff = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Class", err)]; + } + _tuple$3 = unpackUint32(msg, newOff); + h.TTL = _tuple$3[0]; + newOff = _tuple$3[1]; + err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("TTL", err)]; + } + _tuple$4 = unpackUint16(msg, newOff); + h.Length = _tuple$4[0]; + newOff = _tuple$4[1]; + err = _tuple$4[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Length", err)]; + } + return [newOff, $ifaceNil]; + }; + ResourceHeader.prototype.unpack = function(msg, off) { return this.$val.unpack(msg, off); }; + ResourceHeader.ptr.prototype.fixLen = function(msg, length, preLen) { + var conLen, h, length, msg, preLen; + h = this; + conLen = msg.$length - preLen >> 0; + if (conLen > 65535) { + return errResTooLong; + } + packUint16($subslice(length, 0, 0), ((conLen << 16 >>> 16))); + h.Length = ((conLen << 16 >>> 16)); + return $ifaceNil; + }; + ResourceHeader.prototype.fixLen = function(msg, length, preLen) { return this.$val.fixLen(msg, length, preLen); }; + skipResource = function(msg, off) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, err, length, msg, newOff, off; + _tuple = skipName(msg, off); + newOff = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Name", err)]; + } + _tuple$1 = skipType(msg, newOff); + newOff = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Type", err)]; + } + _tuple$2 = skipClass(msg, newOff); + newOff = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Class", err)]; + } + _tuple$3 = skipUint32(msg, newOff); + newOff = _tuple$3[0]; + err = _tuple$3[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("TTL", err)]; + } + _tuple$4 = unpackUint16(msg, newOff); + length = _tuple$4[0]; + newOff = _tuple$4[1]; + err = _tuple$4[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [off, new nestedError.ptr("Length", err)]; + } + newOff = newOff + (((length >> 0))) >> 0; + if (newOff > msg.$length) { + return [off, errResourceLen]; + } + return [newOff, $ifaceNil]; + }; + packUint16 = function(msg, field) { + var field, msg; + return $append(msg, (((field >>> 8 << 16 >>> 16) << 24 >>> 24)), ((field << 24 >>> 24))); + }; + unpackUint16 = function(msg, off) { + var msg, off, x; + if ((off + 2 >> 0) > msg.$length) { + return [0, off, errBaseLen]; + } + return [((((((off < 0 || off >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + off]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((x = off + 1 >> 0, ((x < 0 || x >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + x])) << 16 >>> 16))) >>> 0, off + 2 >> 0, $ifaceNil]; + }; + skipUint16 = function(msg, off) { + var msg, off; + if ((off + 2 >> 0) > msg.$length) { + return [off, errBaseLen]; + } + return [off + 2 >> 0, $ifaceNil]; + }; + packType = function(msg, field) { + var field, msg; + return packUint16(msg, ((field << 16 >>> 16))); + }; + unpackType = function(msg, off) { + var _tuple, err, msg, o, off, t; + _tuple = unpackUint16(msg, off); + t = _tuple[0]; + o = _tuple[1]; + err = _tuple[2]; + return [((t << 16 >>> 16)), o, err]; + }; + skipType = function(msg, off) { + var msg, off; + return skipUint16(msg, off); + }; + packClass = function(msg, field) { + var field, msg; + return packUint16(msg, ((field << 16 >>> 16))); + }; + unpackClass = function(msg, off) { + var _tuple, c, err, msg, o, off; + _tuple = unpackUint16(msg, off); + c = _tuple[0]; + o = _tuple[1]; + err = _tuple[2]; + return [((c << 16 >>> 16)), o, err]; + }; + skipClass = function(msg, off) { + var msg, off; + return skipUint16(msg, off); + }; + packUint32 = function(msg, field) { + var field, msg; + return $append(msg, (((field >>> 24 >>> 0) << 24 >>> 24)), (((field >>> 16 >>> 0) << 24 >>> 24)), (((field >>> 8 >>> 0) << 24 >>> 24)), ((field << 24 >>> 24))); + }; + unpackUint32 = function(msg, off) { + var msg, off, v, x, x$1, x$2; + if ((off + 4 >> 0) > msg.$length) { + return [0, off, errBaseLen]; + } + v = ((((((((((off < 0 || off >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + off]) >>> 0)) << 24 >>> 0) | ((((x = off + 1 >> 0, ((x < 0 || x >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + x])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$1 = off + 2 >> 0, ((x$1 < 0 || x$1 >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = off + 3 >> 0, ((x$2 < 0 || x$2 >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + x$2])) >>> 0))) >>> 0; + return [v, off + 4 >> 0, $ifaceNil]; + }; + skipUint32 = function(msg, off) { + var msg, off; + if ((off + 4 >> 0) > msg.$length) { + return [off, errBaseLen]; + } + return [off + 4 >> 0, $ifaceNil]; + }; + packText = function(msg, field) { + var field, l, msg; + l = field.length; + if (l > 255) { + return [sliceType.nil, errStringTooLong]; + } + msg = $append(msg, ((l << 24 >>> 24))); + msg = $appendSlice(msg, field); + return [msg, $ifaceNil]; + }; + unpackText = function(msg, off) { + var beginOff, endOff, msg, off; + if (off >= msg.$length) { + return ["", off, errBaseLen]; + } + beginOff = off + 1 >> 0; + endOff = beginOff + ((((off < 0 || off >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + off]) >> 0)) >> 0; + if (endOff > msg.$length) { + return ["", off, errCalcLen]; + } + return [($bytesToString($subslice(msg, beginOff, endOff))), endOff, $ifaceNil]; + }; + packBytes = function(msg, field) { + var field, msg; + return $appendSlice(msg, field); + }; + unpackBytes = function(msg, off, field) { + var field, msg, newOff, off; + newOff = off + field.$length >> 0; + if (newOff > msg.$length) { + return [off, errBaseLen]; + } + $copySlice(field, $subslice(msg, off, newOff)); + return [newOff, $ifaceNil]; + }; + NewName = function(name) { + var n, name; + if ((new sliceType($stringToBytes(name))).$length > 255) { + return [new Name.ptr(arrayType.zero(), 0), errCalcLen]; + } + n = new Name.ptr(arrayType.zero(), ((name.length << 24 >>> 24))); + $copySlice(new sliceType(n.Data), (new sliceType($stringToBytes(name)))); + return [n, $ifaceNil]; + }; + $pkg.NewName = NewName; + Name.ptr.prototype.String = function() { + var n; + n = this; + return ($bytesToString($subslice(new sliceType(n.Data), 0, n.Length))); + }; + Name.prototype.String = function() { return this.$val.String(); }; + Name.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _entry, _key, _tmp, _tmp$1, _tuple, begin, compression, compressionOff, i, j, msg, n, ok, oldMsg, ptr, x, x$1, x$2, x$3, x$4, x$5; + n = this; + oldMsg = msg; + if ((n.Length === 0) || !(((x = n.Data, x$1 = n.Length - 1 << 24 >>> 24, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) === 46))) { + return [oldMsg, errNonCanonicalName]; + } + if ((n.Data[0] === 46) && (n.Length === 1)) { + return [$append(msg, 0), $ifaceNil]; + } + _tmp = 0; + _tmp$1 = 0; + i = _tmp; + begin = _tmp$1; + while (true) { + if (!(i < ((n.Length >> 0)))) { break; } + if ((x$2 = n.Data, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) === 46) { + if ((i - begin >> 0) >= 64) { + return [oldMsg, errSegTooLong]; + } + if ((i - begin >> 0) === 0) { + return [oldMsg, errZeroSegLen]; + } + msg = $append(msg, (((i - begin >> 0) << 24 >>> 24))); + j = begin; + while (true) { + if (!(j < i)) { break; } + msg = $append(msg, (x$3 = n.Data, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j]))); + j = j + (1) >> 0; + } + begin = i + 1 >> 0; + i = i + (1) >> 0; + continue; + } + if (((i === 0) || ((x$4 = n.Data, x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])) === 46)) && !(compression === false)) { + _tuple = (_entry = compression[$String.keyFor(($bytesToString($subslice(new sliceType(n.Data), i))))], _entry !== undefined ? [_entry.v, true] : [0, false]); + ptr = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return [$append(msg, ((((ptr >> 8 >> 0) | 192) << 24 >>> 24)), ((ptr << 24 >>> 24))), $ifaceNil]; + } + if (msg.$length <= 16383) { + _key = ($bytesToString($subslice(new sliceType(n.Data), i))); (compression || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: msg.$length - compressionOff >> 0 }; + } + } + i = i + (1) >> 0; + } + return [$append(msg, 0), $ifaceNil]; + }; + Name.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + Name.ptr.prototype.unpack = function(msg, off) { + var msg, n, off; + n = this; + return n.unpackCompressed(msg, off, true); + }; + Name.prototype.unpack = function(msg, off) { return this.$val.unpack(msg, off); }; + Name.ptr.prototype.unpackCompressed = function(msg, off, allowCompression) { + var _1, allowCompression, c, c1, currOff, endOff, msg, n, name, newOff, off, ptr; + n = this; + currOff = off; + newOff = off; + ptr = 0; + name = $subslice(new sliceType(n.Data), 0, 0); + Loop: + while (true) { + if (currOff >= msg.$length) { + return [off, errBaseLen]; + } + c = ((((currOff < 0 || currOff >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + currOff]) >> 0)); + currOff = currOff + (1) >> 0; + _1 = c & 192; + if (_1 === (0)) { + if (c === 0) { + break Loop; + } + endOff = currOff + c >> 0; + if (endOff > msg.$length) { + return [off, errCalcLen]; + } + name = $appendSlice(name, $subslice(msg, currOff, endOff)); + name = $append(name, 46); + currOff = endOff; + } else if (_1 === (192)) { + if (!allowCompression) { + return [off, errCompressedSRV]; + } + if (currOff >= msg.$length) { + return [off, errInvalidPtr]; + } + c1 = ((currOff < 0 || currOff >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + currOff]); + currOff = currOff + (1) >> 0; + if (ptr === 0) { + newOff = currOff; + } + ptr = ptr + (1) >> 0; + if (ptr > 10) { + return [off, errTooManyPtr]; + } + currOff = ((((c ^ 192) >> 0)) << 8 >> 0) | ((c1 >> 0)); + } else { + return [off, errReserved]; + } + } + if (name.$length === 0) { + name = $append(name, 46); + } + if (name.$length > 255) { + return [off, errCalcLen]; + } + n.Length = ((name.$length << 24 >>> 24)); + if (ptr === 0) { + newOff = currOff; + } + return [newOff, $ifaceNil]; + }; + Name.prototype.unpackCompressed = function(msg, off, allowCompression) { return this.$val.unpackCompressed(msg, off, allowCompression); }; + skipName = function(msg, off) { + var _1, c, msg, newOff, off; + newOff = off; + Loop: + while (true) { + if (newOff >= msg.$length) { + return [off, errBaseLen]; + } + c = ((((newOff < 0 || newOff >= msg.$length) ? ($throwRuntimeError("index out of range"), undefined) : msg.$array[msg.$offset + newOff]) >> 0)); + newOff = newOff + (1) >> 0; + _1 = c & 192; + if (_1 === (0)) { + if (c === 0) { + break Loop; + } + newOff = newOff + (c) >> 0; + if (newOff > msg.$length) { + return [off, errCalcLen]; + } + } else if (_1 === (192)) { + newOff = newOff + (1) >> 0; + break Loop; + } else { + return [off, errReserved]; + } + } + return [newOff, $ifaceNil]; + }; + Question.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _tuple, compression, compressionOff, err, msg, q; + q = this; + _tuple = q.Name.pack(msg, compression, compressionOff); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [msg, new nestedError.ptr("Name", err)]; + } + msg = packType(msg, q.Type); + return [packClass(msg, q.Class), $ifaceNil]; + }; + Question.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackResourceBody = function(msg, off, hdr) { + var _1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, err, hdr, msg, name, off, r, rb, rb$1, rb$2, rb$3, rb$4, rb$5, rb$6, rb$7, rb$8; + r = $ifaceNil; + err = $ifaceNil; + name = ""; + _1 = hdr.Type; + if (_1 === (1)) { + rb = new AResource.ptr(arrayType$1.zero()); + _tuple = unpackAResource(msg, off); + AResource.copy(rb, _tuple[0]); + err = _tuple[1]; + r = rb; + name = "A"; + } else if (_1 === (2)) { + rb$1 = new NSResource.ptr(new Name.ptr(arrayType.zero(), 0)); + _tuple$1 = unpackNSResource(msg, off); + NSResource.copy(rb$1, _tuple$1[0]); + err = _tuple$1[1]; + r = rb$1; + name = "NS"; + } else if (_1 === (5)) { + rb$2 = new CNAMEResource.ptr(new Name.ptr(arrayType.zero(), 0)); + _tuple$2 = unpackCNAMEResource(msg, off); + CNAMEResource.copy(rb$2, _tuple$2[0]); + err = _tuple$2[1]; + r = rb$2; + name = "CNAME"; + } else if (_1 === (6)) { + rb$3 = new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0); + _tuple$3 = unpackSOAResource(msg, off); + SOAResource.copy(rb$3, _tuple$3[0]); + err = _tuple$3[1]; + r = rb$3; + name = "SOA"; + } else if (_1 === (12)) { + rb$4 = new PTRResource.ptr(new Name.ptr(arrayType.zero(), 0)); + _tuple$4 = unpackPTRResource(msg, off); + PTRResource.copy(rb$4, _tuple$4[0]); + err = _tuple$4[1]; + r = rb$4; + name = "PTR"; + } else if (_1 === (15)) { + rb$5 = new MXResource.ptr(0, new Name.ptr(arrayType.zero(), 0)); + _tuple$5 = unpackMXResource(msg, off); + MXResource.copy(rb$5, _tuple$5[0]); + err = _tuple$5[1]; + r = rb$5; + name = "MX"; + } else if (_1 === (16)) { + rb$6 = new TXTResource.ptr(sliceType$3.nil); + _tuple$6 = unpackTXTResource(msg, off, hdr.Length); + TXTResource.copy(rb$6, _tuple$6[0]); + err = _tuple$6[1]; + r = rb$6; + name = "TXT"; + } else if (_1 === (28)) { + rb$7 = new AAAAResource.ptr(arrayType$2.zero()); + _tuple$7 = unpackAAAAResource(msg, off); + AAAAResource.copy(rb$7, _tuple$7[0]); + err = _tuple$7[1]; + r = rb$7; + name = "AAAA"; + } else if (_1 === (33)) { + rb$8 = new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)); + _tuple$8 = unpackSRVResource(msg, off); + SRVResource.copy(rb$8, _tuple$8[0]); + err = _tuple$8[1]; + r = rb$8; + name = "SRV"; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [$ifaceNil, off, new nestedError.ptr(name + " record", err)]; + } + if ($interfaceIsEqual(r, $ifaceNil)) { + return [$ifaceNil, off, errors.New("invalid resource type: " + ($encodeRune((hdr.Type + 48 << 16 >>> 16))))]; + } + return [r, off + ((hdr.Length >> 0)) >> 0, $ifaceNil]; + }; + CNAMEResource.ptr.prototype.realType = function() { + var r; + r = this; + return 5; + }; + CNAMEResource.prototype.realType = function() { return this.$val.realType(); }; + CNAMEResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var compression, compressionOff, msg, r; + r = this; + return r.CNAME.pack(msg, compression, compressionOff); + }; + CNAMEResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackCNAMEResource = function(msg, off) { + var _tuple, cname, err, msg, off; + cname = new Name.ptr(arrayType.zero(), 0); + _tuple = cname.unpack(msg, off); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new CNAMEResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + return [new CNAMEResource.ptr($clone(cname, Name)), $ifaceNil]; + }; + MXResource.ptr.prototype.realType = function() { + var r; + r = this; + return 15; + }; + MXResource.prototype.realType = function() { return this.$val.realType(); }; + MXResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _tuple, compression, compressionOff, err, msg, oldMsg, r; + r = this; + oldMsg = msg; + msg = packUint16(msg, r.Pref); + _tuple = r.MX.pack(msg, compression, compressionOff); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [oldMsg, new nestedError.ptr("MXResource.MX", err)]; + } + return [msg, $ifaceNil]; + }; + MXResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackMXResource = function(msg, off) { + var _tuple, _tuple$1, err, err$1, msg, mx, off, pref; + _tuple = unpackUint16(msg, off); + pref = _tuple[0]; + off = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new MXResource.ptr(0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("Pref", err)]; + } + mx = new Name.ptr(arrayType.zero(), 0); + _tuple$1 = mx.unpack(msg, off); + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new MXResource.ptr(0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("MX", err$1)]; + } + return [new MXResource.ptr(pref, $clone(mx, Name)), $ifaceNil]; + }; + NSResource.ptr.prototype.realType = function() { + var r; + r = this; + return 2; + }; + NSResource.prototype.realType = function() { return this.$val.realType(); }; + NSResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var compression, compressionOff, msg, r; + r = this; + return r.NS.pack(msg, compression, compressionOff); + }; + NSResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackNSResource = function(msg, off) { + var _tuple, err, msg, ns, off; + ns = new Name.ptr(arrayType.zero(), 0); + _tuple = ns.unpack(msg, off); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new NSResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + return [new NSResource.ptr($clone(ns, Name)), $ifaceNil]; + }; + PTRResource.ptr.prototype.realType = function() { + var r; + r = this; + return 12; + }; + PTRResource.prototype.realType = function() { return this.$val.realType(); }; + PTRResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var compression, compressionOff, msg, r; + r = this; + return r.PTR.pack(msg, compression, compressionOff); + }; + PTRResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackPTRResource = function(msg, off) { + var _tuple, err, msg, off, ptr; + ptr = new Name.ptr(arrayType.zero(), 0); + _tuple = ptr.unpack(msg, off); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new PTRResource.ptr(new Name.ptr(arrayType.zero(), 0)), err]; + } + return [new PTRResource.ptr($clone(ptr, Name)), $ifaceNil]; + }; + SOAResource.ptr.prototype.realType = function() { + var r; + r = this; + return 6; + }; + SOAResource.prototype.realType = function() { return this.$val.realType(); }; + SOAResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _tuple, _tuple$1, compression, compressionOff, err, msg, oldMsg, r; + r = this; + oldMsg = msg; + _tuple = r.NS.pack(msg, compression, compressionOff); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [oldMsg, new nestedError.ptr("SOAResource.NS", err)]; + } + _tuple$1 = r.MBox.pack(msg, compression, compressionOff); + msg = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [oldMsg, new nestedError.ptr("SOAResource.MBox", err)]; + } + msg = packUint32(msg, r.Serial); + msg = packUint32(msg, r.Refresh); + msg = packUint32(msg, r.Retry); + msg = packUint32(msg, r.Expire); + return [packUint32(msg, r.MinTTL), $ifaceNil]; + }; + SOAResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackSOAResource = function(msg, off) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, err, expire, mbox, minTTL, msg, ns, off, refresh, retry, serial; + ns = new Name.ptr(arrayType.zero(), 0); + _tuple = ns.unpack(msg, off); + off = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("NS", err)]; + } + mbox = new Name.ptr(arrayType.zero(), 0); + _tuple$1 = mbox.unpack(msg, off); + off = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("MBox", err)]; + } + _tuple$2 = unpackUint32(msg, off); + serial = _tuple$2[0]; + off = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("Serial", err)]; + } + _tuple$3 = unpackUint32(msg, off); + refresh = _tuple$3[0]; + off = _tuple$3[1]; + err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("Refresh", err)]; + } + _tuple$4 = unpackUint32(msg, off); + retry = _tuple$4[0]; + off = _tuple$4[1]; + err = _tuple$4[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("Retry", err)]; + } + _tuple$5 = unpackUint32(msg, off); + expire = _tuple$5[0]; + off = _tuple$5[1]; + err = _tuple$5[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("Expire", err)]; + } + _tuple$6 = unpackUint32(msg, off); + minTTL = _tuple$6[0]; + err = _tuple$6[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SOAResource.ptr(new Name.ptr(arrayType.zero(), 0), new Name.ptr(arrayType.zero(), 0), 0, 0, 0, 0, 0), new nestedError.ptr("MinTTL", err)]; + } + return [new SOAResource.ptr($clone(ns, Name), $clone(mbox, Name), serial, refresh, retry, expire, minTTL), $ifaceNil]; + }; + TXTResource.ptr.prototype.realType = function() { + var r; + r = this; + return 16; + }; + TXTResource.prototype.realType = function() { return this.$val.realType(); }; + TXTResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _i, _ref, _tuple, compression, compressionOff, err, msg, oldMsg, r, s; + r = this; + oldMsg = msg; + _ref = r.TXT; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + err = $ifaceNil; + _tuple = packText(msg, s); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [oldMsg, err]; + } + _i++; + } + return [msg, $ifaceNil]; + }; + TXTResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackTXTResource = function(msg, off, length) { + var _tuple, err, length, msg, n, off, t, txts; + txts = $makeSlice(sliceType$3, 0, 1); + n = 0; + while (true) { + if (!(n < length)) { break; } + t = ""; + err = $ifaceNil; + _tuple = unpackText(msg, off); + t = _tuple[0]; + off = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new TXTResource.ptr(sliceType$3.nil), new nestedError.ptr("text", err)]; + } + if ((length - n << 16 >>> 16) < (((t.length << 16 >>> 16)) + 1 << 16 >>> 16)) { + return [new TXTResource.ptr(sliceType$3.nil), errCalcLen]; + } + n = n + ((((t.length << 16 >>> 16)) + 1 << 16 >>> 16)) << 16 >>> 16; + txts = $append(txts, t); + } + return [new TXTResource.ptr(txts), $ifaceNil]; + }; + SRVResource.ptr.prototype.realType = function() { + var r; + r = this; + return 33; + }; + SRVResource.prototype.realType = function() { return this.$val.realType(); }; + SRVResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var _tuple, compression, compressionOff, err, msg, oldMsg, r; + r = this; + oldMsg = msg; + msg = packUint16(msg, r.Priority); + msg = packUint16(msg, r.Weight); + msg = packUint16(msg, r.Port); + _tuple = r.Target.pack(msg, false, compressionOff); + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [oldMsg, new nestedError.ptr("SRVResource.Target", err)]; + } + return [msg, $ifaceNil]; + }; + SRVResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackSRVResource = function(msg, off) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, msg, off, port, priority, target, weight; + _tuple = unpackUint16(msg, off); + priority = _tuple[0]; + off = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("Priority", err)]; + } + _tuple$1 = unpackUint16(msg, off); + weight = _tuple$1[0]; + off = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("Weight", err)]; + } + _tuple$2 = unpackUint16(msg, off); + port = _tuple$2[0]; + off = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("Port", err)]; + } + target = new Name.ptr(arrayType.zero(), 0); + _tuple$3 = target.unpackCompressed(msg, off, false); + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [new SRVResource.ptr(0, 0, 0, new Name.ptr(arrayType.zero(), 0)), new nestedError.ptr("Target", err$1)]; + } + return [new SRVResource.ptr(priority, weight, port, $clone(target, Name)), $ifaceNil]; + }; + AResource.ptr.prototype.realType = function() { + var r; + r = this; + return 1; + }; + AResource.prototype.realType = function() { return this.$val.realType(); }; + AResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var compression, compressionOff, msg, r; + r = this; + return [packBytes(msg, new sliceType(r.A)), $ifaceNil]; + }; + AResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackAResource = function(msg, off) { + var _tuple, a, err, msg, off; + a = arrayType$1.zero(); + _tuple = unpackBytes(msg, off, new sliceType(a)); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new AResource.ptr(arrayType$1.zero()), err]; + } + return [new AResource.ptr($clone(a, arrayType$1)), $ifaceNil]; + }; + AAAAResource.ptr.prototype.realType = function() { + var r; + r = this; + return 28; + }; + AAAAResource.prototype.realType = function() { return this.$val.realType(); }; + AAAAResource.ptr.prototype.pack = function(msg, compression, compressionOff) { + var compression, compressionOff, msg, r; + r = this; + return [packBytes(msg, new sliceType(r.AAAA)), $ifaceNil]; + }; + AAAAResource.prototype.pack = function(msg, compression, compressionOff) { return this.$val.pack(msg, compression, compressionOff); }; + unpackAAAAResource = function(msg, off) { + var _tuple, aaaa, err, msg, off; + aaaa = arrayType$2.zero(); + _tuple = unpackBytes(msg, off, new sliceType(aaaa)); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new AAAAResource.ptr(arrayType$2.zero()), err]; + } + return [new AAAAResource.ptr($clone(aaaa, arrayType$2)), $ifaceNil]; + }; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [$Uint16, $Uint16], false)}]; + ptrType$4.methods = [{prop: "count", name: "count", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [$Uint16], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType], [sliceType], false)}, {prop: "unpack", name: "unpack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, $Int], [$Int, $error], false)}, {prop: "header", name: "header", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Header], false)}]; + ptrType$5.methods = [{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$6.methods = [{prop: "Start", name: "Start", pkg: "", typ: $funcType([sliceType], [Header, $error], false)}, {prop: "checkAdvance", name: "checkAdvance", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [$error], false)}, {prop: "resource", name: "resource", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [Resource, $error], false)}, {prop: "resourceHeader", name: "resourceHeader", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [ResourceHeader, $error], false)}, {prop: "skipResource", name: "skipResource", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [$error], false)}, {prop: "Question", name: "Question", pkg: "", typ: $funcType([], [Question, $error], false)}, {prop: "AllQuestions", name: "AllQuestions", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "SkipQuestion", name: "SkipQuestion", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SkipAllQuestions", name: "SkipAllQuestions", pkg: "", typ: $funcType([], [$error], false)}, {prop: "AnswerHeader", name: "AnswerHeader", pkg: "", typ: $funcType([], [ResourceHeader, $error], false)}, {prop: "Answer", name: "Answer", pkg: "", typ: $funcType([], [Resource, $error], false)}, {prop: "AllAnswers", name: "AllAnswers", pkg: "", typ: $funcType([], [sliceType$2, $error], false)}, {prop: "SkipAnswer", name: "SkipAnswer", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SkipAllAnswers", name: "SkipAllAnswers", pkg: "", typ: $funcType([], [$error], false)}, {prop: "AuthorityHeader", name: "AuthorityHeader", pkg: "", typ: $funcType([], [ResourceHeader, $error], false)}, {prop: "Authority", name: "Authority", pkg: "", typ: $funcType([], [Resource, $error], false)}, {prop: "AllAuthorities", name: "AllAuthorities", pkg: "", typ: $funcType([], [sliceType$2, $error], false)}, {prop: "SkipAuthority", name: "SkipAuthority", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SkipAllAuthorities", name: "SkipAllAuthorities", pkg: "", typ: $funcType([], [$error], false)}, {prop: "AdditionalHeader", name: "AdditionalHeader", pkg: "", typ: $funcType([], [ResourceHeader, $error], false)}, {prop: "Additional", name: "Additional", pkg: "", typ: $funcType([], [Resource, $error], false)}, {prop: "AllAdditionals", name: "AllAdditionals", pkg: "", typ: $funcType([], [sliceType$2, $error], false)}, {prop: "SkipAdditional", name: "SkipAdditional", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SkipAllAdditionals", name: "SkipAllAdditionals", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CNAMEResource", name: "CNAMEResource", pkg: "", typ: $funcType([], [CNAMEResource, $error], false)}, {prop: "MXResource", name: "MXResource", pkg: "", typ: $funcType([], [MXResource, $error], false)}, {prop: "NSResource", name: "NSResource", pkg: "", typ: $funcType([], [NSResource, $error], false)}, {prop: "PTRResource", name: "PTRResource", pkg: "", typ: $funcType([], [PTRResource, $error], false)}, {prop: "SOAResource", name: "SOAResource", pkg: "", typ: $funcType([], [SOAResource, $error], false)}, {prop: "TXTResource", name: "TXTResource", pkg: "", typ: $funcType([], [TXTResource, $error], false)}, {prop: "SRVResource", name: "SRVResource", pkg: "", typ: $funcType([], [SRVResource, $error], false)}, {prop: "AResource", name: "AResource", pkg: "", typ: $funcType([], [AResource, $error], false)}, {prop: "AAAAResource", name: "AAAAResource", pkg: "", typ: $funcType([], [AAAAResource, $error], false)}]; + ptrType$7.methods = [{prop: "EnableCompression", name: "EnableCompression", pkg: "", typ: $funcType([], [], false)}, {prop: "startCheck", name: "startCheck", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([section], [$error], false)}, {prop: "StartQuestions", name: "StartQuestions", pkg: "", typ: $funcType([], [$error], false)}, {prop: "StartAnswers", name: "StartAnswers", pkg: "", typ: $funcType([], [$error], false)}, {prop: "StartAuthorities", name: "StartAuthorities", pkg: "", typ: $funcType([], [$error], false)}, {prop: "StartAdditionals", name: "StartAdditionals", pkg: "", typ: $funcType([], [$error], false)}, {prop: "incrementSectionCount", name: "incrementSectionCount", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [$error], false)}, {prop: "Question", name: "Question", pkg: "", typ: $funcType([Question], [$error], false)}, {prop: "checkResourceSection", name: "checkResourceSection", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [$error], false)}, {prop: "CNAMEResource", name: "CNAMEResource", pkg: "", typ: $funcType([ResourceHeader, CNAMEResource], [$error], false)}, {prop: "MXResource", name: "MXResource", pkg: "", typ: $funcType([ResourceHeader, MXResource], [$error], false)}, {prop: "NSResource", name: "NSResource", pkg: "", typ: $funcType([ResourceHeader, NSResource], [$error], false)}, {prop: "PTRResource", name: "PTRResource", pkg: "", typ: $funcType([ResourceHeader, PTRResource], [$error], false)}, {prop: "SOAResource", name: "SOAResource", pkg: "", typ: $funcType([ResourceHeader, SOAResource], [$error], false)}, {prop: "TXTResource", name: "TXTResource", pkg: "", typ: $funcType([ResourceHeader, TXTResource], [$error], false)}, {prop: "SRVResource", name: "SRVResource", pkg: "", typ: $funcType([ResourceHeader, SRVResource], [$error], false)}, {prop: "AResource", name: "AResource", pkg: "", typ: $funcType([ResourceHeader, AResource], [$error], false)}, {prop: "AAAAResource", name: "AAAAResource", pkg: "", typ: $funcType([ResourceHeader, AAAAResource], [$error], false)}, {prop: "Finish", name: "Finish", pkg: "", typ: $funcType([], [sliceType, $error], false)}]; + ptrType$8.methods = [{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, sliceType, $error], false)}, {prop: "unpack", name: "unpack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, $Int], [$Int, $error], false)}, {prop: "fixLen", name: "fixLen", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, sliceType, $Int], [$error], false)}]; + Name.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$9.methods = [{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}, {prop: "unpack", name: "unpack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, $Int], [$Int, $error], false)}, {prop: "unpackCompressed", name: "unpackCompressed", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, $Int, $Bool], [$Int, $error], false)}]; + ptrType$10.methods = [{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$11.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$12.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$13.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$14.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$15.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$16.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$17.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$18.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + ptrType$19.methods = [{prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}, {prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}]; + nestedError.init("vendor/golang_org/x/net/dns/dnsmessage", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + Header.init("", [{prop: "ID", name: "ID", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Response", name: "Response", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "OpCode", name: "OpCode", embedded: false, exported: true, typ: OpCode, tag: ""}, {prop: "Authoritative", name: "Authoritative", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Truncated", name: "Truncated", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "RecursionDesired", name: "RecursionDesired", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "RecursionAvailable", name: "RecursionAvailable", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "RCode", name: "RCode", embedded: false, exported: true, typ: RCode, tag: ""}]); + header.init("vendor/golang_org/x/net/dns/dnsmessage", [{prop: "id", name: "id", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "bits", name: "bits", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "questions", name: "questions", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "answers", name: "answers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "authorities", name: "authorities", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "additionals", name: "additionals", embedded: false, exported: false, typ: $Uint16, tag: ""}]); + Resource.init("", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: ResourceHeader, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: ResourceBody, tag: ""}]); + ResourceBody.init([{prop: "pack", name: "pack", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([sliceType, mapType, $Int], [sliceType, $error], false)}, {prop: "realType", name: "realType", pkg: "vendor/golang_org/x/net/dns/dnsmessage", typ: $funcType([], [Type], false)}]); + Parser.init("vendor/golang_org/x/net/dns/dnsmessage", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: header, tag: ""}, {prop: "section", name: "section", embedded: false, exported: false, typ: section, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "resHeaderValid", name: "resHeaderValid", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "resHeader", name: "resHeader", embedded: false, exported: false, typ: ResourceHeader, tag: ""}]); + Builder.init("vendor/golang_org/x/net/dns/dnsmessage", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "section", name: "section", embedded: false, exported: false, typ: section, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: header, tag: ""}, {prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "compression", name: "compression", embedded: false, exported: false, typ: mapType, tag: ""}]); + ResourceHeader.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}, {prop: "Class", name: "Class", embedded: false, exported: true, typ: Class, tag: ""}, {prop: "TTL", name: "TTL", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Uint16, tag: ""}]); + Name.init("", [{prop: "Data", name: "Data", embedded: false, exported: true, typ: arrayType, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Uint8, tag: ""}]); + Question.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}, {prop: "Class", name: "Class", embedded: false, exported: true, typ: Class, tag: ""}]); + CNAMEResource.init("", [{prop: "CNAME", name: "CNAME", embedded: false, exported: true, typ: Name, tag: ""}]); + MXResource.init("", [{prop: "Pref", name: "Pref", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "MX", name: "MX", embedded: false, exported: true, typ: Name, tag: ""}]); + NSResource.init("", [{prop: "NS", name: "NS", embedded: false, exported: true, typ: Name, tag: ""}]); + PTRResource.init("", [{prop: "PTR", name: "PTR", embedded: false, exported: true, typ: Name, tag: ""}]); + SOAResource.init("", [{prop: "NS", name: "NS", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "MBox", name: "MBox", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "Serial", name: "Serial", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Refresh", name: "Refresh", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Retry", name: "Retry", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Expire", name: "Expire", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "MinTTL", name: "MinTTL", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + TXTResource.init("", [{prop: "TXT", name: "TXT", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); + SRVResource.init("", [{prop: "Priority", name: "Priority", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Weight", name: "Weight", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Target", name: "Target", embedded: false, exported: true, typ: Name, tag: ""}]); + AResource.init("", [{prop: "A", name: "A", embedded: false, exported: true, typ: arrayType$1, tag: ""}]); + AAAAResource.init("", [{prop: "AAAA", name: "AAAA", embedded: false, exported: true, typ: arrayType$2, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrNotStarted = errors.New("parsing/packing of this type isn't available yet"); + $pkg.ErrSectionDone = errors.New("parsing/packing of this section has completed"); + errBaseLen = errors.New("insufficient data for base length type"); + errCalcLen = errors.New("insufficient data for calculated length type"); + errReserved = errors.New("segment prefix is reserved"); + errTooManyPtr = errors.New("too many pointers (>10)"); + errInvalidPtr = errors.New("invalid pointer"); + errNilResouceBody = errors.New("nil resource body"); + errResourceLen = errors.New("insufficient data for resource body length"); + errSegTooLong = errors.New("segment length too long"); + errZeroSegLen = errors.New("zero length segment"); + errResTooLong = errors.New("resource length too long"); + errTooManyQuestions = errors.New("too many Questions to pack (>65535)"); + errTooManyAnswers = errors.New("too many Answers to pack (>65535)"); + errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)"); + errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)"); + errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)"); + errStringTooLong = errors.New("character string exceeds maximum length (255)"); + errCompressedSRV = errors.New("compressed name in SRV resource data"); + sectionNames = $makeMap(section.keyFor, [{ k: 1, v: "header" }, { k: 2, v: "Question" }, { k: 3, v: "Answer" }, { k: 4, v: "Authority" }, { k: 5, v: "Additional" }]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/route"] = (function() { + var $pkg = {}, $init, errors, os, runtime, syscall, Addr, LinkAddr, Inet4Addr, Inet6Addr, DefaultAddr, binaryLittleEndian, binaryBigEndian, InterfaceMessage, InterfaceAddrMessage, InterfaceMulticastAddrMessage, Message, Sys, SysType, RouteMessage, RIBType, wireFormat, RouteMetrics, InterfaceMetrics, ptrType, sliceType, arrayType, arrayType$1, ptrType$1, ptrType$2, ptrType$3, arrayType$2, sliceType$1, sliceType$2, sliceType$3, ptrType$4, sliceType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$12, funcType, ptrType$13, ptrType$14, littleEndian, bigEndian, errUnsupportedMessage, errMessageMismatch, errMessageTooShort, errInvalidMessage, errInvalidAddr, errShortBuffer, nativeEndian, kernelAlign, wireFormats, zero, zero$24ptr, parseLinkAddr, parseKernelLinkAddr, parseInetAddr, parseKernelInetAddr, parseDefaultAddr, addrsSpace, marshalAddrs, parseAddrs, ParseRIB, FetchRIB, init, roundup, probeRoutingStack, sysctl; + errors = $packages["errors"]; + os = $packages["os"]; + runtime = $packages["runtime"]; + syscall = $packages["syscall"]; + Addr = $pkg.Addr = $newType(8, $kindInterface, "route.Addr", true, "vendor/golang_org/x/net/route", true, null); + LinkAddr = $pkg.LinkAddr = $newType(0, $kindStruct, "route.LinkAddr", true, "vendor/golang_org/x/net/route", true, function(Index_, Name_, Addr_) { + this.$val = this; + if (arguments.length === 0) { + this.Index = 0; + this.Name = ""; + this.Addr = sliceType.nil; + return; + } + this.Index = Index_; + this.Name = Name_; + this.Addr = Addr_; + }); + Inet4Addr = $pkg.Inet4Addr = $newType(0, $kindStruct, "route.Inet4Addr", true, "vendor/golang_org/x/net/route", true, function(IP_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = arrayType.zero(); + return; + } + this.IP = IP_; + }); + Inet6Addr = $pkg.Inet6Addr = $newType(0, $kindStruct, "route.Inet6Addr", true, "vendor/golang_org/x/net/route", true, function(IP_, ZoneID_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = arrayType$1.zero(); + this.ZoneID = 0; + return; + } + this.IP = IP_; + this.ZoneID = ZoneID_; + }); + DefaultAddr = $pkg.DefaultAddr = $newType(0, $kindStruct, "route.DefaultAddr", true, "vendor/golang_org/x/net/route", true, function(af_, Raw_) { + this.$val = this; + if (arguments.length === 0) { + this.af = 0; + this.Raw = sliceType.nil; + return; + } + this.af = af_; + this.Raw = Raw_; + }); + binaryLittleEndian = $pkg.binaryLittleEndian = $newType(0, $kindStruct, "route.binaryLittleEndian", true, "vendor/golang_org/x/net/route", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + binaryBigEndian = $pkg.binaryBigEndian = $newType(0, $kindStruct, "route.binaryBigEndian", true, "vendor/golang_org/x/net/route", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + InterfaceMessage = $pkg.InterfaceMessage = $newType(0, $kindStruct, "route.InterfaceMessage", true, "vendor/golang_org/x/net/route", true, function(Version_, Type_, Flags_, Index_, Name_, Addrs_, extOff_, raw_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.Type = 0; + this.Flags = 0; + this.Index = 0; + this.Name = ""; + this.Addrs = sliceType$1.nil; + this.extOff = 0; + this.raw = sliceType.nil; + return; + } + this.Version = Version_; + this.Type = Type_; + this.Flags = Flags_; + this.Index = Index_; + this.Name = Name_; + this.Addrs = Addrs_; + this.extOff = extOff_; + this.raw = raw_; + }); + InterfaceAddrMessage = $pkg.InterfaceAddrMessage = $newType(0, $kindStruct, "route.InterfaceAddrMessage", true, "vendor/golang_org/x/net/route", true, function(Version_, Type_, Flags_, Index_, Addrs_, raw_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.Type = 0; + this.Flags = 0; + this.Index = 0; + this.Addrs = sliceType$1.nil; + this.raw = sliceType.nil; + return; + } + this.Version = Version_; + this.Type = Type_; + this.Flags = Flags_; + this.Index = Index_; + this.Addrs = Addrs_; + this.raw = raw_; + }); + InterfaceMulticastAddrMessage = $pkg.InterfaceMulticastAddrMessage = $newType(0, $kindStruct, "route.InterfaceMulticastAddrMessage", true, "vendor/golang_org/x/net/route", true, function(Version_, Type_, Flags_, Index_, Addrs_, raw_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.Type = 0; + this.Flags = 0; + this.Index = 0; + this.Addrs = sliceType$1.nil; + this.raw = sliceType.nil; + return; + } + this.Version = Version_; + this.Type = Type_; + this.Flags = Flags_; + this.Index = Index_; + this.Addrs = Addrs_; + this.raw = raw_; + }); + Message = $pkg.Message = $newType(8, $kindInterface, "route.Message", true, "vendor/golang_org/x/net/route", true, null); + Sys = $pkg.Sys = $newType(8, $kindInterface, "route.Sys", true, "vendor/golang_org/x/net/route", true, null); + SysType = $pkg.SysType = $newType(4, $kindInt, "route.SysType", true, "vendor/golang_org/x/net/route", true, null); + RouteMessage = $pkg.RouteMessage = $newType(0, $kindStruct, "route.RouteMessage", true, "vendor/golang_org/x/net/route", true, function(Version_, Type_, Flags_, Index_, ID_, Seq_, Err_, Addrs_, extOff_, raw_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.Type = 0; + this.Flags = 0; + this.Index = 0; + this.ID = 0; + this.Seq = 0; + this.Err = $ifaceNil; + this.Addrs = sliceType$1.nil; + this.extOff = 0; + this.raw = sliceType.nil; + return; + } + this.Version = Version_; + this.Type = Type_; + this.Flags = Flags_; + this.Index = Index_; + this.ID = ID_; + this.Seq = Seq_; + this.Err = Err_; + this.Addrs = Addrs_; + this.extOff = extOff_; + this.raw = raw_; + }); + RIBType = $pkg.RIBType = $newType(4, $kindInt, "route.RIBType", true, "vendor/golang_org/x/net/route", true, null); + wireFormat = $pkg.wireFormat = $newType(0, $kindStruct, "route.wireFormat", true, "vendor/golang_org/x/net/route", false, function(extOff_, bodyOff_, parse_) { + this.$val = this; + if (arguments.length === 0) { + this.extOff = 0; + this.bodyOff = 0; + this.parse = $throwNilPointerError; + return; + } + this.extOff = extOff_; + this.bodyOff = bodyOff_; + this.parse = parse_; + }); + RouteMetrics = $pkg.RouteMetrics = $newType(0, $kindStruct, "route.RouteMetrics", true, "vendor/golang_org/x/net/route", true, function(PathMTU_) { + this.$val = this; + if (arguments.length === 0) { + this.PathMTU = 0; + return; + } + this.PathMTU = PathMTU_; + }); + InterfaceMetrics = $pkg.InterfaceMetrics = $newType(0, $kindStruct, "route.InterfaceMetrics", true, "vendor/golang_org/x/net/route", true, function(Type_, MTU_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = 0; + this.MTU = 0; + return; + } + this.Type = Type_; + this.MTU = MTU_; + }); + ptrType = $ptrType(LinkAddr); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 4); + arrayType$1 = $arrayType($Uint8, 16); + ptrType$1 = $ptrType(Inet4Addr); + ptrType$2 = $ptrType(Inet6Addr); + ptrType$3 = $ptrType(DefaultAddr); + arrayType$2 = $arrayType(Addr, 8); + sliceType$1 = $sliceType(Addr); + sliceType$2 = $sliceType(Sys); + sliceType$3 = $sliceType(Message); + ptrType$4 = $ptrType(wireFormat); + sliceType$4 = $sliceType($Int32); + ptrType$5 = $ptrType($Uint8); + ptrType$6 = $ptrType($Uintptr); + ptrType$7 = $ptrType($Uint32); + ptrType$8 = $ptrType(InterfaceMessage); + ptrType$9 = $ptrType(InterfaceAddrMessage); + ptrType$10 = $ptrType(InterfaceMulticastAddrMessage); + ptrType$12 = $ptrType(RouteMessage); + funcType = $funcType([RIBType, sliceType], [Message, $error], false); + ptrType$13 = $ptrType(RouteMetrics); + ptrType$14 = $ptrType(InterfaceMetrics); + LinkAddr.ptr.prototype.Family = function() { + var a; + a = this; + return 18; + }; + LinkAddr.prototype.Family = function() { return this.$val.Family(); }; + LinkAddr.ptr.prototype.lenAndSpace = function() { + var a, l; + a = this; + l = (8 + a.Name.length >> 0) + a.Addr.$length >> 0; + return [l, roundup(l)]; + }; + LinkAddr.prototype.lenAndSpace = function() { return this.$val.lenAndSpace(); }; + LinkAddr.ptr.prototype.marshal = function(b) { + var _tmp, _tmp$1, _tuple, a, alen, b, data, l, ll, nlen, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; a = $f.a; alen = $f.alen; b = $f.b; data = $f.data; l = $f.l; ll = $f.ll; nlen = $f.nlen; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = this; + _tuple = a.lenAndSpace(); + l = _tuple[0]; + ll = _tuple[1]; + if (b.$length < ll) { + $s = -1; return [0, errShortBuffer]; + } + _tmp = a.Name.length; + _tmp$1 = a.Addr.$length; + nlen = _tmp; + alen = _tmp$1; + if (nlen > 255 || alen > 255) { + $s = -1; return [0, errInvalidAddr]; + } + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((l << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = 18); + /* */ if (a.Index > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (a.Index > 0) { */ case 1: + $r = nativeEndian.PutUint16($subslice(b, 2, 4), ((a.Index << 16 >>> 16))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + data = $subslice(b, 8); + if (nlen > 0) { + (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5] = ((nlen << 24 >>> 24))); + $copySlice($subslice(data, 0, nlen), a.Addr); + data = $subslice(data, nlen); + } + if (alen > 0) { + (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6] = ((alen << 24 >>> 24))); + $copyString($subslice(data, 0, alen), a.Name); + data = $subslice(data, alen); + } + $s = -1; return [ll, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: LinkAddr.ptr.prototype.marshal }; } $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.a = a; $f.alen = alen; $f.b = b; $f.data = data; $f.l = l; $f.ll = ll; $f.nlen = nlen; $f.$s = $s; $f.$r = $r; return $f; + }; + LinkAddr.prototype.marshal = function(b) { return this.$val.marshal(b); }; + parseLinkAddr = function(b) { + var _r, _tuple, a, b, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; a = $f.a; b = $f.b; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (b.$length < 8) { + $s = -1; return [$ifaceNil, errInvalidAddr]; + } + _tuple = parseKernelLinkAddr(18, $subslice(b, 4)); + a = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + _r = nativeEndian.Uint16($subslice(b, 2, 4)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $assertType(a, ptrType).Index = ((_r >> 0)); + $s = -1; return [a, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseLinkAddr }; } $f._r = _r; $f._tuple = _tuple; $f.a = a; $f.b = b; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + parseKernelLinkAddr = function(param, b) { + var _tmp, _tmp$1, _tmp$2, addr, alen, b, data, l, name, nlen, param, slen; + _tmp = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); + _tmp$1 = (((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >> 0)); + _tmp$2 = (((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)); + nlen = _tmp; + alen = _tmp$1; + slen = _tmp$2; + if (nlen === 255) { + nlen = 0; + } + if (alen === 255) { + alen = 0; + } + if (slen === 255) { + slen = 0; + } + l = ((4 + nlen >> 0) + alen >> 0) + slen >> 0; + if (b.$length < l) { + return [0, $ifaceNil, errInvalidAddr]; + } + data = $subslice(b, 4); + name = ""; + addr = sliceType.nil; + if (nlen > 0) { + name = ($bytesToString($subslice(data, 0, nlen))); + data = $subslice(data, nlen); + } + if (alen > 0) { + addr = $subslice(data, 0, alen); + data = $subslice(data, alen); + } + return [l, new LinkAddr.ptr(0, name, addr), $ifaceNil]; + }; + Inet4Addr.ptr.prototype.Family = function() { + var a; + a = this; + return 2; + }; + Inet4Addr.prototype.Family = function() { return this.$val.Family(); }; + Inet4Addr.ptr.prototype.lenAndSpace = function() { + var a; + a = this; + return [16, roundup(16)]; + }; + Inet4Addr.prototype.lenAndSpace = function() { return this.$val.lenAndSpace(); }; + Inet4Addr.ptr.prototype.marshal = function(b) { + var _tuple, a, b, l, ll; + a = this; + _tuple = a.lenAndSpace(); + l = _tuple[0]; + ll = _tuple[1]; + if (b.$length < ll) { + return [0, errShortBuffer]; + } + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((l << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = 2); + $copySlice($subslice(b, 4, 8), new sliceType(a.IP)); + return [ll, $ifaceNil]; + }; + Inet4Addr.prototype.marshal = function(b) { return this.$val.marshal(b); }; + Inet6Addr.ptr.prototype.Family = function() { + var a; + a = this; + return 30; + }; + Inet6Addr.prototype.Family = function() { return this.$val.Family(); }; + Inet6Addr.ptr.prototype.lenAndSpace = function() { + var a; + a = this; + return [28, roundup(28)]; + }; + Inet6Addr.prototype.lenAndSpace = function() { return this.$val.lenAndSpace(); }; + Inet6Addr.ptr.prototype.marshal = function(b) { + var _tuple, a, b, l, ll, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; a = $f.a; b = $f.b; l = $f.l; ll = $f.ll; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = this; + _tuple = a.lenAndSpace(); + l = _tuple[0]; + ll = _tuple[1]; + if (b.$length < ll) { + $s = -1; return [0, errShortBuffer]; + } + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((l << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = 30); + $copySlice($subslice(b, 8, 24), new sliceType(a.IP)); + /* */ if (a.ZoneID > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (a.ZoneID > 0) { */ case 1: + $r = nativeEndian.PutUint32($subslice(b, 24, 28), ((a.ZoneID >>> 0))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return [ll, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Inet6Addr.ptr.prototype.marshal }; } $f._tuple = _tuple; $f.a = a; $f.b = b; $f.l = l; $f.ll = ll; $f.$s = $s; $f.$r = $r; return $f; + }; + Inet6Addr.prototype.marshal = function(b) { return this.$val.marshal(b); }; + parseInetAddr = function(af, b) { + var _1, _r, _tmp, _tmp$1, a, a$1, af, b, id, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; a = $f.a; a$1 = $f.a$1; af = $f.af; b = $f.b; id = $f.id; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = af; + /* */ if (_1 === (2)) { $s = 2; continue; } + /* */ if (_1 === (30)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === (2)) { */ case 2: + if (b.$length < 16) { + $s = -1; return [$ifaceNil, errInvalidAddr]; + } + a = new Inet4Addr.ptr(arrayType.zero()); + $copySlice(new sliceType(a.IP), $subslice(b, 4, 8)); + $s = -1; return [a, $ifaceNil]; + /* } else if (_1 === (30)) { */ case 3: + if (b.$length < 28) { + $s = -1; return [$ifaceNil, errInvalidAddr]; + } + _r = nativeEndian.Uint32($subslice(b, 24, 28)); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + a$1 = new Inet6Addr.ptr(arrayType$1.zero(), ((_r >> 0))); + $copySlice(new sliceType(a$1.IP), $subslice(b, 8, 24)); + if ((a$1.IP[0] === 254) && (((a$1.IP[1] & 192) >>> 0) === 128) || (a$1.IP[0] === 255) && ((((a$1.IP[1] & 15) >>> 0) === 1) || (((a$1.IP[1] & 15) >>> 0) === 2))) { + id = (($clone(bigEndian, binaryBigEndian).Uint16($subslice(new sliceType(a$1.IP), 2, 4)) >> 0)); + if (!((id === 0))) { + a$1.ZoneID = id; + _tmp = 0; + _tmp$1 = 0; + a$1.IP[2] = _tmp; + a$1.IP[3] = _tmp$1; + } + } + $s = -1; return [a$1, $ifaceNil]; + /* } else { */ case 4: + $s = -1; return [$ifaceNil, errInvalidAddr]; + /* } */ case 5: + case 1: + $s = -1; return [$ifaceNil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseInetAddr }; } $f._1 = _1; $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.a = a; $f.a$1 = a$1; $f.af = af; $f.b = b; $f.id = id; $f.$s = $s; $f.$r = $r; return $f; + }; + parseKernelInetAddr = function(af, b) { + var a, a$1, a$2, a$3, af, b, l; + l = (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)); + if (true) { + if ((l === 0) || b.$length > roundup(l)) { + l = roundup(l); + } + } else { + l = roundup(l); + } + if (b.$length < l) { + return [0, $ifaceNil, errInvalidAddr]; + } + if (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 28)) { + a = new Inet6Addr.ptr(arrayType$1.zero(), 0); + $copySlice(new sliceType(a.IP), $subslice(b, 8, 24)); + return [(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)), a, $ifaceNil]; + } else if ((af === 30)) { + a$1 = new Inet6Addr.ptr(arrayType$1.zero(), 0); + if ((l - 1 >> 0) < 8) { + $copySlice(new sliceType(a$1.IP), $subslice(b, 1, l)); + } else { + $copySlice(new sliceType(a$1.IP), $subslice(b, (l - 8 >> 0), l)); + } + return [(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)), a$1, $ifaceNil]; + } else if (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 16)) { + a$2 = new Inet4Addr.ptr(arrayType.zero()); + $copySlice(new sliceType(a$2.IP), $subslice(b, 4, 8)); + return [(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)), a$2, $ifaceNil]; + } else { + a$3 = new Inet4Addr.ptr(arrayType.zero()); + if ((l - 1 >> 0) < 4) { + $copySlice(new sliceType(a$3.IP), $subslice(b, 1, l)); + } else { + $copySlice(new sliceType(a$3.IP), $subslice(b, (l - 4 >> 0), l)); + } + return [(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)), a$3, $ifaceNil]; + } + }; + DefaultAddr.ptr.prototype.Family = function() { + var a; + a = this; + return a.af; + }; + DefaultAddr.prototype.Family = function() { return this.$val.Family(); }; + DefaultAddr.ptr.prototype.lenAndSpace = function() { + var a, l; + a = this; + l = a.Raw.$length; + return [l, roundup(l)]; + }; + DefaultAddr.prototype.lenAndSpace = function() { return this.$val.lenAndSpace(); }; + DefaultAddr.ptr.prototype.marshal = function(b) { + var _tuple, a, b, l, ll; + a = this; + _tuple = a.lenAndSpace(); + l = _tuple[0]; + ll = _tuple[1]; + if (b.$length < ll) { + return [0, errShortBuffer]; + } + if (l > 255) { + return [0, errInvalidAddr]; + } + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = ((l << 24 >>> 24))); + $copySlice($subslice(b, 0, l), a.Raw); + return [ll, $ifaceNil]; + }; + DefaultAddr.prototype.marshal = function(b) { return this.$val.marshal(b); }; + parseDefaultAddr = function(b) { + var a, b; + if (b.$length < 2 || b.$length < (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))) { + return [$ifaceNil, errInvalidAddr]; + } + a = new DefaultAddr.ptr((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)), $subslice(b, 0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); + return [a, $ifaceNil]; + }; + addrsSpace = function(as) { + var _i, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, a, a$1, a$2, a$3, a$4, as, l, ll, ll$1, ll$2, ll$3; + l = 0; + _ref = as; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + a = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = a; + if ($assertType(_ref$1, ptrType, true)[1]) { + a$1 = _ref$1.$val; + _tuple = a$1.lenAndSpace(); + ll = _tuple[1]; + l = l + (ll) >> 0; + } else if ($assertType(_ref$1, ptrType$1, true)[1]) { + a$2 = _ref$1.$val; + _tuple$1 = a$2.lenAndSpace(); + ll$1 = _tuple$1[1]; + l = l + (ll$1) >> 0; + } else if ($assertType(_ref$1, ptrType$2, true)[1]) { + a$3 = _ref$1.$val; + _tuple$2 = a$3.lenAndSpace(); + ll$2 = _tuple$2[1]; + l = l + (ll$2) >> 0; + } else if ($assertType(_ref$1, ptrType$3, true)[1]) { + a$4 = _ref$1.$val; + _tuple$3 = a$4.lenAndSpace(); + ll$3 = _tuple$3[1]; + l = l + (ll$3) >> 0; + } + _i++; + } + return l; + }; + marshalAddrs = function(b, as) { + var _i, _r, _r$1, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, a, a$1, a$2, a$3, a$4, as, attrs, b, err, err$1, err$2, err$3, i, l, l$1, l$2, l$3, y, y$1, y$2, y$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; a = $f.a; a$1 = $f.a$1; a$2 = $f.a$2; a$3 = $f.a$3; a$4 = $f.a$4; as = $f.as; attrs = $f.attrs; b = $f.b; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; i = $f.i; l = $f.l; l$1 = $f.l$1; l$2 = $f.l$2; l$3 = $f.l$3; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; y$3 = $f.y$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + attrs = 0; + _ref = as; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + a = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = a; + /* */ if ($assertType(_ref$1, ptrType, true)[1]) { $s = 3; continue; } + /* */ if ($assertType(_ref$1, ptrType$1, true)[1]) { $s = 4; continue; } + /* */ if ($assertType(_ref$1, ptrType$2, true)[1]) { $s = 5; continue; } + /* */ if ($assertType(_ref$1, ptrType$3, true)[1]) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ($assertType(_ref$1, ptrType, true)[1]) { */ case 3: + a$1 = _ref$1.$val; + _r = a$1.marshal(b); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + l = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [0, err]; + } + b = $subslice(b, l); + attrs = (attrs | (((y = ((i >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0; + $s = 7; continue; + /* } else if ($assertType(_ref$1, ptrType$1, true)[1]) { */ case 4: + a$2 = _ref$1.$val; + _tuple$1 = a$2.marshal(b); + l$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [0, err$1]; + } + b = $subslice(b, l$1); + attrs = (attrs | (((y$1 = ((i >>> 0)), y$1 < 32 ? (1 << y$1) : 0) >>> 0))) >>> 0; + $s = 7; continue; + /* } else if ($assertType(_ref$1, ptrType$2, true)[1]) { */ case 5: + a$3 = _ref$1.$val; + _r$1 = a$3.marshal(b); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + l$2 = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [0, err$2]; + } + b = $subslice(b, l$2); + attrs = (attrs | (((y$2 = ((i >>> 0)), y$2 < 32 ? (1 << y$2) : 0) >>> 0))) >>> 0; + $s = 7; continue; + /* } else if ($assertType(_ref$1, ptrType$3, true)[1]) { */ case 6: + a$4 = _ref$1.$val; + _tuple$3 = a$4.marshal(b); + l$3 = _tuple$3[0]; + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return [0, err$3]; + } + b = $subslice(b, l$3); + attrs = (attrs | (((y$3 = ((i >>> 0)), y$3 < 32 ? (1 << y$3) : 0) >>> 0))) >>> 0; + /* } */ case 7: + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return [attrs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: marshalAddrs }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.a = a; $f.a$1 = a$1; $f.a$2 = a$2; $f.a$3 = a$3; $f.a$4 = a$4; $f.as = as; $f.attrs = attrs; $f.b = b; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.i = i; $f.l = l; $f.l$1 = l$1; $f.l$2 = l$2; $f.l$3 = l$3; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.y$3 = y$3; $f.$s = $s; $f.$r = $r; return $f; + }; + parseAddrs = function(attrs, fn, b) { + var _1, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, a, a$1, a$2, a$3, af, as, attrs, b, err, err$1, err$2, err$3, fn, i, l, l$1, l$2, l$3, ll, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; a = $f.a; a$1 = $f.a$1; a$2 = $f.a$2; a$3 = $f.a$3; af = $f.af; as = $f.as; attrs = $f.attrs; b = $f.b; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; fn = $f.fn; i = $f.i; l = $f.l; l$1 = $f.l$1; l$2 = $f.l$2; l$3 = $f.l$3; ll = $f.ll; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + as = arrayType$2.zero(); + af = 0; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < 8 && b.$length >= roundup(0))) { break; } */ if(!(i < 8 && b.$length >= roundup(0))) { $s = 2; continue; } + /* */ if (((attrs & (((y = i, y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (((attrs & (((y = i, y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0) { */ case 3: + i = i + (1) >>> 0; + /* continue; */ $s = 1; continue; + /* } */ case 4: + /* */ if (i <= 7) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (i <= 7) { */ case 5: + _1 = (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]); + /* */ if (_1 === (18)) { $s = 9; continue; } + /* */ if ((_1 === (2)) || (_1 === (30))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_1 === (18)) { */ case 9: + _r = parseLinkAddr(b); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + a = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err]; + } + ((i < 0 || i >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[i] = a); + l = roundup((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))); + if (b.$length < l) { + $s = -1; return [sliceType$1.nil, errMessageTooShort]; + } + b = $subslice(b, l); + $s = 12; continue; + /* } else if ((_1 === (2)) || (_1 === (30))) { */ case 10: + af = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); + _r$1 = parseInetAddr(af, b); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + a$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err$1]; + } + ((i < 0 || i >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[i] = a$1); + l$1 = roundup((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))); + if (b.$length < l$1) { + $s = -1; return [sliceType$1.nil, errMessageTooShort]; + } + b = $subslice(b, l$1); + $s = 12; continue; + /* } else { */ case 11: + _r$2 = fn(af, b); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + l$2 = _tuple$2[0]; + a$2 = _tuple$2[1]; + err$2 = _tuple$2[2]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err$2]; + } + ((i < 0 || i >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[i] = a$2); + ll = roundup(l$2); + if (b.$length < ll) { + b = $subslice(b, l$2); + } else { + b = $subslice(b, ll); + } + /* } */ case 12: + case 8: + $s = 7; continue; + /* } else { */ case 6: + _tuple$3 = parseDefaultAddr(b); + a$3 = _tuple$3[0]; + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return [sliceType$1.nil, err$3]; + } + ((i < 0 || i >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[i] = a$3); + l$3 = roundup((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))); + if (b.$length < l$3) { + $s = -1; return [sliceType$1.nil, errMessageTooShort]; + } + b = $subslice(b, l$3); + /* } */ case 7: + i = i + (1) >>> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return [new sliceType$1(as), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseAddrs }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.a = a; $f.a$1 = a$1; $f.a$2 = a$2; $f.a$3 = a$3; $f.af = af; $f.as = as; $f.attrs = attrs; $f.b = b; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.fn = fn; $f.i = i; $f.l = l; $f.l$1 = l$1; $f.l$2 = l$2; $f.l$3 = l$3; $f.ll = ll; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + binaryLittleEndian.ptr.prototype.Uint16 = function(b) { + var b; + $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); + return ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) << 16 >>> 16)) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; + }; + binaryLittleEndian.prototype.Uint16 = function(b) { return this.$val.Uint16(b); }; + binaryLittleEndian.ptr.prototype.PutUint16 = function(b, v) { + var b, v; + $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 8 << 16 >>> 16) << 24 >>> 24))); + }; + binaryLittleEndian.prototype.PutUint16 = function(b, v) { return this.$val.PutUint16(b, v); }; + binaryLittleEndian.ptr.prototype.Uint32 = function(b) { + var b; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + return ((((((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0; + }; + binaryLittleEndian.prototype.Uint32 = function(b) { return this.$val.Uint32(b); }; + binaryLittleEndian.ptr.prototype.PutUint32 = function(b, v) { + var b, v; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 8 >>> 0) << 24 >>> 24))); + (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (((v >>> 16 >>> 0) << 24 >>> 24))); + (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = (((v >>> 24 >>> 0) << 24 >>> 24))); + }; + binaryLittleEndian.prototype.PutUint32 = function(b, v) { return this.$val.PutUint32(b, v); }; + binaryLittleEndian.ptr.prototype.Uint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), x$7 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + }; + binaryLittleEndian.prototype.Uint64 = function(b) { return this.$val.Uint64(b); }; + binaryBigEndian.ptr.prototype.Uint16 = function(b) { + var b; + $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); + return ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) << 16 >>> 16)) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; + }; + binaryBigEndian.prototype.Uint16 = function(b) { return this.$val.Uint16(b); }; + binaryBigEndian.ptr.prototype.PutUint16 = function(b, v) { + var b, v; + $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (((v >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = ((v << 24 >>> 24))); + }; + binaryBigEndian.prototype.PutUint16 = function(b, v) { return this.$val.PutUint16(b, v); }; + binaryBigEndian.ptr.prototype.Uint32 = function(b) { + var b; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + return ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; + }; + binaryBigEndian.prototype.Uint32 = function(b) { return this.$val.Uint32(b); }; + binaryBigEndian.ptr.prototype.PutUint32 = function(b, v) { + var b, v; + $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); + (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (((v >>> 24 >>> 0) << 24 >>> 24))); + (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 16 >>> 0) << 24 >>> 24))); + (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (((v >>> 8 >>> 0) << 24 >>> 24))); + (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = ((v << 24 >>> 24))); + }; + binaryBigEndian.prototype.PutUint32 = function(b, v) { return this.$val.PutUint32(b, v); }; + binaryBigEndian.ptr.prototype.Uint64 = function(b) { + var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); + return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + }; + binaryBigEndian.prototype.Uint64 = function(b) { return this.$val.Uint64(b); }; + InterfaceAddrMessage.ptr.prototype.Sys = function() { + var m; + m = this; + return sliceType$2.nil; + }; + InterfaceAddrMessage.prototype.Sys = function() { return this.$val.Sys(); }; + InterfaceMulticastAddrMessage.ptr.prototype.Sys = function() { + var m; + m = this; + return sliceType$2.nil; + }; + InterfaceMulticastAddrMessage.prototype.Sys = function() { return this.$val.Sys(); }; + wireFormat.ptr.prototype.parseInterfaceMessage = function(param, b) { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, a, attrs, b, err, l, m, param, w, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; a = $f.a; attrs = $f.attrs; b = $f.b; err = $f.err; l = $f.l; m = $f.m; param = $f.param; w = $f.w; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + if (b.$length < w.bodyOff) { + $s = -1; return [$ifaceNil, errMessageTooShort]; + } + _r = nativeEndian.Uint16($subslice(b, 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + l = ((_r >> 0)); + if (b.$length < l) { + $s = -1; return [$ifaceNil, errInvalidMessage]; + } + _r$1 = nativeEndian.Uint32($subslice(b, 4, 8)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + attrs = ((_r$1 >>> 0)); + if (((attrs & 16) >>> 0) === 0) { + $s = -1; return [$ifaceNil, $ifaceNil]; + } + _r$2 = nativeEndian.Uint32($subslice(b, 8, 12)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = nativeEndian.Uint16($subslice(b, 12, 14)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + m = new InterfaceMessage.ptr((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >> 0)), (((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)), ((_r$2 >> 0)), ((_r$3 >> 0)), "", $makeSlice(sliceType$1, 8), w.extOff, $subslice(b, 0, l)); + _r$4 = parseLinkAddr($subslice(b, w.bodyOff)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + a = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + (x = m.Addrs, (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = a)); + m.Name = $assertType(a, ptrType).Name; + $s = -1; return [m, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: wireFormat.ptr.prototype.parseInterfaceMessage }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.a = a; $f.attrs = attrs; $f.b = b; $f.err = err; $f.l = l; $f.m = m; $f.param = param; $f.w = w; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + wireFormat.prototype.parseInterfaceMessage = function(param, b) { return this.$val.parseInterfaceMessage(param, b); }; + wireFormat.ptr.prototype.parseInterfaceAddrMessage = function(param, b) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, b, err, l, m, param, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; b = $f.b; err = $f.err; l = $f.l; m = $f.m; param = $f.param; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + if (b.$length < w.bodyOff) { + $s = -1; return [$ifaceNil, errMessageTooShort]; + } + _r = nativeEndian.Uint16($subslice(b, 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + l = ((_r >> 0)); + if (b.$length < l) { + $s = -1; return [$ifaceNil, errInvalidMessage]; + } + _r$1 = nativeEndian.Uint32($subslice(b, 8, 12)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + m = new InterfaceAddrMessage.ptr((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >> 0)), (((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)), ((_r$1 >> 0)), 0, sliceType$1.nil, $subslice(b, 0, l)); + /* */ if (false) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (false) { */ case 3: + _r$2 = nativeEndian.Uint16($subslice(b, 16, 18)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + m.Index = ((_r$2 >> 0)); + $s = 5; continue; + /* } else { */ case 4: + _r$3 = nativeEndian.Uint16($subslice(b, 12, 14)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + m.Index = ((_r$3 >> 0)); + /* } */ case 5: + err = $ifaceNil; + _r$4 = nativeEndian.Uint32($subslice(b, 4, 8)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = parseAddrs(((_r$4 >>> 0)), parseKernelInetAddr, $subslice(b, w.bodyOff)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple = _r$5; + m.Addrs = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + $s = -1; return [m, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: wireFormat.ptr.prototype.parseInterfaceAddrMessage }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.l = l; $f.m = m; $f.param = param; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + wireFormat.prototype.parseInterfaceAddrMessage = function(param, b) { return this.$val.parseInterfaceAddrMessage(param, b); }; + wireFormat.ptr.prototype.parseInterfaceMulticastAddrMessage = function(param, b) { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, b, err, l, m, param, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; b = $f.b; err = $f.err; l = $f.l; m = $f.m; param = $f.param; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + if (b.$length < w.bodyOff) { + $s = -1; return [$ifaceNil, errMessageTooShort]; + } + _r = nativeEndian.Uint16($subslice(b, 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + l = ((_r >> 0)); + if (b.$length < l) { + $s = -1; return [$ifaceNil, errInvalidMessage]; + } + _r$1 = nativeEndian.Uint32($subslice(b, 8, 12)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = nativeEndian.Uint16($subslice(b, 12, 14)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + m = new InterfaceMulticastAddrMessage.ptr((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >> 0)), (((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)), ((_r$1 >> 0)), ((_r$2 >> 0)), sliceType$1.nil, $subslice(b, 0, l)); + err = $ifaceNil; + _r$3 = nativeEndian.Uint32($subslice(b, 4, 8)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = parseAddrs(((_r$3 >>> 0)), parseKernelInetAddr, $subslice(b, w.bodyOff)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + m.Addrs = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + $s = -1; return [m, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: wireFormat.ptr.prototype.parseInterfaceMulticastAddrMessage }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.l = l; $f.m = m; $f.param = param; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + wireFormat.prototype.parseInterfaceMulticastAddrMessage = function(param, b) { return this.$val.parseInterfaceMulticastAddrMessage(param, b); }; + ParseRIB = function(typ, b) { + var _entry, _r, _r$1, _tmp, _tmp$1, _tuple, _tuple$1, b, err, l, m, msgs, nmsgs, nskips, ok, typ, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; err = $f.err; l = $f.l; m = $f.m; msgs = $f.msgs; nmsgs = $f.nmsgs; nskips = $f.nskips; ok = $f.ok; typ = $f.typ; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (!new RIBType(typ).parseable()) { + $s = -1; return [sliceType$3.nil, errUnsupportedMessage]; + } + msgs = sliceType$3.nil; + _tmp = 0; + _tmp$1 = 0; + nmsgs = _tmp; + nskips = _tmp$1; + /* while (true) { */ case 1: + /* if (!(b.$length > 4)) { break; } */ if(!(b.$length > 4)) { $s = 2; continue; } + nmsgs = nmsgs + (1) >> 0; + _r = nativeEndian.Uint16($subslice(b, 0, 2)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + l = ((_r >> 0)); + if (l === 0) { + $s = -1; return [sliceType$3.nil, errInvalidMessage]; + } + if (b.$length < l) { + $s = -1; return [sliceType$3.nil, errMessageTooShort]; + } + /* */ if (!(((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) === 5))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) === 5))) { */ case 4: + b = $subslice(b, l); + /* continue; */ $s = 1; continue; + /* } */ case 5: + _tuple = (_entry = wireFormats[$Int.keyFor((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)))], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + w = _tuple[0]; + ok = _tuple[1]; + /* */ if (!ok) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!ok) { */ case 6: + nskips = nskips + (1) >> 0; + $s = 8; continue; + /* } else { */ case 7: + _r$1 = w.parse(typ, b); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + m = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$3.nil, err]; + } + if ($interfaceIsEqual(m, $ifaceNil)) { + nskips = nskips + (1) >> 0; + } else { + msgs = $append(msgs, m); + } + /* } */ case 8: + b = $subslice(b, l); + /* } */ $s = 1; continue; case 2: + if (!((nmsgs === (msgs.$length + nskips >> 0)))) { + $s = -1; return [sliceType$3.nil, errMessageMismatch]; + } + $s = -1; return [msgs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParseRIB }; } $f._entry = _entry; $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.err = err; $f.l = l; $f.m = m; $f.msgs = msgs; $f.nmsgs = nmsgs; $f.nskips = nskips; $f.ok = ok; $f.typ = typ; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParseRIB = ParseRIB; + RouteMessage.ptr.prototype.Marshal = function() { + var _r, m, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; m = $f.m; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _r = m.marshal(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: RouteMessage.ptr.prototype.Marshal }; } $f._r = _r; $f.m = m; $f.$s = $s; $f.$r = $r; return $f; + }; + RouteMessage.prototype.Marshal = function() { return this.$val.Marshal(); }; + FetchRIB = function(af, typ, arg) { + var af, arg, b, err, err$1, mib, n, n$24ptr, typ; + mib = $toNativeArray($kindInt32, [4, 17, 0, ((af >> 0)), ((typ >> 0)), ((arg >> 0))]); + n = 0; + err = sysctl(new sliceType$4(mib), ptrType$5.nil, (n$24ptr || (n$24ptr = new ptrType$6(function() { return n; }, function($v) { n = $v; }))), ptrType$5.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType.nil, os.NewSyscallError("sysctl", err)]; + } + if (n === 0) { + return [sliceType.nil, $ifaceNil]; + } + b = $makeSlice(sliceType, n); + err$1 = sysctl(new sliceType$4(mib), $indexPtr(b.$array, b.$offset + 0, ptrType$5), (n$24ptr || (n$24ptr = new ptrType$6(function() { return n; }, function($v) { n = $v; }))), ptrType$5.nil, 0); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [sliceType.nil, os.NewSyscallError("sysctl", err$1)]; + } + return [$subslice(b, 0, n), $ifaceNil]; + }; + $pkg.FetchRIB = FetchRIB; + RouteMessage.ptr.prototype.marshal = function() { + var _entry, _r, _tuple, _tuple$1, attrs, b, err, l, m, ok, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; attrs = $f.attrs; b = $f.b; err = $f.err; l = $f.l; m = $f.m; ok = $f.ok; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _tuple = (_entry = wireFormats[$Int.keyFor(m.Type)], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); + w = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [sliceType.nil, errUnsupportedMessage]; + } + l = w.bodyOff + addrsSpace(m.Addrs) >> 0; + if (true) { + l = l + (1024) >> 0; + } + b = $makeSlice(sliceType, l); + $r = nativeEndian.PutUint16($subslice(b, 0, 2), ((l << 16 >>> 16))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (m.Version === 0) { + (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = 5); + } else { + (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = ((m.Version << 24 >>> 24))); + } + (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = ((m.Type << 24 >>> 24))); + $r = nativeEndian.PutUint32($subslice(b, 8, 12), ((m.Flags >>> 0))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nativeEndian.PutUint16($subslice(b, 4, 6), ((m.Index << 16 >>> 16))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nativeEndian.PutUint32($subslice(b, 16, 20), ((m.ID >>> 0))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nativeEndian.PutUint32($subslice(b, 20, 24), ((m.Seq >>> 0))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = marshalAddrs($subslice(b, w.bodyOff), m.Addrs); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + attrs = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + /* */ if (attrs > 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (attrs > 0) { */ case 7: + $r = nativeEndian.PutUint32($subslice(b, 12, 16), ((attrs >>> 0))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + $s = -1; return [b, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: RouteMessage.ptr.prototype.marshal }; } $f._entry = _entry; $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.attrs = attrs; $f.b = b; $f.err = err; $f.l = l; $f.m = m; $f.ok = ok; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + RouteMessage.prototype.marshal = function() { return this.$val.marshal(); }; + wireFormat.ptr.prototype.parseRouteMessage = function(typ, b) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, b, err, errno, l, m, typ, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; b = $f.b; err = $f.err; errno = $f.errno; l = $f.l; m = $f.m; typ = $f.typ; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + if (b.$length < w.bodyOff) { + $s = -1; return [$ifaceNil, errMessageTooShort]; + } + _r = nativeEndian.Uint16($subslice(b, 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + l = ((_r >> 0)); + if (b.$length < l) { + $s = -1; return [$ifaceNil, errInvalidMessage]; + } + _r$1 = nativeEndian.Uint32($subslice(b, 8, 12)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = nativeEndian.Uint16($subslice(b, 4, 6)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = nativeEndian.Uint32($subslice(b, 16, 20)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = nativeEndian.Uint32($subslice(b, 20, 24)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + m = new RouteMessage.ptr((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >> 0)), (((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)), ((_r$1 >> 0)), ((_r$2 >> 0)), ((_r$3 >>> 0)), ((_r$4 >> 0)), $ifaceNil, sliceType$1.nil, w.extOff, $subslice(b, 0, l)); + _r$5 = nativeEndian.Uint32($subslice(b, 28, 32)); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + errno = ((_r$5 >>> 0)); + if (!((errno === 0))) { + m.Err = new syscall.Errno(errno); + } + err = $ifaceNil; + _r$6 = nativeEndian.Uint32($subslice(b, 12, 16)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = parseAddrs(((_r$6 >>> 0)), parseKernelInetAddr, $subslice(b, w.bodyOff)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple = _r$7; + m.Addrs = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + $s = -1; return [m, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: wireFormat.ptr.prototype.parseRouteMessage }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.errno = errno; $f.l = l; $f.m = m; $f.typ = typ; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + wireFormat.prototype.parseRouteMessage = function(typ, b) { return this.$val.parseRouteMessage(typ, b); }; + init = function() { + var _tuple, b, i, i$24ptr; + i = 1; + b = (((i$24ptr || (i$24ptr = new ptrType$7(function() { return i; }, function($v) { i = $v; }))))); + if ((b.nilCheck, b[0]) === 1) { + nativeEndian = new littleEndian.constructor.elem(littleEndian); + } else { + nativeEndian = new bigEndian.constructor.elem(bigEndian); + } + _tuple = probeRoutingStack(); + kernelAlign = _tuple[0]; + wireFormats = _tuple[1]; + }; + roundup = function(l) { + var l; + if (l === 0) { + return kernelAlign; + } + return (((l + kernelAlign >> 0) - 1 >> 0)) & (~((kernelAlign - 1 >> 0)) >> 0); + }; + RIBType.prototype.parseable = function() { + var _1, typ; + typ = this.$val; + _1 = typ; + if ((_1 === (4)) || (_1 === (5))) { + return false; + } else { + return true; + } + }; + $ptrType(RIBType).prototype.parseable = function() { return new RIBType(this.$get()).parseable(); }; + RouteMetrics.ptr.prototype.SysType = function() { + var rmx; + rmx = this; + return 0; + }; + RouteMetrics.prototype.SysType = function() { return this.$val.SysType(); }; + RouteMessage.ptr.prototype.Sys = function() { + var _r, m, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; m = $f.m; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _r = nativeEndian.Uint32($subslice(m.raw, (m.extOff + 4 >> 0), (m.extOff + 8 >> 0))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return new sliceType$2([new RouteMetrics.ptr(((_r >> 0)))]); + /* */ } return; } if ($f === undefined) { $f = { $blk: RouteMessage.ptr.prototype.Sys }; } $f._r = _r; $f.m = m; $f.$s = $s; $f.$r = $r; return $f; + }; + RouteMessage.prototype.Sys = function() { return this.$val.Sys(); }; + InterfaceMetrics.ptr.prototype.SysType = function() { + var imx; + imx = this; + return 0; + }; + InterfaceMetrics.prototype.SysType = function() { return this.$val.SysType(); }; + InterfaceMessage.ptr.prototype.Sys = function() { + var _r, m, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; m = $f.m; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + m = this; + _r = nativeEndian.Uint32($subslice(m.raw, (m.extOff + 8 >> 0), (m.extOff + 12 >> 0))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return new sliceType$2([new InterfaceMetrics.ptr((((x = m.raw, x$1 = m.extOff, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) >> 0)), ((_r >> 0)))]); + /* */ } return; } if ($f === undefined) { $f = { $blk: InterfaceMessage.ptr.prototype.Sys }; } $f._r = _r; $f.m = m; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + InterfaceMessage.prototype.Sys = function() { return this.$val.Sys(); }; + probeRoutingStack = function() { + var ifam, ifm, ifm2, ifmam, ifmam2, rtm, rtm2; + rtm = new wireFormat.ptr(36, 92, $throwNilPointerError); + rtm.parse = $methodVal(rtm, "parseRouteMessage"); + rtm2 = new wireFormat.ptr(36, 92, $throwNilPointerError); + rtm2.parse = $methodVal(rtm2, "parseRouteMessage"); + ifm = new wireFormat.ptr(16, 112, $throwNilPointerError); + ifm.parse = $methodVal(ifm, "parseInterfaceMessage"); + ifm2 = new wireFormat.ptr(32, 160, $throwNilPointerError); + ifm2.parse = $methodVal(ifm2, "parseInterfaceMessage"); + ifam = new wireFormat.ptr(20, 20, $throwNilPointerError); + ifam.parse = $methodVal(ifam, "parseInterfaceAddrMessage"); + ifmam = new wireFormat.ptr(16, 16, $throwNilPointerError); + ifmam.parse = $methodVal(ifmam, "parseInterfaceMulticastAddrMessage"); + ifmam2 = new wireFormat.ptr(20, 20, $throwNilPointerError); + ifmam2.parse = $methodVal(ifmam2, "parseInterfaceMulticastAddrMessage"); + return [4, $makeMap($Int.keyFor, [{ k: 1, v: rtm }, { k: 2, v: rtm }, { k: 3, v: rtm }, { k: 4, v: rtm }, { k: 5, v: rtm }, { k: 6, v: rtm }, { k: 7, v: rtm }, { k: 8, v: rtm }, { k: 11, v: rtm }, { k: 12, v: ifam }, { k: 13, v: ifam }, { k: 14, v: ifm }, { k: 15, v: ifmam }, { k: 16, v: ifmam }, { k: 18, v: ifm2 }, { k: 19, v: ifmam2 }, { k: 20, v: rtm2 }])]; + }; + sysctl = function(mib, old, oldlen, new$1, newlen) { + var _tuple, errno, mib, new$1, newlen, old, oldlen, p; + p = 0; + if (mib.$length > 0) { + p = ($sliceToArray(mib)); + } else { + p = ((zero$24ptr || (zero$24ptr = new ptrType$6(function() { return zero; }, function($v) { zero = $v; })))); + } + _tuple = syscall.Syscall6(202, (p), ((mib.$length >>> 0)), ((old)), ((oldlen)), ((new$1)), (newlen)); + errno = _tuple[2]; + if (!((errno === 0))) { + return (new syscall.Errno(errno)); + } + return $ifaceNil; + }; + ptrType.methods = [{prop: "Family", name: "Family", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "lenAndSpace", name: "lenAndSpace", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [$Int, $Int], false)}, {prop: "marshal", name: "marshal", pkg: "vendor/golang_org/x/net/route", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$1.methods = [{prop: "Family", name: "Family", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "lenAndSpace", name: "lenAndSpace", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [$Int, $Int], false)}, {prop: "marshal", name: "marshal", pkg: "vendor/golang_org/x/net/route", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$2.methods = [{prop: "Family", name: "Family", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "lenAndSpace", name: "lenAndSpace", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [$Int, $Int], false)}, {prop: "marshal", name: "marshal", pkg: "vendor/golang_org/x/net/route", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$3.methods = [{prop: "Family", name: "Family", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "lenAndSpace", name: "lenAndSpace", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [$Int, $Int], false)}, {prop: "marshal", name: "marshal", pkg: "vendor/golang_org/x/net/route", typ: $funcType([sliceType], [$Int, $error], false)}]; + binaryLittleEndian.methods = [{prop: "Uint16", name: "Uint16", pkg: "", typ: $funcType([sliceType], [$Uint16], false)}, {prop: "PutUint16", name: "PutUint16", pkg: "", typ: $funcType([sliceType, $Uint16], [], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([sliceType], [$Uint32], false)}, {prop: "PutUint32", name: "PutUint32", pkg: "", typ: $funcType([sliceType, $Uint32], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([sliceType], [$Uint64], false)}]; + binaryBigEndian.methods = [{prop: "Uint16", name: "Uint16", pkg: "", typ: $funcType([sliceType], [$Uint16], false)}, {prop: "PutUint16", name: "PutUint16", pkg: "", typ: $funcType([sliceType, $Uint16], [], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([sliceType], [$Uint32], false)}, {prop: "PutUint32", name: "PutUint32", pkg: "", typ: $funcType([sliceType, $Uint32], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([sliceType], [$Uint64], false)}]; + ptrType$8.methods = [{prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [sliceType$2], false)}]; + ptrType$9.methods = [{prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [sliceType$2], false)}]; + ptrType$10.methods = [{prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [sliceType$2], false)}]; + ptrType$12.methods = [{prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "marshal", name: "marshal", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [sliceType, $error], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [sliceType$2], false)}]; + RIBType.methods = [{prop: "parseable", name: "parseable", pkg: "vendor/golang_org/x/net/route", typ: $funcType([], [$Bool], false)}]; + ptrType$4.methods = [{prop: "parseInterfaceMessage", name: "parseInterfaceMessage", pkg: "vendor/golang_org/x/net/route", typ: $funcType([RIBType, sliceType], [Message, $error], false)}, {prop: "parseInterfaceAddrMessage", name: "parseInterfaceAddrMessage", pkg: "vendor/golang_org/x/net/route", typ: $funcType([RIBType, sliceType], [Message, $error], false)}, {prop: "parseInterfaceMulticastAddrMessage", name: "parseInterfaceMulticastAddrMessage", pkg: "vendor/golang_org/x/net/route", typ: $funcType([RIBType, sliceType], [Message, $error], false)}, {prop: "parseRouteMessage", name: "parseRouteMessage", pkg: "vendor/golang_org/x/net/route", typ: $funcType([RIBType, sliceType], [Message, $error], false)}]; + ptrType$13.methods = [{prop: "SysType", name: "SysType", pkg: "", typ: $funcType([], [SysType], false)}]; + ptrType$14.methods = [{prop: "SysType", name: "SysType", pkg: "", typ: $funcType([], [SysType], false)}]; + Addr.init([{prop: "Family", name: "Family", pkg: "", typ: $funcType([], [$Int], false)}]); + LinkAddr.init("", [{prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: sliceType, tag: ""}]); + Inet4Addr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: arrayType, tag: ""}]); + Inet6Addr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: arrayType$1, tag: ""}, {prop: "ZoneID", name: "ZoneID", embedded: false, exported: true, typ: $Int, tag: ""}]); + DefaultAddr.init("vendor/golang_org/x/net/route", [{prop: "af", name: "af", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "Raw", name: "Raw", embedded: false, exported: true, typ: sliceType, tag: ""}]); + binaryLittleEndian.init("", []); + binaryBigEndian.init("", []); + InterfaceMessage.init("vendor/golang_org/x/net/route", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "extOff", name: "extOff", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType, tag: ""}]); + InterfaceAddrMessage.init("vendor/golang_org/x/net/route", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType, tag: ""}]); + InterfaceMulticastAddrMessage.init("vendor/golang_org/x/net/route", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType, tag: ""}]); + Message.init([{prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [sliceType$2], false)}]); + Sys.init([{prop: "SysType", name: "SysType", pkg: "", typ: $funcType([], [SysType], false)}]); + RouteMessage.init("vendor/golang_org/x/net/route", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ID", name: "ID", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Seq", name: "Seq", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "extOff", name: "extOff", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType, tag: ""}]); + wireFormat.init("vendor/golang_org/x/net/route", [{prop: "extOff", name: "extOff", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "bodyOff", name: "bodyOff", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "parse", name: "parse", embedded: false, exported: false, typ: funcType, tag: ""}]); + RouteMetrics.init("", [{prop: "PathMTU", name: "PathMTU", embedded: false, exported: true, typ: $Int, tag: ""}]); + InterfaceMetrics.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MTU", name: "MTU", embedded: false, exported: true, typ: $Int, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = syscall.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + littleEndian = new binaryLittleEndian.ptr(); + bigEndian = new binaryBigEndian.ptr(); + nativeEndian = $ifaceNil; + kernelAlign = 0; + wireFormats = false; + zero = 0; + errUnsupportedMessage = errors.New("unsupported message"); + errMessageMismatch = errors.New("message mismatch"); + errMessageTooShort = errors.New("message too short"); + errInvalidMessage = errors.New("invalid message"); + errInvalidAddr = errors.New("invalid address"); + errShortBuffer = errors.New("short buffer"); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net"] = (function() { + var $pkg = {}, $init, context, errors, js, nettrace, poll, singleflight, io, rand, os, runtime, sort, sync, atomic, syscall, time, dnsmessage, route, ipAttr, byRFC6724, policyTableEntry, policyTable, byMaskLength, scope, conf, Dialer, sysDialer, SRV, byPriorityWeight, MX, byPref, NS, resolverConfig, hostLookupOrder, dnsConfig, netFD, Interface, Flags, ipv6ZoneCache, IP, IPMask, IPNet, IPAddr, IPConn, ipStackCapabilities, addrList, Resolver, HardwareAddr, Addr, Conn, conn, PacketConn, Listener, Error, OpError, timeout, temporary, ParseError, AddrError, UnknownNetworkError, DNSError, writerOnly, buffersWriter, Buffers, nssConf, nssSource, nssCriterion, file, rawConn, rawListener, sockaddr, TCPAddr, TCPConn, TCPListener, UDPAddr, UDPConn, UnixAddr, UnixConn, dialResult, racer, ptrType, ptrType$1, sliceType, mapType, structType, arrayType, ptrType$2, sliceType$1, ptrType$3, ptrType$4, sliceType$2, sliceType$3, sliceType$4, ptrType$5, ptrType$6, sliceType$5, ptrType$7, ptrType$8, ptrType$9, ptrType$10, structType$1, ptrType$11, arrayType$1, ptrType$12, ptrType$13, ptrType$14, sliceType$6, ptrType$15, ptrType$16, funcType, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, sliceType$7, sliceType$8, ptrType$23, ptrType$24, ptrType$25, ptrType$26, ptrType$27, ptrType$28, sliceType$9, ptrType$29, arrayType$2, ptrType$30, structType$2, sliceType$10, arrayType$3, arrayType$4, arrayType$5, funcType$1, sliceType$11, ptrType$31, sliceType$12, ptrType$32, sliceType$13, ptrType$33, sliceType$14, ptrType$34, ptrType$35, ptrType$36, sliceType$15, arrayType$6, ptrType$38, ptrType$39, ptrType$40, ptrType$41, arrayType$7, sliceType$16, ptrType$43, ptrType$44, ptrType$45, ptrType$46, chanType, funcType$2, ptrType$47, ptrType$50, chanType$1, funcType$3, ptrType$51, mapType$1, mapType$2, ptrType$52, ptrType$53, funcType$4, ptrType$54, funcType$5, ptrType$55, mapType$3, funcType$6, funcType$7, ptrType$59, rfc6724policyTable, confOnce, confVal, resolvConf, lookupOrderName, defaultNS, getHostname, testHookDialTCP, testHookHostsPath, testHookLookupIP, testHookSetKeepAlive, testHookCanceledDial, socketFunc, connectFunc, listenFunc, getsockoptIntFunc, hosts, errInvalidInterface, errInvalidInterfaceIndex, errInvalidInterfaceName, errNoSuchInterface, errNoSuchMulticastInterface, flagNames, zoneCache, v4InV6Prefix, classAMask, classBMask, classCMask, ipStackCaps, protocols, services, dnsWaitGroup, onceReadProtocols, netGo, netCgo, listenerBacklog, errNoSuitableAddress, errMissingAddress, errCanceled, aLongTimeAgo, noDeadline, errNoSuchHost, onceReadServices, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, Listen, maxListenerBacklog, byteIndex, bytesEqual, bytesIndexByte, sortByRFC6724, sortByRFC6724withSrcs, srcAddrs, ipAttrOf, init, mustCIDR, classifyScope, commonPrefixLen, init$1, cgoLookupHost, cgoLookupPort, cgoLookupIP, cgoLookupCNAME, cgoLookupPTR, systemConf, initConfVal, goDebugNetDNS, isLocalhost, isGateway, minNonzeroTime, partialDeadline, parseNetwork, Dial, reverseaddr, equalASCIIName, isDomainName, absDomainName, newRequest, checkResponse, dnsPacketRoundTrip, dnsStreamRoundTrip, checkHeader, skipToAnswer, avoidDNS, goLookupIPFiles, dnsReadConfig, dnsDefaultSearch, hasPrefix, ensureRooted, wrapSyscallError, isConnError, newFD, parseLiteralIP, readHosts, lookupStaticHost, lookupStaticAddr, interfaceTable, linkFlags, interfaceAddrTable, interfaceMessages, interfaceMulticastAddrTable, IPv4, IPv4Mask, CIDRMask, isZeros, allFF, ubtoa, hexString, ipEmptyString, simpleMaskLength, networkNumberAndMask, parseIPv4, parseIPv6Zone, parseIPv6, ParseIP, parseIPZone, ParseCIDR, newIPConn, sockaddrToIP, stripIPv4Header, supportsIPv4, supportsIPv4map, isIPv4, filterAddrList, ipv4only, ipv6only, SplitHostPort, splitHostZone, JoinHostPort, loopbackIP, favoriteAddrFamily, internetSocket, ipToSockaddr, lookupProtocolMap, lookupPortMap, lookupIPReturn, ipAddrsEface, readProtocols, lookupProtocol, mapErr, genericReadFrom, parseNSSConfFile, parseNSSConf, parseCriteria, open, stat, countAnyByte, splitAtBytes, getFields, dtoi, xtoi, itoa, uitoa, appendHex, count, last, lowerASCIIBytes, lowerASCII, trimSpace, isSpace, removeComment, foreachLine, foreachField, stringsHasSuffix, stringsHasSuffixFold, stringsHasPrefix, stringsEqualFold, readFull, goDebugString, parsePort, readServices, goLookupPort, newRawConn, newRawListener, sendFile, socket, setDefaultSockopts, setDefaultListenerSockopts, setDefaultMulticastSockopts, boolint, setReadBuffer, setWriteBuffer, setKeepAlive, setLinger, splice, sysSocket, newTCPConn, sockaddrToTCP, selfConnect, spuriousENOTAVAIL, setKeepAlivePeriod, setNoDelay, newUDPConn, DialUDP, sockaddrToUDP, ResolveUnixAddr, newUnixConn, unixSocket, sockaddrToUnix, sockaddrToUnixgram, sockaddrToUnixpacket, sotypeToNet; + context = $packages["context"]; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + nettrace = $packages["internal/nettrace"]; + poll = $packages["internal/poll"]; + singleflight = $packages["internal/singleflight"]; + io = $packages["io"]; + rand = $packages["math/rand"]; + os = $packages["os"]; + runtime = $packages["runtime"]; + sort = $packages["sort"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + syscall = $packages["syscall"]; + time = $packages["time"]; + dnsmessage = $packages["vendor/golang_org/x/net/dns/dnsmessage"]; + route = $packages["vendor/golang_org/x/net/route"]; + ipAttr = $pkg.ipAttr = $newType(0, $kindStruct, "net.ipAttr", true, "net", false, function(Scope_, Precedence_, Label_) { + this.$val = this; + if (arguments.length === 0) { + this.Scope = 0; + this.Precedence = 0; + this.Label = 0; + return; + } + this.Scope = Scope_; + this.Precedence = Precedence_; + this.Label = Label_; + }); + byRFC6724 = $pkg.byRFC6724 = $newType(0, $kindStruct, "net.byRFC6724", true, "net", false, function(addrs_, addrAttr_, srcs_, srcAttr_) { + this.$val = this; + if (arguments.length === 0) { + this.addrs = sliceType$3.nil; + this.addrAttr = sliceType$2.nil; + this.srcs = sliceType$4.nil; + this.srcAttr = sliceType$2.nil; + return; + } + this.addrs = addrs_; + this.addrAttr = addrAttr_; + this.srcs = srcs_; + this.srcAttr = srcAttr_; + }); + policyTableEntry = $pkg.policyTableEntry = $newType(0, $kindStruct, "net.policyTableEntry", true, "net", false, function(Prefix_, Precedence_, Label_) { + this.$val = this; + if (arguments.length === 0) { + this.Prefix = ptrType$4.nil; + this.Precedence = 0; + this.Label = 0; + return; + } + this.Prefix = Prefix_; + this.Precedence = Precedence_; + this.Label = Label_; + }); + policyTable = $pkg.policyTable = $newType(12, $kindSlice, "net.policyTable", true, "net", false, null); + byMaskLength = $pkg.byMaskLength = $newType(12, $kindSlice, "net.byMaskLength", true, "net", false, null); + scope = $pkg.scope = $newType(1, $kindUint8, "net.scope", true, "net", false, null); + conf = $pkg.conf = $newType(0, $kindStruct, "net.conf", true, "net", false, function(forceCgoLookupHost_, netGo_, netCgo_, hasMDNSAllow_, goos_, dnsDebugLevel_, nss_, resolv_) { + this.$val = this; + if (arguments.length === 0) { + this.forceCgoLookupHost = false; + this.netGo = false; + this.netCgo = false; + this.hasMDNSAllow = false; + this.goos = ""; + this.dnsDebugLevel = 0; + this.nss = ptrType$2.nil; + this.resolv = ptrType$1.nil; + return; + } + this.forceCgoLookupHost = forceCgoLookupHost_; + this.netGo = netGo_; + this.netCgo = netCgo_; + this.hasMDNSAllow = hasMDNSAllow_; + this.goos = goos_; + this.dnsDebugLevel = dnsDebugLevel_; + this.nss = nss_; + this.resolv = resolv_; + }); + Dialer = $pkg.Dialer = $newType(0, $kindStruct, "net.Dialer", true, "net", true, function(Timeout_, Deadline_, LocalAddr_, DualStack_, FallbackDelay_, KeepAlive_, Resolver_, Cancel_, Control_) { + this.$val = this; + if (arguments.length === 0) { + this.Timeout = new time.Duration(0, 0); + this.Deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + this.LocalAddr = $ifaceNil; + this.DualStack = false; + this.FallbackDelay = new time.Duration(0, 0); + this.KeepAlive = new time.Duration(0, 0); + this.Resolver = ptrType$6.nil; + this.Cancel = $chanNil; + this.Control = $throwNilPointerError; + return; + } + this.Timeout = Timeout_; + this.Deadline = Deadline_; + this.LocalAddr = LocalAddr_; + this.DualStack = DualStack_; + this.FallbackDelay = FallbackDelay_; + this.KeepAlive = KeepAlive_; + this.Resolver = Resolver_; + this.Cancel = Cancel_; + this.Control = Control_; + }); + sysDialer = $pkg.sysDialer = $newType(0, $kindStruct, "net.sysDialer", true, "net", false, function(Dialer_, network_, address_) { + this.$val = this; + if (arguments.length === 0) { + this.Dialer = new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$6.nil, $chanNil, $throwNilPointerError); + this.network = ""; + this.address = ""; + return; + } + this.Dialer = Dialer_; + this.network = network_; + this.address = address_; + }); + SRV = $pkg.SRV = $newType(0, $kindStruct, "net.SRV", true, "net", true, function(Target_, Port_, Priority_, Weight_) { + this.$val = this; + if (arguments.length === 0) { + this.Target = ""; + this.Port = 0; + this.Priority = 0; + this.Weight = 0; + return; + } + this.Target = Target_; + this.Port = Port_; + this.Priority = Priority_; + this.Weight = Weight_; + }); + byPriorityWeight = $pkg.byPriorityWeight = $newType(12, $kindSlice, "net.byPriorityWeight", true, "net", false, null); + MX = $pkg.MX = $newType(0, $kindStruct, "net.MX", true, "net", true, function(Host_, Pref_) { + this.$val = this; + if (arguments.length === 0) { + this.Host = ""; + this.Pref = 0; + return; + } + this.Host = Host_; + this.Pref = Pref_; + }); + byPref = $pkg.byPref = $newType(12, $kindSlice, "net.byPref", true, "net", false, null); + NS = $pkg.NS = $newType(0, $kindStruct, "net.NS", true, "net", true, function(Host_) { + this.$val = this; + if (arguments.length === 0) { + this.Host = ""; + return; + } + this.Host = Host_; + }); + resolverConfig = $pkg.resolverConfig = $newType(0, $kindStruct, "net.resolverConfig", true, "net", false, function(initOnce_, ch_, lastChecked_, mu_, dnsConfig_) { + this.$val = this; + if (arguments.length === 0) { + this.initOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.ch = $chanNil; + this.lastChecked = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + this.mu = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); + this.dnsConfig = ptrType$1.nil; + return; + } + this.initOnce = initOnce_; + this.ch = ch_; + this.lastChecked = lastChecked_; + this.mu = mu_; + this.dnsConfig = dnsConfig_; + }); + hostLookupOrder = $pkg.hostLookupOrder = $newType(4, $kindInt, "net.hostLookupOrder", true, "net", false, null); + dnsConfig = $pkg.dnsConfig = $newType(0, $kindStruct, "net.dnsConfig", true, "net", false, function(servers_, search_, ndots_, timeout_, attempts_, rotate_, unknownOpt_, lookup_, err_, mtime_, soffset_) { + this.$val = this; + if (arguments.length === 0) { + this.servers = sliceType.nil; + this.search = sliceType.nil; + this.ndots = 0; + this.timeout = new time.Duration(0, 0); + this.attempts = 0; + this.rotate = false; + this.unknownOpt = false; + this.lookup = sliceType.nil; + this.err = $ifaceNil; + this.mtime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + this.soffset = 0; + return; + } + this.servers = servers_; + this.search = search_; + this.ndots = ndots_; + this.timeout = timeout_; + this.attempts = attempts_; + this.rotate = rotate_; + this.unknownOpt = unknownOpt_; + this.lookup = lookup_; + this.err = err_; + this.mtime = mtime_; + this.soffset = soffset_; + }); + netFD = $pkg.netFD = $newType(0, $kindStruct, "net.netFD", true, "net", false, function(pfd_, family_, sotype_, isConnected_, net_, laddr_, raddr_) { + this.$val = this; + if (arguments.length === 0) { + this.pfd = new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), 0, new poll.pollDesc.ptr(false), ptrType$15.nil, 0, 0, false, false, false); + this.family = 0; + this.sotype = 0; + this.isConnected = false; + this.net = ""; + this.laddr = $ifaceNil; + this.raddr = $ifaceNil; + return; + } + this.pfd = pfd_; + this.family = family_; + this.sotype = sotype_; + this.isConnected = isConnected_; + this.net = net_; + this.laddr = laddr_; + this.raddr = raddr_; + }); + Interface = $pkg.Interface = $newType(0, $kindStruct, "net.Interface", true, "net", true, function(Index_, MTU_, Name_, HardwareAddr_, Flags_) { + this.$val = this; + if (arguments.length === 0) { + this.Index = 0; + this.MTU = 0; + this.Name = ""; + this.HardwareAddr = HardwareAddr.nil; + this.Flags = 0; + return; + } + this.Index = Index_; + this.MTU = MTU_; + this.Name = Name_; + this.HardwareAddr = HardwareAddr_; + this.Flags = Flags_; + }); + Flags = $pkg.Flags = $newType(4, $kindUint, "net.Flags", true, "net", true, null); + ipv6ZoneCache = $pkg.ipv6ZoneCache = $newType(0, $kindStruct, "net.ipv6ZoneCache", true, "net", false, function(RWMutex_, lastFetched_, toIndex_, toName_) { + this.$val = this; + if (arguments.length === 0) { + this.RWMutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); + this.lastFetched = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + this.toIndex = false; + this.toName = false; + return; + } + this.RWMutex = RWMutex_; + this.lastFetched = lastFetched_; + this.toIndex = toIndex_; + this.toName = toName_; + }); + IP = $pkg.IP = $newType(12, $kindSlice, "net.IP", true, "net", true, null); + IPMask = $pkg.IPMask = $newType(12, $kindSlice, "net.IPMask", true, "net", true, null); + IPNet = $pkg.IPNet = $newType(0, $kindStruct, "net.IPNet", true, "net", true, function(IP_, Mask_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = IP.nil; + this.Mask = IPMask.nil; + return; + } + this.IP = IP_; + this.Mask = Mask_; + }); + IPAddr = $pkg.IPAddr = $newType(0, $kindStruct, "net.IPAddr", true, "net", true, function(IP_, Zone_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = IP.nil; + this.Zone = ""; + return; + } + this.IP = IP_; + this.Zone = Zone_; + }); + IPConn = $pkg.IPConn = $newType(0, $kindStruct, "net.IPConn", true, "net", true, function(conn_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = new conn.ptr(ptrType$16.nil); + return; + } + this.conn = conn_; + }); + ipStackCapabilities = $pkg.ipStackCapabilities = $newType(0, $kindStruct, "net.ipStackCapabilities", true, "net", false, function(Once_, ipv4Enabled_, ipv6Enabled_, ipv4MappedIPv6Enabled_) { + this.$val = this; + if (arguments.length === 0) { + this.Once = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.ipv4Enabled = false; + this.ipv6Enabled = false; + this.ipv4MappedIPv6Enabled = false; + return; + } + this.Once = Once_; + this.ipv4Enabled = ipv4Enabled_; + this.ipv6Enabled = ipv6Enabled_; + this.ipv4MappedIPv6Enabled = ipv4MappedIPv6Enabled_; + }); + addrList = $pkg.addrList = $newType(12, $kindSlice, "net.addrList", true, "net", false, null); + Resolver = $pkg.Resolver = $newType(0, $kindStruct, "net.Resolver", true, "net", true, function(PreferGo_, StrictErrors_, Dial_, lookupGroup_) { + this.$val = this; + if (arguments.length === 0) { + this.PreferGo = false; + this.StrictErrors = false; + this.Dial = $throwNilPointerError; + this.lookupGroup = new singleflight.Group.ptr(new sync.Mutex.ptr(0, 0), false); + return; + } + this.PreferGo = PreferGo_; + this.StrictErrors = StrictErrors_; + this.Dial = Dial_; + this.lookupGroup = lookupGroup_; + }); + HardwareAddr = $pkg.HardwareAddr = $newType(12, $kindSlice, "net.HardwareAddr", true, "net", true, null); + Addr = $pkg.Addr = $newType(8, $kindInterface, "net.Addr", true, "net", true, null); + Conn = $pkg.Conn = $newType(8, $kindInterface, "net.Conn", true, "net", true, null); + conn = $pkg.conn = $newType(0, $kindStruct, "net.conn", true, "net", false, function(fd_) { + this.$val = this; + if (arguments.length === 0) { + this.fd = ptrType$16.nil; + return; + } + this.fd = fd_; + }); + PacketConn = $pkg.PacketConn = $newType(8, $kindInterface, "net.PacketConn", true, "net", true, null); + Listener = $pkg.Listener = $newType(8, $kindInterface, "net.Listener", true, "net", true, null); + Error = $pkg.Error = $newType(8, $kindInterface, "net.Error", true, "net", true, null); + OpError = $pkg.OpError = $newType(0, $kindStruct, "net.OpError", true, "net", true, function(Op_, Net_, Source_, Addr_, Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Op = ""; + this.Net = ""; + this.Source = $ifaceNil; + this.Addr = $ifaceNil; + this.Err = $ifaceNil; + return; + } + this.Op = Op_; + this.Net = Net_; + this.Source = Source_; + this.Addr = Addr_; + this.Err = Err_; + }); + timeout = $pkg.timeout = $newType(8, $kindInterface, "net.timeout", true, "net", false, null); + temporary = $pkg.temporary = $newType(8, $kindInterface, "net.temporary", true, "net", false, null); + ParseError = $pkg.ParseError = $newType(0, $kindStruct, "net.ParseError", true, "net", true, function(Type_, Text_) { + this.$val = this; + if (arguments.length === 0) { + this.Type = ""; + this.Text = ""; + return; + } + this.Type = Type_; + this.Text = Text_; + }); + AddrError = $pkg.AddrError = $newType(0, $kindStruct, "net.AddrError", true, "net", true, function(Err_, Addr_) { + this.$val = this; + if (arguments.length === 0) { + this.Err = ""; + this.Addr = ""; + return; + } + this.Err = Err_; + this.Addr = Addr_; + }); + UnknownNetworkError = $pkg.UnknownNetworkError = $newType(8, $kindString, "net.UnknownNetworkError", true, "net", true, null); + DNSError = $pkg.DNSError = $newType(0, $kindStruct, "net.DNSError", true, "net", true, function(Err_, Name_, Server_, IsTimeout_, IsTemporary_) { + this.$val = this; + if (arguments.length === 0) { + this.Err = ""; + this.Name = ""; + this.Server = ""; + this.IsTimeout = false; + this.IsTemporary = false; + return; + } + this.Err = Err_; + this.Name = Name_; + this.Server = Server_; + this.IsTimeout = IsTimeout_; + this.IsTemporary = IsTemporary_; + }); + writerOnly = $pkg.writerOnly = $newType(0, $kindStruct, "net.writerOnly", true, "net", false, function(Writer_) { + this.$val = this; + if (arguments.length === 0) { + this.Writer = $ifaceNil; + return; + } + this.Writer = Writer_; + }); + buffersWriter = $pkg.buffersWriter = $newType(8, $kindInterface, "net.buffersWriter", true, "net", false, null); + Buffers = $pkg.Buffers = $newType(12, $kindSlice, "net.Buffers", true, "net", true, null); + nssConf = $pkg.nssConf = $newType(0, $kindStruct, "net.nssConf", true, "net", false, function(err_, sources_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + this.sources = false; + return; + } + this.err = err_; + this.sources = sources_; + }); + nssSource = $pkg.nssSource = $newType(0, $kindStruct, "net.nssSource", true, "net", false, function(source_, criteria_) { + this.$val = this; + if (arguments.length === 0) { + this.source = ""; + this.criteria = sliceType$15.nil; + return; + } + this.source = source_; + this.criteria = criteria_; + }); + nssCriterion = $pkg.nssCriterion = $newType(0, $kindStruct, "net.nssCriterion", true, "net", false, function(negate_, status_, action_) { + this.$val = this; + if (arguments.length === 0) { + this.negate = false; + this.status = ""; + this.action = ""; + return; + } + this.negate = negate_; + this.status = status_; + this.action = action_; + }); + file = $pkg.file = $newType(0, $kindStruct, "net.file", true, "net", false, function(file_, data_, atEOF_) { + this.$val = this; + if (arguments.length === 0) { + this.file = ptrType$17.nil; + this.data = sliceType$1.nil; + this.atEOF = false; + return; + } + this.file = file_; + this.data = data_; + this.atEOF = atEOF_; + }); + rawConn = $pkg.rawConn = $newType(0, $kindStruct, "net.rawConn", true, "net", false, function(fd_) { + this.$val = this; + if (arguments.length === 0) { + this.fd = ptrType$16.nil; + return; + } + this.fd = fd_; + }); + rawListener = $pkg.rawListener = $newType(0, $kindStruct, "net.rawListener", true, "net", false, function(rawConn_) { + this.$val = this; + if (arguments.length === 0) { + this.rawConn = new rawConn.ptr(ptrType$16.nil); + return; + } + this.rawConn = rawConn_; + }); + sockaddr = $pkg.sockaddr = $newType(8, $kindInterface, "net.sockaddr", true, "net", false, null); + TCPAddr = $pkg.TCPAddr = $newType(0, $kindStruct, "net.TCPAddr", true, "net", true, function(IP_, Port_, Zone_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = IP.nil; + this.Port = 0; + this.Zone = ""; + return; + } + this.IP = IP_; + this.Port = Port_; + this.Zone = Zone_; + }); + TCPConn = $pkg.TCPConn = $newType(0, $kindStruct, "net.TCPConn", true, "net", true, function(conn_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = new conn.ptr(ptrType$16.nil); + return; + } + this.conn = conn_; + }); + TCPListener = $pkg.TCPListener = $newType(0, $kindStruct, "net.TCPListener", true, "net", true, function(fd_) { + this.$val = this; + if (arguments.length === 0) { + this.fd = ptrType$16.nil; + return; + } + this.fd = fd_; + }); + UDPAddr = $pkg.UDPAddr = $newType(0, $kindStruct, "net.UDPAddr", true, "net", true, function(IP_, Port_, Zone_) { + this.$val = this; + if (arguments.length === 0) { + this.IP = IP.nil; + this.Port = 0; + this.Zone = ""; + return; + } + this.IP = IP_; + this.Port = Port_; + this.Zone = Zone_; + }); + UDPConn = $pkg.UDPConn = $newType(0, $kindStruct, "net.UDPConn", true, "net", true, function(conn_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = new conn.ptr(ptrType$16.nil); + return; + } + this.conn = conn_; + }); + UnixAddr = $pkg.UnixAddr = $newType(0, $kindStruct, "net.UnixAddr", true, "net", true, function(Name_, Net_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = ""; + this.Net = ""; + return; + } + this.Name = Name_; + this.Net = Net_; + }); + UnixConn = $pkg.UnixConn = $newType(0, $kindStruct, "net.UnixConn", true, "net", true, function(conn_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = new conn.ptr(ptrType$16.nil); + return; + } + this.conn = conn_; + }); + dialResult = $newType(0, $kindStruct, "net.dialResult", true, "net", false, function(Conn_, error_, primary_, done_) { + this.$val = this; + if (arguments.length === 0) { + this.Conn = $ifaceNil; + this.error = $ifaceNil; + this.primary = false; + this.done = false; + return; + } + this.Conn = Conn_; + this.error = error_; + this.primary = primary_; + this.done = done_; + }); + racer = $newType(0, $kindStruct, "net.racer", true, "net", false, function(p_, server_, error_) { + this.$val = this; + if (arguments.length === 0) { + this.p = new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)); + this.server = ""; + this.error = $ifaceNil; + return; + } + this.p = p_; + this.server = server_; + this.error = error_; + }); + ptrType = $ptrType(time.Location); + ptrType$1 = $ptrType(dnsConfig); + sliceType = $sliceType($String); + mapType = $mapType($String, sliceType); + structType = $structType("net", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: sync.Mutex, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "byAddr", name: "byAddr", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "expire", name: "expire", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "mtime", name: "mtime", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int64, tag: ""}]); + arrayType = $arrayType($Uint32, 3); + ptrType$2 = $ptrType(nssConf); + sliceType$1 = $sliceType($Uint8); + ptrType$3 = $ptrType(Buffers); + ptrType$4 = $ptrType(IPNet); + sliceType$2 = $sliceType(ipAttr); + sliceType$3 = $sliceType(IPAddr); + sliceType$4 = $sliceType(IP); + ptrType$5 = $ptrType(UDPAddr); + ptrType$6 = $ptrType(Resolver); + sliceType$5 = $sliceType(nssSource); + ptrType$7 = $ptrType(TCPAddr); + ptrType$8 = $ptrType(IPAddr); + ptrType$9 = $ptrType(nettrace.Trace); + ptrType$10 = $ptrType(TCPConn); + structType$1 = $structType("", []); + ptrType$11 = $ptrType(UnixAddr); + arrayType$1 = $arrayType($Uint8, 255); + ptrType$12 = $ptrType(DNSError); + ptrType$13 = $ptrType(OpError); + ptrType$14 = $ptrType($Uint32); + sliceType$6 = $sliceType(syscall.Iovec); + ptrType$15 = $ptrType(sliceType$6); + ptrType$16 = $ptrType(netFD); + funcType = $funcType([ptrType$16], [$error], false); + ptrType$17 = $ptrType(os.File); + ptrType$18 = $ptrType(syscall.SockaddrInet4); + ptrType$19 = $ptrType(syscall.SockaddrInet6); + ptrType$20 = $ptrType(syscall.SockaddrUnix); + ptrType$21 = $ptrType(file); + ptrType$22 = $ptrType(Interface); + sliceType$7 = $sliceType(Addr); + sliceType$8 = $sliceType(Interface); + ptrType$23 = $ptrType(route.InterfaceMessage); + ptrType$24 = $ptrType(route.LinkAddr); + ptrType$25 = $ptrType(route.InterfaceMetrics); + ptrType$26 = $ptrType(route.InterfaceAddrMessage); + ptrType$27 = $ptrType(route.Inet4Addr); + ptrType$28 = $ptrType(route.Inet6Addr); + sliceType$9 = $sliceType(route.Message); + ptrType$29 = $ptrType(route.InterfaceMulticastAddrMessage); + arrayType$2 = $arrayType($Uint8, 4); + ptrType$30 = $ptrType(IPConn); + structType$2 = $structType("net", [{prop: "laddr", name: "laddr", embedded: false, exported: false, typ: TCPAddr, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $Int, tag: ""}]); + sliceType$10 = $sliceType(structType$2); + arrayType$3 = $arrayType($Int8, 8); + arrayType$4 = $arrayType($Uint8, 16); + arrayType$5 = $arrayType($Uint8, 25); + funcType$1 = $funcType([context.Context, $String], [sliceType$3, $error], false); + sliceType$11 = $sliceType($emptyInterface); + ptrType$31 = $ptrType(SRV); + sliceType$12 = $sliceType(ptrType$31); + ptrType$32 = $ptrType(MX); + sliceType$13 = $sliceType(ptrType$32); + ptrType$33 = $ptrType(NS); + sliceType$14 = $sliceType(ptrType$33); + ptrType$34 = $ptrType(conn); + ptrType$35 = $ptrType(os.SyscallError); + ptrType$36 = $ptrType(AddrError); + sliceType$15 = $sliceType(nssCriterion); + arrayType$6 = $arrayType($Uint8, 20); + ptrType$38 = $ptrType(rawConn); + ptrType$39 = $ptrType(TCPListener); + ptrType$40 = $ptrType(UDPConn); + ptrType$41 = $ptrType(UnixConn); + arrayType$7 = $arrayType($Int8, 104); + sliceType$16 = $sliceType(sliceType$1); + ptrType$43 = $ptrType(sliceType$16); + ptrType$44 = $ptrType(byRFC6724); + ptrType$45 = $ptrType(conf); + ptrType$46 = $ptrType(Dialer); + chanType = $chanType(structType$1, false, true); + funcType$2 = $funcType([$String, $String, syscall.RawConn], [$error], false); + ptrType$47 = $ptrType(sysDialer); + ptrType$50 = $ptrType(resolverConfig); + chanType$1 = $chanType(structType$1, false, false); + funcType$3 = $funcType([syscall.Sockaddr], [Addr], false); + ptrType$51 = $ptrType(ipv6ZoneCache); + mapType$1 = $mapType($String, $Int); + mapType$2 = $mapType($Int, $String); + ptrType$52 = $ptrType(IP); + ptrType$53 = $ptrType(ipStackCapabilities); + funcType$4 = $funcType([Addr], [$Bool], false); + ptrType$54 = $ptrType(singleflight.Group); + funcType$5 = $funcType([context.Context, $String, $String], [Conn, $error], false); + ptrType$55 = $ptrType(ParseError); + mapType$3 = $mapType($String, sliceType$5); + funcType$6 = $funcType([$Uintptr], [], false); + funcType$7 = $funcType([$Uintptr], [$Bool], false); + ptrType$59 = $ptrType(rawListener); + Listen = function(net, laddr) { + var laddr, net; + $panic(errors.New("network access is not supported by GopherJS")); + }; + $pkg.Listen = Listen; + Dialer.ptr.prototype.Dial = function(network, address) { + var address, d, network; + d = this; + $panic(errors.New("network access is not supported by GopherJS")); + }; + Dialer.prototype.Dial = function(network, address) { return this.$val.Dial(network, address); }; + maxListenerBacklog = function() { + return 128; + }; + byteIndex = function(s, c) { + var c, s; + return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; + }; + bytesEqual = function(x, y) { + var _i, _ref, b, i, x, y; + if (!((x.$length === y.$length))) { + return false; + } + _ref = x; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((b === ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])))) { + return false; + } + _i++; + } + return true; + }; + bytesIndexByte = function(s, c) { + var _i, _ref, b, c, i, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (b === c) { + return i; + } + _i++; + } + return -1; + }; + sortByRFC6724 = function(addrs) { + var _arg, _arg$1, _r$9, addrs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$9 = $f._r$9; addrs = $f.addrs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (addrs.$length < 2) { + $s = -1; return; + } + _arg = addrs; + _r$9 = srcAddrs(addrs); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _arg$1 = _r$9; + $r = sortByRFC6724withSrcs(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: sortByRFC6724 }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$9 = _r$9; $f.addrs = addrs; $f.$s = $s; $f.$r = $r; return $f; + }; + sortByRFC6724withSrcs = function(addrs, srcs) { + var _i, _ref, addrAttr, addrs, i, srcAttr, srcs, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; addrAttr = $f.addrAttr; addrs = $f.addrs; i = $f.i; srcAttr = $f.srcAttr; srcs = $f.srcs; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (!((addrs.$length === srcs.$length))) { + $panic(new $String("internal error")); + } + addrAttr = $makeSlice(sliceType$2, addrs.$length); + srcAttr = $makeSlice(sliceType$2, srcs.$length); + _ref = addrs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); + ipAttr.copy(((i < 0 || i >= addrAttr.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrAttr.$array[addrAttr.$offset + i]), ipAttrOf(v.IP)); + ipAttr.copy(((i < 0 || i >= srcAttr.$length) ? ($throwRuntimeError("index out of range"), undefined) : srcAttr.$array[srcAttr.$offset + i]), ipAttrOf(((i < 0 || i >= srcs.$length) ? ($throwRuntimeError("index out of range"), undefined) : srcs.$array[srcs.$offset + i]))); + _i++; + } + $r = sort.Stable(new byRFC6724.ptr(addrs, addrAttr, srcs, srcAttr)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: sortByRFC6724withSrcs }; } $f._i = _i; $f._ref = _ref; $f.addrAttr = addrAttr; $f.addrs = addrs; $f.i = i; $f.srcAttr = srcAttr; $f.srcs = srcs; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + srcAddrs = function(addrs) { + var _i, _r$10, _r$9, _ref, _tuple, _tuple$1, addrs, c, dst, err, i, ok, src, srcs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addrs = $f.addrs; c = $f.c; dst = $f.dst; err = $f.err; i = $f.i; ok = $f.ok; src = $f.src; srcs = $f.srcs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dst = [dst]; + srcs = $makeSlice(sliceType$4, addrs.$length); + dst[0] = new UDPAddr.ptr(IP.nil, 9, ""); + _ref = addrs; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + dst[0].IP = ((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]).IP; + dst[0].Zone = ((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]).Zone; + _r$9 = DialUDP("udp", ptrType$5.nil, dst[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + c = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 4: + _tuple$1 = $assertType(c.conn.LocalAddr(), ptrType$5, true); + src = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + ((i < 0 || i >= srcs.$length) ? ($throwRuntimeError("index out of range"), undefined) : srcs.$array[srcs.$offset + i] = src.IP); + } + _r$10 = c.conn.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + /* } */ case 5: + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return srcs; + /* */ } return; } if ($f === undefined) { $f = { $blk: srcAddrs }; } $f._i = _i; $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addrs = addrs; $f.c = c; $f.dst = dst; $f.err = err; $f.i = i; $f.ok = ok; $f.src = src; $f.srcs = srcs; $f.$s = $s; $f.$r = $r; return $f; + }; + ipAttrOf = function(ip) { + var ip, match; + if (ip === IP.nil) { + return new ipAttr.ptr(0, 0, 0); + } + match = $clone(rfc6724policyTable.Classify(ip), policyTableEntry); + return new ipAttr.ptr(classifyScope(ip), match.Precedence, match.Label); + }; + byRFC6724.ptr.prototype.Len = function() { + var s; + s = this; + return s.addrs.$length; + }; + byRFC6724.prototype.Len = function() { return this.$val.Len(); }; + byRFC6724.ptr.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, i, j, s, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + s = this; + _tmp = $clone((x = s.addrs, ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j])), IPAddr); + _tmp$1 = $clone((x$1 = s.addrs, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])), IPAddr); + IPAddr.copy((x$2 = s.addrs, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])), _tmp); + IPAddr.copy((x$3 = s.addrs, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j])), _tmp$1); + _tmp$2 = (x$4 = s.srcs, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j])); + _tmp$3 = (x$5 = s.srcs, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])); + (x$6 = s.srcs, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i] = _tmp$2)); + (x$7 = s.srcs, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j] = _tmp$3)); + _tmp$4 = $clone((x$8 = s.addrAttr, ((j < 0 || j >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + j])), ipAttr); + _tmp$5 = $clone((x$9 = s.addrAttr, ((i < 0 || i >= x$9.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + i])), ipAttr); + ipAttr.copy((x$10 = s.addrAttr, ((i < 0 || i >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + i])), _tmp$4); + ipAttr.copy((x$11 = s.addrAttr, ((j < 0 || j >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + j])), _tmp$5); + _tmp$6 = $clone((x$12 = s.srcAttr, ((j < 0 || j >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + j])), ipAttr); + _tmp$7 = $clone((x$13 = s.srcAttr, ((i < 0 || i >= x$13.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$13.$array[x$13.$offset + i])), ipAttr); + ipAttr.copy((x$14 = s.srcAttr, ((i < 0 || i >= x$14.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$14.$array[x$14.$offset + i])), _tmp$6); + ipAttr.copy((x$15 = s.srcAttr, ((j < 0 || j >= x$15.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$15.$array[x$15.$offset + j])), _tmp$7); + }; + byRFC6724.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; + byRFC6724.ptr.prototype.Less = function(i, j) { + var DA, DB, SourceDA, SourceDB, attrDA, attrDB, attrSourceDA, attrSourceDB, commonA, commonB, i, j, s, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + s = this; + DA = (x = s.addrs, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).IP; + DB = (x$1 = s.addrs, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])).IP; + SourceDA = (x$2 = s.srcs, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])); + SourceDB = (x$3 = s.srcs, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j])); + attrDA = (x$4 = s.addrAttr, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])); + attrDB = (x$5 = s.addrAttr, ((j < 0 || j >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + j])); + attrSourceDA = (x$6 = s.srcAttr, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])); + attrSourceDB = (x$7 = s.srcAttr, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j])); + if (SourceDA === IP.nil && SourceDB === IP.nil) { + return false; + } + if (SourceDB === IP.nil) { + return true; + } + if (SourceDA === IP.nil) { + return false; + } + if ((attrDA.Scope === attrSourceDA.Scope) && !((attrDB.Scope === attrSourceDB.Scope))) { + return true; + } + if (!((attrDA.Scope === attrSourceDA.Scope)) && (attrDB.Scope === attrSourceDB.Scope)) { + return false; + } + if ((attrSourceDA.Label === attrDA.Label) && !((attrSourceDB.Label === attrDB.Label))) { + return true; + } + if (!((attrSourceDA.Label === attrDA.Label)) && (attrSourceDB.Label === attrDB.Label)) { + return false; + } + if (attrDA.Precedence > attrDB.Precedence) { + return true; + } + if (attrDA.Precedence < attrDB.Precedence) { + return false; + } + if (attrDA.Scope < attrDB.Scope) { + return true; + } + if (attrDA.Scope > attrDB.Scope) { + return false; + } + if (DA.To4() === IP.nil && DB.To4() === IP.nil) { + commonA = commonPrefixLen(SourceDA, DA); + commonB = commonPrefixLen(SourceDB, DB); + if (commonA > commonB) { + return true; + } + if (commonA < commonB) { + return false; + } + } + return false; + }; + byRFC6724.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; + init = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = sort.Sort(sort.Reverse(($subslice(new byMaskLength(rfc6724policyTable.$array), rfc6724policyTable.$offset, rfc6724policyTable.$offset + rfc6724policyTable.$length)))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + byMaskLength.prototype.Len = function() { + var s; + s = this; + return s.$length; + }; + $ptrType(byMaskLength).prototype.Len = function() { return this.$get().Len(); }; + byMaskLength.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, s; + s = this; + _tmp = $clone(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), policyTableEntry); + _tmp$1 = $clone(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), policyTableEntry); + policyTableEntry.copy(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), _tmp); + policyTableEntry.copy(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), _tmp$1); + }; + $ptrType(byMaskLength).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + byMaskLength.prototype.Less = function(i, j) { + var _tuple, _tuple$1, i, isize, j, jsize, s; + s = this; + _tuple = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Prefix.Mask.Size(); + isize = _tuple[0]; + _tuple$1 = ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).Prefix.Mask.Size(); + jsize = _tuple$1[0]; + return isize < jsize; + }; + $ptrType(byMaskLength).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + mustCIDR = function(s) { + var _r$9, _tuple, err, ip, ipNet, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; ip = $f.ip; ipNet = $f.ipNet; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = ParseCIDR(s); + ip = _tuple[0]; + ipNet = _tuple[1]; + err = _tuple[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: + _r$9 = err.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $panic(new $String(_r$9)); + /* } */ case 2: + if (!((ip.$length === 16))) { + $panic(new $String("unexpected IP length")); + } + $s = -1; return ipNet; + /* */ } return; } if ($f === undefined) { $f = { $blk: mustCIDR }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.ip = ip; $f.ipNet = ipNet; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + policyTable.prototype.Classify = function(ip) { + var _i, _ref, ent, ip, t; + t = this; + _ref = t; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ent = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), policyTableEntry); + if (ent.Prefix.Contains(ip)) { + return ent; + } + _i++; + } + return new policyTableEntry.ptr(ptrType$4.nil, 0, 0); + }; + $ptrType(policyTable).prototype.Classify = function(ip) { return this.$get().Classify(ip); }; + classifyScope = function(ip) { + var ip, ipv6; + if (ip.IsLoopback() || ip.IsLinkLocalUnicast()) { + return 2; + } + ipv6 = (ip.$length === 16) && ip.To4() === IP.nil; + if (ipv6 && ip.IsMulticast()) { + return (((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 15) >>> 0) << 24 >>> 24)); + } + if (ipv6 && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 254) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 192) >>> 0) === 192)) { + return 5; + } + return 14; + }; + commonPrefixLen = function(a, b) { + var _tmp, _tmp$1, a, a4, ab, b, b4, bb, bits, cpl, y, y$1; + cpl = 0; + a4 = a.To4(); + if (!(a4 === IP.nil)) { + a = a4; + } + b4 = b.To4(); + if (!(b4 === IP.nil)) { + b = b4; + } + if (!((a.$length === b.$length))) { + cpl = 0; + return cpl; + } + if (a.$length > 8) { + a = $subslice(a, 0, 8); + b = $subslice(b, 0, 8); + } + while (true) { + if (!(a.$length > 0)) { break; } + if ((0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0]) === (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0])) { + cpl = cpl + (8) >> 0; + a = $subslice(a, 1); + b = $subslice(b, 1); + continue; + } + bits = 8; + _tmp = (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0]); + _tmp$1 = (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]); + ab = _tmp; + bb = _tmp$1; + while (true) { + ab = (y = (1), y < 32 ? (ab >>> y) : 0) << 24 >>> 24; + bb = (y$1 = (1), y$1 < 32 ? (bb >>> y$1) : 0) << 24 >>> 24; + bits = bits - (1) >> 0; + if (ab === bb) { + cpl = cpl + (bits) >> 0; + return cpl; + } + } + } + return cpl; + }; + init$1 = function() { + netGo = true; + }; + cgoLookupHost = function(ctx, name) { + var _tmp, _tmp$1, _tmp$2, addrs, completed, ctx, err, name; + addrs = sliceType.nil; + err = $ifaceNil; + completed = false; + _tmp = sliceType.nil; + _tmp$1 = $ifaceNil; + _tmp$2 = false; + addrs = _tmp; + err = _tmp$1; + completed = _tmp$2; + return [addrs, err, completed]; + }; + cgoLookupPort = function(ctx, network, service) { + var _tmp, _tmp$1, _tmp$2, completed, ctx, err, network, port, service; + port = 0; + err = $ifaceNil; + completed = false; + _tmp = 0; + _tmp$1 = $ifaceNil; + _tmp$2 = false; + port = _tmp; + err = _tmp$1; + completed = _tmp$2; + return [port, err, completed]; + }; + cgoLookupIP = function(ctx, name) { + var _tmp, _tmp$1, _tmp$2, addrs, completed, ctx, err, name; + addrs = sliceType$3.nil; + err = $ifaceNil; + completed = false; + _tmp = sliceType$3.nil; + _tmp$1 = $ifaceNil; + _tmp$2 = false; + addrs = _tmp; + err = _tmp$1; + completed = _tmp$2; + return [addrs, err, completed]; + }; + cgoLookupCNAME = function(ctx, name) { + var _tmp, _tmp$1, _tmp$2, cname, completed, ctx, err, name; + cname = ""; + err = $ifaceNil; + completed = false; + _tmp = ""; + _tmp$1 = $ifaceNil; + _tmp$2 = false; + cname = _tmp; + err = _tmp$1; + completed = _tmp$2; + return [cname, err, completed]; + }; + cgoLookupPTR = function(ctx, addr) { + var _tmp, _tmp$1, _tmp$2, addr, completed, ctx, err, ptrs; + ptrs = sliceType.nil; + err = $ifaceNil; + completed = false; + _tmp = sliceType.nil; + _tmp$1 = $ifaceNil; + _tmp$2 = false; + ptrs = _tmp; + err = _tmp$1; + completed = _tmp$2; + return [ptrs, err, completed]; + }; + systemConf = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = confOnce.Do(initConfVal); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return confVal; + /* */ } return; } if ($f === undefined) { $f = { $blk: systemConf }; } $f.$s = $s; $f.$r = $r; return $f; + }; + initConfVal = function() { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, debugLevel, dnsMode, err, localDomainDefined, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; _v$1 = $f._v$1; debugLevel = $f.debugLevel; dnsMode = $f.dnsMode; err = $f.err; localDomainDefined = $f.localDomainDefined; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r$9 = goDebugNetDNS(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + dnsMode = _tuple[0]; + debugLevel = _tuple[1]; + confVal.dnsDebugLevel = debugLevel; + confVal.netGo = netGo || dnsMode === "go"; + confVal.netCgo = netCgo || dnsMode === "cgo"; + /* */ if (confVal.dnsDebugLevel > 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (confVal.dnsDebugLevel > 0) { */ case 2: + $deferred.push([(function() { + if (confVal.netGo) { + if (netGo) { + console.log("go package net: built with netgo build tag; using Go's DNS resolver"); + } else { + console.log("go package net: GODEBUG setting forcing use of Go's resolver"); + } + } else if (confVal.forceCgoLookupHost) { + console.log("go package net: using cgo DNS resolver"); + } else { + console.log("go package net: dynamic selection of DNS resolver"); + } + }), []]); + /* } */ case 3: + if (true) { + confVal.forceCgoLookupHost = true; + $s = -1; return; + } + _r$10 = syscall.Getenv("LOCALDOMAIN"); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + localDomainDefined = _tuple$1[1]; + _r$11 = os.Getenv("RES_OPTIONS"); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + if (!(_r$11 === "")) { _v = true; $s = 7; continue s; } + _r$12 = os.Getenv("HOSTALIASES"); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _v = !(_r$12 === ""); case 7: + /* */ if (_v || confVal.netCgo || localDomainDefined) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_v || confVal.netCgo || localDomainDefined) { */ case 5: + confVal.forceCgoLookupHost = true; + $s = -1; return; + /* } */ case 6: + if (!(false)) { _v$1 = false; $s = 12; continue s; } + _r$13 = os.Getenv("ASR_CONFIG"); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _v$1 = !(_r$13 === ""); case 12: + /* */ if (_v$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_v$1) { */ case 10: + confVal.forceCgoLookupHost = true; + $s = -1; return; + /* } */ case 11: + /* */ if (true) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (true) { */ case 14: + _r$14 = parseNSSConfFile("/etc/nsswitch.conf"); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + confVal.nss = _r$14; + /* } */ case 15: + _r$15 = dnsReadConfig("/etc/resolv.conf"); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + confVal.resolv = _r$15; + if (!($interfaceIsEqual(confVal.resolv.err, $ifaceNil)) && !os.IsNotExist(confVal.resolv.err) && !os.IsPermission(confVal.resolv.err)) { + confVal.forceCgoLookupHost = true; + } + _r$16 = os.Stat("/etc/mdns.allow"); /* */ $s = 18; case 18: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$2 = _r$16; + err = _tuple$2[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + confVal.hasMDNSAllow = true; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: initConfVal }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f._v$1 = _v$1; $f.debugLevel = debugLevel; $f.dnsMode = dnsMode; $f.err = err; $f.localDomainDefined = localDomainDefined; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + conf.ptr.prototype.canUseCgo = function() { + var _r$9, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$9 = c.hostLookupOrder(ptrType$6.nil, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9 === 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: conf.ptr.prototype.canUseCgo }; } $f._r$9 = _r$9; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + conf.prototype.canUseCgo = function() { return this.$val.canUseCgo(); }; + conf.ptr.prototype.hostLookupOrder = function(r, hostname) { + var _1, _entry, _i, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tuple, c, dnsSource, err, fallbackOrder, filesSource, first, hn, hostname, lookup, mdnsSource, nss, r, ret, src, srcs, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; c = $f.c; dnsSource = $f.dnsSource; err = $f.err; fallbackOrder = $f.fallbackOrder; filesSource = $f.filesSource; first = $f.first; hn = $f.hn; hostname = $f.hostname; lookup = $f.lookup; mdnsSource = $f.mdnsSource; nss = $f.nss; r = $f.r; ret = $f.ret; src = $f.src; srcs = $f.srcs; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + hostname = [hostname]; + ret = [ret]; + ret[0] = 0; + c = this; + /* */ if (c.dnsDebugLevel > 1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (c.dnsDebugLevel > 1) { */ case 1: + $deferred.push([(function(hostname, ret) { return function() { + console.log("go package net: hostLookupOrder(", hostname[0], ") = ", new hostLookupOrder(ret[0]).String(), "\n"); + }; })(hostname, ret), []]); + /* } */ case 2: + fallbackOrder = 0; + if (c.netGo || r.preferGo()) { + fallbackOrder = 1; + } + if (c.forceCgoLookupHost || c.resolv.unknownOpt || c.goos === "android") { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + if (!((byteIndex(hostname[0], 92) === -1)) || !((byteIndex(hostname[0], 37) === -1))) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + if (c.goos === "openbsd") { + if (os.IsNotExist(c.resolv.err)) { + ret[0] = 3; + $s = -1; return ret[0]; + } + lookup = c.resolv.lookup; + if (lookup.$length === 0) { + ret[0] = 2; + $s = -1; return ret[0]; + } + if (lookup.$length < 1 || lookup.$length > 2) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + _1 = (0 >= lookup.$length ? ($throwRuntimeError("index out of range"), undefined) : lookup.$array[lookup.$offset + 0]); + if (_1 === ("bind")) { + if (lookup.$length === 2) { + if ((1 >= lookup.$length ? ($throwRuntimeError("index out of range"), undefined) : lookup.$array[lookup.$offset + 1]) === "file") { + ret[0] = 2; + $s = -1; return ret[0]; + } + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + ret[0] = 4; + $s = -1; return ret[0]; + } else if (_1 === ("file")) { + if (lookup.$length === 2) { + if ((1 >= lookup.$length ? ($throwRuntimeError("index out of range"), undefined) : lookup.$array[lookup.$offset + 1]) === "bind") { + ret[0] = 1; + $s = -1; return ret[0]; + } + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + ret[0] = 3; + $s = -1; return ret[0]; + } else { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + } + if (stringsHasSuffix(hostname[0], ".")) { + hostname[0] = $substring(hostname[0], 0, (hostname[0].length - 1 >> 0)); + } + if (stringsHasSuffixFold(hostname[0], ".local")) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + nss = c.nss; + srcs = (_entry = nss.sources[$String.keyFor("hosts")], _entry !== undefined ? _entry.v : sliceType$5.nil); + if (os.IsNotExist(nss.err) || ($interfaceIsEqual(nss.err, $ifaceNil) && (srcs.$length === 0))) { + if (c.goos === "solaris") { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + if (c.goos === "linux") { + ret[0] = 2; + $s = -1; return ret[0]; + } + ret[0] = 1; + $s = -1; return ret[0]; + } + if (!($interfaceIsEqual(nss.err, $ifaceNil))) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + _tmp = false; + _tmp$1 = false; + _tmp$2 = false; + mdnsSource = _tmp; + filesSource = _tmp$1; + dnsSource = _tmp$2; + first = ""; + _ref = srcs; + _i = 0; + /* while (true) { */ case 3: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } + src = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), nssSource); + /* */ if (src.source === "myhostname") { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (src.source === "myhostname") { */ case 5: + if (isLocalhost(hostname[0]) || isGateway(hostname[0])) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + _r$9 = getHostname(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + hn = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || stringsEqualFold(hostname[0], hn)) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + _i++; + /* continue; */ $s = 3; continue; + /* } */ case 6: + if (src.source === "files" || src.source === "dns") { + if (!$clone(src, nssSource).standardCriteria()) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + if (src.source === "files") { + filesSource = true; + } else if (src.source === "dns") { + dnsSource = true; + } + if (first === "") { + first = src.source; + } + _i++; + /* continue; */ $s = 3; continue; + } + if (stringsHasPrefix(src.source, "mdns")) { + mdnsSource = true; + _i++; + /* continue; */ $s = 3; continue; + } + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + /* } */ $s = 3; continue; case 4: + if (mdnsSource && c.hasMDNSAllow) { + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + } + if (filesSource && dnsSource) { + if (first === "files") { + ret[0] = 1; + $s = -1; return ret[0]; + } else { + ret[0] = 2; + $s = -1; return ret[0]; + } + } else if (filesSource) { + ret[0] = 3; + $s = -1; return ret[0]; + } else if (dnsSource) { + ret[0] = 4; + $s = -1; return ret[0]; + } + ret[0] = fallbackOrder; + $s = -1; return ret[0]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return ret[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: conf.ptr.prototype.hostLookupOrder }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.c = c; $f.dnsSource = dnsSource; $f.err = err; $f.fallbackOrder = fallbackOrder; $f.filesSource = filesSource; $f.first = first; $f.hn = hn; $f.hostname = hostname; $f.lookup = lookup; $f.mdnsSource = mdnsSource; $f.nss = nss; $f.r = r; $f.ret = ret; $f.src = src; $f.srcs = srcs; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + conf.prototype.hostLookupOrder = function(r, hostname) { return this.$val.hostLookupOrder(r, hostname); }; + goDebugNetDNS = function() { + var _r$9, debugLevel, dnsMode, goDebug, i, parsePart, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; debugLevel = $f.debugLevel; dnsMode = $f.dnsMode; goDebug = $f.goDebug; i = $f.i; parsePart = $f.parsePart; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + debugLevel = [debugLevel]; + dnsMode = [dnsMode]; + dnsMode[0] = ""; + debugLevel[0] = 0; + _r$9 = goDebugString("netdns"); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + goDebug = _r$9; + parsePart = (function(debugLevel, dnsMode) { return function(s) { + var _tuple, s; + if (s === "") { + return; + } + if (48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57) { + _tuple = dtoi(s); + debugLevel[0] = _tuple[0]; + } else { + dnsMode[0] = s; + } + }; })(debugLevel, dnsMode); + i = byteIndex(goDebug, 43); + /* */ if (!((i === -1))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((i === -1))) { */ case 2: + $r = parsePart($substring(goDebug, 0, i)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = parsePart($substring(goDebug, (i + 1 >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [dnsMode[0], debugLevel[0]]; + /* } */ case 3: + $r = parsePart(goDebug); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [dnsMode[0], debugLevel[0]]; + /* */ } return; } if ($f === undefined) { $f = { $blk: goDebugNetDNS }; } $f._r$9 = _r$9; $f.debugLevel = debugLevel; $f.dnsMode = dnsMode; $f.goDebug = goDebug; $f.i = i; $f.parsePart = parsePart; $f.$s = $s; $f.$r = $r; return $f; + }; + isLocalhost = function(h) { + var h; + return stringsEqualFold(h, "localhost") || stringsEqualFold(h, "localhost.localdomain") || stringsHasSuffixFold(h, ".localhost") || stringsHasSuffixFold(h, ".localhost.localdomain"); + }; + isGateway = function(h) { + var h; + return stringsEqualFold(h, "gateway"); + }; + minNonzeroTime = function(a, b) { + var a, b; + if ($clone(a, time.Time).IsZero()) { + return b; + } + if ($clone(b, time.Time).IsZero() || $clone(a, time.Time).Before($clone(b, time.Time))) { + return a; + } + return b; + }; + Dialer.ptr.prototype.deadline = function(ctx, now) { + var _r$9, _tuple, ctx, d, d$1, earliest, now, ok, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; earliest = $f.earliest; now = $f.now; ok = $f.ok; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + earliest = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + d = this; + if (!((x = d.Timeout, (x.$high === 0 && x.$low === 0)))) { + time.Time.copy(earliest, $clone(now, time.Time).Add(d.Timeout)); + } + _r$9 = ctx.Deadline(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + d$1 = $clone(_tuple[0], time.Time); + ok = _tuple[1]; + if (ok) { + time.Time.copy(earliest, minNonzeroTime($clone(earliest, time.Time), $clone(d$1, time.Time))); + } + time.Time.copy(earliest, minNonzeroTime($clone(earliest, time.Time), $clone(d.Deadline, time.Time))); + $s = -1; return earliest; + /* */ } return; } if ($f === undefined) { $f = { $blk: Dialer.ptr.prototype.deadline }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.ctx = ctx; $f.d = d; $f.d$1 = d$1; $f.earliest = earliest; $f.now = now; $f.ok = ok; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Dialer.prototype.deadline = function(ctx, now) { return this.$val.deadline(ctx, now); }; + Dialer.ptr.prototype.resolver = function() { + var d; + d = this; + if (!(d.Resolver === ptrType$6.nil)) { + return d.Resolver; + } + return $pkg.DefaultResolver; + }; + Dialer.prototype.resolver = function() { return this.$val.resolver(); }; + partialDeadline = function(now, deadline, addrsRemaining) { + var addrsRemaining, deadline, now, timeRemaining, timeout$1; + if ($clone(deadline, time.Time).IsZero()) { + return [deadline, $ifaceNil]; + } + timeRemaining = $clone(deadline, time.Time).Sub($clone(now, time.Time)); + if ((timeRemaining.$high < 0 || (timeRemaining.$high === 0 && timeRemaining.$low <= 0))) { + return [new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), poll.ErrTimeout]; + } + timeout$1 = $div64(timeRemaining, (new time.Duration(0, addrsRemaining)), false); + if ((timeout$1.$high < 0 || (timeout$1.$high === 0 && timeout$1.$low < 2000000000))) { + if ((timeRemaining.$high < 0 || (timeRemaining.$high === 0 && timeRemaining.$low < 2000000000))) { + timeout$1 = timeRemaining; + } else { + timeout$1 = new time.Duration(0, 2000000000); + } + } + return [$clone(now, time.Time).Add(timeout$1), $ifaceNil]; + }; + Dialer.ptr.prototype.fallbackDelay = function() { + var d, x; + d = this; + if ((x = d.FallbackDelay, (x.$high > 0 || (x.$high === 0 && x.$low > 0)))) { + return d.FallbackDelay; + } else { + return new time.Duration(0, 300000000); + } + }; + Dialer.prototype.fallbackDelay = function() { return this.$val.fallbackDelay(); }; + parseNetwork = function(ctx, network, needsProto) { + var _1, _2, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, afnet, ctx, err, i, i$1, needsProto, network, ok, proto, proto$1, protostr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; afnet = $f.afnet; ctx = $f.ctx; err = $f.err; i = $f.i; i$1 = $f.i$1; needsProto = $f.needsProto; network = $f.network; ok = $f.ok; proto = $f.proto; proto$1 = $f.proto$1; protostr = $f.protostr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + afnet = ""; + proto = 0; + err = $ifaceNil; + i = last(network, 58); + if (i < 0) { + _1 = network; + if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6")) { + } else if (_1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { + } else if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { + if (needsProto) { + _tmp = ""; + _tmp$1 = 0; + _tmp$2 = new UnknownNetworkError((network)); + afnet = _tmp; + proto = _tmp$1; + err = _tmp$2; + $s = -1; return [afnet, proto, err]; + } + } else if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { + } else { + _tmp$3 = ""; + _tmp$4 = 0; + _tmp$5 = new UnknownNetworkError((network)); + afnet = _tmp$3; + proto = _tmp$4; + err = _tmp$5; + $s = -1; return [afnet, proto, err]; + } + _tmp$6 = network; + _tmp$7 = 0; + _tmp$8 = $ifaceNil; + afnet = _tmp$6; + proto = _tmp$7; + err = _tmp$8; + $s = -1; return [afnet, proto, err]; + } + afnet = $substring(network, 0, i); + _2 = afnet; + /* */ if (_2 === ("ip") || _2 === ("ip4") || _2 === ("ip6")) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (_2 === ("ip") || _2 === ("ip4") || _2 === ("ip6")) { */ case 2: + protostr = $substring(network, (i + 1 >> 0)); + _tuple = dtoi(protostr); + proto$1 = _tuple[0]; + i$1 = _tuple[1]; + ok = _tuple[2]; + /* */ if (!ok || !((i$1 === protostr.length))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!ok || !((i$1 === protostr.length))) { */ case 4: + _r$9 = lookupProtocol(ctx, protostr); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + proto$1 = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$9 = ""; + _tmp$10 = 0; + _tmp$11 = err; + afnet = _tmp$9; + proto = _tmp$10; + err = _tmp$11; + $s = -1; return [afnet, proto, err]; + } + /* } */ case 5: + _tmp$12 = afnet; + _tmp$13 = proto$1; + _tmp$14 = $ifaceNil; + afnet = _tmp$12; + proto = _tmp$13; + err = _tmp$14; + $s = -1; return [afnet, proto, err]; + /* } */ case 3: + case 1: + _tmp$15 = ""; + _tmp$16 = 0; + _tmp$17 = new UnknownNetworkError((network)); + afnet = _tmp$15; + proto = _tmp$16; + err = _tmp$17; + $s = -1; return [afnet, proto, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseNetwork }; } $f._1 = _1; $f._2 = _2; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.afnet = afnet; $f.ctx = ctx; $f.err = err; $f.i = i; $f.i$1 = i$1; $f.needsProto = needsProto; $f.network = network; $f.ok = ok; $f.proto = proto; $f.proto$1 = proto$1; $f.protostr = protostr; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.ptr.prototype.resolveAddrList = function(ctx, op, network, addr, hint) { + var _1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _v, addr, addr$1, addr$2, addr$3, addr$4, addr$5, addrs, afnet, ctx, err, err$1, hint, hint$1, hint$2, hint$3, ip, naddrs, network, op, r, tcp, udp, wildcard, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; addr = $f.addr; addr$1 = $f.addr$1; addr$2 = $f.addr$2; addr$3 = $f.addr$3; addr$4 = $f.addr$4; addr$5 = $f.addr$5; addrs = $f.addrs; afnet = $f.afnet; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; hint = $f.hint; hint$1 = $f.hint$1; hint$2 = $f.hint$2; hint$3 = $f.hint$3; ip = $f.ip; naddrs = $f.naddrs; network = $f.network; op = $f.op; r = $f.r; tcp = $f.tcp; udp = $f.udp; wildcard = $f.wildcard; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = parseNetwork(ctx, network, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + afnet = _tuple[0]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [addrList.nil, err]; + } + if (op === "dial" && addr === "") { + $s = -1; return [addrList.nil, errMissingAddress]; + } + _1 = afnet; + /* */ if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { */ case 3: + _tuple$1 = ResolveUnixAddr(afnet, addr); + addr$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [addrList.nil, err$1]; + } + if (!(op === "dial" && !($interfaceIsEqual(hint, $ifaceNil)))) { _v = false; $s = 7; continue s; } + _r$10 = hint.Network(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v = !(addr$1.Network() === _r$10); case 7: + /* */ if (_v) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_v) { */ case 5: + _r$11 = hint.String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return [addrList.nil, new AddrError.ptr("mismatched local address type", _r$11)]; + /* } */ case 6: + $s = -1; return [new addrList([addr$1]), $ifaceNil]; + /* } */ case 4: + case 2: + _r$12 = r.internetAddrList(ctx, afnet, addr); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + addrs = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || !(op === "dial") || $interfaceIsEqual(hint, $ifaceNil)) { + $s = -1; return [addrs, err]; + } + tcp = ptrType$7.nil; + udp = ptrType$5.nil; + ip = ptrType$8.nil; + wildcard = false; + _ref = hint; + if ($assertType(_ref, ptrType$7, true)[1]) { + hint$1 = _ref.$val; + tcp = hint$1; + wildcard = tcp.isWildcard(); + } else if ($assertType(_ref, ptrType$5, true)[1]) { + hint$2 = _ref.$val; + udp = hint$2; + wildcard = udp.isWildcard(); + } else if ($assertType(_ref, ptrType$8, true)[1]) { + hint$3 = _ref.$val; + ip = hint$3; + wildcard = ip.isWildcard(); + } + naddrs = $subslice(addrs, 0, 0); + _ref$1 = addrs; + _i = 0; + /* while (true) { */ case 11: + /* if (!(_i < _ref$1.$length)) { break; } */ if(!(_i < _ref$1.$length)) { $s = 12; continue; } + addr$2 = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); + _r$13 = addr$2.Network(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$14 = hint.Network(); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + /* */ if (!(_r$13 === _r$14)) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!(_r$13 === _r$14)) { */ case 13: + _r$15 = hint.String(); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return [addrList.nil, new AddrError.ptr("mismatched local address type", _r$15)]; + /* } */ case 14: + _ref$2 = addr$2; + /* */ if ($assertType(_ref$2, ptrType$7, true)[1]) { $s = 18; continue; } + /* */ if ($assertType(_ref$2, ptrType$5, true)[1]) { $s = 19; continue; } + /* */ if ($assertType(_ref$2, ptrType$8, true)[1]) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if ($assertType(_ref$2, ptrType$7, true)[1]) { */ case 18: + addr$3 = _ref$2.$val; + if (!wildcard && !addr$3.isWildcard() && !addr$3.IP.matchAddrFamily(tcp.IP)) { + _i++; + /* continue; */ $s = 11; continue; + } + naddrs = $append(naddrs, addr$3); + $s = 21; continue; + /* } else if ($assertType(_ref$2, ptrType$5, true)[1]) { */ case 19: + addr$4 = _ref$2.$val; + if (!wildcard && !addr$4.isWildcard() && !addr$4.IP.matchAddrFamily(udp.IP)) { + _i++; + /* continue; */ $s = 11; continue; + } + naddrs = $append(naddrs, addr$4); + $s = 21; continue; + /* } else if ($assertType(_ref$2, ptrType$8, true)[1]) { */ case 20: + addr$5 = _ref$2.$val; + if (!wildcard && !addr$5.isWildcard() && !addr$5.IP.matchAddrFamily(ip.IP)) { + _i++; + /* continue; */ $s = 11; continue; + } + naddrs = $append(naddrs, addr$5); + /* } */ case 21: + _i++; + /* } */ $s = 11; continue; case 12: + /* */ if (naddrs.$length === 0) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (naddrs.$length === 0) { */ case 22: + _r$16 = errNoSuitableAddress.Error(); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$17 = hint.String(); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + $s = -1; return [addrList.nil, new AddrError.ptr(_r$16, _r$17)]; + /* } */ case 23: + $s = -1; return [naddrs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.resolveAddrList }; } $f._1 = _1; $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f.addr = addr; $f.addr$1 = addr$1; $f.addr$2 = addr$2; $f.addr$3 = addr$3; $f.addr$4 = addr$4; $f.addr$5 = addr$5; $f.addrs = addrs; $f.afnet = afnet; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.hint = hint; $f.hint$1 = hint$1; $f.hint$2 = hint$2; $f.hint$3 = hint$3; $f.ip = ip; $f.naddrs = naddrs; $f.network = network; $f.op = op; $f.r = r; $f.tcp = tcp; $f.udp = udp; $f.wildcard = wildcard; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.resolveAddrList = function(ctx, op, network, addr, hint) { return this.$val.resolveAddrList(ctx, op, network, addr, hint); }; + Dial = function(network, address) { + var address, d, network; + d = new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$6.nil, $chanNil, $throwNilPointerError); + return d.Dial(network, address); + }; + $pkg.Dial = Dial; + Dialer.ptr.prototype.DialContext = function(ctx, network, address) { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, address, addrs, c, cancel, cancel$1, ctx, d, d$1, deadline, err, fallbacks, network, ok, ok$1, oldCancel, primaries, resolveCtx, sd, shadow, subCtx, subCtx$1, tc, trace, x, x$1, x$2, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$20 = $f._r$20; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; address = $f.address; addrs = $f.addrs; c = $f.c; cancel = $f.cancel; cancel$1 = $f.cancel$1; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; deadline = $f.deadline; err = $f.err; fallbacks = $f.fallbacks; network = $f.network; ok = $f.ok; ok$1 = $f.ok$1; oldCancel = $f.oldCancel; primaries = $f.primaries; resolveCtx = $f.resolveCtx; sd = $f.sd; shadow = $f.shadow; subCtx = $f.subCtx; subCtx$1 = $f.subCtx$1; tc = $f.tc; trace = $f.trace; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cancel = [cancel]; + oldCancel = [oldCancel]; + shadow = [shadow]; + subCtx = [subCtx]; + d = this; + if ($interfaceIsEqual(ctx, $ifaceNil)) { + $panic(new $String("nil context")); + } + _r$9 = d.deadline(ctx, $clone(time.Now(), time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + deadline = $clone(_r$9, time.Time); + /* */ if (!$clone(deadline, time.Time).IsZero()) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!$clone(deadline, time.Time).IsZero()) { */ case 2: + _r$10 = ctx.Deadline(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + d$1 = $clone(_tuple[0], time.Time); + ok = _tuple[1]; + /* */ if (!ok || $clone(deadline, time.Time).Before($clone(d$1, time.Time))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!ok || $clone(deadline, time.Time).Before($clone(d$1, time.Time))) { */ case 5: + _r$11 = context.WithDeadline(ctx, $clone(deadline, time.Time)); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + subCtx$1 = _tuple$1[0]; + cancel$1 = _tuple$1[1]; + $deferred.push([cancel$1, []]); + ctx = subCtx$1; + /* } */ case 6: + /* } */ case 3: + oldCancel[0] = d.Cancel; + /* */ if (!(oldCancel[0] === $chanNil)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!(oldCancel[0] === $chanNil)) { */ case 8: + _r$12 = context.WithCancel(ctx); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + subCtx[0] = _tuple$2[0]; + cancel[0] = _tuple$2[1]; + $deferred.push([cancel[0], []]); + $go((function(cancel, oldCancel, shadow, subCtx) { return function $b() { + var _r$13, _r$14, _selection, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$13 = $f._r$13; _r$14 = $f._r$14; _selection = $f._selection; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$13 = subCtx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$14 = $select([[oldCancel[0]], [_r$13]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _selection = _r$14; + /* */ if (_selection[0] === 0) { $s = 3; continue; } + /* */ if (_selection[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 3: + $r = cancel[0](); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else if (_selection[0] === 1) { */ case 4: + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$13 = _r$13; $f._r$14 = _r$14; $f._selection = _selection; $f.$s = $s; $f.$r = $r; return $f; + }; })(cancel, oldCancel, shadow, subCtx), []); + ctx = subCtx[0]; + /* } */ case 9: + resolveCtx = ctx; + _r$13 = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$3 = $assertType(_r$13, ptrType$9, true); + trace = _tuple$3[0]; + /* */ if (!(trace === ptrType$9.nil)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!(trace === ptrType$9.nil)) { */ case 12: + shadow[0] = $clone(trace, nettrace.Trace); + shadow[0].ConnectStart = $throwNilPointerError; + shadow[0].ConnectDone = $throwNilPointerError; + _r$14 = context.WithValue(resolveCtx, (x$1 = new nettrace.TraceKey.ptr(), new x$1.constructor.elem(x$1)), shadow[0]); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + resolveCtx = _r$14; + /* } */ case 13: + _r$15 = d.resolver().resolveAddrList(resolveCtx, "dial", network, address, d.LocalAddr); /* */ $s = 15; case 15: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$4 = _r$15; + addrs = _tuple$4[0]; + err = _tuple$4[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, new OpError.ptr("dial", network, $ifaceNil, $ifaceNil, err)]; + } + sd = new sysDialer.ptr($clone(d, Dialer), network, address); + _tmp = addrList.nil; + _tmp$1 = addrList.nil; + primaries = _tmp; + fallbacks = _tmp$1; + /* */ if (d.DualStack && network === "tcp") { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (d.DualStack && network === "tcp") { */ case 16: + _r$16 = addrs.partition(isIPv4); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$5 = _r$16; + primaries = _tuple$5[0]; + fallbacks = _tuple$5[1]; + $s = 18; continue; + /* } else { */ case 17: + primaries = addrs; + /* } */ case 18: + c = $ifaceNil; + /* */ if (fallbacks.$length > 0) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (fallbacks.$length > 0) { */ case 20: + _r$17 = sd.dialParallel(ctx, primaries, fallbacks); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tuple$6 = _r$17; + c = _tuple$6[0]; + err = _tuple$6[1]; + $s = 22; continue; + /* } else { */ case 21: + _r$18 = sd.dialSerial(ctx, primaries); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _tuple$7 = _r$18; + c = _tuple$7[0]; + err = _tuple$7[1]; + /* } */ case 22: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + _tuple$8 = $assertType(c, ptrType$10, true); + tc = _tuple$8[0]; + ok$1 = _tuple$8[1]; + /* */ if (ok$1 && (x$2 = d.KeepAlive, (x$2.$high > 0 || (x$2.$high === 0 && x$2.$low > 0)))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (ok$1 && (x$2 = d.KeepAlive, (x$2.$high > 0 || (x$2.$high === 0 && x$2.$low > 0)))) { */ case 25: + _r$19 = setKeepAlive(tc.conn.fd, true); /* */ $s = 27; case 27: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _r$19; + _r$20 = setKeepAlivePeriod(tc.conn.fd, d.KeepAlive); /* */ $s = 28; case 28: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _r$20; + $r = testHookSetKeepAlive(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + $s = -1; return [c, $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Dialer.ptr.prototype.DialContext }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$20 = _r$20; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f.address = address; $f.addrs = addrs; $f.c = c; $f.cancel = cancel; $f.cancel$1 = cancel$1; $f.ctx = ctx; $f.d = d; $f.d$1 = d$1; $f.deadline = deadline; $f.err = err; $f.fallbacks = fallbacks; $f.network = network; $f.ok = ok; $f.ok$1 = ok$1; $f.oldCancel = oldCancel; $f.primaries = primaries; $f.resolveCtx = resolveCtx; $f.sd = sd; $f.shadow = shadow; $f.subCtx = subCtx; $f.subCtx$1 = subCtx$1; $f.tc = tc; $f.trace = trace; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Dialer.prototype.DialContext = function(ctx, network, address) { return this.$val.DialContext(ctx, network, address); }; + sysDialer.ptr.prototype.dialParallel = function(ctx, primaries, fallbacks) { + var _arg, _r$10, _r$11, _r$12, _r$9, _selection, _tmp, _tmp$1, _tuple, _tuple$1, ctx, fallback, fallbackCancel, fallbackCtx, fallbackTimer, fallbacks, primaries, primary, primaryCancel, primaryCtx, res, results, returned, sd, startRacer, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _selection = $f._selection; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ctx = $f.ctx; fallback = $f.fallback; fallbackCancel = $f.fallbackCancel; fallbackCtx = $f.fallbackCtx; fallbackTimer = $f.fallbackTimer; fallbacks = $f.fallbacks; primaries = $f.primaries; primary = $f.primary; primaryCancel = $f.primaryCancel; primaryCtx = $f.primaryCtx; res = $f.res; results = $f.results; returned = $f.returned; sd = $f.sd; startRacer = $f.startRacer; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + fallbacks = [fallbacks]; + primaries = [primaries]; + results = [results]; + returned = [returned]; + sd = [sd]; + sd[0] = this; + /* */ if (fallbacks[0].$length === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (fallbacks[0].$length === 0) { */ case 1: + _r$9 = sd[0].dialSerial(ctx, primaries[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 2: + returned[0] = new $Chan(structType$1, 0); + $deferred.push([function(_arg) { $close(_arg); }, [returned[0]]]); + results[0] = new $Chan(dialResult, 0); + startRacer = (function(fallbacks, primaries, results, returned, sd) { return function $b(ctx$1, primary) { + var _r$10, _r$11, _r$12, _selection, _tuple, c, ctx$1, err, primary, ras, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _selection = $f._selection; _tuple = $f._tuple; c = $f.c; ctx$1 = $f.ctx$1; err = $f.err; primary = $f.primary; ras = $f.ras; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ras = primaries[0]; + if (!primary) { + ras = fallbacks[0]; + } + _r$10 = sd[0].dialSerial(ctx$1, ras); /* */ $s = 1; case 1: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + c = _tuple[0]; + err = _tuple[1]; + _r$11 = $select([[results[0], new dialResult.ptr(c, err, primary, true)], [returned[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _selection = _r$11; + /* */ if (_selection[0] === 0) { $s = 3; continue; } + /* */ if (_selection[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 3: + $s = 5; continue; + /* } else if (_selection[0] === 1) { */ case 4: + /* */ if (!($interfaceIsEqual(c, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(c, $ifaceNil))) { */ case 6: + _r$12 = c.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + /* } */ case 7: + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._selection = _selection; $f._tuple = _tuple; $f.c = c; $f.ctx$1 = ctx$1; $f.err = err; $f.primary = primary; $f.ras = ras; $f.$s = $s; $f.$r = $r; return $f; + }; })(fallbacks, primaries, results, returned, sd); + _tmp = new dialResult.ptr($ifaceNil, $ifaceNil, false, false); + _tmp$1 = new dialResult.ptr($ifaceNil, $ifaceNil, false, false); + primary = $clone(_tmp, dialResult); + fallback = $clone(_tmp$1, dialResult); + _r$10 = context.WithCancel(ctx); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + primaryCtx = _tuple[0]; + primaryCancel = _tuple[1]; + $deferred.push([primaryCancel, []]); + $go(startRacer, [primaryCtx, true]); + fallbackTimer = time.NewTimer(sd[0].Dialer.fallbackDelay()); + $deferred.push([$methodVal(fallbackTimer, "Stop"), []]); + /* while (true) { */ case 5: + _r$11 = $select([[fallbackTimer.C], [results[0]]]); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _selection = _r$11; + /* */ if (_selection[0] === 0) { $s = 8; continue; } + /* */ if (_selection[0] === 1) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_selection[0] === 0) { */ case 8: + _r$12 = context.WithCancel(ctx); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$1 = _r$12; + fallbackCtx = _tuple$1[0]; + fallbackCancel = _tuple$1[1]; + $deferred.push([fallbackCancel, []]); + $go(startRacer, [fallbackCtx, false]); + $s = 10; continue; + /* } else if (_selection[0] === 1) { */ case 9: + res = $clone(_selection[1][0], dialResult); + if ($interfaceIsEqual(res.error, $ifaceNil)) { + $s = -1; return [res.Conn, $ifaceNil]; + } + if (res.primary) { + dialResult.copy(primary, res); + } else { + dialResult.copy(fallback, res); + } + if (primary.done && fallback.done) { + $s = -1; return [$ifaceNil, primary.error]; + } + if (res.primary && fallbackTimer.Stop()) { + fallbackTimer.Reset(new time.Duration(0, 0)); + } + /* } */ case 10: + /* } */ $s = 5; continue; case 6: + $s = -1; return [$ifaceNil, $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialParallel }; } $f._arg = _arg; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._selection = _selection; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ctx = ctx; $f.fallback = fallback; $f.fallbackCancel = fallbackCancel; $f.fallbackCtx = fallbackCtx; $f.fallbackTimer = fallbackTimer; $f.fallbacks = fallbacks; $f.primaries = primaries; $f.primary = primary; $f.primaryCancel = primaryCancel; $f.primaryCtx = primaryCtx; $f.res = res; $f.results = results; $f.returned = returned; $f.sd = sd; $f.startRacer = startRacer; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + sysDialer.prototype.dialParallel = function(ctx, primaries, fallbacks) { return this.$val.dialParallel(ctx, primaries, fallbacks); }; + sysDialer.ptr.prototype.dialSerial = function(ctx, ras) { + var _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _ref, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, c, cancel, ctx, deadline, dialCtx, err, firstErr, i, partialDeadline$1, ra, ras, sd, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _ref = $f._ref; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; c = $f.c; cancel = $f.cancel; ctx = $f.ctx; deadline = $f.deadline; dialCtx = $f.dialCtx; err = $f.err; firstErr = $f.firstErr; i = $f.i; partialDeadline$1 = $f.partialDeadline$1; ra = $f.ra; ras = $f.ras; sd = $f.sd; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + sd = this; + firstErr = $ifaceNil; + _ref = ras; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + ra = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$9 = ctx.Done(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _selection = $select([[_r$9], []]); + /* */ if (_selection[0] === 0) { $s = 4; continue; } + /* */ if (_selection[0] === 1) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_selection[0] === 0) { */ case 4: + _r$10 = ctx.Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$11 = mapErr(_r$10); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, new OpError.ptr("dial", sd.network, sd.Dialer.LocalAddr, ra, _r$11)]; + /* } else if (_selection[0] === 1) { */ case 5: + /* } */ case 6: + _r$12 = ctx.Deadline(); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple = _r$12; + deadline = $clone(_tuple[0], time.Time); + _tuple$1 = partialDeadline($clone(time.Now(), time.Time), $clone(deadline, time.Time), ras.$length - i >> 0); + partialDeadline$1 = $clone(_tuple$1[0], time.Time); + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(firstErr, $ifaceNil)) { + firstErr = new OpError.ptr("dial", sd.network, sd.Dialer.LocalAddr, ra, err); + } + /* break; */ $s = 2; continue; + } + dialCtx = ctx; + /* */ if ($clone(partialDeadline$1, time.Time).Before($clone(deadline, time.Time))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ($clone(partialDeadline$1, time.Time).Before($clone(deadline, time.Time))) { */ case 10: + cancel = $throwNilPointerError; + _r$13 = context.WithDeadline(ctx, $clone(partialDeadline$1, time.Time)); /* */ $s = 12; case 12: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$2 = _r$13; + dialCtx = _tuple$2[0]; + cancel = _tuple$2[1]; + $deferred.push([cancel, []]); + /* } */ case 11: + _r$14 = sd.dialSingle(dialCtx, ra); /* */ $s = 13; case 13: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$3 = _r$14; + c = _tuple$3[0]; + err = _tuple$3[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return [c, $ifaceNil]; + } + if ($interfaceIsEqual(firstErr, $ifaceNil)) { + firstErr = err; + } + _i++; + /* } */ $s = 1; continue; case 2: + if ($interfaceIsEqual(firstErr, $ifaceNil)) { + firstErr = new OpError.ptr("dial", sd.network, $ifaceNil, $ifaceNil, errMissingAddress); + } + $s = -1; return [$ifaceNil, firstErr]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialSerial }; } $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._ref = _ref; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.c = c; $f.cancel = cancel; $f.ctx = ctx; $f.deadline = deadline; $f.dialCtx = dialCtx; $f.err = err; $f.firstErr = firstErr; $f.i = i; $f.partialDeadline$1 = partialDeadline$1; $f.ra = ra; $f.ras = ras; $f.sd = sd; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + sysDialer.prototype.dialSerial = function(ctx, ras) { return this.$val.dialSerial(ctx, ras); }; + sysDialer.ptr.prototype.dialSingle = function(ctx, ra) { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, c, ctx, err, la, la$1, la$2, la$3, la$4, ra, ra$1, ra$2, ra$3, ra$4, ra$5, raStr, sd, trace, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; c = $f.c; ctx = $f.ctx; err = $f.err; la = $f.la; la$1 = $f.la$1; la$2 = $f.la$2; la$3 = $f.la$3; la$4 = $f.la$4; ra = $f.ra; ra$1 = $f.ra$1; ra$2 = $f.ra$2; ra$3 = $f.ra$3; ra$4 = $f.ra$4; ra$5 = $f.ra$5; raStr = $f.raStr; sd = $f.sd; trace = $f.trace; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + raStr = [raStr]; + sd = [sd]; + trace = [trace]; + c = $ifaceNil; + err[0] = $ifaceNil; + sd[0] = this; + _r$9 = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = $assertType(_r$9, ptrType$9, true); + trace[0] = _tuple[0]; + /* */ if (!(trace[0] === ptrType$9.nil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(trace[0] === ptrType$9.nil)) { */ case 2: + _r$10 = ra.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + raStr[0] = _r$10; + /* */ if (!(trace[0].ConnectStart === $throwNilPointerError)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!(trace[0].ConnectStart === $throwNilPointerError)) { */ case 5: + $r = trace[0].ConnectStart(sd[0].network, raStr[0]); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + /* */ if (!(trace[0].ConnectDone === $throwNilPointerError)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!(trace[0].ConnectDone === $throwNilPointerError)) { */ case 8: + $deferred.push([(function(err, raStr, sd, trace) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = trace[0].ConnectDone(sd[0].network, raStr[0], err[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(err, raStr, sd, trace), []]); + /* } */ case 9: + /* } */ case 3: + la = sd[0].Dialer.LocalAddr; + _ref = ra; + /* */ if ($assertType(_ref, ptrType$7, true)[1]) { $s = 10; continue; } + /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 11; continue; } + /* */ if ($assertType(_ref, ptrType$8, true)[1]) { $s = 12; continue; } + /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if ($assertType(_ref, ptrType$7, true)[1]) { */ case 10: + ra$1 = _ref.$val; + _tuple$1 = $assertType(la, ptrType$7, true); + la$1 = _tuple$1[0]; + _r$11 = sd[0].dialTCP(ctx, la$1, ra$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + c = _tuple$2[0]; + err[0] = _tuple$2[1]; + $s = 15; continue; + /* } else if ($assertType(_ref, ptrType$5, true)[1]) { */ case 11: + ra$2 = _ref.$val; + _tuple$3 = $assertType(la, ptrType$5, true); + la$2 = _tuple$3[0]; + _r$12 = sd[0].dialUDP(ctx, la$2, ra$2); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$4 = _r$12; + c = _tuple$4[0]; + err[0] = _tuple$4[1]; + $s = 15; continue; + /* } else if ($assertType(_ref, ptrType$8, true)[1]) { */ case 12: + ra$3 = _ref.$val; + _tuple$5 = $assertType(la, ptrType$8, true); + la$3 = _tuple$5[0]; + _r$13 = sd[0].dialIP(ctx, la$3, ra$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$6 = _r$13; + c = _tuple$6[0]; + err[0] = _tuple$6[1]; + $s = 15; continue; + /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 13: + ra$4 = _ref.$val; + _tuple$7 = $assertType(la, ptrType$11, true); + la$4 = _tuple$7[0]; + _r$14 = sd[0].dialUnix(ctx, la$4, ra$4); /* */ $s = 19; case 19: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$8 = _r$14; + c = _tuple$8[0]; + err[0] = _tuple$8[1]; + $s = 15; continue; + /* } else { */ case 14: + ra$5 = _ref; + _tmp = $ifaceNil; + _tmp$1 = new OpError.ptr("dial", sd[0].network, la, ra$5, new AddrError.ptr("unexpected address type", sd[0].address)); + c = _tmp; + err[0] = _tmp$1; + $s = -1; return [c, err[0]]; + /* } */ case 15: + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + _tmp$2 = $ifaceNil; + _tmp$3 = new OpError.ptr("dial", sd[0].network, la, ra, err[0]); + c = _tmp$2; + err[0] = _tmp$3; + $s = -1; return [c, err[0]]; + } + _tmp$4 = c; + _tmp$5 = $ifaceNil; + c = _tmp$4; + err[0] = _tmp$5; + $s = -1; return [c, err[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [c, err[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialSingle }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f.c = c; $f.ctx = ctx; $f.err = err; $f.la = la; $f.la$1 = la$1; $f.la$2 = la$2; $f.la$3 = la$3; $f.la$4 = la$4; $f.ra = ra; $f.ra$1 = ra$1; $f.ra$2 = ra$2; $f.ra$3 = ra$3; $f.ra$4 = ra$4; $f.ra$5 = ra$5; $f.raStr = raStr; $f.sd = sd; $f.trace = trace; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + sysDialer.prototype.dialSingle = function(ctx, ra) { return this.$val.dialSingle(ctx, ra); }; + reverseaddr = function(addr) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, addr, arpa, buf, err, i, ip, v; + arpa = ""; + err = $ifaceNil; + ip = ParseIP(addr); + if (ip === IP.nil) { + _tmp = ""; + _tmp$1 = new DNSError.ptr("unrecognized address", addr, "", false, false); + arpa = _tmp; + err = _tmp$1; + return [arpa, err]; + } + if (!(ip.To4() === IP.nil)) { + _tmp$2 = uitoa((((15 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 15]) >>> 0))) + "." + uitoa((((14 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 14]) >>> 0))) + "." + uitoa((((13 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 13]) >>> 0))) + "." + uitoa((((12 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 12]) >>> 0))) + ".in-addr.arpa."; + _tmp$3 = $ifaceNil; + arpa = _tmp$2; + err = _tmp$3; + return [arpa, err]; + } + buf = $makeSlice(sliceType$1, 0, (($imul(ip.$length, 4)) + 9 >> 0)); + i = ip.$length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + v = ((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]); + buf = $append(buf, "0123456789abcdef".charCodeAt(((v & 15) >>> 0))); + buf = $append(buf, 46); + buf = $append(buf, "0123456789abcdef".charCodeAt((v >>> 4 << 24 >>> 24))); + buf = $append(buf, 46); + i = i - (1) >> 0; + } + buf = $appendSlice(buf, "ip6.arpa."); + _tmp$4 = ($bytesToString(buf)); + _tmp$5 = $ifaceNil; + arpa = _tmp$4; + err = _tmp$5; + return [arpa, err]; + }; + equalASCIIName = function(x, y) { + var a, b, i, x, x$1, x$2, y; + if (!((x.Length === y.Length))) { + return false; + } + i = 0; + while (true) { + if (!(i < ((x.Length >> 0)))) { break; } + a = (x$1 = x.Data, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])); + b = (x$2 = y.Data, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])); + if (65 <= a && a <= 90) { + a = a + (32) << 24 >>> 24; + } + if (65 <= b && b <= 90) { + b = b + (32) << 24 >>> 24; + } + if (!((a === b))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + isDomainName = function(s) { + var c, i, l, last$1, ok, partlen, s; + l = s.length; + if ((l === 0) || l > 254 || (l === 254) && !((s.charCodeAt((l - 1 >> 0)) === 46))) { + return false; + } + last$1 = 46; + ok = false; + partlen = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (97 <= c && c <= 122 || 65 <= c && c <= 90 || (c === 95)) { + ok = true; + partlen = partlen + (1) >> 0; + } else if (48 <= c && c <= 57) { + partlen = partlen + (1) >> 0; + } else if ((c === 45)) { + if (last$1 === 46) { + return false; + } + partlen = partlen + (1) >> 0; + } else if ((c === 46)) { + if ((last$1 === 46) || (last$1 === 45)) { + return false; + } + if (partlen > 63 || (partlen === 0)) { + return false; + } + partlen = 0; + } else { + return false; + } + last$1 = c; + i = i + (1) >> 0; + } + if ((last$1 === 45) || partlen > 63) { + return false; + } + return ok; + }; + absDomainName = function(b) { + var _i, _ref, b, hasDots, x, x$1; + hasDots = false; + _ref = b; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (x === 46) { + hasDots = true; + break; + } + _i++; + } + if (hasDots && !(((x$1 = b.$length - 1 >> 0, ((x$1 < 0 || x$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$1])) === 46))) { + b = $append(b, 46); + } + return ($bytesToString(b)); + }; + byPriorityWeight.prototype.Len = function() { + var s; + s = this; + return s.$length; + }; + $ptrType(byPriorityWeight).prototype.Len = function() { return this.$get().Len(); }; + byPriorityWeight.prototype.Less = function(i, j) { + var i, j, s; + s = this; + return ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Priority < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).Priority || ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Priority === ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).Priority) && ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Weight < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).Weight); + }; + $ptrType(byPriorityWeight).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + byPriorityWeight.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, s; + s = this; + _tmp = ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]); + _tmp$1 = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = _tmp); + ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j] = _tmp$1); + }; + $ptrType(byPriorityWeight).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + byPriorityWeight.prototype.shuffleByWeight = function() { + var _i, _i$1, _r$9, _ref, _ref$1, _tmp, _tmp$1, addr, addrs, i, n, s, sum, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; addr = $f.addr; addrs = $f.addrs; i = $f.i; n = $f.n; s = $f.s; sum = $f.sum; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = this; + sum = 0; + _ref = addrs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + sum = sum + (((addr.Weight >> 0))) >> 0; + _i++; + } + /* while (true) { */ case 1: + /* if (!(sum > 0 && addrs.$length > 1)) { break; } */ if(!(sum > 0 && addrs.$length > 1)) { $s = 2; continue; } + s = 0; + _r$9 = rand.Intn(sum); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + n = _r$9; + _ref$1 = addrs; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + s = s + (((((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]).Weight >> 0))) >> 0; + if (s > n) { + if (i > 0) { + _tmp = ((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]); + _tmp$1 = (0 >= addrs.$length ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + 0]); + (0 >= addrs.$length ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + 0] = _tmp); + ((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i] = _tmp$1); + } + break; + } + _i$1++; + } + sum = sum - ((((0 >= addrs.$length ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + 0]).Weight >> 0))) >> 0; + addrs = $subslice(addrs, 1); + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: byPriorityWeight.prototype.shuffleByWeight }; } $f._i = _i; $f._i$1 = _i$1; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.addr = addr; $f.addrs = addrs; $f.i = i; $f.n = n; $f.s = s; $f.sum = sum; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(byPriorityWeight).prototype.shuffleByWeight = function() { return this.$get().shuffleByWeight(); }; + byPriorityWeight.prototype.sort = function() { + var addrs, i, j, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; addrs = $f.addrs; i = $f.i; j = $f.j; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = this; + $r = sort.Sort(addrs); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = 0; + j = 1; + /* while (true) { */ case 2: + /* if (!(j < addrs.$length)) { break; } */ if(!(j < addrs.$length)) { $s = 3; continue; } + /* */ if (!((((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]).Priority === ((j < 0 || j >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + j]).Priority))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((((i < 0 || i >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + i]).Priority === ((j < 0 || j >= addrs.$length) ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + j]).Priority))) { */ case 4: + $r = $subslice(addrs, i, j).shuffleByWeight(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = j; + /* } */ case 5: + j = j + (1) >> 0; + /* } */ $s = 2; continue; case 3: + $r = $subslice(addrs, i).shuffleByWeight(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: byPriorityWeight.prototype.sort }; } $f.addrs = addrs; $f.i = i; $f.j = j; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(byPriorityWeight).prototype.sort = function() { return this.$get().sort(); }; + byPref.prototype.Len = function() { + var s; + s = this; + return s.$length; + }; + $ptrType(byPref).prototype.Len = function() { return this.$get().Len(); }; + byPref.prototype.Less = function(i, j) { + var i, j, s; + s = this; + return ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Pref < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).Pref; + }; + $ptrType(byPref).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + byPref.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, s; + s = this; + _tmp = ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]); + _tmp$1 = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = _tmp); + ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j] = _tmp$1); + }; + $ptrType(byPref).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + byPref.prototype.sort = function() { + var _i, _r$9, _ref, _tmp, _tmp$1, i, j, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; i = $f.i; j = $f.j; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + _ref = s; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + _r$9 = rand.Intn(i + 1 >> 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + j = _r$9; + _tmp = ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]); + _tmp$1 = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = _tmp); + ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j] = _tmp$1); + _i++; + /* } */ $s = 1; continue; case 2: + $r = sort.Sort(s); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: byPref.prototype.sort }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.i = i; $f.j = j; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(byPref).prototype.sort = function() { return this.$get().sort(); }; + newRequest = function(q) { + var _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, err$1, err$2, id, l, q, tcpReq, udpReq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; b = $f.b; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; id = $f.id; l = $f.l; q = $f.q; tcpReq = $f.tcpReq; udpReq = $f.udpReq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + id = 0; + udpReq = sliceType$1.nil; + tcpReq = sliceType$1.nil; + err = $ifaceNil; + _r$9 = rand.Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + id = (((_r$9 << 16 >>> 16)) ^ (($clone(time.Now(), time.Time).UnixNano().$low << 16 >>> 16))) << 16 >>> 16; + b = $clone(dnsmessage.NewBuilder($makeSlice(sliceType$1, 2, 514), new dnsmessage.Header.ptr(id, false, 0, false, false, true, false, 0)), dnsmessage.Builder); + b.EnableCompression(); + err$1 = b.StartQuestions(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = 0; + _tmp$1 = sliceType$1.nil; + _tmp$2 = sliceType$1.nil; + _tmp$3 = err$1; + id = _tmp; + udpReq = _tmp$1; + tcpReq = _tmp$2; + err = _tmp$3; + $s = -1; return [id, udpReq, tcpReq, err]; + } + err$2 = b.Question($clone(q, dnsmessage.Question)); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = sliceType$1.nil; + _tmp$6 = sliceType$1.nil; + _tmp$7 = err$2; + id = _tmp$4; + udpReq = _tmp$5; + tcpReq = _tmp$6; + err = _tmp$7; + $s = -1; return [id, udpReq, tcpReq, err]; + } + _tuple = b.Finish(); + tcpReq = _tuple[0]; + err = _tuple[1]; + udpReq = $subslice(tcpReq, 2); + l = tcpReq.$length - 2 >> 0; + (0 >= tcpReq.$length ? ($throwRuntimeError("index out of range"), undefined) : tcpReq.$array[tcpReq.$offset + 0] = (((l >> 8 >> 0) << 24 >>> 24))); + (1 >= tcpReq.$length ? ($throwRuntimeError("index out of range"), undefined) : tcpReq.$array[tcpReq.$offset + 1] = ((l << 24 >>> 24))); + _tmp$8 = id; + _tmp$9 = udpReq; + _tmp$10 = tcpReq; + _tmp$11 = err; + id = _tmp$8; + udpReq = _tmp$9; + tcpReq = _tmp$10; + err = _tmp$11; + $s = -1; return [id, udpReq, tcpReq, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: newRequest }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.id = id; $f.l = l; $f.q = q; $f.tcpReq = tcpReq; $f.udpReq = udpReq; $f.$s = $s; $f.$r = $r; return $f; + }; + checkResponse = function(reqID, reqQues, respHdr, respQues) { + var reqID, reqQues, respHdr, respQues; + if (!respHdr.Response) { + return false; + } + if (!((reqID === respHdr.ID))) { + return false; + } + if (!((reqQues.Type === respQues.Type)) || !((reqQues.Class === respQues.Class)) || !equalASCIIName($clone(reqQues.Name, dnsmessage.Name), $clone(respQues.Name, dnsmessage.Name))) { + return false; + } + return true; + }; + dnsPacketRoundTrip = function(c, id, query, b) { + var _r$10, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, c, err, err$1, h, id, n, p, q, query, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; b = $f.b; c = $f.c; err = $f.err; err$1 = $f.err$1; h = $f.h; id = $f.id; n = $f.n; p = $f.p; q = $f.q; query = $f.query; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = c.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err]; + } + b = $makeSlice(sliceType$1, 512); + /* while (true) { */ case 2: + _r$10 = c.Read(b); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + n = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err$1]; + } + p = new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)); + _tuple$2 = p.Start($subslice(b, 0, n)); + h = $clone(_tuple$2[0], dnsmessage.Header); + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + /* continue; */ $s = 2; continue; + } + _tuple$3 = p.Question(); + q = $clone(_tuple$3[0], dnsmessage.Question); + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil)) || !checkResponse(id, $clone(query, dnsmessage.Question), $clone(h, dnsmessage.Header), $clone(q, dnsmessage.Question))) { + /* continue; */ $s = 2; continue; + } + $s = -1; return [p, h, $ifaceNil]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: dnsPacketRoundTrip }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.b = b; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.h = h; $f.id = id; $f.n = n; $f.p = p; $f.q = q; $f.query = query; $f.$s = $s; $f.$r = $r; return $f; + }; + dnsStreamRoundTrip = function(c, id, query, b) { + var _r$10, _r$11, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, c, err, err$1, err$2, h, id, l, n, p, q, query, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; b = $f.b; c = $f.c; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; id = $f.id; l = $f.l; n = $f.n; p = $f.p; q = $f.q; query = $f.query; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = c.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err]; + } + b = $makeSlice(sliceType$1, 1280); + _r$10 = io.ReadFull(c, $subslice(b, 0, 2)); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err$1]; + } + l = ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); + if (l > b.$length) { + b = $makeSlice(sliceType$1, l); + } + _r$11 = io.ReadFull(c, $subslice(b, 0, l)); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + n = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err$2]; + } + p = new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)); + _tuple$3 = p.Start($subslice(b, 0, n)); + h = $clone(_tuple$3[0], dnsmessage.Header); + err$2 = _tuple$3[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("cannot unmarshal DNS message")]; + } + _tuple$4 = p.Question(); + q = $clone(_tuple$4[0], dnsmessage.Question); + err$2 = _tuple$4[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("cannot unmarshal DNS message")]; + } + if (!checkResponse(id, $clone(query, dnsmessage.Question), $clone(h, dnsmessage.Header), $clone(q, dnsmessage.Question))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("invalid DNS response")]; + } + $s = -1; return [p, h, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: dnsStreamRoundTrip }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.b = b; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.id = id; $f.l = l; $f.n = n; $f.p = p; $f.q = q; $f.query = query; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.ptr.prototype.exchange = function(ctx, server, q, timeout$1) { + var _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, cancel, ctx, ctx$1, d, err, err$1, err$2, h, id, network, ok, ok$1, p, q, r, server, tcpReq, timeout$1, udpReq, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; c = $f.c; cancel = $f.cancel; ctx = $f.ctx; ctx$1 = $f.ctx$1; d = $f.d; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; id = $f.id; network = $f.network; ok = $f.ok; ok$1 = $f.ok$1; p = $f.p; q = $f.q; r = $f.r; server = $f.server; tcpReq = $f.tcpReq; timeout$1 = $f.timeout$1; udpReq = $f.udpReq; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + r = this; + q.Class = 1; + _r$9 = newRequest($clone(q, dnsmessage.Question)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + id = _tuple[0]; + udpReq = _tuple[1]; + tcpReq = _tuple[2]; + err = _tuple[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("cannot marshal DNS message")]; + } + _ref = new sliceType(["udp", "tcp"]); + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + network = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$10 = context.WithDeadline(ctx, $clone($clone(time.Now(), time.Time).Add(timeout$1), time.Time)); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + ctx$1 = _tuple$1[0]; + cancel = _tuple$1[1]; + $deferred.push([cancel, []]); + _r$11 = r.dial(ctx$1, network, server); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + c = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), err$1]; + } + _r$12 = ctx$1.Deadline(); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + d = $clone(_tuple$3[0], time.Time); + ok = _tuple$3[1]; + /* */ if (ok && !$clone(d, time.Time).IsZero()) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (ok && !$clone(d, time.Time).IsZero()) { */ case 7: + _r$13 = c.SetDeadline($clone(d, time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + /* } */ case 8: + p = new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)); + h = new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0); + _tuple$4 = $assertType(c, PacketConn, true); + ok$1 = _tuple$4[1]; + /* */ if (ok$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (ok$1) { */ case 10: + _r$14 = dnsPacketRoundTrip(c, id, $clone(q, dnsmessage.Question), udpReq); /* */ $s = 13; case 13: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$5 = _r$14; + dnsmessage.Parser.copy(p, _tuple$5[0]); + dnsmessage.Header.copy(h, _tuple$5[1]); + err$1 = _tuple$5[2]; + $s = 12; continue; + /* } else { */ case 11: + _r$15 = dnsStreamRoundTrip(c, id, $clone(q, dnsmessage.Question), tcpReq); /* */ $s = 14; case 14: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$6 = _r$15; + dnsmessage.Parser.copy(p, _tuple$6[0]); + dnsmessage.Header.copy(h, _tuple$6[1]); + err$1 = _tuple$6[2]; + /* } */ case 12: + _r$16 = c.Close(); /* */ $s = 15; case 15: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$16; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), mapErr(err$1)]; + } + err$2 = p.SkipQuestion(); + if (!($interfaceIsEqual(err$2, dnsmessage.ErrSectionDone))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("invalid DNS response")]; + } + if (h.Truncated) { + _i++; + /* continue; */ $s = 2; continue; + } + $s = -1; return [p, h, $ifaceNil]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), errors.New("no answer from DNS server")]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), new dnsmessage.Header.ptr(0, false, 0, false, false, false, false, 0), $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.exchange }; } $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.c = c; $f.cancel = cancel; $f.ctx = ctx; $f.ctx$1 = ctx$1; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.id = id; $f.network = network; $f.ok = ok; $f.ok$1 = ok$1; $f.p = p; $f.q = q; $f.r = r; $f.server = server; $f.tcpReq = tcpReq; $f.timeout$1 = timeout$1; $f.udpReq = udpReq; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Resolver.prototype.exchange = function(ctx, server, q, timeout$1) { return this.$val.exchange(ctx, server, q, timeout$1); }; + checkHeader = function(p, h, name, server) { + var _tuple, err, err$1, h, name, p, server; + _tuple = p.AnswerHeader(); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, dnsmessage.ErrSectionDone))) { + return new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false); + } + if ((h.RCode === 0) && !h.Authoritative && !h.RecursionAvailable && $interfaceIsEqual(err, dnsmessage.ErrSectionDone)) { + return new DNSError.ptr("lame referral", name, server, false, false); + } + if (!((h.RCode === 0)) && !((h.RCode === 3))) { + err$1 = new DNSError.ptr("server misbehaving", name, server, false, false); + if (h.RCode === 2) { + err$1.IsTemporary = true; + } + return err$1; + } + return $ifaceNil; + }; + skipToAnswer = function(p, qtype, name, server) { + var _r$9, _tuple, err, err$1, h, name, p, qtype, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; h = $f.h; name = $f.name; p = $f.p; qtype = $f.qtype; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* while (true) { */ case 1: + _tuple = p.AnswerHeader(); + h = $clone(_tuple[0], dnsmessage.ResourceHeader); + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, dnsmessage.ErrSectionDone)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err, dnsmessage.ErrSectionDone)) { */ case 3: + _r$9 = errNoSuchHost.Error(); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return new DNSError.ptr(_r$9, name, server, false, false); + /* } */ case 4: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false); + } + if (h.Type === qtype) { + $s = -1; return $ifaceNil; + } + err$1 = p.SkipAnswer(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false); + } + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: skipToAnswer }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.h = h; $f.name = name; $f.p = p; $f.qtype = qtype; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.ptr.prototype.tryOneName = function(ctx, cfg, name, qtype) { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, cfg, ctx, err, err$1, h, i, j, lastErr, n, name, nerr, ok, ok$1, p, q, qtype, r, sLen, server, serverOffset, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _v = $f._v; cfg = $f.cfg; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; h = $f.h; i = $f.i; j = $f.j; lastErr = $f.lastErr; n = $f.n; name = $f.name; nerr = $f.nerr; ok = $f.ok; ok$1 = $f.ok$1; p = $f.p; q = $f.q; qtype = $f.qtype; r = $f.r; sLen = $f.sLen; server = $f.server; serverOffset = $f.serverOffset; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + lastErr = $ifaceNil; + serverOffset = cfg.serverOffset(); + sLen = ((cfg.servers.$length >>> 0)); + _tuple = dnsmessage.NewName(name); + n = $clone(_tuple[0], dnsmessage.Name); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), "", errors.New("cannot marshal DNS message")]; + } + q = new dnsmessage.Question.ptr($clone(n, dnsmessage.Name), qtype, 1); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < cfg.attempts)) { break; } */ if(!(i < cfg.attempts)) { $s = 2; continue; } + j = 0; + /* while (true) { */ case 3: + /* if (!(j < sLen)) { break; } */ if(!(j < sLen)) { $s = 4; continue; } + p = [p]; + server = (x = cfg.servers, x$1 = (_r$9 = ((serverOffset + j >>> 0)) % sLen, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + _r$10 = r.exchange(ctx, server, $clone(q, dnsmessage.Question), cfg.timeout); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + p[0] = $clone(_tuple$1[0], dnsmessage.Parser); + h = $clone(_tuple$1[1], dnsmessage.Header); + err$1 = _tuple$1[2]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 6: + _r$11 = err$1.Error(); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + lastErr = new DNSError.ptr(_r$11, name, server, false, false); + _tuple$2 = $assertType(err$1, Error, true); + nerr = _tuple$2[0]; + ok = _tuple$2[1]; + if (!(ok)) { _v = false; $s = 11; continue s; } + _r$12 = nerr.Timeout(); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _v = _r$12; case 11: + /* */ if (_v) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_v) { */ case 9: + $assertType(lastErr, ptrType$12).IsTimeout = true; + /* } */ case 10: + _tuple$3 = $assertType(err$1, ptrType$13, true); + ok$1 = _tuple$3[1]; + if (ok$1) { + $assertType(lastErr, ptrType$12).IsTemporary = true; + } + j = j + (1) >>> 0; + /* continue; */ $s = 3; continue; + /* } */ case 7: + /* */ if (h.RCode === 3) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (h.RCode === 3) { */ case 13: + _r$13 = errNoSuchHost.Error(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), "", new DNSError.ptr(_r$13, name, server, false, false)]; + /* } */ case 14: + lastErr = checkHeader(p[0], $clone(h, dnsmessage.Header), name, server); + /* */ if (!($interfaceIsEqual(lastErr, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(lastErr, $ifaceNil))) { */ case 16: + j = j + (1) >>> 0; + /* continue; */ $s = 3; continue; + /* } */ case 17: + _r$14 = skipToAnswer(p[0], qtype, name, server); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + lastErr = _r$14; + if ($interfaceIsEqual(lastErr, $ifaceNil)) { + $s = -1; return [p[0], server, $ifaceNil]; + } + j = j + (1) >>> 0; + /* } */ $s = 3; continue; case 4: + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), "", lastErr]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.tryOneName }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._v = _v; $f.cfg = cfg; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.h = h; $f.i = i; $f.j = j; $f.lastErr = lastErr; $f.n = n; $f.name = name; $f.nerr = nerr; $f.ok = ok; $f.ok$1 = ok$1; $f.p = p; $f.q = q; $f.qtype = qtype; $f.r = r; $f.sLen = sLen; $f.server = server; $f.serverOffset = serverOffset; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.tryOneName = function(ctx, cfg, name, qtype) { return this.$val.tryOneName(ctx, cfg, name, qtype); }; + resolverConfig.ptr.prototype.init = function() { + var _r$10, _r$9, conf$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; conf$1 = $f.conf$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conf$1 = this; + _r$9 = systemConf(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + conf$1.dnsConfig = _r$9.resolv; + /* */ if (conf$1.dnsConfig === ptrType$1.nil) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (conf$1.dnsConfig === ptrType$1.nil) { */ case 2: + _r$10 = dnsReadConfig("/etc/resolv.conf"); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + conf$1.dnsConfig = _r$10; + /* } */ case 3: + time.Time.copy(conf$1.lastChecked, time.Now()); + conf$1.ch = new $Chan(structType$1, 1); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: resolverConfig.ptr.prototype.init }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f.conf$1 = conf$1; $f.$s = $s; $f.$r = $r; return $f; + }; + resolverConfig.prototype.init = function() { return this.$val.init(); }; + resolverConfig.ptr.prototype.tryUpdate = function(name) { + var _r$10, _r$11, _r$9, _tuple, conf$1, dnsConf, err, fi, mtime, name, now, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; conf$1 = $f.conf$1; dnsConf = $f.dnsConf; err = $f.err; fi = $f.fi; mtime = $f.mtime; name = $f.name; now = $f.now; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + conf$1 = this; + $r = conf$1.initOnce.Do($methodVal(conf$1, "init")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!conf$1.tryAcquireSema()) { + $s = -1; return; + } + $deferred.push([$methodVal(conf$1, "releaseSema"), []]); + now = $clone(time.Now(), time.Time); + if ($clone(conf$1.lastChecked, time.Time).After($clone($clone(now, time.Time).Add(new time.Duration(-2, 3589934592)), time.Time))) { + $s = -1; return; + } + time.Time.copy(conf$1.lastChecked, now); + mtime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + _r$9 = os.Stat(name); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fi = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 3: + _r$10 = fi.ModTime(); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + time.Time.copy(mtime, _r$10); + /* } */ case 4: + if ($clone(mtime, time.Time).Equal($clone(conf$1.dnsConfig.mtime, time.Time))) { + $s = -1; return; + } + _r$11 = dnsReadConfig(name); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + dnsConf = _r$11; + $r = conf$1.mu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + conf$1.dnsConfig = dnsConf; + $r = conf$1.mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: resolverConfig.ptr.prototype.tryUpdate }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f.conf$1 = conf$1; $f.dnsConf = dnsConf; $f.err = err; $f.fi = fi; $f.mtime = mtime; $f.name = name; $f.now = now; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + resolverConfig.prototype.tryUpdate = function(name) { return this.$val.tryUpdate(name); }; + resolverConfig.ptr.prototype.tryAcquireSema = function() { + var _selection, conf$1, $r; + /* */ var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; conf$1 = $f.conf$1; $r = $f.$r; } + conf$1 = this; + _selection = $select([[conf$1.ch, new structType$1.ptr()], []]); + if (_selection[0] === 0) { + return true; + } else if (_selection[0] === 1) { + return false; + } + /* */ if ($f === undefined) { $f = { $blk: resolverConfig.ptr.prototype.tryAcquireSema }; } $f._selection = _selection; $f.conf$1 = conf$1; $f.$r = $r; return $f; + }; + resolverConfig.prototype.tryAcquireSema = function() { return this.$val.tryAcquireSema(); }; + resolverConfig.ptr.prototype.releaseSema = function() { + var _r$9, conf$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; conf$1 = $f.conf$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conf$1 = this; + _r$9 = $recv(conf$1.ch); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9[0]; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: resolverConfig.ptr.prototype.releaseSema }; } $f._r$9 = _r$9; $f.conf$1 = conf$1; $f.$s = $s; $f.$r = $r; return $f; + }; + resolverConfig.prototype.releaseSema = function() { return this.$val.releaseSema(); }; + Resolver.ptr.prototype.lookup = function(ctx, name, qtype) { + var _i, _r$10, _r$11, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _v, conf$1, ctx, err, err$1, fqdn, name, nerr, ok, ok$1, p, qtype, r, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; conf$1 = $f.conf$1; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; fqdn = $f.fqdn; name = $f.name; nerr = $f.nerr; ok = $f.ok; ok$1 = $f.ok$1; p = $f.p; qtype = $f.qtype; r = $f.r; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (!isDomainName(name)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!isDomainName(name)) { */ case 1: + _r$9 = errNoSuchHost.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), "", new DNSError.ptr(_r$9, name, "", false, false)]; + /* } */ case 2: + $r = resolvConf.tryUpdate("/etc/resolv.conf"); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = resolvConf.mu.RLock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + conf$1 = resolvConf.dnsConfig; + $r = resolvConf.mu.RUnlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p = new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)); + server = ""; + err = $ifaceNil; + _ref = conf$1.nameList(name); + _i = 0; + /* while (true) { */ case 7: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 8; continue; } + fqdn = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$10 = r.tryOneName(ctx, conf$1, fqdn, qtype); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + dnsmessage.Parser.copy(p, _tuple[0]); + server = _tuple[1]; + err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + /* break; */ $s = 8; continue; + } + _tuple$1 = $assertType(err, Error, true); + nerr = _tuple$1[0]; + ok = _tuple$1[1]; + if (!(ok)) { _v = false; $s = 12; continue s; } + _r$11 = nerr.Temporary(); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _v = _r$11; case 12: + /* */ if (_v && r.strictErrors()) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_v && r.strictErrors()) { */ case 10: + /* break; */ $s = 8; continue; + /* } */ case 11: + _i++; + /* } */ $s = 7; continue; case 8: + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return [p, server, $ifaceNil]; + } + _tuple$2 = $assertType(err, ptrType$12, true); + err$1 = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (ok$1) { + err$1.Name = name; + } + $s = -1; return [new dnsmessage.Parser.ptr(sliceType$1.nil, new dnsmessage.header.ptr(0, 0, 0, 0, 0, 0), 0, 0, 0, false, new dnsmessage.ResourceHeader.ptr(new dnsmessage.Name.ptr(arrayType$1.zero(), 0), 0, 0, 0, 0)), "", err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookup }; } $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f.conf$1 = conf$1; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.fqdn = fqdn; $f.name = name; $f.nerr = nerr; $f.ok = ok; $f.ok$1 = ok$1; $f.p = p; $f.qtype = qtype; $f.r = r; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookup = function(ctx, name, qtype) { return this.$val.lookup(ctx, name, qtype); }; + avoidDNS = function(name) { + var name; + if (name === "") { + return true; + } + if (name.charCodeAt((name.length - 1 >> 0)) === 46) { + name = $substring(name, 0, (name.length - 1 >> 0)); + } + return stringsHasSuffixFold(name, ".onion"); + }; + dnsConfig.ptr.prototype.nameList = function(name) { + var _i, _ref, conf$1, hasNdots, l, name, names, rooted, suffix; + conf$1 = this; + if (avoidDNS(name)) { + return sliceType.nil; + } + l = name.length; + rooted = l > 0 && (name.charCodeAt((l - 1 >> 0)) === 46); + if (l > 254 || (l === 254) && rooted) { + return sliceType.nil; + } + if (rooted) { + return new sliceType([name]); + } + hasNdots = count(name, 46) >= conf$1.ndots; + name = name + ("."); + l = l + (1) >> 0; + names = $makeSlice(sliceType, 0, (1 + conf$1.search.$length >> 0)); + if (hasNdots) { + names = $append(names, name); + } + _ref = conf$1.search; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + suffix = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((l + suffix.length >> 0) <= 254) { + names = $append(names, name + suffix); + } + _i++; + } + if (!hasNdots) { + names = $append(names, name); + } + return names; + }; + dnsConfig.prototype.nameList = function(name) { return this.$val.nameList(name); }; + hostLookupOrder.prototype.String = function() { + var _entry, _tuple, o, ok, s; + o = this.$val; + _tuple = (_entry = lookupOrderName[hostLookupOrder.keyFor(o)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return s; + } + return "hostLookupOrder=" + itoa(((o >> 0))) + "??"; + }; + $ptrType(hostLookupOrder).prototype.String = function() { return new hostLookupOrder(this.$get()).String(); }; + Resolver.ptr.prototype.goLookupHostOrder = function(ctx, name, order) { + var _i, _r$10, _r$9, _ref, _tuple, addrs, ctx, err, ip, ips, name, order, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addrs = $f.addrs; ctx = $f.ctx; err = $f.err; ip = $f.ip; ips = $f.ips; name = $f.name; order = $f.order; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType.nil; + err = $ifaceNil; + r = this; + /* */ if ((order === 1) || (order === 3)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((order === 1) || (order === 3)) { */ case 1: + _r$9 = lookupStaticHost(name); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + addrs = _r$9; + if (addrs.$length > 0 || (order === 3)) { + $s = -1; return [addrs, err]; + } + /* } */ case 2: + _r$10 = r.goLookupIPCNAMEOrder(ctx, name, order); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple = _r$10; + ips = _tuple[0]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [addrs, err]; + } + addrs = $makeSlice(sliceType, 0, ips.$length); + _ref = ips; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ip = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); + addrs = $append(addrs, ip.String()); + _i++; + } + $s = -1; return [addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.goLookupHostOrder }; } $f._i = _i; $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addrs = addrs; $f.ctx = ctx; $f.err = err; $f.ip = ip; $f.ips = ips; $f.name = name; $f.order = order; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.goLookupHostOrder = function(ctx, name, order) { return this.$val.goLookupHostOrder(ctx, name, order); }; + goLookupIPFiles = function(name) { + var _i, _r$9, _ref, _tuple, addr, addrs, haddr, haddr$1, ip, name, zone, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; addrs = $f.addrs; haddr = $f.haddr; haddr$1 = $f.haddr$1; ip = $f.ip; name = $f.name; zone = $f.zone; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType$3.nil; + _r$9 = lookupStaticHost(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _ref = _r$9; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + haddr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tuple = splitHostZone(haddr); + haddr$1 = _tuple[0]; + zone = _tuple[1]; + ip = ParseIP(haddr$1); + if (!(ip === IP.nil)) { + addr = new IPAddr.ptr(ip, zone); + addrs = $append(addrs, addr); + } + _i++; + /* } */ $s = 2; continue; case 3: + $r = sortByRFC6724(addrs); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return addrs; + /* */ } return; } if ($f === undefined) { $f = { $blk: goLookupIPFiles }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.addrs = addrs; $f.haddr = haddr; $f.haddr$1 = haddr$1; $f.ip = ip; $f.name = name; $f.zone = zone; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.ptr.prototype.goLookupIP = function(ctx, host) { + var _r$10, _r$11, _r$9, _tuple, addrs, ctx, err, host, order, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; addrs = $f.addrs; ctx = $f.ctx; err = $f.err; host = $f.host; order = $f.order; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType$3.nil; + err = $ifaceNil; + r = this; + _r$9 = systemConf(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.hostLookupOrder(r, host); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + order = _r$10; + _r$11 = r.goLookupIPCNAMEOrder(ctx, host, order); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + addrs = _tuple[0]; + err = _tuple[2]; + $s = -1; return [addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.goLookupIP }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f.addrs = addrs; $f.ctx = ctx; $f.err = err; $f.host = host; $f.order = order; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.goLookupIP = function(ctx, host) { return this.$val.goLookupIP(ctx, host); }; + Resolver.ptr.prototype.goLookupIPCNAMEOrder = function(ctx, name, order) { + var _1, _i, _i$1, _i$2, _r$10, _r$11, _r$12, _r$13, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, a, aaaa, addrs, cname, conf$1, ctx, err, err$1, err$2, err$3, err$4, fqdn, h, hitStrictError, lane, lastErr, lastErr$1, name, nerr, ok, ok$1, order, qtype, qtypes, r, racer$1, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _v = $f._v; a = $f.a; aaaa = $f.aaaa; addrs = $f.addrs; cname = $f.cname; conf$1 = $f.conf$1; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; fqdn = $f.fqdn; h = $f.h; hitStrictError = $f.hitStrictError; lane = $f.lane; lastErr = $f.lastErr; lastErr$1 = $f.lastErr$1; name = $f.name; nerr = $f.nerr; ok = $f.ok; ok$1 = $f.ok$1; order = $f.order; qtype = $f.qtype; qtypes = $f.qtypes; r = $f.r; racer$1 = $f.racer$1; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conf$1 = [conf$1]; + ctx = [ctx]; + fqdn = [fqdn]; + lane = [lane]; + r = [r]; + addrs = sliceType$3.nil; + cname = new dnsmessage.Name.ptr(arrayType$1.zero(), 0); + err = $ifaceNil; + r[0] = this; + /* */ if ((order === 1) || (order === 3)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((order === 1) || (order === 3)) { */ case 1: + _r$9 = goLookupIPFiles(name); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + addrs = _r$9; + if (addrs.$length > 0 || (order === 3)) { + _tmp = addrs; + _tmp$1 = new dnsmessage.Name.ptr(arrayType$1.zero(), 0); + _tmp$2 = $ifaceNil; + addrs = _tmp; + dnsmessage.Name.copy(cname, _tmp$1); + err = _tmp$2; + $s = -1; return [addrs, cname, err]; + } + /* } */ case 2: + /* */ if (!isDomainName(name)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!isDomainName(name)) { */ case 4: + _tmp$3 = sliceType$3.nil; + _tmp$4 = new dnsmessage.Name.ptr(arrayType$1.zero(), 0); + _r$10 = errNoSuchHost.Error(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tmp$5 = new DNSError.ptr(_r$10, name, "", false, false); + addrs = _tmp$3; + dnsmessage.Name.copy(cname, _tmp$4); + err = _tmp$5; + $s = -1; return [addrs, cname, err]; + /* } */ case 5: + $r = resolvConf.tryUpdate("/etc/resolv.conf"); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = resolvConf.mu.RLock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + conf$1[0] = resolvConf.dnsConfig; + $r = resolvConf.mu.RUnlock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + lane[0] = new $Chan(racer, 1); + qtypes = $toNativeArray($kindUint16, [1, 28]); + lastErr = $ifaceNil; + _ref = conf$1[0].nameList(name); + _i = 0; + /* while (true) { */ case 10: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 11; continue; } + fqdn[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = qtypes; + _i$1 = 0; + /* while (true) { */ case 12: + /* if (!(_i$1 < 2)) { break; } */ if(!(_i$1 < 2)) { $s = 13; continue; } + qtype = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); + dnsWaitGroup.Add(1); + $go((function(conf$1, ctx, fqdn, lane, r) { return function $b(qtype$1) { + var _r$11, _tuple, err$1, p, qtype$1, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$11 = $f._r$11; _tuple = $f._tuple; err$1 = $f.err$1; p = $f.p; qtype$1 = $f.qtype$1; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$11 = r[0].tryOneName(ctx[0], conf$1[0], fqdn[0], qtype$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + p = $clone(_tuple[0], dnsmessage.Parser); + server = _tuple[1]; + err$1 = _tuple[2]; + $r = $send(lane[0], $clone(new racer.ptr($clone(p, dnsmessage.Parser), server, err$1), racer)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + dnsWaitGroup.Done(); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$11 = _r$11; $f._tuple = _tuple; $f.err$1 = err$1; $f.p = p; $f.qtype$1 = qtype$1; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; })(conf$1, ctx, fqdn, lane, r), [qtype]); + _i$1++; + /* } */ $s = 12; continue; case 13: + hitStrictError = false; + _ref$2 = qtypes; + _i$2 = 0; + /* while (true) { */ case 14: + /* if (!(_i$2 < 2)) { break; } */ if(!(_i$2 < 2)) { $s = 15; continue; } + _r$11 = $recv(lane[0]); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + racer$1 = $clone(_r$11[0], racer); + /* */ if (!($interfaceIsEqual(racer$1.error, $ifaceNil))) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (!($interfaceIsEqual(racer$1.error, $ifaceNil))) { */ case 17: + _tuple = $assertType(racer$1.error, Error, true); + nerr = _tuple[0]; + ok = _tuple[1]; + if (!(ok)) { _v = false; $s = 22; continue s; } + _r$12 = nerr.Temporary(); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _v = _r$12; case 22: + /* */ if (_v && r[0].strictErrors()) { $s = 19; continue; } + /* */ if ($interfaceIsEqual(lastErr, $ifaceNil) || fqdn[0] === name + ".") { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (_v && r[0].strictErrors()) { */ case 19: + hitStrictError = true; + lastErr = racer$1.error; + $s = 21; continue; + /* } else if ($interfaceIsEqual(lastErr, $ifaceNil) || fqdn[0] === name + ".") { */ case 20: + lastErr = racer$1.error; + /* } */ case 21: + _i$2++; + /* continue; */ $s = 14; continue; + /* } */ case 18: + loop: + while (true) { + _tuple$1 = racer$1.p.AnswerHeader(); + h = $clone(_tuple$1[0], dnsmessage.ResourceHeader); + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone))) { + lastErr = new DNSError.ptr("cannot marshal DNS message", name, racer$1.server, false, false); + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + break; + } + _1 = h.Type; + if (_1 === (1)) { + _tuple$2 = racer$1.p.AResource(); + a = $clone(_tuple$2[0], dnsmessage.AResource); + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + lastErr = new DNSError.ptr("cannot marshal DNS message", name, racer$1.server, false, false); + break loop; + } + addrs = $append(addrs, new IPAddr.ptr(((x = new sliceType$1(a.A), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length))), "")); + } else if (_1 === (28)) { + _tuple$3 = racer$1.p.AAAAResource(); + aaaa = $clone(_tuple$3[0], dnsmessage.AAAAResource); + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + lastErr = new DNSError.ptr("cannot marshal DNS message", name, racer$1.server, false, false); + break loop; + } + addrs = $append(addrs, new IPAddr.ptr(((x$1 = new sliceType$1(aaaa.AAAA), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length))), "")); + } else { + err$4 = racer$1.p.SkipAnswer(); + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + lastErr = new DNSError.ptr("cannot marshal DNS message", name, racer$1.server, false, false); + break loop; + } + continue; + } + if ((cname.Length === 0) && !((h.Name.Length === 0))) { + dnsmessage.Name.copy(cname, h.Name); + } + } + _i$2++; + /* } */ $s = 14; continue; case 15: + if (hitStrictError) { + addrs = sliceType$3.nil; + /* break; */ $s = 11; continue; + } + if (addrs.$length > 0) { + /* break; */ $s = 11; continue; + } + _i++; + /* } */ $s = 10; continue; case 11: + _tuple$4 = $assertType(lastErr, ptrType$12, true); + lastErr$1 = _tuple$4[0]; + ok$1 = _tuple$4[1]; + if (ok$1) { + lastErr$1.Name = name; + } + $r = sortByRFC6724(addrs); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (addrs.$length === 0) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (addrs.$length === 0) { */ case 25: + /* */ if (order === 2) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (order === 2) { */ case 27: + _r$13 = goLookupIPFiles(name); /* */ $s = 29; case 29: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + addrs = _r$13; + /* } */ case 28: + if ((addrs.$length === 0) && !($interfaceIsEqual(lastErr, $ifaceNil))) { + _tmp$6 = sliceType$3.nil; + _tmp$7 = new dnsmessage.Name.ptr(arrayType$1.zero(), 0); + _tmp$8 = lastErr; + addrs = _tmp$6; + dnsmessage.Name.copy(cname, _tmp$7); + err = _tmp$8; + $s = -1; return [addrs, cname, err]; + } + /* } */ case 26: + _tmp$9 = addrs; + _tmp$10 = $clone(cname, dnsmessage.Name); + _tmp$11 = $ifaceNil; + addrs = _tmp$9; + dnsmessage.Name.copy(cname, _tmp$10); + err = _tmp$11; + $s = -1; return [addrs, cname, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.goLookupIPCNAMEOrder }; } $f._1 = _1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._v = _v; $f.a = a; $f.aaaa = aaaa; $f.addrs = addrs; $f.cname = cname; $f.conf$1 = conf$1; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.fqdn = fqdn; $f.h = h; $f.hitStrictError = hitStrictError; $f.lane = lane; $f.lastErr = lastErr; $f.lastErr$1 = lastErr$1; $f.name = name; $f.nerr = nerr; $f.ok = ok; $f.ok$1 = ok$1; $f.order = order; $f.qtype = qtype; $f.qtypes = qtypes; $f.r = r; $f.racer$1 = racer$1; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.goLookupIPCNAMEOrder = function(ctx, name, order) { return this.$val.goLookupIPCNAMEOrder(ctx, name, order); }; + Resolver.ptr.prototype.goLookupCNAME = function(ctx, host) { + var _r$10, _r$11, _r$9, _tuple, cname, ctx, err, host, order, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; cname = $f.cname; ctx = $f.ctx; err = $f.err; host = $f.host; order = $f.order; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = systemConf(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.hostLookupOrder(r, host); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + order = _r$10; + _r$11 = r.goLookupIPCNAMEOrder(ctx, host, order); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + cname = $clone(_tuple[1], dnsmessage.Name); + err = _tuple[2]; + $s = -1; return [$clone(cname, dnsmessage.Name).String(), err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.goLookupCNAME }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f.cname = cname; $f.ctx = ctx; $f.err = err; $f.host = host; $f.order = order; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.goLookupCNAME = function(ctx, host) { return this.$val.goLookupCNAME(ctx, host); }; + Resolver.ptr.prototype.goLookupPTR = function(ctx, addr) { + var _r$10, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, addr, arpa, ctx, err, err$1, h, names, p, ptr, ptrs, r, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; addr = $f.addr; arpa = $f.arpa; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; h = $f.h; names = $f.names; p = $f.p; ptr = $f.ptr; ptrs = $f.ptrs; r = $f.r; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = lookupStaticAddr(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + names = _r$9; + if (names.$length > 0) { + $s = -1; return [names, $ifaceNil]; + } + _tuple = reverseaddr(addr); + arpa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + _r$10 = r.lookup(ctx, arpa, 12); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + p = $clone(_tuple$1[0], dnsmessage.Parser); + server = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + ptrs = sliceType.nil; + while (true) { + _tuple$2 = p.AnswerHeader(); + h = $clone(_tuple$2[0], dnsmessage.ResourceHeader); + err$1 = _tuple$2[1]; + if ($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone)) { + break; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, new DNSError.ptr("cannot marshal DNS message", addr, server, false, false)]; + } + if (!((h.Type === 12))) { + continue; + } + _tuple$3 = p.PTRResource(); + ptr = $clone(_tuple$3[0], dnsmessage.PTRResource); + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, new DNSError.ptr("cannot marshal DNS message", addr, server, false, false)]; + } + ptrs = $append(ptrs, $clone(ptr.PTR, dnsmessage.Name).String()); + } + $s = -1; return [ptrs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.goLookupPTR }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.addr = addr; $f.arpa = arpa; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.h = h; $f.names = names; $f.p = p; $f.ptr = ptr; $f.ptrs = ptrs; $f.r = r; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.goLookupPTR = function(ctx, addr) { return this.$val.goLookupPTR(ctx, addr); }; + dnsReadConfig = function(filename) { + var _1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, conf$1, err, err$1, f, fi, file$1, filename, i, ip, line, n, n$1, n$2, ok, s, x, x$1, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; conf$1 = $f.conf$1; err = $f.err; err$1 = $f.err$1; f = $f.f; fi = $f.fi; file$1 = $f.file$1; filename = $f.filename; i = $f.i; ip = $f.ip; line = $f.line; n = $f.n; n$1 = $f.n$1; n$2 = $f.n$2; ok = $f.ok; s = $f.s; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + conf$1 = new dnsConfig.ptr(sliceType.nil, sliceType.nil, 1, new time.Duration(1, 705032704), 2, false, false, sliceType.nil, $ifaceNil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), 0); + _r$9 = open(filename); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + file$1 = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + conf$1.servers = defaultNS; + _r$10 = dnsDefaultSearch(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + conf$1.search = _r$10; + conf$1.err = err; + $s = -1; return conf$1; + /* } */ case 3: + $deferred.push([$methodVal(file$1, "close"), []]); + _r$11 = file$1.file.Stat(); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + fi = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 6: + _r$12 = fi.ModTime(); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + time.Time.copy(conf$1.mtime, _r$12); + $s = 8; continue; + /* } else { */ case 7: + conf$1.servers = defaultNS; + _r$13 = dnsDefaultSearch(); /* */ $s = 10; case 10: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + conf$1.search = _r$13; + conf$1.err = err$1; + $s = -1; return conf$1; + /* } */ case 8: + _r$14 = file$1.readLine(); /* */ $s = 11; case 11: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$2 = _r$14; + line = _tuple$2[0]; + ok = _tuple$2[1]; + /* while (true) { */ case 12: + /* if (!(ok)) { break; } */ if(!(ok)) { $s = 13; continue; } + /* */ if (line.length > 0 && ((line.charCodeAt(0) === 59) || (line.charCodeAt(0) === 35))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (line.length > 0 && ((line.charCodeAt(0) === 59) || (line.charCodeAt(0) === 35))) { */ case 14: + _r$15 = file$1.readLine(); /* */ $s = 16; case 16: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$3 = _r$15; + line = _tuple$3[0]; + ok = _tuple$3[1]; + /* continue; */ $s = 12; continue; + /* } */ case 15: + f = getFields(line); + /* */ if (f.$length < 1) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (f.$length < 1) { */ case 17: + _r$16 = file$1.readLine(); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$4 = _r$16; + line = _tuple$4[0]; + ok = _tuple$4[1]; + /* continue; */ $s = 12; continue; + /* } */ case 18: + _1 = (0 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 0]); + if (_1 === ("nameserver")) { + if (f.$length > 1 && conf$1.servers.$length < 3) { + if (!(parseIPv4((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1])) === IP.nil)) { + conf$1.servers = $append(conf$1.servers, JoinHostPort((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]), "53")); + } else { + _tuple$5 = parseIPv6Zone((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1])); + ip = _tuple$5[0]; + if (!(ip === IP.nil)) { + conf$1.servers = $append(conf$1.servers, JoinHostPort((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]), "53")); + } + } + } + } else if (_1 === ("domain")) { + if (f.$length > 1) { + conf$1.search = new sliceType([ensureRooted((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]))]); + } + } else if (_1 === ("search")) { + conf$1.search = $makeSlice(sliceType, (f.$length - 1 >> 0)); + i = 0; + while (true) { + if (!(i < conf$1.search.$length)) { break; } + (x$1 = conf$1.search, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i] = ensureRooted((x = i + 1 >> 0, ((x < 0 || x >= f.$length) ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + x]))))); + i = i + (1) >> 0; + } + } else if (_1 === ("options")) { + _ref = $subslice(f, 1); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (hasPrefix(s, "ndots:")) { + _tuple$6 = dtoi($substring(s, 6)); + n = _tuple$6[0]; + if (n < 0) { + n = 0; + } else if (n > 15) { + n = 15; + } + conf$1.ndots = n; + } else if (hasPrefix(s, "timeout:")) { + _tuple$7 = dtoi($substring(s, 8)); + n$1 = _tuple$7[0]; + if (n$1 < 1) { + n$1 = 1; + } + conf$1.timeout = $mul64((new time.Duration(0, n$1)), new time.Duration(0, 1000000000)); + } else if (hasPrefix(s, "attempts:")) { + _tuple$8 = dtoi($substring(s, 9)); + n$2 = _tuple$8[0]; + if (n$2 < 1) { + n$2 = 1; + } + conf$1.attempts = n$2; + } else if (s === "rotate") { + conf$1.rotate = true; + } else { + conf$1.unknownOpt = true; + } + _i++; + } + } else if (_1 === ("lookup")) { + conf$1.lookup = $subslice(f, 1); + } else { + conf$1.unknownOpt = true; + } + _r$17 = file$1.readLine(); /* */ $s = 20; case 20: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tuple$9 = _r$17; + line = _tuple$9[0]; + ok = _tuple$9[1]; + /* } */ $s = 12; continue; case 13: + if (conf$1.servers.$length === 0) { + conf$1.servers = defaultNS; + } + /* */ if (conf$1.search.$length === 0) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (conf$1.search.$length === 0) { */ case 21: + _r$18 = dnsDefaultSearch(); /* */ $s = 23; case 23: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + conf$1.search = _r$18; + /* } */ case 22: + $s = -1; return conf$1; + /* */ } return; } } catch(err) { $err = err; $s = -1; return ptrType$1.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: dnsReadConfig }; } $f._1 = _1; $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.conf$1 = conf$1; $f.err = err; $f.err$1 = err$1; $f.f = f; $f.fi = fi; $f.file$1 = file$1; $f.filename = filename; $f.i = i; $f.ip = ip; $f.line = line; $f.n = n; $f.n$1 = n$1; $f.n$2 = n$2; $f.ok = ok; $f.s = s; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + dnsConfig.ptr.prototype.serverOffset = function() { + var c; + c = this; + if (c.rotate) { + return atomic.AddUint32((c.$ptr_soffset || (c.$ptr_soffset = new ptrType$14(function() { return this.$target.soffset; }, function($v) { this.$target.soffset = $v; }, c))), 1) - 1 >>> 0; + } + return 0; + }; + dnsConfig.prototype.serverOffset = function() { return this.$val.serverOffset(); }; + dnsDefaultSearch = function() { + var _r$9, _tuple, err, hn, i, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; hn = $f.hn; i = $f.i; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = getHostname(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + hn = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return sliceType.nil; + } + i = byteIndex(hn, 46); + if (i >= 0 && i < (hn.length - 1 >> 0)) { + $s = -1; return new sliceType([ensureRooted($substring(hn, (i + 1 >> 0)))]); + } + $s = -1; return sliceType.nil; + /* */ } return; } if ($f === undefined) { $f = { $blk: dnsDefaultSearch }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.hn = hn; $f.i = i; $f.$s = $s; $f.$r = $r; return $f; + }; + hasPrefix = function(s, prefix) { + var prefix, s; + return s.length >= prefix.length && $substring(s, 0, prefix.length) === prefix; + }; + ensureRooted = function(s) { + var s; + if (s.length > 0 && (s.charCodeAt((s.length - 1 >> 0)) === 46)) { + return s; + } + return s + "."; + }; + wrapSyscallError = function(name, err) { + var _tuple, err, name, ok; + _tuple = $assertType(err, syscall.Errno, true); + ok = _tuple[1]; + if (ok) { + err = os.NewSyscallError(name, err); + } + return err; + }; + isConnError = function(err) { + var _tuple, err, ok, se; + _tuple = $assertType(err, syscall.Errno, true); + se = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return (se === 54) || (se === 53); + } + return false; + }; + newFD = function(sysfd, family, sotype, net) { + var family, net, ret, sotype, sysfd; + ret = new netFD.ptr(new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), sysfd, new poll.pollDesc.ptr(false), ptrType$15.nil, 0, 0, sotype === 1, !((sotype === 2)) && !((sotype === 3)), false), family, sotype, false, net, $ifaceNil, $ifaceNil); + return [ret, $ifaceNil]; + }; + netFD.ptr.prototype.init = function() { + var fd; + fd = this; + return fd.pfd.Init(fd.net, true); + }; + netFD.prototype.init = function() { return this.$val.init(); }; + netFD.ptr.prototype.setAddr = function(laddr, raddr) { + var fd, laddr, raddr; + fd = this; + fd.laddr = laddr; + fd.raddr = raddr; + runtime.SetFinalizer(fd, new funcType($methodExpr(ptrType$16, "Close"))); + }; + netFD.prototype.setAddr = function(laddr, raddr) { return this.$val.setAddr(laddr, raddr); }; + netFD.ptr.prototype.name = function() { + var _r$10, _r$9, _tmp, _tmp$1, fd, ls, rs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; fd = $f.fd; ls = $f.ls; rs = $f.rs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + _tmp = ""; + _tmp$1 = ""; + ls = _tmp; + rs = _tmp$1; + /* */ if (!($interfaceIsEqual(fd.laddr, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(fd.laddr, $ifaceNil))) { */ case 1: + _r$9 = fd.laddr.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + ls = _r$9; + /* } */ case 2: + /* */ if (!($interfaceIsEqual(fd.raddr, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(fd.raddr, $ifaceNil))) { */ case 4: + _r$10 = fd.raddr.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + rs = _r$10; + /* } */ case 5: + $s = -1; return fd.net + ":" + ls + "->" + rs; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.name }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.fd = fd; $f.ls = ls; $f.rs = rs; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.name = function() { return this.$val.name(); }; + netFD.ptr.prototype.connect = function(ctx, la, ra) { + var _1, _2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$9, _selection, _selection$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, ctx, deadline, done, err, err$1, err$2, err$3, err$4, err$5, err$6, fd, interruptRes, la, nerr, ra, ret, rsa, rsa$1, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$9 = $f._r$9; _selection = $f._selection; _selection$1 = $f._selection$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; ctx = $f.ctx; deadline = $f.deadline; done = $f.done; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; fd = $f.fd; interruptRes = $f.interruptRes; la = $f.la; nerr = $f.nerr; ra = $f.ra; ret = $f.ret; rsa = $f.rsa; rsa$1 = $f.rsa$1; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + ctx = [ctx]; + done = [done]; + fd = [fd]; + interruptRes = [interruptRes]; + ret = [ret]; + rsa = $ifaceNil; + ret[0] = $ifaceNil; + fd[0] = this; + _r$9 = connectFunc(fd[0].pfd.Sysfd, ra); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + _1 = err; + /* */ if ($interfaceIsEqual(_1, new syscall.Errno((36))) || $interfaceIsEqual(_1, new syscall.Errno((37))) || $interfaceIsEqual(_1, new syscall.Errno((4)))) { $s = 3; continue; } + /* */ if ($interfaceIsEqual(_1, $ifaceNil) || $interfaceIsEqual(_1, new syscall.Errno((56)))) { $s = 4; continue; } + /* */ if ($interfaceIsEqual(_1, new syscall.Errno((22)))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($interfaceIsEqual(_1, new syscall.Errno((36))) || $interfaceIsEqual(_1, new syscall.Errno((37))) || $interfaceIsEqual(_1, new syscall.Errno((4)))) { */ case 3: + $s = 7; continue; + /* } else if ($interfaceIsEqual(_1, $ifaceNil) || $interfaceIsEqual(_1, new syscall.Errno((56)))) { */ case 4: + _r$10 = ctx[0].Done(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _selection = $select([[_r$10], []]); + /* */ if (_selection[0] === 0) { $s = 9; continue; } + /* */ if (_selection[0] === 1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_selection[0] === 0) { */ case 9: + _tmp = $ifaceNil; + _r$11 = ctx[0].Err(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = mapErr(_r$11); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tmp$1 = _r$12; + rsa = _tmp; + ret[0] = _tmp$1; + $s = -1; return [rsa, ret[0]]; + /* } else if (_selection[0] === 1) { */ case 10: + /* } */ case 11: + err$1 = fd[0].pfd.Init(fd[0].net, true); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$2 = $ifaceNil; + _tmp$3 = err$1; + rsa = _tmp$2; + ret[0] = _tmp$3; + $s = -1; return [rsa, ret[0]]; + } + runtime.KeepAlive(fd[0]); + _tmp$4 = $ifaceNil; + _tmp$5 = $ifaceNil; + rsa = _tmp$4; + ret[0] = _tmp$5; + $s = -1; return [rsa, ret[0]]; + /* } else if ($interfaceIsEqual(_1, new syscall.Errno((22)))) { */ case 5: + if (false) { + _tmp$6 = $ifaceNil; + _tmp$7 = $ifaceNil; + rsa = _tmp$6; + ret[0] = _tmp$7; + $s = -1; return [rsa, ret[0]]; + } + _tmp$8 = $ifaceNil; + _tmp$9 = os.NewSyscallError("connect", err); + rsa = _tmp$8; + ret[0] = _tmp$9; + $s = -1; return [rsa, ret[0]]; + /* } else { */ case 6: + _tmp$10 = $ifaceNil; + _tmp$11 = os.NewSyscallError("connect", err); + rsa = _tmp$10; + ret[0] = _tmp$11; + $s = -1; return [rsa, ret[0]]; + /* } */ case 7: + case 1: + err$2 = fd[0].pfd.Init(fd[0].net, true); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$12 = $ifaceNil; + _tmp$13 = err$2; + rsa = _tmp$12; + ret[0] = _tmp$13; + $s = -1; return [rsa, ret[0]]; + } + _r$13 = ctx[0].Deadline(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple = _r$13; + deadline = $clone(_tuple[0], time.Time); + if (!$clone(deadline, time.Time).IsZero()) { + fd[0].pfd.SetWriteDeadline($clone(deadline, time.Time)); + $deferred.push([$methodVal(fd[0].pfd, "SetWriteDeadline"), [$clone(noDeadline, time.Time)]]); + } + /* */ if (!($interfaceIsEqual(ctx[0], context.Background()))) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!($interfaceIsEqual(ctx[0], context.Background()))) { */ case 15: + done[0] = new $Chan(structType$1, 0); + interruptRes[0] = new $Chan($error, 0); + $deferred.push([(function(ctx, done, fd, interruptRes, ret) { return function $b() { + var _r$14, _r$15, ctxErr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$14 = $f._r$14; _r$15 = $f._r$15; ctxErr = $f.ctxErr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $close(done[0]); + _r$14 = $recv(interruptRes[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + ctxErr = _r$14[0]; + /* */ if (!($interfaceIsEqual(ctxErr, $ifaceNil)) && $interfaceIsEqual(ret[0], $ifaceNil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(ctxErr, $ifaceNil)) && $interfaceIsEqual(ret[0], $ifaceNil)) { */ case 2: + ret[0] = mapErr(ctxErr); + _r$15 = fd[0].Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _r$15; + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$14 = _r$14; $f._r$15 = _r$15; $f.ctxErr = ctxErr; $f.$s = $s; $f.$r = $r; return $f; + }; })(ctx, done, fd, interruptRes, ret), []]); + $go((function(ctx, done, fd, interruptRes, ret) { return function $b() { + var _r$14, _r$15, _r$16, _selection$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _selection$1 = $f._selection$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$14 = ctx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$15 = $select([[_r$14], [done[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _selection$1 = _r$15; + /* */ if (_selection$1[0] === 0) { $s = 3; continue; } + /* */ if (_selection$1[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection$1[0] === 0) { */ case 3: + fd[0].pfd.SetWriteDeadline($clone(aLongTimeAgo, time.Time)); + $r = testHookCanceledDial(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$16 = ctx[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + $r = $send(interruptRes[0], _r$16); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else if (_selection$1[0] === 1) { */ case 4: + $r = $send(interruptRes[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._selection$1 = _selection$1; $f.$s = $s; $f.$r = $r; return $f; + }; })(ctx, done, fd, interruptRes, ret), []); + /* } */ case 16: + /* while (true) { */ case 17: + err$3 = fd[0].pfd.WaitWrite(); + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 19: + _r$14 = ctx[0].Done(); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _selection$1 = $select([[_r$14], []]); + /* */ if (_selection$1[0] === 0) { $s = 22; continue; } + /* */ if (_selection$1[0] === 1) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (_selection$1[0] === 0) { */ case 22: + _tmp$14 = $ifaceNil; + _r$15 = ctx[0].Err(); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _r$16 = mapErr(_r$15); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tmp$15 = _r$16; + rsa = _tmp$14; + ret[0] = _tmp$15; + $s = -1; return [rsa, ret[0]]; + /* } else if (_selection$1[0] === 1) { */ case 23: + /* } */ case 24: + _tmp$16 = $ifaceNil; + _tmp$17 = err$3; + rsa = _tmp$16; + ret[0] = _tmp$17; + $s = -1; return [rsa, ret[0]]; + /* } */ case 20: + _r$17 = getsockoptIntFunc(fd[0].pfd.Sysfd, 65535, 4103); /* */ $s = 27; case 27: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tuple$1 = _r$17; + nerr = _tuple$1[0]; + err$4 = _tuple$1[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + _tmp$18 = $ifaceNil; + _tmp$19 = os.NewSyscallError("getsockopt", err$4); + rsa = _tmp$18; + ret[0] = _tmp$19; + $s = -1; return [rsa, ret[0]]; + } + err$5 = ((nerr >>> 0)); + _2 = err$5; + if ((_2 === (36)) || (_2 === (37)) || (_2 === (4))) { + } else if (_2 === (56)) { + _tmp$20 = $ifaceNil; + _tmp$21 = $ifaceNil; + rsa = _tmp$20; + ret[0] = _tmp$21; + $s = -1; return [rsa, ret[0]]; + } else if (_2 === (0)) { + _tuple$2 = syscall.Getpeername(fd[0].pfd.Sysfd); + rsa$1 = _tuple$2[0]; + err$6 = _tuple$2[1]; + if ($interfaceIsEqual(err$6, $ifaceNil)) { + _tmp$22 = rsa$1; + _tmp$23 = $ifaceNil; + rsa = _tmp$22; + ret[0] = _tmp$23; + $s = -1; return [rsa, ret[0]]; + } + } else { + _tmp$24 = $ifaceNil; + _tmp$25 = os.NewSyscallError("connect", new syscall.Errno(err$5)); + rsa = _tmp$24; + ret[0] = _tmp$25; + $s = -1; return [rsa, ret[0]]; + } + runtime.KeepAlive(fd[0]); + /* } */ $s = 17; continue; case 18: + $s = -1; return [rsa, ret[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [rsa, ret[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.connect }; } $f._1 = _1; $f._2 = _2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$9 = _r$9; $f._selection = _selection; $f._selection$1 = _selection$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.ctx = ctx; $f.deadline = deadline; $f.done = done; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.fd = fd; $f.interruptRes = interruptRes; $f.la = la; $f.nerr = nerr; $f.ra = ra; $f.ret = ret; $f.rsa = rsa; $f.rsa$1 = rsa$1; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + netFD.prototype.connect = function(ctx, la, ra) { return this.$val.connect(ctx, la, ra); }; + netFD.ptr.prototype.Close = function() { + var _r$9, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + runtime.SetFinalizer(fd, $ifaceNil); + _r$9 = fd.pfd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.Close }; } $f._r$9 = _r$9; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.Close = function() { return this.$val.Close(); }; + netFD.ptr.prototype.shutdown = function(how) { + var _r$9, err, fd, how, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; err = $f.err; fd = $f.fd; how = $f.how; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + _r$9 = fd.pfd.Shutdown(how); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("shutdown", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.shutdown }; } $f._r$9 = _r$9; $f.err = err; $f.fd = fd; $f.how = how; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.shutdown = function(how) { return this.$val.shutdown(how); }; + netFD.ptr.prototype.closeRead = function() { + var _r$9, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + _r$9 = fd.shutdown(0); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.closeRead }; } $f._r$9 = _r$9; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.closeRead = function() { return this.$val.closeRead(); }; + netFD.ptr.prototype.closeWrite = function() { + var _r$9, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + _r$9 = fd.shutdown(1); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.closeWrite }; } $f._r$9 = _r$9; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.closeWrite = function() { return this.$val.closeWrite(); }; + netFD.ptr.prototype.Read = function(p) { + var _r$9, _tmp, _tmp$1, _tuple, err, fd, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = wrapSyscallError("read", err); + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.Read }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.Read = function(p) { return this.$val.Read(p); }; + netFD.ptr.prototype.readFrom = function(p) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tuple, err, fd, n, p, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; p = $f.p; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + sa = $ifaceNil; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.ReadFrom(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + sa = _tuple[1]; + err = _tuple[2]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = sa; + _tmp$2 = wrapSyscallError("recvfrom", err); + n = _tmp; + sa = _tmp$1; + err = _tmp$2; + $s = -1; return [n, sa, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.readFrom }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.p = p; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.readFrom = function(p) { return this.$val.readFrom(p); }; + netFD.ptr.prototype.readMsg = function(p, oob) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, err, fd, flags, n, oob, oobn, p, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tuple = $f._tuple; err = $f.err; fd = $f.fd; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; p = $f.p; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + sa = $ifaceNil; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.ReadMsg(p, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + sa = _tuple[3]; + err = _tuple[4]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = oobn; + _tmp$2 = flags; + _tmp$3 = sa; + _tmp$4 = wrapSyscallError("recvmsg", err); + n = _tmp; + oobn = _tmp$1; + flags = _tmp$2; + sa = _tmp$3; + err = _tmp$4; + $s = -1; return [n, oobn, flags, sa, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.readMsg }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.p = p; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.readMsg = function(p, oob) { return this.$val.readMsg(p, oob); }; + netFD.ptr.prototype.Write = function(p) { + var _r$9, _tmp, _tmp$1, _tuple, err, fd, nn, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; fd = $f.fd; nn = $f.nn; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nn = 0; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + nn = _tuple[0]; + err = _tuple[1]; + runtime.KeepAlive(fd); + _tmp = nn; + _tmp$1 = wrapSyscallError("write", err); + nn = _tmp; + err = _tmp$1; + $s = -1; return [nn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.Write }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.nn = nn; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.Write = function(p) { return this.$val.Write(p); }; + netFD.ptr.prototype.writeTo = function(p, sa) { + var _r$9, _tmp, _tmp$1, _tuple, err, fd, n, p, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; p = $f.p; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.WriteTo(p, sa); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = wrapSyscallError("sendto", err); + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.writeTo }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.p = p; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.writeTo = function(p, sa) { return this.$val.writeTo(p, sa); }; + netFD.ptr.prototype.writeMsg = function(p, oob, sa) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tuple, err, fd, n, oob, oobn, p, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; oob = $f.oob; oobn = $f.oobn; p = $f.p; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.WriteMsg(p, oob, sa); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + err = _tuple[2]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = oobn; + _tmp$2 = wrapSyscallError("sendmsg", err); + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.writeMsg }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.p = p; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.writeMsg = function(p, oob, sa) { return this.$val.writeMsg(p, oob, sa); }; + netFD.ptr.prototype.accept = function() { + var _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, d, err, errcall, fd, lsa, netfd, rsa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; d = $f.d; err = $f.err; errcall = $f.errcall; fd = $f.fd; lsa = $f.lsa; netfd = $f.netfd; rsa = $f.rsa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + netfd = ptrType$16.nil; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.Accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + d = _tuple[0]; + rsa = _tuple[1]; + errcall = _tuple[2]; + err = _tuple[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (!(errcall === "")) { + err = wrapSyscallError(errcall, err); + } + _tmp = ptrType$16.nil; + _tmp$1 = err; + netfd = _tmp; + err = _tmp$1; + $s = -1; return [netfd, err]; + } + _tuple$1 = newFD(d, fd.family, fd.sotype, fd.net); + netfd = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + _r$10 = poll.CloseFunc(d); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + _tmp$2 = ptrType$16.nil; + _tmp$3 = err; + netfd = _tmp$2; + err = _tmp$3; + $s = -1; return [netfd, err]; + /* } */ case 3: + err = netfd.init(); + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: + _r$11 = fd.Close(); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + _tmp$4 = ptrType$16.nil; + _tmp$5 = err; + netfd = _tmp$4; + err = _tmp$5; + $s = -1; return [netfd, err]; + /* } */ case 6: + _tuple$2 = syscall.Getsockname(netfd.pfd.Sysfd); + lsa = _tuple$2[0]; + _r$12 = netfd.addrFunc()(lsa); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _arg = _r$12; + _r$13 = netfd.addrFunc()(rsa); /* */ $s = 9; case 9: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _arg$1 = _r$13; + $r = netfd.setAddr(_arg, _arg$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = netfd; + _tmp$7 = $ifaceNil; + netfd = _tmp$6; + err = _tmp$7; + $s = -1; return [netfd, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.accept }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.d = d; $f.err = err; $f.errcall = errcall; $f.fd = fd; $f.lsa = lsa; $f.netfd = netfd; $f.rsa = rsa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.accept = function() { return this.$val.accept(); }; + netFD.ptr.prototype.dup = function() { + var _arg, _arg$1, _r$10, _r$11, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, call, err, f, fd, ns, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; call = $f.call; err = $f.err; f = $f.f; fd = $f.fd; ns = $f.ns; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType$17.nil; + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.Dup(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + ns = _tuple[0]; + call = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (!(call === "")) { + err = os.NewSyscallError(call, err); + } + _tmp = ptrType$17.nil; + _tmp$1 = err; + f = _tmp; + err = _tmp$1; + $s = -1; return [f, err]; + } + _arg = ((ns >>> 0)); + _r$10 = fd.name(); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg$1 = _r$10; + _r$11 = os.NewFile(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tmp$2 = _r$11; + _tmp$3 = $ifaceNil; + f = _tmp$2; + err = _tmp$3; + $s = -1; return [f, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.dup }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.call = call; $f.err = err; $f.f = f; $f.fd = fd; $f.ns = ns; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.dup = function() { return this.$val.dup(); }; + netFD.ptr.prototype.SetDeadline = function(t) { + var fd, t; + fd = this; + return fd.pfd.SetDeadline($clone(t, time.Time)); + }; + netFD.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; + netFD.ptr.prototype.SetReadDeadline = function(t) { + var fd, t; + fd = this; + return fd.pfd.SetReadDeadline($clone(t, time.Time)); + }; + netFD.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; + netFD.ptr.prototype.SetWriteDeadline = function(t) { + var fd, t; + fd = this; + return fd.pfd.SetWriteDeadline($clone(t, time.Time)); + }; + netFD.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; + parseLiteralIP = function(addr) { + var _tuple, addr, ip, zone; + ip = IP.nil; + zone = ""; + ip = parseIPv4(addr); + if (ip === IP.nil) { + _tuple = parseIPv6Zone(addr); + ip = _tuple[0]; + zone = _tuple[1]; + } + if (ip === IP.nil) { + return ""; + } + if (zone === "") { + return ip.String(); + } + return ip.String() + "%" + zone; + }; + readHosts = function() { + var _entry, _entry$1, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, addr, err, f, file$1, h, hp, hs, i, i$1, is, key, line, mtime, name, now, ok, size, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _key$1 = $f._key$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; addr = $f.addr; err = $f.err; f = $f.f; file$1 = $f.file$1; h = $f.h; hp = $f.hp; hs = $f.hs; i = $f.i; i$1 = $f.i$1; is = $f.is; key = $f.key; line = $f.line; mtime = $f.mtime; name = $f.name; now = $f.now; ok = $f.ok; size = $f.size; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + now = $clone(time.Now(), time.Time); + hp = testHookHostsPath; + if ($clone(now, time.Time).Before($clone(hosts.expire, time.Time)) && hosts.path === hp && $keys(hosts.byName).length > 0) { + $s = -1; return; + } + _r$9 = stat(hp); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + mtime = $clone(_tuple[0], time.Time); + size = _tuple[1]; + err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil) && hosts.path === hp && $clone(hosts.mtime, time.Time).Equal($clone(mtime, time.Time)) && (x = hosts.size, (x.$high === size.$high && x.$low === size.$low))) { + time.Time.copy(hosts.expire, $clone(now, time.Time).Add(new time.Duration(1, 705032704))); + $s = -1; return; + } + hs = {}; + is = {}; + file$1 = ptrType$21.nil; + _r$10 = open(hp); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + file$1 = _tuple$1[0]; + if (file$1 === ptrType$21.nil) { + $s = -1; return; + } + _r$11 = file$1.readLine(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + line = _tuple$2[0]; + ok = _tuple$2[1]; + /* while (true) { */ case 4: + /* if (!(ok)) { break; } */ if(!(ok)) { $s = 5; continue; } + i = byteIndex(line, 35); + if (i >= 0) { + line = $substring(line, 0, i); + } + f = getFields(line); + /* */ if (f.$length < 2) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (f.$length < 2) { */ case 6: + _r$12 = file$1.readLine(); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + line = _tuple$3[0]; + ok = _tuple$3[1]; + /* continue; */ $s = 4; continue; + /* } */ case 7: + addr = parseLiteralIP((0 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 0])); + /* */ if (addr === "") { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (addr === "") { */ case 9: + _r$13 = file$1.readLine(); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$4 = _r$13; + line = _tuple$4[0]; + ok = _tuple$4[1]; + /* continue; */ $s = 4; continue; + /* } */ case 10: + i$1 = 1; + while (true) { + if (!(i$1 < f.$length)) { break; } + name = absDomainName((new sliceType$1($stringToBytes(((i$1 < 0 || i$1 >= f.$length) ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + i$1]))))); + h = (new sliceType$1($stringToBytes(((i$1 < 0 || i$1 >= f.$length) ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + i$1])))); + lowerASCIIBytes(h); + key = absDomainName(h); + _key = key; (hs || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = hs[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType.nil), addr) }; + _key$1 = addr; (is || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = is[$String.keyFor(addr)], _entry$1 !== undefined ? _entry$1.v : sliceType.nil), name) }; + i$1 = i$1 + (1) >> 0; + } + _r$14 = file$1.readLine(); /* */ $s = 12; case 12: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$5 = _r$14; + line = _tuple$5[0]; + ok = _tuple$5[1]; + /* } */ $s = 4; continue; case 5: + time.Time.copy(hosts.expire, $clone(now, time.Time).Add(new time.Duration(1, 705032704))); + hosts.path = hp; + hosts.byName = hs; + hosts.byAddr = is; + time.Time.copy(hosts.mtime, mtime); + hosts.size = size; + $r = file$1.close(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: readHosts }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._key$1 = _key$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.addr = addr; $f.err = err; $f.f = f; $f.file$1 = file$1; $f.h = h; $f.hp = hp; $f.hs = hs; $f.i = i; $f.i$1 = i$1; $f.is = is; $f.key = key; $f.line = line; $f.mtime = mtime; $f.name = name; $f.now = now; $f.ok = ok; $f.size = size; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + lookupStaticHost = function(host) { + var _entry, _tuple, host, ips, ipsCp, lowerHost, ok, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; host = $f.host; ips = $f.ips; ipsCp = $f.ipsCp; lowerHost = $f.lowerHost; ok = $f.ok; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + $r = hosts.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(hosts.Mutex, "Unlock"), []]); + $r = readHosts(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(($keys(hosts.byName).length === 0))) { + lowerHost = (new sliceType$1($stringToBytes(host))); + lowerASCIIBytes(lowerHost); + _tuple = (_entry = hosts.byName[$String.keyFor(absDomainName(lowerHost))], _entry !== undefined ? [_entry.v, true] : [sliceType.nil, false]); + ips = _tuple[0]; + ok = _tuple[1]; + if (ok) { + ipsCp = $makeSlice(sliceType, ips.$length); + $copySlice(ipsCp, ips); + $s = -1; return ipsCp; + } + } + $s = -1; return sliceType.nil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: lookupStaticHost }; } $f._entry = _entry; $f._tuple = _tuple; $f.host = host; $f.ips = ips; $f.ipsCp = ipsCp; $f.lowerHost = lowerHost; $f.ok = ok; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + lookupStaticAddr = function(addr) { + var _entry, _tuple, addr, hosts$1, hostsCp, ok, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; addr = $f.addr; hosts$1 = $f.hosts$1; hostsCp = $f.hostsCp; ok = $f.ok; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + $r = hosts.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(hosts.Mutex, "Unlock"), []]); + $r = readHosts(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + addr = parseLiteralIP(addr); + if (addr === "") { + $s = -1; return sliceType.nil; + } + if (!(($keys(hosts.byAddr).length === 0))) { + _tuple = (_entry = hosts.byAddr[$String.keyFor(addr)], _entry !== undefined ? [_entry.v, true] : [sliceType.nil, false]); + hosts$1 = _tuple[0]; + ok = _tuple[1]; + if (ok) { + hostsCp = $makeSlice(sliceType, hosts$1.$length); + $copySlice(hostsCp, hosts$1); + $s = -1; return hostsCp; + } + } + $s = -1; return sliceType.nil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: lookupStaticAddr }; } $f._entry = _entry; $f._tuple = _tuple; $f.addr = addr; $f.hosts$1 = hosts$1; $f.hostsCp = hostsCp; $f.ok = ok; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Flags.prototype.String = function() { + var _i, _ref, f, i, name, s, y; + f = this.$val; + s = ""; + _ref = flagNames; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + name = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((((f & (((y = ((i >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { + if (!(s === "")) { + s = s + ("|"); + } + s = s + (name); + } + _i++; + } + if (s === "") { + s = "0"; + } + return s; + }; + $ptrType(Flags).prototype.String = function() { return new Flags(this.$get()).String(); }; + Interface.ptr.prototype.Addrs = function() { + var _r$9, _tuple, err, ifat, ifi, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; ifat = $f.ifat; ifi = $f.ifi; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ifi = this; + if (ifi === ptrType$22.nil) { + $s = -1; return [sliceType$7.nil, new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, errInvalidInterface)]; + } + _r$9 = interfaceAddrTable(ifi); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + ifat = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, err); + } + $s = -1; return [ifat, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Interface.ptr.prototype.Addrs }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.ifat = ifat; $f.ifi = ifi; $f.$s = $s; $f.$r = $r; return $f; + }; + Interface.prototype.Addrs = function() { return this.$val.Addrs(); }; + Interface.ptr.prototype.MulticastAddrs = function() { + var _r$9, _tuple, err, ifat, ifi, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; ifat = $f.ifat; ifi = $f.ifi; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ifi = this; + if (ifi === ptrType$22.nil) { + $s = -1; return [sliceType$7.nil, new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, errInvalidInterface)]; + } + _r$9 = interfaceMulticastAddrTable(ifi); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + ifat = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, err); + } + $s = -1; return [ifat, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Interface.ptr.prototype.MulticastAddrs }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.ifat = ifat; $f.ifi = ifi; $f.$s = $s; $f.$r = $r; return $f; + }; + Interface.prototype.MulticastAddrs = function() { return this.$val.MulticastAddrs(); }; + ipv6ZoneCache.ptr.prototype.update = function(ift) { + var _entry, _i, _key, _key$1, _r$9, _ref, _tuple, _tuple$1, err, ifi, ift, now, ok, x, x$1, zc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _key$1 = $f._key$1; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; ifi = $f.ifi; ift = $f.ift; now = $f.now; ok = $f.ok; x = $f.x; x$1 = $f.x$1; zc = $f.zc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + zc = this; + $r = zc.RWMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(zc.RWMutex, "Unlock"), []]); + now = $clone(time.Now(), time.Time); + if ($clone(zc.lastFetched, time.Time).After($clone($clone(now, time.Time).Add(new time.Duration(-14, 129542144)), time.Time))) { + $s = -1; return; + } + time.Time.copy(zc.lastFetched, now); + /* */ if (ift.$length === 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ift.$length === 0) { */ case 2: + err = $ifaceNil; + _r$9 = interfaceTable(0); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + ift = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return; + } + /* } */ case 3: + zc.toIndex = (x = ift.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + zc.toName = (x$1 = ift.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + _ref = ift; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ifi = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Interface); + _key = ifi.Name; (zc.toIndex || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: ifi.Index }; + _tuple$1 = (_entry = zc.toName[$Int.keyFor(ifi.Index)], _entry !== undefined ? [_entry.v, true] : ["", false]); + ok = _tuple$1[1]; + if (!ok) { + _key$1 = ifi.Index; (zc.toName || $throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(_key$1)] = { k: _key$1, v: ifi.Name }; + } + _i++; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ipv6ZoneCache.ptr.prototype.update }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.ifi = ifi; $f.ift = ift; $f.now = now; $f.ok = ok; $f.x = x; $f.x$1 = x$1; $f.zc = zc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ipv6ZoneCache.prototype.update = function(ift) { return this.$val.update(ift); }; + ipv6ZoneCache.ptr.prototype.name = function(index) { + var _entry, _tuple, index, name, ok, zc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; index = $f.index; name = $f.name; ok = $f.ok; zc = $f.zc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + zc = this; + if (index === 0) { + $s = -1; return ""; + } + $r = zoneCache.update(sliceType$8.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = zoneCache.RWMutex.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(zoneCache.RWMutex, "RUnlock"), []]); + _tuple = (_entry = zoneCache.toName[$Int.keyFor(index)], _entry !== undefined ? [_entry.v, true] : ["", false]); + name = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + name = uitoa(((index >>> 0))); + } + $s = -1; return name; + /* */ } return; } } catch(err) { $err = err; $s = -1; return ""; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ipv6ZoneCache.ptr.prototype.name }; } $f._entry = _entry; $f._tuple = _tuple; $f.index = index; $f.name = name; $f.ok = ok; $f.zc = zc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ipv6ZoneCache.prototype.name = function(index) { return this.$val.name(index); }; + ipv6ZoneCache.ptr.prototype.index = function(name) { + var _entry, _tuple, _tuple$1, index, name, ok, zc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; index = $f.index; name = $f.name; ok = $f.ok; zc = $f.zc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + zc = this; + if (name === "") { + $s = -1; return 0; + } + $r = zoneCache.update(sliceType$8.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = zoneCache.RWMutex.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(zoneCache.RWMutex, "RUnlock"), []]); + _tuple = (_entry = zoneCache.toIndex[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [0, false]); + index = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _tuple$1 = dtoi(name); + index = _tuple$1[0]; + } + $s = -1; return index; + /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ipv6ZoneCache.ptr.prototype.index }; } $f._entry = _entry; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.index = index; $f.name = name; $f.ok = ok; $f.zc = zc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ipv6ZoneCache.prototype.index = function(name) { return this.$val.index(name); }; + interfaceTable = function(ifindex) { + var _i, _i$1, _r$10, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, err, ifindex, ift, imx, m, m$1, msgs, n, ok, ok$1, sa, sys, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; ifindex = $f.ifindex; ift = $f.ift; imx = $f.imx; m = $f.m; m$1 = $f.m$1; msgs = $f.msgs; n = $f.n; ok = $f.ok; ok$1 = $f.ok$1; sa = $f.sa; sys = $f.sys; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = interfaceMessages(ifindex); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + msgs = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$8.nil, err]; + } + n = msgs.$length; + if (!((ifindex === 0))) { + n = 1; + } + ift = $makeSlice(sliceType$8, n); + n = 0; + _ref = msgs; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + m = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = m; + /* */ if ($assertType(_ref$1, ptrType$23, true)[1]) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($assertType(_ref$1, ptrType$23, true)[1]) { */ case 4: + m$1 = _ref$1.$val; + /* */ if (!((ifindex === 0)) && !((ifindex === m$1.Index))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((ifindex === 0)) && !((ifindex === m$1.Index))) { */ case 6: + _i++; + /* continue; */ $s = 2; continue; + /* } */ case 7: + ((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).Index = m$1.Index; + ((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).Name = m$1.Name; + ((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).Flags = linkFlags(m$1.Flags); + _tuple$1 = $assertType((x = m$1.Addrs, (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4])), ptrType$24, true); + sa = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok && sa.Addr.$length > 0) { + ((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).HardwareAddr = (x$1 = $makeSlice(sliceType$1, sa.Addr.$length), $subslice(new HardwareAddr(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)); + $copySlice(((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).HardwareAddr, sa.Addr); + } + _r$10 = m$1.Sys(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _ref$2 = _r$10; + _i$1 = 0; + /* while (true) { */ case 9: + /* if (!(_i$1 < _ref$2.$length)) { break; } */ if(!(_i$1 < _ref$2.$length)) { $s = 10; continue; } + sys = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); + _tuple$2 = $assertType(sys, ptrType$25, true); + imx = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (ok$1) { + ((n < 0 || n >= ift.$length) ? ($throwRuntimeError("index out of range"), undefined) : ift.$array[ift.$offset + n]).MTU = imx.MTU; + /* break; */ $s = 10; continue; + } + _i$1++; + /* } */ $s = 9; continue; case 10: + n = n + (1) >> 0; + if (ifindex === m$1.Index) { + $s = -1; return [$subslice(ift, 0, n), $ifaceNil]; + } + /* } */ case 5: + _i++; + /* } */ $s = 2; continue; case 3: + $s = -1; return [$subslice(ift, 0, n), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: interfaceTable }; } $f._i = _i; $f._i$1 = _i$1; $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.ifindex = ifindex; $f.ift = ift; $f.imx = imx; $f.m = m; $f.m$1 = m$1; $f.msgs = msgs; $f.n = n; $f.ok = ok; $f.ok$1 = ok$1; $f.sa = sa; $f.sys = sys; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + linkFlags = function(rawFlags) { + var f, rawFlags; + f = 0; + if (!(((rawFlags & 1) === 0))) { + f = (f | (1)) >>> 0; + } + if (!(((rawFlags & 2) === 0))) { + f = (f | (2)) >>> 0; + } + if (!(((rawFlags & 8) === 0))) { + f = (f | (4)) >>> 0; + } + if (!(((rawFlags & 16) === 0))) { + f = (f | (8)) >>> 0; + } + if (!(((rawFlags & 32768) === 0))) { + f = (f | (16)) >>> 0; + } + return f; + }; + interfaceAddrTable = function(ifi) { + var _i, _r$9, _ref, _ref$1, _ref$2, _ref$3, _tuple, err, ifat, ifi, index, ip, m, m$1, mask, msgs, sa, sa$1, sa$2, sa$3, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _tuple = $f._tuple; err = $f.err; ifat = $f.ifat; ifi = $f.ifi; index = $f.index; ip = $f.ip; m = $f.m; m$1 = $f.m$1; mask = $f.mask; msgs = $f.msgs; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; sa$3 = $f.sa$3; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + index = 0; + if (!(ifi === ptrType$22.nil)) { + index = ifi.Index; + } + _r$9 = interfaceMessages(index); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + msgs = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, err]; + } + ifat = $makeSlice(sliceType$7, 0, msgs.$length); + _ref = msgs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + m = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = m; + if ($assertType(_ref$1, ptrType$26, true)[1]) { + m$1 = _ref$1.$val; + if (!((index === 0)) && !((index === m$1.Index))) { + _i++; + continue; + } + mask = IPMask.nil; + _ref$2 = (x = m$1.Addrs, (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2])); + if ($assertType(_ref$2, ptrType$27, true)[1]) { + sa = _ref$2.$val; + mask = IPv4Mask(sa.IP[0], sa.IP[1], sa.IP[2], sa.IP[3]); + } else if ($assertType(_ref$2, ptrType$28, true)[1]) { + sa$1 = _ref$2.$val; + mask = $makeSlice(IPMask, 16); + $copySlice(mask, new sliceType$1(sa$1.IP)); + } + ip = IP.nil; + _ref$3 = (x$1 = m$1.Addrs, (5 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 5])); + if ($assertType(_ref$3, ptrType$27, true)[1]) { + sa$2 = _ref$3.$val; + ip = IPv4(sa$2.IP[0], sa$2.IP[1], sa$2.IP[2], sa$2.IP[3]); + } else if ($assertType(_ref$3, ptrType$28, true)[1]) { + sa$3 = _ref$3.$val; + ip = $makeSlice(IP, 16); + $copySlice(ip, new sliceType$1(sa$3.IP)); + } + if (!(ip === IP.nil) && !(mask === IPMask.nil)) { + ifat = $append(ifat, new IPNet.ptr(ip, mask)); + } + } + _i++; + } + $s = -1; return [ifat, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: interfaceAddrTable }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._tuple = _tuple; $f.err = err; $f.ifat = ifat; $f.ifi = ifi; $f.index = index; $f.ip = ip; $f.m = m; $f.m$1 = m$1; $f.mask = mask; $f.msgs = msgs; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.sa$3 = sa$3; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + interfaceMessages = function(ifindex) { + var _r$9, _tuple, err, ifindex, rib, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; ifindex = $f.ifindex; rib = $f.rib; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = route.FetchRIB(0, 3, ifindex); + rib = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$9.nil, err]; + } + _r$9 = route.ParseRIB(3, rib); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: interfaceMessages }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.ifindex = ifindex; $f.rib = rib; $f.$s = $s; $f.$r = $r; return $f; + }; + interfaceMulticastAddrTable = function(ifi) { + var _i, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, err, ifi, ifmat, ip, m, m$1, msgs, rib, sa, sa$1, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; ifi = $f.ifi; ifmat = $f.ifmat; ip = $f.ip; m = $f.m; m$1 = $f.m$1; msgs = $f.msgs; rib = $f.rib; sa = $f.sa; sa$1 = $f.sa$1; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = route.FetchRIB(0, 6, ifi.Index); + rib = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, err]; + } + _r$9 = route.ParseRIB(6, rib); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + msgs = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, err]; + } + ifmat = $makeSlice(sliceType$7, 0, msgs.$length); + _ref = msgs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + m = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = m; + if ($assertType(_ref$1, ptrType$29, true)[1]) { + m$1 = _ref$1.$val; + if (!((ifi.Index === m$1.Index))) { + _i++; + continue; + } + ip = IP.nil; + _ref$2 = (x = m$1.Addrs, (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5])); + if ($assertType(_ref$2, ptrType$27, true)[1]) { + sa = _ref$2.$val; + ip = IPv4(sa.IP[0], sa.IP[1], sa.IP[2], sa.IP[3]); + } else if ($assertType(_ref$2, ptrType$28, true)[1]) { + sa$1 = _ref$2.$val; + ip = $makeSlice(IP, 16); + $copySlice(ip, new sliceType$1(sa$1.IP)); + } + if (!(ip === IP.nil)) { + ifmat = $append(ifmat, new IPAddr.ptr(ip, "")); + } + } + _i++; + } + $s = -1; return [ifmat, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: interfaceMulticastAddrTable }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.ifi = ifi; $f.ifmat = ifmat; $f.ip = ip; $f.m = m; $f.m$1 = m$1; $f.msgs = msgs; $f.rib = rib; $f.sa = sa; $f.sa$1 = sa$1; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + IPv4 = function(a, b, c, d) { + var a, b, c, d, p; + p = $makeSlice(IP, 16); + $copySlice(p, v4InV6Prefix); + (12 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 12] = a); + (13 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 13] = b); + (14 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 14] = c); + (15 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 15] = d); + return p; + }; + $pkg.IPv4 = IPv4; + IPv4Mask = function(a, b, c, d) { + var a, b, c, d, p; + p = $makeSlice(IPMask, 4); + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = a); + (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = b); + (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = c); + (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3] = d); + return p; + }; + $pkg.IPv4Mask = IPv4Mask; + CIDRMask = function(ones, bits) { + var _q, bits, i, l, m, n, ones, y; + if (!((bits === 32)) && !((bits === 128))) { + return IPMask.nil; + } + if (ones < 0 || ones > bits) { + return IPMask.nil; + } + l = (_q = bits / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + m = $makeSlice(IPMask, l); + n = ((ones >>> 0)); + i = 0; + while (true) { + if (!(i < l)) { break; } + if (n >= 8) { + ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = 255); + n = n - (8) >>> 0; + i = i + (1) >> 0; + continue; + } + ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = (~(((y = n, y < 32 ? (255 >>> y) : 0) << 24 >>> 24)) << 24 >>> 24)); + n = 0; + i = i + (1) >> 0; + } + return m; + }; + $pkg.CIDRMask = CIDRMask; + IP.prototype.IsUnspecified = function() { + var ip; + ip = this; + return ip.Equal($pkg.IPv4zero) || ip.Equal($pkg.IPv6unspecified); + }; + $ptrType(IP).prototype.IsUnspecified = function() { return this.$get().IsUnspecified(); }; + IP.prototype.IsLoopback = function() { + var ip, ip4; + ip = this; + ip4 = ip.To4(); + if (!(ip4 === IP.nil)) { + return (0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 127; + } + return ip.Equal($pkg.IPv6loopback); + }; + $ptrType(IP).prototype.IsLoopback = function() { return this.$get().IsLoopback(); }; + IP.prototype.IsMulticast = function() { + var ip, ip4; + ip = this; + ip4 = ip.To4(); + if (!(ip4 === IP.nil)) { + return (((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) & 240) >>> 0) === 224; + } + return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255); + }; + $ptrType(IP).prototype.IsMulticast = function() { return this.$get().IsMulticast(); }; + IP.prototype.IsInterfaceLocalMulticast = function() { + var ip; + ip = this; + return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 15) >>> 0) === 1); + }; + $ptrType(IP).prototype.IsInterfaceLocalMulticast = function() { return this.$get().IsInterfaceLocalMulticast(); }; + IP.prototype.IsLinkLocalMulticast = function() { + var ip, ip4; + ip = this; + ip4 = ip.To4(); + if (!(ip4 === IP.nil)) { + return ((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 224) && ((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) === 0) && ((2 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 2]) === 0); + } + return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 15) >>> 0) === 2); + }; + $ptrType(IP).prototype.IsLinkLocalMulticast = function() { return this.$get().IsLinkLocalMulticast(); }; + IP.prototype.IsLinkLocalUnicast = function() { + var ip, ip4; + ip = this; + ip4 = ip.To4(); + if (!(ip4 === IP.nil)) { + return ((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 169) && ((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) === 254); + } + return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 254) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 192) >>> 0) === 128); + }; + $ptrType(IP).prototype.IsLinkLocalUnicast = function() { return this.$get().IsLinkLocalUnicast(); }; + IP.prototype.IsGlobalUnicast = function() { + var ip; + ip = this; + return ((ip.$length === 4) || (ip.$length === 16)) && !ip.Equal($pkg.IPv4bcast) && !ip.IsUnspecified() && !ip.IsLoopback() && !ip.IsMulticast() && !ip.IsLinkLocalUnicast(); + }; + $ptrType(IP).prototype.IsGlobalUnicast = function() { return this.$get().IsGlobalUnicast(); }; + isZeros = function(p) { + var i, p; + i = 0; + while (true) { + if (!(i < p.$length)) { break; } + if (!((((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]) === 0))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + IP.prototype.To4 = function() { + var ip; + ip = this; + if (ip.$length === 4) { + return ip; + } + if ((ip.$length === 16) && isZeros($subslice(ip, 0, 10)) && ((10 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 10]) === 255) && ((11 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 11]) === 255)) { + return $subslice(ip, 12, 16); + } + return IP.nil; + }; + $ptrType(IP).prototype.To4 = function() { return this.$get().To4(); }; + IP.prototype.To16 = function() { + var ip; + ip = this; + if (ip.$length === 4) { + return IPv4((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]), (1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]), (2 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 2]), (3 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 3])); + } + if (ip.$length === 16) { + return ip; + } + return IP.nil; + }; + $ptrType(IP).prototype.To16 = function() { return this.$get().To16(); }; + IP.prototype.DefaultMask = function() { + var _1, ip; + ip = this; + ip = ip.To4(); + if (ip === IP.nil) { + return IPMask.nil; + } + _1 = true; + if (_1 === ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) < 128)) { + return classAMask; + } else if (_1 === ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) < 192)) { + return classBMask; + } else { + return classCMask; + } + }; + $ptrType(IP).prototype.DefaultMask = function() { return this.$get().DefaultMask(); }; + allFF = function(b) { + var _i, _ref, b, c; + _ref = b; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((c === 255))) { + return false; + } + _i++; + } + return true; + }; + IP.prototype.Mask = function(mask) { + var i, ip, mask, n, out, x, x$1; + ip = this; + if ((mask.$length === 16) && (ip.$length === 4) && allFF((x = $subslice(mask, 0, 12), $subslice(new sliceType$1(x.$array), x.$offset, x.$offset + x.$length)))) { + mask = $subslice(mask, 12); + } + if ((mask.$length === 4) && (ip.$length === 16) && bytesEqual((x$1 = $subslice(ip, 0, 12), $subslice(new sliceType$1(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), v4InV6Prefix)) { + ip = $subslice(ip, 12); + } + n = ip.$length; + if (!((n === mask.$length))) { + return IP.nil; + } + out = $makeSlice(IP, n); + i = 0; + while (true) { + if (!(i < n)) { break; } + ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = ((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & ((i < 0 || i >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + i])) >>> 0)); + i = i + (1) >> 0; + } + return out; + }; + $ptrType(IP).prototype.Mask = function(mask) { return this.$get().Mask(mask); }; + ubtoa = function(dst, start, v) { + var _q, _q$1, _q$2, _r$10, _r$11, _r$9, dst, start, v, x, x$1, x$2; + if (v < 10) { + ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = (v + 48 << 24 >>> 24)); + return 1; + } else if (v < 100) { + (x = start + 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x] = ((_r$9 = v % 10, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); + ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = ((_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24)); + return 2; + } + (x$1 = start + 2 >> 0, ((x$1 < 0 || x$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$1] = ((_r$10 = v % 10, _r$10 === _r$10 ? _r$10 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); + (x$2 = start + 1 >> 0, ((x$2 < 0 || x$2 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$2] = ((_r$11 = ((_q$1 = v / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$11 === _r$11 ? _r$11 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); + ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = ((_q$2 = v / 100, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >>> 0 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24)); + return 3; + }; + IP.prototype.String = function() { + var b, b$1, e0, e1, i, i$1, ip, j, n, p, p4, x, x$1; + ip = this; + p = ip; + if (ip.$length === 0) { + return ""; + } + p4 = p.To4(); + if (p4.$length === 4) { + b = $makeSlice(sliceType$1, 15); + n = ubtoa(b, 0, (0 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 0])); + ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); + n = n + (1) >> 0; + n = n + (ubtoa(b, n, (1 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 1]))) >> 0; + ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); + n = n + (1) >> 0; + n = n + (ubtoa(b, n, (2 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 2]))) >> 0; + ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); + n = n + (1) >> 0; + n = n + (ubtoa(b, n, (3 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 3]))) >> 0; + return ($bytesToString($subslice(b, 0, n))); + } + if (!((p.$length === 16))) { + return "?" + hexString($subslice(new sliceType$1(ip.$array), ip.$offset, ip.$offset + ip.$length)); + } + e0 = -1; + e1 = -1; + i = 0; + while (true) { + if (!(i < 16)) { break; } + j = i; + while (true) { + if (!(j < 16 && (((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) === 0) && ((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) === 0))) { break; } + j = j + (2) >> 0; + } + if (j > i && (j - i >> 0) > (e1 - e0 >> 0)) { + e0 = i; + e1 = j; + i = j; + } + i = i + (2) >> 0; + } + if ((e1 - e0 >> 0) <= 2) { + e0 = -1; + e1 = -1; + } + b$1 = $makeSlice(sliceType$1, 0, 39); + i$1 = 0; + while (true) { + if (!(i$1 < 16)) { break; } + if (i$1 === e0) { + b$1 = $append(b$1, 58, 58); + i$1 = e1; + if (i$1 >= 16) { + break; + } + } else if (i$1 > 0) { + b$1 = $append(b$1, 58); + } + b$1 = appendHex(b$1, (((((((i$1 < 0 || i$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i$1]) >>> 0)) << 8 >>> 0)) | (((x$1 = i$1 + 1 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0))) >>> 0); + i$1 = i$1 + (2) >> 0; + } + return ($bytesToString(b$1)); + }; + $ptrType(IP).prototype.String = function() { return this.$get().String(); }; + hexString = function(b) { + var _i, _ref, _tmp, _tmp$1, b, i, s, tn, x, x$1; + s = $makeSlice(sliceType$1, ($imul(b.$length, 2))); + _ref = b; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + tn = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tmp = "0123456789abcdef".charCodeAt((tn >>> 4 << 24 >>> 24)); + _tmp$1 = "0123456789abcdef".charCodeAt(((tn & 15) >>> 0)); + (x = $imul(i, 2), ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x] = _tmp)); + (x$1 = ($imul(i, 2)) + 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1] = _tmp$1)); + _i++; + } + return ($bytesToString(s)); + }; + ipEmptyString = function(ip) { + var ip; + if (ip.$length === 0) { + return ""; + } + return ip.String(); + }; + IP.prototype.MarshalText = function() { + var ip; + ip = this; + if (ip.$length === 0) { + return [(new sliceType$1($stringToBytes(""))), $ifaceNil]; + } + if (!((ip.$length === 4)) && !((ip.$length === 16))) { + return [sliceType$1.nil, new AddrError.ptr("invalid IP address", hexString($subslice(new sliceType$1(ip.$array), ip.$offset, ip.$offset + ip.$length)))]; + } + return [(new sliceType$1($stringToBytes(ip.String()))), $ifaceNil]; + }; + $ptrType(IP).prototype.MarshalText = function() { return this.$get().MarshalText(); }; + $ptrType(IP).prototype.UnmarshalText = function(text) { + var ip, s, text, x; + ip = this; + if (text.$length === 0) { + ip.$set(IP.nil); + return $ifaceNil; + } + s = ($bytesToString(text)); + x = ParseIP(s); + if (x === IP.nil) { + return new ParseError.ptr("IP address", s); + } + ip.$set(x); + return $ifaceNil; + }; + IP.prototype.Equal = function(x) { + var ip, x, x$1, x$2, x$3, x$4; + ip = this; + if (ip.$length === x.$length) { + return bytesEqual($subslice(new sliceType$1(ip.$array), ip.$offset, ip.$offset + ip.$length), $subslice(new sliceType$1(x.$array), x.$offset, x.$offset + x.$length)); + } + if ((ip.$length === 4) && (x.$length === 16)) { + return bytesEqual((x$1 = $subslice(x, 0, 12), $subslice(new sliceType$1(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), v4InV6Prefix) && bytesEqual($subslice(new sliceType$1(ip.$array), ip.$offset, ip.$offset + ip.$length), (x$2 = $subslice(x, 12), $subslice(new sliceType$1(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length))); + } + if ((ip.$length === 16) && (x.$length === 4)) { + return bytesEqual((x$3 = $subslice(ip, 0, 12), $subslice(new sliceType$1(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)), v4InV6Prefix) && bytesEqual((x$4 = $subslice(ip, 12), $subslice(new sliceType$1(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)), $subslice(new sliceType$1(x.$array), x.$offset, x.$offset + x.$length)); + } + return false; + }; + $ptrType(IP).prototype.Equal = function(x) { return this.$get().Equal(x); }; + IP.prototype.matchAddrFamily = function(x) { + var ip, x; + ip = this; + return !(ip.To4() === IP.nil) && !(x.To4() === IP.nil) || !(ip.To16() === IP.nil) && ip.To4() === IP.nil && !(x.To16() === IP.nil) && x.To4() === IP.nil; + }; + $ptrType(IP).prototype.matchAddrFamily = function(x) { return this.$get().matchAddrFamily(x); }; + simpleMaskLength = function(mask) { + var _i, _ref, i, mask, n, v, y; + n = 0; + _ref = mask; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (v === 255) { + n = n + (8) >> 0; + _i++; + continue; + } + while (true) { + if (!(!((((v & 128) >>> 0) === 0)))) { break; } + n = n + (1) >> 0; + v = (y = (1), y < 32 ? (v << y) : 0) << 24 >>> 24; + } + if (!((v === 0))) { + return -1; + } + i = i + (1) >> 0; + while (true) { + if (!(i < mask.$length)) { break; } + if (!((((i < 0 || i >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + i]) === 0))) { + return -1; + } + i = i + (1) >> 0; + } + break; + } + return n; + }; + IPMask.prototype.Size = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, bits, m, ones; + ones = 0; + bits = 0; + m = this; + _tmp = simpleMaskLength(m); + _tmp$1 = $imul(m.$length, 8); + ones = _tmp; + bits = _tmp$1; + if (ones === -1) { + _tmp$2 = 0; + _tmp$3 = 0; + ones = _tmp$2; + bits = _tmp$3; + return [ones, bits]; + } + return [ones, bits]; + }; + $ptrType(IPMask).prototype.Size = function() { return this.$get().Size(); }; + IPMask.prototype.String = function() { + var m; + m = this; + if (m.$length === 0) { + return ""; + } + return hexString($subslice(new sliceType$1(m.$array), m.$offset, m.$offset + m.$length)); + }; + $ptrType(IPMask).prototype.String = function() { return this.$get().String(); }; + networkNumberAndMask = function(n) { + var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, ip, m, n; + ip = IP.nil; + m = IPMask.nil; + ip = n.IP.To4(); + if (ip === IP.nil) { + ip = n.IP; + if (!((ip.$length === 16))) { + _tmp = IP.nil; + _tmp$1 = IPMask.nil; + ip = _tmp; + m = _tmp$1; + return [ip, m]; + } + } + m = n.Mask; + _1 = m.$length; + if (_1 === (4)) { + if (!((ip.$length === 4))) { + _tmp$2 = IP.nil; + _tmp$3 = IPMask.nil; + ip = _tmp$2; + m = _tmp$3; + return [ip, m]; + } + } else if (_1 === (16)) { + if (ip.$length === 4) { + m = $subslice(m, 12); + } + } else { + _tmp$4 = IP.nil; + _tmp$5 = IPMask.nil; + ip = _tmp$4; + m = _tmp$5; + return [ip, m]; + } + return [ip, m]; + }; + IPNet.ptr.prototype.Contains = function(ip) { + var _tuple, i, ip, l, m, n, nn, x; + n = this; + _tuple = networkNumberAndMask(n); + nn = _tuple[0]; + m = _tuple[1]; + x = ip.To4(); + if (!(x === IP.nil)) { + ip = x; + } + l = ip.$length; + if (!((l === nn.$length))) { + return false; + } + i = 0; + while (true) { + if (!(i < l)) { break; } + if (!((((((i < 0 || i >= nn.$length) ? ($throwRuntimeError("index out of range"), undefined) : nn.$array[nn.$offset + i]) & ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i])) >>> 0) === ((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i])) >>> 0)))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + IPNet.prototype.Contains = function(ip) { return this.$val.Contains(ip); }; + IPNet.ptr.prototype.Network = function() { + var n; + n = this; + return "ip+net"; + }; + IPNet.prototype.Network = function() { return this.$val.Network(); }; + IPNet.ptr.prototype.String = function() { + var _tuple, l, m, n, nn; + n = this; + _tuple = networkNumberAndMask(n); + nn = _tuple[0]; + m = _tuple[1]; + if (nn === IP.nil || m === IPMask.nil) { + return ""; + } + l = simpleMaskLength(m); + if (l === -1) { + return nn.String() + "/" + m.String(); + } + return nn.String() + "/" + uitoa(((l >>> 0))); + }; + IPNet.prototype.String = function() { return this.$val.String(); }; + parseIPv4 = function(s) { + var _tuple, c, i, n, ok, p, s; + p = arrayType$2.zero(); + i = 0; + while (true) { + if (!(i < 4)) { break; } + if (s.length === 0) { + return IP.nil; + } + if (i > 0) { + if (!((s.charCodeAt(0) === 46))) { + return IP.nil; + } + s = $substring(s, 1); + } + _tuple = dtoi(s); + n = _tuple[0]; + c = _tuple[1]; + ok = _tuple[2]; + if (!ok || n > 255) { + return IP.nil; + } + s = $substring(s, c); + ((i < 0 || i >= p.length) ? ($throwRuntimeError("index out of range"), undefined) : p[i] = ((n << 24 >>> 24))); + i = i + (1) >> 0; + } + if (!((s.length === 0))) { + return IP.nil; + } + return IPv4(p[0], p[1], p[2], p[3]); + }; + parseIPv6Zone = function(s) { + var _tuple, s, zone; + _tuple = splitHostZone(s); + s = _tuple[0]; + zone = _tuple[1]; + return [parseIPv6(s), zone]; + }; + parseIPv6 = function(s) { + var _tuple, c, ellipsis, i, ip, ip4, j, j$1, n, n$1, ok, s, x, x$1, x$2, x$3, x$4; + ip = IP.nil; + ip = $makeSlice(IP, 16); + ellipsis = -1; + if (s.length >= 2 && (s.charCodeAt(0) === 58) && (s.charCodeAt(1) === 58)) { + ellipsis = 0; + s = $substring(s, 2); + if (s.length === 0) { + ip = ip; + return ip; + } + } + i = 0; + while (true) { + if (!(i < 16)) { break; } + _tuple = xtoi(s); + n = _tuple[0]; + c = _tuple[1]; + ok = _tuple[2]; + if (!ok || n > 65535) { + ip = IP.nil; + return ip; + } + if (c < s.length && (s.charCodeAt(c) === 46)) { + if (ellipsis < 0 && !((i === 12))) { + ip = IP.nil; + return ip; + } + if ((i + 4 >> 0) > 16) { + ip = IP.nil; + return ip; + } + ip4 = parseIPv4(s); + if (ip4 === IP.nil) { + ip = IP.nil; + return ip; + } + ((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i] = (12 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 12])); + (x = i + 1 >> 0, ((x < 0 || x >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x] = (13 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 13]))); + (x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$1] = (14 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 14]))); + (x$2 = i + 3 >> 0, ((x$2 < 0 || x$2 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$2] = (15 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 15]))); + s = ""; + i = i + (4) >> 0; + break; + } + ((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i] = (((n >> 8 >> 0) << 24 >>> 24))); + (x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$3] = ((n << 24 >>> 24)))); + i = i + (2) >> 0; + s = $substring(s, c); + if (s.length === 0) { + break; + } + if (!((s.charCodeAt(0) === 58)) || (s.length === 1)) { + ip = IP.nil; + return ip; + } + s = $substring(s, 1); + if (s.charCodeAt(0) === 58) { + if (ellipsis >= 0) { + ip = IP.nil; + return ip; + } + ellipsis = i; + s = $substring(s, 1); + if (s.length === 0) { + break; + } + } + } + if (!((s.length === 0))) { + ip = IP.nil; + return ip; + } + if (i < 16) { + if (ellipsis < 0) { + ip = IP.nil; + return ip; + } + n$1 = 16 - i >> 0; + j = i - 1 >> 0; + while (true) { + if (!(j >= ellipsis)) { break; } + (x$4 = j + n$1 >> 0, ((x$4 < 0 || x$4 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$4] = ((j < 0 || j >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + j]))); + j = j - (1) >> 0; + } + j$1 = (ellipsis + n$1 >> 0) - 1 >> 0; + while (true) { + if (!(j$1 >= ellipsis)) { break; } + ((j$1 < 0 || j$1 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + j$1] = 0); + j$1 = j$1 - (1) >> 0; + } + } else if (ellipsis >= 0) { + ip = IP.nil; + return ip; + } + ip = ip; + return ip; + }; + ParseIP = function(s) { + var _1, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _1 = s.charCodeAt(i); + if (_1 === (46)) { + return parseIPv4(s); + } else if (_1 === (58)) { + return parseIPv6(s); + } + i = i + (1) >> 0; + } + return IP.nil; + }; + $pkg.ParseIP = ParseIP; + parseIPZone = function(s) { + var _1, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _1 = s.charCodeAt(i); + if (_1 === (46)) { + return [parseIPv4(s), ""]; + } else if (_1 === (58)) { + return parseIPv6Zone(s); + } + i = i + (1) >> 0; + } + return [IP.nil, ""]; + }; + ParseCIDR = function(s) { + var _tmp, _tmp$1, _tuple, addr, i, ip, iplen, m, mask, n, ok, s; + i = byteIndex(s, 47); + if (i < 0) { + return [IP.nil, ptrType$4.nil, new ParseError.ptr("CIDR address", s)]; + } + _tmp = $substring(s, 0, i); + _tmp$1 = $substring(s, (i + 1 >> 0)); + addr = _tmp; + mask = _tmp$1; + iplen = 4; + ip = parseIPv4(addr); + if (ip === IP.nil) { + iplen = 16; + ip = parseIPv6(addr); + } + _tuple = dtoi(mask); + n = _tuple[0]; + i = _tuple[1]; + ok = _tuple[2]; + if (ip === IP.nil || !ok || !((i === mask.length)) || n < 0 || n > ($imul(8, iplen))) { + return [IP.nil, ptrType$4.nil, new ParseError.ptr("CIDR address", s)]; + } + m = CIDRMask(n, $imul(8, iplen)); + return [ip, new IPNet.ptr(ip.Mask(m), m), $ifaceNil]; + }; + $pkg.ParseCIDR = ParseCIDR; + IPAddr.ptr.prototype.Network = function() { + var a; + a = this; + return "ip"; + }; + IPAddr.prototype.Network = function() { return this.$val.Network(); }; + IPAddr.ptr.prototype.String = function() { + var a, ip; + a = this; + if (a === ptrType$8.nil) { + return ""; + } + ip = ipEmptyString(a.IP); + if (!(a.Zone === "")) { + return ip + "%" + a.Zone; + } + return ip; + }; + IPAddr.prototype.String = function() { return this.$val.String(); }; + IPAddr.ptr.prototype.isWildcard = function() { + var a; + a = this; + if (a === ptrType$8.nil || a.IP === IP.nil) { + return true; + } + return a.IP.IsUnspecified(); + }; + IPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; + IPAddr.ptr.prototype.opAddr = function() { + var a; + a = this; + if (a === ptrType$8.nil) { + return $ifaceNil; + } + return a; + }; + IPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; + IPConn.ptr.prototype.SyscallConn = function() { + var _returncast, c; + c = this; + if (!c.conn.ok()) { + return [$ifaceNil, new syscall.Errno(22)]; + } + _returncast = newRawConn(c.conn.fd); + return [_returncast[0], _returncast[1]]; + }; + IPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; + IPConn.ptr.prototype.ReadFromIP = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, ptrType$8.nil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.ReadFromIP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.ReadFromIP = function(b) { return this.$val.ReadFromIP(b); }; + IPConn.ptr.prototype.ReadFrom = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, $ifaceNil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + if (addr === ptrType$8.nil) { + $s = -1; return [n, $ifaceNil, err]; + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.ReadFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; + IPConn.ptr.prototype.ReadMsgIP = function(b, oob) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$8.nil; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = ptrType$8.nil; + _tmp$4 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + flags = _tmp$2; + addr = _tmp$3; + err = _tmp$4; + $s = -1; return [n, oobn, flags, addr, err]; + } + _r$9 = c.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + addr = _tuple[3]; + err = _tuple[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.ReadMsgIP }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.ReadMsgIP = function(b, oob) { return this.$val.ReadMsgIP(b, oob); }; + IPConn.ptr.prototype.WriteToIP = function(b, addr) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _r$9 = c.writeTo(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.WriteToIP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.WriteToIP = function(b, addr) { return this.$val.WriteToIP(b, addr); }; + IPConn.ptr.prototype.WriteTo = function(b, addr) { + var _r$9, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; a = $f.a; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _tuple = $assertType(addr, ptrType$8, true); + a = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; + } + _r$9 = c.writeTo(b, a); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + n = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.WriteTo }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.a = a; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; + IPConn.ptr.prototype.WriteMsgIP = function(b, oob, addr) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + _r$9 = c.writeMsg(b, oob, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.WriteMsgIP }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.WriteMsgIP = function(b, oob, addr) { return this.$val.WriteMsgIP(b, oob, addr); }; + newIPConn = function(fd) { + var fd; + return new IPConn.ptr(new conn.ptr(fd)); + }; + sockaddrToIP = function(sa) { + var _r$9, _ref, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _ref = $f._ref; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 1: + sa$1 = _ref.$val; + $s = -1; return new IPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), ""); + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 2: + sa$2 = _ref.$val; + _r$9 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return new IPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), _r$9); + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: sockaddrToIP }; } $f._r$9 = _r$9; $f._ref = _ref; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + IPAddr.ptr.prototype.family = function() { + var a; + a = this; + if (a === ptrType$8.nil || a.IP.$length <= 4) { + return 2; + } + if (!(a.IP.To4() === IP.nil)) { + return 2; + } + return 30; + }; + IPAddr.prototype.family = function() { return this.$val.family(); }; + IPAddr.ptr.prototype.sockaddr = function(family) { + var _r$9, a, family, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; a = $f.a; family = $f.family; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = this; + if (a === ptrType$8.nil) { + $s = -1; return [$ifaceNil, $ifaceNil]; + } + _r$9 = ipToSockaddr(family, a.IP, 0, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPAddr.ptr.prototype.sockaddr }; } $f._r$9 = _r$9; $f.a = a; $f.family = family; $f.$s = $s; $f.$r = $r; return $f; + }; + IPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; + IPAddr.ptr.prototype.toLocal = function(net) { + var a, net; + a = this; + return new IPAddr.ptr(loopbackIP(net), a.Zone); + }; + IPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; + IPConn.ptr.prototype.readFrom = function(b) { + var _r$10, _r$9, _ref, _tuple, addr, b, c, err, n, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + addr = ptrType$8.nil; + _r$9 = c.conn.fd.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + sa = _tuple[1]; + err = _tuple[2]; + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 2; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 2: + sa$1 = _ref.$val; + addr = new IPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), ""); + n = stripIPv4Header(n, b); + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 3: + sa$2 = _ref.$val; + _r$10 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + addr = new IPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), _r$10); + /* } */ case 4: + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.readFrom }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.readFrom = function(b) { return this.$val.readFrom(b); }; + stripIPv4Header = function(n, b) { + var b, l, n; + if (b.$length < 20) { + return n; + } + l = (((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 15) >>> 0) >> 0)) << 2 >> 0; + if (20 > l || l > b.$length) { + return n; + } + if (!((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 4 << 24 >>> 24) === 4))) { + return n; + } + $copySlice(b, $subslice(b, l)); + return n - l >> 0; + }; + IPConn.ptr.prototype.readMsg = function(b, oob) { + var _r$10, _r$9, _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$8.nil; + err = $ifaceNil; + c = this; + sa = $ifaceNil; + _r$9 = c.conn.fd.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + sa = _tuple[3]; + err = _tuple[4]; + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 2; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 2: + sa$1 = _ref.$val; + addr = new IPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), ""); + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 3: + sa$2 = _ref.$val; + _r$10 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + addr = new IPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), _r$10); + /* } */ case 4: + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.readMsg }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; + IPConn.ptr.prototype.writeTo = function(b, addr) { + var _r$10, _r$9, _tuple, addr, b, c, err, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.conn.fd.isConnected) { + $s = -1; return [0, $pkg.ErrWriteToConnected]; + } + if (addr === ptrType$8.nil) { + $s = -1; return [0, errMissingAddress]; + } + _r$9 = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + sa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [0, err]; + } + _r$10 = c.conn.fd.writeTo(b, sa); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return _r$10; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.writeTo }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; + IPConn.ptr.prototype.writeMsg = function(b, oob, addr) { + var _r$10, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if (c.conn.fd.isConnected) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = $pkg.ErrWriteToConnected; + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + if (addr === ptrType$8.nil) { + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = errMissingAddress; + n = _tmp$3; + oobn = _tmp$4; + err = _tmp$5; + $s = -1; return [n, oobn, err]; + } + _r$9 = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + sa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = 0; + _tmp$7 = 0; + _tmp$8 = err; + n = _tmp$6; + oobn = _tmp$7; + err = _tmp$8; + $s = -1; return [n, oobn, err]; + } + _r$10 = c.conn.fd.writeMsg(b, oob, sa); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + n = _tuple$1[0]; + oobn = _tuple$1[1]; + err = _tuple$1[2]; + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: IPConn.ptr.prototype.writeMsg }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + IPConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; + sysDialer.ptr.prototype.dialIP = function(ctx, laddr, raddr) { + var _1, _r$10, _r$9, _tuple, _tuple$1, ctx, err, fd, laddr, network, proto, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ctx = $f.ctx; err = $f.err; fd = $f.fd; laddr = $f.laddr; network = $f.network; proto = $f.proto; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sd = this; + _r$9 = parseNetwork(ctx, sd.network, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + network = _tuple[0]; + proto = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$30.nil, err]; + } + _1 = network; + if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { + } else { + $s = -1; return [ptrType$30.nil, new UnknownNetworkError((sd.network))]; + } + _r$10 = internetSocket(ctx, network, laddr, raddr, 3, proto, "dial", sd.Dialer.Control); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + fd = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$30.nil, err]; + } + $s = -1; return [newIPConn(fd), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialIP }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ctx = ctx; $f.err = err; $f.fd = fd; $f.laddr = laddr; $f.network = network; $f.proto = proto; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + sysDialer.prototype.dialIP = function(ctx, laddr, raddr) { return this.$val.dialIP(ctx, laddr, raddr); }; + supportsIPv4 = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = ipStackCaps.Once.Do($methodVal(ipStackCaps, "probe")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return ipStackCaps.ipv4Enabled; + /* */ } return; } if ($f === undefined) { $f = { $blk: supportsIPv4 }; } $f.$s = $s; $f.$r = $r; return $f; + }; + supportsIPv4map = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = ipStackCaps.Once.Do($methodVal(ipStackCaps, "probe")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return ipStackCaps.ipv4MappedIPv6Enabled; + /* */ } return; } if ($f === undefined) { $f = { $blk: supportsIPv4map }; } $f.$s = $s; $f.$r = $r; return $f; + }; + isIPv4 = function(addr) { + var _ref, addr, addr$1, addr$2, addr$3; + _ref = addr; + if ($assertType(_ref, ptrType$7, true)[1]) { + addr$1 = _ref.$val; + return !(addr$1.IP.To4() === IP.nil); + } else if ($assertType(_ref, ptrType$5, true)[1]) { + addr$2 = _ref.$val; + return !(addr$2.IP.To4() === IP.nil); + } else if ($assertType(_ref, ptrType$8, true)[1]) { + addr$3 = _ref.$val; + return !(addr$3.IP.To4() === IP.nil); + } + return false; + }; + addrList.prototype.partition = function(strategy) { + var _i, _r$9, _ref, addr, addrs, fallbacks, i, label, primaries, primaryLabel, strategy, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; addr = $f.addr; addrs = $f.addrs; fallbacks = $f.fallbacks; i = $f.i; label = $f.label; primaries = $f.primaries; primaryLabel = $f.primaryLabel; strategy = $f.strategy; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + primaries = addrList.nil; + fallbacks = addrList.nil; + addrs = this; + primaryLabel = false; + _ref = addrs; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$9 = strategy(addr); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + label = _r$9; + if ((i === 0) || label === primaryLabel) { + primaryLabel = label; + primaries = $append(primaries, addr); + } else { + fallbacks = $append(fallbacks, addr); + } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return [primaries, fallbacks]; + /* */ } return; } if ($f === undefined) { $f = { $blk: addrList.prototype.partition }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f.addr = addr; $f.addrs = addrs; $f.fallbacks = fallbacks; $f.i = i; $f.label = label; $f.primaries = primaries; $f.primaryLabel = primaryLabel; $f.strategy = strategy; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(addrList).prototype.partition = function(strategy) { return this.$get().partition(strategy); }; + filterAddrList = function(filter, ips, inetaddr, originalAddr) { + var _i, _r$10, _r$11, _r$9, _ref, _v, addrs, filter, inetaddr, ip, ips, originalAddr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _ref = $f._ref; _v = $f._v; addrs = $f.addrs; filter = $f.filter; inetaddr = $f.inetaddr; ip = $f.ip; ips = $f.ips; originalAddr = $f.originalAddr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = addrList.nil; + _ref = ips; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + ip = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); + if (filter === $throwNilPointerError) { _v = true; $s = 5; continue s; } + _r$9 = filter($clone(ip, IPAddr)); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9; case 5: + /* */ if (_v) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_v) { */ case 3: + _r$10 = inetaddr($clone(ip, IPAddr)); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + addrs = $append(addrs, _r$10); + /* } */ case 4: + _i++; + /* } */ $s = 1; continue; case 2: + /* */ if (addrs.$length === 0) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (addrs.$length === 0) { */ case 8: + _r$11 = errNoSuitableAddress.Error(); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return [addrList.nil, new AddrError.ptr(_r$11, originalAddr)]; + /* } */ case 9: + $s = -1; return [addrs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: filterAddrList }; } $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._ref = _ref; $f._v = _v; $f.addrs = addrs; $f.filter = filter; $f.inetaddr = inetaddr; $f.ip = ip; $f.ips = ips; $f.originalAddr = originalAddr; $f.$s = $s; $f.$r = $r; return $f; + }; + ipv4only = function(addr) { + var addr; + return !(addr.IP.To4() === IP.nil); + }; + ipv6only = function(addr) { + var addr; + return (addr.IP.$length === 16) && addr.IP.To4() === IP.nil; + }; + SplitHostPort = function(hostport) { + var _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, addrErr, end, err, host, hostport, i, j, k, port, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; addrErr = $f.addrErr; end = $f.end; err = $f.err; host = $f.host; hostport = $f.hostport; i = $f.i; j = $f.j; k = $f.k; port = $f.port; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + host = ""; + port = ""; + err = $ifaceNil; + addrErr = (function(addr, why) { + var _tmp, _tmp$1, _tmp$2, addr, err$1, host$1, port$1, why; + host$1 = ""; + port$1 = ""; + err$1 = $ifaceNil; + _tmp = ""; + _tmp$1 = ""; + _tmp$2 = new AddrError.ptr(why, addr); + host$1 = _tmp; + port$1 = _tmp$1; + err$1 = _tmp$2; + return [host$1, port$1, err$1]; + }); + _tmp = 0; + _tmp$1 = 0; + j = _tmp; + k = _tmp$1; + i = last(hostport, 58); + /* */ if (i < 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (i < 0) { */ case 1: + _r$9 = addrErr(hostport, "missing port in address"); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + $s = -1; return [host, port, err]; + /* } */ case 2: + /* */ if (hostport.charCodeAt(0) === 91) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (hostport.charCodeAt(0) === 91) { */ case 4: + end = byteIndex(hostport, 93); + /* */ if (end < 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (end < 0) { */ case 7: + _r$10 = addrErr(hostport, "missing ']' in address"); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + host = _tuple$1[0]; + port = _tuple$1[1]; + err = _tuple$1[2]; + $s = -1; return [host, port, err]; + /* } */ case 8: + _1 = end + 1 >> 0; + /* */ if (_1 === (hostport.length)) { $s = 11; continue; } + /* */ if (_1 === (i)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_1 === (hostport.length)) { */ case 11: + _r$11 = addrErr(hostport, "missing port in address"); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + host = _tuple$2[0]; + port = _tuple$2[1]; + err = _tuple$2[2]; + $s = -1; return [host, port, err]; + /* } else if (_1 === (i)) { */ case 12: + $s = 14; continue; + /* } else { */ case 13: + /* */ if (hostport.charCodeAt((end + 1 >> 0)) === 58) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (hostport.charCodeAt((end + 1 >> 0)) === 58) { */ case 16: + _r$12 = addrErr(hostport, "too many colons in address"); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + host = _tuple$3[0]; + port = _tuple$3[1]; + err = _tuple$3[2]; + $s = -1; return [host, port, err]; + /* } */ case 17: + _r$13 = addrErr(hostport, "missing port in address"); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$4 = _r$13; + host = _tuple$4[0]; + port = _tuple$4[1]; + err = _tuple$4[2]; + $s = -1; return [host, port, err]; + /* } */ case 14: + case 10: + host = $substring(hostport, 1, end); + _tmp$2 = 1; + _tmp$3 = end + 1 >> 0; + j = _tmp$2; + k = _tmp$3; + $s = 6; continue; + /* } else { */ case 5: + host = $substring(hostport, 0, i); + /* */ if (byteIndex(host, 58) >= 0) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (byteIndex(host, 58) >= 0) { */ case 20: + _r$14 = addrErr(hostport, "too many colons in address"); /* */ $s = 22; case 22: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$5 = _r$14; + host = _tuple$5[0]; + port = _tuple$5[1]; + err = _tuple$5[2]; + $s = -1; return [host, port, err]; + /* } */ case 21: + /* } */ case 6: + /* */ if (byteIndex($substring(hostport, j), 91) >= 0) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (byteIndex($substring(hostport, j), 91) >= 0) { */ case 23: + _r$15 = addrErr(hostport, "unexpected '[' in address"); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$6 = _r$15; + host = _tuple$6[0]; + port = _tuple$6[1]; + err = _tuple$6[2]; + $s = -1; return [host, port, err]; + /* } */ case 24: + /* */ if (byteIndex($substring(hostport, k), 93) >= 0) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (byteIndex($substring(hostport, k), 93) >= 0) { */ case 26: + _r$16 = addrErr(hostport, "unexpected ']' in address"); /* */ $s = 28; case 28: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$7 = _r$16; + host = _tuple$7[0]; + port = _tuple$7[1]; + err = _tuple$7[2]; + $s = -1; return [host, port, err]; + /* } */ case 27: + port = $substring(hostport, (i + 1 >> 0)); + _tmp$4 = host; + _tmp$5 = port; + _tmp$6 = $ifaceNil; + host = _tmp$4; + port = _tmp$5; + err = _tmp$6; + $s = -1; return [host, port, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: SplitHostPort }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f.addrErr = addrErr; $f.end = end; $f.err = err; $f.host = host; $f.hostport = hostport; $f.i = i; $f.j = j; $f.k = k; $f.port = port; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.SplitHostPort = SplitHostPort; + splitHostZone = function(s) { + var _tmp, _tmp$1, host, i, s, zone; + host = ""; + zone = ""; + i = last(s, 37); + if (i > 0) { + _tmp = $substring(s, 0, i); + _tmp$1 = $substring(s, (i + 1 >> 0)); + host = _tmp; + zone = _tmp$1; + } else { + host = s; + } + return [host, zone]; + }; + JoinHostPort = function(host, port) { + var host, port; + if (byteIndex(host, 58) >= 0) { + return "[" + host + "]:" + port; + } + return host + ":" + port; + }; + $pkg.JoinHostPort = JoinHostPort; + Resolver.ptr.prototype.internetAddrList = function(ctx, net, addr) { + var _1, _r$10, _r$11, _r$12, _r$13, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, addr, ctx, err, filter, host, inetaddr, ips, net, port, portnum, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; addr = $f.addr; ctx = $f.ctx; err = $f.err; filter = $f.filter; host = $f.host; inetaddr = $f.inetaddr; ips = $f.ips; net = $f.net; port = $f.port; portnum = $f.portnum; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + net = [net]; + portnum = [portnum]; + r = this; + err = $ifaceNil; + _tmp = ""; + _tmp$1 = ""; + host = _tmp; + port = _tmp$1; + portnum[0] = 0; + _1 = net[0]; + /* */ if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6") || _1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { $s = 2; continue; } + /* */ if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6") || _1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { */ case 2: + /* */ if (!(addr === "")) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(addr === "")) { */ case 6: + _r$9 = SplitHostPort(addr); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [addrList.nil, err]; + } + _r$10 = r.LookupPort(ctx, net[0], port); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + portnum[0] = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [addrList.nil, err]; + } + /* } */ case 7: + $s = 5; continue; + /* } else if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { */ case 3: + if (!(addr === "")) { + host = addr; + } + $s = 5; continue; + /* } else { */ case 4: + $s = -1; return [addrList.nil, new UnknownNetworkError((net[0]))]; + /* } */ case 5: + case 1: + inetaddr = (function(net, portnum) { return function(ip) { + var _2, ip; + _2 = net[0]; + if (_2 === ("tcp") || _2 === ("tcp4") || _2 === ("tcp6")) { + return new TCPAddr.ptr(ip.IP, portnum[0], ip.Zone); + } else if (_2 === ("udp") || _2 === ("udp4") || _2 === ("udp6")) { + return new UDPAddr.ptr(ip.IP, portnum[0], ip.Zone); + } else if (_2 === ("ip") || _2 === ("ip4") || _2 === ("ip6")) { + return new IPAddr.ptr(ip.IP, ip.Zone); + } else { + $panic(new $String("unexpected network: " + net[0])); + } + }; })(net, portnum); + /* */ if (host === "") { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (host === "") { */ case 10: + _r$11 = inetaddr(new IPAddr.ptr(IP.nil, "")); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return [new addrList([_r$11]), $ifaceNil]; + /* } */ case 11: + _r$12 = r.LookupIPAddr(ctx, host); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + ips = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [addrList.nil, err]; + } + if ((ips.$length === 1) && (0 >= ips.$length ? ($throwRuntimeError("index out of range"), undefined) : ips.$array[ips.$offset + 0]).IP.Equal($pkg.IPv6unspecified)) { + ips = $append(ips, new IPAddr.ptr($pkg.IPv4zero, "")); + } + filter = $throwNilPointerError; + if (!(net[0] === "") && (net[0].charCodeAt((net[0].length - 1 >> 0)) === 52)) { + filter = ipv4only; + } + if (!(net[0] === "") && (net[0].charCodeAt((net[0].length - 1 >> 0)) === 54)) { + filter = ipv6only; + } + _r$13 = filterAddrList(filter, ips, inetaddr, host); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $s = -1; return _r$13; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.internetAddrList }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.addr = addr; $f.ctx = ctx; $f.err = err; $f.filter = filter; $f.host = host; $f.inetaddr = inetaddr; $f.ips = ips; $f.net = net; $f.port = port; $f.portnum = portnum; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.internetAddrList = function(ctx, net, addr) { return this.$val.internetAddrList(ctx, net, addr); }; + loopbackIP = function(net) { + var net; + if (!(net === "") && (net.charCodeAt((net.length - 1 >> 0)) === 54)) { + return $pkg.IPv6loopback; + } + return new IP([127, 0, 0, 1]); + }; + ipStackCapabilities.ptr.prototype.probe = function() { + var _1, _2, _i, _r$10, _r$11, _r$12, _r$13, _r$9, _ref, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, i, p, probes, s, s$1, sa, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; i = $f.i; p = $f.p; probes = $f.probes; s = $f.s; s$1 = $f.s$1; sa = $f.sa; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + _r$9 = sysSocket(2, 1, 6); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + s = _tuple[0]; + err = _tuple[1]; + _1 = err; + /* */ if ($interfaceIsEqual(_1, new syscall.Errno((47))) || $interfaceIsEqual(_1, new syscall.Errno((43)))) { $s = 3; continue; } + /* */ if ($interfaceIsEqual(_1, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(_1, new syscall.Errno((47))) || $interfaceIsEqual(_1, new syscall.Errno((43)))) { */ case 3: + $s = 5; continue; + /* } else if ($interfaceIsEqual(_1, $ifaceNil)) { */ case 4: + _r$10 = poll.CloseFunc(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + p.ipv4Enabled = true; + /* } */ case 5: + case 2: + probes = new sliceType$10([new structType$2.ptr(new TCPAddr.ptr(ParseIP("::1"), 0, ""), 1), new structType$2.ptr(new TCPAddr.ptr(IPv4(127, 0, 0, 1), 0, ""), 0)]); + _2 = "darwin"; + if (_2 === ("dragonfly") || _2 === ("openbsd")) { + probes = $subslice(probes, 0, 1); + } + _ref = probes; + _i = 0; + /* while (true) { */ case 7: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 8; continue; } + i = _i; + _r$11 = sysSocket(30, 1, 6); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + s$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 10: + _i++; + /* continue; */ $s = 7; continue; + /* } */ case 11: + $deferred.push([poll.CloseFunc, [s$1]]); + syscall.SetsockoptInt(s$1, 41, 27, ((i < 0 || i >= probes.$length) ? ($throwRuntimeError("index out of range"), undefined) : probes.$array[probes.$offset + i]).value); + _r$12 = ((i < 0 || i >= probes.$length) ? ($throwRuntimeError("index out of range"), undefined) : probes.$array[probes.$offset + i]).laddr.sockaddr(30); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + sa = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 13: + _i++; + /* continue; */ $s = 7; continue; + /* } */ case 14: + _r$13 = syscall.Bind(s$1, sa); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err$2 = _r$13; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _i++; + /* continue; */ $s = 7; continue; + } + if (i === 0) { + p.ipv6Enabled = true; + } else { + p.ipv4MappedIPv6Enabled = true; + } + _i++; + /* } */ $s = 7; continue; case 8: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ipStackCapabilities.ptr.prototype.probe }; } $f._1 = _1; $f._2 = _2; $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.i = i; $f.p = p; $f.probes = probes; $f.s = s; $f.s$1 = s$1; $f.sa = sa; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ipStackCapabilities.prototype.probe = function() { return this.$val.probe(); }; + favoriteAddrFamily = function(network, laddr, raddr, mode) { + var _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, family, ipv6only$1, laddr, mode, network, raddr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _v = $f._v; _v$1 = $f._v$1; _v$2 = $f._v$2; _v$3 = $f._v$3; _v$4 = $f._v$4; _v$5 = $f._v$5; family = $f.family; ipv6only$1 = $f.ipv6only$1; laddr = $f.laddr; mode = $f.mode; network = $f.network; raddr = $f.raddr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + family = 0; + ipv6only$1 = false; + _1 = network.charCodeAt((network.length - 1 >> 0)); + if (_1 === (52)) { + _tmp = 2; + _tmp$1 = false; + family = _tmp; + ipv6only$1 = _tmp$1; + $s = -1; return [family, ipv6only$1]; + } else if (_1 === (54)) { + _tmp$2 = 30; + _tmp$3 = true; + family = _tmp$2; + ipv6only$1 = _tmp$3; + $s = -1; return [family, ipv6only$1]; + } + if (!(mode === "listen")) { _v = false; $s = 3; continue s; } + if ($interfaceIsEqual(laddr, $ifaceNil)) { _v$1 = true; $s = 4; continue s; } + _r$9 = laddr.isWildcard(); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v$1 = _r$9; case 4: + _v = _v$1; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + _r$10 = supportsIPv4map(); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + if (_r$10) { _v$2 = true; $s = 8; continue s; } + _r$11 = supportsIPv4(); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _v$2 = !_r$11; case 8: + /* */ if (_v$2) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (_v$2) { */ case 6: + _tmp$4 = 30; + _tmp$5 = false; + family = _tmp$4; + ipv6only$1 = _tmp$5; + $s = -1; return [family, ipv6only$1]; + /* } */ case 7: + if ($interfaceIsEqual(laddr, $ifaceNil)) { + _tmp$6 = 2; + _tmp$7 = false; + family = _tmp$6; + ipv6only$1 = _tmp$7; + $s = -1; return [family, ipv6only$1]; + } + _r$12 = laddr.family(); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tmp$8 = _r$12; + _tmp$9 = false; + family = _tmp$8; + ipv6only$1 = _tmp$9; + $s = -1; return [family, ipv6only$1]; + /* } */ case 2: + if ($interfaceIsEqual(laddr, $ifaceNil)) { _v$4 = true; $s = 15; continue s; } + _r$13 = laddr.family(); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _v$4 = _r$13 === 2; case 15: + if (!(_v$4)) { _v$3 = false; $s = 14; continue s; } + if ($interfaceIsEqual(raddr, $ifaceNil)) { _v$5 = true; $s = 17; continue s; } + _r$14 = raddr.family(); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _v$5 = _r$14 === 2; case 17: + _v$3 = _v$5; case 14: + /* */ if (_v$3) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_v$3) { */ case 12: + _tmp$10 = 2; + _tmp$11 = false; + family = _tmp$10; + ipv6only$1 = _tmp$11; + $s = -1; return [family, ipv6only$1]; + /* } */ case 13: + _tmp$12 = 30; + _tmp$13 = false; + family = _tmp$12; + ipv6only$1 = _tmp$13; + $s = -1; return [family, ipv6only$1]; + /* */ } return; } if ($f === undefined) { $f = { $blk: favoriteAddrFamily }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._v = _v; $f._v$1 = _v$1; $f._v$2 = _v$2; $f._v$3 = _v$3; $f._v$4 = _v$4; $f._v$5 = _v$5; $f.family = family; $f.ipv6only$1 = ipv6only$1; $f.laddr = laddr; $f.mode = mode; $f.network = network; $f.raddr = raddr; $f.$s = $s; $f.$r = $r; return $f; + }; + internetSocket = function(ctx, net, laddr, raddr, sotype, proto, mode, ctrlFn) { + var _r$10, _r$11, _r$12, _r$9, _tuple, _tuple$1, _v, ctrlFn, ctx, err, family, fd, ipv6only$1, laddr, mode, net, proto, raddr, sotype, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; ctrlFn = $f.ctrlFn; ctx = $f.ctx; err = $f.err; family = $f.family; fd = $f.fd; ipv6only$1 = $f.ipv6only$1; laddr = $f.laddr; mode = $f.mode; net = $f.net; proto = $f.proto; raddr = $f.raddr; sotype = $f.sotype; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = ptrType$16.nil; + err = $ifaceNil; + if (!(false && mode === "dial")) { _v = false; $s = 3; continue s; } + _r$9 = raddr.isWildcard(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + _r$10 = raddr.toLocal(net); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + raddr = _r$10; + /* } */ case 2: + _r$11 = favoriteAddrFamily(net, laddr, raddr, mode); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + family = _tuple[0]; + ipv6only$1 = _tuple[1]; + _r$12 = socket(ctx, net, family, sotype, proto, ipv6only$1, laddr, raddr, ctrlFn); /* */ $s = 7; case 7: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$1 = _r$12; + fd = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [fd, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: internetSocket }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.ctrlFn = ctrlFn; $f.ctx = ctx; $f.err = err; $f.family = family; $f.fd = fd; $f.ipv6only$1 = ipv6only$1; $f.laddr = laddr; $f.mode = mode; $f.net = net; $f.proto = proto; $f.raddr = raddr; $f.sotype = sotype; $f.$s = $s; $f.$r = $r; return $f; + }; + ipToSockaddr = function(family, ip, port, zone) { + var _1, _r$9, family, ip, ip4, ip6, port, sa, sa$1, zone, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$9 = $f._r$9; family = $f.family; ip = $f.ip; ip4 = $f.ip4; ip6 = $f.ip6; port = $f.port; sa = $f.sa; sa$1 = $f.sa$1; zone = $f.zone; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = family; + /* */ if (_1 === (2)) { $s = 2; continue; } + /* */ if (_1 === (30)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === (2)) { */ case 2: + if (ip.$length === 0) { + ip = $pkg.IPv4zero; + } + ip4 = ip.To4(); + if (ip4 === IP.nil) { + $s = -1; return [$ifaceNil, new AddrError.ptr("non-IPv4 address", ip.String())]; + } + sa = new syscall.SockaddrInet4.ptr(port, arrayType$2.zero(), new syscall.RawSockaddrInet4.ptr(0, 0, 0, arrayType$2.zero(), arrayType$3.zero())); + $copySlice(new sliceType$1(sa.Addr), ip4); + $s = -1; return [sa, $ifaceNil]; + /* } else if (_1 === (30)) { */ case 3: + if ((ip.$length === 0) || ip.Equal($pkg.IPv4zero)) { + ip = $pkg.IPv6zero; + } + ip6 = ip.To16(); + if (ip6 === IP.nil) { + $s = -1; return [$ifaceNil, new AddrError.ptr("non-IPv6 address", ip.String())]; + } + _r$9 = zoneCache.index(zone); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + sa$1 = new syscall.SockaddrInet6.ptr(port, ((_r$9 >>> 0)), arrayType$4.zero(), new syscall.RawSockaddrInet6.ptr(0, 0, 0, 0, arrayType$4.zero(), 0)); + $copySlice(new sliceType$1(sa$1.Addr), ip6); + $s = -1; return [sa$1, $ifaceNil]; + /* } */ case 4: + case 1: + $s = -1; return [$ifaceNil, new AddrError.ptr("invalid address family", ip.String())]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ipToSockaddr }; } $f._1 = _1; $f._r$9 = _r$9; $f.family = family; $f.ip = ip; $f.ip4 = ip4; $f.ip6 = ip6; $f.port = port; $f.sa = sa; $f.sa$1 = sa$1; $f.zone = zone; $f.$s = $s; $f.$r = $r; return $f; + }; + lookupProtocolMap = function(name) { + var _entry, _tuple, found, lowerProtocol, n, name, proto; + lowerProtocol = arrayType$5.zero(); + n = $copyString(new sliceType$1(lowerProtocol), name); + lowerASCIIBytes($subslice(new sliceType$1(lowerProtocol), 0, n)); + _tuple = (_entry = protocols[$String.keyFor(($bytesToString($subslice(new sliceType$1(lowerProtocol), 0, n))))], _entry !== undefined ? [_entry.v, true] : [0, false]); + proto = _tuple[0]; + found = _tuple[1]; + if (!found || !((n === name.length))) { + return [0, new AddrError.ptr("unknown IP protocol specified", name)]; + } + return [proto, $ifaceNil]; + }; + lookupPortMap = function(network, service) { + var _1, _entry, _entry$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, error, lowerService, m, n, network, ok, ok$1, port, port$1, service; + port = 0; + error = $ifaceNil; + _1 = network; + if (_1 === ("tcp4") || _1 === ("tcp6")) { + network = "tcp"; + } else if (_1 === ("udp4") || _1 === ("udp6")) { + network = "udp"; + } + _tuple = (_entry = services[$String.keyFor(network)], _entry !== undefined ? [_entry.v, true] : [false, false]); + m = _tuple[0]; + ok = _tuple[1]; + if (ok) { + lowerService = arrayType$5.zero(); + n = $copyString(new sliceType$1(lowerService), service); + lowerASCIIBytes($subslice(new sliceType$1(lowerService), 0, n)); + _tuple$1 = (_entry$1 = m[$String.keyFor(($bytesToString($subslice(new sliceType$1(lowerService), 0, n))))], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]); + port$1 = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (ok$1 && (n === service.length)) { + _tmp = port$1; + _tmp$1 = $ifaceNil; + port = _tmp; + error = _tmp$1; + return [port, error]; + } + } + _tmp$2 = 0; + _tmp$3 = new AddrError.ptr("unknown port", network + "/" + service); + port = _tmp$2; + error = _tmp$3; + return [port, error]; + }; + Resolver.ptr.prototype.preferGo = function() { + var r; + r = this; + return !(r === ptrType$6.nil) && r.PreferGo; + }; + Resolver.prototype.preferGo = function() { return this.$val.preferGo(); }; + Resolver.ptr.prototype.strictErrors = function() { + var r; + r = this; + return !(r === ptrType$6.nil) && r.StrictErrors; + }; + Resolver.prototype.strictErrors = function() { return this.$val.strictErrors(); }; + Resolver.ptr.prototype.getLookupGroup = function() { + var r; + r = this; + if (r === ptrType$6.nil) { + return $pkg.DefaultResolver.lookupGroup; + } + return r.lookupGroup; + }; + Resolver.prototype.getLookupGroup = function() { return this.$val.getLookupGroup(); }; + Resolver.ptr.prototype.LookupHost = function(ctx, host) { + var _r$10, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, addrs, ctx, err, host, ip, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addrs = $f.addrs; ctx = $f.ctx; err = $f.err; host = $f.host; ip = $f.ip; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType.nil; + err = $ifaceNil; + r = this; + /* */ if (host === "") { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (host === "") { */ case 1: + _tmp = sliceType.nil; + _r$9 = errNoSuchHost.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tmp$1 = new DNSError.ptr(_r$9, host, "", false, false); + addrs = _tmp; + err = _tmp$1; + $s = -1; return [addrs, err]; + /* } */ case 2: + _tuple = parseIPZone(host); + ip = _tuple[0]; + if (!(ip === IP.nil)) { + _tmp$2 = new sliceType([host]); + _tmp$3 = $ifaceNil; + addrs = _tmp$2; + err = _tmp$3; + $s = -1; return [addrs, err]; + } + _r$10 = r.lookupHost(ctx, host); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + addrs = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupHost }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addrs = addrs; $f.ctx = ctx; $f.err = err; $f.host = host; $f.ip = ip; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupHost = function(ctx, host) { return this.$val.LookupHost(ctx, host); }; + Resolver.ptr.prototype.LookupIPAddr = function(ctx, host) { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$9, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, addrs, alt, called, ch, ctx, err, host, ip, lookupGroupCancel, lookupGroupCtx, r, r$1, resolverFunc, trace, x, x$1, zone, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$9 = $f._r$9; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; addrs = $f.addrs; alt = $f.alt; called = $f.called; ch = $f.ch; ctx = $f.ctx; err = $f.err; host = $f.host; ip = $f.ip; lookupGroupCancel = $f.lookupGroupCancel; lookupGroupCtx = $f.lookupGroupCtx; r = $f.r; r$1 = $f.r$1; resolverFunc = $f.resolverFunc; trace = $f.trace; x = $f.x; x$1 = $f.x$1; zone = $f.zone; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ch = [ch]; + host = [host]; + lookupGroupCancel = [lookupGroupCancel]; + lookupGroupCtx = [lookupGroupCtx]; + resolverFunc = [resolverFunc]; + r = this; + /* */ if (host[0] === "") { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (host[0] === "") { */ case 1: + _r$9 = errNoSuchHost.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [sliceType$3.nil, new DNSError.ptr(_r$9, host[0], "", false, false)]; + /* } */ case 2: + _tuple = parseIPZone(host[0]); + ip = _tuple[0]; + zone = _tuple[1]; + if (!(ip === IP.nil)) { + $s = -1; return [new sliceType$3([new IPAddr.ptr(ip, zone)]), $ifaceNil]; + } + _r$10 = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = $assertType(_r$10, ptrType$9, true); + trace = _tuple$1[0]; + /* */ if (!(trace === ptrType$9.nil) && !(trace.DNSStart === $throwNilPointerError)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!(trace === ptrType$9.nil) && !(trace.DNSStart === $throwNilPointerError)) { */ case 5: + $r = trace.DNSStart(host[0]); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + resolverFunc[0] = $methodVal(r, "lookupIP"); + _r$11 = ctx.Value((x$1 = new nettrace.LookupIPAltResolverKey.ptr(), new x$1.constructor.elem(x$1))); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = $assertType(_r$11, funcType$1, true); + alt = _tuple$2[0]; + if (!(alt === $throwNilPointerError)) { + resolverFunc[0] = alt; + } + _r$12 = context.WithCancel(context.Background()); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + lookupGroupCtx[0] = _tuple$3[0]; + lookupGroupCancel[0] = _tuple$3[1]; + dnsWaitGroup.Add(1); + _r$13 = r.getLookupGroup().DoChan(host[0], (function(ch, host, lookupGroupCancel, lookupGroupCtx, resolverFunc) { return function $b() { + var _r$13, _returncast, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$13 = $f._r$13; _returncast = $f._returncast; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + $deferred.push([$methodVal(dnsWaitGroup, "Done"), []]); + _r$13 = testHookLookupIP(lookupGroupCtx[0], resolverFunc[0], host[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _returncast = _r$13; + $s = -1; return [_returncast[0], _returncast[1]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: $b }; } $f._r$13 = _r$13; $f._returncast = _returncast; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; })(ch, host, lookupGroupCancel, lookupGroupCtx, resolverFunc)); /* */ $s = 10; case 10: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$4 = _r$13; + ch[0] = _tuple$4[0]; + called = _tuple$4[1]; + if (!called) { + dnsWaitGroup.Done(); + } + _r$14 = ctx.Done(); /* */ $s = 11; case 11: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$15 = $select([[_r$14], [ch[0]]]); /* */ $s = 12; case 12: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _selection = _r$15; + /* */ if (_selection[0] === 0) { $s = 13; continue; } + /* */ if (_selection[0] === 1) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (_selection[0] === 0) { */ case 13: + _r$16 = r.getLookupGroup().ForgetUnshared(host[0]); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + /* */ if (_r$16) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (_r$16) { */ case 16: + $r = lookupGroupCancel[0](); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 18; continue; + /* } else { */ case 17: + $go((function(ch, host, lookupGroupCancel, lookupGroupCtx, resolverFunc) { return function $b() { + var _r$17, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$17 = $f._r$17; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$17 = $recv(ch[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$17[0]; + $r = lookupGroupCancel[0](); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$17 = _r$17; $f.$s = $s; $f.$r = $r; return $f; + }; })(ch, host, lookupGroupCancel, lookupGroupCtx, resolverFunc), []); + /* } */ case 18: + _r$17 = ctx.Err(); /* */ $s = 21; case 21: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$18 = mapErr(_r$17); /* */ $s = 22; case 22: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + err = _r$18; + /* */ if (!(trace === ptrType$9.nil) && !(trace.DNSDone === $throwNilPointerError)) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!(trace === ptrType$9.nil) && !(trace.DNSDone === $throwNilPointerError)) { */ case 23: + $r = trace.DNSDone(sliceType$11.nil, false, err); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 24: + $s = -1; return [sliceType$3.nil, err]; + /* } else if (_selection[0] === 1) { */ case 14: + r$1 = $clone(_selection[1][0], singleflight.Result); + $r = lookupGroupCancel[0](); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(trace === ptrType$9.nil) && !(trace.DNSDone === $throwNilPointerError)) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (!(trace === ptrType$9.nil) && !(trace.DNSDone === $throwNilPointerError)) { */ case 27: + _tuple$5 = $assertType(r$1.Val, sliceType$3, true); + addrs = _tuple$5[0]; + $r = trace.DNSDone(ipAddrsEface(addrs), r$1.Shared, r$1.Err); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 28: + $s = -1; return lookupIPReturn(r$1.Val, r$1.Err, r$1.Shared); + /* } */ case 15: + $s = -1; return [sliceType$3.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupIPAddr }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$9 = _r$9; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.addrs = addrs; $f.alt = alt; $f.called = called; $f.ch = ch; $f.ctx = ctx; $f.err = err; $f.host = host; $f.ip = ip; $f.lookupGroupCancel = lookupGroupCancel; $f.lookupGroupCtx = lookupGroupCtx; $f.r = r; $f.r$1 = r$1; $f.resolverFunc = resolverFunc; $f.trace = trace; $f.x = x; $f.x$1 = x$1; $f.zone = zone; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupIPAddr = function(ctx, host) { return this.$val.LookupIPAddr(ctx, host); }; + lookupIPReturn = function(addrsi, err, shared) { + var addrs, addrsi, clone, err, shared; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$3.nil, err]; + } + addrs = $assertType(addrsi, sliceType$3); + if (shared) { + clone = $makeSlice(sliceType$3, addrs.$length); + $copySlice(clone, addrs); + addrs = clone; + } + return [addrs, $ifaceNil]; + }; + ipAddrsEface = function(addrs) { + var _i, _ref, addrs, i, s, v; + s = $makeSlice(sliceType$11, addrs.$length); + _ref = addrs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); + ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = new v.constructor.elem(v)); + _i++; + } + return s; + }; + Resolver.ptr.prototype.LookupPort = function(ctx, network, service) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, ctx, err, needsLookup, network, port, r, service, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ctx = $f.ctx; err = $f.err; needsLookup = $f.needsLookup; network = $f.network; port = $f.port; r = $f.r; service = $f.service; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + port = 0; + err = $ifaceNil; + r = this; + _tuple = parsePort(service); + port = _tuple[0]; + needsLookup = _tuple[1]; + /* */ if (needsLookup) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (needsLookup) { */ case 1: + _r$9 = r.lookupPort(ctx, network, service); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + port = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = err; + port = _tmp; + err = _tmp$1; + $s = -1; return [port, err]; + } + /* } */ case 2: + if (0 > port || port > 65535) { + _tmp$2 = 0; + _tmp$3 = new AddrError.ptr("invalid port", service); + port = _tmp$2; + err = _tmp$3; + $s = -1; return [port, err]; + } + _tmp$4 = port; + _tmp$5 = $ifaceNil; + port = _tmp$4; + err = _tmp$5; + $s = -1; return [port, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupPort }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ctx = ctx; $f.err = err; $f.needsLookup = needsLookup; $f.network = network; $f.port = port; $f.r = r; $f.service = service; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupPort = function(ctx, network, service) { return this.$val.LookupPort(ctx, network, service); }; + Resolver.ptr.prototype.LookupCNAME = function(ctx, host) { + var _r$9, _tuple, cname, ctx, err, host, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; cname = $f.cname; ctx = $f.ctx; err = $f.err; host = $f.host; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cname = ""; + err = $ifaceNil; + r = this; + _r$9 = r.lookupCNAME(ctx, host); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + cname = _tuple[0]; + err = _tuple[1]; + $s = -1; return [cname, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupCNAME }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.cname = cname; $f.ctx = ctx; $f.err = err; $f.host = host; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupCNAME = function(ctx, host) { return this.$val.LookupCNAME(ctx, host); }; + Resolver.ptr.prototype.LookupSRV = function(ctx, service, proto, name) { + var _r$9, _tuple, addrs, cname, ctx, err, name, proto, r, service, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addrs = $f.addrs; cname = $f.cname; ctx = $f.ctx; err = $f.err; name = $f.name; proto = $f.proto; r = $f.r; service = $f.service; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cname = ""; + addrs = sliceType$12.nil; + err = $ifaceNil; + r = this; + _r$9 = r.lookupSRV(ctx, service, proto, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + cname = _tuple[0]; + addrs = _tuple[1]; + err = _tuple[2]; + $s = -1; return [cname, addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupSRV }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addrs = addrs; $f.cname = cname; $f.ctx = ctx; $f.err = err; $f.name = name; $f.proto = proto; $f.r = r; $f.service = service; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupSRV = function(ctx, service, proto, name) { return this.$val.LookupSRV(ctx, service, proto, name); }; + Resolver.ptr.prototype.LookupMX = function(ctx, name) { + var _r$9, ctx, name, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; ctx = $f.ctx; name = $f.name; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookupMX(ctx, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupMX }; } $f._r$9 = _r$9; $f.ctx = ctx; $f.name = name; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupMX = function(ctx, name) { return this.$val.LookupMX(ctx, name); }; + Resolver.ptr.prototype.LookupNS = function(ctx, name) { + var _r$9, ctx, name, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; ctx = $f.ctx; name = $f.name; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookupNS(ctx, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupNS }; } $f._r$9 = _r$9; $f.ctx = ctx; $f.name = name; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupNS = function(ctx, name) { return this.$val.LookupNS(ctx, name); }; + Resolver.ptr.prototype.LookupTXT = function(ctx, name) { + var _r$9, ctx, name, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; ctx = $f.ctx; name = $f.name; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookupTXT(ctx, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupTXT }; } $f._r$9 = _r$9; $f.ctx = ctx; $f.name = name; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupTXT = function(ctx, name) { return this.$val.LookupTXT(ctx, name); }; + Resolver.ptr.prototype.LookupAddr = function(ctx, addr) { + var _r$9, _tuple, addr, ctx, err, names, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; ctx = $f.ctx; err = $f.err; names = $f.names; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + names = sliceType.nil; + err = $ifaceNil; + r = this; + _r$9 = r.lookupAddr(ctx, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + names = _tuple[0]; + err = _tuple[1]; + $s = -1; return [names, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.LookupAddr }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.ctx = ctx; $f.err = err; $f.names = names; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.LookupAddr = function(ctx, addr) { return this.$val.LookupAddr(ctx, addr); }; + readProtocols = function() { + var _entry, _entry$1, _i, _key, _key$1, _r$10, _r$11, _r$12, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, alias, err, f, file$1, i, line, ok, ok$1, ok$2, ok$3, proto, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _key$1 = $f._key$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; alias = $f.alias; err = $f.err; f = $f.f; file$1 = $f.file$1; i = $f.i; line = $f.line; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; ok$3 = $f.ok$3; proto = $f.proto; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r$9 = open("/etc/protocols"); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + file$1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return; + } + $deferred.push([$methodVal(file$1, "close"), []]); + _r$10 = file$1.readLine(); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + line = _tuple$1[0]; + ok = _tuple$1[1]; + /* while (true) { */ case 3: + /* if (!(ok)) { break; } */ if(!(ok)) { $s = 4; continue; } + i = byteIndex(line, 35); + if (i >= 0) { + line = $substring(line, 0, i); + } + f = getFields(line); + /* */ if (f.$length < 2) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (f.$length < 2) { */ case 5: + _r$11 = file$1.readLine(); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + line = _tuple$2[0]; + ok = _tuple$2[1]; + /* continue; */ $s = 3; continue; + /* } */ case 6: + _tuple$3 = dtoi((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1])); + proto = _tuple$3[0]; + ok$1 = _tuple$3[2]; + if (ok$1) { + _tuple$4 = (_entry = protocols[$String.keyFor((0 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 0]))], _entry !== undefined ? [_entry.v, true] : [0, false]); + ok$2 = _tuple$4[1]; + if (!ok$2) { + _key = (0 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 0]); (protocols || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: proto }; + } + _ref = $subslice(f, 2); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + alias = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tuple$5 = (_entry$1 = protocols[$String.keyFor(alias)], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]); + ok$3 = _tuple$5[1]; + if (!ok$3) { + _key$1 = alias; (protocols || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: proto }; + } + _i++; + } + } + _r$12 = file$1.readLine(); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$6 = _r$12; + line = _tuple$6[0]; + ok = _tuple$6[1]; + /* } */ $s = 3; continue; case 4: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: readProtocols }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.alias = alias; $f.err = err; $f.f = f; $f.file$1 = file$1; $f.i = i; $f.line = line; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.ok$3 = ok$3; $f.proto = proto; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + lookupProtocol = function(param, name) { + var name, param, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; name = $f.name; param = $f.param; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = onceReadProtocols.Do(readProtocols); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return lookupProtocolMap(name); + /* */ } return; } if ($f === undefined) { $f = { $blk: lookupProtocol }; } $f.name = name; $f.param = param; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.ptr.prototype.dial = function(ctx, network, server) { + var _r$10, _r$9, _tuple, _tuple$1, c, ctx, d, err, network, r, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; ctx = $f.ctx; d = $f.d; err = $f.err; network = $f.network; r = $f.r; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + c = $ifaceNil; + err = $ifaceNil; + /* */ if (!(r === ptrType$6.nil) && !(r.Dial === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(r === ptrType$6.nil) && !(r.Dial === $throwNilPointerError)) { */ case 1: + _r$9 = r.Dial(ctx, network, server); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + c = _tuple[0]; + err = _tuple[1]; + $s = 3; continue; + /* } else { */ case 2: + d = new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$6.nil, $chanNil, $throwNilPointerError); + _r$10 = d.DialContext(ctx, network, server); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + c = _tuple$1[0]; + err = _tuple$1[1]; + /* } */ case 3: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, mapErr(err)]; + } + $s = -1; return [c, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.dial }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.ctx = ctx; $f.d = d; $f.err = err; $f.network = network; $f.r = r; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.dial = function(ctx, network, server) { return this.$val.dial(ctx, network, server); }; + Resolver.ptr.prototype.lookupHost = function(ctx, host) { + var _r$10, _r$11, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, addrs, addrs$1, ctx, err, err$1, host, ok, order, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addrs = $f.addrs; addrs$1 = $f.addrs$1; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; host = $f.host; ok = $f.ok; order = $f.order; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType.nil; + err = $ifaceNil; + r = this; + _r$9 = systemConf(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.hostLookupOrder(r, host); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + order = _r$10; + if (!r.preferGo() && (order === 0)) { + _tuple = cgoLookupHost(ctx, host); + addrs$1 = _tuple[0]; + err$1 = _tuple[1]; + ok = _tuple[2]; + if (ok) { + _tmp = addrs$1; + _tmp$1 = err$1; + addrs = _tmp; + err = _tmp$1; + $s = -1; return [addrs, err]; + } + order = 1; + } + _r$11 = r.goLookupHostOrder(ctx, host, order); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + addrs = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupHost }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addrs = addrs; $f.addrs$1 = addrs$1; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.ok = ok; $f.order = order; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupHost = function(ctx, host) { return this.$val.lookupHost(ctx, host); }; + Resolver.ptr.prototype.lookupIP = function(ctx, host) { + var _r$10, _r$11, _r$12, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, addrs, addrs$1, ctx, err, err$1, host, ips, ok, order, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; addrs = $f.addrs; addrs$1 = $f.addrs$1; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; host = $f.host; ips = $f.ips; ok = $f.ok; order = $f.order; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addrs = sliceType$3.nil; + err = $ifaceNil; + r = this; + /* */ if (r.preferGo()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.preferGo()) { */ case 1: + _r$9 = r.goLookupIP(ctx, host); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + addrs = _tuple[0]; + err = _tuple[1]; + $s = -1; return [addrs, err]; + /* } */ case 2: + _r$10 = systemConf(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$11 = _r$10.hostLookupOrder(r, host); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + order = _r$11; + if (order === 0) { + _tuple$1 = cgoLookupIP(ctx, host); + addrs$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + ok = _tuple$1[2]; + if (ok) { + _tmp = addrs$1; + _tmp$1 = err$1; + addrs = _tmp; + err = _tmp$1; + $s = -1; return [addrs, err]; + } + order = 1; + } + _r$12 = r.goLookupIPCNAMEOrder(ctx, host, order); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + ips = _tuple$2[0]; + err = _tuple$2[2]; + _tmp$2 = ips; + _tmp$3 = err; + addrs = _tmp$2; + err = _tmp$3; + $s = -1; return [addrs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupIP }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.addrs = addrs; $f.addrs$1 = addrs$1; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.ips = ips; $f.ok = ok; $f.order = order; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupIP = function(ctx, host) { return this.$val.lookupIP(ctx, host); }; + Resolver.ptr.prototype.lookupPort = function(ctx, network, service) { + var _r$10, _r$11, _r$12, _r$9, _tuple, _tuple$1, _v, ctx, err, err$1, network, ok, port, port$1, r, service, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; network = $f.network; ok = $f.ok; port = $f.port; port$1 = $f.port$1; r = $f.r; service = $f.service; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (!(!r.preferGo())) { _v = false; $s = 3; continue s; } + _r$9 = systemConf(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.canUseCgo(); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v = _r$10; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + _tuple = cgoLookupPort(ctx, network, service); + port = _tuple[0]; + err = _tuple[1]; + ok = _tuple[2]; + /* */ if (ok) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (ok) { */ case 6: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: + _r$11 = goLookupPort(network, service); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + port$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + $s = -1; return [port$1, $ifaceNil]; + } + /* } */ case 9: + $s = -1; return [port, err]; + /* } */ case 7: + /* } */ case 2: + _r$12 = goLookupPort(network, service); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + $s = -1; return _r$12; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupPort }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.network = network; $f.ok = ok; $f.port = port; $f.port$1 = port$1; $f.r = r; $f.service = service; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupPort = function(ctx, network, service) { return this.$val.lookupPort(ctx, network, service); }; + Resolver.ptr.prototype.lookupCNAME = function(ctx, name) { + var _r$10, _r$11, _r$9, _tuple, _v, cname, ctx, err, name, ok, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; _v = $f._v; cname = $f.cname; ctx = $f.ctx; err = $f.err; name = $f.name; ok = $f.ok; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (!(!r.preferGo())) { _v = false; $s = 3; continue s; } + _r$9 = systemConf(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.canUseCgo(); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v = _r$10; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + _tuple = cgoLookupCNAME(ctx, name); + cname = _tuple[0]; + err = _tuple[1]; + ok = _tuple[2]; + if (ok) { + $s = -1; return [cname, err]; + } + /* } */ case 2: + _r$11 = r.goLookupCNAME(ctx, name); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return _r$11; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupCNAME }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f._v = _v; $f.cname = cname; $f.ctx = ctx; $f.err = err; $f.name = name; $f.ok = ok; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupCNAME = function(ctx, name) { return this.$val.lookupCNAME(ctx, name); }; + Resolver.ptr.prototype.lookupSRV = function(ctx, service, proto, name) { + var _r$9, _tuple, _tuple$1, _tuple$2, cname, ctx, err, err$1, err$2, h, name, p, proto, r, server, service, srv, srvs, target, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; cname = $f.cname; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; name = $f.name; p = $f.p; proto = $f.proto; r = $f.r; server = $f.server; service = $f.service; srv = $f.srv; srvs = $f.srvs; target = $f.target; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + target = ""; + if (service === "" && proto === "") { + target = name; + } else { + target = "_" + service + "._" + proto + "." + name; + } + _r$9 = r.lookup(ctx, target, 33); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + p = $clone(_tuple[0], dnsmessage.Parser); + server = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", sliceType$12.nil, err]; + } + srvs = sliceType$12.nil; + cname = new dnsmessage.Name.ptr(arrayType$1.zero(), 0); + /* while (true) { */ case 2: + _tuple$1 = p.AnswerHeader(); + h = $clone(_tuple$1[0], dnsmessage.ResourceHeader); + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone)) { + /* break; */ $s = 3; continue; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return ["", sliceType$12.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + if (!((h.Type === 33))) { + err$2 = p.SkipAnswer(); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return ["", sliceType$12.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + /* continue; */ $s = 2; continue; + } + if ((cname.Length === 0) && !((h.Name.Length === 0))) { + dnsmessage.Name.copy(cname, h.Name); + } + _tuple$2 = p.SRVResource(); + srv = $clone(_tuple$2[0], dnsmessage.SRVResource); + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return ["", sliceType$12.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + srvs = $append(srvs, new SRV.ptr($clone(srv.Target, dnsmessage.Name).String(), srv.Port, srv.Priority, srv.Weight)); + /* } */ $s = 2; continue; case 3: + $r = ($subslice(new byPriorityWeight(srvs.$array), srvs.$offset, srvs.$offset + srvs.$length)).sort(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [$clone(cname, dnsmessage.Name).String(), srvs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupSRV }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.cname = cname; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.name = name; $f.p = p; $f.proto = proto; $f.r = r; $f.server = server; $f.service = service; $f.srv = srv; $f.srvs = srvs; $f.target = target; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupSRV = function(ctx, service, proto, name) { return this.$val.lookupSRV(ctx, service, proto, name); }; + Resolver.ptr.prototype.lookupMX = function(ctx, name) { + var _r$9, _tuple, _tuple$1, _tuple$2, ctx, err, err$1, err$2, h, mx, mxs, name, p, r, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; mx = $f.mx; mxs = $f.mxs; name = $f.name; p = $f.p; r = $f.r; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookup(ctx, name, 15); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + p = $clone(_tuple[0], dnsmessage.Parser); + server = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$13.nil, err]; + } + mxs = sliceType$13.nil; + /* while (true) { */ case 2: + _tuple$1 = p.AnswerHeader(); + h = $clone(_tuple$1[0], dnsmessage.ResourceHeader); + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone)) { + /* break; */ $s = 3; continue; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$13.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + if (!((h.Type === 15))) { + err$2 = p.SkipAnswer(); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [sliceType$13.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + /* continue; */ $s = 2; continue; + } + _tuple$2 = p.MXResource(); + mx = $clone(_tuple$2[0], dnsmessage.MXResource); + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$13.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + mxs = $append(mxs, new MX.ptr($clone(mx.MX, dnsmessage.Name).String(), mx.Pref)); + /* } */ $s = 2; continue; case 3: + $r = ($subslice(new byPref(mxs.$array), mxs.$offset, mxs.$offset + mxs.$length)).sort(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [mxs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupMX }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.mx = mx; $f.mxs = mxs; $f.name = name; $f.p = p; $f.r = r; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupMX = function(ctx, name) { return this.$val.lookupMX(ctx, name); }; + Resolver.ptr.prototype.lookupNS = function(ctx, name) { + var _r$9, _tuple, _tuple$1, _tuple$2, ctx, err, err$1, err$2, h, name, ns, nss, p, r, server, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; name = $f.name; ns = $f.ns; nss = $f.nss; p = $f.p; r = $f.r; server = $f.server; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookup(ctx, name, 2); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + p = $clone(_tuple[0], dnsmessage.Parser); + server = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$14.nil, err]; + } + nss = sliceType$14.nil; + while (true) { + _tuple$1 = p.AnswerHeader(); + h = $clone(_tuple$1[0], dnsmessage.ResourceHeader); + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone)) { + break; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$14.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + if (!((h.Type === 2))) { + err$2 = p.SkipAnswer(); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [sliceType$14.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + continue; + } + _tuple$2 = p.NSResource(); + ns = $clone(_tuple$2[0], dnsmessage.NSResource); + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$14.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + nss = $append(nss, new NS.ptr($clone(ns.NS, dnsmessage.Name).String())); + } + $s = -1; return [nss, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupNS }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.name = name; $f.ns = ns; $f.nss = nss; $f.p = p; $f.r = r; $f.server = server; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupNS = function(ctx, name) { return this.$val.lookupNS(ctx, name); }; + Resolver.ptr.prototype.lookupTXT = function(ctx, name) { + var _r$9, _tuple, _tuple$1, _tuple$2, ctx, err, err$1, err$2, h, name, p, r, server, txt, txts, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; name = $f.name; p = $f.p; r = $f.r; server = $f.server; txt = $f.txt; txts = $f.txts; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$9 = r.lookup(ctx, name, 16); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + p = $clone(_tuple[0], dnsmessage.Parser); + server = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + txts = sliceType.nil; + while (true) { + _tuple$1 = p.AnswerHeader(); + h = $clone(_tuple$1[0], dnsmessage.ResourceHeader); + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, dnsmessage.ErrSectionDone)) { + break; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + if (!((h.Type === 16))) { + err$2 = p.SkipAnswer(); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [sliceType.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + continue; + } + _tuple$2 = p.TXTResource(); + txt = $clone(_tuple$2[0], dnsmessage.TXTResource); + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType.nil, new DNSError.ptr("cannot unmarshal DNS message", name, server, false, false)]; + } + if (txts.$length === 0) { + txts = txt.TXT; + } else { + txts = $appendSlice(txts, txt.TXT); + } + } + $s = -1; return [txts, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupTXT }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.name = name; $f.p = p; $f.r = r; $f.server = server; $f.txt = txt; $f.txts = txts; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupTXT = function(ctx, name) { return this.$val.lookupTXT(ctx, name); }; + Resolver.ptr.prototype.lookupAddr = function(ctx, addr) { + var _r$10, _r$11, _r$9, _tuple, _v, addr, ctx, err, ok, ptrs, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; _v = $f._v; addr = $f.addr; ctx = $f.ctx; err = $f.err; ok = $f.ok; ptrs = $f.ptrs; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (!(!r.preferGo())) { _v = false; $s = 3; continue s; } + _r$9 = systemConf(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = _r$9.canUseCgo(); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v = _r$10; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + _tuple = cgoLookupPTR(ctx, addr); + ptrs = _tuple[0]; + err = _tuple[1]; + ok = _tuple[2]; + if (ok) { + $s = -1; return [ptrs, err]; + } + /* } */ case 2: + _r$11 = r.goLookupPTR(ctx, addr); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return _r$11; + /* */ } return; } if ($f === undefined) { $f = { $blk: Resolver.ptr.prototype.lookupAddr }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f._v = _v; $f.addr = addr; $f.ctx = ctx; $f.err = err; $f.ok = ok; $f.ptrs = ptrs; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Resolver.prototype.lookupAddr = function(ctx, addr) { return this.$val.lookupAddr(ctx, addr); }; + HardwareAddr.prototype.String = function() { + var _i, _ref, a, b, buf, i; + a = this; + if (a.$length === 0) { + return ""; + } + buf = $makeSlice(sliceType$1, 0, (($imul(a.$length, 3)) - 1 >> 0)); + _ref = a; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + buf = $append(buf, 58); + } + buf = $append(buf, "0123456789abcdef".charCodeAt((b >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((b & 15) >>> 0))); + _i++; + } + return ($bytesToString(buf)); + }; + $ptrType(HardwareAddr).prototype.String = function() { return this.$get().String(); }; + conn.ptr.prototype.ok = function() { + var c; + c = this; + return !(c === ptrType$34.nil) && !(c.fd === ptrType$16.nil); + }; + conn.prototype.ok = function() { return this.$val.ok(); }; + conn.ptr.prototype.Read = function(b) { + var _r$9, _tuple, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _r$9 = c.fd.Read(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { + err = new OpError.ptr("read", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.Read }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.Read = function(b) { return this.$val.Read(b); }; + conn.ptr.prototype.Write = function(b) { + var _r$9, _tuple, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _r$9 = c.fd.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.Write }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.Write = function(b) { return this.$val.Write(b); }; + conn.ptr.prototype.Close = function() { + var _r$9, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.fd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("close", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.Close }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.Close = function() { return this.$val.Close(); }; + conn.ptr.prototype.LocalAddr = function() { + var c; + c = this; + if (!c.ok()) { + return $ifaceNil; + } + return c.fd.laddr; + }; + conn.prototype.LocalAddr = function() { return this.$val.LocalAddr(); }; + conn.ptr.prototype.RemoteAddr = function() { + var c; + c = this; + if (!c.ok()) { + return $ifaceNil; + } + return c.fd.raddr; + }; + conn.prototype.RemoteAddr = function() { return this.$val.RemoteAddr(); }; + conn.ptr.prototype.SetDeadline = function(t) { + var c, err, t; + c = this; + if (!c.ok()) { + return new syscall.Errno(22); + } + err = c.fd.SetDeadline($clone(t, time.Time)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + return $ifaceNil; + }; + conn.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; + conn.ptr.prototype.SetReadDeadline = function(t) { + var c, err, t; + c = this; + if (!c.ok()) { + return new syscall.Errno(22); + } + err = c.fd.SetReadDeadline($clone(t, time.Time)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + return $ifaceNil; + }; + conn.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; + conn.ptr.prototype.SetWriteDeadline = function(t) { + var c, err, t; + c = this; + if (!c.ok()) { + return new syscall.Errno(22); + } + err = c.fd.SetWriteDeadline($clone(t, time.Time)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + return $ifaceNil; + }; + conn.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; + conn.ptr.prototype.SetReadBuffer = function(bytes) { + var _r$9, bytes, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; bytes = $f.bytes; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setReadBuffer(c.fd, bytes); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.SetReadBuffer }; } $f._r$9 = _r$9; $f.bytes = bytes; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.SetReadBuffer = function(bytes) { return this.$val.SetReadBuffer(bytes); }; + conn.ptr.prototype.SetWriteBuffer = function(bytes) { + var _r$9, bytes, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; bytes = $f.bytes; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setWriteBuffer(c.fd, bytes); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.SetWriteBuffer }; } $f._r$9 = _r$9; $f.bytes = bytes; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.SetWriteBuffer = function(bytes) { return this.$val.SetWriteBuffer(bytes); }; + conn.ptr.prototype.File = function() { + var _r$9, _tuple, c, err, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType$17.nil; + err = $ifaceNil; + c = this; + _r$9 = c.fd.dup(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("file", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return [f, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.File }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.File = function() { return this.$val.File(); }; + mapErr = function(err) { + var _1, err; + _1 = err; + if ($interfaceIsEqual(_1, (context.Canceled))) { + return errCanceled; + } else if ($interfaceIsEqual(_1, (context.DeadlineExceeded))) { + return poll.ErrTimeout; + } else { + return err; + } + }; + OpError.ptr.prototype.Error = function() { + var _r$10, _r$11, _r$9, e, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; e = $f.e; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + if (e === ptrType$13.nil) { + $s = -1; return ""; + } + s = e.Op; + if (!(e.Net === "")) { + s = s + (" " + e.Net); + } + /* */ if (!($interfaceIsEqual(e.Source, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(e.Source, $ifaceNil))) { */ case 1: + _r$9 = e.Source.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + s = s + (" " + _r$9); + /* } */ case 2: + /* */ if (!($interfaceIsEqual(e.Addr, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(e.Addr, $ifaceNil))) { */ case 4: + if (!($interfaceIsEqual(e.Source, $ifaceNil))) { + s = s + ("->"); + } else { + s = s + (" "); + } + _r$10 = e.Addr.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + s = s + (_r$10); + /* } */ case 5: + _r$11 = e.Err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + s = s + (": " + _r$11); + $s = -1; return s; + /* */ } return; } if ($f === undefined) { $f = { $blk: OpError.ptr.prototype.Error }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f.e = e; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + OpError.prototype.Error = function() { return this.$val.Error(); }; + OpError.ptr.prototype.Timeout = function() { + var _r$10, _r$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; _v$1 = $f._v$1; e = $f.e; ne = $f.ne; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; t = $f.t; t$1 = $f.t$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _tuple = $assertType(e.Err, ptrType$35, true); + ne = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _tuple$1 = $assertType(ne.Err, timeout, true); + t = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (!(ok$1)) { _v = false; $s = 3; continue s; } + _r$9 = t.Timeout(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9; case 3: + $s = -1; return _v; + /* } */ case 2: + _tuple$2 = $assertType(e.Err, timeout, true); + t$1 = _tuple$2[0]; + ok$2 = _tuple$2[1]; + if (!(ok$2)) { _v$1 = false; $s = 5; continue s; } + _r$10 = t$1.Timeout(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v$1 = _r$10; case 5: + $s = -1; return _v$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: OpError.ptr.prototype.Timeout }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f._v$1 = _v$1; $f.e = e; $f.ne = ne; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.t = t; $f.t$1 = t$1; $f.$s = $s; $f.$r = $r; return $f; + }; + OpError.prototype.Timeout = function() { return this.$val.Timeout(); }; + OpError.ptr.prototype.Temporary = function() { + var _r$10, _r$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; _v$1 = $f._v$1; e = $f.e; ne = $f.ne; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; t = $f.t; t$1 = $f.t$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + if (e.Op === "accept" && isConnError(e.Err)) { + $s = -1; return true; + } + _tuple = $assertType(e.Err, ptrType$35, true); + ne = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _tuple$1 = $assertType(ne.Err, temporary, true); + t = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (!(ok$1)) { _v = false; $s = 3; continue s; } + _r$9 = t.Temporary(); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9; case 3: + $s = -1; return _v; + /* } */ case 2: + _tuple$2 = $assertType(e.Err, temporary, true); + t$1 = _tuple$2[0]; + ok$2 = _tuple$2[1]; + if (!(ok$2)) { _v$1 = false; $s = 5; continue s; } + _r$10 = t$1.Temporary(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v$1 = _r$10; case 5: + $s = -1; return _v$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: OpError.ptr.prototype.Temporary }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f._v$1 = _v$1; $f.e = e; $f.ne = ne; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.t = t; $f.t$1 = t$1; $f.$s = $s; $f.$r = $r; return $f; + }; + OpError.prototype.Temporary = function() { return this.$val.Temporary(); }; + ParseError.ptr.prototype.Error = function() { + var e; + e = this; + return "invalid " + e.Type + ": " + e.Text; + }; + ParseError.prototype.Error = function() { return this.$val.Error(); }; + AddrError.ptr.prototype.Error = function() { + var e, s; + e = this; + if (e === ptrType$36.nil) { + return ""; + } + s = e.Err; + if (!(e.Addr === "")) { + s = "address " + e.Addr + ": " + s; + } + return s; + }; + AddrError.prototype.Error = function() { return this.$val.Error(); }; + AddrError.ptr.prototype.Timeout = function() { + var e; + e = this; + return false; + }; + AddrError.prototype.Timeout = function() { return this.$val.Timeout(); }; + AddrError.ptr.prototype.Temporary = function() { + var e; + e = this; + return false; + }; + AddrError.prototype.Temporary = function() { return this.$val.Temporary(); }; + UnknownNetworkError.prototype.Error = function() { + var e; + e = this.$val; + return "unknown network " + (e); + }; + $ptrType(UnknownNetworkError).prototype.Error = function() { return new UnknownNetworkError(this.$get()).Error(); }; + UnknownNetworkError.prototype.Timeout = function() { + var e; + e = this.$val; + return false; + }; + $ptrType(UnknownNetworkError).prototype.Timeout = function() { return new UnknownNetworkError(this.$get()).Timeout(); }; + UnknownNetworkError.prototype.Temporary = function() { + var e; + e = this.$val; + return false; + }; + $ptrType(UnknownNetworkError).prototype.Temporary = function() { return new UnknownNetworkError(this.$get()).Temporary(); }; + DNSError.ptr.prototype.Error = function() { + var e, s; + e = this; + if (e === ptrType$12.nil) { + return ""; + } + s = "lookup " + e.Name; + if (!(e.Server === "")) { + s = s + (" on " + e.Server); + } + s = s + (": " + e.Err); + return s; + }; + DNSError.prototype.Error = function() { return this.$val.Error(); }; + DNSError.ptr.prototype.Timeout = function() { + var e; + e = this; + return e.IsTimeout; + }; + DNSError.prototype.Timeout = function() { return this.$val.Timeout(); }; + DNSError.ptr.prototype.Temporary = function() { + var e; + e = this; + return e.IsTimeout || e.IsTemporary; + }; + DNSError.prototype.Temporary = function() { return this.$val.Temporary(); }; + genericReadFrom = function(w, r) { + var _r$9, _tuple, err, n, r, w, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; n = $f.n; r = $f.r; w = $f.w; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + _r$9 = io.Copy((x = new writerOnly.ptr(w), new x.constructor.elem(x)), r); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: genericReadFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.r = r; $f.w = w; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Buffers).prototype.WriteTo = function(w) { + var _i, _r$10, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, n, nb, ok, v, w, wv, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; err = $f.err; err$1 = $f.err$1; n = $f.n; nb = $f.nb; ok = $f.ok; v = $f.v; w = $f.w; wv = $f.wv; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + v = this; + _tuple = $assertType(w, buffersWriter, true); + wv = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r$9 = wv.writeBuffers(v); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 2: + _ref = v.$get(); + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$10 = w.Write(b); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$2 = _r$10; + nb = _tuple$2[0]; + err$1 = _tuple$2[1]; + n = (x = (new $Int64(0, nb)), new $Int64(n.$high + x.$high, n.$low + x.$low)); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + v.consume(n); + _tmp = n; + _tmp$1 = err$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _i++; + /* } */ $s = 4; continue; case 5: + v.consume(n); + _tmp$2 = n; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $ptrType(Buffers).prototype.WriteTo }; } $f._i = _i; $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.err = err; $f.err$1 = err$1; $f.n = n; $f.nb = nb; $f.ok = ok; $f.v = v; $f.w = w; $f.wv = wv; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Buffers).prototype.Read = function(p) { + var err, n, n0, p, v, x; + n = 0; + err = $ifaceNil; + v = this; + while (true) { + if (!(p.$length > 0 && v.$get().$length > 0)) { break; } + n0 = $copySlice(p, (x = v.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); + v.consume((new $Int64(0, n0))); + p = $subslice(p, n0); + n = n + (n0) >> 0; + } + if (v.$get().$length === 0) { + err = io.EOF; + } + return [n, err]; + }; + $ptrType(Buffers).prototype.consume = function(n) { + var ln0, n, v, x, x$1, x$2, x$3; + v = this; + while (true) { + if (!(v.$get().$length > 0)) { break; } + ln0 = (new $Int64(0, (x = v.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).$length)); + if ((ln0.$high > n.$high || (ln0.$high === n.$high && ln0.$low > n.$low))) { + (x$2 = v.$get(), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0] = $subslice((x$1 = v.$get(), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $flatten64(n)))); + return; + } + n = (x$3 = ln0, new $Int64(n.$high - x$3.$high, n.$low - x$3.$low)); + v.$set($subslice((v.$get()), 1)); + } + }; + nssSource.ptr.prototype.standardCriteria = function() { + var _i, _ref, crit, i, s; + s = this; + _ref = s.criteria; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + crit = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), nssCriterion); + if (!$clone(crit, nssCriterion).standardStatusAction(i === (s.criteria.$length - 1 >> 0))) { + return false; + } + _i++; + } + return true; + }; + nssSource.prototype.standardCriteria = function() { return this.$val.standardCriteria(); }; + nssCriterion.ptr.prototype.standardStatusAction = function(last$1) { + var _1, c, def, last$1; + c = this; + if (c.negate) { + return false; + } + def = ""; + _1 = c.status; + if (_1 === ("success")) { + def = "return"; + } else if (_1 === ("notfound") || _1 === ("unavail") || _1 === ("tryagain")) { + def = "continue"; + } else { + return false; + } + if (last$1 && c.action === "return") { + return true; + } + return c.action === def; + }; + nssCriterion.prototype.standardStatusAction = function(last$1) { return this.$val.standardStatusAction(last$1); }; + parseNSSConfFile = function(file$1) { + var _r$10, _r$9, _tuple, err, f, file$1, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; f = $f.f; file$1 = $f.file$1; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r$9 = os.Open(file$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new nssConf.ptr(err, false); + } + $deferred.push([$methodVal(f, "Close"), []]); + _r$10 = parseNSSConf(f); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return _r$10; + /* */ } return; } } catch(err) { $err = err; $s = -1; return ptrType$2.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: parseNSSConfFile }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.file$1 = file$1; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + parseNSSConf = function(r) { + var _r$10, _r$9, _tuple, conf$1, err, r, slurp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; conf$1 = $f.conf$1; err = $f.err; r = $f.r; slurp = $f.slurp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conf$1 = [conf$1]; + _r$9 = readFull(r); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + slurp = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new nssConf.ptr(err, false); + } + conf$1[0] = new nssConf.ptr($ifaceNil, false); + _r$10 = foreachLine(slurp, (function(conf$1) { return function $b(line) { + var _entry, _key, _r$10, _tuple$1, bclose, colon, criteria, db, err$1, line, sp, src, srcs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _r$10 = $f._r$10; _tuple$1 = $f._tuple$1; bclose = $f.bclose; colon = $f.colon; criteria = $f.criteria; db = $f.db; err$1 = $f.err$1; line = $f.line; sp = $f.sp; src = $f.src; srcs = $f.srcs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + line = trimSpace(removeComment(line)); + if (line.$length === 0) { + $s = -1; return $ifaceNil; + } + colon = bytesIndexByte(line, 58); + if (colon === -1) { + $s = -1; return errors.New("no colon on line"); + } + db = ($bytesToString(trimSpace($subslice(line, 0, colon)))); + srcs = $subslice(line, (colon + 1 >> 0)); + /* while (true) { */ case 1: + srcs = trimSpace(srcs); + if (srcs.$length === 0) { + /* break; */ $s = 2; continue; + } + sp = bytesIndexByte(srcs, 32); + src = ""; + if (sp === -1) { + src = ($bytesToString(srcs)); + srcs = sliceType$1.nil; + } else { + src = ($bytesToString($subslice(srcs, 0, sp))); + srcs = trimSpace($subslice(srcs, (sp + 1 >> 0))); + } + criteria = sliceType$15.nil; + /* */ if (srcs.$length > 0 && ((0 >= srcs.$length ? ($throwRuntimeError("index out of range"), undefined) : srcs.$array[srcs.$offset + 0]) === 91)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (srcs.$length > 0 && ((0 >= srcs.$length ? ($throwRuntimeError("index out of range"), undefined) : srcs.$array[srcs.$offset + 0]) === 91)) { */ case 3: + bclose = bytesIndexByte(srcs, 93); + if (bclose === -1) { + $s = -1; return errors.New("unclosed criterion bracket"); + } + err$1 = $ifaceNil; + _r$10 = parseCriteria($subslice(srcs, 1, bclose)); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + criteria = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return errors.New("invalid criteria: " + ($bytesToString($subslice(srcs, 1, bclose)))); + } + srcs = $subslice(srcs, (bclose + 1 >> 0)); + /* } */ case 4: + if (conf$1[0].sources === false) { + conf$1[0].sources = {}; + } + _key = db; (conf$1[0].sources || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = conf$1[0].sources[$String.keyFor(db)], _entry !== undefined ? _entry.v : sliceType$5.nil), new nssSource.ptr(src, criteria)) }; + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._entry = _entry; $f._key = _key; $f._r$10 = _r$10; $f._tuple$1 = _tuple$1; $f.bclose = bclose; $f.colon = colon; $f.criteria = criteria; $f.db = db; $f.err$1 = err$1; $f.line = line; $f.sp = sp; $f.src = src; $f.srcs = srcs; $f.$s = $s; $f.$r = $r; return $f; + }; })(conf$1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + conf$1[0].err = _r$10; + $s = -1; return conf$1[0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseNSSConf }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.conf$1 = conf$1; $f.err = err; $f.r = r; $f.slurp = slurp; $f.$s = $s; $f.$r = $r; return $f; + }; + parseCriteria = function(x) { + var _r$9, c, err, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + c[0] = sliceType$15.nil; + err = $ifaceNil; + _r$9 = foreachField(x, (function(c) { return function(f) { + var eq, f, not; + not = false; + if (f.$length > 0 && ((0 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 0]) === 33)) { + not = true; + f = $subslice(f, 1); + } + if (f.$length < 3) { + return errors.New("criterion too short"); + } + eq = bytesIndexByte(f, 61); + if (eq === -1) { + return errors.New("criterion lacks equal sign"); + } + lowerASCIIBytes(f); + c[0] = $append(c[0], new nssCriterion.ptr(not, ($bytesToString($subslice(f, 0, eq))), ($bytesToString($subslice(f, (eq + 1 >> 0)))))); + return $ifaceNil; + }; })(c)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + $s = -1; return [c[0], err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseCriteria }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + file.ptr.prototype.close = function() { + var _r$9, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _r$9 = f.file.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: file.ptr.prototype.close }; } $f._r$9 = _r$9; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + file.prototype.close = function() { return this.$val.close(); }; + file.ptr.prototype.getLineFromData = function() { + var data, f, i, n, ok, s; + s = ""; + ok = false; + f = this; + data = f.data; + i = 0; + i = 0; + while (true) { + if (!(i < data.$length)) { break; } + if (((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]) === 10) { + s = ($bytesToString($subslice(data, 0, i))); + ok = true; + i = i + (1) >> 0; + n = data.$length - i >> 0; + $copySlice($subslice(data, 0), $subslice(data, i)); + f.data = $subslice(data, 0, n); + return [s, ok]; + } + i = i + (1) >> 0; + } + if (f.atEOF && f.data.$length > 0) { + s = ($bytesToString(data)); + f.data = $subslice(f.data, 0, 0); + ok = true; + } + return [s, ok]; + }; + file.prototype.getLineFromData = function() { return this.$val.getLineFromData(); }; + file.ptr.prototype.readLine = function() { + var _r$9, _tuple, _tuple$1, _tuple$2, err, f, ln, n, ok, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; f = $f.f; ln = $f.ln; n = $f.n; ok = $f.ok; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = ""; + ok = false; + f = this; + _tuple = f.getLineFromData(); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return [s, ok]; + } + /* */ if (f.data.$length < f.data.$capacity) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (f.data.$length < f.data.$capacity) { */ case 1: + ln = f.data.$length; + _r$9 = io.ReadFull(f.file, $subslice(f.data, ln, f.data.$capacity)); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + n = _tuple$1[0]; + err = _tuple$1[1]; + if (n >= 0) { + f.data = $subslice(f.data, 0, (ln + n >> 0)); + } + if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { + f.atEOF = true; + } + /* } */ case 2: + _tuple$2 = f.getLineFromData(); + s = _tuple$2[0]; + ok = _tuple$2[1]; + $s = -1; return [s, ok]; + /* */ } return; } if ($f === undefined) { $f = { $blk: file.ptr.prototype.readLine }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.f = f; $f.ln = ln; $f.n = n; $f.ok = ok; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + file.prototype.readLine = function() { return this.$val.readLine(); }; + open = function(name) { + var _r$9, _tuple, err, fd, name, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; fd = $f.fd; name = $f.name; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = os.Open(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fd = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$21.nil, err]; + } + $s = -1; return [new file.ptr(fd, $makeSlice(sliceType$1, 0, 65536), false), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: open }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.name = name; $f.$s = $s; $f.$r = $r; return $f; + }; + stat = function(name) { + var _r$10, _r$11, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, err, mtime, name, size, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; err = $f.err; mtime = $f.mtime; name = $f.name; size = $f.size; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mtime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + size = new $Int64(0, 0); + err = $ifaceNil; + _r$9 = os.Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + st = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + _tmp$1 = new $Int64(0, 0); + _tmp$2 = err; + time.Time.copy(mtime, _tmp); + size = _tmp$1; + err = _tmp$2; + $s = -1; return [mtime, size, err]; + } + _r$10 = st.ModTime(); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tmp$3 = $clone(_r$10, time.Time); + _r$11 = st.Size(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tmp$4 = _r$11; + _tmp$5 = $ifaceNil; + time.Time.copy(mtime, _tmp$3); + size = _tmp$4; + err = _tmp$5; + $s = -1; return [mtime, size, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: stat }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.err = err; $f.mtime = mtime; $f.name = name; $f.size = size; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + countAnyByte = function(s, t) { + var i, n, s, t; + n = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (byteIndex(t, s.charCodeAt(i)) >= 0) { + n = n + (1) >> 0; + } + i = i + (1) >> 0; + } + return n; + }; + splitAtBytes = function(s, t) { + var a, i, last$1, n, s, t; + a = $makeSlice(sliceType, (1 + countAnyByte(s, t) >> 0)); + n = 0; + last$1 = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (byteIndex(t, s.charCodeAt(i)) >= 0) { + if (last$1 < i) { + ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = $substring(s, last$1, i)); + n = n + (1) >> 0; + } + last$1 = i + 1 >> 0; + } + i = i + (1) >> 0; + } + if (last$1 < s.length) { + ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = $substring(s, last$1)); + n = n + (1) >> 0; + } + return $subslice(a, 0, n); + }; + getFields = function(s) { + var s; + return splitAtBytes(s, " \r\t\n"); + }; + dtoi = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, n, ok, s; + n = 0; + i = 0; + ok = false; + n = 0; + i = 0; + while (true) { + if (!(i < s.length && 48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57)) { break; } + n = ($imul(n, 10)) + (((s.charCodeAt(i) - 48 << 24 >>> 24) >> 0)) >> 0; + if (n >= 16777215) { + _tmp = 16777215; + _tmp$1 = i; + _tmp$2 = false; + n = _tmp; + i = _tmp$1; + ok = _tmp$2; + return [n, i, ok]; + } + i = i + (1) >> 0; + } + if (i === 0) { + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = false; + n = _tmp$3; + i = _tmp$4; + ok = _tmp$5; + return [n, i, ok]; + } + _tmp$6 = n; + _tmp$7 = i; + _tmp$8 = true; + n = _tmp$6; + i = _tmp$7; + ok = _tmp$8; + return [n, i, ok]; + }; + xtoi = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, n, ok, s; + n = 0; + i = 0; + ok = false; + n = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57) { + n = $imul(n, (16)); + n = n + ((((s.charCodeAt(i) - 48 << 24 >>> 24) >> 0))) >> 0; + } else if (97 <= s.charCodeAt(i) && s.charCodeAt(i) <= 102) { + n = $imul(n, (16)); + n = n + (((((s.charCodeAt(i) - 97 << 24 >>> 24) >> 0)) + 10 >> 0)) >> 0; + } else if (65 <= s.charCodeAt(i) && s.charCodeAt(i) <= 70) { + n = $imul(n, (16)); + n = n + (((((s.charCodeAt(i) - 65 << 24 >>> 24) >> 0)) + 10 >> 0)) >> 0; + } else { + break; + } + if (n >= 16777215) { + _tmp = 0; + _tmp$1 = i; + _tmp$2 = false; + n = _tmp; + i = _tmp$1; + ok = _tmp$2; + return [n, i, ok]; + } + i = i + (1) >> 0; + } + if (i === 0) { + _tmp$3 = 0; + _tmp$4 = i; + _tmp$5 = false; + n = _tmp$3; + i = _tmp$4; + ok = _tmp$5; + return [n, i, ok]; + } + _tmp$6 = n; + _tmp$7 = i; + _tmp$8 = true; + n = _tmp$6; + i = _tmp$7; + ok = _tmp$8; + return [n, i, ok]; + }; + itoa = function(val) { + var val; + if (val < 0) { + return "-" + uitoa(((-val >>> 0))); + } + return uitoa(((val >>> 0))); + }; + uitoa = function(val) { + var _q, buf, i, q, val; + if (val === 0) { + return "0"; + } + buf = arrayType$6.zero(); + i = 19; + while (true) { + if (!(val >= 10)) { break; } + q = (_q = val / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = ((((48 + val >>> 0) - (q * 10 >>> 0) >>> 0) << 24 >>> 24))); + i = i - (1) >> 0; + val = q; + } + ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = (((48 + val >>> 0) << 24 >>> 24))); + return ($bytesToString($subslice(new sliceType$1(buf), i))); + }; + appendHex = function(dst, i) { + var dst, i, j, v, y; + if (i === 0) { + return $append(dst, 48); + } + j = 7; + while (true) { + if (!(j >= 0)) { break; } + v = (y = ((($imul(j, 4)) >>> 0)), y < 32 ? (i >>> y) : 0) >>> 0; + if (v > 0) { + dst = $append(dst, "0123456789abcdef".charCodeAt(((v & 15) >>> 0))); + } + j = j - (1) >> 0; + } + return dst; + }; + count = function(s, b) { + var b, i, n, s; + n = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === b) { + n = n + (1) >> 0; + } + i = i + (1) >> 0; + } + return n; + }; + last = function(s, b) { + var b, i, s; + i = s.length; + i = i - (1) >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (s.charCodeAt(i) === b) { + break; + } + i = i - (1) >> 0; + } + return i; + }; + lowerASCIIBytes = function(x) { + var _i, _ref, b, i, x; + _ref = x; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (65 <= b && b <= 90) { + ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) + (32) << 24 >>> 24)); + } + _i++; + } + }; + lowerASCII = function(b) { + var b; + if (65 <= b && b <= 90) { + return b + 32 << 24 >>> 24; + } + return b; + }; + trimSpace = function(x) { + var x, x$1; + while (true) { + if (!(x.$length > 0 && isSpace((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])))) { break; } + x = $subslice(x, 1); + } + while (true) { + if (!(x.$length > 0 && isSpace((x$1 = x.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]))))) { break; } + x = $subslice(x, 0, (x.$length - 1 >> 0)); + } + return x; + }; + isSpace = function(b) { + var b; + return (b === 32) || (b === 9) || (b === 10) || (b === 13); + }; + removeComment = function(line) { + var i, line; + i = bytesIndexByte(line, 35); + if (!((i === -1))) { + return $subslice(line, 0, i); + } + return line; + }; + foreachLine = function(x, fn) { + var _r$10, _r$9, err, fn, line, nl, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; err = $f.err; fn = $f.fn; line = $f.line; nl = $f.nl; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* while (true) { */ case 1: + /* if (!(x.$length > 0)) { break; } */ if(!(x.$length > 0)) { $s = 2; continue; } + nl = bytesIndexByte(x, 10); + /* */ if (nl === -1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (nl === -1) { */ case 3: + _r$9 = fn(x); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 4: + line = $subslice(x, 0, (nl + 1 >> 0)); + x = $subslice(x, (nl + 1 >> 0)); + _r$10 = fn(line); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err = _r$10; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: foreachLine }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f.err = err; $f.fn = fn; $f.line = line; $f.nl = nl; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + foreachField = function(x, fn) { + var _r$10, _r$9, err, field, fn, sp, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; err = $f.err; field = $f.field; fn = $f.fn; sp = $f.sp; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x = trimSpace(x); + /* while (true) { */ case 1: + /* if (!(x.$length > 0)) { break; } */ if(!(x.$length > 0)) { $s = 2; continue; } + sp = bytesIndexByte(x, 32); + /* */ if (sp === -1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (sp === -1) { */ case 3: + _r$9 = fn(x); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 4: + field = trimSpace($subslice(x, 0, sp)); + /* */ if (field.$length > 0) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (field.$length > 0) { */ case 6: + _r$10 = fn(field); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err = _r$10; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 7: + x = trimSpace($subslice(x, (sp + 1 >> 0))); + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: foreachField }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f.err = err; $f.field = field; $f.fn = fn; $f.sp = sp; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + stringsHasSuffix = function(s, suffix) { + var s, suffix; + return s.length >= suffix.length && $substring(s, (s.length - suffix.length >> 0)) === suffix; + }; + stringsHasSuffixFold = function(s, suffix) { + var s, suffix; + return s.length >= suffix.length && stringsEqualFold($substring(s, (s.length - suffix.length >> 0)), suffix); + }; + stringsHasPrefix = function(s, prefix) { + var prefix, s; + return s.length >= prefix.length && $substring(s, 0, prefix.length) === prefix; + }; + stringsEqualFold = function(s, t) { + var i, s, t; + if (!((s.length === t.length))) { + return false; + } + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (!((lowerASCII(s.charCodeAt(i)) === lowerASCII(t.charCodeAt(i))))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + readFull = function(r) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, all, buf, err, err$1, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; all = $f.all; buf = $f.buf; err = $f.err; err$1 = $f.err$1; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + all = sliceType$1.nil; + err = $ifaceNil; + buf = $makeSlice(sliceType$1, 1024); + /* while (true) { */ case 1: + _r$9 = r.Read(buf); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err$1 = _tuple[1]; + all = $appendSlice(all, $subslice(buf, 0, n)); + if ($interfaceIsEqual(err$1, io.EOF)) { + _tmp = all; + _tmp$1 = $ifaceNil; + all = _tmp; + err = _tmp$1; + $s = -1; return [all, err]; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$2 = sliceType$1.nil; + _tmp$3 = err$1; + all = _tmp$2; + err = _tmp$3; + $s = -1; return [all, err]; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return [all, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: readFull }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.all = all; $f.buf = buf; $f.err = err; $f.err$1 = err$1; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + goDebugString = function(key) { + var _i, _r$9, _ref, _rune, afterKey, b, i, i$1, key, s, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$9 = $f._r$9; _ref = $f._ref; _rune = $f._rune; afterKey = $f.afterKey; b = $f.b; i = $f.i; i$1 = $f.i$1; key = $f.key; s = $f.s; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = os.Getenv("GODEBUG"); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + s = _r$9; + i = 0; + while (true) { + if (!(i < ((s.length - key.length >> 0) - 1 >> 0))) { break; } + if (i > 0 && !((s.charCodeAt((i - 1 >> 0)) === 44))) { + i = i + (1) >> 0; + continue; + } + afterKey = $substring(s, (i + key.length >> 0)); + if (!((afterKey.charCodeAt(0) === 61)) || !($substring(s, i, (i + key.length >> 0)) === key)) { + i = i + (1) >> 0; + continue; + } + val = $substring(afterKey, 1); + _ref = val; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i$1 = _i; + b = _rune[0]; + if (b === 44) { + $s = -1; return $substring(val, 0, i$1); + } + _i += _rune[1]; + } + $s = -1; return val; + } + $s = -1; return ""; + /* */ } return; } if ($f === undefined) { $f = { $blk: goDebugString }; } $f._i = _i; $f._r$9 = _r$9; $f._ref = _ref; $f._rune = _rune; $f.afterKey = afterKey; $f.b = b; $f.i = i; $f.i$1 = i$1; $f.key = key; $f.s = s; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + parsePort = function(service) { + var _i, _ref, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, n, needsLookup, neg, nn, port, service; + port = 0; + needsLookup = false; + if (service === "") { + _tmp = 0; + _tmp$1 = false; + port = _tmp; + needsLookup = _tmp$1; + return [port, needsLookup]; + } + neg = false; + if (service.charCodeAt(0) === 43) { + service = $substring(service, 1); + } else if (service.charCodeAt(0) === 45) { + neg = true; + service = $substring(service, 1); + } + n = 0; + _ref = service; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + d = _rune[0]; + if (48 <= d && d <= 57) { + d = d - (48) >> 0; + } else { + _tmp$2 = 0; + _tmp$3 = true; + port = _tmp$2; + needsLookup = _tmp$3; + return [port, needsLookup]; + } + if (n >= 1073741824) { + n = 4294967295; + break; + } + n = $imul(n, (10)) >>> 0; + nn = n + ((d >>> 0)) >>> 0; + if (nn < n || nn > 4294967295) { + n = 4294967295; + break; + } + n = nn; + _i += _rune[1]; + } + if (!neg && n >= 1073741824) { + port = 1073741823; + } else if (neg && n > 1073741824) { + port = 1073741824; + } else { + port = ((n >> 0)); + } + if (neg) { + port = -port; + } + _tmp$4 = port; + _tmp$5 = false; + port = _tmp$4; + needsLookup = _tmp$5; + return [port, needsLookup]; + }; + readServices = function() { + var _entry, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, err, f, file$1, i, i$1, j, line, m, netw, ok, ok$1, ok1, port, portnet, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _key$1 = $f._key$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; err = $f.err; f = $f.f; file$1 = $f.file$1; i = $f.i; i$1 = $f.i$1; j = $f.j; line = $f.line; m = $f.m; netw = $f.netw; ok = $f.ok; ok$1 = $f.ok$1; ok1 = $f.ok1; port = $f.port; portnet = $f.portnet; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r$9 = open("/etc/services"); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + file$1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return; + } + $deferred.push([$methodVal(file$1, "close"), []]); + _r$10 = file$1.readLine(); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + line = _tuple$1[0]; + ok = _tuple$1[1]; + /* while (true) { */ case 3: + /* if (!(ok)) { break; } */ if(!(ok)) { $s = 4; continue; } + i = byteIndex(line, 35); + if (i >= 0) { + line = $substring(line, 0, i); + } + f = getFields(line); + /* */ if (f.$length < 2) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (f.$length < 2) { */ case 5: + _r$11 = file$1.readLine(); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$2 = _r$11; + line = _tuple$2[0]; + ok = _tuple$2[1]; + /* continue; */ $s = 3; continue; + /* } */ case 6: + portnet = (1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]); + _tuple$3 = dtoi(portnet); + port = _tuple$3[0]; + j = _tuple$3[1]; + ok$1 = _tuple$3[2]; + /* */ if (!ok$1 || port <= 0 || j >= portnet.length || !((portnet.charCodeAt(j) === 47))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!ok$1 || port <= 0 || j >= portnet.length || !((portnet.charCodeAt(j) === 47))) { */ case 8: + _r$12 = file$1.readLine(); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$4 = _r$12; + line = _tuple$4[0]; + ok = _tuple$4[1]; + /* continue; */ $s = 3; continue; + /* } */ case 9: + netw = $substring(portnet, (j + 1 >> 0)); + _tuple$5 = (_entry = services[$String.keyFor(netw)], _entry !== undefined ? [_entry.v, true] : [false, false]); + m = _tuple$5[0]; + ok1 = _tuple$5[1]; + if (!ok1) { + m = {}; + _key = netw; (services || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: m }; + } + i$1 = 0; + while (true) { + if (!(i$1 < f.$length)) { break; } + if (!((i$1 === 1))) { + _key$1 = ((i$1 < 0 || i$1 >= f.$length) ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + i$1]); (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: port }; + } + i$1 = i$1 + (1) >> 0; + } + _r$13 = file$1.readLine(); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$6 = _r$13; + line = _tuple$6[0]; + ok = _tuple$6[1]; + /* } */ $s = 3; continue; case 4: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: readServices }; } $f._entry = _entry; $f._key = _key; $f._key$1 = _key$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.err = err; $f.f = f; $f.file$1 = file$1; $f.i = i; $f.i$1 = i$1; $f.j = j; $f.line = line; $f.m = m; $f.netw = netw; $f.ok = ok; $f.ok$1 = ok$1; $f.ok1 = ok1; $f.port = port; $f.portnet = portnet; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + goLookupPort = function(network, service) { + var _tuple, err, network, port, service, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; err = $f.err; network = $f.network; port = $f.port; service = $f.service; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + port = 0; + err = $ifaceNil; + $r = onceReadServices.Do(readServices); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple = lookupPortMap(network, service); + port = _tuple[0]; + err = _tuple[1]; + $s = -1; return [port, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: goLookupPort }; } $f._tuple = _tuple; $f.err = err; $f.network = network; $f.port = port; $f.service = service; $f.$s = $s; $f.$r = $r; return $f; + }; + rawConn.ptr.prototype.ok = function() { + var c; + c = this; + return !(c === ptrType$38.nil) && !(c.fd === ptrType$16.nil); + }; + rawConn.prototype.ok = function() { return this.$val.ok(); }; + rawConn.ptr.prototype.Control = function(f) { + var _r$9, c, err, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.fd.pfd.RawControl(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(c.fd); + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("raw-control", c.fd.net, $ifaceNil, c.fd.laddr, err); + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: rawConn.ptr.prototype.Control }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + rawConn.prototype.Control = function(f) { return this.$val.Control(f); }; + rawConn.ptr.prototype.Read = function(f) { + var _r$9, c, err, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.fd.pfd.RawRead(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(c.fd); + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("raw-read", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: rawConn.ptr.prototype.Read }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + rawConn.prototype.Read = function(f) { return this.$val.Read(f); }; + rawConn.ptr.prototype.Write = function(f) { + var _r$9, c, err, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.fd.pfd.RawWrite(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(c.fd); + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("raw-write", c.fd.net, c.fd.laddr, c.fd.raddr, err); + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: rawConn.ptr.prototype.Write }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + rawConn.prototype.Write = function(f) { return this.$val.Write(f); }; + newRawConn = function(fd) { + var fd; + return [new rawConn.ptr(fd), $ifaceNil]; + }; + rawListener.ptr.prototype.Read = function(param) { + var l, param; + l = this; + return new syscall.Errno(22); + }; + rawListener.prototype.Read = function(param) { return this.$val.Read(param); }; + rawListener.ptr.prototype.Write = function(param) { + var l, param; + l = this; + return new syscall.Errno(22); + }; + rawListener.prototype.Write = function(param) { return this.$val.Write(param); }; + newRawListener = function(fd) { + var fd; + return [new rawListener.ptr(new rawConn.ptr(fd)), $ifaceNil]; + }; + sendFile = function(c, r) { + var _tmp, _tmp$1, _tmp$2, c, err, handled, n, r; + n = new $Int64(0, 0); + err = $ifaceNil; + handled = false; + _tmp = new $Int64(0, 0); + _tmp$1 = $ifaceNil; + _tmp$2 = false; + n = _tmp; + err = _tmp$1; + handled = _tmp$2; + return [n, err, handled]; + }; + socket = function(ctx, net, family, sotype, proto, ipv6only$1, laddr, raddr, ctrlFn) { + var _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, ctrlFn, ctx, err, err$1, err$2, err$3, family, fd, ipv6only$1, laddr, net, proto, raddr, s, sotype, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ctrlFn = $f.ctrlFn; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; family = $f.family; fd = $f.fd; ipv6only$1 = $f.ipv6only$1; laddr = $f.laddr; net = $f.net; proto = $f.proto; raddr = $f.raddr; s = $f.s; sotype = $f.sotype; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = ptrType$16.nil; + err = $ifaceNil; + _r$9 = sysSocket(family, sotype, proto); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + s = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = err; + fd = _tmp; + err = _tmp$1; + $s = -1; return [fd, err]; + } + _r$10 = setDefaultSockopts(s, family, sotype, ipv6only$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err = _r$10; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: + _r$11 = poll.CloseFunc(s); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + _tmp$2 = ptrType$16.nil; + _tmp$3 = err; + fd = _tmp$2; + err = _tmp$3; + $s = -1; return [fd, err]; + /* } */ case 4: + _tuple$1 = newFD(s, family, sotype, net); + fd = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: + _r$12 = poll.CloseFunc(s); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + _tmp$4 = ptrType$16.nil; + _tmp$5 = err; + fd = _tmp$4; + err = _tmp$5; + $s = -1; return [fd, err]; + /* } */ case 7: + /* */ if (!($interfaceIsEqual(laddr, $ifaceNil)) && $interfaceIsEqual(raddr, $ifaceNil)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(laddr, $ifaceNil)) && $interfaceIsEqual(raddr, $ifaceNil)) { */ case 9: + _1 = sotype; + /* */ if ((_1 === (1)) || (_1 === (5))) { $s = 12; continue; } + /* */ if (_1 === (2)) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if ((_1 === (1)) || (_1 === (5))) { */ case 12: + _r$13 = fd.listenStream(laddr, listenerBacklog, ctrlFn); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err$1 = _r$13; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 16: + _r$14 = fd.Close(); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + _tmp$6 = ptrType$16.nil; + _tmp$7 = err$1; + fd = _tmp$6; + err = _tmp$7; + $s = -1; return [fd, err]; + /* } */ case 17: + _tmp$8 = fd; + _tmp$9 = $ifaceNil; + fd = _tmp$8; + err = _tmp$9; + $s = -1; return [fd, err]; + /* } else if (_1 === (2)) { */ case 13: + _r$15 = fd.listenDatagram(laddr, ctrlFn); /* */ $s = 19; case 19: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + err$2 = _r$15; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 20: + _r$16 = fd.Close(); /* */ $s = 22; case 22: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$16; + _tmp$10 = ptrType$16.nil; + _tmp$11 = err$2; + fd = _tmp$10; + err = _tmp$11; + $s = -1; return [fd, err]; + /* } */ case 21: + _tmp$12 = fd; + _tmp$13 = $ifaceNil; + fd = _tmp$12; + err = _tmp$13; + $s = -1; return [fd, err]; + /* } */ case 14: + case 11: + /* } */ case 10: + _r$17 = fd.dial(ctx, laddr, raddr, ctrlFn); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + err$3 = _r$17; + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 24: + _r$18 = fd.Close(); /* */ $s = 26; case 26: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _r$18; + _tmp$14 = ptrType$16.nil; + _tmp$15 = err$3; + fd = _tmp$14; + err = _tmp$15; + $s = -1; return [fd, err]; + /* } */ case 25: + _tmp$16 = fd; + _tmp$17 = $ifaceNil; + fd = _tmp$16; + err = _tmp$17; + $s = -1; return [fd, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: socket }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ctrlFn = ctrlFn; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.family = family; $f.fd = fd; $f.ipv6only$1 = ipv6only$1; $f.laddr = laddr; $f.net = net; $f.proto = proto; $f.raddr = raddr; $f.s = s; $f.sotype = sotype; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.ptr.prototype.ctrlNetwork = function() { + var _1, _2, fd; + fd = this; + _1 = fd.net; + if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { + return fd.net; + } + _2 = fd.net.charCodeAt((fd.net.length - 1 >> 0)); + if ((_2 === (52)) || (_2 === (54))) { + return fd.net; + } + if (fd.family === 2) { + return fd.net + "4"; + } + return fd.net + "6"; + }; + netFD.prototype.ctrlNetwork = function() { return this.$val.ctrlNetwork(); }; + netFD.ptr.prototype.addrFunc = function() { + var _1, _2, _3, fd; + fd = this; + _1 = fd.family; + if ((_1 === (2)) || (_1 === (30))) { + _2 = fd.sotype; + if (_2 === (1)) { + return sockaddrToTCP; + } else if (_2 === (2)) { + return sockaddrToUDP; + } else if (_2 === (3)) { + return sockaddrToIP; + } + } else if (_1 === (1)) { + _3 = fd.sotype; + if (_3 === (1)) { + return sockaddrToUnix; + } else if (_3 === (2)) { + return sockaddrToUnixgram; + } else if (_3 === (5)) { + return sockaddrToUnixpacket; + } + } + return (function(param) { + var param; + return $ifaceNil; + }); + }; + netFD.prototype.addrFunc = function() { return this.$val.addrFunc(); }; + netFD.ptr.prototype.dial = function(ctx, laddr, raddr, ctrlFn) { + var _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, crsa, ctrlAddr, ctrlFn, ctx, err, err$1, err$2, err$3, fd, laddr, lsa, raddr, rsa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$20 = $f._r$20; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; c = $f.c; crsa = $f.crsa; ctrlAddr = $f.ctrlAddr; ctrlFn = $f.ctrlFn; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; fd = $f.fd; laddr = $f.laddr; lsa = $f.lsa; raddr = $f.raddr; rsa = $f.rsa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + /* */ if (!(ctrlFn === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(ctrlFn === $throwNilPointerError)) { */ case 1: + _tuple = newRawConn(fd); + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + ctrlAddr = ""; + /* */ if (!($interfaceIsEqual(raddr, $ifaceNil))) { $s = 3; continue; } + /* */ if (!($interfaceIsEqual(laddr, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(raddr, $ifaceNil))) { */ case 3: + _r$9 = raddr.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + ctrlAddr = _r$9; + $s = 5; continue; + /* } else if (!($interfaceIsEqual(laddr, $ifaceNil))) { */ case 4: + _r$10 = laddr.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + ctrlAddr = _r$10; + /* } */ case 5: + _r$11 = ctrlFn(fd.ctrlNetwork(), ctrlAddr, c); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$1 = _r$11; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ case 2: + err$2 = $ifaceNil; + lsa = $ifaceNil; + /* */ if (!($interfaceIsEqual(laddr, $ifaceNil))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(laddr, $ifaceNil))) { */ case 9: + _r$12 = laddr.sockaddr(fd.family); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$1 = _r$12; + lsa = _tuple$1[0]; + err$2 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 12; continue; } + /* */ if (!($interfaceIsEqual(lsa, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 12: + $s = -1; return err$2; + /* } else if (!($interfaceIsEqual(lsa, $ifaceNil))) { */ case 13: + _r$13 = syscall.Bind(fd.pfd.Sysfd, lsa); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err$2 = _r$13; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return os.NewSyscallError("bind", err$2); + } + /* } */ case 14: + /* } */ case 10: + rsa = $ifaceNil; + crsa = $ifaceNil; + /* */ if (!($interfaceIsEqual(raddr, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(raddr, $ifaceNil))) { */ case 16: + _r$14 = raddr.sockaddr(fd.family); /* */ $s = 19; case 19: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$2 = _r$14; + rsa = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + _r$15 = fd.connect(ctx, lsa, rsa); /* */ $s = 20; case 20: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$3 = _r$15; + crsa = _tuple$3[0]; + err$2 = _tuple$3[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + fd.isConnected = true; + $s = 18; continue; + /* } else { */ case 17: + err$3 = fd.init(); + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 18: + _tuple$4 = syscall.Getsockname(fd.pfd.Sysfd); + lsa = _tuple$4[0]; + /* */ if (!($interfaceIsEqual(crsa, $ifaceNil))) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!($interfaceIsEqual(crsa, $ifaceNil))) { */ case 21: + _r$16 = fd.addrFunc()(lsa); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _arg = _r$16; + _r$17 = fd.addrFunc()(crsa); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _arg$1 = _r$17; + $r = fd.setAddr(_arg, _arg$1); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 23; continue; + /* } else { */ case 22: + _tuple$5 = syscall.Getpeername(fd.pfd.Sysfd); + rsa = _tuple$5[0]; + /* */ if (!($interfaceIsEqual(rsa, $ifaceNil))) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (!($interfaceIsEqual(rsa, $ifaceNil))) { */ case 27: + _r$18 = fd.addrFunc()(lsa); /* */ $s = 30; case 30: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _arg$2 = _r$18; + _r$19 = fd.addrFunc()(rsa); /* */ $s = 31; case 31: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _arg$3 = _r$19; + $r = fd.setAddr(_arg$2, _arg$3); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 29; continue; + /* } else { */ case 28: + _r$20 = fd.addrFunc()(lsa); /* */ $s = 33; case 33: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + $r = fd.setAddr(_r$20, raddr); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 29: + /* } */ case 23: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.dial }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$20 = _r$20; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.c = c; $f.crsa = crsa; $f.ctrlAddr = ctrlAddr; $f.ctrlFn = ctrlFn; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.fd = fd; $f.laddr = laddr; $f.lsa = lsa; $f.raddr = raddr; $f.rsa = rsa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.dial = function(ctx, laddr, raddr, ctrlFn) { return this.$val.dial(ctx, laddr, raddr, ctrlFn); }; + netFD.ptr.prototype.listenStream = function(laddr, backlog, ctrlFn) { + var _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, _tuple, _tuple$1, _tuple$2, backlog, c, ctrlFn, err, err$1, err$2, fd, laddr, lsa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; backlog = $f.backlog; c = $f.c; ctrlFn = $f.ctrlFn; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; fd = $f.fd; laddr = $f.laddr; lsa = $f.lsa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = this; + err = $ifaceNil; + err = setDefaultListenerSockopts(fd.pfd.Sysfd); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + lsa = $ifaceNil; + _r$9 = laddr.sockaddr(fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + lsa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (!(ctrlFn === $throwNilPointerError)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(ctrlFn === $throwNilPointerError)) { */ case 2: + _tuple$1 = newRawConn(fd); + c = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _arg = fd.ctrlNetwork(); + _r$10 = laddr.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg$1 = _r$10; + _arg$2 = c; + _r$11 = ctrlFn(_arg, _arg$1, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$2 = _r$11; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + /* } */ case 3: + _r$12 = syscall.Bind(fd.pfd.Sysfd, lsa); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + err = _r$12; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return os.NewSyscallError("bind", err); + } + _r$13 = listenFunc(fd.pfd.Sysfd, backlog); /* */ $s = 7; case 7: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err = _r$13; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return os.NewSyscallError("listen", err); + } + err = fd.init(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$2 = syscall.Getsockname(fd.pfd.Sysfd); + lsa = _tuple$2[0]; + _r$14 = fd.addrFunc()(lsa); /* */ $s = 8; case 8: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $r = fd.setAddr(_r$14, $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.listenStream }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.backlog = backlog; $f.c = c; $f.ctrlFn = ctrlFn; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.fd = fd; $f.laddr = laddr; $f.lsa = lsa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.listenStream = function(laddr, backlog, ctrlFn) { return this.$val.listenStream(laddr, backlog, ctrlFn); }; + netFD.ptr.prototype.listenDatagram = function(laddr, ctrlFn) { + var _1, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$9, _ref, _tuple, _tuple$1, _tuple$2, addr, addr$1, c, ctrlFn, err, err$1, err$2, err$3, fd, laddr, lsa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; addr = $f.addr; addr$1 = $f.addr$1; c = $f.c; ctrlFn = $f.ctrlFn; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; fd = $f.fd; laddr = $f.laddr; lsa = $f.lsa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addr = [addr]; + fd = this; + _ref = laddr; + if ($assertType(_ref, ptrType$5, true)[1]) { + addr$1 = _ref.$val; + if (!(addr$1.IP === IP.nil) && addr$1.IP.IsMulticast()) { + err = setDefaultMulticastSockopts(fd.pfd.Sysfd); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + addr[0] = $clone(addr$1, UDPAddr); + _1 = fd.family; + if (_1 === (2)) { + addr[0].IP = $pkg.IPv4zero; + } else if (_1 === (30)) { + addr[0].IP = $pkg.IPv6unspecified; + } + laddr = addr[0]; + } + } + err$1 = $ifaceNil; + lsa = $ifaceNil; + _r$9 = laddr.sockaddr(fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + lsa = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* */ if (!(ctrlFn === $throwNilPointerError)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(ctrlFn === $throwNilPointerError)) { */ case 2: + _tuple$1 = newRawConn(fd); + c = _tuple$1[0]; + err$2 = _tuple$1[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + _arg = fd.ctrlNetwork(); + _r$10 = laddr.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg$1 = _r$10; + _arg$2 = c; + _r$11 = ctrlFn(_arg, _arg$1, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$3 = _r$11; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 3: + _r$12 = syscall.Bind(fd.pfd.Sysfd, lsa); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + err$1 = _r$12; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return os.NewSyscallError("bind", err$1); + } + err$1 = fd.init(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _tuple$2 = syscall.Getsockname(fd.pfd.Sysfd); + lsa = _tuple$2[0]; + _r$13 = fd.addrFunc()(lsa); /* */ $s = 7; case 7: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $r = fd.setAddr(_r$13, $ifaceNil); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.listenDatagram }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.addr = addr; $f.addr$1 = addr$1; $f.c = c; $f.ctrlFn = ctrlFn; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.fd = fd; $f.laddr = laddr; $f.lsa = lsa; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.listenDatagram = function(laddr, ctrlFn) { return this.$val.listenDatagram(laddr, ctrlFn); }; + setDefaultSockopts = function(s, family, sotype, ipv6only$1) { + var _1, _r$9, family, ipv6only$1, s, sotype, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$9 = $f._r$9; family = $f.family; ipv6only$1 = $f.ipv6only$1; s = $f.s; sotype = $f.sotype; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (false && !((sotype === 3))) { + _1 = family; + if (_1 === (2)) { + syscall.SetsockoptInt(s, 0, 19, 1); + } else if (_1 === (30)) { + syscall.SetsockoptInt(s, 41, 14, 1); + } + } + _r$9 = supportsIPv4map(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + /* */ if (_r$9 && (family === 30) && !((sotype === 3))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$9 && (family === 30) && !((sotype === 3))) { */ case 1: + syscall.SetsockoptInt(s, 41, 27, boolint(ipv6only$1)); + /* } */ case 2: + $s = -1; return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, 65535, 32, 1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: setDefaultSockopts }; } $f._1 = _1; $f._r$9 = _r$9; $f.family = family; $f.ipv6only$1 = ipv6only$1; $f.s = s; $f.sotype = sotype; $f.$s = $s; $f.$r = $r; return $f; + }; + setDefaultListenerSockopts = function(s) { + var s; + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, 65535, 4, 1)); + }; + setDefaultMulticastSockopts = function(s) { + var err, s; + err = syscall.SetsockoptInt(s, 65535, 4, 1); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return os.NewSyscallError("setsockopt", err); + } + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, 65535, 512, 1)); + }; + boolint = function(b) { + var b; + if (b) { + return 1; + } + return 0; + }; + setReadBuffer = function(fd, bytes) { + var _r$9, bytes, err, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; bytes = $f.bytes; err = $f.err; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = fd.pfd.SetsockoptInt(65535, 4098, bytes); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: setReadBuffer }; } $f._r$9 = _r$9; $f.bytes = bytes; $f.err = err; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + setWriteBuffer = function(fd, bytes) { + var _r$9, bytes, err, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; bytes = $f.bytes; err = $f.err; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = fd.pfd.SetsockoptInt(65535, 4097, bytes); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: setWriteBuffer }; } $f._r$9 = _r$9; $f.bytes = bytes; $f.err = err; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + setKeepAlive = function(fd, keepalive) { + var _r$9, err, fd, keepalive, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; err = $f.err; fd = $f.fd; keepalive = $f.keepalive; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = fd.pfd.SetsockoptInt(65535, 8, boolint(keepalive)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: setKeepAlive }; } $f._r$9 = _r$9; $f.err = err; $f.fd = fd; $f.keepalive = keepalive; $f.$s = $s; $f.$r = $r; return $f; + }; + setLinger = function(fd, sec) { + var _r$9, err, fd, l, sec, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; err = $f.err; fd = $f.fd; l = $f.l; sec = $f.sec; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = [l]; + l[0] = new syscall.Linger.ptr(0, 0); + if (sec >= 0) { + l[0].Onoff = 1; + l[0].Linger = ((sec >> 0)); + } else { + l[0].Onoff = 0; + l[0].Linger = 0; + } + _r$9 = fd.pfd.SetsockoptLinger(65535, 128, l[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: setLinger }; } $f._r$9 = _r$9; $f.err = err; $f.fd = fd; $f.l = l; $f.sec = sec; $f.$s = $s; $f.$r = $r; return $f; + }; + splice = function(c, r) { + var c, r; + return [new $Int64(0, 0), $ifaceNil, false]; + }; + sysSocket = function(family, sotype, proto) { + var _r$10, _r$9, _tuple, err, family, proto, s, sotype, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; family = $f.family; proto = $f.proto; s = $f.s; sotype = $f.sotype; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = syscall.ForkLock.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$9 = socketFunc(family, sotype, proto); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + s = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + syscall.CloseOnExec(s); + } + $r = syscall.ForkLock.RUnlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [-1, os.NewSyscallError("socket", err)]; + } + err = syscall.SetNonblock(s, true); + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + _r$10 = poll.CloseFunc(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return [-1, os.NewSyscallError("setnonblock", err)]; + /* } */ case 5: + $s = -1; return [s, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysSocket }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.family = family; $f.proto = proto; $f.s = s; $f.sotype = sotype; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPAddr.ptr.prototype.Network = function() { + var a; + a = this; + return "tcp"; + }; + TCPAddr.prototype.Network = function() { return this.$val.Network(); }; + TCPAddr.ptr.prototype.String = function() { + var a, ip; + a = this; + if (a === ptrType$7.nil) { + return ""; + } + ip = ipEmptyString(a.IP); + if (!(a.Zone === "")) { + return JoinHostPort(ip + "%" + a.Zone, itoa(a.Port)); + } + return JoinHostPort(ip, itoa(a.Port)); + }; + TCPAddr.prototype.String = function() { return this.$val.String(); }; + TCPAddr.ptr.prototype.isWildcard = function() { + var a; + a = this; + if (a === ptrType$7.nil || a.IP === IP.nil) { + return true; + } + return a.IP.IsUnspecified(); + }; + TCPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; + TCPAddr.ptr.prototype.opAddr = function() { + var a; + a = this; + if (a === ptrType$7.nil) { + return $ifaceNil; + } + return a; + }; + TCPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; + TCPConn.ptr.prototype.SyscallConn = function() { + var _returncast, c; + c = this; + if (!c.conn.ok()) { + return [$ifaceNil, new syscall.Errno(22)]; + } + _returncast = newRawConn(c.conn.fd); + return [_returncast[0], _returncast[1]]; + }; + TCPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; + TCPConn.ptr.prototype.ReadFrom = function(r) { + var _r$9, _tuple, c, err, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [new $Int64(0, 0), new syscall.Errno(22)]; + } + _r$9 = c.readFrom(r); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { + err = new OpError.ptr("readfrom", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.ReadFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; + TCPConn.ptr.prototype.CloseRead = function() { + var _r$9, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.conn.fd.closeRead(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.CloseRead }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.CloseRead = function() { return this.$val.CloseRead(); }; + TCPConn.ptr.prototype.CloseWrite = function() { + var _r$9, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.conn.fd.closeWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.CloseWrite }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; + TCPConn.ptr.prototype.SetLinger = function(sec) { + var _r$9, c, err, sec, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; sec = $f.sec; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setLinger(c.conn.fd, sec); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.SetLinger }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.sec = sec; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.SetLinger = function(sec) { return this.$val.SetLinger(sec); }; + TCPConn.ptr.prototype.SetKeepAlive = function(keepalive) { + var _r$9, c, err, keepalive, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; keepalive = $f.keepalive; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setKeepAlive(c.conn.fd, keepalive); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.SetKeepAlive }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.keepalive = keepalive; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.SetKeepAlive = function(keepalive) { return this.$val.SetKeepAlive(keepalive); }; + TCPConn.ptr.prototype.SetKeepAlivePeriod = function(d) { + var _r$9, c, d, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; d = $f.d; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setKeepAlivePeriod(c.conn.fd, d); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.SetKeepAlivePeriod }; } $f._r$9 = _r$9; $f.c = c; $f.d = d; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.SetKeepAlivePeriod = function(d) { return this.$val.SetKeepAlivePeriod(d); }; + TCPConn.ptr.prototype.SetNoDelay = function(noDelay) { + var _r$9, c, err, noDelay, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; noDelay = $f.noDelay; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = setNoDelay(c.conn.fd, noDelay); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.SetNoDelay }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.noDelay = noDelay; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.SetNoDelay = function(noDelay) { return this.$val.SetNoDelay(noDelay); }; + newTCPConn = function(fd) { + var _r$9, c, fd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; fd = $f.fd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = new TCPConn.ptr(new conn.ptr(fd)); + _r$9 = setNoDelay(c.conn.fd, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + $s = -1; return c; + /* */ } return; } if ($f === undefined) { $f = { $blk: newTCPConn }; } $f._r$9 = _r$9; $f.c = c; $f.fd = fd; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.ptr.prototype.SyscallConn = function() { + var _returncast, l; + l = this; + if (!l.ok()) { + return [$ifaceNil, new syscall.Errno(22)]; + } + _returncast = newRawListener(l.fd); + return [_returncast[0], _returncast[1]]; + }; + TCPListener.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; + TCPListener.ptr.prototype.AcceptTCP = function() { + var _r$9, _tuple, c, err, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = this; + if (!l.ok()) { + $s = -1; return [ptrType$10.nil, new syscall.Errno(22)]; + } + _r$9 = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$10.nil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; + } + $s = -1; return [c, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.AcceptTCP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.AcceptTCP = function() { return this.$val.AcceptTCP(); }; + TCPListener.ptr.prototype.Accept = function() { + var _r$9, _tuple, c, err, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = this; + if (!l.ok()) { + $s = -1; return [$ifaceNil, new syscall.Errno(22)]; + } + _r$9 = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; + } + $s = -1; return [c, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.Accept }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.Accept = function() { return this.$val.Accept(); }; + TCPListener.ptr.prototype.Close = function() { + var _r$9, err, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; err = $f.err; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = this; + if (!l.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = l.close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("close", l.fd.net, $ifaceNil, l.fd.laddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.Close }; } $f._r$9 = _r$9; $f.err = err; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.Close = function() { return this.$val.Close(); }; + TCPListener.ptr.prototype.Addr = function() { + var l; + l = this; + return l.fd.laddr; + }; + TCPListener.prototype.Addr = function() { return this.$val.Addr(); }; + TCPListener.ptr.prototype.SetDeadline = function(t) { + var err, l, t; + l = this; + if (!l.ok()) { + return new syscall.Errno(22); + } + err = l.fd.pfd.SetDeadline($clone(t, time.Time)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return new OpError.ptr("set", l.fd.net, $ifaceNil, l.fd.laddr, err); + } + return $ifaceNil; + }; + TCPListener.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; + TCPListener.ptr.prototype.File = function() { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, f, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; err = $f.err; f = $f.f; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = ptrType$17.nil; + err = $ifaceNil; + l = this; + if (!l.ok()) { + _tmp = ptrType$17.nil; + _tmp$1 = new syscall.Errno(22); + f = _tmp; + err = _tmp$1; + $s = -1; return [f, err]; + } + _r$9 = l.file(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = ptrType$17.nil; + _tmp$3 = new OpError.ptr("file", l.fd.net, $ifaceNil, l.fd.laddr, err); + f = _tmp$2; + err = _tmp$3; + $s = -1; return [f, err]; + } + $s = -1; return [f, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.File }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.File = function() { return this.$val.File(); }; + sockaddrToTCP = function(sa) { + var _r$9, _ref, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _ref = $f._ref; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 1: + sa$1 = _ref.$val; + $s = -1; return new TCPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), sa$1.Port, ""); + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 2: + sa$2 = _ref.$val; + _r$9 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return new TCPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), sa$2.Port, _r$9); + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: sockaddrToTCP }; } $f._r$9 = _r$9; $f._ref = _ref; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPAddr.ptr.prototype.family = function() { + var a; + a = this; + if (a === ptrType$7.nil || a.IP.$length <= 4) { + return 2; + } + if (!(a.IP.To4() === IP.nil)) { + return 2; + } + return 30; + }; + TCPAddr.prototype.family = function() { return this.$val.family(); }; + TCPAddr.ptr.prototype.sockaddr = function(family) { + var _r$9, a, family, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; a = $f.a; family = $f.family; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = this; + if (a === ptrType$7.nil) { + $s = -1; return [$ifaceNil, $ifaceNil]; + } + _r$9 = ipToSockaddr(family, a.IP, a.Port, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPAddr.ptr.prototype.sockaddr }; } $f._r$9 = _r$9; $f.a = a; $f.family = family; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; + TCPAddr.ptr.prototype.toLocal = function(net) { + var a, net; + a = this; + return new TCPAddr.ptr(loopbackIP(net), a.Port, a.Zone); + }; + TCPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; + TCPConn.ptr.prototype.readFrom = function(r) { + var _r$9, _tuple, _tuple$1, c, err, err$1, handled, handled$1, n, n$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; err$1 = $f.err$1; handled = $f.handled; handled$1 = $f.handled$1; n = $f.n; n$1 = $f.n$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _tuple = splice(c.conn.fd, r); + n = _tuple[0]; + err = _tuple[1]; + handled = _tuple[2]; + if (handled) { + $s = -1; return [n, err]; + } + _tuple$1 = sendFile(c.conn.fd, r); + n$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + handled$1 = _tuple$1[2]; + if (handled$1) { + $s = -1; return [n$1, err$1]; + } + _r$9 = genericReadFrom(c, r); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPConn.ptr.prototype.readFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.handled = handled; $f.handled$1 = handled$1; $f.n = n; $f.n$1 = n$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPConn.prototype.readFrom = function(r) { return this.$val.readFrom(r); }; + sysDialer.ptr.prototype.dialTCP = function(ctx, laddr, raddr) { + var _r$10, _r$9, ctx, laddr, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; ctx = $f.ctx; laddr = $f.laddr; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sd = this; + /* */ if (!(testHookDialTCP === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(testHookDialTCP === $throwNilPointerError)) { */ case 1: + _r$9 = testHookDialTCP(ctx, sd.network, laddr, raddr); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 2: + _r$10 = sd.doDialTCP(ctx, laddr, raddr); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return _r$10; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialTCP }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f.ctx = ctx; $f.laddr = laddr; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + sysDialer.prototype.dialTCP = function(ctx, laddr, raddr) { return this.$val.dialTCP(ctx, laddr, raddr); }; + sysDialer.ptr.prototype.doDialTCP = function(ctx, laddr, raddr) { + var _r$10, _r$11, _r$12, _r$9, _tuple, _tuple$1, ctx, err, fd, i, laddr, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ctx = $f.ctx; err = $f.err; fd = $f.fd; i = $f.i; laddr = $f.laddr; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sd = this; + _r$9 = internetSocket(ctx, sd.network, laddr, raddr, 1, 0, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fd = _tuple[0]; + err = _tuple[1]; + i = 0; + /* while (true) { */ case 2: + /* if (!(i < 2 && (laddr === ptrType$7.nil || (laddr.Port === 0)) && (selfConnect(fd, err) || spuriousENOTAVAIL(err)))) { break; } */ if(!(i < 2 && (laddr === ptrType$7.nil || (laddr.Port === 0)) && (selfConnect(fd, err) || spuriousENOTAVAIL(err)))) { $s = 3; continue; } + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 4: + _r$10 = fd.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + /* } */ case 5: + _r$11 = internetSocket(ctx, sd.network, laddr, raddr, 1, 0, "dial", sd.Dialer.Control); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + fd = _tuple$1[0]; + err = _tuple$1[1]; + i = i + (1) >> 0; + /* } */ $s = 2; continue; case 3: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$10.nil, err]; + } + _r$12 = newTCPConn(fd); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + $s = -1; return [_r$12, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.doDialTCP }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ctx = ctx; $f.err = err; $f.fd = fd; $f.i = i; $f.laddr = laddr; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + sysDialer.prototype.doDialTCP = function(ctx, laddr, raddr) { return this.$val.doDialTCP(ctx, laddr, raddr); }; + selfConnect = function(fd, err) { + var err, fd, l, r; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return false; + } + if ($interfaceIsEqual(fd.laddr, $ifaceNil) || $interfaceIsEqual(fd.raddr, $ifaceNil)) { + return true; + } + l = $assertType(fd.laddr, ptrType$7); + r = $assertType(fd.raddr, ptrType$7); + return (l.Port === r.Port) && l.IP.Equal(r.IP); + }; + spuriousENOTAVAIL = function(err) { + var _tuple, _tuple$1, err, ok, ok$1, op, sys; + _tuple = $assertType(err, ptrType$13, true); + op = _tuple[0]; + ok = _tuple[1]; + if (ok) { + err = op.Err; + } + _tuple$1 = $assertType(err, ptrType$35, true); + sys = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (ok$1) { + err = sys.Err; + } + return $interfaceIsEqual(err, new syscall.Errno(49)); + }; + TCPListener.ptr.prototype.ok = function() { + var ln; + ln = this; + return !(ln === ptrType$39.nil) && !(ln.fd === ptrType$16.nil); + }; + TCPListener.prototype.ok = function() { return this.$val.ok(); }; + TCPListener.ptr.prototype.accept = function() { + var _r$10, _r$9, _tuple, err, fd, ln, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; fd = $f.fd; ln = $f.ln; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ln = this; + _r$9 = ln.fd.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fd = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$10.nil, err]; + } + _r$10 = newTCPConn(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return [_r$10, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.accept }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.ln = ln; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.accept = function() { return this.$val.accept(); }; + TCPListener.ptr.prototype.close = function() { + var _r$9, ln, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; ln = $f.ln; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ln = this; + _r$9 = ln.fd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.close }; } $f._r$9 = _r$9; $f.ln = ln; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.close = function() { return this.$val.close(); }; + TCPListener.ptr.prototype.file = function() { + var _r$9, _tuple, err, f, ln, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; err = $f.err; f = $f.f; ln = $f.ln; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ln = this; + _r$9 = ln.fd.dup(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$17.nil, err]; + } + $s = -1; return [f, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: TCPListener.ptr.prototype.file }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.ln = ln; $f.$s = $s; $f.$r = $r; return $f; + }; + TCPListener.prototype.file = function() { return this.$val.file(); }; + setKeepAlivePeriod = function(fd, d) { + var _r$10, _r$9, d, err, err$1, fd, secs, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; d = $f.d; err = $f.err; err$1 = $f.err$1; fd = $f.fd; secs = $f.secs; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = (x = new time.Duration(0, 999999999), new time.Duration(d.$high + x.$high, d.$low + x.$low)); + secs = ((d.Seconds() >> 0)); + _r$9 = fd.pfd.SetsockoptInt(6, 257, secs); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return wrapSyscallError("setsockopt", err); + } + _r$10 = fd.pfd.SetsockoptInt(6, 16, secs); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err$1 = _r$10; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err$1); + /* */ } return; } if ($f === undefined) { $f = { $blk: setKeepAlivePeriod }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.fd = fd; $f.secs = secs; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + setNoDelay = function(fd, noDelay) { + var _r$9, err, fd, noDelay, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; err = $f.err; fd = $f.fd; noDelay = $f.noDelay; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$9 = fd.pfd.SetsockoptInt(6, 1, boolint(noDelay)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + runtime.KeepAlive(fd); + $s = -1; return wrapSyscallError("setsockopt", err); + /* */ } return; } if ($f === undefined) { $f = { $blk: setNoDelay }; } $f._r$9 = _r$9; $f.err = err; $f.fd = fd; $f.noDelay = noDelay; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPAddr.ptr.prototype.Network = function() { + var a; + a = this; + return "udp"; + }; + UDPAddr.prototype.Network = function() { return this.$val.Network(); }; + UDPAddr.ptr.prototype.String = function() { + var a, ip; + a = this; + if (a === ptrType$5.nil) { + return ""; + } + ip = ipEmptyString(a.IP); + if (!(a.Zone === "")) { + return JoinHostPort(ip + "%" + a.Zone, itoa(a.Port)); + } + return JoinHostPort(ip, itoa(a.Port)); + }; + UDPAddr.prototype.String = function() { return this.$val.String(); }; + UDPAddr.ptr.prototype.isWildcard = function() { + var a; + a = this; + if (a === ptrType$5.nil || a.IP === IP.nil) { + return true; + } + return a.IP.IsUnspecified(); + }; + UDPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; + UDPAddr.ptr.prototype.opAddr = function() { + var a; + a = this; + if (a === ptrType$5.nil) { + return $ifaceNil; + } + return a; + }; + UDPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; + UDPConn.ptr.prototype.SyscallConn = function() { + var _returncast, c; + c = this; + if (!c.conn.ok()) { + return [$ifaceNil, new syscall.Errno(22)]; + } + _returncast = newRawConn(c.conn.fd); + return [_returncast[0], _returncast[1]]; + }; + UDPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; + UDPConn.ptr.prototype.ReadFromUDP = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, ptrType$5.nil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.ReadFromUDP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.ReadFromUDP = function(b) { return this.$val.ReadFromUDP(b); }; + UDPConn.ptr.prototype.ReadFrom = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, $ifaceNil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + if (addr === ptrType$5.nil) { + $s = -1; return [n, $ifaceNil, err]; + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.ReadFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; + UDPConn.ptr.prototype.ReadMsgUDP = function(b, oob) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$5.nil; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = ptrType$5.nil; + _tmp$4 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + flags = _tmp$2; + addr = _tmp$3; + err = _tmp$4; + $s = -1; return [n, oobn, flags, addr, err]; + } + _r$9 = c.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + addr = _tuple[3]; + err = _tuple[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.ReadMsgUDP }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.ReadMsgUDP = function(b, oob) { return this.$val.ReadMsgUDP(b, oob); }; + UDPConn.ptr.prototype.WriteToUDP = function(b, addr) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _r$9 = c.writeTo(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.WriteToUDP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.WriteToUDP = function(b, addr) { return this.$val.WriteToUDP(b, addr); }; + UDPConn.ptr.prototype.WriteTo = function(b, addr) { + var _r$9, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; a = $f.a; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _tuple = $assertType(addr, ptrType$5, true); + a = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; + } + _r$9 = c.writeTo(b, a); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + n = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.WriteTo }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.a = a; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; + UDPConn.ptr.prototype.WriteMsgUDP = function(b, oob, addr) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + _r$9 = c.writeMsg(b, oob, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.WriteMsgUDP }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.WriteMsgUDP = function(b, oob, addr) { return this.$val.WriteMsgUDP(b, oob, addr); }; + newUDPConn = function(fd) { + var fd; + return new UDPConn.ptr(new conn.ptr(fd)); + }; + DialUDP = function(network, laddr, raddr) { + var _1, _r$9, _tuple, c, err, laddr, network, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; laddr = $f.laddr; network = $f.network; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = network; + if (_1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { + } else { + $s = -1; return [ptrType$40.nil, new OpError.ptr("dial", network, laddr.opAddr(), raddr.opAddr(), new UnknownNetworkError((network)))]; + } + if (raddr === ptrType$5.nil) { + $s = -1; return [ptrType$40.nil, new OpError.ptr("dial", network, laddr.opAddr(), $ifaceNil, errMissingAddress)]; + } + sd = new sysDialer.ptr(new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$6.nil, $chanNil, $throwNilPointerError), network, raddr.String()); + _r$9 = sd.dialUDP(context.Background(), laddr, raddr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$40.nil, new OpError.ptr("dial", network, laddr.opAddr(), raddr.opAddr(), err)]; + } + $s = -1; return [c, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: DialUDP }; } $f._1 = _1; $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.laddr = laddr; $f.network = network; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DialUDP = DialUDP; + sockaddrToUDP = function(sa) { + var _r$9, _ref, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _ref = $f._ref; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 1: + sa$1 = _ref.$val; + $s = -1; return new UDPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), sa$1.Port, ""); + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 2: + sa$2 = _ref.$val; + _r$9 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return new UDPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), sa$2.Port, _r$9); + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: sockaddrToUDP }; } $f._r$9 = _r$9; $f._ref = _ref; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPAddr.ptr.prototype.family = function() { + var a; + a = this; + if (a === ptrType$5.nil || a.IP.$length <= 4) { + return 2; + } + if (!(a.IP.To4() === IP.nil)) { + return 2; + } + return 30; + }; + UDPAddr.prototype.family = function() { return this.$val.family(); }; + UDPAddr.ptr.prototype.sockaddr = function(family) { + var _r$9, a, family, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; a = $f.a; family = $f.family; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + a = this; + if (a === ptrType$5.nil) { + $s = -1; return [$ifaceNil, $ifaceNil]; + } + _r$9 = ipToSockaddr(family, a.IP, a.Port, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPAddr.ptr.prototype.sockaddr }; } $f._r$9 = _r$9; $f.a = a; $f.family = family; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; + UDPAddr.ptr.prototype.toLocal = function(net) { + var a, net; + a = this; + return new UDPAddr.ptr(loopbackIP(net), a.Port, a.Zone); + }; + UDPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; + UDPConn.ptr.prototype.readFrom = function(b) { + var _r$10, _r$9, _ref, _tuple, addr, b, c, err, n, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + addr = ptrType$5.nil; + _r$9 = c.conn.fd.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + sa = _tuple[1]; + err = _tuple[2]; + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 2; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 2: + sa$1 = _ref.$val; + addr = new UDPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), sa$1.Port, ""); + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 3: + sa$2 = _ref.$val; + _r$10 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + addr = new UDPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), sa$2.Port, _r$10); + /* } */ case 4: + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.readFrom }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.readFrom = function(b) { return this.$val.readFrom(b); }; + UDPConn.ptr.prototype.readMsg = function(b, oob) { + var _r$10, _r$9, _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1, sa$2, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; sa$1 = $f.sa$1; sa$2 = $f.sa$2; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$5.nil; + err = $ifaceNil; + c = this; + sa = $ifaceNil; + _r$9 = c.conn.fd.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + sa = _tuple[3]; + err = _tuple[4]; + _ref = sa; + /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 2; continue; } + /* */ if ($assertType(_ref, ptrType$19, true)[1]) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 2: + sa$1 = _ref.$val; + addr = new UDPAddr.ptr((x = $subslice(new sliceType$1(sa$1.Addr), 0), $subslice(new IP(x.$array), x.$offset, x.$offset + x.$length)), sa$1.Port, ""); + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$19, true)[1]) { */ case 3: + sa$2 = _ref.$val; + _r$10 = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + addr = new UDPAddr.ptr((x$1 = $subslice(new sliceType$1(sa$2.Addr), 0), $subslice(new IP(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)), sa$2.Port, _r$10); + /* } */ case 4: + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.readMsg }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.sa$1 = sa$1; $f.sa$2 = sa$2; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; + UDPConn.ptr.prototype.writeTo = function(b, addr) { + var _r$10, _r$9, _tuple, addr, b, c, err, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.conn.fd.isConnected) { + $s = -1; return [0, $pkg.ErrWriteToConnected]; + } + if (addr === ptrType$5.nil) { + $s = -1; return [0, errMissingAddress]; + } + _r$9 = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + sa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [0, err]; + } + _r$10 = c.conn.fd.writeTo(b, sa); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return _r$10; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.writeTo }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; + UDPConn.ptr.prototype.writeMsg = function(b, oob, addr) { + var _r$10, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if (c.conn.fd.isConnected && !(addr === ptrType$5.nil)) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = $pkg.ErrWriteToConnected; + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + if (!c.conn.fd.isConnected && addr === ptrType$5.nil) { + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = errMissingAddress; + n = _tmp$3; + oobn = _tmp$4; + err = _tmp$5; + $s = -1; return [n, oobn, err]; + } + _r$9 = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + sa = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = 0; + _tmp$7 = 0; + _tmp$8 = err; + n = _tmp$6; + oobn = _tmp$7; + err = _tmp$8; + $s = -1; return [n, oobn, err]; + } + _r$10 = c.conn.fd.writeMsg(b, oob, sa); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + n = _tuple$1[0]; + oobn = _tuple$1[1]; + err = _tuple$1[2]; + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UDPConn.ptr.prototype.writeMsg }; } $f._r$10 = _r$10; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + UDPConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; + sysDialer.ptr.prototype.dialUDP = function(ctx, laddr, raddr) { + var _r$9, _tuple, ctx, err, fd, laddr, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; ctx = $f.ctx; err = $f.err; fd = $f.fd; laddr = $f.laddr; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sd = this; + _r$9 = internetSocket(ctx, sd.network, laddr, raddr, 2, 0, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fd = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$40.nil, err]; + } + $s = -1; return [newUDPConn(fd), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialUDP }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.ctx = ctx; $f.err = err; $f.fd = fd; $f.laddr = laddr; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + sysDialer.prototype.dialUDP = function(ctx, laddr, raddr) { return this.$val.dialUDP(ctx, laddr, raddr); }; + UnixAddr.ptr.prototype.Network = function() { + var a; + a = this; + return a.Net; + }; + UnixAddr.prototype.Network = function() { return this.$val.Network(); }; + UnixAddr.ptr.prototype.String = function() { + var a; + a = this; + if (a === ptrType$11.nil) { + return ""; + } + return a.Name; + }; + UnixAddr.prototype.String = function() { return this.$val.String(); }; + UnixAddr.ptr.prototype.isWildcard = function() { + var a; + a = this; + return a === ptrType$11.nil || a.Name === ""; + }; + UnixAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; + UnixAddr.ptr.prototype.opAddr = function() { + var a; + a = this; + if (a === ptrType$11.nil) { + return $ifaceNil; + } + return a; + }; + UnixAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; + ResolveUnixAddr = function(network, address) { + var _1, address, network; + _1 = network; + if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { + return [new UnixAddr.ptr(address, network), $ifaceNil]; + } else { + return [ptrType$11.nil, new UnknownNetworkError((network))]; + } + }; + $pkg.ResolveUnixAddr = ResolveUnixAddr; + UnixConn.ptr.prototype.SyscallConn = function() { + var _returncast, c; + c = this; + if (!c.conn.ok()) { + return [$ifaceNil, new syscall.Errno(22)]; + } + _returncast = newRawConn(c.conn.fd); + return [_returncast[0], _returncast[1]]; + }; + UnixConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; + UnixConn.ptr.prototype.CloseRead = function() { + var _r$9, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.conn.fd.closeRead(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.CloseRead }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.CloseRead = function() { return this.$val.CloseRead(); }; + UnixConn.ptr.prototype.CloseWrite = function() { + var _r$9, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return new syscall.Errno(22); + } + _r$9 = c.conn.fd.closeWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.CloseWrite }; } $f._r$9 = _r$9; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; + UnixConn.ptr.prototype.ReadFromUnix = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, ptrType$11.nil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.ReadFromUnix }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.ReadFromUnix = function(b) { return this.$val.ReadFromUnix(b); }; + UnixConn.ptr.prototype.ReadFrom = function(b) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, $ifaceNil, new syscall.Errno(22)]; + } + _r$9 = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + addr = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + if (addr === ptrType$11.nil) { + $s = -1; return [n, $ifaceNil, err]; + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.ReadFrom }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; + UnixConn.ptr.prototype.ReadMsgUnix = function(b, oob) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$11.nil; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = ptrType$11.nil; + _tmp$4 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + flags = _tmp$2; + addr = _tmp$3; + err = _tmp$4; + $s = -1; return [n, oobn, flags, addr, err]; + } + _r$9 = c.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + addr = _tuple[3]; + err = _tuple[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); + } + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.ReadMsgUnix }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.ReadMsgUnix = function(b, oob) { return this.$val.ReadMsgUnix(b, oob); }; + UnixConn.ptr.prototype.WriteToUnix = function(b, addr) { + var _r$9, _tuple, addr, b, c, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _r$9 = c.writeTo(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.WriteToUnix }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.WriteToUnix = function(b, addr) { return this.$val.WriteToUnix(b, addr); }; + UnixConn.ptr.prototype.WriteTo = function(b, addr) { + var _r$9, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; a = $f.a; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.conn.ok()) { + $s = -1; return [0, new syscall.Errno(22)]; + } + _tuple = $assertType(addr, ptrType$11, true); + a = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; + } + _r$9 = c.writeTo(b, a); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$1 = _r$9; + n = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.WriteTo }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.a = a; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; + UnixConn.ptr.prototype.WriteMsgUnix = function(b, oob, addr) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if (!c.conn.ok()) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = new syscall.Errno(22); + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + _r$9 = c.writeMsg(b, oob, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); + } + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.WriteMsgUnix }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.WriteMsgUnix = function(b, oob, addr) { return this.$val.WriteMsgUnix(b, oob, addr); }; + newUnixConn = function(fd) { + var fd; + return new UnixConn.ptr(new conn.ptr(fd)); + }; + unixSocket = function(ctx, net, laddr, raddr, mode, ctrlFn) { + var _1, _2, _r$10, _r$11, _r$9, _tuple, _v, _v$1, ctrlFn, ctx, err, fd, laddr, mode, net, raddr, sotype, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$9 = $f._r$9; _tuple = $f._tuple; _v = $f._v; _v$1 = $f._v$1; ctrlFn = $f.ctrlFn; ctx = $f.ctx; err = $f.err; fd = $f.fd; laddr = $f.laddr; mode = $f.mode; net = $f.net; raddr = $f.raddr; sotype = $f.sotype; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sotype = 0; + _1 = net; + if (_1 === ("unix")) { + sotype = 1; + } else if (_1 === ("unixgram")) { + sotype = 2; + } else if (_1 === ("unixpacket")) { + sotype = 5; + } else { + $s = -1; return [ptrType$16.nil, new UnknownNetworkError((net))]; + } + _2 = mode; + /* */ if (_2 === ("dial")) { $s = 2; continue; } + /* */ if (_2 === ("listen")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_2 === ("dial")) { */ case 2: + if (!(!($interfaceIsEqual(laddr, $ifaceNil)))) { _v = false; $s = 8; continue s; } + _r$9 = laddr.isWildcard(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9; case 8: + /* */ if (_v) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (_v) { */ case 6: + laddr = $ifaceNil; + /* } */ case 7: + if (!(!($interfaceIsEqual(raddr, $ifaceNil)))) { _v$1 = false; $s = 12; continue s; } + _r$10 = raddr.isWildcard(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v$1 = _r$10; case 12: + /* */ if (_v$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_v$1) { */ case 10: + raddr = $ifaceNil; + /* } */ case 11: + if ($interfaceIsEqual(raddr, $ifaceNil) && (!((sotype === 2)) || $interfaceIsEqual(laddr, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, errMissingAddress]; + } + $s = 5; continue; + /* } else if (_2 === ("listen")) { */ case 3: + $s = 5; continue; + /* } else { */ case 4: + $s = -1; return [ptrType$16.nil, errors.New("unknown mode: " + mode)]; + /* } */ case 5: + case 1: + _r$11 = socket(ctx, net, 1, sotype, 0, false, laddr, raddr, ctrlFn); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + fd = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, err]; + } + $s = -1; return [fd, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: unixSocket }; } $f._1 = _1; $f._2 = _2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$9 = _r$9; $f._tuple = _tuple; $f._v = _v; $f._v$1 = _v$1; $f.ctrlFn = ctrlFn; $f.ctx = ctx; $f.err = err; $f.fd = fd; $f.laddr = laddr; $f.mode = mode; $f.net = net; $f.raddr = raddr; $f.sotype = sotype; $f.$s = $s; $f.$r = $r; return $f; + }; + sockaddrToUnix = function(sa) { + var _tuple, ok, s, sa; + _tuple = $assertType(sa, ptrType$20, true); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return new UnixAddr.ptr(s.Name, "unix"); + } + return $ifaceNil; + }; + sockaddrToUnixgram = function(sa) { + var _tuple, ok, s, sa; + _tuple = $assertType(sa, ptrType$20, true); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return new UnixAddr.ptr(s.Name, "unixgram"); + } + return $ifaceNil; + }; + sockaddrToUnixpacket = function(sa) { + var _tuple, ok, s, sa; + _tuple = $assertType(sa, ptrType$20, true); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return new UnixAddr.ptr(s.Name, "unixpacket"); + } + return $ifaceNil; + }; + sotypeToNet = function(sotype) { + var _1, sotype; + _1 = sotype; + if (_1 === (1)) { + return "unix"; + } else if (_1 === (2)) { + return "unixgram"; + } else if (_1 === (5)) { + return "unixpacket"; + } else { + $panic(new $String("sotypeToNet unknown socket type")); + } + }; + UnixAddr.ptr.prototype.family = function() { + var a; + a = this; + return 1; + }; + UnixAddr.prototype.family = function() { return this.$val.family(); }; + UnixAddr.ptr.prototype.sockaddr = function(family) { + var a, family; + a = this; + if (a === ptrType$11.nil) { + return [$ifaceNil, $ifaceNil]; + } + return [new syscall.SockaddrUnix.ptr(a.Name, new syscall.RawSockaddrUnix.ptr(0, 0, arrayType$7.zero())), $ifaceNil]; + }; + UnixAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; + UnixAddr.ptr.prototype.toLocal = function(net) { + var a, net; + a = this; + return a; + }; + UnixAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; + UnixConn.ptr.prototype.readFrom = function(b) { + var _r$9, _ref, _tuple, addr, b, c, err, n, sa, sa$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; sa = $f.sa; sa$1 = $f.sa$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + addr = ptrType$11.nil; + _r$9 = c.conn.fd.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + sa = _tuple[1]; + err = _tuple[2]; + _ref = sa; + if ($assertType(_ref, ptrType$20, true)[1]) { + sa$1 = _ref.$val; + if (!(sa$1.Name === "")) { + addr = new UnixAddr.ptr(sa$1.Name, sotypeToNet(c.conn.fd.sotype)); + } + } + $s = -1; return [n, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.readFrom }; } $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.sa = sa; $f.sa$1 = sa$1; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.readFrom = function(b) { return this.$val.readFrom(b); }; + UnixConn.ptr.prototype.readMsg = function(b, oob) { + var _r$9, _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; flags = $f.flags; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; sa$1 = $f.sa$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + flags = 0; + addr = ptrType$11.nil; + err = $ifaceNil; + c = this; + sa = $ifaceNil; + _r$9 = c.conn.fd.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + flags = _tuple[2]; + sa = _tuple[3]; + err = _tuple[4]; + _ref = sa; + if ($assertType(_ref, ptrType$20, true)[1]) { + sa$1 = _ref.$val; + if (!(sa$1.Name === "")) { + addr = new UnixAddr.ptr(sa$1.Name, sotypeToNet(c.conn.fd.sotype)); + } + } + $s = -1; return [n, oobn, flags, addr, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.readMsg }; } $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.flags = flags; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.sa$1 = sa$1; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; + UnixConn.ptr.prototype.writeTo = function(b, addr) { + var _r$9, addr, b, c, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; addr = $f.addr; b = $f.b; c = $f.c; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.conn.fd.isConnected) { + $s = -1; return [0, $pkg.ErrWriteToConnected]; + } + if (addr === ptrType$11.nil) { + $s = -1; return [0, errMissingAddress]; + } + if (!(addr.Net === sotypeToNet(c.conn.fd.sotype))) { + $s = -1; return [0, new syscall.Errno(47)]; + } + sa = new syscall.SockaddrUnix.ptr(addr.Name, new syscall.RawSockaddrUnix.ptr(0, 0, arrayType$7.zero())); + _r$9 = c.conn.fd.writeTo(b, sa); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.writeTo }; } $f._r$9 = _r$9; $f.addr = addr; $f.b = b; $f.c = c; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; + UnixConn.ptr.prototype.writeMsg = function(b, oob, addr) { + var _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, c, err, n, oob, oobn, sa, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; addr = $f.addr; b = $f.b; c = $f.c; err = $f.err; n = $f.n; oob = $f.oob; oobn = $f.oobn; sa = $f.sa; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + oobn = 0; + err = $ifaceNil; + c = this; + if ((c.conn.fd.sotype === 2) && c.conn.fd.isConnected) { + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = $pkg.ErrWriteToConnected; + n = _tmp; + oobn = _tmp$1; + err = _tmp$2; + $s = -1; return [n, oobn, err]; + } + sa = $ifaceNil; + if (!(addr === ptrType$11.nil)) { + if (!(addr.Net === sotypeToNet(c.conn.fd.sotype))) { + _tmp$3 = 0; + _tmp$4 = 0; + _tmp$5 = new syscall.Errno(47); + n = _tmp$3; + oobn = _tmp$4; + err = _tmp$5; + $s = -1; return [n, oobn, err]; + } + sa = new syscall.SockaddrUnix.ptr(addr.Name, new syscall.RawSockaddrUnix.ptr(0, 0, arrayType$7.zero())); + } + _r$9 = c.conn.fd.writeMsg(b, oob, sa); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + oobn = _tuple[1]; + err = _tuple[2]; + $s = -1; return [n, oobn, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnixConn.ptr.prototype.writeMsg }; } $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.addr = addr; $f.b = b; $f.c = c; $f.err = err; $f.n = n; $f.oob = oob; $f.oobn = oobn; $f.sa = sa; $f.$s = $s; $f.$r = $r; return $f; + }; + UnixConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; + sysDialer.ptr.prototype.dialUnix = function(ctx, laddr, raddr) { + var _r$9, _tuple, ctx, err, fd, laddr, raddr, sd, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; ctx = $f.ctx; err = $f.err; fd = $f.fd; laddr = $f.laddr; raddr = $f.raddr; sd = $f.sd; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sd = this; + _r$9 = unixSocket(ctx, sd.network, laddr, raddr, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + fd = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$41.nil, err]; + } + $s = -1; return [newUnixConn(fd), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sysDialer.ptr.prototype.dialUnix }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.ctx = ctx; $f.err = err; $f.fd = fd; $f.laddr = laddr; $f.raddr = raddr; $f.sd = sd; $f.$s = $s; $f.$r = $r; return $f; + }; + sysDialer.prototype.dialUnix = function(ctx, laddr, raddr) { return this.$val.dialUnix(ctx, laddr, raddr); }; + conn.ptr.prototype.writeBuffers = function(v) { + var _r$9, _tuple, c, err, n, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$9 = $f._r$9; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.ok()) { + $s = -1; return [new $Int64(0, 0), new syscall.Errno(22)]; + } + _r$9 = c.fd.writeBuffers(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, new OpError.ptr("writev", c.fd.net, c.fd.laddr, c.fd.raddr, err)]; + } + $s = -1; return [n, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.writeBuffers }; } $f._r$9 = _r$9; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.writeBuffers = function(v) { return this.$val.writeBuffers(v); }; + netFD.ptr.prototype.writeBuffers = function(v) { + var _ptr, _r$9, _tmp, _tmp$1, _tuple, err, fd, n, v, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ptr = $f._ptr; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; fd = $f.fd; n = $f.n; v = $f.v; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = new $Int64(0, 0); + err = $ifaceNil; + fd = this; + _r$9 = fd.pfd.Writev(((_ptr = v, new ptrType$43(function() { return (x = _ptr.$get(), $subslice(new sliceType$16(x.$array), x.$offset, x.$offset + x.$length)); }, function($v) { _ptr.$set($subslice(new Buffers($v.$array), $v.$offset, $v.$offset + $v.$length)); }, _ptr.$target)))); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple = _r$9; + n = _tuple[0]; + err = _tuple[1]; + runtime.KeepAlive(fd); + _tmp = n; + _tmp$1 = wrapSyscallError("writev", err); + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: netFD.ptr.prototype.writeBuffers }; } $f._ptr = _ptr; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.fd = fd; $f.n = n; $f.v = v; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + netFD.prototype.writeBuffers = function(v) { return this.$val.writeBuffers(v); }; + ptrType$44.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + policyTable.methods = [{prop: "Classify", name: "Classify", pkg: "", typ: $funcType([IP], [policyTableEntry], false)}]; + byMaskLength.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + ptrType$45.methods = [{prop: "canUseCgo", name: "canUseCgo", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "hostLookupOrder", name: "hostLookupOrder", pkg: "net", typ: $funcType([ptrType$6, $String], [hostLookupOrder], false)}]; + ptrType$46.methods = [{prop: "Dial", name: "Dial", pkg: "", typ: $funcType([$String, $String], [Conn, $error], false)}, {prop: "deadline", name: "deadline", pkg: "net", typ: $funcType([context.Context, time.Time], [time.Time], false)}, {prop: "resolver", name: "resolver", pkg: "net", typ: $funcType([], [ptrType$6], false)}, {prop: "fallbackDelay", name: "fallbackDelay", pkg: "net", typ: $funcType([], [time.Duration], false)}, {prop: "DialContext", name: "DialContext", pkg: "", typ: $funcType([context.Context, $String, $String], [Conn, $error], false)}]; + ptrType$47.methods = [{prop: "dialParallel", name: "dialParallel", pkg: "net", typ: $funcType([context.Context, addrList, addrList], [Conn, $error], false)}, {prop: "dialSerial", name: "dialSerial", pkg: "net", typ: $funcType([context.Context, addrList], [Conn, $error], false)}, {prop: "dialSingle", name: "dialSingle", pkg: "net", typ: $funcType([context.Context, Addr], [Conn, $error], false)}, {prop: "dialIP", name: "dialIP", pkg: "net", typ: $funcType([context.Context, ptrType$8, ptrType$8], [ptrType$30, $error], false)}, {prop: "dialTCP", name: "dialTCP", pkg: "net", typ: $funcType([context.Context, ptrType$7, ptrType$7], [ptrType$10, $error], false)}, {prop: "doDialTCP", name: "doDialTCP", pkg: "net", typ: $funcType([context.Context, ptrType$7, ptrType$7], [ptrType$10, $error], false)}, {prop: "dialUDP", name: "dialUDP", pkg: "net", typ: $funcType([context.Context, ptrType$5, ptrType$5], [ptrType$40, $error], false)}, {prop: "dialUnix", name: "dialUnix", pkg: "net", typ: $funcType([context.Context, ptrType$11, ptrType$11], [ptrType$41, $error], false)}]; + byPriorityWeight.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "shuffleByWeight", name: "shuffleByWeight", pkg: "net", typ: $funcType([], [], false)}, {prop: "sort", name: "sort", pkg: "net", typ: $funcType([], [], false)}]; + byPref.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "sort", name: "sort", pkg: "net", typ: $funcType([], [], false)}]; + ptrType$50.methods = [{prop: "init", name: "init", pkg: "net", typ: $funcType([], [], false)}, {prop: "tryUpdate", name: "tryUpdate", pkg: "net", typ: $funcType([$String], [], false)}, {prop: "tryAcquireSema", name: "tryAcquireSema", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "releaseSema", name: "releaseSema", pkg: "net", typ: $funcType([], [], false)}]; + hostLookupOrder.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "nameList", name: "nameList", pkg: "net", typ: $funcType([$String], [sliceType], false)}, {prop: "serverOffset", name: "serverOffset", pkg: "net", typ: $funcType([], [$Uint32], false)}]; + ptrType$16.methods = [{prop: "init", name: "init", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "setAddr", name: "setAddr", pkg: "net", typ: $funcType([Addr, Addr], [], false)}, {prop: "name", name: "name", pkg: "net", typ: $funcType([], [$String], false)}, {prop: "connect", name: "connect", pkg: "net", typ: $funcType([context.Context, syscall.Sockaddr, syscall.Sockaddr], [syscall.Sockaddr, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "shutdown", name: "shutdown", pkg: "net", typ: $funcType([$Int], [$error], false)}, {prop: "closeRead", name: "closeRead", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "closeWrite", name: "closeWrite", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, syscall.Sockaddr, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, syscall.Sockaddr, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, syscall.Sockaddr], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, syscall.Sockaddr], [$Int, $Int, $error], false)}, {prop: "accept", name: "accept", pkg: "net", typ: $funcType([], [ptrType$16, $error], false)}, {prop: "dup", name: "dup", pkg: "net", typ: $funcType([], [ptrType$17, $error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "ctrlNetwork", name: "ctrlNetwork", pkg: "net", typ: $funcType([], [$String], false)}, {prop: "addrFunc", name: "addrFunc", pkg: "net", typ: $funcType([], [funcType$3], false)}, {prop: "dial", name: "dial", pkg: "net", typ: $funcType([context.Context, sockaddr, sockaddr, funcType$2], [$error], false)}, {prop: "listenStream", name: "listenStream", pkg: "net", typ: $funcType([sockaddr, $Int, funcType$2], [$error], false)}, {prop: "listenDatagram", name: "listenDatagram", pkg: "net", typ: $funcType([sockaddr, funcType$2], [$error], false)}, {prop: "writeBuffers", name: "writeBuffers", pkg: "net", typ: $funcType([ptrType$3], [$Int64, $error], false)}]; + ptrType$22.methods = [{prop: "Addrs", name: "Addrs", pkg: "", typ: $funcType([], [sliceType$7, $error], false)}, {prop: "MulticastAddrs", name: "MulticastAddrs", pkg: "", typ: $funcType([], [sliceType$7, $error], false)}]; + Flags.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$51.methods = [{prop: "update", name: "update", pkg: "net", typ: $funcType([sliceType$8], [], false)}, {prop: "name", name: "name", pkg: "net", typ: $funcType([$Int], [$String], false)}, {prop: "index", name: "index", pkg: "net", typ: $funcType([$String], [$Int], false)}]; + IP.methods = [{prop: "IsUnspecified", name: "IsUnspecified", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLoopback", name: "IsLoopback", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMulticast", name: "IsMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsInterfaceLocalMulticast", name: "IsInterfaceLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalMulticast", name: "IsLinkLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalUnicast", name: "IsLinkLocalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsGlobalUnicast", name: "IsGlobalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "To4", name: "To4", pkg: "", typ: $funcType([], [IP], false)}, {prop: "To16", name: "To16", pkg: "", typ: $funcType([], [IP], false)}, {prop: "DefaultMask", name: "DefaultMask", pkg: "", typ: $funcType([], [IPMask], false)}, {prop: "Mask", name: "Mask", pkg: "", typ: $funcType([IPMask], [IP], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([IP], [$Bool], false)}, {prop: "matchAddrFamily", name: "matchAddrFamily", pkg: "net", typ: $funcType([IP], [$Bool], false)}]; + ptrType$52.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}]; + IPMask.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$4.methods = [{prop: "Contains", name: "Contains", pkg: "", typ: $funcType([IP], [$Bool], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$8.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]; + ptrType$30.methods = [{prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFromIP", name: "ReadFromIP", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$8, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadMsgIP", name: "ReadMsgIP", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$8, $error], false)}, {prop: "WriteToIP", name: "WriteToIP", pkg: "", typ: $funcType([sliceType$1, ptrType$8], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgIP", name: "WriteMsgIP", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$8], [$Int, $Int, $error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, ptrType$8, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$8, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$8], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$8], [$Int, $Int, $error], false)}]; + ptrType$53.methods = [{prop: "probe", name: "probe", pkg: "net", typ: $funcType([], [], false)}]; + addrList.methods = [{prop: "forResolve", name: "forResolve", pkg: "net", typ: $funcType([$String, $String], [Addr], false)}, {prop: "first", name: "first", pkg: "net", typ: $funcType([funcType$4], [Addr], false)}, {prop: "partition", name: "partition", pkg: "net", typ: $funcType([funcType$4], [addrList, addrList], false)}]; + ptrType$6.methods = [{prop: "resolveAddrList", name: "resolveAddrList", pkg: "net", typ: $funcType([context.Context, $String, $String, $String, Addr], [addrList, $error], false)}, {prop: "exchange", name: "exchange", pkg: "net", typ: $funcType([context.Context, $String, dnsmessage.Question, time.Duration], [dnsmessage.Parser, dnsmessage.Header, $error], false)}, {prop: "tryOneName", name: "tryOneName", pkg: "net", typ: $funcType([context.Context, ptrType$1, $String, dnsmessage.Type], [dnsmessage.Parser, $String, $error], false)}, {prop: "lookup", name: "lookup", pkg: "net", typ: $funcType([context.Context, $String, dnsmessage.Type], [dnsmessage.Parser, $String, $error], false)}, {prop: "goLookupHost", name: "goLookupHost", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "goLookupHostOrder", name: "goLookupHostOrder", pkg: "net", typ: $funcType([context.Context, $String, hostLookupOrder], [sliceType, $error], false)}, {prop: "goLookupIP", name: "goLookupIP", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$3, $error], false)}, {prop: "goLookupIPCNAMEOrder", name: "goLookupIPCNAMEOrder", pkg: "net", typ: $funcType([context.Context, $String, hostLookupOrder], [sliceType$3, dnsmessage.Name, $error], false)}, {prop: "goLookupCNAME", name: "goLookupCNAME", pkg: "net", typ: $funcType([context.Context, $String], [$String, $error], false)}, {prop: "goLookupPTR", name: "goLookupPTR", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "internetAddrList", name: "internetAddrList", pkg: "net", typ: $funcType([context.Context, $String, $String], [addrList, $error], false)}, {prop: "preferGo", name: "preferGo", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "strictErrors", name: "strictErrors", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "getLookupGroup", name: "getLookupGroup", pkg: "net", typ: $funcType([], [ptrType$54], false)}, {prop: "LookupHost", name: "LookupHost", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "LookupIPAddr", name: "LookupIPAddr", pkg: "", typ: $funcType([context.Context, $String], [sliceType$3, $error], false)}, {prop: "LookupPort", name: "LookupPort", pkg: "", typ: $funcType([context.Context, $String, $String], [$Int, $error], false)}, {prop: "LookupCNAME", name: "LookupCNAME", pkg: "", typ: $funcType([context.Context, $String], [$String, $error], false)}, {prop: "LookupSRV", name: "LookupSRV", pkg: "", typ: $funcType([context.Context, $String, $String, $String], [$String, sliceType$12, $error], false)}, {prop: "LookupMX", name: "LookupMX", pkg: "", typ: $funcType([context.Context, $String], [sliceType$13, $error], false)}, {prop: "LookupNS", name: "LookupNS", pkg: "", typ: $funcType([context.Context, $String], [sliceType$14, $error], false)}, {prop: "LookupTXT", name: "LookupTXT", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "LookupAddr", name: "LookupAddr", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "dial", name: "dial", pkg: "net", typ: $funcType([context.Context, $String, $String], [Conn, $error], false)}, {prop: "lookupHost", name: "lookupHost", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "lookupIP", name: "lookupIP", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$3, $error], false)}, {prop: "lookupPort", name: "lookupPort", pkg: "net", typ: $funcType([context.Context, $String, $String], [$Int, $error], false)}, {prop: "lookupCNAME", name: "lookupCNAME", pkg: "net", typ: $funcType([context.Context, $String], [$String, $error], false)}, {prop: "lookupSRV", name: "lookupSRV", pkg: "net", typ: $funcType([context.Context, $String, $String, $String], [$String, sliceType$12, $error], false)}, {prop: "lookupMX", name: "lookupMX", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$13, $error], false)}, {prop: "lookupNS", name: "lookupNS", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$14, $error], false)}, {prop: "lookupTXT", name: "lookupTXT", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "lookupAddr", name: "lookupAddr", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}]; + HardwareAddr.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$34.methods = [{prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadBuffer", name: "SetReadBuffer", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "SetWriteBuffer", name: "SetWriteBuffer", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([], [ptrType$17, $error], false)}, {prop: "writeBuffers", name: "writeBuffers", pkg: "net", typ: $funcType([ptrType$3], [$Int64, $error], false)}]; + ptrType$13.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$55.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$36.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + UnknownNetworkError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$12.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$3.methods = [{prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "consume", name: "consume", pkg: "net", typ: $funcType([$Int64], [], false)}]; + nssSource.methods = [{prop: "standardCriteria", name: "standardCriteria", pkg: "net", typ: $funcType([], [$Bool], false)}]; + nssCriterion.methods = [{prop: "standardStatusAction", name: "standardStatusAction", pkg: "net", typ: $funcType([$Bool], [$Bool], false)}]; + ptrType$21.methods = [{prop: "close", name: "close", pkg: "net", typ: $funcType([], [], false)}, {prop: "getLineFromData", name: "getLineFromData", pkg: "net", typ: $funcType([], [$String, $Bool], false)}, {prop: "readLine", name: "readLine", pkg: "net", typ: $funcType([], [$String, $Bool], false)}]; + ptrType$38.methods = [{prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "Control", name: "Control", pkg: "", typ: $funcType([funcType$6], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$7], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$7], [$error], false)}]; + ptrType$59.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$7], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$7], [$error], false)}]; + ptrType$7.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]; + ptrType$10.methods = [{prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "CloseRead", name: "CloseRead", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SetLinger", name: "SetLinger", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "SetKeepAlive", name: "SetKeepAlive", pkg: "", typ: $funcType([$Bool], [$error], false)}, {prop: "SetKeepAlivePeriod", name: "SetKeepAlivePeriod", pkg: "", typ: $funcType([time.Duration], [$error], false)}, {prop: "SetNoDelay", name: "SetNoDelay", pkg: "", typ: $funcType([$Bool], [$error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([io.Reader], [$Int64, $error], false)}]; + ptrType$39.methods = [{prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "AcceptTCP", name: "AcceptTCP", pkg: "", typ: $funcType([], [ptrType$10, $error], false)}, {prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [Conn, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([], [ptrType$17, $error], false)}, {prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "accept", name: "accept", pkg: "net", typ: $funcType([], [ptrType$10, $error], false)}, {prop: "close", name: "close", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "file", name: "file", pkg: "net", typ: $funcType([], [ptrType$17, $error], false)}]; + ptrType$5.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]; + ptrType$40.methods = [{prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFromUDP", name: "ReadFromUDP", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$5, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadMsgUDP", name: "ReadMsgUDP", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$5, $error], false)}, {prop: "WriteToUDP", name: "WriteToUDP", pkg: "", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgUDP", name: "WriteMsgUDP", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [$Int, $Int, $error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, ptrType$5, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$5, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [$Int, $Int, $error], false)}]; + ptrType$11.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]; + ptrType$41.methods = [{prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "CloseRead", name: "CloseRead", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadFromUnix", name: "ReadFromUnix", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$11, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadMsgUnix", name: "ReadMsgUnix", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$11, $error], false)}, {prop: "WriteToUnix", name: "WriteToUnix", pkg: "", typ: $funcType([sliceType$1, ptrType$11], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgUnix", name: "WriteMsgUnix", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$11], [$Int, $Int, $error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, ptrType$11, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$11, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$11], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$11], [$Int, $Int, $error], false)}]; + ipAttr.init("", [{prop: "Scope", name: "Scope", embedded: false, exported: true, typ: scope, tag: ""}, {prop: "Precedence", name: "Precedence", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Label", name: "Label", embedded: false, exported: true, typ: $Uint8, tag: ""}]); + byRFC6724.init("net", [{prop: "addrs", name: "addrs", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "addrAttr", name: "addrAttr", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "srcs", name: "srcs", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "srcAttr", name: "srcAttr", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); + policyTableEntry.init("", [{prop: "Prefix", name: "Prefix", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Precedence", name: "Precedence", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Label", name: "Label", embedded: false, exported: true, typ: $Uint8, tag: ""}]); + policyTable.init(policyTableEntry); + byMaskLength.init(policyTableEntry); + conf.init("net", [{prop: "forceCgoLookupHost", name: "forceCgoLookupHost", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "netGo", name: "netGo", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "netCgo", name: "netCgo", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "hasMDNSAllow", name: "hasMDNSAllow", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goos", name: "goos", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "dnsDebugLevel", name: "dnsDebugLevel", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "nss", name: "nss", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "resolv", name: "resolv", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); + Dialer.init("", [{prop: "Timeout", name: "Timeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "Deadline", name: "Deadline", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "LocalAddr", name: "LocalAddr", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "DualStack", name: "DualStack", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "FallbackDelay", name: "FallbackDelay", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "KeepAlive", name: "KeepAlive", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: ptrType$6, tag: ""}, {prop: "Cancel", name: "Cancel", embedded: false, exported: true, typ: chanType, tag: ""}, {prop: "Control", name: "Control", embedded: false, exported: true, typ: funcType$2, tag: ""}]); + sysDialer.init("net", [{prop: "Dialer", name: "Dialer", embedded: true, exported: true, typ: Dialer, tag: ""}, {prop: "network", name: "network", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "address", name: "address", embedded: false, exported: false, typ: $String, tag: ""}]); + SRV.init("", [{prop: "Target", name: "Target", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Weight", name: "Weight", embedded: false, exported: true, typ: $Uint16, tag: ""}]); + byPriorityWeight.init(ptrType$31); + MX.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Pref", name: "Pref", embedded: false, exported: true, typ: $Uint16, tag: ""}]); + byPref.init(ptrType$32); + NS.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); + resolverConfig.init("net", [{prop: "initOnce", name: "initOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "lastChecked", name: "lastChecked", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "dnsConfig", name: "dnsConfig", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); + dnsConfig.init("net", [{prop: "servers", name: "servers", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "search", name: "search", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "ndots", name: "ndots", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "attempts", name: "attempts", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "rotate", name: "rotate", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "unknownOpt", name: "unknownOpt", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "lookup", name: "lookup", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "mtime", name: "mtime", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "soffset", name: "soffset", embedded: false, exported: false, typ: $Uint32, tag: ""}]); + netFD.init("net", [{prop: "pfd", name: "pfd", embedded: false, exported: false, typ: poll.FD, tag: ""}, {prop: "family", name: "family", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "sotype", name: "sotype", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isConnected", name: "isConnected", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "net", name: "net", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "laddr", name: "laddr", embedded: false, exported: false, typ: Addr, tag: ""}, {prop: "raddr", name: "raddr", embedded: false, exported: false, typ: Addr, tag: ""}]); + Interface.init("", [{prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MTU", name: "MTU", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "HardwareAddr", name: "HardwareAddr", embedded: false, exported: true, typ: HardwareAddr, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: Flags, tag: ""}]); + ipv6ZoneCache.init("net", [{prop: "RWMutex", name: "RWMutex", embedded: true, exported: true, typ: sync.RWMutex, tag: ""}, {prop: "lastFetched", name: "lastFetched", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "toIndex", name: "toIndex", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "toName", name: "toName", embedded: false, exported: false, typ: mapType$2, tag: ""}]); + IP.init($Uint8); + IPMask.init($Uint8); + IPNet.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Mask", name: "Mask", embedded: false, exported: true, typ: IPMask, tag: ""}]); + IPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); + IPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); + ipStackCapabilities.init("net", [{prop: "Once", name: "Once", embedded: true, exported: true, typ: sync.Once, tag: ""}, {prop: "ipv4Enabled", name: "ipv4Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ipv6Enabled", name: "ipv6Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ipv4MappedIPv6Enabled", name: "ipv4MappedIPv6Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}]); + addrList.init(Addr); + Resolver.init("net", [{prop: "PreferGo", name: "PreferGo", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "StrictErrors", name: "StrictErrors", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Dial", name: "Dial", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "lookupGroup", name: "lookupGroup", embedded: false, exported: false, typ: singleflight.Group, tag: ""}]); + HardwareAddr.init($Uint8); + Addr.init([{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + Conn.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); + conn.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$16, tag: ""}]); + PacketConn.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}]); + Listener.init([{prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [Conn, $error], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]); + Error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); + OpError.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Net", name: "Net", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Source", name: "Source", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + timeout.init([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); + temporary.init([{prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]); + ParseError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Text", name: "Text", embedded: false, exported: true, typ: $String, tag: ""}]); + AddrError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: $String, tag: ""}]); + DNSError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Server", name: "Server", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "IsTimeout", name: "IsTimeout", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsTemporary", name: "IsTemporary", embedded: false, exported: true, typ: $Bool, tag: ""}]); + writerOnly.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); + buffersWriter.init([{prop: "writeBuffers", name: "writeBuffers", pkg: "net", typ: $funcType([ptrType$3], [$Int64, $error], false)}]); + Buffers.init(sliceType$1); + nssConf.init("net", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "sources", name: "sources", embedded: false, exported: false, typ: mapType$3, tag: ""}]); + nssSource.init("net", [{prop: "source", name: "source", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "criteria", name: "criteria", embedded: false, exported: false, typ: sliceType$15, tag: ""}]); + nssCriterion.init("net", [{prop: "negate", name: "negate", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "action", name: "action", embedded: false, exported: false, typ: $String, tag: ""}]); + file.init("net", [{prop: "file", name: "file", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "atEOF", name: "atEOF", embedded: false, exported: false, typ: $Bool, tag: ""}]); + rawConn.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$16, tag: ""}]); + rawListener.init("net", [{prop: "rawConn", name: "rawConn", embedded: true, exported: false, typ: rawConn, tag: ""}]); + sockaddr.init([{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]); + TCPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); + TCPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); + TCPListener.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$16, tag: ""}]); + UDPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); + UDPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); + UnixAddr.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Net", name: "Net", embedded: false, exported: true, typ: $String, tag: ""}]); + UnixConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); + dialResult.init("net", [{prop: "Conn", name: "Conn", embedded: true, exported: true, typ: Conn, tag: ""}, {prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}, {prop: "primary", name: "primary", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); + racer.init("net", [{prop: "p", name: "p", embedded: false, exported: false, typ: dnsmessage.Parser, tag: ""}, {prop: "server", name: "server", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = context.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = js.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nettrace.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = poll.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = singleflight.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = atomic.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = syscall.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = dnsmessage.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = route.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + confOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + resolvConf = new resolverConfig.ptr(new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), $chanNil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), ptrType$1.nil); + testHookDialTCP = $throwNilPointerError; + hosts = new structType.ptr(new sync.Mutex.ptr(0, 0), false, false, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), "", new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new $Int64(0, 0)); + ipStackCaps = new ipStackCapabilities.ptr(new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), false, false, false); + dnsWaitGroup = new sync.WaitGroup.ptr(0, $chanNil, arrayType.zero()); + onceReadProtocols = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + netGo = false; + netCgo = false; + onceReadServices = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + confVal = new conf.ptr(false, false, false, false, "darwin", 0, ptrType$2.nil, ptrType$1.nil); + lookupOrderName = $makeMap(hostLookupOrder.keyFor, [{ k: 0, v: "cgo" }, { k: 1, v: "files,dns" }, { k: 2, v: "dns,files" }, { k: 3, v: "files" }, { k: 4, v: "dns" }]); + defaultNS = new sliceType(["127.0.0.1:53", "[::1]:53"]); + getHostname = os.Hostname; + testHookHostsPath = "/etc/hosts"; + testHookLookupIP = (function $b(ctx, fn, host) { + var _r, ctx, fn, host, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; ctx = $f.ctx; fn = $f.fn; host = $f.host; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = fn(ctx, host); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.ctx = ctx; $f.fn = fn; $f.host = host; $f.$s = $s; $f.$r = $r; return $f; + }); + testHookSetKeepAlive = (function() { + }); + testHookCanceledDial = (function() { + }); + socketFunc = syscall.Socket; + connectFunc = syscall.Connect; + listenFunc = syscall.Listen; + getsockoptIntFunc = syscall.GetsockoptInt; + errInvalidInterface = errors.New("invalid network interface"); + errInvalidInterfaceIndex = errors.New("invalid network interface index"); + errInvalidInterfaceName = errors.New("invalid network interface name"); + errNoSuchInterface = errors.New("no such network interface"); + errNoSuchMulticastInterface = errors.New("no such multicast network interface"); + flagNames = new sliceType(["up", "broadcast", "loopback", "pointtopoint", "multicast"]); + zoneCache = new ipv6ZoneCache.ptr(new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), {}, {}); + v4InV6Prefix = new sliceType$1([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255]); + $pkg.IPv4bcast = IPv4(255, 255, 255, 255); + $pkg.IPv4allsys = IPv4(224, 0, 0, 1); + $pkg.IPv4allrouter = IPv4(224, 0, 0, 2); + $pkg.IPv4zero = IPv4(0, 0, 0, 0); + $pkg.IPv6zero = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + $pkg.IPv6unspecified = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + $pkg.IPv6loopback = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); + classAMask = IPv4Mask(255, 0, 0, 0); + classBMask = IPv4Mask(255, 255, 0, 0); + classCMask = IPv4Mask(255, 255, 255, 0); + protocols = $makeMap($String.keyFor, [{ k: "icmp", v: 1 }, { k: "igmp", v: 2 }, { k: "tcp", v: 6 }, { k: "udp", v: 17 }, { k: "ipv6-icmp", v: 58 }]); + services = $makeMap($String.keyFor, [{ k: "udp", v: $makeMap($String.keyFor, [{ k: "domain", v: 53 }]) }, { k: "tcp", v: $makeMap($String.keyFor, [{ k: "ftp", v: 21 }, { k: "ftps", v: 990 }, { k: "gopher", v: 70 }, { k: "http", v: 80 }, { k: "https", v: 443 }, { k: "imap2", v: 143 }, { k: "imap3", v: 220 }, { k: "imaps", v: 993 }, { k: "pop3", v: 110 }, { k: "pop3s", v: 995 }, { k: "smtp", v: 25 }, { k: "ssh", v: 22 }, { k: "telnet", v: 23 }]) }]); + $pkg.DefaultResolver = new Resolver.ptr(false, false, $throwNilPointerError, new singleflight.Group.ptr(new sync.Mutex.ptr(0, 0), false)); + listenerBacklog = maxListenerBacklog(); + errNoSuitableAddress = errors.New("no suitable address found"); + errMissingAddress = errors.New("missing address"); + errCanceled = errors.New("operation was canceled"); + $pkg.ErrWriteToConnected = errors.New("use of WriteTo with pre-connected connection"); + aLongTimeAgo = $clone(time.Unix(new $Int64(0, 1), new $Int64(0, 0)), time.Time); + noDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); + errNoSuchHost = errors.New("no such host"); + _r = mustCIDR("::1/128"); /* */ $s = 18; case 18: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = mustCIDR("::/0"); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = mustCIDR("::ffff:0:0/96"); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = mustCIDR("2002::/16"); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = mustCIDR("2001::/32"); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = mustCIDR("fc00::/7"); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = mustCIDR("::/96"); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = mustCIDR("fec0::/10"); /* */ $s = 25; case 25: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = mustCIDR("3ffe::/16"); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + rfc6724policyTable = new policyTable([new policyTableEntry.ptr(_r, 50, 0), new policyTableEntry.ptr(_r$1, 40, 1), new policyTableEntry.ptr(_r$2, 35, 4), new policyTableEntry.ptr(_r$3, 30, 2), new policyTableEntry.ptr(_r$4, 5, 5), new policyTableEntry.ptr(_r$5, 3, 13), new policyTableEntry.ptr(_r$6, 1, 3), new policyTableEntry.ptr(_r$7, 1, 11), new policyTableEntry.ptr(_r$8, 1, 12)]); + $r = init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + init$1(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net/url"] = (function() { + var $pkg = {}, $init, errors, fmt, sort, strconv, strings, Error, timeout, temporary, EscapeError, InvalidHostError, URL, Userinfo, Values, sliceType, ptrType, ptrType$1, sliceType$1, ptrType$2, sliceType$2, ptrType$3, ishex, unhex, shouldEscape, QueryUnescape, unescape, QueryEscape, escape, User, UserPassword, getscheme, split, Parse, ParseRequestURI, parse, parseAuthority, parseHost, validEncodedPath, validOptionalPort, ParseQuery, parseQuery, resolvePath, stripPort, portOnly, validUserinfo; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + Error = $pkg.Error = $newType(0, $kindStruct, "url.Error", true, "net/url", true, function(Op_, URL_, Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Op = ""; + this.URL = ""; + this.Err = $ifaceNil; + return; + } + this.Op = Op_; + this.URL = URL_; + this.Err = Err_; + }); + timeout = $pkg.timeout = $newType(8, $kindInterface, "url.timeout", true, "net/url", false, null); + temporary = $pkg.temporary = $newType(8, $kindInterface, "url.temporary", true, "net/url", false, null); + EscapeError = $pkg.EscapeError = $newType(8, $kindString, "url.EscapeError", true, "net/url", true, null); + InvalidHostError = $pkg.InvalidHostError = $newType(8, $kindString, "url.InvalidHostError", true, "net/url", true, null); + URL = $pkg.URL = $newType(0, $kindStruct, "url.URL", true, "net/url", true, function(Scheme_, Opaque_, User_, Host_, Path_, RawPath_, ForceQuery_, RawQuery_, Fragment_) { + this.$val = this; + if (arguments.length === 0) { + this.Scheme = ""; + this.Opaque = ""; + this.User = ptrType.nil; + this.Host = ""; + this.Path = ""; + this.RawPath = ""; + this.ForceQuery = false; + this.RawQuery = ""; + this.Fragment = ""; + return; + } + this.Scheme = Scheme_; + this.Opaque = Opaque_; + this.User = User_; + this.Host = Host_; + this.Path = Path_; + this.RawPath = RawPath_; + this.ForceQuery = ForceQuery_; + this.RawQuery = RawQuery_; + this.Fragment = Fragment_; + }); + Userinfo = $pkg.Userinfo = $newType(0, $kindStruct, "url.Userinfo", true, "net/url", true, function(username_, password_, passwordSet_) { + this.$val = this; + if (arguments.length === 0) { + this.username = ""; + this.password = ""; + this.passwordSet = false; + return; + } + this.username = username_; + this.password = password_; + this.passwordSet = passwordSet_; + }); + Values = $pkg.Values = $newType(4, $kindMap, "url.Values", true, "net/url", true, null); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(Userinfo); + ptrType$1 = $ptrType(URL); + sliceType$1 = $sliceType($emptyInterface); + ptrType$2 = $ptrType(strings.Builder); + sliceType$2 = $sliceType($String); + ptrType$3 = $ptrType(Error); + Error.ptr.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return e.Op + " " + e.URL + ": " + _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Error.ptr.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Timeout = function() { + var _r, _tuple, _v, e, ok, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _v = $f._v; e = $f.e; ok = $f.ok; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _tuple = $assertType(e.Err, timeout, true); + t = _tuple[0]; + ok = _tuple[1]; + if (!(ok)) { _v = false; $s = 1; continue s; } + _r = t.Timeout(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _v = _r; case 1: + $s = -1; return _v; + /* */ } return; } if ($f === undefined) { $f = { $blk: Error.ptr.prototype.Timeout }; } $f._r = _r; $f._tuple = _tuple; $f._v = _v; $f.e = e; $f.ok = ok; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Error.prototype.Timeout = function() { return this.$val.Timeout(); }; + Error.ptr.prototype.Temporary = function() { + var _r, _tuple, _v, e, ok, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _v = $f._v; e = $f.e; ok = $f.ok; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _tuple = $assertType(e.Err, temporary, true); + t = _tuple[0]; + ok = _tuple[1]; + if (!(ok)) { _v = false; $s = 1; continue s; } + _r = t.Temporary(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _v = _r; case 1: + $s = -1; return _v; + /* */ } return; } if ($f === undefined) { $f = { $blk: Error.ptr.prototype.Temporary }; } $f._r = _r; $f._tuple = _tuple; $f._v = _v; $f.e = e; $f.ok = ok; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Error.prototype.Temporary = function() { return this.$val.Temporary(); }; + ishex = function(c) { + var c; + if (48 <= c && c <= 57) { + return true; + } else if (97 <= c && c <= 102) { + return true; + } else if (65 <= c && c <= 70) { + return true; + } + return false; + }; + unhex = function(c) { + var c; + if (48 <= c && c <= 57) { + return c - 48 << 24 >>> 24; + } else if (97 <= c && c <= 102) { + return (c - 97 << 24 >>> 24) + 10 << 24 >>> 24; + } else if (65 <= c && c <= 70) { + return (c - 65 << 24 >>> 24) + 10 << 24 >>> 24; + } + return 0; + }; + EscapeError.prototype.Error = function() { + var e; + e = this.$val; + return "invalid URL escape " + strconv.Quote((e)); + }; + $ptrType(EscapeError).prototype.Error = function() { return new EscapeError(this.$get()).Error(); }; + InvalidHostError.prototype.Error = function() { + var e; + e = this.$val; + return "invalid character " + strconv.Quote((e)) + " in host name"; + }; + $ptrType(InvalidHostError).prototype.Error = function() { return new InvalidHostError(this.$get()).Error(); }; + shouldEscape = function(c, mode) { + var _1, _2, _3, _4, c, mode; + if (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57) { + return false; + } + if ((mode === 3) || (mode === 4)) { + _1 = c; + if ((_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (58)) || (_1 === (91)) || (_1 === (93)) || (_1 === (60)) || (_1 === (62)) || (_1 === (34))) { + return false; + } + } + _2 = c; + if ((_2 === (45)) || (_2 === (95)) || (_2 === (46)) || (_2 === (126))) { + return false; + } else if ((_2 === (36)) || (_2 === (38)) || (_2 === (43)) || (_2 === (44)) || (_2 === (47)) || (_2 === (58)) || (_2 === (59)) || (_2 === (61)) || (_2 === (63)) || (_2 === (64))) { + _3 = mode; + if (_3 === (1)) { + return c === 63; + } else if (_3 === (2)) { + return (c === 47) || (c === 59) || (c === 44) || (c === 63); + } else if (_3 === (5)) { + return (c === 64) || (c === 47) || (c === 63) || (c === 58); + } else if (_3 === (6)) { + return true; + } else if (_3 === (7)) { + return false; + } + } + if (mode === 7) { + _4 = c; + if ((_4 === (33)) || (_4 === (40)) || (_4 === (41)) || (_4 === (42))) { + return false; + } + } + return true; + }; + QueryUnescape = function(s) { + var s; + return unescape(s, 6); + }; + $pkg.QueryUnescape = QueryUnescape; + unescape = function(s, mode) { + var _1, _2, hasPlus, i, i$1, j, mode, n, s, t, v; + n = 0; + hasPlus = false; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _1 = s.charCodeAt(i); + if (_1 === (37)) { + n = n + (1) >> 0; + if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { + s = $substring(s, i); + if (s.length > 3) { + s = $substring(s, 0, 3); + } + return ["", new EscapeError((s))]; + } + if ((mode === 3) && unhex(s.charCodeAt((i + 1 >> 0))) < 8 && !($substring(s, i, (i + 3 >> 0)) === "%25")) { + return ["", new EscapeError(($substring(s, i, (i + 3 >> 0))))]; + } + if (mode === 4) { + v = ((unhex(s.charCodeAt((i + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i + 2 >> 0)))) >>> 0; + if (!($substring(s, i, (i + 3 >> 0)) === "%25") && !((v === 32)) && shouldEscape(v, 3)) { + return ["", new EscapeError(($substring(s, i, (i + 3 >> 0))))]; + } + } + i = i + (3) >> 0; + } else if (_1 === (43)) { + hasPlus = mode === 6; + i = i + (1) >> 0; + } else { + if (((mode === 3) || (mode === 4)) && s.charCodeAt(i) < 128 && shouldEscape(s.charCodeAt(i), mode)) { + return ["", new InvalidHostError(($substring(s, i, (i + 1 >> 0))))]; + } + i = i + (1) >> 0; + } + } + if ((n === 0) && !hasPlus) { + return [s, $ifaceNil]; + } + t = $makeSlice(sliceType, (s.length - ($imul(2, n)) >> 0)); + j = 0; + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + _2 = s.charCodeAt(i$1); + if (_2 === (37)) { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = (((unhex(s.charCodeAt((i$1 + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i$1 + 2 >> 0)))) >>> 0)); + j = j + (1) >> 0; + i$1 = i$1 + (3) >> 0; + } else if (_2 === (43)) { + if (mode === 6) { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 32); + } else { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 43); + } + j = j + (1) >> 0; + i$1 = i$1 + (1) >> 0; + } else { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = s.charCodeAt(i$1)); + j = j + (1) >> 0; + i$1 = i$1 + (1) >> 0; + } + } + return [($bytesToString(t)), $ifaceNil]; + }; + QueryEscape = function(s) { + var s; + return escape(s, 6); + }; + $pkg.QueryEscape = QueryEscape; + escape = function(s, mode) { + var _tmp, _tmp$1, c, c$1, hexCount, i, i$1, j, mode, s, spaceCount, t, x, x$1; + _tmp = 0; + _tmp$1 = 0; + spaceCount = _tmp; + hexCount = _tmp$1; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (shouldEscape(c, mode)) { + if ((c === 32) && (mode === 6)) { + spaceCount = spaceCount + (1) >> 0; + } else { + hexCount = hexCount + (1) >> 0; + } + } + i = i + (1) >> 0; + } + if ((spaceCount === 0) && (hexCount === 0)) { + return s; + } + t = $makeSlice(sliceType, (s.length + ($imul(2, hexCount)) >> 0)); + j = 0; + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + c$1 = s.charCodeAt(i$1); + if ((c$1 === 32) && (mode === 6)) { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 43); + j = j + (1) >> 0; + } else if (shouldEscape(c$1, mode)) { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 37); + (x = j + 1 >> 0, ((x < 0 || x >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x] = "0123456789ABCDEF".charCodeAt((c$1 >>> 4 << 24 >>> 24)))); + (x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$1] = "0123456789ABCDEF".charCodeAt(((c$1 & 15) >>> 0)))); + j = j + (3) >> 0; + } else { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = s.charCodeAt(i$1)); + j = j + (1) >> 0; + } + i$1 = i$1 + (1) >> 0; + } + return ($bytesToString(t)); + }; + User = function(username) { + var username; + return new Userinfo.ptr(username, "", false); + }; + $pkg.User = User; + UserPassword = function(username, password) { + var password, username; + return new Userinfo.ptr(username, password, true); + }; + $pkg.UserPassword = UserPassword; + Userinfo.ptr.prototype.Username = function() { + var u; + u = this; + if (u === ptrType.nil) { + return ""; + } + return u.username; + }; + Userinfo.prototype.Username = function() { return this.$val.Username(); }; + Userinfo.ptr.prototype.Password = function() { + var u; + u = this; + if (u === ptrType.nil) { + return ["", false]; + } + return [u.password, u.passwordSet]; + }; + Userinfo.prototype.Password = function() { return this.$val.Password(); }; + Userinfo.ptr.prototype.String = function() { + var s, u; + u = this; + if (u === ptrType.nil) { + return ""; + } + s = escape(u.username, 5); + if (u.passwordSet) { + s = s + (":" + escape(u.password, 5)); + } + return s; + }; + Userinfo.prototype.String = function() { return this.$val.String(); }; + getscheme = function(rawurl) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, err, i, path, rawurl, scheme; + scheme = ""; + path = ""; + err = $ifaceNil; + i = 0; + while (true) { + if (!(i < rawurl.length)) { break; } + c = rawurl.charCodeAt(i); + if (97 <= c && c <= 122 || 65 <= c && c <= 90) { + } else if (48 <= c && c <= 57 || (c === 43) || (c === 45) || (c === 46)) { + if (i === 0) { + _tmp = ""; + _tmp$1 = rawurl; + _tmp$2 = $ifaceNil; + scheme = _tmp; + path = _tmp$1; + err = _tmp$2; + return [scheme, path, err]; + } + } else if ((c === 58)) { + if (i === 0) { + _tmp$3 = ""; + _tmp$4 = ""; + _tmp$5 = errors.New("missing protocol scheme"); + scheme = _tmp$3; + path = _tmp$4; + err = _tmp$5; + return [scheme, path, err]; + } + _tmp$6 = $substring(rawurl, 0, i); + _tmp$7 = $substring(rawurl, (i + 1 >> 0)); + _tmp$8 = $ifaceNil; + scheme = _tmp$6; + path = _tmp$7; + err = _tmp$8; + return [scheme, path, err]; + } else { + _tmp$9 = ""; + _tmp$10 = rawurl; + _tmp$11 = $ifaceNil; + scheme = _tmp$9; + path = _tmp$10; + err = _tmp$11; + return [scheme, path, err]; + } + i = i + (1) >> 0; + } + _tmp$12 = ""; + _tmp$13 = rawurl; + _tmp$14 = $ifaceNil; + scheme = _tmp$12; + path = _tmp$13; + err = _tmp$14; + return [scheme, path, err]; + }; + split = function(s, c, cutc) { + var c, cutc, i, s; + i = strings.Index(s, c); + if (i < 0) { + return [s, ""]; + } + if (cutc) { + return [$substring(s, 0, i), $substring(s, (i + c.length >> 0))]; + } + return [$substring(s, 0, i), $substring(s, i)]; + }; + Parse = function(rawurl) { + var _r, _tuple, _tuple$1, _tuple$2, err, frag, rawurl, u, url, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; frag = $f.frag; rawurl = $f.rawurl; u = $f.u; url = $f.url; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = split(rawurl, "#", true); + u = _tuple[0]; + frag = _tuple[1]; + _r = parse(u, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + url = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, new Error.ptr("parse", u, err)]; + } + if (frag === "") { + $s = -1; return [url, $ifaceNil]; + } + _tuple$2 = unescape(frag, 7); + url.Fragment = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, new Error.ptr("parse", rawurl, err)]; + } + $s = -1; return [url, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Parse }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.frag = frag; $f.rawurl = rawurl; $f.u = u; $f.url = url; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Parse = Parse; + ParseRequestURI = function(rawurl) { + var _r, _tuple, err, rawurl, url, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; rawurl = $f.rawurl; url = $f.url; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = parse(rawurl, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + url = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, new Error.ptr("parse", rawurl, err)]; + } + $s = -1; return [url, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParseRequestURI }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.rawurl = rawurl; $f.url = url; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParseRequestURI = ParseRequestURI; + parse = function(rawurl, viaRequest) { + var _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, authority, colon, err, err$1, rawurl, rest, slash, url, viaRequest, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; authority = $f.authority; colon = $f.colon; err = $f.err; err$1 = $f.err$1; rawurl = $f.rawurl; rest = $f.rest; slash = $f.slash; url = $f.url; viaRequest = $f.viaRequest; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rest = ""; + err = $ifaceNil; + if (rawurl === "" && viaRequest) { + $s = -1; return [ptrType$1.nil, errors.New("empty url")]; + } + url = new URL.ptr("", "", ptrType.nil, "", "", "", false, "", ""); + if (rawurl === "*") { + url.Path = "*"; + $s = -1; return [url, $ifaceNil]; + } + _tuple = getscheme(rawurl); + url.Scheme = _tuple[0]; + rest = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + _r = strings.ToLower(url.Scheme); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + url.Scheme = _r; + if (strings.HasSuffix(rest, "?") && (strings.Count(rest, "?") === 1)) { + url.ForceQuery = true; + rest = $substring(rest, 0, (rest.length - 1 >> 0)); + } else { + _tuple$1 = split(rest, "?", true); + rest = _tuple$1[0]; + url.RawQuery = _tuple$1[1]; + } + if (!strings.HasPrefix(rest, "/")) { + if (!(url.Scheme === "")) { + url.Opaque = rest; + $s = -1; return [url, $ifaceNil]; + } + if (viaRequest) { + $s = -1; return [ptrType$1.nil, errors.New("invalid URI for request")]; + } + colon = strings.Index(rest, ":"); + slash = strings.Index(rest, "/"); + if (colon >= 0 && (slash < 0 || colon < slash)) { + $s = -1; return [ptrType$1.nil, errors.New("first path segment in URL cannot contain colon")]; + } + } + /* */ if ((!(url.Scheme === "") || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//")) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ((!(url.Scheme === "") || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//")) { */ case 2: + authority = ""; + _tuple$2 = split($substring(rest, 2), "/", false); + authority = _tuple$2[0]; + rest = _tuple$2[1]; + _r$1 = parseAuthority(authority); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$3 = _r$1; + url.User = _tuple$3[0]; + url.Host = _tuple$3[1]; + err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + /* } */ case 3: + err$1 = url.setPath(rest); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$1]; + } + $s = -1; return [url, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parse }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.authority = authority; $f.colon = colon; $f.err = err; $f.err$1 = err$1; $f.rawurl = rawurl; $f.rest = rest; $f.slash = slash; $f.url = url; $f.viaRequest = viaRequest; $f.$s = $s; $f.$r = $r; return $f; + }; + parseAuthority = function(authority) { + var _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, authority, err, host, i, password, user, userinfo, username, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; authority = $f.authority; err = $f.err; host = $f.host; i = $f.i; password = $f.password; user = $f.user; userinfo = $f.userinfo; username = $f.username; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + user = ptrType.nil; + host = ""; + err = $ifaceNil; + i = strings.LastIndex(authority, "@"); + /* */ if (i < 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (i < 0) { */ case 1: + _r = parseHost(authority); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + host = _tuple[0]; + err = _tuple[1]; + $s = 3; continue; + /* } else { */ case 2: + _r$1 = parseHost($substring(authority, (i + 1 >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + host = _tuple$1[0]; + err = _tuple$1[1]; + /* } */ case 3: + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType.nil; + _tmp$1 = ""; + _tmp$2 = err; + user = _tmp; + host = _tmp$1; + err = _tmp$2; + $s = -1; return [user, host, err]; + } + if (i < 0) { + _tmp$3 = ptrType.nil; + _tmp$4 = host; + _tmp$5 = $ifaceNil; + user = _tmp$3; + host = _tmp$4; + err = _tmp$5; + $s = -1; return [user, host, err]; + } + userinfo = $substring(authority, 0, i); + if (!validUserinfo(userinfo)) { + _tmp$6 = ptrType.nil; + _tmp$7 = ""; + _tmp$8 = errors.New("net/url: invalid userinfo"); + user = _tmp$6; + host = _tmp$7; + err = _tmp$8; + $s = -1; return [user, host, err]; + } + if (!strings.Contains(userinfo, ":")) { + _tuple$2 = unescape(userinfo, 5); + userinfo = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$9 = ptrType.nil; + _tmp$10 = ""; + _tmp$11 = err; + user = _tmp$9; + host = _tmp$10; + err = _tmp$11; + $s = -1; return [user, host, err]; + } + user = User(userinfo); + } else { + _tuple$3 = split(userinfo, ":", true); + username = _tuple$3[0]; + password = _tuple$3[1]; + _tuple$4 = unescape(username, 5); + username = _tuple$4[0]; + err = _tuple$4[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$12 = ptrType.nil; + _tmp$13 = ""; + _tmp$14 = err; + user = _tmp$12; + host = _tmp$13; + err = _tmp$14; + $s = -1; return [user, host, err]; + } + _tuple$5 = unescape(password, 5); + password = _tuple$5[0]; + err = _tuple$5[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$15 = ptrType.nil; + _tmp$16 = ""; + _tmp$17 = err; + user = _tmp$15; + host = _tmp$16; + err = _tmp$17; + $s = -1; return [user, host, err]; + } + user = UserPassword(username, password); + } + _tmp$18 = user; + _tmp$19 = host; + _tmp$20 = $ifaceNil; + user = _tmp$18; + host = _tmp$19; + err = _tmp$20; + $s = -1; return [user, host, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseAuthority }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.authority = authority; $f.err = err; $f.host = host; $f.i = i; $f.password = password; $f.user = user; $f.userinfo = userinfo; $f.username = username; $f.$s = $s; $f.$r = $r; return $f; + }; + parseHost = function(host) { + var _r, _tuple, _tuple$1, _tuple$2, _tuple$3, colonPort, err, err$1, host, host1, host2, host3, i, zone, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; colonPort = $f.colonPort; err = $f.err; err$1 = $f.err$1; host = $f.host; host1 = $f.host1; host2 = $f.host2; host3 = $f.host3; i = $f.i; zone = $f.zone; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (strings.HasPrefix(host, "[")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (strings.HasPrefix(host, "[")) { */ case 1: + i = strings.LastIndex(host, "]"); + if (i < 0) { + $s = -1; return ["", errors.New("missing ']' in host")]; + } + colonPort = $substring(host, (i + 1 >> 0)); + /* */ if (!validOptionalPort(colonPort)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!validOptionalPort(colonPort)) { */ case 3: + _r = fmt.Errorf("invalid port %q after host", new sliceType$1([new $String(colonPort)])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return ["", _r]; + /* } */ case 4: + zone = strings.Index($substring(host, 0, i), "%25"); + if (zone >= 0) { + _tuple = unescape($substring(host, 0, zone), 3); + host1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", err]; + } + _tuple$1 = unescape($substring(host, zone, i), 4); + host2 = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", err]; + } + _tuple$2 = unescape($substring(host, i), 3); + host3 = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", err]; + } + $s = -1; return [host1 + host2 + host3, $ifaceNil]; + } + /* } */ case 2: + err$1 = $ifaceNil; + _tuple$3 = unescape(host, 3); + host = _tuple$3[0]; + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return ["", err$1]; + } + $s = -1; return [host, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseHost }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.colonPort = colonPort; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.host1 = host1; $f.host2 = host2; $f.host3 = host3; $f.i = i; $f.zone = zone; $f.$s = $s; $f.$r = $r; return $f; + }; + URL.ptr.prototype.setPath = function(p) { + var _tuple, err, escp, p, path, u; + u = this; + _tuple = unescape(p, 1); + path = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + u.Path = path; + escp = escape(path, 1); + if (p === escp) { + u.RawPath = ""; + } else { + u.RawPath = p; + } + return $ifaceNil; + }; + URL.prototype.setPath = function(p) { return this.$val.setPath(p); }; + URL.ptr.prototype.EscapedPath = function() { + var _tuple, err, p, u; + u = this; + if (!(u.RawPath === "") && validEncodedPath(u.RawPath)) { + _tuple = unescape(u.RawPath, 1); + p = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil) && p === u.Path) { + return u.RawPath; + } + } + if (u.Path === "*") { + return "*"; + } + return escape(u.Path, 1); + }; + URL.prototype.EscapedPath = function() { return this.$val.EscapedPath(); }; + validEncodedPath = function(s) { + var _1, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _1 = s.charCodeAt(i); + if ((_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (58)) || (_1 === (64))) { + } else if ((_1 === (91)) || (_1 === (93))) { + } else if (_1 === (37)) { + } else if (shouldEscape(s.charCodeAt(i), 1)) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + validOptionalPort = function(port) { + var _i, _ref, _rune, b, port; + if (port === "") { + return true; + } + if (!((port.charCodeAt(0) === 58))) { + return false; + } + _ref = $substring(port, 1); + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + b = _rune[0]; + if (b < 48 || b > 57) { + return false; + } + _i += _rune[1]; + } + return true; + }; + URL.ptr.prototype.String = function() { + var buf, h, i, path, u, ui; + u = this; + buf = new strings.Builder.ptr(ptrType$2.nil, sliceType.nil); + if (!(u.Scheme === "")) { + buf.WriteString(u.Scheme); + buf.WriteByte(58); + } + if (!(u.Opaque === "")) { + buf.WriteString(u.Opaque); + } else { + if (!(u.Scheme === "") || !(u.Host === "") || !(u.User === ptrType.nil)) { + if (!(u.Host === "") || !(u.Path === "") || !(u.User === ptrType.nil)) { + buf.WriteString("//"); + } + ui = u.User; + if (!(ui === ptrType.nil)) { + buf.WriteString(ui.String()); + buf.WriteByte(64); + } + h = u.Host; + if (!(h === "")) { + buf.WriteString(escape(h, 3)); + } + } + path = u.EscapedPath(); + if (!(path === "") && !((path.charCodeAt(0) === 47)) && !(u.Host === "")) { + buf.WriteByte(47); + } + if (buf.Len() === 0) { + i = strings.IndexByte(path, 58); + if (i > -1 && (strings.IndexByte($substring(path, 0, i), 47) === -1)) { + buf.WriteString("./"); + } + } + buf.WriteString(path); + } + if (u.ForceQuery || !(u.RawQuery === "")) { + buf.WriteByte(63); + buf.WriteString(u.RawQuery); + } + if (!(u.Fragment === "")) { + buf.WriteByte(35); + buf.WriteString(escape(u.Fragment, 7)); + } + return buf.String(); + }; + URL.prototype.String = function() { return this.$val.String(); }; + Values.prototype.Get = function(key) { + var _entry, key, v, vs; + v = this.$val; + if (v === false) { + return ""; + } + vs = (_entry = v[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); + if (vs.$length === 0) { + return ""; + } + return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); + }; + $ptrType(Values).prototype.Get = function(key) { return new Values(this.$get()).Get(key); }; + Values.prototype.Set = function(key, value) { + var _key, key, v, value; + v = this.$val; + _key = key; (v || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$2([value]) }; + }; + $ptrType(Values).prototype.Set = function(key, value) { return new Values(this.$get()).Set(key, value); }; + Values.prototype.Add = function(key, value) { + var _entry, _key, key, v, value; + v = this.$val; + _key = key; (v || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = v[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), value) }; + }; + $ptrType(Values).prototype.Add = function(key, value) { return new Values(this.$get()).Add(key, value); }; + Values.prototype.Del = function(key) { + var key, v; + v = this.$val; + delete v[$String.keyFor(key)]; + }; + $ptrType(Values).prototype.Del = function(key) { return new Values(this.$get()).Del(key); }; + ParseQuery = function(query) { + var err, m, query; + m = {}; + err = parseQuery(m, query); + return [m, err]; + }; + $pkg.ParseQuery = ParseQuery; + parseQuery = function(m, query) { + var _entry, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, err1, i, i$1, key, m, query, value; + err = $ifaceNil; + while (true) { + if (!(!(query === ""))) { break; } + key = query; + i = strings.IndexAny(key, "&;"); + if (i >= 0) { + _tmp = $substring(key, 0, i); + _tmp$1 = $substring(key, (i + 1 >> 0)); + key = _tmp; + query = _tmp$1; + } else { + query = ""; + } + if (key === "") { + continue; + } + value = ""; + i$1 = strings.Index(key, "="); + if (i$1 >= 0) { + _tmp$2 = $substring(key, 0, i$1); + _tmp$3 = $substring(key, (i$1 + 1 >> 0)); + key = _tmp$2; + value = _tmp$3; + } + _tuple = QueryUnescape(key); + key = _tuple[0]; + err1 = _tuple[1]; + if (!($interfaceIsEqual(err1, $ifaceNil))) { + if ($interfaceIsEqual(err, $ifaceNil)) { + err = err1; + } + continue; + } + _tuple$1 = QueryUnescape(value); + value = _tuple$1[0]; + err1 = _tuple$1[1]; + if (!($interfaceIsEqual(err1, $ifaceNil))) { + if ($interfaceIsEqual(err, $ifaceNil)) { + err = err1; + } + continue; + } + _key = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = m[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), value) }; + } + err = err; + return err; + }; + Values.prototype.Encode = function() { + var _entry, _entry$1, _i, _i$1, _i$2, _keys, _ref, _ref$1, _ref$2, buf, k, k$1, keyEscaped, keys, v, v$1, vs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _keys = $f._keys; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; buf = $f.buf; k = $f.k; k$1 = $f.k$1; keyEscaped = $f.keyEscaped; keys = $f.keys; v = $f.v; v$1 = $f.v$1; vs = $f.vs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + v = this.$val; + if (v === false) { + $s = -1; return ""; + } + buf = new strings.Builder.ptr(ptrType$2.nil, sliceType.nil); + keys = $makeSlice(sliceType$2, 0, $keys(v).length); + _ref = v; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + keys = $append(keys, k); + _i++; + } + $r = sort.Strings(keys); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref$1 = keys; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + k$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + vs = (_entry$1 = v[$String.keyFor(k$1)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); + keyEscaped = QueryEscape(k$1); + _ref$2 = vs; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + v$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + if (buf.Len() > 0) { + buf.WriteByte(38); + } + buf.WriteString(keyEscaped); + buf.WriteByte(61); + buf.WriteString(QueryEscape(v$1)); + _i$2++; + } + _i$1++; + } + $s = -1; return buf.String(); + /* */ } return; } if ($f === undefined) { $f = { $blk: Values.prototype.Encode }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._keys = _keys; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f.buf = buf; $f.k = k; $f.k$1 = k$1; $f.keyEscaped = keyEscaped; $f.keys = keys; $f.v = v; $f.v$1 = v$1; $f.vs = vs; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Values).prototype.Encode = function() { return new Values(this.$get()).Encode(); }; + resolvePath = function(base, ref) { + var _1, _i, _ref, base, dst, elem, full, i, last, ref, src, x; + full = ""; + if (ref === "") { + full = base; + } else if (!((ref.charCodeAt(0) === 47))) { + i = strings.LastIndex(base, "/"); + full = $substring(base, 0, (i + 1 >> 0)) + ref; + } else { + full = ref; + } + if (full === "") { + return ""; + } + dst = sliceType$2.nil; + src = strings.Split(full, "/"); + _ref = src; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + elem = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _1 = elem; + if (_1 === (".")) { + } else if (_1 === ("..")) { + if (dst.$length > 0) { + dst = $subslice(dst, 0, (dst.$length - 1 >> 0)); + } + } else { + dst = $append(dst, elem); + } + _i++; + } + last = (x = src.$length - 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])); + if (last === "." || last === "..") { + dst = $append(dst, ""); + } + return "/" + strings.TrimPrefix(strings.Join(dst, "/"), "/"); + }; + URL.ptr.prototype.IsAbs = function() { + var u; + u = this; + return !(u.Scheme === ""); + }; + URL.prototype.IsAbs = function() { return this.$val.IsAbs(); }; + URL.ptr.prototype.Parse = function(ref) { + var _r, _tuple, err, ref, refurl, u, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; ref = $f.ref; refurl = $f.refurl; u = $f.u; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u = this; + _r = Parse(ref); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + refurl = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + $s = -1; return [u.ResolveReference(refurl), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: URL.ptr.prototype.Parse }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.ref = ref; $f.refurl = refurl; $f.u = u; $f.$s = $s; $f.$r = $r; return $f; + }; + URL.prototype.Parse = function(ref) { return this.$val.Parse(ref); }; + URL.ptr.prototype.ResolveReference = function(ref) { + var ref, u, url; + u = this; + url = $clone(ref, URL); + if (ref.Scheme === "") { + url.Scheme = u.Scheme; + } + if (!(ref.Scheme === "") || !(ref.Host === "") || !(ref.User === ptrType.nil)) { + url.setPath(resolvePath(ref.EscapedPath(), "")); + return url; + } + if (!(ref.Opaque === "")) { + url.User = ptrType.nil; + url.Host = ""; + url.Path = ""; + return url; + } + if (ref.Path === "" && ref.RawQuery === "") { + url.RawQuery = u.RawQuery; + if (ref.Fragment === "") { + url.Fragment = u.Fragment; + } + } + url.Host = u.Host; + url.User = u.User; + url.setPath(resolvePath(u.EscapedPath(), ref.EscapedPath())); + return url; + }; + URL.prototype.ResolveReference = function(ref) { return this.$val.ResolveReference(ref); }; + URL.ptr.prototype.Query = function() { + var _tuple, u, v; + u = this; + _tuple = ParseQuery(u.RawQuery); + v = _tuple[0]; + return v; + }; + URL.prototype.Query = function() { return this.$val.Query(); }; + URL.ptr.prototype.RequestURI = function() { + var result, u; + u = this; + result = u.Opaque; + if (result === "") { + result = u.EscapedPath(); + if (result === "") { + result = "/"; + } + } else { + if (strings.HasPrefix(result, "//")) { + result = u.Scheme + ":" + result; + } + } + if (u.ForceQuery || !(u.RawQuery === "")) { + result = result + ("?" + u.RawQuery); + } + return result; + }; + URL.prototype.RequestURI = function() { return this.$val.RequestURI(); }; + URL.ptr.prototype.Hostname = function() { + var u; + u = this; + return stripPort(u.Host); + }; + URL.prototype.Hostname = function() { return this.$val.Hostname(); }; + URL.ptr.prototype.Port = function() { + var u; + u = this; + return portOnly(u.Host); + }; + URL.prototype.Port = function() { return this.$val.Port(); }; + stripPort = function(hostport) { + var colon, hostport, i; + colon = strings.IndexByte(hostport, 58); + if (colon === -1) { + return hostport; + } + i = strings.IndexByte(hostport, 93); + if (!((i === -1))) { + return strings.TrimPrefix($substring(hostport, 0, i), "["); + } + return $substring(hostport, 0, colon); + }; + portOnly = function(hostport) { + var colon, hostport, i; + colon = strings.IndexByte(hostport, 58); + if (colon === -1) { + return ""; + } + i = strings.Index(hostport, "]:"); + if (!((i === -1))) { + return $substring(hostport, (i + 2 >> 0)); + } + if (strings.Contains(hostport, "]")) { + return ""; + } + return $substring(hostport, (colon + 1 >> 0)); + }; + URL.ptr.prototype.MarshalBinary = function() { + var _tmp, _tmp$1, err, text, u; + text = sliceType.nil; + err = $ifaceNil; + u = this; + _tmp = (new sliceType($stringToBytes(u.String()))); + _tmp$1 = $ifaceNil; + text = _tmp; + err = _tmp$1; + return [text, err]; + }; + URL.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + URL.ptr.prototype.UnmarshalBinary = function(text) { + var _r, _tuple, err, text, u, u1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; text = $f.text; u = $f.u; u1 = $f.u1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + u = this; + _r = Parse(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + u1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + URL.copy(u, u1); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: URL.ptr.prototype.UnmarshalBinary }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.text = text; $f.u = u; $f.u1 = u1; $f.$s = $s; $f.$r = $r; return $f; + }; + URL.prototype.UnmarshalBinary = function(text) { return this.$val.UnmarshalBinary(text); }; + validUserinfo = function(s) { + var _1, _i, _ref, _rune, r, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + if (65 <= r && r <= 90) { + _i += _rune[1]; + continue; + } + if (97 <= r && r <= 122) { + _i += _rune[1]; + continue; + } + if (48 <= r && r <= 57) { + _i += _rune[1]; + continue; + } + _1 = r; + if ((_1 === (45)) || (_1 === (46)) || (_1 === (95)) || (_1 === (58)) || (_1 === (126)) || (_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (37)) || (_1 === (64))) { + _i += _rune[1]; + continue; + } else { + return false; + } + _i += _rune[1]; + } + return true; + }; + ptrType$3.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + EscapeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + InvalidHostError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "setPath", name: "setPath", pkg: "net/url", typ: $funcType([$String], [$error], false)}, {prop: "EscapedPath", name: "EscapedPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsAbs", name: "IsAbs", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Parse", name: "Parse", pkg: "", typ: $funcType([$String], [ptrType$1, $error], false)}, {prop: "ResolveReference", name: "ResolveReference", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Query", name: "Query", pkg: "", typ: $funcType([], [Values], false)}, {prop: "RequestURI", name: "RequestURI", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Hostname", name: "Hostname", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Port", name: "Port", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]; + ptrType.methods = [{prop: "Username", name: "Username", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Password", name: "Password", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Values.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([], [$String], false)}]; + Error.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "URL", name: "URL", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + timeout.init([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); + temporary.init([{prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]); + URL.init("", [{prop: "Scheme", name: "Scheme", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Opaque", name: "Opaque", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "User", name: "User", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RawPath", name: "RawPath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ForceQuery", name: "ForceQuery", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "RawQuery", name: "RawQuery", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Fragment", name: "Fragment", embedded: false, exported: true, typ: $String, tag: ""}]); + Userinfo.init("net/url", [{prop: "username", name: "username", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "password", name: "password", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "passwordSet", name: "passwordSet", embedded: false, exported: false, typ: $Bool, tag: ""}]); + Values.init($String, sliceType$2); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["os/exec"] = (function() { + var $pkg = {}, $init, bytes, context, errors, io, os, filepath, runtime, strconv, strings, sync, syscall, ptrType$8, skipStdinCopyError, init; + bytes = $packages["bytes"]; + context = $packages["context"]; + errors = $packages["errors"]; + io = $packages["io"]; + os = $packages["os"]; + filepath = $packages["path/filepath"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + syscall = $packages["syscall"]; + ptrType$8 = $ptrType(os.PathError); + init = function() { + skipStdinCopyError = (function(err) { + var _tuple, err, ok, pe; + _tuple = $assertType(err, ptrType$8, true); + pe = _tuple[0]; + ok = _tuple[1]; + return ok && pe.Op === "write" && pe.Path === "|1" && $interfaceIsEqual(pe.Err, new syscall.Errno(32)); + }); + }; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = context.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = filepath.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = syscall.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + skipStdinCopyError = $throwNilPointerError; + $pkg.ErrNotFound = errors.New("executable file not found in $PATH"); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["os/user"] = (function() { + var $pkg = {}, $init, bufio, bytes, errors, fmt, io, os, runtime, strconv, strings, sync, groupImplemented, init, init$1; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + os = $packages["os"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + init = function() { + groupImplemented = false; + }; + init$1 = function() { + groupImplemented = false; + }; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + groupImplemented = true; + init(); + init$1(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/cryptobyte/asn1"] = (function() { + var $pkg = {}, $init, Tag; + Tag = $pkg.Tag = $newType(1, $kindUint8, "asn1.Tag", true, "vendor/golang_org/x/crypto/cryptobyte/asn1", true, null); + Tag.prototype.Constructed = function() { + var t; + t = this.$val; + return (t | 32) >>> 0; + }; + $ptrType(Tag).prototype.Constructed = function() { return new Tag(this.$get()).Constructed(); }; + Tag.prototype.ContextSpecific = function() { + var t; + t = this.$val; + return (t | 128) >>> 0; + }; + $ptrType(Tag).prototype.ContextSpecific = function() { return new Tag(this.$get()).ContextSpecific(); }; + Tag.methods = [{prop: "Constructed", name: "Constructed", pkg: "", typ: $funcType([], [Tag], false)}, {prop: "ContextSpecific", name: "ContextSpecific", pkg: "", typ: $funcType([], [Tag], false)}]; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/cryptobyte"] = (function() { + var $pkg = {}, $init, asn1, errors, fmt, big, reflect, time, asn1$1, String, ptrType, sliceType, ptrType$1, ptrType$2, ptrType$3, sliceType$2, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, bigIntType, bigOne, _r, checkASN1Integer, asn1Signed, asn1Unsigned; + asn1 = $packages["encoding/asn1"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + big = $packages["math/big"]; + reflect = $packages["reflect"]; + time = $packages["time"]; + asn1$1 = $packages["vendor/golang_org/x/crypto/cryptobyte/asn1"]; + String = $pkg.String = $newType(12, $kindSlice, "cryptobyte.String", true, "vendor/golang_org/x/crypto/cryptobyte", true, null); + ptrType = $ptrType(big.Int); + sliceType = $sliceType($Uint8); + ptrType$1 = $ptrType(String); + ptrType$2 = $ptrType($Int64); + ptrType$3 = $ptrType($Uint64); + sliceType$2 = $sliceType($Int); + ptrType$4 = $ptrType($Int); + ptrType$5 = $ptrType(asn1$1.Tag); + ptrType$6 = $ptrType($Bool); + ptrType$7 = $ptrType($Uint32); + ptrType$8 = $ptrType(sliceType); + ptrType$10 = $ptrType(asn1.ObjectIdentifier); + ptrType$11 = $ptrType(time.Time); + ptrType$12 = $ptrType(asn1.BitString); + ptrType$13 = $ptrType($Uint8); + ptrType$14 = $ptrType($Uint16); + $ptrType(String).prototype.ReadASN1Boolean = function(out) { + var _1, bytes, bytes$24ptr, out, s; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 2) || !((bytes.$length === 1))) { + return false; + } + _1 = (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]); + if (_1 === (0)) { + out.$set(false); + } else if (_1 === (255)) { + out.$set(true); + } else { + return false; + } + return true; + }; + $ptrType(String).prototype.ReadASN1Integer = function(out) { + var _1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, i, out, s, u, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _v = $f._v; _v$1 = $f._v$1; i = $f.i; out = $f.out; s = $f.s; u = $f.u; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = [i]; + u = [u]; + s = this; + _r$1 = reflect.TypeOf(out).Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((_r$1 === 22))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((_r$1 === 22))) { */ case 1: + $panic(new $String("out is not a pointer")); + /* } */ case 2: + _r$2 = reflect.ValueOf(out); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $clone(_r$2, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = $clone(_r$3, reflect.Value).Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _1 = _r$4; + /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 8; continue; } + /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { $s = 9; continue; } + /* */ if (_1 === (25)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 8: + i[0] = new $Int64(0, 0); + if (!s.readASN1Int64((i.$ptr || (i.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))))) { _v = true; $s = 14; continue s; } + _r$5 = reflect.ValueOf(out); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = $clone(_r$6, reflect.Value).OverflowInt(i[0]); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _v = _r$7; case 14: + /* */ if (_v) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_v) { */ case 12: + $s = -1; return false; + /* } */ case 13: + _r$8 = reflect.ValueOf(out); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $r = $clone(_r$9, reflect.Value).SetInt(i[0]); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { */ case 9: + u[0] = new $Uint64(0, 0); + if (!s.readASN1Uint64((u.$ptr || (u.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, u))))) { _v$1 = true; $s = 23; continue s; } + _r$10 = reflect.ValueOf(out); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = $clone(_r$11, reflect.Value).OverflowUint(u[0]); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _v$1 = _r$12; case 23: + /* */ if (_v$1) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (_v$1) { */ case 21: + $s = -1; return false; + /* } */ case 22: + _r$13 = reflect.ValueOf(out); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$14 = $clone(_r$13, reflect.Value).Elem(); /* */ $s = 28; case 28: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $r = $clone(_r$14, reflect.Value).SetUint(u[0]); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } else if (_1 === (25)) { */ case 10: + _r$15 = reflect.TypeOf(out).Elem(); /* */ $s = 32; case 32: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + /* */ if ($interfaceIsEqual(_r$15, bigIntType)) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if ($interfaceIsEqual(_r$15, bigIntType)) { */ case 30: + $s = -1; return s.readASN1BigInt($assertType(out, ptrType)); + /* } */ case 31: + /* } */ case 11: + case 4: + $panic(new $String("out does not point to an integer type")); + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: $ptrType(String).prototype.ReadASN1Integer }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._v = _v; $f._v$1 = _v$1; $f.i = i; $f.out = out; $f.s = s; $f.u = u; $f.$s = $s; $f.$r = $r; return $f; + }; + checkASN1Integer = function(bytes) { + var bytes; + if (bytes.$length === 0) { + return false; + } + if (bytes.$length === 1) { + return true; + } + if (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 0) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 0) || ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 255) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 128)) { + return false; + } + return true; + }; + $ptrType(String).prototype.readASN1BigInt = function(out) { + var _i, _ref, b, bytes, bytes$24ptr, i, neg, out, s; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 2) || !checkASN1Integer($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length))) { + return false; + } + if ((((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & 128) >>> 0) === 128) { + neg = $makeSlice(sliceType, bytes.$length); + _ref = bytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= neg.$length) ? ($throwRuntimeError("index out of range"), undefined) : neg.$array[neg.$offset + i] = (~b << 24 >>> 24)); + _i++; + } + out.SetBytes(neg); + out.Add(out, bigOne); + out.Neg(out); + } else { + out.SetBytes($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)); + } + return true; + }; + $ptrType(String).prototype.readASN1Int64 = function(out) { + var bytes, bytes$24ptr, out, s; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 2) || !checkASN1Integer($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)) || !asn1Signed(out, $subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length))) { + return false; + } + return true; + }; + asn1Signed = function(out, n) { + var i, length, n, out, x, x$1; + length = n.$length; + if (length > 8) { + return false; + } + i = 0; + while (true) { + if (!(i < length)) { break; } + out.$set($shiftLeft64(out.$get(), (8))); + out.$set((x = out.$get(), x$1 = (new $Int64(0, ((i < 0 || i >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + i]))), new $Int64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0))); + i = i + (1) >> 0; + } + out.$set($shiftLeft64(out.$get(), ((64 - (((length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24)))); + out.$set($shiftRightInt64(out.$get(), ((64 - (((length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24)))); + return true; + }; + $ptrType(String).prototype.readASN1Uint64 = function(out) { + var bytes, bytes$24ptr, out, s; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 2) || !checkASN1Integer($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)) || !asn1Unsigned(out, $subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length))) { + return false; + } + return true; + }; + asn1Unsigned = function(out, n) { + var i, length, n, out, x, x$1; + length = n.$length; + if (length > 9 || (length === 9) && !(((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) === 0))) { + return false; + } + if (!(((((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) & 128) >>> 0) === 0))) { + return false; + } + i = 0; + while (true) { + if (!(i < length)) { break; } + out.$set($shiftLeft64(out.$get(), (8))); + out.$set((x = out.$get(), x$1 = (new $Uint64(0, ((i < 0 || i >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + i]))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0))); + i = i + (1) >> 0; + } + return true; + }; + $ptrType(String).prototype.ReadASN1Int64WithTag = function(out, tag) { + var bytes, bytes$24ptr, out, s, tag; + s = this; + bytes = String.nil; + return s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), tag) && checkASN1Integer($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)) && asn1Signed(out, $subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)); + }; + $ptrType(String).prototype.ReadASN1Enum = function(out) { + var bytes, bytes$24ptr, i, i$24ptr, out, s, x; + s = this; + bytes = String.nil; + i = new $Int64(0, 0); + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 10) || !checkASN1Integer($subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length)) || !asn1Signed((i$24ptr || (i$24ptr = new ptrType$2(function() { return i; }, function($v) { i = $v; }))), $subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length))) { + return false; + } + if (!((x = (new $Int64(0, (((i.$low + ((i.$high >> 31) * 4294967296)) >> 0)))), (x.$high === i.$high && x.$low === i.$low)))) { + return false; + } + out.$set((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0))); + return true; + }; + $ptrType(String).prototype.readBase128Int = function(out) { + var b, i, out, ret, s, x, y; + s = this; + ret = 0; + i = 0; + while (true) { + if (!(s.$get().$length > 0)) { break; } + if (i === 4) { + return false; + } + ret = (y = (7), y < 32 ? (ret << y) : 0) >> 0; + b = (x = s.read(1), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + ret = ret | (((((b & 127) >>> 0) >> 0))); + if (((b & 128) >>> 0) === 0) { + out.$set(ret); + return true; + } + i = i + (1) >> 0; + } + return false; + }; + $ptrType(String).prototype.ReadASN1ObjectIdentifier = function(out) { + var _q, _r$1, bytes, bytes$24ptr, components, i, out, s, v, v$24ptr, x; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 6) || (bytes.$length === 0)) { + return false; + } + components = $makeSlice(sliceType$2, (bytes.$length + 1 >> 0)); + v = 0; + if (!(bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).readBase128Int((v$24ptr || (v$24ptr = new ptrType$4(function() { return v; }, function($v) { v = $v; }))))) { + return false; + } + if (v < 80) { + (0 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 0] = (_q = v / 40, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + (1 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 1] = (_r$1 = v % 40, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))); + } else { + (0 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 0] = 2); + (1 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 1] = (v - 80 >> 0)); + } + i = 2; + while (true) { + if (!(bytes.$length > 0)) { break; } + if (!(bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).readBase128Int((v$24ptr || (v$24ptr = new ptrType$4(function() { return v; }, function($v) { v = $v; }))))) { + return false; + } + ((i < 0 || i >= components.$length) ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + i] = v); + i = i + (1) >> 0; + } + out.$set((x = $subslice(components, 0, i), $subslice(new asn1.ObjectIdentifier(x.$array), x.$offset, x.$offset + x.$length))); + return true; + }; + $ptrType(String).prototype.ReadASN1GeneralizedTime = function(out) { + var _r$1, _r$2, _tuple, bytes, err, out, res, s, serialized, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; bytes = $f.bytes; err = $f.err; out = $f.out; res = $f.res; s = $f.s; serialized = $f.serialized; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + bytes = [bytes]; + s = this; + bytes[0] = String.nil; + if (!s.ReadASN1((bytes.$ptr || (bytes.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, bytes))), 24)) { + $s = -1; return false; + } + t = ($bytesToString(bytes[0])); + _r$1 = time.Parse("20060102150405Z0700", t); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + res = $clone(_tuple[0], time.Time); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return false; + } + _r$2 = $clone(res, time.Time).Format("20060102150405Z0700"); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + serialized = _r$2; + if (!(serialized === t)) { + $s = -1; return false; + } + time.Time.copy(out, res); + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: $ptrType(String).prototype.ReadASN1GeneralizedTime }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.bytes = bytes; $f.err = err; $f.out = out; $f.res = res; $f.s = s; $f.serialized = serialized; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(String).prototype.ReadASN1BitString = function(out) { + var bytes, bytes$24ptr, out, paddingBits, s, x, y; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 3) || (bytes.$length === 0)) { + return false; + } + paddingBits = ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0])); + bytes = $subslice(bytes, 1); + if (paddingBits > 7 || (bytes.$length === 0) && !((paddingBits === 0)) || bytes.$length > 0 && !(((((x = bytes.$length - 1 >> 0, ((x < 0 || x >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + x])) & ((((y = paddingBits, y < 32 ? (1 << y) : 0) << 24 >>> 24) - 1 << 24 >>> 24))) >>> 0) === 0))) { + return false; + } + out.BitLength = ($imul(bytes.$length, 8)) - ((paddingBits >> 0)) >> 0; + out.Bytes = $subslice(new sliceType(bytes.$array), bytes.$offset, bytes.$offset + bytes.$length); + return true; + }; + $ptrType(String).prototype.ReadASN1BitStringAsBytes = function(out) { + var bytes, bytes$24ptr, out, paddingBits, s, x; + s = this; + bytes = String.nil; + if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$1(function() { return bytes; }, function($v) { bytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 3) || (bytes.$length === 0)) { + return false; + } + paddingBits = ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0])); + if (!((paddingBits === 0))) { + return false; + } + out.$set((x = $subslice(bytes, 1), $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); + return true; + }; + $ptrType(String).prototype.ReadASN1Bytes = function(out, tag) { + var _ptr, out, s, tag, x; + s = this; + return s.ReadASN1(((_ptr = out, new ptrType$1(function() { return (x = _ptr.$get(), $subslice(new String(x.$array), x.$offset, x.$offset + x.$length)); }, function($v) { _ptr.$set($subslice(new sliceType($v.$array), $v.$offset, $v.$offset + $v.$length)); }, _ptr.$target))), tag); + }; + $ptrType(String).prototype.ReadASN1 = function(out, tag) { + var out, s, t, t$24ptr, tag; + s = this; + t = 0; + if (!s.ReadAnyASN1(out, (t$24ptr || (t$24ptr = new ptrType$5(function() { return t; }, function($v) { t = $v; })))) || !((t === tag))) { + return false; + } + return true; + }; + $ptrType(String).prototype.ReadASN1Element = function(out, tag) { + var out, s, t, t$24ptr, tag; + s = this; + t = 0; + if (!s.ReadAnyASN1Element(out, (t$24ptr || (t$24ptr = new ptrType$5(function() { return t; }, function($v) { t = $v; })))) || !((t === tag))) { + return false; + } + return true; + }; + $ptrType(String).prototype.ReadAnyASN1 = function(out, outTag) { + var out, outTag, s; + s = this; + return s.readASN1(out, outTag, true); + }; + $ptrType(String).prototype.ReadAnyASN1Element = function(out, outTag) { + var out, outTag, s; + s = this; + return s.readASN1(out, outTag, false); + }; + String.prototype.PeekASN1Tag = function(tag) { + var s, tag; + s = this; + if (s.$length === 0) { + return false; + } + return (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) << 24 >>> 24)) === tag; + }; + $ptrType(String).prototype.PeekASN1Tag = function(tag) { return this.$get().PeekASN1Tag(tag); }; + $ptrType(String).prototype.SkipASN1 = function(tag) { + var s, tag, unused, unused$24ptr; + s = this; + unused = String.nil; + return s.ReadASN1((unused$24ptr || (unused$24ptr = new ptrType$1(function() { return unused; }, function($v) { unused = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), tag); + }; + $ptrType(String).prototype.ReadOptionalASN1 = function(out, outPresent, tag) { + var out, outPresent, present, s, tag; + s = this; + present = s.PeekASN1Tag(tag); + if (!(outPresent === ptrType$6.nil)) { + outPresent.$set(present); + } + if (present && !s.ReadASN1(out, tag)) { + return false; + } + return true; + }; + $ptrType(String).prototype.SkipOptionalASN1 = function(tag) { + var s, tag, unused, unused$24ptr; + s = this; + if (!s.PeekASN1Tag(tag)) { + return true; + } + unused = String.nil; + return s.ReadASN1((unused$24ptr || (unused$24ptr = new ptrType$1(function() { return unused; }, function($v) { unused = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), tag); + }; + $ptrType(String).prototype.ReadOptionalASN1Integer = function(out, tag, defaultValue) { + var _1, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, defaultValue, i, out, present, s, tag, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _v = $f._v; defaultValue = $f.defaultValue; i = $f.i; out = $f.out; present = $f.present; s = $f.s; tag = $f.tag; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = [i]; + present = [present]; + s = this; + _r$1 = reflect.TypeOf(out).Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((_r$1 === 22))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((_r$1 === 22))) { */ case 1: + $panic(new $String("out is not a pointer")); + /* } */ case 2: + present[0] = false; + i[0] = String.nil; + if (!s.ReadOptionalASN1((i.$ptr || (i.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))), (present.$ptr || (present.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, present))), tag)) { + $s = -1; return false; + } + /* */ if (!present[0]) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!present[0]) { */ case 4: + _r$2 = reflect.ValueOf(out); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $clone(_r$2, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = $clone(_r$3, reflect.Value).Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _1 = _r$4; + /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { $s = 10; continue; } + /* */ if (_1 === (25)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { */ case 10: + _r$5 = reflect.ValueOf(out); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = reflect.ValueOf(defaultValue); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $r = $clone(_r$6, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 13; continue; + /* } else if (_1 === (25)) { */ case 11: + _r$8 = reflect.TypeOf(out).Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(_r$8, bigIntType))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!($interfaceIsEqual(_r$8, bigIntType))) { */ case 18: + $panic(new $String("invalid integer type")); + /* } */ case 19: + _r$9 = reflect.TypeOf(defaultValue).Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + if (!((_r$9 === 22))) { _v = true; $s = 23; continue s; } + _r$10 = reflect.TypeOf(defaultValue).Elem(); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _v = !($interfaceIsEqual(_r$10, bigIntType)); case 23: + /* */ if (_v) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (_v) { */ case 21: + $panic(new $String("out points to big.Int, but defaultValue does not")); + /* } */ case 22: + $assertType(out, ptrType).Set($assertType(defaultValue, ptrType)); + $s = 13; continue; + /* } else { */ case 12: + $panic(new $String("invalid integer type")); + /* } */ case 13: + case 6: + $s = -1; return true; + /* } */ case 5: + _r$11 = (i.$ptr || (i.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))).ReadASN1Integer(out); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + /* */ if (!_r$11 || !i[0].Empty()) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (!_r$11 || !i[0].Empty()) { */ case 26: + $s = -1; return false; + /* } */ case 27: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: $ptrType(String).prototype.ReadOptionalASN1Integer }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._v = _v; $f.defaultValue = defaultValue; $f.i = i; $f.out = out; $f.present = present; $f.s = s; $f.tag = tag; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(String).prototype.ReadOptionalASN1OctetString = function(out, outPresent, tag) { + var child, child$24ptr, oct, oct$24ptr, out, outPresent, present, present$24ptr, s, tag; + s = this; + present = false; + child = String.nil; + if (!s.ReadOptionalASN1((child$24ptr || (child$24ptr = new ptrType$1(function() { return child; }, function($v) { child = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), (present$24ptr || (present$24ptr = new ptrType$6(function() { return present; }, function($v) { present = $v; }))), tag)) { + return false; + } + if (!(outPresent === ptrType$6.nil)) { + outPresent.$set(present); + } + if (present) { + oct = String.nil; + if (!(child$24ptr || (child$24ptr = new ptrType$1(function() { return child; }, function($v) { child = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).ReadASN1((oct$24ptr || (oct$24ptr = new ptrType$1(function() { return oct; }, function($v) { oct = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), 4) || !child.Empty()) { + return false; + } + out.$set($subslice(new sliceType(oct.$array), oct.$offset, oct.$offset + oct.$length)); + } else { + out.$set(sliceType.nil); + } + return true; + }; + $ptrType(String).prototype.ReadOptionalASN1Boolean = function(out, defaultValue) { + var child, child$24ptr, defaultValue, out, present, present$24ptr, s; + s = this; + present = false; + child = String.nil; + if (!s.ReadOptionalASN1((child$24ptr || (child$24ptr = new ptrType$1(function() { return child; }, function($v) { child = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))), (present$24ptr || (present$24ptr = new ptrType$6(function() { return present; }, function($v) { present = $v; }))), 1)) { + return false; + } + if (!present) { + out.$set(defaultValue); + return true; + } + return s.ReadASN1Boolean(out); + }; + $ptrType(String).prototype.readASN1 = function(out, outTag, skipHeader) { + var _ptr, _tmp, _tmp$1, _tmp$2, _tmp$3, headerLen, len32, len32$24ptr, lenByte, lenBytes, lenBytes$24ptr, lenLen, length, out, outTag, s, skipHeader, tag, x, x$1, x$2, y; + s = this; + if (s.$get().$length < 2) { + return false; + } + _tmp = (x = s.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + _tmp$1 = (x$1 = s.$get(), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])); + tag = _tmp; + lenByte = _tmp$1; + if (((tag & 31) >>> 0) === 31) { + return false; + } + if (!(outTag === ptrType$5.nil)) { + outTag.$set(((tag << 24 >>> 24))); + } + _tmp$2 = 0; + _tmp$3 = 0; + length = _tmp$2; + headerLen = _tmp$3; + if (((lenByte & 128) >>> 0) === 0) { + length = ((lenByte >>> 0)) + 2 >>> 0; + headerLen = 2; + } else { + lenLen = (lenByte & 127) >>> 0; + len32 = 0; + if ((lenLen === 0) || lenLen > 4 || s.$get().$length < (((2 + lenLen << 24 >>> 24) >> 0))) { + return false; + } + lenBytes = ($subslice((s.$get()), 2, (2 + lenLen << 24 >>> 24))); + if (!(lenBytes$24ptr || (lenBytes$24ptr = new ptrType$1(function() { return lenBytes; }, function($v) { lenBytes = $subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).readUnsigned((len32$24ptr || (len32$24ptr = new ptrType$7(function() { return len32; }, function($v) { len32 = $v; }))), ((lenLen >> 0)))) { + return false; + } + if (len32 < 128) { + return false; + } + if (((y = ((((lenLen - 1 << 24 >>> 24)) * 8 << 24 >>> 24)), y < 32 ? (len32 >>> y) : 0) >>> 0) === 0) { + return false; + } + headerLen = 2 + ((lenLen >>> 0)) >>> 0; + if ((headerLen + len32 >>> 0) < len32) { + return false; + } + length = headerLen + len32 >>> 0; + } + if (!((((((length >> 0)) >>> 0)) === length)) || !s.ReadBytes(((_ptr = out, new ptrType$8(function() { return (x$2 = _ptr.$get(), $subslice(new sliceType(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)); }, function($v) { _ptr.$set($subslice(new String($v.$array), $v.$offset, $v.$offset + $v.$length)); }, _ptr.$target))), ((length >> 0)))) { + return false; + } + if (skipHeader && !out.Skip(((headerLen >> 0)))) { + $panic(new $String("cryptobyte: internal error")); + } + return true; + }; + $ptrType(String).prototype.read = function(n) { + var n, s, v; + s = this; + if (s.$get().$length < n) { + return sliceType.nil; + } + v = $subslice((s.$get()), 0, n); + s.$set($subslice((s.$get()), n)); + return $subslice(new sliceType(v.$array), v.$offset, v.$offset + v.$length); + }; + $ptrType(String).prototype.Skip = function(n) { + var n, s; + s = this; + return !(s.read(n) === sliceType.nil); + }; + $ptrType(String).prototype.ReadUint8 = function(out) { + var out, s, v; + s = this; + v = s.read(1); + if (v === sliceType.nil) { + return false; + } + out.$set(((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]))); + return true; + }; + $ptrType(String).prototype.ReadUint16 = function(out) { + var out, s, v; + s = this; + v = s.read(2); + if (v === sliceType.nil) { + return false; + } + out.$set((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) << 16 >>> 16))) >>> 0); + return true; + }; + $ptrType(String).prototype.ReadUint24 = function(out) { + var out, s, v; + s = this; + v = s.read(3); + if (v === sliceType.nil) { + return false; + } + out.$set((((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) >>> 0))) >>> 0); + return true; + }; + $ptrType(String).prototype.ReadUint32 = function(out) { + var out, s, v; + s = this; + v = s.read(4); + if (v === sliceType.nil) { + return false; + } + out.$set((((((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) >>> 0)) << 24 >>> 0) | ((((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 3]) >>> 0))) >>> 0); + return true; + }; + $ptrType(String).prototype.readUnsigned = function(out, length) { + var i, length, out, result, s, v, y; + s = this; + v = s.read(length); + if (v === sliceType.nil) { + return false; + } + result = 0; + i = 0; + while (true) { + if (!(i < length)) { break; } + result = (y = (8), y < 32 ? (result << y) : 0) >>> 0; + result = (result | (((((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) >>> 0)))) >>> 0; + i = i + (1) >> 0; + } + out.$set(result); + return true; + }; + $ptrType(String).prototype.readLengthPrefixed = function(lenLen, outChild) { + var _i, _ref, b, lenBytes, lenLen, length, outChild, s, v; + s = this; + lenBytes = s.read(lenLen); + if (lenBytes === sliceType.nil) { + return false; + } + length = 0; + _ref = lenBytes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + length = length << 8 >>> 0; + length = (length | ((b >>> 0))) >>> 0; + _i++; + } + if (((length >> 0)) < 0) { + return false; + } + v = s.read(((length >> 0))); + if (v === sliceType.nil) { + return false; + } + outChild.$set($subslice(new String(v.$array), v.$offset, v.$offset + v.$length)); + return true; + }; + $ptrType(String).prototype.ReadUint8LengthPrefixed = function(out) { + var out, s; + s = this; + return s.readLengthPrefixed(1, out); + }; + $ptrType(String).prototype.ReadUint16LengthPrefixed = function(out) { + var out, s; + s = this; + return s.readLengthPrefixed(2, out); + }; + $ptrType(String).prototype.ReadUint24LengthPrefixed = function(out) { + var out, s; + s = this; + return s.readLengthPrefixed(3, out); + }; + $ptrType(String).prototype.ReadBytes = function(out, n) { + var n, out, s, v; + s = this; + v = s.read(n); + if (v === sliceType.nil) { + return false; + } + out.$set(v); + return true; + }; + $ptrType(String).prototype.CopyBytes = function(out) { + var n, out, s, v; + s = this; + n = out.$length; + v = s.read(n); + if (v === sliceType.nil) { + return false; + } + return $copySlice(out, v) === n; + }; + String.prototype.Empty = function() { + var s; + s = this; + return s.$length === 0; + }; + $ptrType(String).prototype.Empty = function() { return this.$get().Empty(); }; + String.methods = [{prop: "PeekASN1Tag", name: "PeekASN1Tag", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}, {prop: "Empty", name: "Empty", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$1.methods = [{prop: "ReadASN1Boolean", name: "ReadASN1Boolean", pkg: "", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "ReadASN1Integer", name: "ReadASN1Integer", pkg: "", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "readASN1BigInt", name: "readASN1BigInt", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType], [$Bool], false)}, {prop: "readASN1Int64", name: "readASN1Int64", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "readASN1Uint64", name: "readASN1Uint64", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType$3], [$Bool], false)}, {prop: "ReadASN1Int64WithTag", name: "ReadASN1Int64WithTag", pkg: "", typ: $funcType([ptrType$2, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1Enum", name: "ReadASN1Enum", pkg: "", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "readBase128Int", name: "readBase128Int", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "ReadASN1ObjectIdentifier", name: "ReadASN1ObjectIdentifier", pkg: "", typ: $funcType([ptrType$10], [$Bool], false)}, {prop: "ReadASN1GeneralizedTime", name: "ReadASN1GeneralizedTime", pkg: "", typ: $funcType([ptrType$11], [$Bool], false)}, {prop: "ReadASN1BitString", name: "ReadASN1BitString", pkg: "", typ: $funcType([ptrType$12], [$Bool], false)}, {prop: "ReadASN1BitStringAsBytes", name: "ReadASN1BitStringAsBytes", pkg: "", typ: $funcType([ptrType$8], [$Bool], false)}, {prop: "ReadASN1Bytes", name: "ReadASN1Bytes", pkg: "", typ: $funcType([ptrType$8, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1", name: "ReadASN1", pkg: "", typ: $funcType([ptrType$1, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1Element", name: "ReadASN1Element", pkg: "", typ: $funcType([ptrType$1, asn1$1.Tag], [$Bool], false)}, {prop: "ReadAnyASN1", name: "ReadAnyASN1", pkg: "", typ: $funcType([ptrType$1, ptrType$5], [$Bool], false)}, {prop: "ReadAnyASN1Element", name: "ReadAnyASN1Element", pkg: "", typ: $funcType([ptrType$1, ptrType$5], [$Bool], false)}, {prop: "SkipASN1", name: "SkipASN1", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1", name: "ReadOptionalASN1", pkg: "", typ: $funcType([ptrType$1, ptrType$6, asn1$1.Tag], [$Bool], false)}, {prop: "SkipOptionalASN1", name: "SkipOptionalASN1", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1Integer", name: "ReadOptionalASN1Integer", pkg: "", typ: $funcType([$emptyInterface, asn1$1.Tag, $emptyInterface], [$Bool], false)}, {prop: "ReadOptionalASN1OctetString", name: "ReadOptionalASN1OctetString", pkg: "", typ: $funcType([ptrType$8, ptrType$6, asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1Boolean", name: "ReadOptionalASN1Boolean", pkg: "", typ: $funcType([ptrType$6, $Bool], [$Bool], false)}, {prop: "readASN1", name: "readASN1", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType$1, ptrType$5, $Bool], [$Bool], false)}, {prop: "read", name: "read", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([$Int], [sliceType], false)}, {prop: "Skip", name: "Skip", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "ReadUint8", name: "ReadUint8", pkg: "", typ: $funcType([ptrType$13], [$Bool], false)}, {prop: "ReadUint16", name: "ReadUint16", pkg: "", typ: $funcType([ptrType$14], [$Bool], false)}, {prop: "ReadUint24", name: "ReadUint24", pkg: "", typ: $funcType([ptrType$7], [$Bool], false)}, {prop: "ReadUint32", name: "ReadUint32", pkg: "", typ: $funcType([ptrType$7], [$Bool], false)}, {prop: "readUnsigned", name: "readUnsigned", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([ptrType$7, $Int], [$Bool], false)}, {prop: "readLengthPrefixed", name: "readLengthPrefixed", pkg: "vendor/golang_org/x/crypto/cryptobyte", typ: $funcType([$Int, ptrType$1], [$Bool], false)}, {prop: "ReadUint8LengthPrefixed", name: "ReadUint8LengthPrefixed", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "ReadUint16LengthPrefixed", name: "ReadUint16LengthPrefixed", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "ReadUint24LengthPrefixed", name: "ReadUint24LengthPrefixed", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([ptrType$8, $Int], [$Bool], false)}, {prop: "CopyBytes", name: "CopyBytes", pkg: "", typ: $funcType([sliceType], [$Bool], false)}]; + String.init($Uint8); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = asn1.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = asn1$1.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = reflect.TypeOf((ptrType.nil)).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + bigIntType = _r; + bigOne = big.NewInt(new $Int64(0, 1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/x509"] = (function() { + var $pkg = {}, $init, bufio, bytes, crypto, aes, cipher, des, dsa, ecdsa, elliptic, md5, rsa, sha1, sha256, sha512, pkix, asn1, hex, pem, errors, fmt, io, ioutil, big, net, url, os, exec, user, filepath, reflect, runtime, strconv, strings, sync, time, utf8, cryptobyte, asn1$1, CertPool, pkcs1PrivateKey, pkcs1AdditionalRSAPrime, pkcs1PublicKey, pkcs8, ecPrivateKey, InvalidReason, CertificateInvalidError, HostnameError, UnknownAuthorityError, SystemRootsError, VerifyOptions, rfc2821Mailbox, certificate, tbsCertificate, dsaAlgorithmParameters, dsaSignature, ecdsaSignature, validity, publicKeyInfo, authKeyId, SignatureAlgorithm, PublicKeyAlgorithm, pssParameters, KeyUsage, ExtKeyUsage, Certificate, InsecureAlgorithmError, ConstraintViolationError, UnhandledCriticalExtension, basicConstraints, policyInformation, authorityInfoAccess, distributionPoint, distributionPointName, ptrType, structType, sliceType$1, structType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$1, sliceType$5, ptrType$2, sliceType$6, ptrType$4, sliceType$7, ptrType$5, sliceType$8, sliceType$9, ptrType$6, ptrType$7, sliceType$10, ptrType$8, sliceType$11, sliceType$12, ptrType$9, ptrType$10, ptrType$11, sliceType$13, ptrType$12, ptrType$13, ptrType$14, sliceType$14, sliceType$15, ptrType$15, ptrType$16, sliceType$16, ptrType$17, sliceType$17, ptrType$18, sliceType$18, sliceType$19, ptrType$19, sliceType$20, ptrType$20, ptrType$21, ptrType$22, sliceType$21, ptrType$23, sliceType$22, ptrType$24, sliceType$24, sliceType$25, ptrType$27, mapType, ptrType$31, funcType$1, mapType$1, once, systemRoots, systemRootsErr, debugExecDarwinRoots, ignoreCN, errNotParsed, publicKeyAlgoName, oidSignatureMD2WithRSA, oidSignatureMD5WithRSA, oidSignatureSHA1WithRSA, oidSignatureSHA256WithRSA, oidSignatureSHA384WithRSA, oidSignatureSHA512WithRSA, oidSignatureRSAPSS, oidSignatureDSAWithSHA1, oidSignatureDSAWithSHA256, oidSignatureECDSAWithSHA1, oidSignatureECDSAWithSHA256, oidSignatureECDSAWithSHA384, oidSignatureECDSAWithSHA512, oidSHA256, oidSHA384, oidSHA512, oidMGF1, oidISOSignatureSHA1WithRSA, signatureAlgorithmDetails, oidPublicKeyRSA, oidPublicKeyDSA, oidPublicKeyECDSA, oidNamedCurveP224, oidNamedCurveP256, oidNamedCurveP384, oidNamedCurveP521, oidExtKeyUsageAny, oidExtKeyUsageServerAuth, oidExtKeyUsageClientAuth, oidExtKeyUsageCodeSigning, oidExtKeyUsageEmailProtection, oidExtKeyUsageIPSECEndSystem, oidExtKeyUsageIPSECTunnel, oidExtKeyUsageIPSECUser, oidExtKeyUsageTimeStamping, oidExtKeyUsageOCSPSigning, oidExtKeyUsageMicrosoftServerGatedCrypto, oidExtKeyUsageNetscapeServerGatedCrypto, oidExtKeyUsageMicrosoftCommercialCodeSigning, oidExtKeyUsageMicrosoftKernelCodeSigning, extKeyUsageOIDs, entrustBrokenSPKI, oidExtensionAuthorityKeyId, oidExtensionSubjectAltName, oidExtensionNameConstraints, oidExtensionAuthorityInfoAccess, oidAuthorityInfoAccessOcsp, oidAuthorityInfoAccessIssuers, _r, _r$1, _r$2, _r$3, loadSystemRoots, NewCertPool, ParsePKCS1PrivateKey, ParsePKCS8PrivateKey, systemRootsPool, initSystemRoots, ParseECPrivateKey, parseECPrivateKey, parseRFC2821Mailbox, domainToReverseLabels, matchEmailConstraint, matchURIConstraint, matchIPConstraint, matchDomainConstraint, appendToFreshChain, validHostname, matchHostnames, toLowerCaseASCII, checkChainForKeyUsage, rsaPSSParameters, getSignatureAlgorithmFromAI, getPublicKeyAlgorithmFromOID, namedCurveFromOID, extKeyUsageFromOID, signaturePublicKeyAlgoMismatchError, checkSignature, parsePublicKey, forEachSAN, parseSANExtension, isValidIPMask, parseNameConstraintsExtension, parseCertificate, ParseCertificate, oidInExtensions, isIA5String, signingParamsForPublicKey; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + crypto = $packages["crypto"]; + aes = $packages["crypto/aes"]; + cipher = $packages["crypto/cipher"]; + des = $packages["crypto/des"]; + dsa = $packages["crypto/dsa"]; + ecdsa = $packages["crypto/ecdsa"]; + elliptic = $packages["crypto/elliptic"]; + md5 = $packages["crypto/md5"]; + rsa = $packages["crypto/rsa"]; + sha1 = $packages["crypto/sha1"]; + sha256 = $packages["crypto/sha256"]; + sha512 = $packages["crypto/sha512"]; + pkix = $packages["crypto/x509/pkix"]; + asn1 = $packages["encoding/asn1"]; + hex = $packages["encoding/hex"]; + pem = $packages["encoding/pem"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + big = $packages["math/big"]; + net = $packages["net"]; + url = $packages["net/url"]; + os = $packages["os"]; + exec = $packages["os/exec"]; + user = $packages["os/user"]; + filepath = $packages["path/filepath"]; + reflect = $packages["reflect"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + time = $packages["time"]; + utf8 = $packages["unicode/utf8"]; + cryptobyte = $packages["vendor/golang_org/x/crypto/cryptobyte"]; + asn1$1 = $packages["vendor/golang_org/x/crypto/cryptobyte/asn1"]; + CertPool = $pkg.CertPool = $newType(0, $kindStruct, "x509.CertPool", true, "crypto/x509", true, function(bySubjectKeyId_, byName_, certs_) { + this.$val = this; + if (arguments.length === 0) { + this.bySubjectKeyId = false; + this.byName = false; + this.certs = sliceType$5.nil; + return; + } + this.bySubjectKeyId = bySubjectKeyId_; + this.byName = byName_; + this.certs = certs_; + }); + pkcs1PrivateKey = $pkg.pkcs1PrivateKey = $newType(0, $kindStruct, "x509.pkcs1PrivateKey", true, "crypto/x509", false, function(Version_, N_, E_, D_, P_, Q_, Dp_, Dq_, Qinv_, AdditionalPrimes_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.N = ptrType$4.nil; + this.E = 0; + this.D = ptrType$4.nil; + this.P = ptrType$4.nil; + this.Q = ptrType$4.nil; + this.Dp = ptrType$4.nil; + this.Dq = ptrType$4.nil; + this.Qinv = ptrType$4.nil; + this.AdditionalPrimes = sliceType$7.nil; + return; + } + this.Version = Version_; + this.N = N_; + this.E = E_; + this.D = D_; + this.P = P_; + this.Q = Q_; + this.Dp = Dp_; + this.Dq = Dq_; + this.Qinv = Qinv_; + this.AdditionalPrimes = AdditionalPrimes_; + }); + pkcs1AdditionalRSAPrime = $pkg.pkcs1AdditionalRSAPrime = $newType(0, $kindStruct, "x509.pkcs1AdditionalRSAPrime", true, "crypto/x509", false, function(Prime_, Exp_, Coeff_) { + this.$val = this; + if (arguments.length === 0) { + this.Prime = ptrType$4.nil; + this.Exp = ptrType$4.nil; + this.Coeff = ptrType$4.nil; + return; + } + this.Prime = Prime_; + this.Exp = Exp_; + this.Coeff = Coeff_; + }); + pkcs1PublicKey = $pkg.pkcs1PublicKey = $newType(0, $kindStruct, "x509.pkcs1PublicKey", true, "crypto/x509", false, function(N_, E_) { + this.$val = this; + if (arguments.length === 0) { + this.N = ptrType$4.nil; + this.E = 0; + return; + } + this.N = N_; + this.E = E_; + }); + pkcs8 = $pkg.pkcs8 = $newType(0, $kindStruct, "x509.pkcs8", true, "crypto/x509", false, function(Version_, Algo_, PrivateKey_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.Algo = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.PrivateKey = sliceType$3.nil; + return; + } + this.Version = Version_; + this.Algo = Algo_; + this.PrivateKey = PrivateKey_; + }); + ecPrivateKey = $pkg.ecPrivateKey = $newType(0, $kindStruct, "x509.ecPrivateKey", true, "crypto/x509", false, function(Version_, PrivateKey_, NamedCurveOID_, PublicKey_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.PrivateKey = sliceType$3.nil; + this.NamedCurveOID = asn1.ObjectIdentifier.nil; + this.PublicKey = new asn1.BitString.ptr(sliceType$3.nil, 0); + return; + } + this.Version = Version_; + this.PrivateKey = PrivateKey_; + this.NamedCurveOID = NamedCurveOID_; + this.PublicKey = PublicKey_; + }); + InvalidReason = $pkg.InvalidReason = $newType(4, $kindInt, "x509.InvalidReason", true, "crypto/x509", true, null); + CertificateInvalidError = $pkg.CertificateInvalidError = $newType(0, $kindStruct, "x509.CertificateInvalidError", true, "crypto/x509", true, function(Cert_, Reason_, Detail_) { + this.$val = this; + if (arguments.length === 0) { + this.Cert = ptrType$1.nil; + this.Reason = 0; + this.Detail = ""; + return; + } + this.Cert = Cert_; + this.Reason = Reason_; + this.Detail = Detail_; + }); + HostnameError = $pkg.HostnameError = $newType(0, $kindStruct, "x509.HostnameError", true, "crypto/x509", true, function(Certificate_, Host_) { + this.$val = this; + if (arguments.length === 0) { + this.Certificate = ptrType$1.nil; + this.Host = ""; + return; + } + this.Certificate = Certificate_; + this.Host = Host_; + }); + UnknownAuthorityError = $pkg.UnknownAuthorityError = $newType(0, $kindStruct, "x509.UnknownAuthorityError", true, "crypto/x509", true, function(Cert_, hintErr_, hintCert_) { + this.$val = this; + if (arguments.length === 0) { + this.Cert = ptrType$1.nil; + this.hintErr = $ifaceNil; + this.hintCert = ptrType$1.nil; + return; + } + this.Cert = Cert_; + this.hintErr = hintErr_; + this.hintCert = hintCert_; + }); + SystemRootsError = $pkg.SystemRootsError = $newType(0, $kindStruct, "x509.SystemRootsError", true, "crypto/x509", true, function(Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Err = $ifaceNil; + return; + } + this.Err = Err_; + }); + VerifyOptions = $pkg.VerifyOptions = $newType(0, $kindStruct, "x509.VerifyOptions", true, "crypto/x509", true, function(DNSName_, Intermediates_, Roots_, CurrentTime_, KeyUsages_, MaxConstraintComparisions_) { + this.$val = this; + if (arguments.length === 0) { + this.DNSName = ""; + this.Intermediates = ptrType.nil; + this.Roots = ptrType.nil; + this.CurrentTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil); + this.KeyUsages = sliceType$13.nil; + this.MaxConstraintComparisions = 0; + return; + } + this.DNSName = DNSName_; + this.Intermediates = Intermediates_; + this.Roots = Roots_; + this.CurrentTime = CurrentTime_; + this.KeyUsages = KeyUsages_; + this.MaxConstraintComparisions = MaxConstraintComparisions_; + }); + rfc2821Mailbox = $pkg.rfc2821Mailbox = $newType(0, $kindStruct, "x509.rfc2821Mailbox", true, "crypto/x509", false, function(local_, domain_) { + this.$val = this; + if (arguments.length === 0) { + this.local = ""; + this.domain = ""; + return; + } + this.local = local_; + this.domain = domain_; + }); + certificate = $pkg.certificate = $newType(0, $kindStruct, "x509.certificate", true, "crypto/x509", false, function(Raw_, TBSCertificate_, SignatureAlgorithm_, SignatureValue_) { + this.$val = this; + if (arguments.length === 0) { + this.Raw = asn1.RawContent.nil; + this.TBSCertificate = new tbsCertificate.ptr(asn1.RawContent.nil, 0, ptrType$4.nil, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil), new validity.ptr(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil)), new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil), new publicKeyInfo.ptr(asn1.RawContent.nil, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.BitString.ptr(sliceType$3.nil, 0)), new asn1.BitString.ptr(sliceType$3.nil, 0), new asn1.BitString.ptr(sliceType$3.nil, 0), sliceType$18.nil); + this.SignatureAlgorithm = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.SignatureValue = new asn1.BitString.ptr(sliceType$3.nil, 0); + return; + } + this.Raw = Raw_; + this.TBSCertificate = TBSCertificate_; + this.SignatureAlgorithm = SignatureAlgorithm_; + this.SignatureValue = SignatureValue_; + }); + tbsCertificate = $pkg.tbsCertificate = $newType(0, $kindStruct, "x509.tbsCertificate", true, "crypto/x509", false, function(Raw_, Version_, SerialNumber_, SignatureAlgorithm_, Issuer_, Validity_, Subject_, PublicKey_, UniqueId_, SubjectUniqueId_, Extensions_) { + this.$val = this; + if (arguments.length === 0) { + this.Raw = asn1.RawContent.nil; + this.Version = 0; + this.SerialNumber = ptrType$4.nil; + this.SignatureAlgorithm = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.Issuer = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + this.Validity = new validity.ptr(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil)); + this.Subject = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + this.PublicKey = new publicKeyInfo.ptr(asn1.RawContent.nil, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.BitString.ptr(sliceType$3.nil, 0)); + this.UniqueId = new asn1.BitString.ptr(sliceType$3.nil, 0); + this.SubjectUniqueId = new asn1.BitString.ptr(sliceType$3.nil, 0); + this.Extensions = sliceType$18.nil; + return; + } + this.Raw = Raw_; + this.Version = Version_; + this.SerialNumber = SerialNumber_; + this.SignatureAlgorithm = SignatureAlgorithm_; + this.Issuer = Issuer_; + this.Validity = Validity_; + this.Subject = Subject_; + this.PublicKey = PublicKey_; + this.UniqueId = UniqueId_; + this.SubjectUniqueId = SubjectUniqueId_; + this.Extensions = Extensions_; + }); + dsaAlgorithmParameters = $pkg.dsaAlgorithmParameters = $newType(0, $kindStruct, "x509.dsaAlgorithmParameters", true, "crypto/x509", false, function(P_, Q_, G_) { + this.$val = this; + if (arguments.length === 0) { + this.P = ptrType$4.nil; + this.Q = ptrType$4.nil; + this.G = ptrType$4.nil; + return; + } + this.P = P_; + this.Q = Q_; + this.G = G_; + }); + dsaSignature = $pkg.dsaSignature = $newType(0, $kindStruct, "x509.dsaSignature", true, "crypto/x509", false, function(R_, S_) { + this.$val = this; + if (arguments.length === 0) { + this.R = ptrType$4.nil; + this.S = ptrType$4.nil; + return; + } + this.R = R_; + this.S = S_; + }); + ecdsaSignature = $pkg.ecdsaSignature = $newType(0, $kindStruct, "x509.ecdsaSignature", true, "crypto/x509", false, function(R_, S_) { + this.$val = this; + if (arguments.length === 0) { + this.R = ptrType$4.nil; + this.S = ptrType$4.nil; + return; + } + this.R = R_; + this.S = S_; + }); + validity = $pkg.validity = $newType(0, $kindStruct, "x509.validity", true, "crypto/x509", false, function(NotBefore_, NotAfter_) { + this.$val = this; + if (arguments.length === 0) { + this.NotBefore = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil); + this.NotAfter = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil); + return; + } + this.NotBefore = NotBefore_; + this.NotAfter = NotAfter_; + }); + publicKeyInfo = $pkg.publicKeyInfo = $newType(0, $kindStruct, "x509.publicKeyInfo", true, "crypto/x509", false, function(Raw_, Algorithm_, PublicKey_) { + this.$val = this; + if (arguments.length === 0) { + this.Raw = asn1.RawContent.nil; + this.Algorithm = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.PublicKey = new asn1.BitString.ptr(sliceType$3.nil, 0); + return; + } + this.Raw = Raw_; + this.Algorithm = Algorithm_; + this.PublicKey = PublicKey_; + }); + authKeyId = $pkg.authKeyId = $newType(0, $kindStruct, "x509.authKeyId", true, "crypto/x509", false, function(Id_) { + this.$val = this; + if (arguments.length === 0) { + this.Id = sliceType$3.nil; + return; + } + this.Id = Id_; + }); + SignatureAlgorithm = $pkg.SignatureAlgorithm = $newType(4, $kindInt, "x509.SignatureAlgorithm", true, "crypto/x509", true, null); + PublicKeyAlgorithm = $pkg.PublicKeyAlgorithm = $newType(4, $kindInt, "x509.PublicKeyAlgorithm", true, "crypto/x509", true, null); + pssParameters = $pkg.pssParameters = $newType(0, $kindStruct, "x509.pssParameters", true, "crypto/x509", false, function(Hash_, MGF_, SaltLength_, TrailerField_) { + this.$val = this; + if (arguments.length === 0) { + this.Hash = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.MGF = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + this.SaltLength = 0; + this.TrailerField = 0; + return; + } + this.Hash = Hash_; + this.MGF = MGF_; + this.SaltLength = SaltLength_; + this.TrailerField = TrailerField_; + }); + KeyUsage = $pkg.KeyUsage = $newType(4, $kindInt, "x509.KeyUsage", true, "crypto/x509", true, null); + ExtKeyUsage = $pkg.ExtKeyUsage = $newType(4, $kindInt, "x509.ExtKeyUsage", true, "crypto/x509", true, null); + Certificate = $pkg.Certificate = $newType(0, $kindStruct, "x509.Certificate", true, "crypto/x509", true, function(Raw_, RawTBSCertificate_, RawSubjectPublicKeyInfo_, RawSubject_, RawIssuer_, Signature_, SignatureAlgorithm_, PublicKeyAlgorithm_, PublicKey_, Version_, SerialNumber_, Issuer_, Subject_, NotBefore_, NotAfter_, KeyUsage_, Extensions_, ExtraExtensions_, UnhandledCriticalExtensions_, ExtKeyUsage_, UnknownExtKeyUsage_, BasicConstraintsValid_, IsCA_, MaxPathLen_, MaxPathLenZero_, SubjectKeyId_, AuthorityKeyId_, OCSPServer_, IssuingCertificateURL_, DNSNames_, EmailAddresses_, IPAddresses_, URIs_, PermittedDNSDomainsCritical_, PermittedDNSDomains_, ExcludedDNSDomains_, PermittedIPRanges_, ExcludedIPRanges_, PermittedEmailAddresses_, ExcludedEmailAddresses_, PermittedURIDomains_, ExcludedURIDomains_, CRLDistributionPoints_, PolicyIdentifiers_) { + this.$val = this; + if (arguments.length === 0) { + this.Raw = sliceType$3.nil; + this.RawTBSCertificate = sliceType$3.nil; + this.RawSubjectPublicKeyInfo = sliceType$3.nil; + this.RawSubject = sliceType$3.nil; + this.RawIssuer = sliceType$3.nil; + this.Signature = sliceType$3.nil; + this.SignatureAlgorithm = 0; + this.PublicKeyAlgorithm = 0; + this.PublicKey = $ifaceNil; + this.Version = 0; + this.SerialNumber = ptrType$4.nil; + this.Issuer = new pkix.Name.ptr(sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, "", "", sliceType$17.nil, sliceType$17.nil); + this.Subject = new pkix.Name.ptr(sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, "", "", sliceType$17.nil, sliceType$17.nil); + this.NotBefore = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil); + this.NotAfter = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil); + this.KeyUsage = 0; + this.Extensions = sliceType$18.nil; + this.ExtraExtensions = sliceType$18.nil; + this.UnhandledCriticalExtensions = sliceType$19.nil; + this.ExtKeyUsage = sliceType$13.nil; + this.UnknownExtKeyUsage = sliceType$19.nil; + this.BasicConstraintsValid = false; + this.IsCA = false; + this.MaxPathLen = 0; + this.MaxPathLenZero = false; + this.SubjectKeyId = sliceType$3.nil; + this.AuthorityKeyId = sliceType$3.nil; + this.OCSPServer = sliceType$12.nil; + this.IssuingCertificateURL = sliceType$12.nil; + this.DNSNames = sliceType$12.nil; + this.EmailAddresses = sliceType$12.nil; + this.IPAddresses = sliceType$14.nil; + this.URIs = sliceType$15.nil; + this.PermittedDNSDomainsCritical = false; + this.PermittedDNSDomains = sliceType$12.nil; + this.ExcludedDNSDomains = sliceType$12.nil; + this.PermittedIPRanges = sliceType$16.nil; + this.ExcludedIPRanges = sliceType$16.nil; + this.PermittedEmailAddresses = sliceType$12.nil; + this.ExcludedEmailAddresses = sliceType$12.nil; + this.PermittedURIDomains = sliceType$12.nil; + this.ExcludedURIDomains = sliceType$12.nil; + this.CRLDistributionPoints = sliceType$12.nil; + this.PolicyIdentifiers = sliceType$19.nil; + return; + } + this.Raw = Raw_; + this.RawTBSCertificate = RawTBSCertificate_; + this.RawSubjectPublicKeyInfo = RawSubjectPublicKeyInfo_; + this.RawSubject = RawSubject_; + this.RawIssuer = RawIssuer_; + this.Signature = Signature_; + this.SignatureAlgorithm = SignatureAlgorithm_; + this.PublicKeyAlgorithm = PublicKeyAlgorithm_; + this.PublicKey = PublicKey_; + this.Version = Version_; + this.SerialNumber = SerialNumber_; + this.Issuer = Issuer_; + this.Subject = Subject_; + this.NotBefore = NotBefore_; + this.NotAfter = NotAfter_; + this.KeyUsage = KeyUsage_; + this.Extensions = Extensions_; + this.ExtraExtensions = ExtraExtensions_; + this.UnhandledCriticalExtensions = UnhandledCriticalExtensions_; + this.ExtKeyUsage = ExtKeyUsage_; + this.UnknownExtKeyUsage = UnknownExtKeyUsage_; + this.BasicConstraintsValid = BasicConstraintsValid_; + this.IsCA = IsCA_; + this.MaxPathLen = MaxPathLen_; + this.MaxPathLenZero = MaxPathLenZero_; + this.SubjectKeyId = SubjectKeyId_; + this.AuthorityKeyId = AuthorityKeyId_; + this.OCSPServer = OCSPServer_; + this.IssuingCertificateURL = IssuingCertificateURL_; + this.DNSNames = DNSNames_; + this.EmailAddresses = EmailAddresses_; + this.IPAddresses = IPAddresses_; + this.URIs = URIs_; + this.PermittedDNSDomainsCritical = PermittedDNSDomainsCritical_; + this.PermittedDNSDomains = PermittedDNSDomains_; + this.ExcludedDNSDomains = ExcludedDNSDomains_; + this.PermittedIPRanges = PermittedIPRanges_; + this.ExcludedIPRanges = ExcludedIPRanges_; + this.PermittedEmailAddresses = PermittedEmailAddresses_; + this.ExcludedEmailAddresses = ExcludedEmailAddresses_; + this.PermittedURIDomains = PermittedURIDomains_; + this.ExcludedURIDomains = ExcludedURIDomains_; + this.CRLDistributionPoints = CRLDistributionPoints_; + this.PolicyIdentifiers = PolicyIdentifiers_; + }); + InsecureAlgorithmError = $pkg.InsecureAlgorithmError = $newType(4, $kindInt, "x509.InsecureAlgorithmError", true, "crypto/x509", true, null); + ConstraintViolationError = $pkg.ConstraintViolationError = $newType(0, $kindStruct, "x509.ConstraintViolationError", true, "crypto/x509", true, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + UnhandledCriticalExtension = $pkg.UnhandledCriticalExtension = $newType(0, $kindStruct, "x509.UnhandledCriticalExtension", true, "crypto/x509", true, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + basicConstraints = $pkg.basicConstraints = $newType(0, $kindStruct, "x509.basicConstraints", true, "crypto/x509", false, function(IsCA_, MaxPathLen_) { + this.$val = this; + if (arguments.length === 0) { + this.IsCA = false; + this.MaxPathLen = 0; + return; + } + this.IsCA = IsCA_; + this.MaxPathLen = MaxPathLen_; + }); + policyInformation = $pkg.policyInformation = $newType(0, $kindStruct, "x509.policyInformation", true, "crypto/x509", false, function(Policy_) { + this.$val = this; + if (arguments.length === 0) { + this.Policy = asn1.ObjectIdentifier.nil; + return; + } + this.Policy = Policy_; + }); + authorityInfoAccess = $pkg.authorityInfoAccess = $newType(0, $kindStruct, "x509.authorityInfoAccess", true, "crypto/x509", false, function(Method_, Location_) { + this.$val = this; + if (arguments.length === 0) { + this.Method = asn1.ObjectIdentifier.nil; + this.Location = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + return; + } + this.Method = Method_; + this.Location = Location_; + }); + distributionPoint = $pkg.distributionPoint = $newType(0, $kindStruct, "x509.distributionPoint", true, "crypto/x509", false, function(DistributionPoint_, Reason_, CRLIssuer_) { + this.$val = this; + if (arguments.length === 0) { + this.DistributionPoint = new distributionPointName.ptr(sliceType$24.nil, pkix.RDNSequence.nil); + this.Reason = new asn1.BitString.ptr(sliceType$3.nil, 0); + this.CRLIssuer = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + return; + } + this.DistributionPoint = DistributionPoint_; + this.Reason = Reason_; + this.CRLIssuer = CRLIssuer_; + }); + distributionPointName = $pkg.distributionPointName = $newType(0, $kindStruct, "x509.distributionPointName", true, "crypto/x509", false, function(FullName_, RelativeName_) { + this.$val = this; + if (arguments.length === 0) { + this.FullName = sliceType$24.nil; + this.RelativeName = pkix.RDNSequence.nil; + return; + } + this.FullName = FullName_; + this.RelativeName = RelativeName_; + }); + ptrType = $ptrType(CertPool); + structType = $structType("crypto/x509", [{prop: "algo", name: "algo", embedded: false, exported: false, typ: SignatureAlgorithm, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "oid", name: "oid", embedded: false, exported: false, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "pubKeyAlgo", name: "pubKeyAlgo", embedded: false, exported: false, typ: PublicKeyAlgorithm, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: crypto.Hash, tag: ""}]); + sliceType$1 = $sliceType(structType); + structType$1 = $structType("crypto/x509", [{prop: "extKeyUsage", name: "extKeyUsage", embedded: false, exported: false, typ: ExtKeyUsage, tag: ""}, {prop: "oid", name: "oid", embedded: false, exported: false, typ: asn1.ObjectIdentifier, tag: ""}]); + sliceType$2 = $sliceType(structType$1); + sliceType$3 = $sliceType($Uint8); + sliceType$4 = $sliceType($Int); + ptrType$1 = $ptrType(Certificate); + sliceType$5 = $sliceType(ptrType$1); + ptrType$2 = $ptrType(pem.Block); + sliceType$6 = $sliceType(sliceType$3); + ptrType$4 = $ptrType(big.Int); + sliceType$7 = $sliceType(pkcs1AdditionalRSAPrime); + ptrType$5 = $ptrType(rsa.PrivateKey); + sliceType$8 = $sliceType(ptrType$4); + sliceType$9 = $sliceType(rsa.CRTValue); + ptrType$6 = $ptrType(rsa.PublicKey); + ptrType$7 = $ptrType(asn1.ObjectIdentifier); + sliceType$10 = $sliceType($emptyInterface); + ptrType$8 = $ptrType(ecdsa.PrivateKey); + sliceType$11 = $sliceType(sliceType$5); + sliceType$12 = $sliceType($String); + ptrType$9 = $ptrType($Int); + ptrType$10 = $ptrType(url.URL); + ptrType$11 = $ptrType(net.IPNet); + sliceType$13 = $sliceType(ExtKeyUsage); + ptrType$12 = $ptrType(ecdsa.PublicKey); + ptrType$13 = $ptrType(dsa.PublicKey); + ptrType$14 = $ptrType(ptrType$4); + sliceType$14 = $sliceType(net.IP); + sliceType$15 = $sliceType(ptrType$10); + ptrType$15 = $ptrType(cryptobyte.String); + ptrType$16 = $ptrType($Bool); + sliceType$16 = $sliceType(ptrType$11); + ptrType$17 = $ptrType(asn1$1.Tag); + sliceType$17 = $sliceType(pkix.AttributeTypeAndValue); + ptrType$18 = $ptrType(time.Location); + sliceType$18 = $sliceType(pkix.Extension); + sliceType$19 = $sliceType(asn1.ObjectIdentifier); + ptrType$19 = $ptrType(pkix.RDNSequence); + sliceType$20 = $sliceType(distributionPoint); + ptrType$20 = $ptrType(sliceType$20); + ptrType$21 = $ptrType(sliceType$19); + ptrType$22 = $ptrType(sliceType$3); + sliceType$21 = $sliceType(policyInformation); + ptrType$23 = $ptrType(sliceType$21); + sliceType$22 = $sliceType(authorityInfoAccess); + ptrType$24 = $ptrType(sliceType$22); + sliceType$24 = $sliceType(asn1.RawValue); + sliceType$25 = $sliceType(pkix.RevokedCertificate); + ptrType$27 = $ptrType(pkix.CertificateList); + mapType = $mapType($String, sliceType$4); + ptrType$31 = $ptrType(VerifyOptions); + funcType$1 = $funcType([$emptyInterface, $emptyInterface], [$Bool, $error], false); + mapType$1 = $mapType($Int, sliceType$11); + loadSystemRoots = function() { + return [ptrType.nil, errors.New("crypto/x509: system root pool is not available in GopherJS")]; + }; + NewCertPool = function() { + return new CertPool.ptr({}, {}, sliceType$5.nil); + }; + $pkg.NewCertPool = NewCertPool; + CertPool.ptr.prototype.findVerifiedParents = function(cert) { + var _entry, _entry$1, _i, _r$4, _ref, c, candidates, cert, err, errCert, parents, s, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _r$4 = $f._r$4; _ref = $f._ref; c = $f.c; candidates = $f.candidates; cert = $f.cert; err = $f.err; errCert = $f.errCert; parents = $f.parents; s = $f.s; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + parents = sliceType$4.nil; + errCert = ptrType$1.nil; + err = $ifaceNil; + s = this; + if (s === ptrType.nil) { + $s = -1; return [parents, errCert, err]; + } + candidates = sliceType$4.nil; + if (cert.AuthorityKeyId.$length > 0) { + candidates = (_entry = s.bySubjectKeyId[$String.keyFor(($bytesToString(cert.AuthorityKeyId)))], _entry !== undefined ? _entry.v : sliceType$4.nil); + } + if (candidates.$length === 0) { + candidates = (_entry$1 = s.byName[$String.keyFor(($bytesToString(cert.RawIssuer)))], _entry$1 !== undefined ? _entry$1.v : sliceType$4.nil); + } + _ref = candidates; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$4 = cert.CheckSignatureFrom((x = s.certs, ((c < 0 || c >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + c]))); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if ($interfaceIsEqual(err, $ifaceNil)) { + parents = $append(parents, c); + } else { + errCert = (x$1 = s.certs, ((c < 0 || c >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + c])); + } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return [parents, errCert, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: CertPool.ptr.prototype.findVerifiedParents }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._r$4 = _r$4; $f._ref = _ref; $f.c = c; $f.candidates = candidates; $f.cert = cert; $f.err = err; $f.errCert = errCert; $f.parents = parents; $f.s = s; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + CertPool.prototype.findVerifiedParents = function(cert) { return this.$val.findVerifiedParents(cert); }; + CertPool.ptr.prototype.contains = function(cert) { + var _entry, _i, _ref, c, candidates, cert, s, x; + s = this; + if (s === ptrType.nil) { + return false; + } + candidates = (_entry = s.byName[$String.keyFor(($bytesToString(cert.RawSubject)))], _entry !== undefined ? _entry.v : sliceType$4.nil); + _ref = candidates; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((x = s.certs, ((c < 0 || c >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + c])).Equal(cert)) { + return true; + } + _i++; + } + return false; + }; + CertPool.prototype.contains = function(cert) { return this.$val.contains(cert); }; + CertPool.ptr.prototype.AddCert = function(cert) { + var _entry, _entry$1, _key, _key$1, cert, keyId, n, name, s; + s = this; + if (cert === ptrType$1.nil) { + $panic(new $String("adding nil Certificate to CertPool")); + } + if (s.contains(cert)) { + return; + } + n = s.certs.$length; + s.certs = $append(s.certs, cert); + if (cert.SubjectKeyId.$length > 0) { + keyId = ($bytesToString(cert.SubjectKeyId)); + _key = keyId; (s.bySubjectKeyId || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = s.bySubjectKeyId[$String.keyFor(keyId)], _entry !== undefined ? _entry.v : sliceType$4.nil), n) }; + } + name = ($bytesToString(cert.RawSubject)); + _key$1 = name; (s.byName || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = s.byName[$String.keyFor(name)], _entry$1 !== undefined ? _entry$1.v : sliceType$4.nil), n) }; + }; + CertPool.prototype.AddCert = function(cert) { return this.$val.AddCert(cert); }; + CertPool.ptr.prototype.AppendCertsFromPEM = function(pemCerts) { + var _r$4, _r$5, _tuple, _tuple$1, block, cert, err, ok, pemCerts, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; block = $f.block; cert = $f.cert; err = $f.err; ok = $f.ok; pemCerts = $f.pemCerts; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ok = false; + s = this; + /* while (true) { */ case 1: + /* if (!(pemCerts.$length > 0)) { break; } */ if(!(pemCerts.$length > 0)) { $s = 2; continue; } + block = ptrType$2.nil; + _r$4 = pem.Decode(pemCerts); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + block = _tuple[0]; + pemCerts = _tuple[1]; + if (block === ptrType$2.nil) { + /* break; */ $s = 2; continue; + } + /* */ if (!(block.Type === "CERTIFICATE") || !(($keys(block.Headers).length === 0))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(block.Type === "CERTIFICATE") || !(($keys(block.Headers).length === 0))) { */ case 4: + /* continue; */ $s = 1; continue; + /* } */ case 5: + _r$5 = ParseCertificate(block.Bytes); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + cert = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* continue; */ $s = 1; continue; + } + s.AddCert(cert); + ok = true; + /* } */ $s = 1; continue; case 2: + $s = -1; return ok; + /* */ } return; } if ($f === undefined) { $f = { $blk: CertPool.ptr.prototype.AppendCertsFromPEM }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.block = block; $f.cert = cert; $f.err = err; $f.ok = ok; $f.pemCerts = pemCerts; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + CertPool.prototype.AppendCertsFromPEM = function(pemCerts) { return this.$val.AppendCertsFromPEM(pemCerts); }; + CertPool.ptr.prototype.Subjects = function() { + var _i, _ref, c, i, res, s; + s = this; + res = $makeSlice(sliceType$6, s.certs.$length); + _ref = s.certs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= res.$length) ? ($throwRuntimeError("index out of range"), undefined) : res.$array[res.$offset + i] = c.RawSubject); + _i++; + } + return res; + }; + CertPool.prototype.Subjects = function() { return this.$val.Subjects(); }; + ParsePKCS1PrivateKey = function(der) { + var _i, _r$4, _r$5, _ref, _tuple, a, der, err, i, key, priv, rest, x, x$1, x$2, x$3, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tuple = $f._tuple; a = $f.a; der = $f.der; err = $f.err; i = $f.i; key = $f.key; priv = $f.priv; rest = $f.rest; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + priv = [priv]; + priv[0] = new pkcs1PrivateKey.ptr(0, ptrType$4.nil, 0, ptrType$4.nil, ptrType$4.nil, ptrType$4.nil, ptrType$4.nil, ptrType$4.nil, ptrType$4.nil, sliceType$7.nil); + _r$4 = asn1.Unmarshal(der, priv[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rest = _tuple[0]; + err = _tuple[1]; + if (rest.$length > 0) { + $s = -1; return [ptrType$5.nil, (x = new asn1.SyntaxError.ptr("trailing data"), new x.constructor.elem(x))]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$5.nil, err]; + } + if (priv[0].Version > 1) { + $s = -1; return [ptrType$5.nil, errors.New("x509: unsupported private key version")]; + } + if (priv[0].N.Sign() <= 0 || priv[0].D.Sign() <= 0 || priv[0].P.Sign() <= 0 || priv[0].Q.Sign() <= 0) { + $s = -1; return [ptrType$5.nil, errors.New("x509: private key contains zero or negative value")]; + } + key = new rsa.PrivateKey.ptr(new rsa.PublicKey.ptr(ptrType$4.nil, 0), ptrType$4.nil, sliceType$8.nil, new rsa.PrecomputedValues.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$4.nil, sliceType$9.nil)); + rsa.PublicKey.copy(key.PublicKey, new rsa.PublicKey.ptr(priv[0].N, priv[0].E)); + key.D = priv[0].D; + key.Primes = $makeSlice(sliceType$8, (2 + priv[0].AdditionalPrimes.$length >> 0)); + (x$1 = key.Primes, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = priv[0].P)); + (x$2 = key.Primes, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1] = priv[0].Q)); + _ref = priv[0].AdditionalPrimes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + a = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkcs1AdditionalRSAPrime); + if (a.Prime.Sign() <= 0) { + $s = -1; return [ptrType$5.nil, errors.New("x509: private key contains zero or negative prime")]; + } + (x$3 = key.Primes, x$4 = i + 2 >> 0, ((x$4 < 0 || x$4 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + x$4] = a.Prime)); + _i++; + } + _r$5 = key.Validate(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$5.nil, err]; + } + $r = key.Precompute(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [key, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParsePKCS1PrivateKey }; } $f._i = _i; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tuple = _tuple; $f.a = a; $f.der = der; $f.err = err; $f.i = i; $f.key = key; $f.priv = priv; $f.rest = rest; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParsePKCS1PrivateKey = ParsePKCS1PrivateKey; + ParsePKCS8PrivateKey = function(der) { + var _r$10, _r$11, _r$12, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, bytes$1, der, err, err$1, err$2, key, namedCurveOID, privKey, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; bytes$1 = $f.bytes$1; der = $f.der; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; key = $f.key; namedCurveOID = $f.namedCurveOID; privKey = $f.privKey; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + privKey = [privKey]; + key = $ifaceNil; + err = $ifaceNil; + privKey[0] = new pkcs8.ptr(0, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), sliceType$3.nil); + _r$4 = asn1.Unmarshal(der, privKey[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = $ifaceNil; + _tmp$1 = err$1; + key = _tmp; + err = _tmp$1; + $s = -1; return [key, err]; + } + /* */ if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyRSA)) { $s = 3; continue; } + /* */ if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyECDSA)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyRSA)) { */ case 3: + _r$5 = ParsePKCS1PrivateKey(privKey[0].PrivateKey); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + key = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: + _tmp$2 = $ifaceNil; + _r$6 = err.Error(); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = errors.New("x509: failed to parse RSA private key embedded in PKCS#8: " + _r$6); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tmp$3 = _r$7; + key = _tmp$2; + err = _tmp$3; + $s = -1; return [key, err]; + /* } */ case 9: + _tmp$4 = key; + _tmp$5 = $ifaceNil; + key = _tmp$4; + err = _tmp$5; + $s = -1; return [key, err]; + /* } else if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyECDSA)) { */ case 4: + bytes$1 = privKey[0].Algo.Parameters.FullBytes; + namedCurveOID = $newDataPointer(asn1.ObjectIdentifier.nil, ptrType$7); + _r$8 = asn1.Unmarshal(bytes$1, namedCurveOID); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$2 = _r$8; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + namedCurveOID = ptrType$7.nil; + } + _r$9 = parseECPrivateKey(namedCurveOID, privKey[0].PrivateKey); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$3 = _r$9; + key = _tuple$3[0]; + err = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: + _tmp$6 = $ifaceNil; + _r$10 = err.Error(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$11 = errors.New("x509: failed to parse EC private key embedded in PKCS#8: " + _r$10); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tmp$7 = _r$11; + key = _tmp$6; + err = _tmp$7; + $s = -1; return [key, err]; + /* } */ case 15: + _tmp$8 = key; + _tmp$9 = $ifaceNil; + key = _tmp$8; + err = _tmp$9; + $s = -1; return [key, err]; + /* } else { */ case 5: + _tmp$10 = $ifaceNil; + _r$12 = fmt.Errorf("x509: PKCS#8 wrapping contained private key with unknown algorithm: %v", new sliceType$10([privKey[0].Algo.Algorithm])); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tmp$11 = _r$12; + key = _tmp$10; + err = _tmp$11; + $s = -1; return [key, err]; + /* } */ case 6: + case 2: + $s = -1; return [key, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParsePKCS8PrivateKey }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.bytes$1 = bytes$1; $f.der = der; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.key = key; $f.namedCurveOID = namedCurveOID; $f.privKey = privKey; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParsePKCS8PrivateKey = ParsePKCS8PrivateKey; + systemRootsPool = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = once.Do(initSystemRoots); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return systemRoots; + /* */ } return; } if ($f === undefined) { $f = { $blk: systemRootsPool }; } $f.$s = $s; $f.$r = $r; return $f; + }; + initSystemRoots = function() { + var _tuple; + _tuple = loadSystemRoots(); + systemRoots = _tuple[0]; + systemRootsErr = _tuple[1]; + if (!($interfaceIsEqual(systemRootsErr, $ifaceNil))) { + systemRoots = ptrType.nil; + } + }; + Certificate.ptr.prototype.systemVerify = function(opts) { + var _tmp, _tmp$1, c, chains, err, opts; + chains = sliceType$11.nil; + err = $ifaceNil; + c = this; + _tmp = sliceType$11.nil; + _tmp$1 = $ifaceNil; + chains = _tmp; + err = _tmp$1; + return [chains, err]; + }; + Certificate.prototype.systemVerify = function(opts) { return this.$val.systemVerify(opts); }; + ParseECPrivateKey = function(der) { + var _r$4, der, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; der = $f.der; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$4 = parseECPrivateKey(ptrType$7.nil, der); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParseECPrivateKey }; } $f._r$4 = _r$4; $f.der = der; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParseECPrivateKey = ParseECPrivateKey; + parseECPrivateKey = function(namedCurveOID, der) { + var _q, _r$10, _r$11, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, curve, curveOrder, der, err, err$1, k, key, namedCurveOID, priv, privKey, privateKey, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; curve = $f.curve; curveOrder = $f.curveOrder; der = $f.der; err = $f.err; err$1 = $f.err$1; k = $f.k; key = $f.key; namedCurveOID = $f.namedCurveOID; priv = $f.priv; privKey = $f.privKey; privateKey = $f.privateKey; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + privKey = [privKey]; + key = ptrType$8.nil; + err = $ifaceNil; + privKey[0] = new ecPrivateKey.ptr(0, sliceType$3.nil, asn1.ObjectIdentifier.nil, new asn1.BitString.ptr(sliceType$3.nil, 0)); + _r$4 = asn1.Unmarshal(der, privKey[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + err$1 = _tuple[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 2: + _tmp = ptrType$8.nil; + _r$5 = err$1.Error(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = errors.New("x509: failed to parse EC private key: " + _r$5); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tmp$1 = _r$6; + key = _tmp; + err = _tmp$1; + $s = -1; return [key, err]; + /* } */ case 3: + /* */ if (!((privKey[0].Version === 1))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((privKey[0].Version === 1))) { */ case 6: + _tmp$2 = ptrType$8.nil; + _r$7 = fmt.Errorf("x509: unknown EC private key version %d", new sliceType$10([new $Int(privKey[0].Version)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tmp$3 = _r$7; + key = _tmp$2; + err = _tmp$3; + $s = -1; return [key, err]; + /* } */ case 7: + curve = $ifaceNil; + /* */ if (!(namedCurveOID === ptrType$7.nil)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(namedCurveOID === ptrType$7.nil)) { */ case 9: + _r$8 = namedCurveFromOID(namedCurveOID.$get()); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + curve = _r$8; + $s = 11; continue; + /* } else { */ case 10: + _r$9 = namedCurveFromOID(privKey[0].NamedCurveOID); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + curve = _r$9; + /* } */ case 11: + if ($interfaceIsEqual(curve, $ifaceNil)) { + _tmp$4 = ptrType$8.nil; + _tmp$5 = errors.New("x509: unknown elliptic curve"); + key = _tmp$4; + err = _tmp$5; + $s = -1; return [key, err]; + } + k = new big.Int.ptr(false, big.nat.nil).SetBytes(privKey[0].PrivateKey); + _r$10 = curve.Params(); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + curveOrder = _r$10.N; + if (k.Cmp(curveOrder) >= 0) { + _tmp$6 = ptrType$8.nil; + _tmp$7 = errors.New("x509: invalid elliptic curve private key value"); + key = _tmp$6; + err = _tmp$7; + $s = -1; return [key, err]; + } + priv = new ecdsa.PrivateKey.ptr(new ecdsa.PublicKey.ptr($ifaceNil, ptrType$4.nil, ptrType$4.nil), ptrType$4.nil); + priv.PublicKey.Curve = curve; + priv.D = k; + privateKey = $makeSlice(sliceType$3, (_q = ((curveOrder.BitLen() + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + while (true) { + if (!(privKey[0].PrivateKey.$length > privateKey.$length)) { break; } + if (!(((x = privKey[0].PrivateKey, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 0))) { + _tmp$8 = ptrType$8.nil; + _tmp$9 = errors.New("x509: invalid private key length"); + key = _tmp$8; + err = _tmp$9; + $s = -1; return [key, err]; + } + privKey[0].PrivateKey = $subslice(privKey[0].PrivateKey, 1); + } + $copySlice($subslice(privateKey, (privateKey.$length - privKey[0].PrivateKey.$length >> 0)), privKey[0].PrivateKey); + _r$11 = curve.ScalarBaseMult(privateKey); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$1 = _r$11; + priv.PublicKey.X = _tuple$1[0]; + priv.PublicKey.Y = _tuple$1[1]; + _tmp$10 = priv; + _tmp$11 = $ifaceNil; + key = _tmp$10; + err = _tmp$11; + $s = -1; return [key, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseECPrivateKey }; } $f._q = _q; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.curve = curve; $f.curveOrder = curveOrder; $f.der = der; $f.err = err; $f.err$1 = err$1; $f.k = k; $f.key = key; $f.namedCurveOID = namedCurveOID; $f.priv = priv; $f.privKey = privKey; $f.privateKey = privateKey; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + CertificateInvalidError.ptr.prototype.Error = function() { + var _1, e; + e = this; + _1 = e.Reason; + if (_1 === (0)) { + return "x509: certificate is not authorized to sign other certificates"; + } else if (_1 === (1)) { + return "x509: certificate has expired or is not yet valid"; + } else if (_1 === (2)) { + return "x509: a root or intermediate certificate is not authorized to sign for this name: " + e.Detail; + } else if (_1 === (9)) { + return "x509: a root or intermediate certificate is not authorized for an extended key usage: " + e.Detail; + } else if (_1 === (3)) { + return "x509: too many intermediates for path length constraint"; + } else if (_1 === (4)) { + return "x509: certificate specifies an incompatible key usage"; + } else if (_1 === (5)) { + return "x509: issuer name does not match subject from issuing certificate"; + } else if (_1 === (6)) { + return "x509: issuer has name constraints but leaf doesn't have a SAN extension"; + } else if (_1 === (7)) { + return "x509: issuer has name constraints but leaf contains unknown or unconstrained name: " + e.Detail; + } + return "x509: unknown error"; + }; + CertificateInvalidError.prototype.Error = function() { return this.$val.Error(); }; + HostnameError.ptr.prototype.Error = function() { + var _i, _ref, c, h, ip, san, valid; + h = this; + c = h.Certificate; + if (!c.hasSANExtension() && !validHostname(c.Subject.CommonName) && matchHostnames(toLowerCaseASCII(c.Subject.CommonName), toLowerCaseASCII(h.Host))) { + return "x509: Common Name is not a valid hostname: " + c.Subject.CommonName; + } + valid = ""; + ip = net.ParseIP(h.Host); + if (!(ip === net.IP.nil)) { + if (c.IPAddresses.$length === 0) { + return "x509: cannot validate certificate for " + h.Host + " because it doesn't contain any IP SANs"; + } + _ref = c.IPAddresses; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + san = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (valid.length > 0) { + valid = valid + (", "); + } + valid = valid + (san.String()); + _i++; + } + } else { + if (c.commonNameAsHostname()) { + valid = c.Subject.CommonName; + } else { + valid = strings.Join(c.DNSNames, ", "); + } + } + if (valid.length === 0) { + return "x509: certificate is not valid for any names, but wanted to match " + h.Host; + } + return "x509: certificate is valid for " + valid + ", not " + h.Host; + }; + HostnameError.prototype.Error = function() { return this.$val.Error(); }; + UnknownAuthorityError.ptr.prototype.Error = function() { + var _r$4, _r$5, certName, e, s, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; certName = $f.certName; e = $f.e; s = $f.s; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + s = "x509: certificate signed by unknown authority"; + /* */ if (!($interfaceIsEqual(e.hintErr, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(e.hintErr, $ifaceNil))) { */ case 1: + certName = e.hintCert.Subject.CommonName; + /* */ if (certName.length === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (certName.length === 0) { */ case 3: + /* */ if (e.hintCert.Subject.Organization.$length > 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (e.hintCert.Subject.Organization.$length > 0) { */ case 5: + certName = (x = e.hintCert.Subject.Organization, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + $s = 7; continue; + /* } else { */ case 6: + _r$4 = e.hintCert.SerialNumber.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + certName = "serial:" + _r$4; + /* } */ case 7: + /* } */ case 4: + _r$5 = fmt.Sprintf(" (possibly because of %q while trying to verify candidate authority certificate %q)", new sliceType$10([e.hintErr, new $String(certName)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + s = s + (_r$5); + /* } */ case 2: + $s = -1; return s; + /* */ } return; } if ($f === undefined) { $f = { $blk: UnknownAuthorityError.ptr.prototype.Error }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f.certName = certName; $f.e = e; $f.s = s; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + UnknownAuthorityError.prototype.Error = function() { return this.$val.Error(); }; + SystemRootsError.ptr.prototype.Error = function() { + var _r$4, msg, se, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; msg = $f.msg; se = $f.se; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + se = this; + msg = "x509: failed to load system roots and no roots provided"; + /* */ if (!($interfaceIsEqual(se.Err, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(se.Err, $ifaceNil))) { */ case 1: + _r$4 = se.Err.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return msg + "; " + _r$4; + /* } */ case 2: + $s = -1; return msg; + /* */ } return; } if ($f === undefined) { $f = { $blk: SystemRootsError.ptr.prototype.Error }; } $f._r$4 = _r$4; $f.msg = msg; $f.se = se; $f.$s = $s; $f.$r = $r; return $f; + }; + SystemRootsError.prototype.Error = function() { return this.$val.Error(); }; + parseRFC2821Mailbox = function(in$1) { + var _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, c$1, in$1, localPartBytes, mailbox, ok, ok$1, twoDots, x; + mailbox = new rfc2821Mailbox.ptr("", ""); + ok = false; + if (in$1.length === 0) { + _tmp = $clone(mailbox, rfc2821Mailbox); + _tmp$1 = false; + rfc2821Mailbox.copy(mailbox, _tmp); + ok = _tmp$1; + return [mailbox, ok]; + } + localPartBytes = $makeSlice(sliceType$3, 0, (_q = in$1.length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + if (in$1.charCodeAt(0) === 34) { + in$1 = $substring(in$1, 1); + QuotedString: + while (true) { + if (in$1.length === 0) { + _tmp$2 = $clone(mailbox, rfc2821Mailbox); + _tmp$3 = false; + rfc2821Mailbox.copy(mailbox, _tmp$2); + ok = _tmp$3; + return [mailbox, ok]; + } + c = in$1.charCodeAt(0); + in$1 = $substring(in$1, 1); + if ((c === 34)) { + break QuotedString; + } else if ((c === 92)) { + if (in$1.length === 0) { + _tmp$4 = $clone(mailbox, rfc2821Mailbox); + _tmp$5 = false; + rfc2821Mailbox.copy(mailbox, _tmp$4); + ok = _tmp$5; + return [mailbox, ok]; + } + if ((in$1.charCodeAt(0) === 11) || (in$1.charCodeAt(0) === 12) || (1 <= in$1.charCodeAt(0) && in$1.charCodeAt(0) <= 9) || (14 <= in$1.charCodeAt(0) && in$1.charCodeAt(0) <= 127)) { + localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); + in$1 = $substring(in$1, 1); + } else { + _tmp$6 = $clone(mailbox, rfc2821Mailbox); + _tmp$7 = false; + rfc2821Mailbox.copy(mailbox, _tmp$6); + ok = _tmp$7; + return [mailbox, ok]; + } + } else if ((c === 11) || (c === 12) || (c === 32) || (c === 33) || (c === 127) || (1 <= c && c <= 8) || (14 <= c && c <= 31) || (35 <= c && c <= 91) || (93 <= c && c <= 126)) { + localPartBytes = $append(localPartBytes, c); + } else { + _tmp$8 = $clone(mailbox, rfc2821Mailbox); + _tmp$9 = false; + rfc2821Mailbox.copy(mailbox, _tmp$8); + ok = _tmp$9; + return [mailbox, ok]; + } + } + } else { + NextChar: + while (true) { + if (!(in$1.length > 0)) { break; } + c$1 = in$1.charCodeAt(0); + if ((c$1 === 92)) { + in$1 = $substring(in$1, 1); + if (in$1.length === 0) { + _tmp$10 = $clone(mailbox, rfc2821Mailbox); + _tmp$11 = false; + rfc2821Mailbox.copy(mailbox, _tmp$10); + ok = _tmp$11; + return [mailbox, ok]; + } + localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); + in$1 = $substring(in$1, 1); + } else if ((48 <= c$1 && c$1 <= 57) || (97 <= c$1 && c$1 <= 122) || (65 <= c$1 && c$1 <= 90) || (c$1 === 33) || (c$1 === 35) || (c$1 === 36) || (c$1 === 37) || (c$1 === 38) || (c$1 === 39) || (c$1 === 42) || (c$1 === 43) || (c$1 === 45) || (c$1 === 47) || (c$1 === 61) || (c$1 === 63) || (c$1 === 94) || (c$1 === 95) || (c$1 === 96) || (c$1 === 123) || (c$1 === 124) || (c$1 === 125) || (c$1 === 126) || (c$1 === 46)) { + localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); + in$1 = $substring(in$1, 1); + } else { + break NextChar; + } + } + if (localPartBytes.$length === 0) { + _tmp$12 = $clone(mailbox, rfc2821Mailbox); + _tmp$13 = false; + rfc2821Mailbox.copy(mailbox, _tmp$12); + ok = _tmp$13; + return [mailbox, ok]; + } + twoDots = new sliceType$3([46, 46]); + if (((0 >= localPartBytes.$length ? ($throwRuntimeError("index out of range"), undefined) : localPartBytes.$array[localPartBytes.$offset + 0]) === 46) || ((x = localPartBytes.$length - 1 >> 0, ((x < 0 || x >= localPartBytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : localPartBytes.$array[localPartBytes.$offset + x])) === 46) || bytes.Contains(localPartBytes, twoDots)) { + _tmp$14 = $clone(mailbox, rfc2821Mailbox); + _tmp$15 = false; + rfc2821Mailbox.copy(mailbox, _tmp$14); + ok = _tmp$15; + return [mailbox, ok]; + } + } + if ((in$1.length === 0) || !((in$1.charCodeAt(0) === 64))) { + _tmp$16 = $clone(mailbox, rfc2821Mailbox); + _tmp$17 = false; + rfc2821Mailbox.copy(mailbox, _tmp$16); + ok = _tmp$17; + return [mailbox, ok]; + } + in$1 = $substring(in$1, 1); + _tuple = domainToReverseLabels(in$1); + ok$1 = _tuple[1]; + if (!ok$1) { + _tmp$18 = $clone(mailbox, rfc2821Mailbox); + _tmp$19 = false; + rfc2821Mailbox.copy(mailbox, _tmp$18); + ok = _tmp$19; + return [mailbox, ok]; + } + mailbox.local = ($bytesToString(localPartBytes)); + mailbox.domain = in$1; + _tmp$20 = $clone(mailbox, rfc2821Mailbox); + _tmp$21 = true; + rfc2821Mailbox.copy(mailbox, _tmp$20); + ok = _tmp$21; + return [mailbox, ok]; + }; + domainToReverseLabels = function(domain) { + var _i, _i$1, _ref, _ref$1, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, c, domain, i, label, ok, reverseLabels; + reverseLabels = sliceType$12.nil; + ok = false; + while (true) { + if (!(domain.length > 0)) { break; } + i = strings.LastIndexByte(domain, 46); + if (i === -1) { + reverseLabels = $append(reverseLabels, domain); + domain = ""; + } else { + reverseLabels = $append(reverseLabels, $substring(domain, (i + 1 >> 0), domain.length)); + domain = $substring(domain, 0, i); + } + } + if (reverseLabels.$length > 0 && ((0 >= reverseLabels.$length ? ($throwRuntimeError("index out of range"), undefined) : reverseLabels.$array[reverseLabels.$offset + 0]).length === 0)) { + _tmp = sliceType$12.nil; + _tmp$1 = false; + reverseLabels = _tmp; + ok = _tmp$1; + return [reverseLabels, ok]; + } + _ref = reverseLabels; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + label = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (label.length === 0) { + _tmp$2 = sliceType$12.nil; + _tmp$3 = false; + reverseLabels = _tmp$2; + ok = _tmp$3; + return [reverseLabels, ok]; + } + _ref$1 = label; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune = $decodeRune(_ref$1, _i$1); + c = _rune[0]; + if (c < 33 || c > 126) { + _tmp$4 = sliceType$12.nil; + _tmp$5 = false; + reverseLabels = _tmp$4; + ok = _tmp$5; + return [reverseLabels, ok]; + } + _i$1 += _rune[1]; + } + _i++; + } + _tmp$6 = reverseLabels; + _tmp$7 = true; + reverseLabels = _tmp$6; + ok = _tmp$7; + return [reverseLabels, ok]; + }; + matchEmailConstraint = function(mailbox, constraint) { + var _r$4, _r$5, _tuple, constraint, constraintMailbox, mailbox, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; constraint = $f.constraint; constraintMailbox = $f.constraintMailbox; mailbox = $f.mailbox; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (strings.Contains(constraint, "@")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (strings.Contains(constraint, "@")) { */ case 1: + _tuple = parseRFC2821Mailbox(constraint); + constraintMailbox = $clone(_tuple[0], rfc2821Mailbox); + ok = _tuple[1]; + /* */ if (!ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!ok) { */ case 3: + _r$4 = fmt.Errorf("x509: internal error: cannot parse constraint %q", new sliceType$10([new $String(constraint)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [false, _r$4]; + /* } */ case 4: + $s = -1; return [mailbox.local === constraintMailbox.local && strings.EqualFold(mailbox.domain, constraintMailbox.domain), $ifaceNil]; + /* } */ case 2: + _r$5 = matchDomainConstraint(mailbox.domain, constraint); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* */ } return; } if ($f === undefined) { $f = { $blk: matchEmailConstraint }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.constraint = constraint; $f.constraintMailbox = constraintMailbox; $f.mailbox = mailbox; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + matchURIConstraint = function(uri, constraint) { + var _r$4, _r$5, _r$6, _r$7, _tuple, constraint, err, host, uri, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; constraint = $f.constraint; err = $f.err; host = $f.host; uri = $f.uri; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + host = uri.Host; + /* */ if (host.length === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (host.length === 0) { */ case 1: + _r$4 = fmt.Errorf("URI with empty host (%q) cannot be matched against constraints", new sliceType$10([new $String(uri.String())])); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [false, _r$4]; + /* } */ case 2: + /* */ if (strings.Contains(host, ":") && !strings.HasSuffix(host, "]")) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (strings.Contains(host, ":") && !strings.HasSuffix(host, "]")) { */ case 4: + err = $ifaceNil; + _r$5 = net.SplitHostPort(uri.Host); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple = _r$5; + host = _tuple[0]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [false, err]; + } + /* } */ case 5: + /* */ if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") || !(net.ParseIP(host) === net.IP.nil)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") || !(net.ParseIP(host) === net.IP.nil)) { */ case 7: + _r$6 = fmt.Errorf("URI with IP (%q) cannot be matched against constraints", new sliceType$10([new $String(uri.String())])); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [false, _r$6]; + /* } */ case 8: + _r$7 = matchDomainConstraint(host, constraint); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* */ } return; } if ($f === undefined) { $f = { $blk: matchURIConstraint }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f.constraint = constraint; $f.err = err; $f.host = host; $f.uri = uri; $f.$s = $s; $f.$r = $r; return $f; + }; + matchIPConstraint = function(ip, constraint) { + var _i, _ref, constraint, i, ip, mask, x, x$1; + if (!((ip.$length === constraint.IP.$length))) { + return [false, $ifaceNil]; + } + _ref = ip; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + mask = (x = constraint.Mask, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); + if (!((((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & mask) >>> 0) === (((x$1 = constraint.IP, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])) & mask) >>> 0)))) { + return [false, $ifaceNil]; + } + _i++; + } + return [true, $ifaceNil]; + }; + matchDomainConstraint = function(domain, constraint) { + var _i, _r$4, _r$5, _ref, _tuple, _tuple$1, constraint, constraintLabel, constraintLabels, domain, domainLabels, i, mustHaveSubdomains, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; constraint = $f.constraint; constraintLabel = $f.constraintLabel; constraintLabels = $f.constraintLabels; domain = $f.domain; domainLabels = $f.domainLabels; i = $f.i; mustHaveSubdomains = $f.mustHaveSubdomains; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (constraint.length === 0) { + $s = -1; return [true, $ifaceNil]; + } + _tuple = domainToReverseLabels(domain); + domainLabels = _tuple[0]; + ok = _tuple[1]; + /* */ if (!ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!ok) { */ case 1: + _r$4 = fmt.Errorf("x509: internal error: cannot parse domain %q", new sliceType$10([new $String(domain)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [false, _r$4]; + /* } */ case 2: + mustHaveSubdomains = false; + if (constraint.charCodeAt(0) === 46) { + mustHaveSubdomains = true; + constraint = $substring(constraint, 1); + } + _tuple$1 = domainToReverseLabels(constraint); + constraintLabels = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!ok) { */ case 4: + _r$5 = fmt.Errorf("x509: internal error: cannot parse domain %q", new sliceType$10([new $String(constraint)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [false, _r$5]; + /* } */ case 5: + if (domainLabels.$length < constraintLabels.$length || (mustHaveSubdomains && (domainLabels.$length === constraintLabels.$length))) { + $s = -1; return [false, $ifaceNil]; + } + _ref = constraintLabels; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + constraintLabel = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!strings.EqualFold(constraintLabel, ((i < 0 || i >= domainLabels.$length) ? ($throwRuntimeError("index out of range"), undefined) : domainLabels.$array[domainLabels.$offset + i]))) { + $s = -1; return [false, $ifaceNil]; + } + _i++; + } + $s = -1; return [true, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: matchDomainConstraint }; } $f._i = _i; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.constraint = constraint; $f.constraintLabel = constraintLabel; $f.constraintLabels = constraintLabels; $f.domain = domain; $f.domainLabels = domainLabels; $f.i = i; $f.mustHaveSubdomains = mustHaveSubdomains; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.ptr.prototype.checkNameConstraints = function(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded) { + var _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, constraint, constraint$1, count, err, err$1, excluded, excludedValue, i, i$1, match, match$1, maxConstraintComparisons, name, nameType, ok, parsedName, permitted, permittedValue, x, x$1, x$2, x$3, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; constraint = $f.constraint; constraint$1 = $f.constraint$1; count = $f.count; err = $f.err; err$1 = $f.err$1; excluded = $f.excluded; excludedValue = $f.excludedValue; i = $f.i; i$1 = $f.i$1; match = $f.match; match$1 = $f.match$1; maxConstraintComparisons = $f.maxConstraintComparisons; name = $f.name; nameType = $f.nameType; ok = $f.ok; parsedName = $f.parsedName; permitted = $f.permitted; permittedValue = $f.permittedValue; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$4 = reflect.ValueOf(excluded); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + excludedValue = _r$4; + count.$set(count.$get() + ($clone(excludedValue, reflect.Value).Len()) >> 0); + if (count.$get() > maxConstraintComparisons) { + $s = -1; return (x = new CertificateInvalidError.ptr(c, 8, ""), new x.constructor.elem(x)); + } + i = 0; + /* while (true) { */ case 2: + /* if (!(i < $clone(excludedValue, reflect.Value).Len())) { break; } */ if(!(i < $clone(excludedValue, reflect.Value).Len())) { $s = 3; continue; } + _r$5 = $clone(excludedValue, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + constraint = _r$6; + _r$7 = match(parsedName, constraint); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple = _r$7; + match$1 = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: + _r$8 = err.Error(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return (x$1 = new CertificateInvalidError.ptr(c, 2, _r$8), new x$1.constructor.elem(x$1)); + /* } */ case 8: + /* */ if (match$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (match$1) { */ case 10: + _r$9 = fmt.Sprintf("%s %q is excluded by constraint %q", new sliceType$10([new $String(nameType), new $String(name), constraint])); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return (x$2 = new CertificateInvalidError.ptr(c, 2, _r$9), new x$2.constructor.elem(x$2)); + /* } */ case 11: + i = i + (1) >> 0; + /* } */ $s = 2; continue; case 3: + _r$10 = reflect.ValueOf(permitted); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + permittedValue = _r$10; + count.$set(count.$get() + ($clone(permittedValue, reflect.Value).Len()) >> 0); + if (count.$get() > maxConstraintComparisons) { + $s = -1; return (x$3 = new CertificateInvalidError.ptr(c, 8, ""), new x$3.constructor.elem(x$3)); + } + ok = true; + i$1 = 0; + /* while (true) { */ case 14: + /* if (!(i$1 < $clone(permittedValue, reflect.Value).Len())) { break; } */ if(!(i$1 < $clone(permittedValue, reflect.Value).Len())) { $s = 15; continue; } + _r$11 = $clone(permittedValue, reflect.Value).Index(i$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = $clone(_r$11, reflect.Value).Interface(); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + constraint$1 = _r$12; + err$1 = $ifaceNil; + _r$13 = match(parsedName, constraint$1); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$1 = _r$13; + ok = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 19: + _r$14 = err$1.Error(); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $s = -1; return (x$4 = new CertificateInvalidError.ptr(c, 2, _r$14), new x$4.constructor.elem(x$4)); + /* } */ case 20: + if (ok) { + /* break; */ $s = 15; continue; + } + i$1 = i$1 + (1) >> 0; + /* } */ $s = 14; continue; case 15: + /* */ if (!ok) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (!ok) { */ case 22: + _r$15 = fmt.Sprintf("%s %q is not permitted by any constraint", new sliceType$10([new $String(nameType), new $String(name)])); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return (x$5 = new CertificateInvalidError.ptr(c, 2, _r$15), new x$5.constructor.elem(x$5)); + /* } */ case 23: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.checkNameConstraints }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.constraint = constraint; $f.constraint$1 = constraint$1; $f.count = count; $f.err = err; $f.err$1 = err$1; $f.excluded = excluded; $f.excludedValue = excludedValue; $f.i = i; $f.i$1 = i$1; $f.match = match; $f.match$1 = match$1; $f.maxConstraintComparisons = maxConstraintComparisons; $f.name = name; $f.nameType = nameType; $f.ok = ok; $f.parsedName = parsedName; $f.permitted = permitted; $f.permittedValue = permittedValue; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.checkNameConstraints = function(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded) { return this.$val.checkNameConstraints(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded); }; + Certificate.ptr.prototype.isValid = function(certType, currentChain, opts) { + var _r$4, c, certType, checkNameConstraints, child, comparisonCount, currentChain, err, leaf, maxConstraintComparisons, now, numIntermediates, opts, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; c = $f.c; certType = $f.certType; checkNameConstraints = $f.checkNameConstraints; child = $f.child; comparisonCount = $f.comparisonCount; currentChain = $f.currentChain; err = $f.err; leaf = $f.leaf; maxConstraintComparisons = $f.maxConstraintComparisons; now = $f.now; numIntermediates = $f.numIntermediates; opts = $f.opts; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + comparisonCount = [comparisonCount]; + maxConstraintComparisons = [maxConstraintComparisons]; + c[0] = this; + if (c[0].UnhandledCriticalExtensions.$length > 0) { + $s = -1; return (x = new UnhandledCriticalExtension.ptr(), new x.constructor.elem(x)); + } + if (currentChain.$length > 0) { + child = (x$1 = currentChain.$length - 1 >> 0, ((x$1 < 0 || x$1 >= currentChain.$length) ? ($throwRuntimeError("index out of range"), undefined) : currentChain.$array[currentChain.$offset + x$1])); + if (!bytes.Equal(child.RawIssuer, c[0].RawSubject)) { + $s = -1; return (x$2 = new CertificateInvalidError.ptr(c[0], 5, ""), new x$2.constructor.elem(x$2)); + } + } + now = $clone(opts.CurrentTime, time.Time); + if ($clone(now, time.Time).IsZero()) { + time.Time.copy(now, time.Now()); + } + if ($clone(now, time.Time).Before($clone(c[0].NotBefore, time.Time)) || $clone(now, time.Time).After($clone(c[0].NotAfter, time.Time))) { + $s = -1; return (x$3 = new CertificateInvalidError.ptr(c[0], 1, ""), new x$3.constructor.elem(x$3)); + } + maxConstraintComparisons[0] = opts.MaxConstraintComparisions; + if (maxConstraintComparisons[0] === 0) { + maxConstraintComparisons[0] = 250000; + } + comparisonCount[0] = 0; + leaf = ptrType$1.nil; + if ((certType === 1) || (certType === 2)) { + if (currentChain.$length === 0) { + $s = -1; return errors.New("x509: internal error: empty chain when appending CA cert"); + } + leaf = (0 >= currentChain.$length ? ($throwRuntimeError("index out of range"), undefined) : currentChain.$array[currentChain.$offset + 0]); + } + checkNameConstraints = ((certType === 1) || (certType === 2)) && c[0].hasNameConstraints(); + /* */ if (checkNameConstraints && leaf.commonNameAsHostname()) { $s = 1; continue; } + /* */ if (checkNameConstraints && leaf.hasSANExtension()) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (checkNameConstraints && leaf.commonNameAsHostname()) { */ case 1: + $s = -1; return (x$4 = new CertificateInvalidError.ptr(c[0], 6, ""), new x$4.constructor.elem(x$4)); + /* } else if (checkNameConstraints && leaf.hasSANExtension()) { */ case 2: + _r$4 = forEachSAN(leaf.getSANExtension(), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(tag, data) { + var _1, _r$10, _r$11, _r$12, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, data, err, err$1, err$2, err$3, err$4, ip, l, mailbox, name, name$1, name$2, ok, ok$1, tag, uri, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; data = $f.data; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; ip = $f.ip; l = $f.l; mailbox = $f.mailbox; name = $f.name; name$1 = $f.name$1; name$2 = $f.name$2; ok = $f.ok; ok$1 = $f.ok$1; tag = $f.tag; uri = $f.uri; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = tag; + /* */ if (_1 === (1)) { $s = 2; continue; } + /* */ if (_1 === (2)) { $s = 3; continue; } + /* */ if (_1 === (6)) { $s = 4; continue; } + /* */ if (_1 === (7)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_1 === (1)) { */ case 2: + name = ($bytesToString(data)); + _tuple = parseRFC2821Mailbox(name); + mailbox = $clone(_tuple[0], rfc2821Mailbox); + ok = _tuple[1]; + /* */ if (!ok) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!ok) { */ case 7: + _r$4 = fmt.Errorf("x509: cannot parse rfc822Name %q", new sliceType$10([new mailbox.constructor.elem(mailbox)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 8: + _r$5 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "email address", name, new mailbox.constructor.elem(mailbox), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { + var _r$5, constraint, parsedName, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$5 = $f._r$5; constraint = $f.constraint; parsedName = $f.parsedName; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$5 = matchEmailConstraint($clone($assertType(parsedName, rfc2821Mailbox), rfc2821Mailbox), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$5 = _r$5; $f.constraint = constraint; $f.parsedName = parsedName; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedEmailAddresses, c[0].ExcludedEmailAddresses); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $s = 6; continue; + /* } else if (_1 === (2)) { */ case 3: + name$1 = ($bytesToString(data)); + _tuple$1 = domainToReverseLabels(name$1); + ok$1 = _tuple$1[1]; + /* */ if (!ok$1) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!ok$1) { */ case 11: + _r$6 = fmt.Errorf("x509: cannot parse dnsName %q", new sliceType$10([new $String(name$1)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 12: + _r$7 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "DNS name", name$1, new $String(name$1), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { + var _r$7, constraint, parsedName, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$7 = $f._r$7; constraint = $f.constraint; parsedName = $f.parsedName; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$7 = matchDomainConstraint($assertType(parsedName, $String), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$7 = _r$7; $f.constraint = constraint; $f.parsedName = parsedName; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedDNSDomains, c[0].ExcludedDNSDomains); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err$1 = _r$7; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + $s = 6; continue; + /* } else if (_1 === (6)) { */ case 4: + name$2 = ($bytesToString(data)); + _r$8 = url.Parse(name$2); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$2 = _r$8; + uri = _tuple$2[0]; + err$2 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 16: + _r$9 = fmt.Errorf("x509: internal error: URI SAN %q failed to parse", new sliceType$10([new $String(name$2)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 17: + _r$10 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "URI", name$2, uri, (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { + var _r$10, constraint, parsedName, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; constraint = $f.constraint; parsedName = $f.parsedName; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$10 = matchURIConstraint($assertType(parsedName, ptrType$10), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return _r$10; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$10 = _r$10; $f.constraint = constraint; $f.parsedName = parsedName; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedURIDomains, c[0].ExcludedURIDomains); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err$3 = _r$10; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + $s = 6; continue; + /* } else if (_1 === (7)) { */ case 5: + ip = ($subslice(new net.IP(data.$array), data.$offset, data.$offset + data.$length)); + l = ip.$length; + /* */ if (!((l === 4)) && !((l === 16))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!((l === 4)) && !((l === 16))) { */ case 20: + _r$11 = fmt.Errorf("x509: internal error: IP SAN %x failed to parse", new sliceType$10([data])); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return _r$11; + /* } */ case 21: + _r$12 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "IP address", ip.String(), ip, (function(c, comparisonCount, maxConstraintComparisons) { return function(parsedName, constraint) { + var constraint, parsedName; + return matchIPConstraint($assertType(parsedName, net.IP), $assertType(constraint, ptrType$11)); + }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedIPRanges, c[0].ExcludedIPRanges); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + err$4 = _r$12; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + /* } */ case 6: + case 1: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.data = data; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.ip = ip; $f.l = l; $f.mailbox = mailbox; $f.name = name; $f.name$1 = name$1; $f.name$2 = name$2; $f.ok = ok; $f.ok$1 = ok$1; $f.tag = tag; $f.uri = uri; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, comparisonCount, maxConstraintComparisons)); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 3: + if ((certType === 1) && (!c[0].BasicConstraintsValid || !c[0].IsCA)) { + $s = -1; return (x$5 = new CertificateInvalidError.ptr(c[0], 0, ""), new x$5.constructor.elem(x$5)); + } + if (c[0].BasicConstraintsValid && c[0].MaxPathLen >= 0) { + numIntermediates = currentChain.$length - 1 >> 0; + if (numIntermediates > c[0].MaxPathLen) { + $s = -1; return (x$6 = new CertificateInvalidError.ptr(c[0], 3, ""), new x$6.constructor.elem(x$6)); + } + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.isValid }; } $f._r$4 = _r$4; $f.c = c; $f.certType = certType; $f.checkNameConstraints = checkNameConstraints; $f.child = child; $f.comparisonCount = comparisonCount; $f.currentChain = currentChain; $f.err = err; $f.leaf = leaf; $f.maxConstraintComparisons = maxConstraintComparisons; $f.now = now; $f.numIntermediates = numIntermediates; $f.opts = opts; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.isValid = function(certType, currentChain, opts) { return this.$val.isValid(certType, currentChain, opts); }; + Certificate.ptr.prototype.Verify = function(opts) { + var _i, _i$1, _i$2, _r$4, _r$5, _r$6, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, c, candidate, candidateChains, chains, err, intermediate, keyUsages, opts, usage, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; candidate = $f.candidate; candidateChains = $f.candidateChains; chains = $f.chains; err = $f.err; intermediate = $f.intermediate; keyUsages = $f.keyUsages; opts = $f.opts; usage = $f.usage; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + opts = [opts]; + chains = sliceType$11.nil; + err = $ifaceNil; + c = this; + if (c.Raw.$length === 0) { + _tmp = sliceType$11.nil; + _tmp$1 = errNotParsed; + chains = _tmp; + err = _tmp$1; + $s = -1; return [chains, err]; + } + if (!(opts[0].Intermediates === ptrType.nil)) { + _ref = opts[0].Intermediates.certs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + intermediate = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (intermediate.Raw.$length === 0) { + _tmp$2 = sliceType$11.nil; + _tmp$3 = errNotParsed; + chains = _tmp$2; + err = _tmp$3; + $s = -1; return [chains, err]; + } + _i++; + } + } + if (opts[0].Roots === ptrType.nil && false) { + _tuple = c.systemVerify(opts[0]); + chains = _tuple[0]; + err = _tuple[1]; + $s = -1; return [chains, err]; + } + /* */ if (opts[0].Roots === ptrType.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (opts[0].Roots === ptrType.nil) { */ case 1: + _r$4 = systemRootsPool(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + opts[0].Roots = _r$4; + if (opts[0].Roots === ptrType.nil) { + _tmp$4 = sliceType$11.nil; + _tmp$5 = (x = new SystemRootsError.ptr(systemRootsErr), new x.constructor.elem(x)); + chains = _tmp$4; + err = _tmp$5; + $s = -1; return [chains, err]; + } + /* } */ case 2: + _r$5 = c.isValid(0, sliceType$5.nil, opts[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [chains, err]; + } + if (opts[0].DNSName.length > 0) { + err = c.VerifyHostname(opts[0].DNSName); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [chains, err]; + } + } + candidateChains = sliceType$11.nil; + /* */ if (opts[0].Roots.contains(c)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (opts[0].Roots.contains(c)) { */ case 5: + candidateChains = $append(candidateChains, new sliceType$5([c])); + $s = 7; continue; + /* } else { */ case 6: + _r$6 = c.buildChains({}, new sliceType$5([c]), opts[0]); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + candidateChains = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = sliceType$11.nil; + _tmp$7 = err; + chains = _tmp$6; + err = _tmp$7; + $s = -1; return [chains, err]; + } + /* } */ case 7: + keyUsages = opts[0].KeyUsages; + if (keyUsages.$length === 0) { + keyUsages = new sliceType$13([1]); + } + _ref$1 = keyUsages; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + usage = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (usage === 0) { + _tmp$8 = candidateChains; + _tmp$9 = $ifaceNil; + chains = _tmp$8; + err = _tmp$9; + $s = -1; return [chains, err]; + } + _i$1++; + } + _ref$2 = candidateChains; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + candidate = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + if (checkChainForKeyUsage(candidate, keyUsages)) { + chains = $append(chains, candidate); + } + _i$2++; + } + if (chains.$length === 0) { + _tmp$10 = sliceType$11.nil; + _tmp$11 = (x$1 = new CertificateInvalidError.ptr(c, 4, ""), new x$1.constructor.elem(x$1)); + chains = _tmp$10; + err = _tmp$11; + $s = -1; return [chains, err]; + } + _tmp$12 = chains; + _tmp$13 = $ifaceNil; + chains = _tmp$12; + err = _tmp$13; + $s = -1; return [chains, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.Verify }; } $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.candidate = candidate; $f.candidateChains = candidateChains; $f.chains = chains; $f.err = err; $f.intermediate = intermediate; $f.keyUsages = keyUsages; $f.opts = opts; $f.usage = usage; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.Verify = function(opts) { return this.$val.Verify(opts); }; + appendToFreshChain = function(chain, cert) { + var cert, chain, n, x; + n = $makeSlice(sliceType$5, (chain.$length + 1 >> 0)); + $copySlice(n, chain); + (x = chain.$length, ((x < 0 || x >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + x] = cert)); + return n; + }; + Certificate.ptr.prototype.buildChains = function(cache, currentChain, opts) { + var _entry, _i, _i$1, _i$2, _i$3, _key, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, _tuple$2, _tuple$3, c, cache, cert, cert$1, chains, childChains, currentChain, err, failedIntermediate, failedRoot, hintCert, hintErr, intermediate, intermediateErr, intermediateNum, ok, opts, possibleIntermediates, possibleRoots, root, rootErr, rootNum, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _key = $f._key; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; c = $f.c; cache = $f.cache; cert = $f.cert; cert$1 = $f.cert$1; chains = $f.chains; childChains = $f.childChains; currentChain = $f.currentChain; err = $f.err; failedIntermediate = $f.failedIntermediate; failedRoot = $f.failedRoot; hintCert = $f.hintCert; hintErr = $f.hintErr; intermediate = $f.intermediate; intermediateErr = $f.intermediateErr; intermediateNum = $f.intermediateNum; ok = $f.ok; opts = $f.opts; possibleIntermediates = $f.possibleIntermediates; possibleRoots = $f.possibleRoots; root = $f.root; rootErr = $f.rootErr; rootNum = $f.rootNum; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + chains = sliceType$11.nil; + err = $ifaceNil; + c = this; + _r$4 = opts.Roots.findVerifiedParents(c); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + possibleRoots = _tuple[0]; + failedRoot = _tuple[1]; + rootErr = _tuple[2]; + _ref = possibleRoots; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + rootNum = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + root = (x = opts.Roots.certs, ((rootNum < 0 || rootNum >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + rootNum])); + _ref$1 = currentChain; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + cert = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (cert.Equal(root)) { + _i++; + /* continue nextRoot; */ $s = 2; continue s; + } + _i$1++; + /* } */ $s = 4; continue; case 5: + _r$5 = root.isValid(2, currentChain, opts); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _i++; + /* continue; */ $s = 2; continue; + } + chains = $append(chains, appendToFreshChain(currentChain, root)); + _i++; + /* } */ $s = 2; continue; case 3: + _r$6 = opts.Intermediates.findVerifiedParents(c); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + possibleIntermediates = _tuple$1[0]; + failedIntermediate = _tuple$1[1]; + intermediateErr = _tuple$1[2]; + _ref$2 = possibleIntermediates; + _i$2 = 0; + /* while (true) { */ case 8: + /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 9; continue; } + intermediateNum = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + intermediate = (x$1 = opts.Intermediates.certs, ((intermediateNum < 0 || intermediateNum >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + intermediateNum])); + _ref$3 = currentChain; + _i$3 = 0; + /* while (true) { */ case 10: + /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 11; continue; } + cert$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + if (cert$1.Equal(intermediate)) { + _i$2++; + /* continue nextIntermediate; */ $s = 8; continue s; + } + _i$3++; + /* } */ $s = 10; continue; case 11: + _r$7 = intermediate.isValid(1, currentChain, opts); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err = _r$7; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 13: + _i$2++; + /* continue; */ $s = 8; continue; + /* } */ case 14: + childChains = sliceType$11.nil; + _tuple$2 = (_entry = cache[$Int.keyFor(intermediateNum)], _entry !== undefined ? [_entry.v, true] : [sliceType$11.nil, false]); + childChains = _tuple$2[0]; + ok = _tuple$2[1]; + /* */ if (!ok) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!ok) { */ case 15: + _r$8 = intermediate.buildChains(cache, appendToFreshChain(currentChain, intermediate), opts); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$3 = _r$8; + childChains = _tuple$3[0]; + err = _tuple$3[1]; + _key = intermediateNum; (cache || $throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(_key)] = { k: _key, v: childChains }; + /* } */ case 16: + chains = $appendSlice(chains, childChains); + _i$2++; + /* } */ $s = 8; continue; case 9: + if (chains.$length > 0) { + err = $ifaceNil; + } + if ((chains.$length === 0) && $interfaceIsEqual(err, $ifaceNil)) { + hintErr = rootErr; + hintCert = failedRoot; + if ($interfaceIsEqual(hintErr, $ifaceNil)) { + hintErr = intermediateErr; + hintCert = failedIntermediate; + } + err = (x$2 = new UnknownAuthorityError.ptr(c, hintErr, hintCert), new x$2.constructor.elem(x$2)); + } + $s = -1; return [chains, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.buildChains }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._key = _key; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.c = c; $f.cache = cache; $f.cert = cert; $f.cert$1 = cert$1; $f.chains = chains; $f.childChains = childChains; $f.currentChain = currentChain; $f.err = err; $f.failedIntermediate = failedIntermediate; $f.failedRoot = failedRoot; $f.hintCert = hintCert; $f.hintErr = hintErr; $f.intermediate = intermediate; $f.intermediateErr = intermediateErr; $f.intermediateNum = intermediateNum; $f.ok = ok; $f.opts = opts; $f.possibleIntermediates = possibleIntermediates; $f.possibleRoots = possibleRoots; $f.root = root; $f.rootErr = rootErr; $f.rootNum = rootNum; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.buildChains = function(cache, currentChain, opts) { return this.$val.buildChains(cache, currentChain, opts); }; + validHostname = function(host) { + var _i, _i$1, _ref, _ref$1, _rune, c, host, i, j, part; + host = strings.TrimSuffix(host, "."); + if (host.length === 0) { + return false; + } + _ref = strings.Split(host, "."); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + part = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (part === "") { + return false; + } + if ((i === 0) && part === "*") { + _i++; + continue; + } + _ref$1 = part; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune = $decodeRune(_ref$1, _i$1); + j = _i$1; + c = _rune[0]; + if (97 <= c && c <= 122) { + _i$1 += _rune[1]; + continue; + } + if (48 <= c && c <= 57) { + _i$1 += _rune[1]; + continue; + } + if (65 <= c && c <= 90) { + _i$1 += _rune[1]; + continue; + } + if ((c === 45) && !((j === 0))) { + _i$1 += _rune[1]; + continue; + } + if (c === 95) { + _i$1 += _rune[1]; + continue; + } + return false; + } + _i++; + } + return true; + }; + Certificate.ptr.prototype.commonNameAsHostname = function() { + var c; + c = this; + return !ignoreCN && !c.hasSANExtension() && validHostname(c.Subject.CommonName); + }; + Certificate.prototype.commonNameAsHostname = function() { return this.$val.commonNameAsHostname(); }; + matchHostnames = function(pattern, host) { + var _i, _ref, host, hostParts, i, pattern, patternPart, patternParts; + host = strings.TrimSuffix(host, "."); + pattern = strings.TrimSuffix(pattern, "."); + if ((pattern.length === 0) || (host.length === 0)) { + return false; + } + patternParts = strings.Split(pattern, "."); + hostParts = strings.Split(host, "."); + if (!((patternParts.$length === hostParts.$length))) { + return false; + } + _ref = patternParts; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + patternPart = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((i === 0) && patternPart === "*") { + _i++; + continue; + } + if (!(patternPart === ((i < 0 || i >= hostParts.$length) ? ($throwRuntimeError("index out of range"), undefined) : hostParts.$array[hostParts.$offset + i]))) { + return false; + } + _i++; + } + return true; + }; + toLowerCaseASCII = function(in$1) { + var _i, _i$1, _ref, _ref$1, _rune, c, c$1, i, in$1, isAlreadyLowerCase, out; + isAlreadyLowerCase = true; + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + c = _rune[0]; + if (c === 65533) { + isAlreadyLowerCase = false; + break; + } + if (65 <= c && c <= 90) { + isAlreadyLowerCase = false; + break; + } + _i += _rune[1]; + } + if (isAlreadyLowerCase) { + return in$1; + } + out = (new sliceType$3($stringToBytes(in$1))); + _ref$1 = out; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (65 <= c$1 && c$1 <= 90) { + ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = (((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i]) + (32) << 24 >>> 24)); + } + _i$1++; + } + return ($bytesToString(out)); + }; + Certificate.ptr.prototype.VerifyHostname = function(h) { + var _i, _i$1, _ref, _ref$1, c, candidate, candidateIP, h, ip, lowered, match, x, x$1; + c = this; + candidateIP = h; + if (h.length >= 3 && (h.charCodeAt(0) === 91) && (h.charCodeAt((h.length - 1 >> 0)) === 93)) { + candidateIP = $substring(h, 1, (h.length - 1 >> 0)); + } + ip = net.ParseIP(candidateIP); + if (!(ip === net.IP.nil)) { + _ref = c.IPAddresses; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + candidate = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (ip.Equal(candidate)) { + return $ifaceNil; + } + _i++; + } + return (x = new HostnameError.ptr(c, candidateIP), new x.constructor.elem(x)); + } + lowered = toLowerCaseASCII(h); + if (c.commonNameAsHostname()) { + if (matchHostnames(toLowerCaseASCII(c.Subject.CommonName), lowered)) { + return $ifaceNil; + } + } else { + _ref$1 = c.DNSNames; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + match = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (matchHostnames(toLowerCaseASCII(match), lowered)) { + return $ifaceNil; + } + _i$1++; + } + } + return (x$1 = new HostnameError.ptr(c, h), new x$1.constructor.elem(x$1)); + }; + Certificate.prototype.VerifyHostname = function(h) { return this.$val.VerifyHostname(h); }; + checkChainForKeyUsage = function(chain, keyUsages) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, cert, chain, i, i$1, keyUsages, requestedUsage, usage, usage$1, usages, usagesRemaining; + usages = $makeSlice(sliceType$13, keyUsages.$length); + $copySlice(usages, keyUsages); + if (chain.$length === 0) { + return false; + } + usagesRemaining = usages.$length; + i = chain.$length - 1 >> 0; + NextCert: + while (true) { + if (!(i >= 0)) { break; } + cert = ((i < 0 || i >= chain.$length) ? ($throwRuntimeError("index out of range"), undefined) : chain.$array[chain.$offset + i]); + if ((cert.ExtKeyUsage.$length === 0) && (cert.UnknownExtKeyUsage.$length === 0)) { + i = i - (1) >> 0; + continue; + } + _ref = cert.ExtKeyUsage; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + usage = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (usage === 0) { + i = i - (1) >> 0; + continue NextCert; + } + _i++; + } + _ref$1 = usages; + _i$1 = 0; + NextRequestedUsage: + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + requestedUsage = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (requestedUsage === -1) { + _i$1++; + continue; + } + _ref$2 = cert.ExtKeyUsage; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + usage$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + if (requestedUsage === usage$1) { + _i$1++; + continue NextRequestedUsage; + } else if ((requestedUsage === 1) && ((usage$1 === 11) || (usage$1 === 10))) { + _i$1++; + continue NextRequestedUsage; + } + _i$2++; + } + ((i$1 < 0 || i$1 >= usages.$length) ? ($throwRuntimeError("index out of range"), undefined) : usages.$array[usages.$offset + i$1] = -1); + usagesRemaining = usagesRemaining - (1) >> 0; + if (usagesRemaining === 0) { + return false; + } + _i$1++; + } + i = i - (1) >> 0; + } + return true; + }; + SignatureAlgorithm.prototype.isRSAPSS = function() { + var _1, algo; + algo = this.$val; + _1 = algo; + if ((_1 === (13)) || (_1 === (14)) || (_1 === (15))) { + return true; + } else { + return false; + } + }; + $ptrType(SignatureAlgorithm).prototype.isRSAPSS = function() { return new SignatureAlgorithm(this.$get()).isRSAPSS(); }; + SignatureAlgorithm.prototype.String = function() { + var _i, _ref, algo, details; + algo = this.$val; + _ref = signatureAlgorithmDetails; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); + if (details.algo === algo) { + return details.name; + } + _i++; + } + return strconv.Itoa(((algo >> 0))); + }; + $ptrType(SignatureAlgorithm).prototype.String = function() { return new SignatureAlgorithm(this.$get()).String(); }; + PublicKeyAlgorithm.prototype.String = function() { + var algo; + algo = this.$val; + if (0 < algo && ((algo >> 0)) < 4) { + return ((algo < 0 || algo >= publicKeyAlgoName.length) ? ($throwRuntimeError("index out of range"), undefined) : publicKeyAlgoName[algo]); + } + return strconv.Itoa(((algo >> 0))); + }; + $ptrType(PublicKeyAlgorithm).prototype.String = function() { return new PublicKeyAlgorithm(this.$get()).String(); }; + rsaPSSParameters = function(hashFunc) { + var _1, _r$4, _r$5, _tuple, _tuple$1, err, hashFunc, hashOID, mgf1Params, params, serialized, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; hashFunc = $f.hashFunc; hashOID = $f.hashOID; mgf1Params = $f.mgf1Params; params = $f.params; serialized = $f.serialized; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hashOID = asn1.ObjectIdentifier.nil; + _1 = hashFunc; + if (_1 === (5)) { + hashOID = oidSHA256; + } else if (_1 === (6)) { + hashOID = oidSHA384; + } else if (_1 === (7)) { + hashOID = oidSHA512; + } + params = new pssParameters.ptr(new pkix.AlgorithmIdentifier.ptr(hashOID, $clone(asn1.NullRawValue, asn1.RawValue)), new pkix.AlgorithmIdentifier.ptr(oidMGF1, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new crypto.Hash(hashFunc).Size(), 1); + mgf1Params = new pkix.AlgorithmIdentifier.ptr(hashOID, $clone(asn1.NullRawValue, asn1.RawValue)); + err = $ifaceNil; + _r$4 = asn1.Marshal(new mgf1Params.constructor.elem(mgf1Params)); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + params.MGF.Parameters.FullBytes = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + _r$5 = asn1.Marshal(new params.constructor.elem(params)); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + serialized = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + $s = -1; return new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, serialized); + /* */ } return; } if ($f === undefined) { $f = { $blk: rsaPSSParameters }; } $f._1 = _1; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.hashFunc = hashFunc; $f.hashOID = hashOID; $f.mgf1Params = mgf1Params; $f.params = params; $f.serialized = serialized; $f.$s = $s; $f.$r = $r; return $f; + }; + getSignatureAlgorithmFromAI = function(ai) { + var _i, _r$4, _r$5, _ref, _tuple, _tuple$1, ai, details, err, err$1, mgf1HashFunc, params, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ai = $f.ai; details = $f.details; err = $f.err; err$1 = $f.err$1; mgf1HashFunc = $f.mgf1HashFunc; params = $f.params; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mgf1HashFunc = [mgf1HashFunc]; + params = [params]; + if (!ai.Algorithm.Equal(oidSignatureRSAPSS)) { + _ref = signatureAlgorithmDetails; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); + if (ai.Algorithm.Equal(details.oid)) { + $s = -1; return details.algo; + } + _i++; + } + $s = -1; return 0; + } + params[0] = new pssParameters.ptr(new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), 0, 0); + _r$4 = asn1.Unmarshal(ai.Parameters.FullBytes, params[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return 0; + } + mgf1HashFunc[0] = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + _r$5 = asn1.Unmarshal(params[0].MGF.Parameters.FullBytes, mgf1HashFunc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return 0; + } + if ((!((params[0].Hash.Parameters.FullBytes.$length === 0)) && !bytes.Equal(params[0].Hash.Parameters.FullBytes, asn1.NullBytes)) || !params[0].MGF.Algorithm.Equal(oidMGF1) || !mgf1HashFunc[0].Algorithm.Equal(params[0].Hash.Algorithm) || (!((mgf1HashFunc[0].Parameters.FullBytes.$length === 0)) && !bytes.Equal(mgf1HashFunc[0].Parameters.FullBytes, asn1.NullBytes)) || !((params[0].TrailerField === 1))) { + $s = -1; return 0; + } + if (params[0].Hash.Algorithm.Equal(oidSHA256) && (params[0].SaltLength === 32)) { + $s = -1; return 13; + } else if (params[0].Hash.Algorithm.Equal(oidSHA384) && (params[0].SaltLength === 48)) { + $s = -1; return 14; + } else if (params[0].Hash.Algorithm.Equal(oidSHA512) && (params[0].SaltLength === 64)) { + $s = -1; return 15; + } + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: getSignatureAlgorithmFromAI }; } $f._i = _i; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ai = ai; $f.details = details; $f.err = err; $f.err$1 = err$1; $f.mgf1HashFunc = mgf1HashFunc; $f.params = params; $f.$s = $s; $f.$r = $r; return $f; + }; + getPublicKeyAlgorithmFromOID = function(oid) { + var oid; + if (oid.Equal(oidPublicKeyRSA)) { + return 1; + } else if (oid.Equal(oidPublicKeyDSA)) { + return 2; + } else if (oid.Equal(oidPublicKeyECDSA)) { + return 3; + } + return 0; + }; + namedCurveFromOID = function(oid) { + var _r$4, _r$5, _r$6, _r$7, oid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; oid = $f.oid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (oid.Equal(oidNamedCurveP224)) { $s = 2; continue; } + /* */ if (oid.Equal(oidNamedCurveP256)) { $s = 3; continue; } + /* */ if (oid.Equal(oidNamedCurveP384)) { $s = 4; continue; } + /* */ if (oid.Equal(oidNamedCurveP521)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (oid.Equal(oidNamedCurveP224)) { */ case 2: + _r$4 = elliptic.P224(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } else if (oid.Equal(oidNamedCurveP256)) { */ case 3: + _r$5 = elliptic.P256(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* } else if (oid.Equal(oidNamedCurveP384)) { */ case 4: + _r$6 = elliptic.P384(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } else if (oid.Equal(oidNamedCurveP521)) { */ case 5: + _r$7 = elliptic.P521(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 6: + case 1: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: namedCurveFromOID }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.oid = oid; $f.$s = $s; $f.$r = $r; return $f; + }; + extKeyUsageFromOID = function(oid) { + var _i, _ref, _tmp, _tmp$1, eku, oid, ok, pair; + eku = 0; + ok = false; + _ref = extKeyUsageOIDs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + pair = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType$1); + if (oid.Equal(pair.oid)) { + _tmp = pair.extKeyUsage; + _tmp$1 = true; + eku = _tmp; + ok = _tmp$1; + return [eku, ok]; + } + _i++; + } + return [eku, ok]; + }; + InsecureAlgorithmError.prototype.Error = function() { + var _r$4, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$4 = fmt.Sprintf("x509: cannot verify signature: insecure algorithm %v", new sliceType$10([new SignatureAlgorithm(((e >> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: InsecureAlgorithmError.prototype.Error }; } $f._r$4 = _r$4; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(InsecureAlgorithmError).prototype.Error = function() { return new InsecureAlgorithmError(this.$get()).Error(); }; + ConstraintViolationError.ptr.prototype.Error = function() { + return "x509: invalid signature: parent certificate cannot sign this kind of certificate"; + }; + ConstraintViolationError.prototype.Error = function() { return this.$val.Error(); }; + Certificate.ptr.prototype.Equal = function(other) { + var c, other; + c = this; + return bytes.Equal(c.Raw, other.Raw); + }; + Certificate.prototype.Equal = function(other) { return this.$val.Equal(other); }; + Certificate.ptr.prototype.hasSANExtension = function() { + var c; + c = this; + return oidInExtensions($subslice(new asn1.ObjectIdentifier(oidExtensionSubjectAltName.$array), oidExtensionSubjectAltName.$offset, oidExtensionSubjectAltName.$offset + oidExtensionSubjectAltName.$length), c.Extensions); + }; + Certificate.prototype.hasSANExtension = function() { return this.$val.hasSANExtension(); }; + Certificate.ptr.prototype.CheckSignatureFrom = function(parent) { + var _r$4, c, parent, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; c = $f.c; parent = $f.parent; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (((parent.Version === 3) && !parent.BasicConstraintsValid || parent.BasicConstraintsValid && !parent.IsCA) && !bytes.Equal(c.RawSubjectPublicKeyInfo, entrustBrokenSPKI)) { + $s = -1; return (x = new ConstraintViolationError.ptr(), new x.constructor.elem(x)); + } + if (!((parent.KeyUsage === 0)) && ((parent.KeyUsage & 32) === 0)) { + $s = -1; return (x$1 = new ConstraintViolationError.ptr(), new x$1.constructor.elem(x$1)); + } + if (parent.PublicKeyAlgorithm === 0) { + $s = -1; return $pkg.ErrUnsupportedAlgorithm; + } + _r$4 = parent.CheckSignature(c.SignatureAlgorithm, c.RawTBSCertificate, c.Signature); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.CheckSignatureFrom }; } $f._r$4 = _r$4; $f.c = c; $f.parent = parent; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.CheckSignatureFrom = function(parent) { return this.$val.CheckSignatureFrom(parent); }; + Certificate.ptr.prototype.CheckSignature = function(algo, signed, signature) { + var _r$4, algo, c, signature, signed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; algo = $f.algo; c = $f.c; signature = $f.signature; signed = $f.signed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$4 = checkSignature(algo, signed, signature, c.PublicKey); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.CheckSignature }; } $f._r$4 = _r$4; $f.algo = algo; $f.c = c; $f.signature = signature; $f.signed = signed; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.CheckSignature = function(algo, signed, signature) { return this.$val.CheckSignature(algo, signed, signature); }; + Certificate.ptr.prototype.hasNameConstraints = function() { + var c; + c = this; + return oidInExtensions($subslice(new asn1.ObjectIdentifier(oidExtensionNameConstraints.$array), oidExtensionNameConstraints.$offset, oidExtensionNameConstraints.$offset + oidExtensionNameConstraints.$length), c.Extensions); + }; + Certificate.prototype.hasNameConstraints = function() { return this.$val.hasNameConstraints(); }; + Certificate.ptr.prototype.getSANExtension = function() { + var _i, _ref, c, e; + c = this; + _ref = c.Extensions; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); + if (e.Id.Equal($subslice(new asn1.ObjectIdentifier(oidExtensionSubjectAltName.$array), oidExtensionSubjectAltName.$offset, oidExtensionSubjectAltName.$offset + oidExtensionSubjectAltName.$length))) { + return e.Value; + } + _i++; + } + return sliceType$3.nil; + }; + Certificate.prototype.getSANExtension = function() { return this.$val.getSANExtension(); }; + signaturePublicKeyAlgoMismatchError = function(expectedPubKeyAlgo, pubKey) { + var _r$4, expectedPubKeyAlgo, pubKey, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; expectedPubKeyAlgo = $f.expectedPubKeyAlgo; pubKey = $f.pubKey; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$4 = fmt.Errorf("x509: signature algorithm specifies an %s public key, but have public key of type %T", new sliceType$10([new $String(new PublicKeyAlgorithm(expectedPubKeyAlgo).String()), pubKey])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: signaturePublicKeyAlgoMismatchError }; } $f._r$4 = _r$4; $f.expectedPubKeyAlgo = expectedPubKeyAlgo; $f.pubKey = pubKey; $f.$s = $s; $f.$r = $r; return $f; + }; + checkSignature = function(algo, signed, signature, publicKey) { + var _1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, algo, details, digest, dsaSig, ecdsaSig, err, err$1, err$2, h, hashType, pub, pub$1, pub$2, pubKeyAlgo, publicKey, rest, rest$1, signature, signed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; algo = $f.algo; details = $f.details; digest = $f.digest; dsaSig = $f.dsaSig; ecdsaSig = $f.ecdsaSig; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; h = $f.h; hashType = $f.hashType; pub = $f.pub; pub$1 = $f.pub$1; pub$2 = $f.pub$2; pubKeyAlgo = $f.pubKeyAlgo; publicKey = $f.publicKey; rest = $f.rest; rest$1 = $f.rest$1; signature = $f.signature; signed = $f.signed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + hashType = 0; + pubKeyAlgo = 0; + _ref = signatureAlgorithmDetails; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); + if (details.algo === algo) { + hashType = details.hash; + pubKeyAlgo = details.pubKeyAlgo; + } + _i++; + } + _1 = hashType; + if (_1 === (0)) { + err = $pkg.ErrUnsupportedAlgorithm; + $s = -1; return err; + } else if (_1 === (2)) { + err = new InsecureAlgorithmError(((algo >> 0))); + $s = -1; return err; + } + if (!new crypto.Hash(hashType).Available()) { + err = $pkg.ErrUnsupportedAlgorithm; + $s = -1; return err; + } + _r$4 = new crypto.Hash(hashType).New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + h = _r$4; + _r$5 = h.Write(signed); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = h.Sum(sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + digest = _r$6; + _ref$1 = publicKey; + /* */ if ($assertType(_ref$1, ptrType$6, true)[1]) { $s = 4; continue; } + /* */ if ($assertType(_ref$1, ptrType$13, true)[1]) { $s = 5; continue; } + /* */ if ($assertType(_ref$1, ptrType$12, true)[1]) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ($assertType(_ref$1, ptrType$6, true)[1]) { */ case 4: + pub = _ref$1.$val; + /* */ if (!((pubKeyAlgo === 1))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!((pubKeyAlgo === 1))) { */ case 8: + _r$7 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err = _r$7; + $s = -1; return err; + /* } */ case 9: + /* */ if (new SignatureAlgorithm(algo).isRSAPSS()) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (new SignatureAlgorithm(algo).isRSAPSS()) { */ case 11: + _r$8 = rsa.VerifyPSS(pub, hashType, digest, signature, new rsa.PSSOptions.ptr(-1, 0)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err = _r$8; + $s = -1; return err; + /* } else { */ case 12: + _r$9 = rsa.VerifyPKCS1v15(pub, hashType, digest, signature); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + $s = -1; return err; + /* } */ case 13: + $s = 7; continue; + /* } else if ($assertType(_ref$1, ptrType$13, true)[1]) { */ case 5: + pub$1 = _ref$1.$val; + /* */ if (!((pubKeyAlgo === 2))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!((pubKeyAlgo === 2))) { */ case 16: + _r$10 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub$1); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err = _r$10; + $s = -1; return err; + /* } */ case 17: + dsaSig = new dsaSignature.ptr(ptrType$4.nil, ptrType$4.nil); + _r$11 = asn1.Unmarshal(signature, dsaSig); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple = _r$11; + rest = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + err = err$1; + $s = -1; return err; + } else if (!((rest.$length === 0))) { + err = errors.New("x509: trailing data after DSA signature"); + $s = -1; return err; + } + if (dsaSig.R.Sign() <= 0 || dsaSig.S.Sign() <= 0) { + err = errors.New("x509: DSA signature contained zero or negative values"); + $s = -1; return err; + } + _r$12 = dsa.Verify(pub$1, digest, dsaSig.R, dsaSig.S); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + /* */ if (!_r$12) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!_r$12) { */ case 20: + err = errors.New("x509: DSA verification failure"); + $s = -1; return err; + /* } */ case 21: + $s = -1; return err; + /* } else if ($assertType(_ref$1, ptrType$12, true)[1]) { */ case 6: + pub$2 = _ref$1.$val; + /* */ if (!((pubKeyAlgo === 3))) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!((pubKeyAlgo === 3))) { */ case 23: + _r$13 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub$2); /* */ $s = 25; case 25: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err = _r$13; + $s = -1; return err; + /* } */ case 24: + ecdsaSig = new ecdsaSignature.ptr(ptrType$4.nil, ptrType$4.nil); + _r$14 = asn1.Unmarshal(signature, ecdsaSig); /* */ $s = 26; case 26: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$1 = _r$14; + rest$1 = _tuple$1[0]; + err$2 = _tuple$1[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + err = err$2; + $s = -1; return err; + } else if (!((rest$1.$length === 0))) { + err = errors.New("x509: trailing data after ECDSA signature"); + $s = -1; return err; + } + if (ecdsaSig.R.Sign() <= 0 || ecdsaSig.S.Sign() <= 0) { + err = errors.New("x509: ECDSA signature contained zero or negative values"); + $s = -1; return err; + } + _r$15 = ecdsa.Verify(pub$2, digest, ecdsaSig.R, ecdsaSig.S); /* */ $s = 29; case 29: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + /* */ if (!_r$15) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (!_r$15) { */ case 27: + err = errors.New("x509: ECDSA verification failure"); + $s = -1; return err; + /* } */ case 28: + $s = -1; return err; + /* } */ case 7: + err = $pkg.ErrUnsupportedAlgorithm; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: checkSignature }; } $f._1 = _1; $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.algo = algo; $f.details = details; $f.digest = digest; $f.dsaSig = dsaSig; $f.ecdsaSig = ecdsaSig; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.h = h; $f.hashType = hashType; $f.pub = pub; $f.pub$1 = pub$1; $f.pub$2 = pub$2; $f.pubKeyAlgo = pubKeyAlgo; $f.publicKey = publicKey; $f.rest = rest; $f.rest$1 = rest$1; $f.signature = signature; $f.signed = signed; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.ptr.prototype.CheckCRLSignature = function(crl) { + var _r$4, _r$5, algo, c, crl, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; algo = $f.algo; c = $f.c; crl = $f.crl; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$4 = getSignatureAlgorithmFromAI($clone(crl.SignatureAlgorithm, pkix.AlgorithmIdentifier)); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + algo = _r$4; + _r$5 = c.CheckSignature(algo, (x = crl.TBSCertList.Raw, $subslice(new sliceType$3(x.$array), x.$offset, x.$offset + x.$length)), $clone(crl.SignatureValue, asn1.BitString).RightAlign()); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.CheckCRLSignature }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f.algo = algo; $f.c = c; $f.crl = crl; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.CheckCRLSignature = function(crl) { return this.$val.CheckCRLSignature(crl); }; + UnhandledCriticalExtension.ptr.prototype.Error = function() { + var h; + h = this; + return "x509: unhandled critical extension"; + }; + UnhandledCriticalExtension.prototype.Error = function() { return this.$val.Error(); }; + parsePublicKey = function(algo, keyData) { + var _1, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, algo, asn1Data, err, err$1, err$2, keyData, namedCurve, namedCurveOID, p, p$1, params, paramsData, paramsData$1, pub, pub$1, pub$2, rest, rest$1, rest$2, x, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; algo = $f.algo; asn1Data = $f.asn1Data; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; keyData = $f.keyData; namedCurve = $f.namedCurve; namedCurveOID = $f.namedCurveOID; p = $f.p; p$1 = $f.p$1; params = $f.params; paramsData = $f.paramsData; paramsData$1 = $f.paramsData$1; pub = $f.pub; pub$1 = $f.pub$1; pub$2 = $f.pub$2; rest = $f.rest; rest$1 = $f.rest$1; rest$2 = $f.rest$2; x = $f.x; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = [p]; + asn1Data = $clone(keyData.PublicKey, asn1.BitString).RightAlign(); + _1 = algo; + /* */ if (_1 === (1)) { $s = 2; continue; } + /* */ if (_1 === (2)) { $s = 3; continue; } + /* */ if (_1 === (3)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_1 === (1)) { */ case 2: + if (!bytes.Equal(keyData.Algorithm.Parameters.FullBytes, asn1.NullBytes)) { + $s = -1; return [$ifaceNil, errors.New("x509: RSA key missing NULL parameters")]; + } + p$1 = new pkcs1PublicKey.ptr(ptrType$4.nil, 0); + _r$4 = asn1.Unmarshal(asn1Data, p$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rest = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + if (!((rest.$length === 0))) { + $s = -1; return [$ifaceNil, errors.New("x509: trailing data after RSA public key")]; + } + if (p$1.N.Sign() <= 0) { + $s = -1; return [$ifaceNil, errors.New("x509: RSA modulus is not a positive number")]; + } + if (p$1.E <= 0) { + $s = -1; return [$ifaceNil, errors.New("x509: RSA public exponent is not a positive number")]; + } + pub = new rsa.PublicKey.ptr(p$1.N, p$1.E); + $s = -1; return [pub, $ifaceNil]; + /* } else if (_1 === (2)) { */ case 3: + p[0] = ptrType$4.nil; + _r$5 = asn1.Unmarshal(asn1Data, (p.$ptr || (p.$ptr = new ptrType$14(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, p)))); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + rest$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$1]; + } + if (!((rest$1.$length === 0))) { + $s = -1; return [$ifaceNil, errors.New("x509: trailing data after DSA public key")]; + } + paramsData = keyData.Algorithm.Parameters.FullBytes; + params = new dsaAlgorithmParameters.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$4.nil); + _r$6 = asn1.Unmarshal(paramsData, params); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + rest$1 = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$1]; + } + if (!((rest$1.$length === 0))) { + $s = -1; return [$ifaceNil, errors.New("x509: trailing data after DSA parameters")]; + } + if (p[0].Sign() <= 0 || params.P.Sign() <= 0 || params.Q.Sign() <= 0 || params.G.Sign() <= 0) { + $s = -1; return [$ifaceNil, errors.New("x509: zero or negative DSA parameter")]; + } + pub$1 = new dsa.PublicKey.ptr(new dsa.Parameters.ptr(params.P, params.Q, params.G), p[0]); + $s = -1; return [pub$1, $ifaceNil]; + /* } else if (_1 === (3)) { */ case 4: + paramsData$1 = keyData.Algorithm.Parameters.FullBytes; + namedCurveOID = $newDataPointer(asn1.ObjectIdentifier.nil, ptrType$7); + _r$7 = asn1.Unmarshal(paramsData$1, namedCurveOID); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$3 = _r$7; + rest$2 = _tuple$3[0]; + err$2 = _tuple$3[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [$ifaceNil, errors.New("x509: failed to parse ECDSA parameters as named curve")]; + } + if (!((rest$2.$length === 0))) { + $s = -1; return [$ifaceNil, errors.New("x509: trailing data after ECDSA parameters")]; + } + _r$8 = namedCurveFromOID(namedCurveOID.$get()); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + namedCurve = _r$8; + if ($interfaceIsEqual(namedCurve, $ifaceNil)) { + $s = -1; return [$ifaceNil, errors.New("x509: unsupported elliptic curve")]; + } + _r$9 = elliptic.Unmarshal(namedCurve, asn1Data); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$4 = _r$9; + x = _tuple$4[0]; + y = _tuple$4[1]; + if (x === ptrType$4.nil) { + $s = -1; return [$ifaceNil, errors.New("x509: failed to unmarshal elliptic curve point")]; + } + pub$2 = new ecdsa.PublicKey.ptr(namedCurve, x, y); + $s = -1; return [pub$2, $ifaceNil]; + /* } else { */ case 5: + $s = -1; return [$ifaceNil, $ifaceNil]; + /* } */ case 6: + case 1: + $s = -1; return [$ifaceNil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parsePublicKey }; } $f._1 = _1; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.algo = algo; $f.asn1Data = asn1Data; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.keyData = keyData; $f.namedCurve = namedCurve; $f.namedCurveOID = namedCurveOID; $f.p = p; $f.p$1 = p$1; $f.params = params; $f.paramsData = paramsData; $f.paramsData$1 = paramsData$1; $f.pub = pub; $f.pub$1 = pub$1; $f.pub$2 = pub$2; $f.rest = rest; $f.rest$1 = rest$1; $f.rest$2 = rest$2; $f.x = x; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + forEachSAN = function(extension, callback) { + var _r$4, _r$5, _r$6, _tuple, _tuple$1, callback, err, err$1, extension, rest, seq, v, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; callback = $f.callback; err = $f.err; err$1 = $f.err$1; extension = $f.extension; rest = $f.rest; seq = $f.seq; v = $f.v; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + seq = [seq]; + seq[0] = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + _r$4 = asn1.Unmarshal(extension, seq[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rest = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } else if (!((rest.$length === 0))) { + $s = -1; return errors.New("x509: trailing data after X.509 extension"); + } + if (!seq[0].IsCompound || !((seq[0].Tag === 16)) || !((seq[0].Class === 0))) { + $s = -1; return (x = new asn1.StructuralError.ptr("bad SAN sequence"), new x.constructor.elem(x)); + } + rest = seq[0].Bytes; + /* while (true) { */ case 2: + /* if (!(rest.$length > 0)) { break; } */ if(!(rest.$length > 0)) { $s = 3; continue; } + v = [v]; + v[0] = new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil); + _r$5 = asn1.Unmarshal(rest, v[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + rest = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$6 = callback(v[0].Tag, v[0].Bytes); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err$1 = _r$6; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ $s = 2; continue; case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: forEachSAN }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.callback = callback; $f.err = err; $f.err$1 = err$1; $f.extension = extension; $f.rest = rest; $f.seq = seq; $f.v = v; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + parseSANExtension = function(value) { + var _r$4, dnsNames, emailAddresses, err, ipAddresses, uris, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; dnsNames = $f.dnsNames; emailAddresses = $f.emailAddresses; err = $f.err; ipAddresses = $f.ipAddresses; uris = $f.uris; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dnsNames = [dnsNames]; + emailAddresses = [emailAddresses]; + ipAddresses = [ipAddresses]; + uris = [uris]; + dnsNames[0] = sliceType$12.nil; + emailAddresses[0] = sliceType$12.nil; + ipAddresses[0] = sliceType$14.nil; + uris[0] = sliceType$15.nil; + err = $ifaceNil; + _r$4 = forEachSAN(value, (function(dnsNames, emailAddresses, ipAddresses, uris) { return function $b(tag, data) { + var _1, _2, _r$4, _r$5, _r$6, _tuple, _tuple$1, data, err$1, ok, tag, uri, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; data = $f.data; err$1 = $f.err$1; ok = $f.ok; tag = $f.tag; uri = $f.uri; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = tag; + /* */ if (_1 === (1)) { $s = 2; continue; } + /* */ if (_1 === (2)) { $s = 3; continue; } + /* */ if (_1 === (6)) { $s = 4; continue; } + /* */ if (_1 === (7)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_1 === (1)) { */ case 2: + emailAddresses[0] = $append(emailAddresses[0], ($bytesToString(data))); + $s = 6; continue; + /* } else if (_1 === (2)) { */ case 3: + dnsNames[0] = $append(dnsNames[0], ($bytesToString(data))); + $s = 6; continue; + /* } else if (_1 === (6)) { */ case 4: + _r$4 = url.Parse(($bytesToString(data))); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + uri = _tuple[0]; + err$1 = _tuple[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: + _r$5 = fmt.Errorf("x509: cannot parse URI %q: %s", new sliceType$10([new $String(($bytesToString(data))), err$1])); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* } */ case 9: + /* */ if (uri.Host.length > 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (uri.Host.length > 0) { */ case 11: + _tuple$1 = domainToReverseLabels(uri.Host); + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!ok) { */ case 13: + _r$6 = fmt.Errorf("x509: cannot parse URI %q: invalid domain", new sliceType$10([new $String(($bytesToString(data)))])); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 14: + /* } */ case 12: + uris[0] = $append(uris[0], uri); + $s = 6; continue; + /* } else if (_1 === (7)) { */ case 5: + _2 = data.$length; + if ((_2 === (4)) || (_2 === (16))) { + ipAddresses[0] = $append(ipAddresses[0], $subslice(new net.IP(data.$array), data.$offset, data.$offset + data.$length)); + } else { + $s = -1; return errors.New("x509: cannot parse IP address of length " + strconv.Itoa(data.$length)); + } + /* } */ case 6: + case 1: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._2 = _2; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.data = data; $f.err$1 = err$1; $f.ok = ok; $f.tag = tag; $f.uri = uri; $f.$s = $s; $f.$r = $r; return $f; + }; })(dnsNames, emailAddresses, ipAddresses, uris)); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + $s = -1; return [dnsNames[0], emailAddresses[0], ipAddresses[0], uris[0], err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseSANExtension }; } $f._r$4 = _r$4; $f.dnsNames = dnsNames; $f.emailAddresses = emailAddresses; $f.err = err; $f.ipAddresses = ipAddresses; $f.uris = uris; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + isValidIPMask = function(mask) { + var _1, _i, _ref, b, mask, seenZero; + seenZero = false; + _ref = mask; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (seenZero) { + if (!((b === 0))) { + return false; + } + _i++; + continue; + } + _1 = b; + if ((_1 === (0)) || (_1 === (128)) || (_1 === (192)) || (_1 === (224)) || (_1 === (240)) || (_1 === (248)) || (_1 === (252)) || (_1 === (254))) { + seenZero = true; + } else if (_1 === (255)) { + } else { + return false; + } + _i++; + } + return true; + }; + parseNameConstraintsExtension = function(out, e) { + var _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, e, err, excluded, getValues, haveExcluded, havePermitted, out, outer, outer$24ptr, permitted, toplevel, unhandled, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; err = $f.err; excluded = $f.excluded; getValues = $f.getValues; haveExcluded = $f.haveExcluded; havePermitted = $f.havePermitted; out = $f.out; outer = $f.outer; outer$24ptr = $f.outer$24ptr; permitted = $f.permitted; toplevel = $f.toplevel; unhandled = $f.unhandled; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + excluded = [excluded]; + haveExcluded = [haveExcluded]; + havePermitted = [havePermitted]; + permitted = [permitted]; + toplevel = [toplevel]; + unhandled = [unhandled]; + unhandled[0] = false; + err = $ifaceNil; + outer = ((x = e.Value, $subslice(new cryptobyte.String(x.$array), x.$offset, x.$offset + x.$length))); + _tmp = cryptobyte.String.nil; + _tmp$1 = cryptobyte.String.nil; + _tmp$2 = cryptobyte.String.nil; + toplevel[0] = _tmp; + permitted[0] = _tmp$1; + excluded[0] = _tmp$2; + _tmp$3 = false; + _tmp$4 = false; + havePermitted[0] = _tmp$3; + haveExcluded[0] = _tmp$4; + if (!(outer$24ptr || (outer$24ptr = new ptrType$15(function() { return outer; }, function($v) { outer = $subslice(new cryptobyte.String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).ReadASN1((toplevel.$ptr || (toplevel.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))), 48) || !outer.Empty() || !(toplevel.$ptr || (toplevel.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))).ReadOptionalASN1((permitted.$ptr || (permitted.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, permitted))), (havePermitted.$ptr || (havePermitted.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, havePermitted))), new asn1$1.Tag(new asn1$1.Tag(0).ContextSpecific()).Constructed()) || !(toplevel.$ptr || (toplevel.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))).ReadOptionalASN1((excluded.$ptr || (excluded.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, excluded))), (haveExcluded.$ptr || (haveExcluded.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, haveExcluded))), new asn1$1.Tag(new asn1$1.Tag(1).ContextSpecific()).Constructed()) || !toplevel[0].Empty()) { + _tmp$5 = false; + _tmp$6 = errors.New("x509: invalid NameConstraints extension"); + unhandled[0] = _tmp$5; + err = _tmp$6; + $s = -1; return [unhandled[0], err]; + } + if (!havePermitted[0] && !haveExcluded[0] || (permitted[0].$length === 0) && (excluded[0].$length === 0)) { + _tmp$7 = false; + _tmp$8 = errors.New("x509: empty name constraints extension"); + unhandled[0] = _tmp$7; + err = _tmp$8; + $s = -1; return [unhandled[0], err]; + } + getValues = (function(excluded, haveExcluded, havePermitted, permitted, toplevel, unhandled) { return function $b(subtrees) { + var _1, _2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$70, _tmp$71, _tmp$72, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, constraint, dnsNames, dnsTag, domain, domain$1, domain$2, emailTag, emails, err$1, err$2, err$3, err$4, ip, ipTag, ips, l, mask, ok, ok$1, ok$2, ok$3, seq, subtrees, subtrees$24ptr, tag, trimmedDomain, trimmedDomain$1, uriDomains, uriTag, value, x$1, x$2, x$3, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$20 = $f._r$20; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$30 = $f._tmp$30; _tmp$31 = $f._tmp$31; _tmp$32 = $f._tmp$32; _tmp$33 = $f._tmp$33; _tmp$34 = $f._tmp$34; _tmp$35 = $f._tmp$35; _tmp$36 = $f._tmp$36; _tmp$37 = $f._tmp$37; _tmp$38 = $f._tmp$38; _tmp$39 = $f._tmp$39; _tmp$40 = $f._tmp$40; _tmp$41 = $f._tmp$41; _tmp$42 = $f._tmp$42; _tmp$43 = $f._tmp$43; _tmp$44 = $f._tmp$44; _tmp$45 = $f._tmp$45; _tmp$46 = $f._tmp$46; _tmp$47 = $f._tmp$47; _tmp$48 = $f._tmp$48; _tmp$49 = $f._tmp$49; _tmp$50 = $f._tmp$50; _tmp$51 = $f._tmp$51; _tmp$52 = $f._tmp$52; _tmp$53 = $f._tmp$53; _tmp$54 = $f._tmp$54; _tmp$55 = $f._tmp$55; _tmp$56 = $f._tmp$56; _tmp$57 = $f._tmp$57; _tmp$58 = $f._tmp$58; _tmp$59 = $f._tmp$59; _tmp$60 = $f._tmp$60; _tmp$61 = $f._tmp$61; _tmp$62 = $f._tmp$62; _tmp$63 = $f._tmp$63; _tmp$64 = $f._tmp$64; _tmp$65 = $f._tmp$65; _tmp$66 = $f._tmp$66; _tmp$67 = $f._tmp$67; _tmp$68 = $f._tmp$68; _tmp$69 = $f._tmp$69; _tmp$70 = $f._tmp$70; _tmp$71 = $f._tmp$71; _tmp$72 = $f._tmp$72; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; constraint = $f.constraint; dnsNames = $f.dnsNames; dnsTag = $f.dnsTag; domain = $f.domain; domain$1 = $f.domain$1; domain$2 = $f.domain$2; emailTag = $f.emailTag; emails = $f.emails; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; ip = $f.ip; ipTag = $f.ipTag; ips = $f.ips; l = $f.l; mask = $f.mask; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; ok$3 = $f.ok$3; seq = $f.seq; subtrees = $f.subtrees; subtrees$24ptr = $f.subtrees$24ptr; tag = $f.tag; trimmedDomain = $f.trimmedDomain; trimmedDomain$1 = $f.trimmedDomain$1; uriDomains = $f.uriDomains; uriTag = $f.uriTag; value = $f.value; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dnsNames = sliceType$12.nil; + ips = sliceType$16.nil; + emails = sliceType$12.nil; + uriDomains = sliceType$12.nil; + err$1 = $ifaceNil; + /* while (true) { */ case 1: + /* if (!(!subtrees.Empty())) { break; } */ if(!(!subtrees.Empty())) { $s = 2; continue; } + seq = [seq]; + tag = [tag]; + value = [value]; + _tmp$9 = cryptobyte.String.nil; + _tmp$10 = cryptobyte.String.nil; + seq[0] = _tmp$9; + value[0] = _tmp$10; + tag[0] = 0; + /* */ if (!(subtrees$24ptr || (subtrees$24ptr = new ptrType$15(function() { return subtrees; }, function($v) { subtrees = $subslice(new cryptobyte.String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).ReadASN1((seq.$ptr || (seq.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))), 48) || !(seq.$ptr || (seq.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))).ReadAnyASN1((value.$ptr || (value.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))), (tag.$ptr || (tag.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tag))))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(subtrees$24ptr || (subtrees$24ptr = new ptrType$15(function() { return subtrees; }, function($v) { subtrees = $subslice(new cryptobyte.String($v.$array), $v.$offset, $v.$offset + $v.$length); }))).ReadASN1((seq.$ptr || (seq.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))), 48) || !(seq.$ptr || (seq.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))).ReadAnyASN1((value.$ptr || (value.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))), (tag.$ptr || (tag.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tag))))) { */ case 3: + _tmp$11 = sliceType$12.nil; + _tmp$12 = sliceType$16.nil; + _tmp$13 = sliceType$12.nil; + _tmp$14 = sliceType$12.nil; + _r$4 = fmt.Errorf("x509: invalid NameConstraints extension", new sliceType$10([])); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp$15 = _r$4; + dnsNames = _tmp$11; + ips = _tmp$12; + emails = _tmp$13; + uriDomains = _tmp$14; + err$1 = _tmp$15; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 4: + dnsTag = new asn1$1.Tag(2).ContextSpecific(); + emailTag = new asn1$1.Tag(1).ContextSpecific(); + ipTag = new asn1$1.Tag(7).ContextSpecific(); + uriTag = new asn1$1.Tag(6).ContextSpecific(); + _1 = tag[0]; + /* */ if (_1 === (dnsTag)) { $s = 7; continue; } + /* */ if (_1 === (ipTag)) { $s = 8; continue; } + /* */ if (_1 === (emailTag)) { $s = 9; continue; } + /* */ if (_1 === (uriTag)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_1 === (dnsTag)) { */ case 7: + domain = ($bytesToString(value[0])); + _r$5 = isIA5String(domain); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$2 = _r$5; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 14: + _tmp$16 = sliceType$12.nil; + _tmp$17 = sliceType$16.nil; + _tmp$18 = sliceType$12.nil; + _tmp$19 = sliceType$12.nil; + _r$6 = err$2.Error(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = errors.New("x509: invalid constraint value: " + _r$6); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tmp$20 = _r$7; + dnsNames = _tmp$16; + ips = _tmp$17; + emails = _tmp$18; + uriDomains = _tmp$19; + err$1 = _tmp$20; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 15: + trimmedDomain = domain; + if (trimmedDomain.length > 0 && (trimmedDomain.charCodeAt(0) === 46)) { + trimmedDomain = $substring(trimmedDomain, 1); + } + _tuple = domainToReverseLabels(trimmedDomain); + ok = _tuple[1]; + /* */ if (!ok) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!ok) { */ case 18: + _tmp$21 = sliceType$12.nil; + _tmp$22 = sliceType$16.nil; + _tmp$23 = sliceType$12.nil; + _tmp$24 = sliceType$12.nil; + _r$8 = fmt.Errorf("x509: failed to parse dnsName constraint %q", new sliceType$10([new $String(domain)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tmp$25 = _r$8; + dnsNames = _tmp$21; + ips = _tmp$22; + emails = _tmp$23; + uriDomains = _tmp$24; + err$1 = _tmp$25; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 19: + dnsNames = $append(dnsNames, domain); + $s = 12; continue; + /* } else if (_1 === (ipTag)) { */ case 8: + l = value[0].$length; + _tmp$26 = sliceType$3.nil; + _tmp$27 = sliceType$3.nil; + ip = _tmp$26; + mask = _tmp$27; + _2 = l; + /* */ if (_2 === (8)) { $s = 22; continue; } + /* */ if (_2 === (32)) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (_2 === (8)) { */ case 22: + ip = (x$1 = $subslice(value[0], 0, 4), $subslice(new sliceType$3(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)); + mask = (x$2 = $subslice(value[0], 4), $subslice(new sliceType$3(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)); + $s = 25; continue; + /* } else if (_2 === (32)) { */ case 23: + ip = (x$3 = $subslice(value[0], 0, 16), $subslice(new sliceType$3(x$3.$array), x$3.$offset, x$3.$offset + x$3.$length)); + mask = (x$4 = $subslice(value[0], 16), $subslice(new sliceType$3(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)); + $s = 25; continue; + /* } else { */ case 24: + _tmp$28 = sliceType$12.nil; + _tmp$29 = sliceType$16.nil; + _tmp$30 = sliceType$12.nil; + _tmp$31 = sliceType$12.nil; + _r$9 = fmt.Errorf("x509: IP constraint contained value of length %d", new sliceType$10([new $Int(l)])); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tmp$32 = _r$9; + dnsNames = _tmp$28; + ips = _tmp$29; + emails = _tmp$30; + uriDomains = _tmp$31; + err$1 = _tmp$32; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 25: + case 21: + /* */ if (!isValidIPMask(mask)) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (!isValidIPMask(mask)) { */ case 27: + _tmp$33 = sliceType$12.nil; + _tmp$34 = sliceType$16.nil; + _tmp$35 = sliceType$12.nil; + _tmp$36 = sliceType$12.nil; + _r$10 = fmt.Errorf("x509: IP constraint contained invalid mask %x", new sliceType$10([mask])); /* */ $s = 29; case 29: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tmp$37 = _r$10; + dnsNames = _tmp$33; + ips = _tmp$34; + emails = _tmp$35; + uriDomains = _tmp$36; + err$1 = _tmp$37; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 28: + ips = $append(ips, new net.IPNet.ptr(($subslice(new net.IP(ip.$array), ip.$offset, ip.$offset + ip.$length)), ($subslice(new net.IPMask(mask.$array), mask.$offset, mask.$offset + mask.$length)))); + $s = 12; continue; + /* } else if (_1 === (emailTag)) { */ case 9: + constraint = ($bytesToString(value[0])); + _r$11 = isIA5String(constraint); /* */ $s = 30; case 30: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$3 = _r$11; + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 31; continue; } + /* */ $s = 32; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 31: + _tmp$38 = sliceType$12.nil; + _tmp$39 = sliceType$16.nil; + _tmp$40 = sliceType$12.nil; + _tmp$41 = sliceType$12.nil; + _r$12 = err$3.Error(); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$13 = errors.New("x509: invalid constraint value: " + _r$12); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tmp$42 = _r$13; + dnsNames = _tmp$38; + ips = _tmp$39; + emails = _tmp$40; + uriDomains = _tmp$41; + err$1 = _tmp$42; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 32: + /* */ if (strings.Contains(constraint, "@")) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if (strings.Contains(constraint, "@")) { */ case 35: + _tuple$1 = parseRFC2821Mailbox(constraint); + ok$1 = _tuple$1[1]; + /* */ if (!ok$1) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if (!ok$1) { */ case 38: + _tmp$43 = sliceType$12.nil; + _tmp$44 = sliceType$16.nil; + _tmp$45 = sliceType$12.nil; + _tmp$46 = sliceType$12.nil; + _r$14 = fmt.Errorf("x509: failed to parse rfc822Name constraint %q", new sliceType$10([new $String(constraint)])); /* */ $s = 40; case 40: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tmp$47 = _r$14; + dnsNames = _tmp$43; + ips = _tmp$44; + emails = _tmp$45; + uriDomains = _tmp$46; + err$1 = _tmp$47; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 39: + $s = 37; continue; + /* } else { */ case 36: + domain$1 = constraint; + if (domain$1.length > 0 && (domain$1.charCodeAt(0) === 46)) { + domain$1 = $substring(domain$1, 1); + } + _tuple$2 = domainToReverseLabels(domain$1); + ok$2 = _tuple$2[1]; + /* */ if (!ok$2) { $s = 41; continue; } + /* */ $s = 42; continue; + /* if (!ok$2) { */ case 41: + _tmp$48 = sliceType$12.nil; + _tmp$49 = sliceType$16.nil; + _tmp$50 = sliceType$12.nil; + _tmp$51 = sliceType$12.nil; + _r$15 = fmt.Errorf("x509: failed to parse rfc822Name constraint %q", new sliceType$10([new $String(constraint)])); /* */ $s = 43; case 43: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tmp$52 = _r$15; + dnsNames = _tmp$48; + ips = _tmp$49; + emails = _tmp$50; + uriDomains = _tmp$51; + err$1 = _tmp$52; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 42: + /* } */ case 37: + emails = $append(emails, constraint); + $s = 12; continue; + /* } else if (_1 === (uriTag)) { */ case 10: + domain$2 = ($bytesToString(value[0])); + _r$16 = isIA5String(domain$2); /* */ $s = 44; case 44: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + err$4 = _r$16; + /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 45: + _tmp$53 = sliceType$12.nil; + _tmp$54 = sliceType$16.nil; + _tmp$55 = sliceType$12.nil; + _tmp$56 = sliceType$12.nil; + _r$17 = err$4.Error(); /* */ $s = 47; case 47: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$18 = errors.New("x509: invalid constraint value: " + _r$17); /* */ $s = 48; case 48: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _tmp$57 = _r$18; + dnsNames = _tmp$53; + ips = _tmp$54; + emails = _tmp$55; + uriDomains = _tmp$56; + err$1 = _tmp$57; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 46: + /* */ if (!(net.ParseIP(domain$2) === net.IP.nil)) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (!(net.ParseIP(domain$2) === net.IP.nil)) { */ case 49: + _tmp$58 = sliceType$12.nil; + _tmp$59 = sliceType$16.nil; + _tmp$60 = sliceType$12.nil; + _tmp$61 = sliceType$12.nil; + _r$19 = fmt.Errorf("x509: failed to parse URI constraint %q: cannot be IP address", new sliceType$10([new $String(domain$2)])); /* */ $s = 51; case 51: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _tmp$62 = _r$19; + dnsNames = _tmp$58; + ips = _tmp$59; + emails = _tmp$60; + uriDomains = _tmp$61; + err$1 = _tmp$62; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 50: + trimmedDomain$1 = domain$2; + if (trimmedDomain$1.length > 0 && (trimmedDomain$1.charCodeAt(0) === 46)) { + trimmedDomain$1 = $substring(trimmedDomain$1, 1); + } + _tuple$3 = domainToReverseLabels(trimmedDomain$1); + ok$3 = _tuple$3[1]; + /* */ if (!ok$3) { $s = 52; continue; } + /* */ $s = 53; continue; + /* if (!ok$3) { */ case 52: + _tmp$63 = sliceType$12.nil; + _tmp$64 = sliceType$16.nil; + _tmp$65 = sliceType$12.nil; + _tmp$66 = sliceType$12.nil; + _r$20 = fmt.Errorf("x509: failed to parse URI constraint %q", new sliceType$10([new $String(domain$2)])); /* */ $s = 54; case 54: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _tmp$67 = _r$20; + dnsNames = _tmp$63; + ips = _tmp$64; + emails = _tmp$65; + uriDomains = _tmp$66; + err$1 = _tmp$67; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* } */ case 53: + uriDomains = $append(uriDomains, domain$2); + $s = 12; continue; + /* } else { */ case 11: + unhandled[0] = true; + /* } */ case 12: + case 6: + /* } */ $s = 1; continue; case 2: + _tmp$68 = dnsNames; + _tmp$69 = ips; + _tmp$70 = emails; + _tmp$71 = uriDomains; + _tmp$72 = $ifaceNil; + dnsNames = _tmp$68; + ips = _tmp$69; + emails = _tmp$70; + uriDomains = _tmp$71; + err$1 = _tmp$72; + $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._2 = _2; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$20 = _r$20; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$30 = _tmp$30; $f._tmp$31 = _tmp$31; $f._tmp$32 = _tmp$32; $f._tmp$33 = _tmp$33; $f._tmp$34 = _tmp$34; $f._tmp$35 = _tmp$35; $f._tmp$36 = _tmp$36; $f._tmp$37 = _tmp$37; $f._tmp$38 = _tmp$38; $f._tmp$39 = _tmp$39; $f._tmp$40 = _tmp$40; $f._tmp$41 = _tmp$41; $f._tmp$42 = _tmp$42; $f._tmp$43 = _tmp$43; $f._tmp$44 = _tmp$44; $f._tmp$45 = _tmp$45; $f._tmp$46 = _tmp$46; $f._tmp$47 = _tmp$47; $f._tmp$48 = _tmp$48; $f._tmp$49 = _tmp$49; $f._tmp$50 = _tmp$50; $f._tmp$51 = _tmp$51; $f._tmp$52 = _tmp$52; $f._tmp$53 = _tmp$53; $f._tmp$54 = _tmp$54; $f._tmp$55 = _tmp$55; $f._tmp$56 = _tmp$56; $f._tmp$57 = _tmp$57; $f._tmp$58 = _tmp$58; $f._tmp$59 = _tmp$59; $f._tmp$60 = _tmp$60; $f._tmp$61 = _tmp$61; $f._tmp$62 = _tmp$62; $f._tmp$63 = _tmp$63; $f._tmp$64 = _tmp$64; $f._tmp$65 = _tmp$65; $f._tmp$66 = _tmp$66; $f._tmp$67 = _tmp$67; $f._tmp$68 = _tmp$68; $f._tmp$69 = _tmp$69; $f._tmp$70 = _tmp$70; $f._tmp$71 = _tmp$71; $f._tmp$72 = _tmp$72; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.constraint = constraint; $f.dnsNames = dnsNames; $f.dnsTag = dnsTag; $f.domain = domain; $f.domain$1 = domain$1; $f.domain$2 = domain$2; $f.emailTag = emailTag; $f.emails = emails; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.ip = ip; $f.ipTag = ipTag; $f.ips = ips; $f.l = l; $f.mask = mask; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.ok$3 = ok$3; $f.seq = seq; $f.subtrees = subtrees; $f.subtrees$24ptr = subtrees$24ptr; $f.tag = tag; $f.trimmedDomain = trimmedDomain; $f.trimmedDomain$1 = trimmedDomain$1; $f.uriDomains = uriDomains; $f.uriTag = uriTag; $f.value = value; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; })(excluded, haveExcluded, havePermitted, permitted, toplevel, unhandled); + _r$4 = getValues(permitted[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + out.PermittedDNSDomains = _tuple[0]; + out.PermittedIPRanges = _tuple[1]; + out.PermittedEmailAddresses = _tuple[2]; + out.PermittedURIDomains = _tuple[3]; + err = _tuple[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$9 = false; + _tmp$10 = err; + unhandled[0] = _tmp$9; + err = _tmp$10; + $s = -1; return [unhandled[0], err]; + } + _r$5 = getValues(excluded[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + out.ExcludedDNSDomains = _tuple$1[0]; + out.ExcludedIPRanges = _tuple$1[1]; + out.ExcludedEmailAddresses = _tuple$1[2]; + out.ExcludedURIDomains = _tuple$1[3]; + err = _tuple$1[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$11 = false; + _tmp$12 = err; + unhandled[0] = _tmp$11; + err = _tmp$12; + $s = -1; return [unhandled[0], err]; + } + out.PermittedDNSDomainsCritical = e.Critical; + _tmp$13 = unhandled[0]; + _tmp$14 = $ifaceNil; + unhandled[0] = _tmp$13; + err = _tmp$14; + $s = -1; return [unhandled[0], err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseNameConstraintsExtension }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.err = err; $f.excluded = excluded; $f.getValues = getValues; $f.haveExcluded = haveExcluded; $f.havePermitted = havePermitted; $f.out = out; $f.outer = outer; $f.outer$24ptr = outer$24ptr; $f.permitted = permitted; $f.toplevel = toplevel; $f.unhandled = unhandled; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + parseCertificate = function(in$1) { + var _1, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, a, aia, cdp, constraints, dp, e, err, err$1, err$10, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, extKeyUsage, fullName, i, i$1, in$1, issuer, keyUsage, keyid, ok, out, policies, policy, rest, rest$1, rest$2, rest$3, rest$4, rest$5, rest$6, rest$7, rest$8, rest$9, subject, u, unhandled, usage, usageBits, v, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _i$4 = $f._i$4; _i$5 = $f._i$5; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _ref$4 = $f._ref$4; _ref$5 = $f._ref$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$11 = $f._tuple$11; _tuple$12 = $f._tuple$12; _tuple$13 = $f._tuple$13; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; a = $f.a; aia = $f.aia; cdp = $f.cdp; constraints = $f.constraints; dp = $f.dp; e = $f.e; err = $f.err; err$1 = $f.err$1; err$10 = $f.err$10; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; err$7 = $f.err$7; err$8 = $f.err$8; err$9 = $f.err$9; extKeyUsage = $f.extKeyUsage; fullName = $f.fullName; i = $f.i; i$1 = $f.i$1; in$1 = $f.in$1; issuer = $f.issuer; keyUsage = $f.keyUsage; keyid = $f.keyid; ok = $f.ok; out = $f.out; policies = $f.policies; policy = $f.policy; rest = $f.rest; rest$1 = $f.rest$1; rest$2 = $f.rest$2; rest$3 = $f.rest$3; rest$4 = $f.rest$4; rest$5 = $f.rest$5; rest$6 = $f.rest$6; rest$7 = $f.rest$7; rest$8 = $f.rest$8; rest$9 = $f.rest$9; subject = $f.subject; u = $f.u; unhandled = $f.unhandled; usage = $f.usage; usageBits = $f.usageBits; v = $f.v; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + issuer = [issuer]; + subject = [subject]; + out = new Certificate.ptr(sliceType$3.nil, sliceType$3.nil, sliceType$3.nil, sliceType$3.nil, sliceType$3.nil, sliceType$3.nil, 0, 0, $ifaceNil, 0, ptrType$4.nil, new pkix.Name.ptr(sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, "", "", sliceType$17.nil, sliceType$17.nil), new pkix.Name.ptr(sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, "", "", sliceType$17.nil, sliceType$17.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil), 0, sliceType$18.nil, sliceType$18.nil, sliceType$19.nil, sliceType$13.nil, sliceType$19.nil, false, false, 0, false, sliceType$3.nil, sliceType$3.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$14.nil, sliceType$15.nil, false, sliceType$12.nil, sliceType$12.nil, sliceType$16.nil, sliceType$16.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$12.nil, sliceType$19.nil); + out.Raw = (x = in$1.Raw, $subslice(new sliceType$3(x.$array), x.$offset, x.$offset + x.$length)); + out.RawTBSCertificate = (x$1 = in$1.TBSCertificate.Raw, $subslice(new sliceType$3(x$1.$array), x$1.$offset, x$1.$offset + x$1.$length)); + out.RawSubjectPublicKeyInfo = (x$2 = in$1.TBSCertificate.PublicKey.Raw, $subslice(new sliceType$3(x$2.$array), x$2.$offset, x$2.$offset + x$2.$length)); + out.RawSubject = in$1.TBSCertificate.Subject.FullBytes; + out.RawIssuer = in$1.TBSCertificate.Issuer.FullBytes; + out.Signature = $clone(in$1.SignatureValue, asn1.BitString).RightAlign(); + _r$4 = getSignatureAlgorithmFromAI($clone(in$1.TBSCertificate.SignatureAlgorithm, pkix.AlgorithmIdentifier)); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + out.SignatureAlgorithm = _r$4; + out.PublicKeyAlgorithm = getPublicKeyAlgorithmFromOID(in$1.TBSCertificate.PublicKey.Algorithm.Algorithm); + err = $ifaceNil; + _r$5 = parsePublicKey(out.PublicKeyAlgorithm, in$1.TBSCertificate.PublicKey); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple = _r$5; + out.PublicKey = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + out.Version = in$1.TBSCertificate.Version + 1 >> 0; + out.SerialNumber = in$1.TBSCertificate.SerialNumber; + _tmp = pkix.RDNSequence.nil; + _tmp$1 = pkix.RDNSequence.nil; + issuer[0] = _tmp; + subject[0] = _tmp$1; + _r$6 = asn1.Unmarshal(in$1.TBSCertificate.Subject.FullBytes, (subject.$ptr || (subject.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, subject)))); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + rest = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$1]; + } else if (!((rest.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 subject")]; + } + _r$7 = asn1.Unmarshal(in$1.TBSCertificate.Issuer.FullBytes, (issuer.$ptr || (issuer.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, issuer)))); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$2 = _r$7; + rest$1 = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$2]; + } else if (!((rest$1.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 subject")]; + } + out.Issuer.FillFromRDNSequence((issuer.$ptr || (issuer.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, issuer)))); + out.Subject.FillFromRDNSequence((subject.$ptr || (subject.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, subject)))); + time.Time.copy(out.NotBefore, in$1.TBSCertificate.Validity.NotBefore); + time.Time.copy(out.NotAfter, in$1.TBSCertificate.Validity.NotAfter); + _ref = in$1.TBSCertificate.Extensions; + _i = 0; + /* while (true) { */ case 5: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } + a = [a]; + aia = [aia]; + cdp = [cdp]; + constraints = [constraints]; + keyUsage = [keyUsage]; + keyid = [keyid]; + policies = [policies]; + usageBits = [usageBits]; + e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); + out.Extensions = $append(out.Extensions, e); + unhandled = false; + /* */ if ((e.Id.$length === 4) && ((x$3 = e.Id, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) === 2) && ((x$4 = e.Id, (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1])) === 5) && ((x$5 = e.Id, (2 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 2])) === 29)) { $s = 7; continue; } + /* */ if (e.Id.Equal($subslice(new asn1.ObjectIdentifier(oidExtensionAuthorityInfoAccess.$array), oidExtensionAuthorityInfoAccess.$offset, oidExtensionAuthorityInfoAccess.$offset + oidExtensionAuthorityInfoAccess.$length))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ((e.Id.$length === 4) && ((x$3 = e.Id, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) === 2) && ((x$4 = e.Id, (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1])) === 5) && ((x$5 = e.Id, (2 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 2])) === 29)) { */ case 7: + _1 = (x$6 = e.Id, (3 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 3])); + /* */ if (_1 === (15)) { $s = 12; continue; } + /* */ if (_1 === (19)) { $s = 13; continue; } + /* */ if (_1 === (17)) { $s = 14; continue; } + /* */ if (_1 === (30)) { $s = 15; continue; } + /* */ if (_1 === (31)) { $s = 16; continue; } + /* */ if (_1 === (35)) { $s = 17; continue; } + /* */ if (_1 === (37)) { $s = 18; continue; } + /* */ if (_1 === (14)) { $s = 19; continue; } + /* */ if (_1 === (32)) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (_1 === (15)) { */ case 12: + usageBits[0] = new asn1.BitString.ptr(sliceType$3.nil, 0); + _r$8 = asn1.Unmarshal(e.Value, usageBits[0]); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$3 = _r$8; + rest$2 = _tuple$3[0]; + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$3]; + } else if (!((rest$2.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 KeyUsage")]; + } + usage = 0; + i = 0; + while (true) { + if (!(i < 9)) { break; } + if (!(($clone(usageBits[0], asn1.BitString).At(i) === 0))) { + usage = usage | (((y = ((i >>> 0)), y < 32 ? (1 << y) : 0) >> 0)); + } + i = i + (1) >> 0; + } + out.KeyUsage = ((usage >> 0)); + $s = 22; continue; + /* } else if (_1 === (19)) { */ case 13: + constraints[0] = new basicConstraints.ptr(false, 0); + _r$9 = asn1.Unmarshal(e.Value, constraints[0]); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$4 = _r$9; + rest$3 = _tuple$4[0]; + err$4 = _tuple$4[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$4]; + } else if (!((rest$3.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 BasicConstraints")]; + } + out.BasicConstraintsValid = true; + out.IsCA = constraints[0].IsCA; + out.MaxPathLen = constraints[0].MaxPathLen; + out.MaxPathLenZero = out.MaxPathLen === 0; + $s = 22; continue; + /* } else if (_1 === (17)) { */ case 14: + _r$10 = parseSANExtension(e.Value); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$5 = _r$10; + out.DNSNames = _tuple$5[0]; + out.EmailAddresses = _tuple$5[1]; + out.IPAddresses = _tuple$5[2]; + out.URIs = _tuple$5[3]; + err = _tuple$5[4]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + if ((out.DNSNames.$length === 0) && (out.EmailAddresses.$length === 0) && (out.IPAddresses.$length === 0) && (out.URIs.$length === 0)) { + unhandled = true; + } + $s = 22; continue; + /* } else if (_1 === (30)) { */ case 15: + _r$11 = parseNameConstraintsExtension(out, $clone(e, pkix.Extension)); /* */ $s = 26; case 26: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$6 = _r$11; + unhandled = _tuple$6[0]; + err = _tuple$6[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + $s = 22; continue; + /* } else if (_1 === (31)) { */ case 16: + cdp[0] = sliceType$20.nil; + _r$12 = asn1.Unmarshal(e.Value, (cdp.$ptr || (cdp.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, cdp)))); /* */ $s = 27; case 27: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$7 = _r$12; + rest$4 = _tuple$7[0]; + err$5 = _tuple$7[1]; + if (!($interfaceIsEqual(err$5, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$5]; + } else if (!((rest$4.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 CRL distribution point")]; + } + _ref$1 = cdp[0]; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + dp = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), distributionPoint); + if (dp.DistributionPoint.FullName.$length === 0) { + _i$1++; + continue; + } + _ref$2 = dp.DistributionPoint.FullName; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + fullName = $clone(((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]), asn1.RawValue); + if (fullName.Tag === 6) { + out.CRLDistributionPoints = $append(out.CRLDistributionPoints, ($bytesToString(fullName.Bytes))); + } + _i$2++; + } + _i$1++; + } + $s = 22; continue; + /* } else if (_1 === (35)) { */ case 17: + a[0] = new authKeyId.ptr(sliceType$3.nil); + _r$13 = asn1.Unmarshal(e.Value, a[0]); /* */ $s = 28; case 28: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$8 = _r$13; + rest$5 = _tuple$8[0]; + err$6 = _tuple$8[1]; + if (!($interfaceIsEqual(err$6, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$6]; + } else if (!((rest$5.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 authority key-id")]; + } + out.AuthorityKeyId = a[0].Id; + $s = 22; continue; + /* } else if (_1 === (37)) { */ case 18: + keyUsage[0] = sliceType$19.nil; + _r$14 = asn1.Unmarshal(e.Value, (keyUsage.$ptr || (keyUsage.$ptr = new ptrType$21(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, keyUsage)))); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$9 = _r$14; + rest$6 = _tuple$9[0]; + err$7 = _tuple$9[1]; + if (!($interfaceIsEqual(err$7, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$7]; + } else if (!((rest$6.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 ExtendedKeyUsage")]; + } + _ref$3 = keyUsage[0]; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + u = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + _tuple$10 = extKeyUsageFromOID(u); + extKeyUsage = _tuple$10[0]; + ok = _tuple$10[1]; + if (ok) { + out.ExtKeyUsage = $append(out.ExtKeyUsage, extKeyUsage); + } else { + out.UnknownExtKeyUsage = $append(out.UnknownExtKeyUsage, u); + } + _i$3++; + } + $s = 22; continue; + /* } else if (_1 === (14)) { */ case 19: + keyid[0] = sliceType$3.nil; + _r$15 = asn1.Unmarshal(e.Value, (keyid.$ptr || (keyid.$ptr = new ptrType$22(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, keyid)))); /* */ $s = 30; case 30: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$11 = _r$15; + rest$7 = _tuple$11[0]; + err$8 = _tuple$11[1]; + if (!($interfaceIsEqual(err$8, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$8]; + } else if (!((rest$7.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 key-id")]; + } + out.SubjectKeyId = keyid[0]; + $s = 22; continue; + /* } else if (_1 === (32)) { */ case 20: + policies[0] = sliceType$21.nil; + _r$16 = asn1.Unmarshal(e.Value, (policies.$ptr || (policies.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, policies)))); /* */ $s = 31; case 31: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$12 = _r$16; + rest$8 = _tuple$12[0]; + err$9 = _tuple$12[1]; + if (!($interfaceIsEqual(err$9, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$9]; + } else if (!((rest$8.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 certificate policies")]; + } + out.PolicyIdentifiers = $makeSlice(sliceType$19, policies[0].$length); + _ref$4 = policies[0]; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$4.$length)) { break; } + i$1 = _i$4; + policy = $clone(((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]), policyInformation); + (x$7 = out.PolicyIdentifiers, ((i$1 < 0 || i$1 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + i$1] = policy.Policy)); + _i$4++; + } + $s = 22; continue; + /* } else { */ case 21: + unhandled = true; + /* } */ case 22: + case 11: + $s = 10; continue; + /* } else if (e.Id.Equal($subslice(new asn1.ObjectIdentifier(oidExtensionAuthorityInfoAccess.$array), oidExtensionAuthorityInfoAccess.$offset, oidExtensionAuthorityInfoAccess.$offset + oidExtensionAuthorityInfoAccess.$length))) { */ case 8: + aia[0] = sliceType$22.nil; + _r$17 = asn1.Unmarshal(e.Value, (aia.$ptr || (aia.$ptr = new ptrType$24(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, aia)))); /* */ $s = 32; case 32: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tuple$13 = _r$17; + rest$9 = _tuple$13[0]; + err$10 = _tuple$13[1]; + if (!($interfaceIsEqual(err$10, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err$10]; + } else if (!((rest$9.$length === 0))) { + $s = -1; return [ptrType$1.nil, errors.New("x509: trailing data after X.509 authority information")]; + } + _ref$5 = aia[0]; + _i$5 = 0; + while (true) { + if (!(_i$5 < _ref$5.$length)) { break; } + v = $clone(((_i$5 < 0 || _i$5 >= _ref$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$5.$array[_ref$5.$offset + _i$5]), authorityInfoAccess); + if (!((v.Location.Tag === 6))) { + _i$5++; + continue; + } + if (v.Method.Equal(oidAuthorityInfoAccessOcsp)) { + out.OCSPServer = $append(out.OCSPServer, ($bytesToString(v.Location.Bytes))); + } else if (v.Method.Equal(oidAuthorityInfoAccessIssuers)) { + out.IssuingCertificateURL = $append(out.IssuingCertificateURL, ($bytesToString(v.Location.Bytes))); + } + _i$5++; + } + $s = 10; continue; + /* } else { */ case 9: + unhandled = true; + /* } */ case 10: + if (e.Critical && unhandled) { + out.UnhandledCriticalExtensions = $append(out.UnhandledCriticalExtensions, e.Id); + } + _i++; + /* } */ $s = 5; continue; case 6: + $s = -1; return [out, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseCertificate }; } $f._1 = _1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._i$4 = _i$4; $f._i$5 = _i$5; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._ref$4 = _ref$4; $f._ref$5 = _ref$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$11 = _tuple$11; $f._tuple$12 = _tuple$12; $f._tuple$13 = _tuple$13; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.a = a; $f.aia = aia; $f.cdp = cdp; $f.constraints = constraints; $f.dp = dp; $f.e = e; $f.err = err; $f.err$1 = err$1; $f.err$10 = err$10; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.err$7 = err$7; $f.err$8 = err$8; $f.err$9 = err$9; $f.extKeyUsage = extKeyUsage; $f.fullName = fullName; $f.i = i; $f.i$1 = i$1; $f.in$1 = in$1; $f.issuer = issuer; $f.keyUsage = keyUsage; $f.keyid = keyid; $f.ok = ok; $f.out = out; $f.policies = policies; $f.policy = policy; $f.rest = rest; $f.rest$1 = rest$1; $f.rest$2 = rest$2; $f.rest$3 = rest$3; $f.rest$4 = rest$4; $f.rest$5 = rest$5; $f.rest$6 = rest$6; $f.rest$7 = rest$7; $f.rest$8 = rest$8; $f.rest$9 = rest$9; $f.subject = subject; $f.u = u; $f.unhandled = unhandled; $f.usage = usage; $f.usageBits = usageBits; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + ParseCertificate = function(asn1Data) { + var _r$4, _r$5, _tuple, asn1Data, cert, err, rest, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; asn1Data = $f.asn1Data; cert = $f.cert; err = $f.err; rest = $f.rest; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cert = [cert]; + cert[0] = new certificate.ptr(asn1.RawContent.nil, new tbsCertificate.ptr(asn1.RawContent.nil, 0, ptrType$4.nil, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil), new validity.ptr(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$18.nil)), new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil), new publicKeyInfo.ptr(asn1.RawContent.nil, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.BitString.ptr(sliceType$3.nil, 0)), new asn1.BitString.ptr(sliceType$3.nil, 0), new asn1.BitString.ptr(sliceType$3.nil, 0), sliceType$18.nil), new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)), new asn1.BitString.ptr(sliceType$3.nil, 0)); + _r$4 = asn1.Unmarshal(asn1Data, cert[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rest = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$1.nil, err]; + } + if (rest.$length > 0) { + $s = -1; return [ptrType$1.nil, (x = new asn1.SyntaxError.ptr("trailing data"), new x.constructor.elem(x))]; + } + _r$5 = parseCertificate(cert[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParseCertificate }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.asn1Data = asn1Data; $f.cert = cert; $f.err = err; $f.rest = rest; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParseCertificate = ParseCertificate; + oidInExtensions = function(oid, extensions) { + var _i, _ref, e, extensions, oid; + _ref = extensions; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); + if (e.Id.Equal(oid)) { + return true; + } + _i++; + } + return false; + }; + isIA5String = function(s) { + var _i, _r$4, _ref, _rune, r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$4 = $f._r$4; _ref = $f._ref; _rune = $f._rune; r = $f.r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = s; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + /* */ if (r >= 128) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (r >= 128) { */ case 3: + _r$4 = fmt.Errorf("x509: %q cannot be encoded as an IA5String", new sliceType$10([new $String(s)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 4: + _i += _rune[1]; + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: isIA5String }; } $f._i = _i; $f._r$4 = _r$4; $f._ref = _ref; $f._rune = _rune; $f.r = r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + signingParamsForPublicKey = function(pub, requestedSigAlgo) { + var _1, _i, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _tmp, _tmp$1, _v, details, err, found, hashFunc, pub, pub$1, pub$2, pub$3, pubType, requestedSigAlgo, sigAlgo, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _ref = $f._ref; _ref$1 = $f._ref$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _v = $f._v; details = $f.details; err = $f.err; found = $f.found; hashFunc = $f.hashFunc; pub = $f.pub; pub$1 = $f.pub$1; pub$2 = $f.pub$2; pub$3 = $f.pub$3; pubType = $f.pubType; requestedSigAlgo = $f.requestedSigAlgo; sigAlgo = $f.sigAlgo; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hashFunc = 0; + sigAlgo = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$3.nil, sliceType$3.nil)); + err = $ifaceNil; + pubType = 0; + _ref = pub; + /* */ if ($assertType(_ref, ptrType$6, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$6, true)[1]) { */ case 1: + pub$1 = _ref.$val; + pubType = 1; + hashFunc = 5; + sigAlgo.Algorithm = oidSignatureSHA256WithRSA; + asn1.RawValue.copy(sigAlgo.Parameters, asn1.NullRawValue); + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$12, true)[1]) { */ case 2: + pub$2 = _ref.$val; + pubType = 3; + _1 = pub$2.Curve; + _r$4 = elliptic.P224(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + if ($interfaceIsEqual(_1, (_r$4))) { _v = true; $s = 11; continue s; } + _r$5 = elliptic.P256(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _v = $interfaceIsEqual(_1, (_r$5)); case 11: + /* */ if (_v) { $s = 6; continue; } + _r$6 = elliptic.P384(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + /* */ if ($interfaceIsEqual(_1, (_r$6))) { $s = 7; continue; } + _r$7 = elliptic.P521(); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + /* */ if ($interfaceIsEqual(_1, (_r$7))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (_v) { */ case 6: + hashFunc = 5; + sigAlgo.Algorithm = oidSignatureECDSAWithSHA256; + $s = 10; continue; + /* } else if ($interfaceIsEqual(_1, (_r$6))) { */ case 7: + hashFunc = 6; + sigAlgo.Algorithm = oidSignatureECDSAWithSHA384; + $s = 10; continue; + /* } else if ($interfaceIsEqual(_1, (_r$7))) { */ case 8: + hashFunc = 7; + sigAlgo.Algorithm = oidSignatureECDSAWithSHA512; + $s = 10; continue; + /* } else { */ case 9: + err = errors.New("x509: unknown elliptic curve"); + /* } */ case 10: + case 5: + $s = 4; continue; + /* } else { */ case 3: + pub$3 = _ref; + err = errors.New("x509: only RSA and ECDSA keys supported"); + /* } */ case 4: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [hashFunc, sigAlgo, err]; + } + if (requestedSigAlgo === 0) { + $s = -1; return [hashFunc, sigAlgo, err]; + } + found = false; + _ref$1 = signatureAlgorithmDetails; + _i = 0; + /* while (true) { */ case 16: + /* if (!(_i < _ref$1.$length)) { break; } */ if(!(_i < _ref$1.$length)) { $s = 17; continue; } + details = $clone(((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]), structType); + /* */ if (details.algo === requestedSigAlgo) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (details.algo === requestedSigAlgo) { */ case 18: + if (!((details.pubKeyAlgo === pubType))) { + err = errors.New("x509: requested SignatureAlgorithm does not match private key type"); + $s = -1; return [hashFunc, sigAlgo, err]; + } + _tmp = details.oid; + _tmp$1 = details.hash; + sigAlgo.Algorithm = _tmp; + hashFunc = _tmp$1; + if (hashFunc === 0) { + err = errors.New("x509: cannot sign with hash function requested"); + $s = -1; return [hashFunc, sigAlgo, err]; + } + /* */ if (new SignatureAlgorithm(requestedSigAlgo).isRSAPSS()) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (new SignatureAlgorithm(requestedSigAlgo).isRSAPSS()) { */ case 20: + _r$8 = rsaPSSParameters(hashFunc); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + asn1.RawValue.copy(sigAlgo.Parameters, _r$8); + /* } */ case 21: + found = true; + /* break; */ $s = 17; continue; + /* } */ case 19: + _i++; + /* } */ $s = 16; continue; case 17: + if (!found) { + err = errors.New("x509: unknown SignatureAlgorithm"); + } + $s = -1; return [hashFunc, sigAlgo, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: signingParamsForPublicKey }; } $f._1 = _1; $f._i = _i; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._v = _v; $f.details = details; $f.err = err; $f.found = found; $f.hashFunc = hashFunc; $f.pub = pub; $f.pub$1 = pub$1; $f.pub$2 = pub$2; $f.pub$3 = pub$3; $f.pubType = pubType; $f.requestedSigAlgo = requestedSigAlgo; $f.sigAlgo = sigAlgo; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.ptr.prototype.CreateCRL = function(rand, priv, revokedCerts, now, expiry) { + var _i, _r$10, _r$11, _r$12, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, aki, c, crlBytes, digest, err, expiry, h, hashFunc, i, key, now, ok, priv, rand, rc, revokedCerts, revokedCertsUTC, signature, signatureAlgorithm, tbsCertList, tbsCertListContents, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; aki = $f.aki; c = $f.c; crlBytes = $f.crlBytes; digest = $f.digest; err = $f.err; expiry = $f.expiry; h = $f.h; hashFunc = $f.hashFunc; i = $f.i; key = $f.key; now = $f.now; ok = $f.ok; priv = $f.priv; rand = $f.rand; rc = $f.rc; revokedCerts = $f.revokedCerts; revokedCertsUTC = $f.revokedCertsUTC; signature = $f.signature; signatureAlgorithm = $f.signatureAlgorithm; tbsCertList = $f.tbsCertList; tbsCertListContents = $f.tbsCertListContents; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + crlBytes = sliceType$3.nil; + err = $ifaceNil; + c = this; + _tuple = $assertType(priv, crypto.Signer, true); + key = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _tmp = sliceType$3.nil; + _tmp$1 = errors.New("x509: certificate private key does not implement crypto.Signer"); + crlBytes = _tmp; + err = _tmp$1; + $s = -1; return [crlBytes, err]; + } + _r$4 = key.Public(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = signingParamsForPublicKey(_r$4, 0); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + hashFunc = _tuple$1[0]; + signatureAlgorithm = $clone(_tuple$1[1], pkix.AlgorithmIdentifier); + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = sliceType$3.nil; + _tmp$3 = err; + crlBytes = _tmp$2; + err = _tmp$3; + $s = -1; return [crlBytes, err]; + } + revokedCertsUTC = $makeSlice(sliceType$25, revokedCerts.$length); + _ref = revokedCerts; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + rc = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.RevokedCertificate); + time.Time.copy(rc.RevocationTime, $clone(rc.RevocationTime, time.Time).UTC()); + pkix.RevokedCertificate.copy(((i < 0 || i >= revokedCertsUTC.$length) ? ($throwRuntimeError("index out of range"), undefined) : revokedCertsUTC.$array[revokedCertsUTC.$offset + i]), rc); + _i++; + } + tbsCertList = new pkix.TBSCertificateList.ptr(asn1.RawContent.nil, 1, $clone(signatureAlgorithm, pkix.AlgorithmIdentifier), $clone(c.Subject, pkix.Name).ToRDNSequence(), $clone($clone(now, time.Time).UTC(), time.Time), $clone($clone(expiry, time.Time).UTC(), time.Time), revokedCertsUTC, sliceType$18.nil); + /* */ if (c.SubjectKeyId.$length > 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (c.SubjectKeyId.$length > 0) { */ case 3: + aki = new pkix.Extension.ptr(asn1.ObjectIdentifier.nil, false, sliceType$3.nil); + aki.Id = $subslice(new asn1.ObjectIdentifier(oidExtensionAuthorityKeyId.$array), oidExtensionAuthorityKeyId.$offset, oidExtensionAuthorityKeyId.$offset + oidExtensionAuthorityKeyId.$length); + _r$6 = asn1.Marshal((x = new authKeyId.ptr(c.SubjectKeyId), new x.constructor.elem(x))); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + aki.Value = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [crlBytes, err]; + } + tbsCertList.Extensions = $append(tbsCertList.Extensions, aki); + /* } */ case 4: + _r$7 = asn1.Marshal(new tbsCertList.constructor.elem(tbsCertList)); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$3 = _r$7; + tbsCertListContents = _tuple$3[0]; + err = _tuple$3[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [crlBytes, err]; + } + _r$8 = new crypto.Hash(hashFunc).New(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + h = _r$8; + _r$9 = h.Write(tbsCertListContents); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _r$10 = h.Sum(sliceType$3.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + digest = _r$10; + signature = sliceType$3.nil; + _r$11 = key.Sign(rand, digest, new crypto.Hash(hashFunc)); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$4 = _r$11; + signature = _tuple$4[0]; + err = _tuple$4[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [crlBytes, err]; + } + _r$12 = asn1.Marshal((x$1 = new pkix.CertificateList.ptr($clone(tbsCertList, pkix.TBSCertificateList), $clone(signatureAlgorithm, pkix.AlgorithmIdentifier), new asn1.BitString.ptr(signature, $imul(signature.$length, 8))), new x$1.constructor.elem(x$1))); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$5 = _r$12; + crlBytes = _tuple$5[0]; + err = _tuple$5[1]; + $s = -1; return [crlBytes, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Certificate.ptr.prototype.CreateCRL }; } $f._i = _i; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.aki = aki; $f.c = c; $f.crlBytes = crlBytes; $f.digest = digest; $f.err = err; $f.expiry = expiry; $f.h = h; $f.hashFunc = hashFunc; $f.i = i; $f.key = key; $f.now = now; $f.ok = ok; $f.priv = priv; $f.rand = rand; $f.rc = rc; $f.revokedCerts = revokedCerts; $f.revokedCertsUTC = revokedCertsUTC; $f.signature = signature; $f.signatureAlgorithm = signatureAlgorithm; $f.tbsCertList = tbsCertList; $f.tbsCertListContents = tbsCertListContents; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Certificate.prototype.CreateCRL = function(rand, priv, revokedCerts, now, expiry) { return this.$val.CreateCRL(rand, priv, revokedCerts, now, expiry); }; + ptrType.methods = [{prop: "copy", name: "copy", pkg: "crypto/x509", typ: $funcType([], [ptrType], false)}, {prop: "findVerifiedParents", name: "findVerifiedParents", pkg: "crypto/x509", typ: $funcType([ptrType$1], [sliceType$4, ptrType$1, $error], false)}, {prop: "contains", name: "contains", pkg: "crypto/x509", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "AddCert", name: "AddCert", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "AppendCertsFromPEM", name: "AppendCertsFromPEM", pkg: "", typ: $funcType([sliceType$3], [$Bool], false)}, {prop: "Subjects", name: "Subjects", pkg: "", typ: $funcType([], [sliceType$6], false)}]; + CertificateInvalidError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + HostnameError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + UnknownAuthorityError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + SystemRootsError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + SignatureAlgorithm.methods = [{prop: "isRSAPSS", name: "isRSAPSS", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + PublicKeyAlgorithm.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "systemVerify", name: "systemVerify", pkg: "crypto/x509", typ: $funcType([ptrType$31], [sliceType$11, $error], false)}, {prop: "checkNameConstraints", name: "checkNameConstraints", pkg: "crypto/x509", typ: $funcType([ptrType$9, $Int, $String, $String, $emptyInterface, funcType$1, $emptyInterface, $emptyInterface], [$error], false)}, {prop: "isValid", name: "isValid", pkg: "crypto/x509", typ: $funcType([$Int, sliceType$5, ptrType$31], [$error], false)}, {prop: "Verify", name: "Verify", pkg: "", typ: $funcType([VerifyOptions], [sliceType$11, $error], false)}, {prop: "buildChains", name: "buildChains", pkg: "crypto/x509", typ: $funcType([mapType$1, sliceType$5, ptrType$31], [sliceType$11, $error], false)}, {prop: "commonNameAsHostname", name: "commonNameAsHostname", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "VerifyHostname", name: "VerifyHostname", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "hasSANExtension", name: "hasSANExtension", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "CheckSignatureFrom", name: "CheckSignatureFrom", pkg: "", typ: $funcType([ptrType$1], [$error], false)}, {prop: "CheckSignature", name: "CheckSignature", pkg: "", typ: $funcType([SignatureAlgorithm, sliceType$3, sliceType$3], [$error], false)}, {prop: "hasNameConstraints", name: "hasNameConstraints", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "getSANExtension", name: "getSANExtension", pkg: "crypto/x509", typ: $funcType([], [sliceType$3], false)}, {prop: "CheckCRLSignature", name: "CheckCRLSignature", pkg: "", typ: $funcType([ptrType$27], [$error], false)}, {prop: "CreateCRL", name: "CreateCRL", pkg: "", typ: $funcType([io.Reader, $emptyInterface, sliceType$25, time.Time, time.Time], [sliceType$3, $error], false)}]; + InsecureAlgorithmError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ConstraintViolationError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + UnhandledCriticalExtension.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + CertPool.init("crypto/x509", [{prop: "bySubjectKeyId", name: "bySubjectKeyId", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "certs", name: "certs", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); + pkcs1PrivateKey.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "P", name: "P", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Q", name: "Q", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Dp", name: "Dp", embedded: false, exported: true, typ: ptrType$4, tag: "asn1:\"optional\""}, {prop: "Dq", name: "Dq", embedded: false, exported: true, typ: ptrType$4, tag: "asn1:\"optional\""}, {prop: "Qinv", name: "Qinv", embedded: false, exported: true, typ: ptrType$4, tag: "asn1:\"optional\""}, {prop: "AdditionalPrimes", name: "AdditionalPrimes", embedded: false, exported: true, typ: sliceType$7, tag: "asn1:\"optional,omitempty\""}]); + pkcs1AdditionalRSAPrime.init("", [{prop: "Prime", name: "Prime", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Exp", name: "Exp", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Coeff", name: "Coeff", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); + pkcs1PublicKey.init("", [{prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}]); + pkcs8.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Algo", name: "Algo", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); + ecPrivateKey.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "NamedCurveOID", name: "NamedCurveOID", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: "asn1:\"optional,explicit,tag:0\""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: asn1.BitString, tag: "asn1:\"optional,explicit,tag:1\""}]); + CertificateInvalidError.init("", [{prop: "Cert", name: "Cert", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Reason", name: "Reason", embedded: false, exported: true, typ: InvalidReason, tag: ""}, {prop: "Detail", name: "Detail", embedded: false, exported: true, typ: $String, tag: ""}]); + HostnameError.init("", [{prop: "Certificate", name: "Certificate", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); + UnknownAuthorityError.init("crypto/x509", [{prop: "Cert", name: "Cert", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "hintErr", name: "hintErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "hintCert", name: "hintCert", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); + SystemRootsError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + VerifyOptions.init("", [{prop: "DNSName", name: "DNSName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Intermediates", name: "Intermediates", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Roots", name: "Roots", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "CurrentTime", name: "CurrentTime", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "KeyUsages", name: "KeyUsages", embedded: false, exported: true, typ: sliceType$13, tag: ""}, {prop: "MaxConstraintComparisions", name: "MaxConstraintComparisions", embedded: false, exported: true, typ: $Int, tag: ""}]); + rfc2821Mailbox.init("crypto/x509", [{prop: "local", name: "local", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "domain", name: "domain", embedded: false, exported: false, typ: $String, tag: ""}]); + certificate.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "TBSCertificate", name: "TBSCertificate", embedded: false, exported: true, typ: tbsCertificate, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "SignatureValue", name: "SignatureValue", embedded: false, exported: true, typ: asn1.BitString, tag: ""}]); + tbsCertificate.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,explicit,default:0,tag:0\""}, {prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "Issuer", name: "Issuer", embedded: false, exported: true, typ: asn1.RawValue, tag: ""}, {prop: "Validity", name: "Validity", embedded: false, exported: true, typ: validity, tag: ""}, {prop: "Subject", name: "Subject", embedded: false, exported: true, typ: asn1.RawValue, tag: ""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: publicKeyInfo, tag: ""}, {prop: "UniqueId", name: "UniqueId", embedded: false, exported: true, typ: asn1.BitString, tag: "asn1:\"optional,tag:1\""}, {prop: "SubjectUniqueId", name: "SubjectUniqueId", embedded: false, exported: true, typ: asn1.BitString, tag: "asn1:\"optional,tag:2\""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$18, tag: "asn1:\"optional,explicit,tag:3\""}]); + dsaAlgorithmParameters.init("", [{prop: "P", name: "P", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Q", name: "Q", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "G", name: "G", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); + dsaSignature.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "S", name: "S", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); + ecdsaSignature.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "S", name: "S", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); + validity.init("", [{prop: "NotBefore", name: "NotBefore", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "NotAfter", name: "NotAfter", embedded: false, exported: true, typ: time.Time, tag: ""}]); + publicKeyInfo.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "Algorithm", name: "Algorithm", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: asn1.BitString, tag: ""}]); + authKeyId.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: sliceType$3, tag: "asn1:\"optional,tag:0\""}]); + pssParameters.init("", [{prop: "Hash", name: "Hash", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: "asn1:\"explicit,tag:0\""}, {prop: "MGF", name: "MGF", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: "asn1:\"explicit,tag:1\""}, {prop: "SaltLength", name: "SaltLength", embedded: false, exported: true, typ: $Int, tag: "asn1:\"explicit,tag:2\""}, {prop: "TrailerField", name: "TrailerField", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,explicit,tag:3,default:1\""}]); + Certificate.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "RawTBSCertificate", name: "RawTBSCertificate", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "RawSubjectPublicKeyInfo", name: "RawSubjectPublicKeyInfo", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "RawSubject", name: "RawSubject", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "RawIssuer", name: "RawIssuer", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "Signature", name: "Signature", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: SignatureAlgorithm, tag: ""}, {prop: "PublicKeyAlgorithm", name: "PublicKeyAlgorithm", embedded: false, exported: true, typ: PublicKeyAlgorithm, tag: ""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Issuer", name: "Issuer", embedded: false, exported: true, typ: pkix.Name, tag: ""}, {prop: "Subject", name: "Subject", embedded: false, exported: true, typ: pkix.Name, tag: ""}, {prop: "NotBefore", name: "NotBefore", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "NotAfter", name: "NotAfter", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "KeyUsage", name: "KeyUsage", embedded: false, exported: true, typ: KeyUsage, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$18, tag: ""}, {prop: "ExtraExtensions", name: "ExtraExtensions", embedded: false, exported: true, typ: sliceType$18, tag: ""}, {prop: "UnhandledCriticalExtensions", name: "UnhandledCriticalExtensions", embedded: false, exported: true, typ: sliceType$19, tag: ""}, {prop: "ExtKeyUsage", name: "ExtKeyUsage", embedded: false, exported: true, typ: sliceType$13, tag: ""}, {prop: "UnknownExtKeyUsage", name: "UnknownExtKeyUsage", embedded: false, exported: true, typ: sliceType$19, tag: ""}, {prop: "BasicConstraintsValid", name: "BasicConstraintsValid", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsCA", name: "IsCA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxPathLen", name: "MaxPathLen", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxPathLenZero", name: "MaxPathLenZero", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SubjectKeyId", name: "SubjectKeyId", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "AuthorityKeyId", name: "AuthorityKeyId", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "OCSPServer", name: "OCSPServer", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "IssuingCertificateURL", name: "IssuingCertificateURL", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "DNSNames", name: "DNSNames", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "EmailAddresses", name: "EmailAddresses", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "IPAddresses", name: "IPAddresses", embedded: false, exported: true, typ: sliceType$14, tag: ""}, {prop: "URIs", name: "URIs", embedded: false, exported: true, typ: sliceType$15, tag: ""}, {prop: "PermittedDNSDomainsCritical", name: "PermittedDNSDomainsCritical", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PermittedDNSDomains", name: "PermittedDNSDomains", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "ExcludedDNSDomains", name: "ExcludedDNSDomains", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "PermittedIPRanges", name: "PermittedIPRanges", embedded: false, exported: true, typ: sliceType$16, tag: ""}, {prop: "ExcludedIPRanges", name: "ExcludedIPRanges", embedded: false, exported: true, typ: sliceType$16, tag: ""}, {prop: "PermittedEmailAddresses", name: "PermittedEmailAddresses", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "ExcludedEmailAddresses", name: "ExcludedEmailAddresses", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "PermittedURIDomains", name: "PermittedURIDomains", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "ExcludedURIDomains", name: "ExcludedURIDomains", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "CRLDistributionPoints", name: "CRLDistributionPoints", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "PolicyIdentifiers", name: "PolicyIdentifiers", embedded: false, exported: true, typ: sliceType$19, tag: ""}]); + ConstraintViolationError.init("", []); + UnhandledCriticalExtension.init("", []); + basicConstraints.init("", [{prop: "IsCA", name: "IsCA", embedded: false, exported: true, typ: $Bool, tag: "asn1:\"optional\""}, {prop: "MaxPathLen", name: "MaxPathLen", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,default:-1\""}]); + policyInformation.init("", [{prop: "Policy", name: "Policy", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}]); + authorityInfoAccess.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Location", name: "Location", embedded: false, exported: true, typ: asn1.RawValue, tag: ""}]); + distributionPoint.init("", [{prop: "DistributionPoint", name: "DistributionPoint", embedded: false, exported: true, typ: distributionPointName, tag: "asn1:\"optional,tag:0\""}, {prop: "Reason", name: "Reason", embedded: false, exported: true, typ: asn1.BitString, tag: "asn1:\"optional,tag:1\""}, {prop: "CRLIssuer", name: "CRLIssuer", embedded: false, exported: true, typ: asn1.RawValue, tag: "asn1:\"optional,tag:2\""}]); + distributionPointName.init("", [{prop: "FullName", name: "FullName", embedded: false, exported: true, typ: sliceType$24, tag: "asn1:\"optional,tag:0\""}, {prop: "RelativeName", name: "RelativeName", embedded: false, exported: true, typ: pkix.RDNSequence, tag: "asn1:\"optional,tag:1\""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = crypto.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = aes.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cipher.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = des.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = dsa.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ecdsa.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = elliptic.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = md5.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rsa.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha1.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha256.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha512.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = pkix.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = asn1.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hex.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = pem.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ioutil.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = url.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = exec.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = user.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = filepath.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cryptobyte.$init(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = asn1$1.$init(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + once = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + systemRoots = ptrType.nil; + systemRootsErr = $ifaceNil; + $pkg.IncorrectPasswordError = errors.New("x509: decryption password incorrect"); + _r = os.Getenv("GODEBUG"); /* */ $s = 39; case 39: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = strings.Contains(_r, "x509roots=1"); /* */ $s = 40; case 40: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + debugExecDarwinRoots = _r$1; + _r$2 = os.Getenv("GODEBUG"); /* */ $s = 41; case 41: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = strings.Contains(_r$2, "x509ignoreCN=1"); /* */ $s = 42; case 42: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + ignoreCN = _r$3; + errNotParsed = errors.New("x509: missing ASN.1 contents; use ParseCertificate"); + publicKeyAlgoName = $toNativeArray($kindString, ["", "RSA", "DSA", "ECDSA"]); + oidSignatureMD2WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 2]); + oidSignatureMD5WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 4]); + oidSignatureSHA1WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 5]); + oidSignatureSHA256WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 11]); + oidSignatureSHA384WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 12]); + oidSignatureSHA512WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 13]); + oidSignatureRSAPSS = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 10]); + oidSignatureDSAWithSHA1 = new asn1.ObjectIdentifier([1, 2, 840, 10040, 4, 3]); + oidSignatureDSAWithSHA256 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 3, 2]); + oidSignatureECDSAWithSHA1 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 1]); + oidSignatureECDSAWithSHA256 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 2]); + oidSignatureECDSAWithSHA384 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 3]); + oidSignatureECDSAWithSHA512 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 4]); + oidSHA256 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 1]); + oidSHA384 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 2]); + oidSHA512 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 3]); + oidMGF1 = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 8]); + oidISOSignatureSHA1WithRSA = new asn1.ObjectIdentifier([1, 3, 14, 3, 2, 29]); + signatureAlgorithmDetails = new sliceType$1([new structType.ptr(1, "MD2-RSA", oidSignatureMD2WithRSA, 1, 0), new structType.ptr(2, "MD5-RSA", oidSignatureMD5WithRSA, 1, 2), new structType.ptr(3, "SHA1-RSA", oidSignatureSHA1WithRSA, 1, 3), new structType.ptr(3, "SHA1-RSA", oidISOSignatureSHA1WithRSA, 1, 3), new structType.ptr(4, "SHA256-RSA", oidSignatureSHA256WithRSA, 1, 5), new structType.ptr(5, "SHA384-RSA", oidSignatureSHA384WithRSA, 1, 6), new structType.ptr(6, "SHA512-RSA", oidSignatureSHA512WithRSA, 1, 7), new structType.ptr(13, "SHA256-RSAPSS", oidSignatureRSAPSS, 1, 5), new structType.ptr(14, "SHA384-RSAPSS", oidSignatureRSAPSS, 1, 6), new structType.ptr(15, "SHA512-RSAPSS", oidSignatureRSAPSS, 1, 7), new structType.ptr(7, "DSA-SHA1", oidSignatureDSAWithSHA1, 2, 3), new structType.ptr(8, "DSA-SHA256", oidSignatureDSAWithSHA256, 2, 5), new structType.ptr(9, "ECDSA-SHA1", oidSignatureECDSAWithSHA1, 3, 3), new structType.ptr(10, "ECDSA-SHA256", oidSignatureECDSAWithSHA256, 3, 5), new structType.ptr(11, "ECDSA-SHA384", oidSignatureECDSAWithSHA384, 3, 6), new structType.ptr(12, "ECDSA-SHA512", oidSignatureECDSAWithSHA512, 3, 7)]); + oidPublicKeyRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 1]); + oidPublicKeyDSA = new asn1.ObjectIdentifier([1, 2, 840, 10040, 4, 1]); + oidPublicKeyECDSA = new asn1.ObjectIdentifier([1, 2, 840, 10045, 2, 1]); + oidNamedCurveP224 = new asn1.ObjectIdentifier([1, 3, 132, 0, 33]); + oidNamedCurveP256 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 3, 1, 7]); + oidNamedCurveP384 = new asn1.ObjectIdentifier([1, 3, 132, 0, 34]); + oidNamedCurveP521 = new asn1.ObjectIdentifier([1, 3, 132, 0, 35]); + oidExtKeyUsageAny = new asn1.ObjectIdentifier([2, 5, 29, 37, 0]); + oidExtKeyUsageServerAuth = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 1]); + oidExtKeyUsageClientAuth = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 2]); + oidExtKeyUsageCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 3]); + oidExtKeyUsageEmailProtection = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 4]); + oidExtKeyUsageIPSECEndSystem = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 5]); + oidExtKeyUsageIPSECTunnel = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 6]); + oidExtKeyUsageIPSECUser = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 7]); + oidExtKeyUsageTimeStamping = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 8]); + oidExtKeyUsageOCSPSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 9]); + oidExtKeyUsageMicrosoftServerGatedCrypto = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 10, 3, 3]); + oidExtKeyUsageNetscapeServerGatedCrypto = new asn1.ObjectIdentifier([2, 16, 840, 1, 113730, 4, 1]); + oidExtKeyUsageMicrosoftCommercialCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 2, 1, 22]); + oidExtKeyUsageMicrosoftKernelCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 61, 1, 1]); + extKeyUsageOIDs = new sliceType$2([new structType$1.ptr(0, oidExtKeyUsageAny), new structType$1.ptr(1, oidExtKeyUsageServerAuth), new structType$1.ptr(2, oidExtKeyUsageClientAuth), new structType$1.ptr(3, oidExtKeyUsageCodeSigning), new structType$1.ptr(4, oidExtKeyUsageEmailProtection), new structType$1.ptr(5, oidExtKeyUsageIPSECEndSystem), new structType$1.ptr(6, oidExtKeyUsageIPSECTunnel), new structType$1.ptr(7, oidExtKeyUsageIPSECUser), new structType$1.ptr(8, oidExtKeyUsageTimeStamping), new structType$1.ptr(9, oidExtKeyUsageOCSPSigning), new structType$1.ptr(10, oidExtKeyUsageMicrosoftServerGatedCrypto), new structType$1.ptr(11, oidExtKeyUsageNetscapeServerGatedCrypto), new structType$1.ptr(12, oidExtKeyUsageMicrosoftCommercialCodeSigning), new structType$1.ptr(13, oidExtKeyUsageMicrosoftKernelCodeSigning)]); + $pkg.ErrUnsupportedAlgorithm = errors.New("x509: cannot verify signature: algorithm unimplemented"); + entrustBrokenSPKI = new sliceType$3([48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 151, 163, 45, 60, 158, 222, 5, 218, 19, 194, 17, 141, 157, 142, 227, 127, 199, 75, 126, 90, 159, 179, 255, 98, 171, 115, 200, 40, 107, 186, 16, 100, 130, 135, 19, 205, 87, 24, 255, 40, 206, 192, 230, 14, 6, 145, 80, 41, 131, 209, 242, 195, 42, 219, 216, 219, 78, 4, 204, 0, 235, 139, 182, 150, 220, 188, 170, 250, 82, 119, 4, 193, 219, 25, 228, 174, 156, 253, 60, 139, 3, 239, 77, 188, 26, 3, 101, 249, 193, 177, 63, 114, 134, 242, 56, 170, 25, 174, 16, 136, 120, 40, 218, 117, 195, 61, 2, 130, 2, 156, 185, 193, 101, 119, 118, 36, 76, 152, 247, 109, 49, 56, 251, 219, 254, 219, 55, 2, 118, 161, 24, 151, 166, 204, 222, 32, 9, 73, 54, 36, 105, 66, 246, 228, 55, 98, 241, 89, 109, 169, 60, 237, 52, 156, 163, 142, 219, 220, 58, 215, 247, 10, 111, 239, 46, 216, 213, 147, 90, 122, 237, 8, 73, 104, 226, 65, 227, 90, 144, 193, 134, 85, 252, 81, 67, 157, 224, 178, 196, 103, 180, 203, 50, 49, 37, 240, 84, 159, 75, 209, 111, 219, 212, 221, 252, 175, 94, 108, 120, 144, 149, 222, 202, 58, 72, 185, 121, 60, 155, 25, 214, 117, 5, 160, 249, 136, 215, 193, 232, 165, 9, 228, 26, 21, 220, 135, 35, 170, 178, 117, 140, 99, 37, 135, 216, 248, 61, 166, 194, 204, 102, 255, 165, 102, 104, 85, 2, 3, 1, 0, 1]); + oidExtensionAuthorityKeyId = new sliceType$4([2, 5, 29, 35]); + oidExtensionSubjectAltName = new sliceType$4([2, 5, 29, 17]); + oidExtensionNameConstraints = new sliceType$4([2, 5, 29, 30]); + oidExtensionAuthorityInfoAccess = new sliceType$4([1, 3, 6, 1, 5, 5, 7, 1, 1]); + oidAuthorityInfoAccessOcsp = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 48, 1]); + oidAuthorityInfoAccessIssuers = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 48, 2]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/internal/chacha20"] = (function() { + var $pkg = {}, $init, cipher, binary, runtime, Cipher, ptrType, arrayType, arrayType$1, arrayType$2, sliceType, New, xor; + cipher = $packages["crypto/cipher"]; + binary = $packages["encoding/binary"]; + runtime = $packages["runtime"]; + Cipher = $pkg.Cipher = $newType(0, $kindStruct, "chacha20.Cipher", true, "vendor/golang_org/x/crypto/internal/chacha20", true, function(key_, counter_, nonce_, buf_, len_) { + this.$val = this; + if (arguments.length === 0) { + this.key = arrayType.zero(); + this.counter = 0; + this.nonce = arrayType$1.zero(); + this.buf = arrayType$2.zero(); + this.len = 0; + return; + } + this.key = key_; + this.counter = counter_; + this.nonce = nonce_; + this.buf = buf_; + this.len = len_; + }); + ptrType = $ptrType(Cipher); + arrayType = $arrayType($Uint32, 8); + arrayType$1 = $arrayType($Uint32, 3); + arrayType$2 = $arrayType($Uint8, 64); + sliceType = $sliceType($Uint8); + New = function(key, nonce) { + var key, nonce; + return new Cipher.ptr($clone(key, arrayType), 0, $clone(nonce, arrayType$1), arrayType$2.zero(), 0); + }; + $pkg.New = New; + Cipher.ptr.prototype.XORKeyStream = function(dst, src) { + var _i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, buf, dst, fin, i, i$1, i$2, in$1, n, out, qr, rem, s, s0, s1, s10, s11, s12, s13, s14, s15, s2, s3, s4, s5, s6, s7, s8, s9, src, td, ts, x0, x1, x10, x11, x12, x13, x14, x15, x2, x3, x4, x5, x6, x7, x8, x9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$11 = $f._tuple$11; _tuple$12 = $f._tuple$12; _tuple$13 = $f._tuple$13; _tuple$14 = $f._tuple$14; _tuple$15 = $f._tuple$15; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; b = $f.b; buf = $f.buf; dst = $f.dst; fin = $f.fin; i = $f.i; i$1 = $f.i$1; i$2 = $f.i$2; in$1 = $f.in$1; n = $f.n; out = $f.out; qr = $f.qr; rem = $f.rem; s = $f.s; s0 = $f.s0; s1 = $f.s1; s10 = $f.s10; s11 = $f.s11; s12 = $f.s12; s13 = $f.s13; s14 = $f.s14; s15 = $f.s15; s2 = $f.s2; s3 = $f.s3; s4 = $f.s4; s5 = $f.s5; s6 = $f.s6; s7 = $f.s7; s8 = $f.s8; s9 = $f.s9; src = $f.src; td = $f.td; ts = $f.ts; x0 = $f.x0; x1 = $f.x1; x10 = $f.x10; x11 = $f.x11; x12 = $f.x12; x13 = $f.x13; x14 = $f.x14; x15 = $f.x15; x2 = $f.x2; x3 = $f.x3; x4 = $f.x4; x5 = $f.x5; x6 = $f.x6; x7 = $f.x7; x8 = $f.x8; x9 = $f.x9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + if (!((s.len === 0))) { + buf = $subslice(new sliceType(s.buf), (64 - s.len >> 0)); + if (src.$length < buf.$length) { + buf = $subslice(buf, 0, src.$length); + } + _tmp = $subslice(dst, 0, buf.$length); + _tmp$1 = $subslice(src, 0, buf.$length); + td = _tmp; + ts = _tmp$1; + _ref = buf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= td.$length) ? ($throwRuntimeError("index out of range"), undefined) : td.$array[td.$offset + i] = ((((i < 0 || i >= ts.$length) ? ($throwRuntimeError("index out of range"), undefined) : ts.$array[ts.$offset + i]) ^ b) << 24 >>> 24)); + _i++; + } + s.len = s.len - (buf.$length) >> 0; + if (!((s.len === 0))) { + $s = -1; return; + } + arrayType$2.copy(s.buf, arrayType$2.zero()); + src = $subslice(src, buf.$length); + dst = $subslice(dst, buf.$length); + } + if (src.$length === 0) { + $s = -1; return; + } + if (false) { + s.xorKeyStreamAsm(dst, src); + $s = -1; return; + } + rem = (_r = src.$length % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + fin = src.$length - rem >> 0; + if (rem > 0) { + $copySlice($subslice(new sliceType(s.buf), 0), $subslice(src, fin)); + } + qr = (function(a, b$1, c, d) { + var a, b$1, c, d; + a = a + (b$1) >>> 0; + d = (d ^ (a)) >>> 0; + d = (((d << 16 >>> 0)) | ((d >>> 16 >>> 0))) >>> 0; + c = c + (d) >>> 0; + b$1 = (b$1 ^ (c)) >>> 0; + b$1 = (((b$1 << 12 >>> 0)) | ((b$1 >>> 20 >>> 0))) >>> 0; + a = a + (b$1) >>> 0; + d = (d ^ (a)) >>> 0; + d = (((d << 8 >>> 0)) | ((d >>> 24 >>> 0))) >>> 0; + c = c + (d) >>> 0; + b$1 = (b$1 ^ (c)) >>> 0; + b$1 = (((b$1 << 7 >>> 0)) | ((b$1 >>> 25 >>> 0))) >>> 0; + return [a, b$1, c, d]; + }); + _r$1 = qr(857760878, s.key[1], s.key[5], s.nonce[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + s1 = _tuple[0]; + s5 = _tuple[1]; + s9 = _tuple[2]; + s13 = _tuple[3]; + _r$2 = qr(2036477234, s.key[2], s.key[6], s.nonce[1]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + s2 = _tuple$1[0]; + s6 = _tuple$1[1]; + s10 = _tuple$1[2]; + s14 = _tuple$1[3]; + _r$3 = qr(1797285236, s.key[3], s.key[7], s.nonce[2]); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + s3 = _tuple$2[0]; + s7 = _tuple$2[1]; + s11 = _tuple$2[2]; + s15 = _tuple$2[3]; + n = src.$length; + _tmp$2 = $subslice(src, 0, n, n); + _tmp$3 = $subslice(dst, 0, n, n); + src = _tmp$2; + dst = _tmp$3; + i$1 = 0; + /* while (true) { */ case 4: + /* if (!(i$1 < n)) { break; } */ if(!(i$1 < n)) { $s = 5; continue; } + _r$4 = qr(1634760805, s.key[0], s.key[4], s.counter); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + s0 = _tuple$3[0]; + s4 = _tuple$3[1]; + s8 = _tuple$3[2]; + s12 = _tuple$3[3]; + _r$5 = qr(s0, s5, s10, s15); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + x0 = _tuple$4[0]; + x5 = _tuple$4[1]; + x10 = _tuple$4[2]; + x15 = _tuple$4[3]; + _r$6 = qr(s1, s6, s11, s12); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$5 = _r$6; + x1 = _tuple$5[0]; + x6 = _tuple$5[1]; + x11 = _tuple$5[2]; + x12 = _tuple$5[3]; + _r$7 = qr(s2, s7, s8, s13); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$6 = _r$7; + x2 = _tuple$6[0]; + x7 = _tuple$6[1]; + x8 = _tuple$6[2]; + x13 = _tuple$6[3]; + _r$8 = qr(s3, s4, s9, s14); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$7 = _r$8; + x3 = _tuple$7[0]; + x4 = _tuple$7[1]; + x9 = _tuple$7[2]; + x14 = _tuple$7[3]; + i$2 = 0; + /* while (true) { */ case 11: + /* if (!(i$2 < 9)) { break; } */ if(!(i$2 < 9)) { $s = 12; continue; } + _r$9 = qr(x0, x4, x8, x12); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$8 = _r$9; + x0 = _tuple$8[0]; + x4 = _tuple$8[1]; + x8 = _tuple$8[2]; + x12 = _tuple$8[3]; + _r$10 = qr(x1, x5, x9, x13); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$9 = _r$10; + x1 = _tuple$9[0]; + x5 = _tuple$9[1]; + x9 = _tuple$9[2]; + x13 = _tuple$9[3]; + _r$11 = qr(x2, x6, x10, x14); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$10 = _r$11; + x2 = _tuple$10[0]; + x6 = _tuple$10[1]; + x10 = _tuple$10[2]; + x14 = _tuple$10[3]; + _r$12 = qr(x3, x7, x11, x15); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$11 = _r$12; + x3 = _tuple$11[0]; + x7 = _tuple$11[1]; + x11 = _tuple$11[2]; + x15 = _tuple$11[3]; + _r$13 = qr(x0, x5, x10, x15); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$12 = _r$13; + x0 = _tuple$12[0]; + x5 = _tuple$12[1]; + x10 = _tuple$12[2]; + x15 = _tuple$12[3]; + _r$14 = qr(x1, x6, x11, x12); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$13 = _r$14; + x1 = _tuple$13[0]; + x6 = _tuple$13[1]; + x11 = _tuple$13[2]; + x12 = _tuple$13[3]; + _r$15 = qr(x2, x7, x8, x13); /* */ $s = 19; case 19: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$14 = _r$15; + x2 = _tuple$14[0]; + x7 = _tuple$14[1]; + x8 = _tuple$14[2]; + x13 = _tuple$14[3]; + _r$16 = qr(x3, x4, x9, x14); /* */ $s = 20; case 20: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$15 = _r$16; + x3 = _tuple$15[0]; + x4 = _tuple$15[1]; + x9 = _tuple$15[2]; + x14 = _tuple$15[3]; + i$2 = i$2 + (1) >> 0; + /* } */ $s = 11; continue; case 12: + x0 = x0 + (1634760805) >>> 0; + x1 = x1 + (857760878) >>> 0; + x2 = x2 + (2036477234) >>> 0; + x3 = x3 + (1797285236) >>> 0; + x4 = x4 + (s.key[0]) >>> 0; + x5 = x5 + (s.key[1]) >>> 0; + x6 = x6 + (s.key[2]) >>> 0; + x7 = x7 + (s.key[3]) >>> 0; + x8 = x8 + (s.key[4]) >>> 0; + x9 = x9 + (s.key[5]) >>> 0; + x10 = x10 + (s.key[6]) >>> 0; + x11 = x11 + (s.key[7]) >>> 0; + x12 = x12 + (s.counter) >>> 0; + x13 = x13 + (s.nonce[0]) >>> 0; + x14 = x14 + (s.nonce[1]) >>> 0; + x15 = x15 + (s.nonce[2]) >>> 0; + s.counter = s.counter + (1) >>> 0; + if (s.counter === 0) { + $panic(new $String("chacha20: counter overflow")); + } + _tmp$4 = $subslice(src, i$1); + _tmp$5 = $subslice(dst, i$1); + in$1 = _tmp$4; + out = _tmp$5; + if (i$1 === fin) { + _tmp$6 = $subslice(new sliceType(s.buf), 0); + _tmp$7 = $subslice(new sliceType(s.buf), 0); + in$1 = _tmp$6; + out = _tmp$7; + } + _tmp$8 = $subslice(in$1, 0, 64); + _tmp$9 = $subslice(out, 0, 64); + in$1 = _tmp$8; + out = _tmp$9; + xor($subslice(out, 0), $subslice(in$1, 0), x0); + xor($subslice(out, 4), $subslice(in$1, 4), x1); + xor($subslice(out, 8), $subslice(in$1, 8), x2); + xor($subslice(out, 12), $subslice(in$1, 12), x3); + xor($subslice(out, 16), $subslice(in$1, 16), x4); + xor($subslice(out, 20), $subslice(in$1, 20), x5); + xor($subslice(out, 24), $subslice(in$1, 24), x6); + xor($subslice(out, 28), $subslice(in$1, 28), x7); + xor($subslice(out, 32), $subslice(in$1, 32), x8); + xor($subslice(out, 36), $subslice(in$1, 36), x9); + xor($subslice(out, 40), $subslice(in$1, 40), x10); + xor($subslice(out, 44), $subslice(in$1, 44), x11); + xor($subslice(out, 48), $subslice(in$1, 48), x12); + xor($subslice(out, 52), $subslice(in$1, 52), x13); + xor($subslice(out, 56), $subslice(in$1, 56), x14); + xor($subslice(out, 60), $subslice(in$1, 60), x15); + i$1 = i$1 + (64) >> 0; + /* } */ $s = 4; continue; case 5: + if (!((rem === 0))) { + s.len = 64 - rem >> 0; + $copySlice($subslice(dst, fin), $subslice(new sliceType(s.buf), 0)); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Cipher.ptr.prototype.XORKeyStream }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$11 = _tuple$11; $f._tuple$12 = _tuple$12; $f._tuple$13 = _tuple$13; $f._tuple$14 = _tuple$14; $f._tuple$15 = _tuple$15; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.b = b; $f.buf = buf; $f.dst = dst; $f.fin = fin; $f.i = i; $f.i$1 = i$1; $f.i$2 = i$2; $f.in$1 = in$1; $f.n = n; $f.out = out; $f.qr = qr; $f.rem = rem; $f.s = s; $f.s0 = s0; $f.s1 = s1; $f.s10 = s10; $f.s11 = s11; $f.s12 = s12; $f.s13 = s13; $f.s14 = s14; $f.s15 = s15; $f.s2 = s2; $f.s3 = s3; $f.s4 = s4; $f.s5 = s5; $f.s6 = s6; $f.s7 = s7; $f.s8 = s8; $f.s9 = s9; $f.src = src; $f.td = td; $f.ts = ts; $f.x0 = x0; $f.x1 = x1; $f.x10 = x10; $f.x11 = x11; $f.x12 = x12; $f.x13 = x13; $f.x14 = x14; $f.x15 = x15; $f.x2 = x2; $f.x3 = x3; $f.x4 = x4; $f.x5 = x5; $f.x6 = x6; $f.x7 = x7; $f.x8 = x8; $f.x9 = x9; $f.$s = $s; $f.$r = $r; return $f; + }; + Cipher.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; + Cipher.ptr.prototype.Advance = function() { + var _r, s; + s = this; + s.len = s.len - ((_r = s.len % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) >> 0; + if (s.len === 0) { + arrayType$2.copy(s.buf, arrayType$2.zero()); + } + }; + Cipher.prototype.Advance = function() { return this.$val.Advance(); }; + Cipher.ptr.prototype.xorKeyStreamAsm = function(dst, src) { + var dst, src; + $panic(new $String("not implemented")); + }; + Cipher.prototype.xorKeyStreamAsm = function(dst, src) { return this.$val.xorKeyStreamAsm(dst, src); }; + xor = function(dst, src, u) { + var _tmp, _tmp$1, dst, src, u, v; + $unused((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3])); + $unused((3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3])); + if (false) { + v = (((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) >>> 0)); + v = (v | (((((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) >>> 0)) << 8 >>> 0))) >>> 0; + v = (v | (((((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) >>> 0)) << 16 >>> 0))) >>> 0; + v = (v | (((((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) >>> 0)) << 24 >>> 0))) >>> 0; + v = (v ^ (u)) >>> 0; + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = ((v << 24 >>> 24))); + (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = (((v >>> 8 >>> 0) << 24 >>> 24))); + (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = (((v >>> 16 >>> 0) << 24 >>> 24))); + (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = (((v >>> 24 >>> 0) << 24 >>> 24))); + } else { + (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = (((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) ^ ((u << 24 >>> 24))) << 24 >>> 24)); + (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = (((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) ^ (((u >>> 8 >>> 0) << 24 >>> 24))) << 24 >>> 24)); + (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = (((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) ^ (((u >>> 16 >>> 0) << 24 >>> 24))) << 24 >>> 24)); + (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = (((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) ^ (((u >>> 24 >>> 0) << 24 >>> 24))) << 24 >>> 24)); + } + }; + ptrType.methods = [{prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "Advance", name: "Advance", pkg: "", typ: $funcType([], [], false)}, {prop: "xorKeyStreamAsm", name: "xorKeyStreamAsm", pkg: "vendor/golang_org/x/crypto/internal/chacha20", typ: $funcType([sliceType, sliceType], [], false)}]; + Cipher.init("vendor/golang_org/x/crypto/internal/chacha20", [{prop: "key", name: "key", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "counter", name: "counter", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "nonce", name: "nonce", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/poly1305"] = (function() { + var $pkg = {}, $init, subtle, binary, arrayType, sliceType, Verify, Sum, sumGeneric; + subtle = $packages["crypto/subtle"]; + binary = $packages["encoding/binary"]; + arrayType = $arrayType($Uint8, 16); + sliceType = $sliceType($Uint8); + Verify = function(mac, m, key) { + var key, m, mac, tmp; + tmp = arrayType.zero(); + Sum(tmp, m, key); + return subtle.ConstantTimeCompare(new sliceType(tmp), new sliceType(mac)) === 1; + }; + $pkg.Verify = Verify; + Sum = function(out, msg, key) { + var key, msg, out; + sumGeneric(out, msg, key); + }; + $pkg.Sum = Sum; + sumGeneric = function(out, msg, key) { + var R1, R2, R3, R4, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, block, d0, d0$1, d1, d1$1, d2, d2$1, d3, d3$1, d4, d4$1, h0, h1, h2, h3, h4, h_mask, key, msg, off, out, r0, r1, r2, r3, r4, t, t0, t1, t2, t3, t4, t_mask, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + _tmp$3 = 0; + _tmp$4 = 0; + h0 = _tmp; + h1 = _tmp$1; + h2 = _tmp$2; + h3 = _tmp$3; + h4 = _tmp$4; + _tmp$5 = new $Uint64(0, 0); + _tmp$6 = new $Uint64(0, 0); + _tmp$7 = new $Uint64(0, 0); + _tmp$8 = new $Uint64(0, 0); + _tmp$9 = new $Uint64(0, 0); + r0 = _tmp$5; + r1 = _tmp$6; + r2 = _tmp$7; + r3 = _tmp$8; + r4 = _tmp$9; + r0 = (new $Uint64(0, (($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 0)) & 67108863) >>> 0))); + r1 = (new $Uint64(0, (((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 3)) >>> 2 >>> 0)) & 67108611) >>> 0))); + r2 = (new $Uint64(0, (((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 6)) >>> 4 >>> 0)) & 67092735) >>> 0))); + r3 = (new $Uint64(0, (((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 9)) >>> 6 >>> 0)) & 66076671) >>> 0))); + r4 = (new $Uint64(0, (((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 12)) >>> 8 >>> 0)) & 1048575) >>> 0))); + _tmp$10 = $mul64(r1, new $Uint64(0, 5)); + _tmp$11 = $mul64(r2, new $Uint64(0, 5)); + _tmp$12 = $mul64(r3, new $Uint64(0, 5)); + _tmp$13 = $mul64(r4, new $Uint64(0, 5)); + R1 = _tmp$10; + R2 = _tmp$11; + R3 = _tmp$12; + R4 = _tmp$13; + while (true) { + if (!(msg.$length >= 16)) { break; } + h0 = h0 + ((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(msg, 0)) & 67108863) >>> 0)) >>> 0; + h1 = h1 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(msg, 3)) >>> 2 >>> 0)) & 67108863) >>> 0)) >>> 0; + h2 = h2 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(msg, 6)) >>> 4 >>> 0)) & 67108863) >>> 0)) >>> 0; + h3 = h3 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(msg, 9)) >>> 6 >>> 0)) & 67108863) >>> 0)) >>> 0; + h4 = h4 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(msg, 12)) >>> 8 >>> 0)) | 16777216) >>> 0)) >>> 0; + d0 = (x = (x$1 = (x$2 = (x$3 = $mul64((new $Uint64(0, h0)), r0), x$4 = $mul64((new $Uint64(0, h1)), R4), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), x$5 = $mul64((new $Uint64(0, h2)), R3), new $Uint64(x$2.$high + x$5.$high, x$2.$low + x$5.$low)), x$6 = $mul64((new $Uint64(0, h3)), R2), new $Uint64(x$1.$high + x$6.$high, x$1.$low + x$6.$low)), x$7 = $mul64((new $Uint64(0, h4)), R1), new $Uint64(x.$high + x$7.$high, x.$low + x$7.$low)); + d1 = (x$8 = (x$9 = (x$10 = (x$11 = (x$12 = $shiftRightUint64(d0, 26), x$13 = $mul64((new $Uint64(0, h0)), r1), new $Uint64(x$12.$high + x$13.$high, x$12.$low + x$13.$low)), x$14 = $mul64((new $Uint64(0, h1)), r0), new $Uint64(x$11.$high + x$14.$high, x$11.$low + x$14.$low)), x$15 = $mul64((new $Uint64(0, h2)), R4), new $Uint64(x$10.$high + x$15.$high, x$10.$low + x$15.$low)), x$16 = $mul64((new $Uint64(0, h3)), R3), new $Uint64(x$9.$high + x$16.$high, x$9.$low + x$16.$low)), x$17 = $mul64((new $Uint64(0, h4)), R2), new $Uint64(x$8.$high + x$17.$high, x$8.$low + x$17.$low)); + d2 = (x$18 = (x$19 = (x$20 = (x$21 = (x$22 = $shiftRightUint64(d1, 26), x$23 = $mul64((new $Uint64(0, h0)), r2), new $Uint64(x$22.$high + x$23.$high, x$22.$low + x$23.$low)), x$24 = $mul64((new $Uint64(0, h1)), r1), new $Uint64(x$21.$high + x$24.$high, x$21.$low + x$24.$low)), x$25 = $mul64((new $Uint64(0, h2)), r0), new $Uint64(x$20.$high + x$25.$high, x$20.$low + x$25.$low)), x$26 = $mul64((new $Uint64(0, h3)), R4), new $Uint64(x$19.$high + x$26.$high, x$19.$low + x$26.$low)), x$27 = $mul64((new $Uint64(0, h4)), R3), new $Uint64(x$18.$high + x$27.$high, x$18.$low + x$27.$low)); + d3 = (x$28 = (x$29 = (x$30 = (x$31 = (x$32 = $shiftRightUint64(d2, 26), x$33 = $mul64((new $Uint64(0, h0)), r3), new $Uint64(x$32.$high + x$33.$high, x$32.$low + x$33.$low)), x$34 = $mul64((new $Uint64(0, h1)), r2), new $Uint64(x$31.$high + x$34.$high, x$31.$low + x$34.$low)), x$35 = $mul64((new $Uint64(0, h2)), r1), new $Uint64(x$30.$high + x$35.$high, x$30.$low + x$35.$low)), x$36 = $mul64((new $Uint64(0, h3)), r0), new $Uint64(x$29.$high + x$36.$high, x$29.$low + x$36.$low)), x$37 = $mul64((new $Uint64(0, h4)), R4), new $Uint64(x$28.$high + x$37.$high, x$28.$low + x$37.$low)); + d4 = (x$38 = (x$39 = (x$40 = (x$41 = (x$42 = $shiftRightUint64(d3, 26), x$43 = $mul64((new $Uint64(0, h0)), r4), new $Uint64(x$42.$high + x$43.$high, x$42.$low + x$43.$low)), x$44 = $mul64((new $Uint64(0, h1)), r3), new $Uint64(x$41.$high + x$44.$high, x$41.$low + x$44.$low)), x$45 = $mul64((new $Uint64(0, h2)), r2), new $Uint64(x$40.$high + x$45.$high, x$40.$low + x$45.$low)), x$46 = $mul64((new $Uint64(0, h3)), r1), new $Uint64(x$39.$high + x$46.$high, x$39.$low + x$46.$low)), x$47 = $mul64((new $Uint64(0, h4)), r0), new $Uint64(x$38.$high + x$47.$high, x$38.$low + x$47.$low)); + h0 = (((d0.$low >>> 0)) & 67108863) >>> 0; + h1 = (((d1.$low >>> 0)) & 67108863) >>> 0; + h2 = (((d2.$low >>> 0)) & 67108863) >>> 0; + h3 = (((d3.$low >>> 0)) & 67108863) >>> 0; + h4 = (((d4.$low >>> 0)) & 67108863) >>> 0; + h0 = h0 + (($imul((($shiftRightUint64(d4, 26).$low >>> 0)), 5) >>> 0)) >>> 0; + h1 = h1 + ((h0 >>> 26 >>> 0)) >>> 0; + h0 = (h0 & 67108863) >>> 0; + msg = $subslice(msg, 16); + } + if (msg.$length > 0) { + block = arrayType.zero(); + off = $copySlice(new sliceType(block), msg); + ((off < 0 || off >= block.length) ? ($throwRuntimeError("index out of range"), undefined) : block[off] = 1); + h0 = h0 + ((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(block), 0)) & 67108863) >>> 0)) >>> 0; + h1 = h1 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(block), 3)) >>> 2 >>> 0)) & 67108863) >>> 0)) >>> 0; + h2 = h2 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(block), 6)) >>> 4 >>> 0)) & 67108863) >>> 0)) >>> 0; + h3 = h3 + ((((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(block), 9)) >>> 6 >>> 0)) & 67108863) >>> 0)) >>> 0; + h4 = h4 + ((($clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(block), 12)) >>> 8 >>> 0))) >>> 0; + d0$1 = (x$48 = (x$49 = (x$50 = (x$51 = $mul64((new $Uint64(0, h0)), r0), x$52 = $mul64((new $Uint64(0, h1)), R4), new $Uint64(x$51.$high + x$52.$high, x$51.$low + x$52.$low)), x$53 = $mul64((new $Uint64(0, h2)), R3), new $Uint64(x$50.$high + x$53.$high, x$50.$low + x$53.$low)), x$54 = $mul64((new $Uint64(0, h3)), R2), new $Uint64(x$49.$high + x$54.$high, x$49.$low + x$54.$low)), x$55 = $mul64((new $Uint64(0, h4)), R1), new $Uint64(x$48.$high + x$55.$high, x$48.$low + x$55.$low)); + d1$1 = (x$56 = (x$57 = (x$58 = (x$59 = (x$60 = $shiftRightUint64(d0$1, 26), x$61 = $mul64((new $Uint64(0, h0)), r1), new $Uint64(x$60.$high + x$61.$high, x$60.$low + x$61.$low)), x$62 = $mul64((new $Uint64(0, h1)), r0), new $Uint64(x$59.$high + x$62.$high, x$59.$low + x$62.$low)), x$63 = $mul64((new $Uint64(0, h2)), R4), new $Uint64(x$58.$high + x$63.$high, x$58.$low + x$63.$low)), x$64 = $mul64((new $Uint64(0, h3)), R3), new $Uint64(x$57.$high + x$64.$high, x$57.$low + x$64.$low)), x$65 = $mul64((new $Uint64(0, h4)), R2), new $Uint64(x$56.$high + x$65.$high, x$56.$low + x$65.$low)); + d2$1 = (x$66 = (x$67 = (x$68 = (x$69 = (x$70 = $shiftRightUint64(d1$1, 26), x$71 = $mul64((new $Uint64(0, h0)), r2), new $Uint64(x$70.$high + x$71.$high, x$70.$low + x$71.$low)), x$72 = $mul64((new $Uint64(0, h1)), r1), new $Uint64(x$69.$high + x$72.$high, x$69.$low + x$72.$low)), x$73 = $mul64((new $Uint64(0, h2)), r0), new $Uint64(x$68.$high + x$73.$high, x$68.$low + x$73.$low)), x$74 = $mul64((new $Uint64(0, h3)), R4), new $Uint64(x$67.$high + x$74.$high, x$67.$low + x$74.$low)), x$75 = $mul64((new $Uint64(0, h4)), R3), new $Uint64(x$66.$high + x$75.$high, x$66.$low + x$75.$low)); + d3$1 = (x$76 = (x$77 = (x$78 = (x$79 = (x$80 = $shiftRightUint64(d2$1, 26), x$81 = $mul64((new $Uint64(0, h0)), r3), new $Uint64(x$80.$high + x$81.$high, x$80.$low + x$81.$low)), x$82 = $mul64((new $Uint64(0, h1)), r2), new $Uint64(x$79.$high + x$82.$high, x$79.$low + x$82.$low)), x$83 = $mul64((new $Uint64(0, h2)), r1), new $Uint64(x$78.$high + x$83.$high, x$78.$low + x$83.$low)), x$84 = $mul64((new $Uint64(0, h3)), r0), new $Uint64(x$77.$high + x$84.$high, x$77.$low + x$84.$low)), x$85 = $mul64((new $Uint64(0, h4)), R4), new $Uint64(x$76.$high + x$85.$high, x$76.$low + x$85.$low)); + d4$1 = (x$86 = (x$87 = (x$88 = (x$89 = (x$90 = $shiftRightUint64(d3$1, 26), x$91 = $mul64((new $Uint64(0, h0)), r4), new $Uint64(x$90.$high + x$91.$high, x$90.$low + x$91.$low)), x$92 = $mul64((new $Uint64(0, h1)), r3), new $Uint64(x$89.$high + x$92.$high, x$89.$low + x$92.$low)), x$93 = $mul64((new $Uint64(0, h2)), r2), new $Uint64(x$88.$high + x$93.$high, x$88.$low + x$93.$low)), x$94 = $mul64((new $Uint64(0, h3)), r1), new $Uint64(x$87.$high + x$94.$high, x$87.$low + x$94.$low)), x$95 = $mul64((new $Uint64(0, h4)), r0), new $Uint64(x$86.$high + x$95.$high, x$86.$low + x$95.$low)); + h0 = (((d0$1.$low >>> 0)) & 67108863) >>> 0; + h1 = (((d1$1.$low >>> 0)) & 67108863) >>> 0; + h2 = (((d2$1.$low >>> 0)) & 67108863) >>> 0; + h3 = (((d3$1.$low >>> 0)) & 67108863) >>> 0; + h4 = (((d4$1.$low >>> 0)) & 67108863) >>> 0; + h0 = h0 + (($imul((($shiftRightUint64(d4$1, 26).$low >>> 0)), 5) >>> 0)) >>> 0; + h1 = h1 + ((h0 >>> 26 >>> 0)) >>> 0; + h0 = (h0 & 67108863) >>> 0; + } + h2 = h2 + ((h1 >>> 26 >>> 0)) >>> 0; + h1 = (h1 & (67108863)) >>> 0; + h3 = h3 + ((h2 >>> 26 >>> 0)) >>> 0; + h2 = (h2 & (67108863)) >>> 0; + h4 = h4 + ((h3 >>> 26 >>> 0)) >>> 0; + h3 = (h3 & (67108863)) >>> 0; + h0 = h0 + (($imul(5, ((h4 >>> 26 >>> 0))) >>> 0)) >>> 0; + h4 = (h4 & (67108863)) >>> 0; + h1 = h1 + ((h0 >>> 26 >>> 0)) >>> 0; + h0 = (h0 & (67108863)) >>> 0; + t0 = h0 + 5 >>> 0; + t1 = h1 + ((t0 >>> 26 >>> 0)) >>> 0; + t2 = h2 + ((t1 >>> 26 >>> 0)) >>> 0; + t3 = h3 + ((t2 >>> 26 >>> 0)) >>> 0; + t4 = (h4 + ((t3 >>> 26 >>> 0)) >>> 0) - 67108864 >>> 0; + t0 = (t0 & (67108863)) >>> 0; + t1 = (t1 & (67108863)) >>> 0; + t2 = (t2 & (67108863)) >>> 0; + t3 = (t3 & (67108863)) >>> 0; + t_mask = ((t4 >>> 31 >>> 0)) - 1 >>> 0; + h_mask = ~t_mask >>> 0; + h0 = ((((h0 & h_mask) >>> 0)) | (((t0 & t_mask) >>> 0))) >>> 0; + h1 = ((((h1 & h_mask) >>> 0)) | (((t1 & t_mask) >>> 0))) >>> 0; + h2 = ((((h2 & h_mask) >>> 0)) | (((t2 & t_mask) >>> 0))) >>> 0; + h3 = ((((h3 & h_mask) >>> 0)) | (((t3 & t_mask) >>> 0))) >>> 0; + h4 = ((((h4 & h_mask) >>> 0)) | (((t4 & t_mask) >>> 0))) >>> 0; + h0 = (h0 | ((h1 << 26 >>> 0))) >>> 0; + h1 = ((((h1 >>> 6 >>> 0)) | ((h2 << 20 >>> 0))) >>> 0); + h2 = ((((h2 >>> 12 >>> 0)) | ((h3 << 14 >>> 0))) >>> 0); + h3 = ((((h3 >>> 18 >>> 0)) | ((h4 << 8 >>> 0))) >>> 0); + t = (x$96 = (new $Uint64(0, h0)), x$97 = (new $Uint64(0, $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 16)))), new $Uint64(x$96.$high + x$97.$high, x$96.$low + x$97.$low)); + h0 = ((t.$low >>> 0)); + t = (x$98 = (x$99 = (new $Uint64(0, h1)), x$100 = (new $Uint64(0, $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 20)))), new $Uint64(x$99.$high + x$100.$high, x$99.$low + x$100.$low)), x$101 = $shiftRightUint64(t, 32), new $Uint64(x$98.$high + x$101.$high, x$98.$low + x$101.$low)); + h1 = ((t.$low >>> 0)); + t = (x$102 = (x$103 = (new $Uint64(0, h2)), x$104 = (new $Uint64(0, $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 24)))), new $Uint64(x$103.$high + x$104.$high, x$103.$low + x$104.$low)), x$105 = $shiftRightUint64(t, 32), new $Uint64(x$102.$high + x$105.$high, x$102.$low + x$105.$low)); + h2 = ((t.$low >>> 0)); + t = (x$106 = (x$107 = (new $Uint64(0, h3)), x$108 = (new $Uint64(0, $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(new sliceType(key), 28)))), new $Uint64(x$107.$high + x$108.$high, x$107.$low + x$108.$low)), x$109 = $shiftRightUint64(t, 32), new $Uint64(x$106.$high + x$109.$high, x$106.$low + x$109.$low)); + h3 = ((t.$low >>> 0)); + $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(out), 0), h0); + $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(out), 4), h1); + $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(out), 8), h2); + $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(out), 12), h3); + }; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/chacha20poly1305"] = (function() { + var $pkg = {}, $init, cipher, binary, errors, chacha20, poly1305, chacha20poly1305, arrayType, sliceType, arrayType$1, arrayType$2, ptrType, errOpen, New, sliceForAppend, roundTo16; + cipher = $packages["crypto/cipher"]; + binary = $packages["encoding/binary"]; + errors = $packages["errors"]; + chacha20 = $packages["vendor/golang_org/x/crypto/internal/chacha20"]; + poly1305 = $packages["vendor/golang_org/x/crypto/poly1305"]; + chacha20poly1305 = $pkg.chacha20poly1305 = $newType(0, $kindStruct, "chacha20poly1305.chacha20poly1305", true, "vendor/golang_org/x/crypto/chacha20poly1305", false, function(key_) { + this.$val = this; + if (arguments.length === 0) { + this.key = arrayType.zero(); + return; + } + this.key = key_; + }); + arrayType = $arrayType($Uint32, 8); + sliceType = $sliceType($Uint8); + arrayType$1 = $arrayType($Uint8, 32); + arrayType$2 = $arrayType($Uint8, 16); + ptrType = $ptrType(chacha20poly1305); + New = function(key) { + var key, ret; + if (!((key.$length === 32))) { + return [$ifaceNil, errors.New("chacha20poly1305: bad key length")]; + } + ret = new chacha20poly1305.ptr(arrayType.zero()); + ret.key[0] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 0, 4)); + ret.key[1] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 4, 8)); + ret.key[2] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 8, 12)); + ret.key[3] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 12, 16)); + ret.key[4] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 16, 20)); + ret.key[5] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 20, 24)); + ret.key[6] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 24, 28)); + ret.key[7] = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 28, 32)); + return [ret, $ifaceNil]; + }; + $pkg.New = New; + chacha20poly1305.ptr.prototype.NonceSize = function() { + var c; + c = this; + return 12; + }; + chacha20poly1305.prototype.NonceSize = function() { return this.$val.NonceSize(); }; + chacha20poly1305.ptr.prototype.Overhead = function() { + var c; + c = this; + return 16; + }; + chacha20poly1305.prototype.Overhead = function() { return this.$val.Overhead(); }; + chacha20poly1305.ptr.prototype.Seal = function(dst, nonce, plaintext, additionalData) { + var _r, additionalData, c, dst, nonce, plaintext, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; c = $f.c; dst = $f.dst; nonce = $f.nonce; plaintext = $f.plaintext; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!((nonce.$length === 12))) { + $panic(new $String("chacha20poly1305: bad nonce length passed to Seal")); + } + if ((x = (new $Uint64(0, plaintext.$length)), (x.$high > 63 || (x.$high === 63 && x.$low > 4294967232)))) { + $panic(new $String("chacha20poly1305: plaintext too large")); + } + _r = c.seal(dst, nonce, plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.Seal }; } $f._r = _r; $f.additionalData = additionalData; $f.c = c; $f.dst = dst; $f.nonce = nonce; $f.plaintext = plaintext; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.Seal = function(dst, nonce, plaintext, additionalData) { return this.$val.Seal(dst, nonce, plaintext, additionalData); }; + chacha20poly1305.ptr.prototype.Open = function(dst, nonce, ciphertext, additionalData) { + var _r, additionalData, c, ciphertext, dst, nonce, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; c = $f.c; ciphertext = $f.ciphertext; dst = $f.dst; nonce = $f.nonce; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!((nonce.$length === 12))) { + $panic(new $String("chacha20poly1305: bad nonce length passed to Open")); + } + if (ciphertext.$length < 16) { + $s = -1; return [sliceType.nil, errOpen]; + } + if ((x = (new $Uint64(0, ciphertext.$length)), (x.$high > 63 || (x.$high === 63 && x.$low > 4294967248)))) { + $panic(new $String("chacha20poly1305: ciphertext too large")); + } + _r = c.open(dst, nonce, ciphertext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.Open }; } $f._r = _r; $f.additionalData = additionalData; $f.c = c; $f.ciphertext = ciphertext; $f.dst = dst; $f.nonce = nonce; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.Open = function(dst, nonce, ciphertext, additionalData) { return this.$val.Open(dst, nonce, ciphertext, additionalData); }; + sliceForAppend = function(in$1, n) { + var head, in$1, n, tail, total; + head = sliceType.nil; + tail = sliceType.nil; + total = in$1.$length + n >> 0; + if (in$1.$capacity >= total) { + head = $subslice(in$1, 0, total); + } else { + head = $makeSlice(sliceType, total); + $copySlice(head, in$1); + } + tail = $subslice(head, in$1.$length); + return [head, tail]; + }; + roundTo16 = function(n) { + var _q, n; + return $imul(16, ((_q = ((n + 15 >> 0)) / 16, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))); + }; + chacha20poly1305.ptr.prototype.sealGeneric = function(dst, nonce, plaintext, additionalData) { + var _tuple, additionalData, c, dst, nonce, out, plaintext, polyInput, polyKey, ret, s, tag, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; additionalData = $f.additionalData; c = $f.c; dst = $f.dst; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; polyInput = $f.polyInput; polyKey = $f.polyKey; ret = $f.ret; s = $f.s; tag = $f.tag; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + polyKey = [polyKey]; + tag = [tag]; + c = this; + _tuple = sliceForAppend(dst, plaintext.$length + 16 >> 0); + ret = _tuple[0]; + out = _tuple[1]; + polyKey[0] = arrayType$1.zero(); + s = chacha20.New($clone(c.key, arrayType), $toNativeArray($kindUint32, [$clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 0, 4)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 4, 8)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 8, 12))])); + $r = s.XORKeyStream(new sliceType(polyKey[0]), new sliceType(polyKey[0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + s.Advance(); + $r = s.XORKeyStream(out, plaintext); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + polyInput = $makeSlice(sliceType, (((roundTo16(additionalData.$length) + roundTo16(plaintext.$length) >> 0) + 8 >> 0) + 8 >> 0)); + $copySlice(polyInput, additionalData); + $copySlice($subslice(polyInput, roundTo16(additionalData.$length)), $subslice(out, 0, plaintext.$length)); + $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(polyInput, (polyInput.$length - 16 >> 0)), (new $Uint64(0, additionalData.$length))); + $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(polyInput, (polyInput.$length - 8 >> 0)), (new $Uint64(0, plaintext.$length))); + tag[0] = arrayType$2.zero(); + poly1305.Sum(tag[0], polyInput, polyKey[0]); + $copySlice($subslice(out, plaintext.$length), new sliceType(tag[0])); + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.sealGeneric }; } $f._tuple = _tuple; $f.additionalData = additionalData; $f.c = c; $f.dst = dst; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.polyInput = polyInput; $f.polyKey = polyKey; $f.ret = ret; $f.s = s; $f.tag = tag; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.sealGeneric = function(dst, nonce, plaintext, additionalData) { return this.$val.sealGeneric(dst, nonce, plaintext, additionalData); }; + chacha20poly1305.ptr.prototype.openGeneric = function(dst, nonce, ciphertext, additionalData) { + var _i, _ref, _tuple, additionalData, c, ciphertext, dst, i, nonce, out, polyInput, polyKey, ret, s, tag, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; _tuple = $f._tuple; additionalData = $f.additionalData; c = $f.c; ciphertext = $f.ciphertext; dst = $f.dst; i = $f.i; nonce = $f.nonce; out = $f.out; polyInput = $f.polyInput; polyKey = $f.polyKey; ret = $f.ret; s = $f.s; tag = $f.tag; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + polyKey = [polyKey]; + tag = [tag]; + c = this; + tag[0] = arrayType$2.zero(); + $copySlice(new sliceType(tag[0]), $subslice(ciphertext, (ciphertext.$length - 16 >> 0))); + ciphertext = $subslice(ciphertext, 0, (ciphertext.$length - 16 >> 0)); + polyKey[0] = arrayType$1.zero(); + s = chacha20.New($clone(c.key, arrayType), $toNativeArray($kindUint32, [$clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 0, 4)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 4, 8)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 8, 12))])); + $r = s.XORKeyStream(new sliceType(polyKey[0]), new sliceType(polyKey[0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + s.Advance(); + polyInput = $makeSlice(sliceType, (((roundTo16(additionalData.$length) + roundTo16(ciphertext.$length) >> 0) + 8 >> 0) + 8 >> 0)); + $copySlice(polyInput, additionalData); + $copySlice($subslice(polyInput, roundTo16(additionalData.$length)), ciphertext); + $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(polyInput, (polyInput.$length - 16 >> 0)), (new $Uint64(0, additionalData.$length))); + $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(polyInput, (polyInput.$length - 8 >> 0)), (new $Uint64(0, ciphertext.$length))); + _tuple = sliceForAppend(dst, ciphertext.$length); + ret = _tuple[0]; + out = _tuple[1]; + if (!poly1305.Verify(tag[0], polyInput, polyKey[0])) { + _ref = out; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = 0); + _i++; + } + $s = -1; return [sliceType.nil, errOpen]; + } + $r = s.XORKeyStream(out, ciphertext); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ret, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.openGeneric }; } $f._i = _i; $f._ref = _ref; $f._tuple = _tuple; $f.additionalData = additionalData; $f.c = c; $f.ciphertext = ciphertext; $f.dst = dst; $f.i = i; $f.nonce = nonce; $f.out = out; $f.polyInput = polyInput; $f.polyKey = polyKey; $f.ret = ret; $f.s = s; $f.tag = tag; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.openGeneric = function(dst, nonce, ciphertext, additionalData) { return this.$val.openGeneric(dst, nonce, ciphertext, additionalData); }; + chacha20poly1305.ptr.prototype.seal = function(dst, nonce, plaintext, additionalData) { + var _r, additionalData, c, dst, nonce, plaintext, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; c = $f.c; dst = $f.dst; nonce = $f.nonce; plaintext = $f.plaintext; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.sealGeneric(dst, nonce, plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.seal }; } $f._r = _r; $f.additionalData = additionalData; $f.c = c; $f.dst = dst; $f.nonce = nonce; $f.plaintext = plaintext; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.seal = function(dst, nonce, plaintext, additionalData) { return this.$val.seal(dst, nonce, plaintext, additionalData); }; + chacha20poly1305.ptr.prototype.open = function(dst, nonce, ciphertext, additionalData) { + var _r, additionalData, c, ciphertext, dst, nonce, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; c = $f.c; ciphertext = $f.ciphertext; dst = $f.dst; nonce = $f.nonce; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.openGeneric(dst, nonce, ciphertext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: chacha20poly1305.ptr.prototype.open }; } $f._r = _r; $f.additionalData = additionalData; $f.c = c; $f.ciphertext = ciphertext; $f.dst = dst; $f.nonce = nonce; $f.$s = $s; $f.$r = $r; return $f; + }; + chacha20poly1305.prototype.open = function(dst, nonce, ciphertext, additionalData) { return this.$val.open(dst, nonce, ciphertext, additionalData); }; + ptrType.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}, {prop: "sealGeneric", name: "sealGeneric", pkg: "vendor/golang_org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "openGeneric", name: "openGeneric", pkg: "vendor/golang_org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}, {prop: "seal", name: "seal", pkg: "vendor/golang_org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "open", name: "open", pkg: "vendor/golang_org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}]; + chacha20poly1305.init("vendor/golang_org/x/crypto/chacha20poly1305", [{prop: "key", name: "key", embedded: false, exported: false, typ: arrayType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = chacha20.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = poly1305.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + errOpen = errors.New("chacha20poly1305: message authentication failed"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/crypto/curve25519"] = (function() { + var $pkg = {}, $init, binary, fieldElement, sliceType, arrayType, arrayType$1, arrayType$2, basePoint, basePoint$24ptr, feZero, feOne, feAdd, feSub, feCopy, feCSwap, load3, load4, feFromBytes, feToBytes, feMul, feSquare, feMul121666, feInvert, scalarMult, ScalarMult, ScalarBaseMult; + binary = $packages["encoding/binary"]; + fieldElement = $pkg.fieldElement = $newType(40, $kindArray, "curve25519.fieldElement", true, "vendor/golang_org/x/crypto/curve25519", false, null); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Int64, 10); + arrayType$1 = $arrayType($Int32, 10); + arrayType$2 = $arrayType($Uint8, 32); + feZero = function(fe) { + var _i, _ref, fe, i; + _ref = fe; + _i = 0; + while (true) { + if (!(_i < 10)) { break; } + i = _i; + fe.nilCheck, ((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i] = 0); + _i++; + } + }; + feOne = function(fe) { + var fe; + feZero(fe); + fe.nilCheck, fe[0] = 1; + }; + feAdd = function(dst, a, b) { + var _i, _ref, a, b, dst, i; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < 10)) { break; } + i = _i; + dst.nilCheck, ((i < 0 || i >= dst.length) ? ($throwRuntimeError("index out of range"), undefined) : dst[i] = ((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) + (b.nilCheck, ((i < 0 || i >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[i])) >> 0)); + _i++; + } + }; + feSub = function(dst, a, b) { + var _i, _ref, a, b, dst, i; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < 10)) { break; } + i = _i; + dst.nilCheck, ((i < 0 || i >= dst.length) ? ($throwRuntimeError("index out of range"), undefined) : dst[i] = ((a.nilCheck, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i])) - (b.nilCheck, ((i < 0 || i >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[i])) >> 0)); + _i++; + } + }; + feCopy = function(dst, src) { + var _i, _ref, dst, i, src; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < 10)) { break; } + i = _i; + dst.nilCheck, ((i < 0 || i >= dst.length) ? ($throwRuntimeError("index out of range"), undefined) : dst[i] = (src.nilCheck, ((i < 0 || i >= src.length) ? ($throwRuntimeError("index out of range"), undefined) : src[i]))); + _i++; + } + }; + feCSwap = function(f, g, b) { + var _i, _ref, b, f, g, i, t; + b = -b; + _ref = f; + _i = 0; + while (true) { + if (!(_i < 10)) { break; } + i = _i; + t = b & ((((f.nilCheck, ((i < 0 || i >= f.length) ? ($throwRuntimeError("index out of range"), undefined) : f[i])) ^ (g.nilCheck, ((i < 0 || i >= g.length) ? ($throwRuntimeError("index out of range"), undefined) : g[i]))) >> 0)); + f.nilCheck, ((i < 0 || i >= f.length) ? ($throwRuntimeError("index out of range"), undefined) : f[i] = (((f.nilCheck, ((i < 0 || i >= f.length) ? ($throwRuntimeError("index out of range"), undefined) : f[i])) ^ (t)) >> 0)); + g.nilCheck, ((i < 0 || i >= g.length) ? ($throwRuntimeError("index out of range"), undefined) : g[i] = (((g.nilCheck, ((i < 0 || i >= g.length) ? ($throwRuntimeError("index out of range"), undefined) : g[i])) ^ (t)) >> 0)); + _i++; + } + }; + load3 = function(in$1) { + var in$1, r, x, x$1; + r = new $Int64(0, 0); + r = (new $Int64(0, (0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]))); + r = (x = $shiftLeft64((new $Int64(0, (1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]))), 8), new $Int64(r.$high | x.$high, (r.$low | x.$low) >>> 0)); + r = (x$1 = $shiftLeft64((new $Int64(0, (2 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 2]))), 16), new $Int64(r.$high | x$1.$high, (r.$low | x$1.$low) >>> 0)); + return r; + }; + load4 = function(in$1) { + var in$1; + return (new $Int64(0, $clone(binary.LittleEndian, binary.littleEndian).Uint32(in$1))); + }; + feFromBytes = function(dst, src) { + var carry, dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, src, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + h0 = load4(new sliceType(src)); + h1 = $shiftLeft64(load3($subslice(new sliceType(src), 4)), 6); + h2 = $shiftLeft64(load3($subslice(new sliceType(src), 7)), 5); + h3 = $shiftLeft64(load3($subslice(new sliceType(src), 10)), 3); + h4 = $shiftLeft64(load3($subslice(new sliceType(src), 13)), 2); + h5 = load4($subslice(new sliceType(src), 16)); + h6 = $shiftLeft64(load3($subslice(new sliceType(src), 20)), 7); + h7 = $shiftLeft64(load3($subslice(new sliceType(src), 23)), 5); + h8 = $shiftLeft64(load3($subslice(new sliceType(src), 26)), 4); + h9 = $shiftLeft64(load3($subslice(new sliceType(src), 29)), 2); + carry = arrayType.zero(); + carry[9] = $shiftRightInt64((new $Int64(h9.$high + 0, h9.$low + 16777216)), 25); + h0 = (x = $mul64(carry[9], new $Int64(0, 19)), new $Int64(h0.$high + x.$high, h0.$low + x.$low)); + h9 = (x$1 = $shiftLeft64(carry[9], 25), new $Int64(h9.$high - x$1.$high, h9.$low - x$1.$low)); + carry[1] = $shiftRightInt64((new $Int64(h1.$high + 0, h1.$low + 16777216)), 25); + h2 = (x$2 = carry[1], new $Int64(h2.$high + x$2.$high, h2.$low + x$2.$low)); + h1 = (x$3 = $shiftLeft64(carry[1], 25), new $Int64(h1.$high - x$3.$high, h1.$low - x$3.$low)); + carry[3] = $shiftRightInt64((new $Int64(h3.$high + 0, h3.$low + 16777216)), 25); + h4 = (x$4 = carry[3], new $Int64(h4.$high + x$4.$high, h4.$low + x$4.$low)); + h3 = (x$5 = $shiftLeft64(carry[3], 25), new $Int64(h3.$high - x$5.$high, h3.$low - x$5.$low)); + carry[5] = $shiftRightInt64((new $Int64(h5.$high + 0, h5.$low + 16777216)), 25); + h6 = (x$6 = carry[5], new $Int64(h6.$high + x$6.$high, h6.$low + x$6.$low)); + h5 = (x$7 = $shiftLeft64(carry[5], 25), new $Int64(h5.$high - x$7.$high, h5.$low - x$7.$low)); + carry[7] = $shiftRightInt64((new $Int64(h7.$high + 0, h7.$low + 16777216)), 25); + h8 = (x$8 = carry[7], new $Int64(h8.$high + x$8.$high, h8.$low + x$8.$low)); + h7 = (x$9 = $shiftLeft64(carry[7], 25), new $Int64(h7.$high - x$9.$high, h7.$low - x$9.$low)); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$10 = carry[0], new $Int64(h1.$high + x$10.$high, h1.$low + x$10.$low)); + h0 = (x$11 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$11.$high, h0.$low - x$11.$low)); + carry[2] = $shiftRightInt64((new $Int64(h2.$high + 0, h2.$low + 33554432)), 26); + h3 = (x$12 = carry[2], new $Int64(h3.$high + x$12.$high, h3.$low + x$12.$low)); + h2 = (x$13 = $shiftLeft64(carry[2], 26), new $Int64(h2.$high - x$13.$high, h2.$low - x$13.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$14 = carry[4], new $Int64(h5.$high + x$14.$high, h5.$low + x$14.$low)); + h4 = (x$15 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$15.$high, h4.$low - x$15.$low)); + carry[6] = $shiftRightInt64((new $Int64(h6.$high + 0, h6.$low + 33554432)), 26); + h7 = (x$16 = carry[6], new $Int64(h7.$high + x$16.$high, h7.$low + x$16.$low)); + h6 = (x$17 = $shiftLeft64(carry[6], 26), new $Int64(h6.$high - x$17.$high, h6.$low - x$17.$low)); + carry[8] = $shiftRightInt64((new $Int64(h8.$high + 0, h8.$low + 33554432)), 26); + h9 = (x$18 = carry[8], new $Int64(h9.$high + x$18.$high, h9.$low + x$18.$low)); + h8 = (x$19 = $shiftLeft64(carry[8], 26), new $Int64(h8.$high - x$19.$high, h8.$low - x$19.$low)); + dst.nilCheck, dst[0] = (((h0.$low + ((h0.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[1] = (((h1.$low + ((h1.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[2] = (((h2.$low + ((h2.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[3] = (((h3.$low + ((h3.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[4] = (((h4.$low + ((h4.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[5] = (((h5.$low + ((h5.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[6] = (((h6.$low + ((h6.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[7] = (((h7.$low + ((h7.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[8] = (((h8.$low + ((h8.$high >> 31) * 4294967296)) >> 0)); + dst.nilCheck, dst[9] = (((h9.$low + ((h9.$high >> 31) * 4294967296)) >> 0)); + }; + feToBytes = function(s, h) { + var carry, h, q, s; + carry = arrayType$1.zero(); + q = ((($imul(19, (h.nilCheck, h[9]))) + 16777216 >> 0)) >> 25 >> 0; + q = (((h.nilCheck, h[0]) + q >> 0)) >> 26 >> 0; + q = (((h.nilCheck, h[1]) + q >> 0)) >> 25 >> 0; + q = (((h.nilCheck, h[2]) + q >> 0)) >> 26 >> 0; + q = (((h.nilCheck, h[3]) + q >> 0)) >> 25 >> 0; + q = (((h.nilCheck, h[4]) + q >> 0)) >> 26 >> 0; + q = (((h.nilCheck, h[5]) + q >> 0)) >> 25 >> 0; + q = (((h.nilCheck, h[6]) + q >> 0)) >> 26 >> 0; + q = (((h.nilCheck, h[7]) + q >> 0)) >> 25 >> 0; + q = (((h.nilCheck, h[8]) + q >> 0)) >> 26 >> 0; + q = (((h.nilCheck, h[9]) + q >> 0)) >> 25 >> 0; + h.nilCheck, h[0] = ((h.nilCheck, h[0]) + (($imul(19, q))) >> 0); + carry[0] = ((h.nilCheck, h[0]) >> 26 >> 0); + h.nilCheck, h[1] = ((h.nilCheck, h[1]) + (carry[0]) >> 0); + h.nilCheck, h[0] = ((h.nilCheck, h[0]) - ((carry[0] << 26 >> 0)) >> 0); + carry[1] = ((h.nilCheck, h[1]) >> 25 >> 0); + h.nilCheck, h[2] = ((h.nilCheck, h[2]) + (carry[1]) >> 0); + h.nilCheck, h[1] = ((h.nilCheck, h[1]) - ((carry[1] << 25 >> 0)) >> 0); + carry[2] = ((h.nilCheck, h[2]) >> 26 >> 0); + h.nilCheck, h[3] = ((h.nilCheck, h[3]) + (carry[2]) >> 0); + h.nilCheck, h[2] = ((h.nilCheck, h[2]) - ((carry[2] << 26 >> 0)) >> 0); + carry[3] = ((h.nilCheck, h[3]) >> 25 >> 0); + h.nilCheck, h[4] = ((h.nilCheck, h[4]) + (carry[3]) >> 0); + h.nilCheck, h[3] = ((h.nilCheck, h[3]) - ((carry[3] << 25 >> 0)) >> 0); + carry[4] = ((h.nilCheck, h[4]) >> 26 >> 0); + h.nilCheck, h[5] = ((h.nilCheck, h[5]) + (carry[4]) >> 0); + h.nilCheck, h[4] = ((h.nilCheck, h[4]) - ((carry[4] << 26 >> 0)) >> 0); + carry[5] = ((h.nilCheck, h[5]) >> 25 >> 0); + h.nilCheck, h[6] = ((h.nilCheck, h[6]) + (carry[5]) >> 0); + h.nilCheck, h[5] = ((h.nilCheck, h[5]) - ((carry[5] << 25 >> 0)) >> 0); + carry[6] = ((h.nilCheck, h[6]) >> 26 >> 0); + h.nilCheck, h[7] = ((h.nilCheck, h[7]) + (carry[6]) >> 0); + h.nilCheck, h[6] = ((h.nilCheck, h[6]) - ((carry[6] << 26 >> 0)) >> 0); + carry[7] = ((h.nilCheck, h[7]) >> 25 >> 0); + h.nilCheck, h[8] = ((h.nilCheck, h[8]) + (carry[7]) >> 0); + h.nilCheck, h[7] = ((h.nilCheck, h[7]) - ((carry[7] << 25 >> 0)) >> 0); + carry[8] = ((h.nilCheck, h[8]) >> 26 >> 0); + h.nilCheck, h[9] = ((h.nilCheck, h[9]) + (carry[8]) >> 0); + h.nilCheck, h[8] = ((h.nilCheck, h[8]) - ((carry[8] << 26 >> 0)) >> 0); + carry[9] = ((h.nilCheck, h[9]) >> 25 >> 0); + h.nilCheck, h[9] = ((h.nilCheck, h[9]) - ((carry[9] << 25 >> 0)) >> 0); + s.nilCheck, s[0] = ((((h.nilCheck, h[0]) >> 0 >> 0) << 24 >>> 24)); + s.nilCheck, s[1] = ((((h.nilCheck, h[0]) >> 8 >> 0) << 24 >>> 24)); + s.nilCheck, s[2] = ((((h.nilCheck, h[0]) >> 16 >> 0) << 24 >>> 24)); + s.nilCheck, s[3] = ((((((h.nilCheck, h[0]) >> 24 >> 0)) | (((h.nilCheck, h[1]) << 2 >> 0))) << 24 >>> 24)); + s.nilCheck, s[4] = ((((h.nilCheck, h[1]) >> 6 >> 0) << 24 >>> 24)); + s.nilCheck, s[5] = ((((h.nilCheck, h[1]) >> 14 >> 0) << 24 >>> 24)); + s.nilCheck, s[6] = ((((((h.nilCheck, h[1]) >> 22 >> 0)) | (((h.nilCheck, h[2]) << 3 >> 0))) << 24 >>> 24)); + s.nilCheck, s[7] = ((((h.nilCheck, h[2]) >> 5 >> 0) << 24 >>> 24)); + s.nilCheck, s[8] = ((((h.nilCheck, h[2]) >> 13 >> 0) << 24 >>> 24)); + s.nilCheck, s[9] = ((((((h.nilCheck, h[2]) >> 21 >> 0)) | (((h.nilCheck, h[3]) << 5 >> 0))) << 24 >>> 24)); + s.nilCheck, s[10] = ((((h.nilCheck, h[3]) >> 3 >> 0) << 24 >>> 24)); + s.nilCheck, s[11] = ((((h.nilCheck, h[3]) >> 11 >> 0) << 24 >>> 24)); + s.nilCheck, s[12] = ((((((h.nilCheck, h[3]) >> 19 >> 0)) | (((h.nilCheck, h[4]) << 6 >> 0))) << 24 >>> 24)); + s.nilCheck, s[13] = ((((h.nilCheck, h[4]) >> 2 >> 0) << 24 >>> 24)); + s.nilCheck, s[14] = ((((h.nilCheck, h[4]) >> 10 >> 0) << 24 >>> 24)); + s.nilCheck, s[15] = ((((h.nilCheck, h[4]) >> 18 >> 0) << 24 >>> 24)); + s.nilCheck, s[16] = ((((h.nilCheck, h[5]) >> 0 >> 0) << 24 >>> 24)); + s.nilCheck, s[17] = ((((h.nilCheck, h[5]) >> 8 >> 0) << 24 >>> 24)); + s.nilCheck, s[18] = ((((h.nilCheck, h[5]) >> 16 >> 0) << 24 >>> 24)); + s.nilCheck, s[19] = ((((((h.nilCheck, h[5]) >> 24 >> 0)) | (((h.nilCheck, h[6]) << 1 >> 0))) << 24 >>> 24)); + s.nilCheck, s[20] = ((((h.nilCheck, h[6]) >> 7 >> 0) << 24 >>> 24)); + s.nilCheck, s[21] = ((((h.nilCheck, h[6]) >> 15 >> 0) << 24 >>> 24)); + s.nilCheck, s[22] = ((((((h.nilCheck, h[6]) >> 23 >> 0)) | (((h.nilCheck, h[7]) << 3 >> 0))) << 24 >>> 24)); + s.nilCheck, s[23] = ((((h.nilCheck, h[7]) >> 5 >> 0) << 24 >>> 24)); + s.nilCheck, s[24] = ((((h.nilCheck, h[7]) >> 13 >> 0) << 24 >>> 24)); + s.nilCheck, s[25] = ((((((h.nilCheck, h[7]) >> 21 >> 0)) | (((h.nilCheck, h[8]) << 4 >> 0))) << 24 >>> 24)); + s.nilCheck, s[26] = ((((h.nilCheck, h[8]) >> 4 >> 0) << 24 >>> 24)); + s.nilCheck, s[27] = ((((h.nilCheck, h[8]) >> 12 >> 0) << 24 >>> 24)); + s.nilCheck, s[28] = ((((((h.nilCheck, h[8]) >> 20 >> 0)) | (((h.nilCheck, h[9]) << 6 >> 0))) << 24 >>> 24)); + s.nilCheck, s[29] = ((((h.nilCheck, h[9]) >> 2 >> 0) << 24 >>> 24)); + s.nilCheck, s[30] = ((((h.nilCheck, h[9]) >> 10 >> 0) << 24 >>> 24)); + s.nilCheck, s[31] = ((((h.nilCheck, h[9]) >> 18 >> 0) << 24 >>> 24)); + }; + feMul = function(h, f, g) { + var carry, f, f0, f0g0, f0g1, f0g2, f0g3, f0g4, f0g5, f0g6, f0g7, f0g8, f0g9, f1, f1_2, f1g0, f1g1_2, f1g2, f1g3_2, f1g4, f1g5_2, f1g6, f1g7_2, f1g8, f1g9_38, f2, f2g0, f2g1, f2g2, f2g3, f2g4, f2g5, f2g6, f2g7, f2g8_19, f2g9_19, f3, f3_2, f3g0, f3g1_2, f3g2, f3g3_2, f3g4, f3g5_2, f3g6, f3g7_38, f3g8_19, f3g9_38, f4, f4g0, f4g1, f4g2, f4g3, f4g4, f4g5, f4g6_19, f4g7_19, f4g8_19, f4g9_19, f5, f5_2, f5g0, f5g1_2, f5g2, f5g3_2, f5g4, f5g5_38, f5g6_19, f5g7_38, f5g8_19, f5g9_38, f6, f6g0, f6g1, f6g2, f6g3, f6g4_19, f6g5_19, f6g6_19, f6g7_19, f6g8_19, f6g9_19, f7, f7_2, f7g0, f7g1_2, f7g2, f7g3_38, f7g4_19, f7g5_38, f7g6_19, f7g7_38, f7g8_19, f7g9_38, f8, f8g0, f8g1, f8g2_19, f8g3_19, f8g4_19, f8g5_19, f8g6_19, f8g7_19, f8g8_19, f8g9_19, f9, f9_2, f9g0, f9g1_38, f9g2_19, f9g3_38, f9g4_19, f9g5_38, f9g6_19, f9g7_38, f9g8_19, f9g9_38, g, g0, g1, g1_19, g2, g2_19, g3, g3_19, g4, g4_19, g5, g5_19, g6, g6_19, g7, g7_19, g8, g8_19, g9, g9_19, h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, x, x$1, x$10, x$100, x$101, x$102, x$103, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; + f0 = (f.nilCheck, f[0]); + f1 = (f.nilCheck, f[1]); + f2 = (f.nilCheck, f[2]); + f3 = (f.nilCheck, f[3]); + f4 = (f.nilCheck, f[4]); + f5 = (f.nilCheck, f[5]); + f6 = (f.nilCheck, f[6]); + f7 = (f.nilCheck, f[7]); + f8 = (f.nilCheck, f[8]); + f9 = (f.nilCheck, f[9]); + g0 = (g.nilCheck, g[0]); + g1 = (g.nilCheck, g[1]); + g2 = (g.nilCheck, g[2]); + g3 = (g.nilCheck, g[3]); + g4 = (g.nilCheck, g[4]); + g5 = (g.nilCheck, g[5]); + g6 = (g.nilCheck, g[6]); + g7 = (g.nilCheck, g[7]); + g8 = (g.nilCheck, g[8]); + g9 = (g.nilCheck, g[9]); + g1_19 = $imul(19, g1); + g2_19 = $imul(19, g2); + g3_19 = $imul(19, g3); + g4_19 = $imul(19, g4); + g5_19 = $imul(19, g5); + g6_19 = $imul(19, g6); + g7_19 = $imul(19, g7); + g8_19 = $imul(19, g8); + g9_19 = $imul(19, g9); + f1_2 = $imul(2, f1); + f3_2 = $imul(2, f3); + f5_2 = $imul(2, f5); + f7_2 = $imul(2, f7); + f9_2 = $imul(2, f9); + f0g0 = $mul64((new $Int64(0, f0)), (new $Int64(0, g0))); + f0g1 = $mul64((new $Int64(0, f0)), (new $Int64(0, g1))); + f0g2 = $mul64((new $Int64(0, f0)), (new $Int64(0, g2))); + f0g3 = $mul64((new $Int64(0, f0)), (new $Int64(0, g3))); + f0g4 = $mul64((new $Int64(0, f0)), (new $Int64(0, g4))); + f0g5 = $mul64((new $Int64(0, f0)), (new $Int64(0, g5))); + f0g6 = $mul64((new $Int64(0, f0)), (new $Int64(0, g6))); + f0g7 = $mul64((new $Int64(0, f0)), (new $Int64(0, g7))); + f0g8 = $mul64((new $Int64(0, f0)), (new $Int64(0, g8))); + f0g9 = $mul64((new $Int64(0, f0)), (new $Int64(0, g9))); + f1g0 = $mul64((new $Int64(0, f1)), (new $Int64(0, g0))); + f1g1_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, g1))); + f1g2 = $mul64((new $Int64(0, f1)), (new $Int64(0, g2))); + f1g3_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, g3))); + f1g4 = $mul64((new $Int64(0, f1)), (new $Int64(0, g4))); + f1g5_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, g5))); + f1g6 = $mul64((new $Int64(0, f1)), (new $Int64(0, g6))); + f1g7_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, g7))); + f1g8 = $mul64((new $Int64(0, f1)), (new $Int64(0, g8))); + f1g9_38 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, g9_19))); + f2g0 = $mul64((new $Int64(0, f2)), (new $Int64(0, g0))); + f2g1 = $mul64((new $Int64(0, f2)), (new $Int64(0, g1))); + f2g2 = $mul64((new $Int64(0, f2)), (new $Int64(0, g2))); + f2g3 = $mul64((new $Int64(0, f2)), (new $Int64(0, g3))); + f2g4 = $mul64((new $Int64(0, f2)), (new $Int64(0, g4))); + f2g5 = $mul64((new $Int64(0, f2)), (new $Int64(0, g5))); + f2g6 = $mul64((new $Int64(0, f2)), (new $Int64(0, g6))); + f2g7 = $mul64((new $Int64(0, f2)), (new $Int64(0, g7))); + f2g8_19 = $mul64((new $Int64(0, f2)), (new $Int64(0, g8_19))); + f2g9_19 = $mul64((new $Int64(0, f2)), (new $Int64(0, g9_19))); + f3g0 = $mul64((new $Int64(0, f3)), (new $Int64(0, g0))); + f3g1_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, g1))); + f3g2 = $mul64((new $Int64(0, f3)), (new $Int64(0, g2))); + f3g3_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, g3))); + f3g4 = $mul64((new $Int64(0, f3)), (new $Int64(0, g4))); + f3g5_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, g5))); + f3g6 = $mul64((new $Int64(0, f3)), (new $Int64(0, g6))); + f3g7_38 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, g7_19))); + f3g8_19 = $mul64((new $Int64(0, f3)), (new $Int64(0, g8_19))); + f3g9_38 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, g9_19))); + f4g0 = $mul64((new $Int64(0, f4)), (new $Int64(0, g0))); + f4g1 = $mul64((new $Int64(0, f4)), (new $Int64(0, g1))); + f4g2 = $mul64((new $Int64(0, f4)), (new $Int64(0, g2))); + f4g3 = $mul64((new $Int64(0, f4)), (new $Int64(0, g3))); + f4g4 = $mul64((new $Int64(0, f4)), (new $Int64(0, g4))); + f4g5 = $mul64((new $Int64(0, f4)), (new $Int64(0, g5))); + f4g6_19 = $mul64((new $Int64(0, f4)), (new $Int64(0, g6_19))); + f4g7_19 = $mul64((new $Int64(0, f4)), (new $Int64(0, g7_19))); + f4g8_19 = $mul64((new $Int64(0, f4)), (new $Int64(0, g8_19))); + f4g9_19 = $mul64((new $Int64(0, f4)), (new $Int64(0, g9_19))); + f5g0 = $mul64((new $Int64(0, f5)), (new $Int64(0, g0))); + f5g1_2 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, g1))); + f5g2 = $mul64((new $Int64(0, f5)), (new $Int64(0, g2))); + f5g3_2 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, g3))); + f5g4 = $mul64((new $Int64(0, f5)), (new $Int64(0, g4))); + f5g5_38 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, g5_19))); + f5g6_19 = $mul64((new $Int64(0, f5)), (new $Int64(0, g6_19))); + f5g7_38 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, g7_19))); + f5g8_19 = $mul64((new $Int64(0, f5)), (new $Int64(0, g8_19))); + f5g9_38 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, g9_19))); + f6g0 = $mul64((new $Int64(0, f6)), (new $Int64(0, g0))); + f6g1 = $mul64((new $Int64(0, f6)), (new $Int64(0, g1))); + f6g2 = $mul64((new $Int64(0, f6)), (new $Int64(0, g2))); + f6g3 = $mul64((new $Int64(0, f6)), (new $Int64(0, g3))); + f6g4_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g4_19))); + f6g5_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g5_19))); + f6g6_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g6_19))); + f6g7_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g7_19))); + f6g8_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g8_19))); + f6g9_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, g9_19))); + f7g0 = $mul64((new $Int64(0, f7)), (new $Int64(0, g0))); + f7g1_2 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, g1))); + f7g2 = $mul64((new $Int64(0, f7)), (new $Int64(0, g2))); + f7g3_38 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, g3_19))); + f7g4_19 = $mul64((new $Int64(0, f7)), (new $Int64(0, g4_19))); + f7g5_38 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, g5_19))); + f7g6_19 = $mul64((new $Int64(0, f7)), (new $Int64(0, g6_19))); + f7g7_38 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, g7_19))); + f7g8_19 = $mul64((new $Int64(0, f7)), (new $Int64(0, g8_19))); + f7g9_38 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, g9_19))); + f8g0 = $mul64((new $Int64(0, f8)), (new $Int64(0, g0))); + f8g1 = $mul64((new $Int64(0, f8)), (new $Int64(0, g1))); + f8g2_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g2_19))); + f8g3_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g3_19))); + f8g4_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g4_19))); + f8g5_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g5_19))); + f8g6_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g6_19))); + f8g7_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g7_19))); + f8g8_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g8_19))); + f8g9_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, g9_19))); + f9g0 = $mul64((new $Int64(0, f9)), (new $Int64(0, g0))); + f9g1_38 = $mul64((new $Int64(0, f9_2)), (new $Int64(0, g1_19))); + f9g2_19 = $mul64((new $Int64(0, f9)), (new $Int64(0, g2_19))); + f9g3_38 = $mul64((new $Int64(0, f9_2)), (new $Int64(0, g3_19))); + f9g4_19 = $mul64((new $Int64(0, f9)), (new $Int64(0, g4_19))); + f9g5_38 = $mul64((new $Int64(0, f9_2)), (new $Int64(0, g5_19))); + f9g6_19 = $mul64((new $Int64(0, f9)), (new $Int64(0, g6_19))); + f9g7_38 = $mul64((new $Int64(0, f9_2)), (new $Int64(0, g7_19))); + f9g8_19 = $mul64((new $Int64(0, f9)), (new $Int64(0, g8_19))); + f9g9_38 = $mul64((new $Int64(0, f9_2)), (new $Int64(0, g9_19))); + h0 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (x$7 = new $Int64(f0g0.$high + f1g9_38.$high, f0g0.$low + f1g9_38.$low), new $Int64(x$7.$high + f2g8_19.$high, x$7.$low + f2g8_19.$low)), new $Int64(x$6.$high + f3g7_38.$high, x$6.$low + f3g7_38.$low)), new $Int64(x$5.$high + f4g6_19.$high, x$5.$low + f4g6_19.$low)), new $Int64(x$4.$high + f5g5_38.$high, x$4.$low + f5g5_38.$low)), new $Int64(x$3.$high + f6g4_19.$high, x$3.$low + f6g4_19.$low)), new $Int64(x$2.$high + f7g3_38.$high, x$2.$low + f7g3_38.$low)), new $Int64(x$1.$high + f8g2_19.$high, x$1.$low + f8g2_19.$low)), new $Int64(x.$high + f9g1_38.$high, x.$low + f9g1_38.$low)); + h1 = (x$8 = (x$9 = (x$10 = (x$11 = (x$12 = (x$13 = (x$14 = (x$15 = new $Int64(f0g1.$high + f1g0.$high, f0g1.$low + f1g0.$low), new $Int64(x$15.$high + f2g9_19.$high, x$15.$low + f2g9_19.$low)), new $Int64(x$14.$high + f3g8_19.$high, x$14.$low + f3g8_19.$low)), new $Int64(x$13.$high + f4g7_19.$high, x$13.$low + f4g7_19.$low)), new $Int64(x$12.$high + f5g6_19.$high, x$12.$low + f5g6_19.$low)), new $Int64(x$11.$high + f6g5_19.$high, x$11.$low + f6g5_19.$low)), new $Int64(x$10.$high + f7g4_19.$high, x$10.$low + f7g4_19.$low)), new $Int64(x$9.$high + f8g3_19.$high, x$9.$low + f8g3_19.$low)), new $Int64(x$8.$high + f9g2_19.$high, x$8.$low + f9g2_19.$low)); + h2 = (x$16 = (x$17 = (x$18 = (x$19 = (x$20 = (x$21 = (x$22 = (x$23 = new $Int64(f0g2.$high + f1g1_2.$high, f0g2.$low + f1g1_2.$low), new $Int64(x$23.$high + f2g0.$high, x$23.$low + f2g0.$low)), new $Int64(x$22.$high + f3g9_38.$high, x$22.$low + f3g9_38.$low)), new $Int64(x$21.$high + f4g8_19.$high, x$21.$low + f4g8_19.$low)), new $Int64(x$20.$high + f5g7_38.$high, x$20.$low + f5g7_38.$low)), new $Int64(x$19.$high + f6g6_19.$high, x$19.$low + f6g6_19.$low)), new $Int64(x$18.$high + f7g5_38.$high, x$18.$low + f7g5_38.$low)), new $Int64(x$17.$high + f8g4_19.$high, x$17.$low + f8g4_19.$low)), new $Int64(x$16.$high + f9g3_38.$high, x$16.$low + f9g3_38.$low)); + h3 = (x$24 = (x$25 = (x$26 = (x$27 = (x$28 = (x$29 = (x$30 = (x$31 = new $Int64(f0g3.$high + f1g2.$high, f0g3.$low + f1g2.$low), new $Int64(x$31.$high + f2g1.$high, x$31.$low + f2g1.$low)), new $Int64(x$30.$high + f3g0.$high, x$30.$low + f3g0.$low)), new $Int64(x$29.$high + f4g9_19.$high, x$29.$low + f4g9_19.$low)), new $Int64(x$28.$high + f5g8_19.$high, x$28.$low + f5g8_19.$low)), new $Int64(x$27.$high + f6g7_19.$high, x$27.$low + f6g7_19.$low)), new $Int64(x$26.$high + f7g6_19.$high, x$26.$low + f7g6_19.$low)), new $Int64(x$25.$high + f8g5_19.$high, x$25.$low + f8g5_19.$low)), new $Int64(x$24.$high + f9g4_19.$high, x$24.$low + f9g4_19.$low)); + h4 = (x$32 = (x$33 = (x$34 = (x$35 = (x$36 = (x$37 = (x$38 = (x$39 = new $Int64(f0g4.$high + f1g3_2.$high, f0g4.$low + f1g3_2.$low), new $Int64(x$39.$high + f2g2.$high, x$39.$low + f2g2.$low)), new $Int64(x$38.$high + f3g1_2.$high, x$38.$low + f3g1_2.$low)), new $Int64(x$37.$high + f4g0.$high, x$37.$low + f4g0.$low)), new $Int64(x$36.$high + f5g9_38.$high, x$36.$low + f5g9_38.$low)), new $Int64(x$35.$high + f6g8_19.$high, x$35.$low + f6g8_19.$low)), new $Int64(x$34.$high + f7g7_38.$high, x$34.$low + f7g7_38.$low)), new $Int64(x$33.$high + f8g6_19.$high, x$33.$low + f8g6_19.$low)), new $Int64(x$32.$high + f9g5_38.$high, x$32.$low + f9g5_38.$low)); + h5 = (x$40 = (x$41 = (x$42 = (x$43 = (x$44 = (x$45 = (x$46 = (x$47 = new $Int64(f0g5.$high + f1g4.$high, f0g5.$low + f1g4.$low), new $Int64(x$47.$high + f2g3.$high, x$47.$low + f2g3.$low)), new $Int64(x$46.$high + f3g2.$high, x$46.$low + f3g2.$low)), new $Int64(x$45.$high + f4g1.$high, x$45.$low + f4g1.$low)), new $Int64(x$44.$high + f5g0.$high, x$44.$low + f5g0.$low)), new $Int64(x$43.$high + f6g9_19.$high, x$43.$low + f6g9_19.$low)), new $Int64(x$42.$high + f7g8_19.$high, x$42.$low + f7g8_19.$low)), new $Int64(x$41.$high + f8g7_19.$high, x$41.$low + f8g7_19.$low)), new $Int64(x$40.$high + f9g6_19.$high, x$40.$low + f9g6_19.$low)); + h6 = (x$48 = (x$49 = (x$50 = (x$51 = (x$52 = (x$53 = (x$54 = (x$55 = new $Int64(f0g6.$high + f1g5_2.$high, f0g6.$low + f1g5_2.$low), new $Int64(x$55.$high + f2g4.$high, x$55.$low + f2g4.$low)), new $Int64(x$54.$high + f3g3_2.$high, x$54.$low + f3g3_2.$low)), new $Int64(x$53.$high + f4g2.$high, x$53.$low + f4g2.$low)), new $Int64(x$52.$high + f5g1_2.$high, x$52.$low + f5g1_2.$low)), new $Int64(x$51.$high + f6g0.$high, x$51.$low + f6g0.$low)), new $Int64(x$50.$high + f7g9_38.$high, x$50.$low + f7g9_38.$low)), new $Int64(x$49.$high + f8g8_19.$high, x$49.$low + f8g8_19.$low)), new $Int64(x$48.$high + f9g7_38.$high, x$48.$low + f9g7_38.$low)); + h7 = (x$56 = (x$57 = (x$58 = (x$59 = (x$60 = (x$61 = (x$62 = (x$63 = new $Int64(f0g7.$high + f1g6.$high, f0g7.$low + f1g6.$low), new $Int64(x$63.$high + f2g5.$high, x$63.$low + f2g5.$low)), new $Int64(x$62.$high + f3g4.$high, x$62.$low + f3g4.$low)), new $Int64(x$61.$high + f4g3.$high, x$61.$low + f4g3.$low)), new $Int64(x$60.$high + f5g2.$high, x$60.$low + f5g2.$low)), new $Int64(x$59.$high + f6g1.$high, x$59.$low + f6g1.$low)), new $Int64(x$58.$high + f7g0.$high, x$58.$low + f7g0.$low)), new $Int64(x$57.$high + f8g9_19.$high, x$57.$low + f8g9_19.$low)), new $Int64(x$56.$high + f9g8_19.$high, x$56.$low + f9g8_19.$low)); + h8 = (x$64 = (x$65 = (x$66 = (x$67 = (x$68 = (x$69 = (x$70 = (x$71 = new $Int64(f0g8.$high + f1g7_2.$high, f0g8.$low + f1g7_2.$low), new $Int64(x$71.$high + f2g6.$high, x$71.$low + f2g6.$low)), new $Int64(x$70.$high + f3g5_2.$high, x$70.$low + f3g5_2.$low)), new $Int64(x$69.$high + f4g4.$high, x$69.$low + f4g4.$low)), new $Int64(x$68.$high + f5g3_2.$high, x$68.$low + f5g3_2.$low)), new $Int64(x$67.$high + f6g2.$high, x$67.$low + f6g2.$low)), new $Int64(x$66.$high + f7g1_2.$high, x$66.$low + f7g1_2.$low)), new $Int64(x$65.$high + f8g0.$high, x$65.$low + f8g0.$low)), new $Int64(x$64.$high + f9g9_38.$high, x$64.$low + f9g9_38.$low)); + h9 = (x$72 = (x$73 = (x$74 = (x$75 = (x$76 = (x$77 = (x$78 = (x$79 = new $Int64(f0g9.$high + f1g8.$high, f0g9.$low + f1g8.$low), new $Int64(x$79.$high + f2g7.$high, x$79.$low + f2g7.$low)), new $Int64(x$78.$high + f3g6.$high, x$78.$low + f3g6.$low)), new $Int64(x$77.$high + f4g5.$high, x$77.$low + f4g5.$low)), new $Int64(x$76.$high + f5g4.$high, x$76.$low + f5g4.$low)), new $Int64(x$75.$high + f6g3.$high, x$75.$low + f6g3.$low)), new $Int64(x$74.$high + f7g2.$high, x$74.$low + f7g2.$low)), new $Int64(x$73.$high + f8g1.$high, x$73.$low + f8g1.$low)), new $Int64(x$72.$high + f9g0.$high, x$72.$low + f9g0.$low)); + carry = arrayType.zero(); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$80 = carry[0], new $Int64(h1.$high + x$80.$high, h1.$low + x$80.$low)); + h0 = (x$81 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$81.$high, h0.$low - x$81.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$82 = carry[4], new $Int64(h5.$high + x$82.$high, h5.$low + x$82.$low)); + h4 = (x$83 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$83.$high, h4.$low - x$83.$low)); + carry[1] = $shiftRightInt64((new $Int64(h1.$high + 0, h1.$low + 16777216)), 25); + h2 = (x$84 = carry[1], new $Int64(h2.$high + x$84.$high, h2.$low + x$84.$low)); + h1 = (x$85 = $shiftLeft64(carry[1], 25), new $Int64(h1.$high - x$85.$high, h1.$low - x$85.$low)); + carry[5] = $shiftRightInt64((new $Int64(h5.$high + 0, h5.$low + 16777216)), 25); + h6 = (x$86 = carry[5], new $Int64(h6.$high + x$86.$high, h6.$low + x$86.$low)); + h5 = (x$87 = $shiftLeft64(carry[5], 25), new $Int64(h5.$high - x$87.$high, h5.$low - x$87.$low)); + carry[2] = $shiftRightInt64((new $Int64(h2.$high + 0, h2.$low + 33554432)), 26); + h3 = (x$88 = carry[2], new $Int64(h3.$high + x$88.$high, h3.$low + x$88.$low)); + h2 = (x$89 = $shiftLeft64(carry[2], 26), new $Int64(h2.$high - x$89.$high, h2.$low - x$89.$low)); + carry[6] = $shiftRightInt64((new $Int64(h6.$high + 0, h6.$low + 33554432)), 26); + h7 = (x$90 = carry[6], new $Int64(h7.$high + x$90.$high, h7.$low + x$90.$low)); + h6 = (x$91 = $shiftLeft64(carry[6], 26), new $Int64(h6.$high - x$91.$high, h6.$low - x$91.$low)); + carry[3] = $shiftRightInt64((new $Int64(h3.$high + 0, h3.$low + 16777216)), 25); + h4 = (x$92 = carry[3], new $Int64(h4.$high + x$92.$high, h4.$low + x$92.$low)); + h3 = (x$93 = $shiftLeft64(carry[3], 25), new $Int64(h3.$high - x$93.$high, h3.$low - x$93.$low)); + carry[7] = $shiftRightInt64((new $Int64(h7.$high + 0, h7.$low + 16777216)), 25); + h8 = (x$94 = carry[7], new $Int64(h8.$high + x$94.$high, h8.$low + x$94.$low)); + h7 = (x$95 = $shiftLeft64(carry[7], 25), new $Int64(h7.$high - x$95.$high, h7.$low - x$95.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$96 = carry[4], new $Int64(h5.$high + x$96.$high, h5.$low + x$96.$low)); + h4 = (x$97 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$97.$high, h4.$low - x$97.$low)); + carry[8] = $shiftRightInt64((new $Int64(h8.$high + 0, h8.$low + 33554432)), 26); + h9 = (x$98 = carry[8], new $Int64(h9.$high + x$98.$high, h9.$low + x$98.$low)); + h8 = (x$99 = $shiftLeft64(carry[8], 26), new $Int64(h8.$high - x$99.$high, h8.$low - x$99.$low)); + carry[9] = $shiftRightInt64((new $Int64(h9.$high + 0, h9.$low + 16777216)), 25); + h0 = (x$100 = $mul64(carry[9], new $Int64(0, 19)), new $Int64(h0.$high + x$100.$high, h0.$low + x$100.$low)); + h9 = (x$101 = $shiftLeft64(carry[9], 25), new $Int64(h9.$high - x$101.$high, h9.$low - x$101.$low)); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$102 = carry[0], new $Int64(h1.$high + x$102.$high, h1.$low + x$102.$low)); + h0 = (x$103 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$103.$high, h0.$low - x$103.$low)); + h.nilCheck, h[0] = (((h0.$low + ((h0.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[1] = (((h1.$low + ((h1.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[2] = (((h2.$low + ((h2.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[3] = (((h3.$low + ((h3.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[4] = (((h4.$low + ((h4.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[5] = (((h5.$low + ((h5.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[6] = (((h6.$low + ((h6.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[7] = (((h7.$low + ((h7.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[8] = (((h8.$low + ((h8.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[9] = (((h9.$low + ((h9.$high >> 31) * 4294967296)) >> 0)); + }; + feSquare = function(h, f) { + var carry, f, f0, f0_2, f0f0, f0f1_2, f0f2_2, f0f3_2, f0f4_2, f0f5_2, f0f6_2, f0f7_2, f0f8_2, f0f9_2, f1, f1_2, f1f1_2, f1f2_2, f1f3_4, f1f4_2, f1f5_4, f1f6_2, f1f7_4, f1f8_2, f1f9_76, f2, f2_2, f2f2, f2f3_2, f2f4_2, f2f5_2, f2f6_2, f2f7_2, f2f8_38, f2f9_38, f3, f3_2, f3f3_2, f3f4_2, f3f5_4, f3f6_2, f3f7_76, f3f8_38, f3f9_76, f4, f4_2, f4f4, f4f5_2, f4f6_38, f4f7_38, f4f8_38, f4f9_38, f5, f5_2, f5_38, f5f5_38, f5f6_38, f5f7_76, f5f8_38, f5f9_76, f6, f6_19, f6_2, f6f6_19, f6f7_38, f6f8_38, f6f9_38, f7, f7_2, f7_38, f7f7_38, f7f8_38, f7f9_76, f8, f8_19, f8f8_19, f8f9_38, f9, f9_38, f9f9_38, h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$6, x$7, x$8, x$9; + f0 = (f.nilCheck, f[0]); + f1 = (f.nilCheck, f[1]); + f2 = (f.nilCheck, f[2]); + f3 = (f.nilCheck, f[3]); + f4 = (f.nilCheck, f[4]); + f5 = (f.nilCheck, f[5]); + f6 = (f.nilCheck, f[6]); + f7 = (f.nilCheck, f[7]); + f8 = (f.nilCheck, f[8]); + f9 = (f.nilCheck, f[9]); + f0_2 = $imul(2, f0); + f1_2 = $imul(2, f1); + f2_2 = $imul(2, f2); + f3_2 = $imul(2, f3); + f4_2 = $imul(2, f4); + f5_2 = $imul(2, f5); + f6_2 = $imul(2, f6); + f7_2 = $imul(2, f7); + f5_38 = $imul(38, f5); + f6_19 = $imul(19, f6); + f7_38 = $imul(38, f7); + f8_19 = $imul(19, f8); + f9_38 = $imul(38, f9); + f0f0 = $mul64((new $Int64(0, f0)), (new $Int64(0, f0))); + f0f1_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f1))); + f0f2_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f2))); + f0f3_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f3))); + f0f4_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f4))); + f0f5_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f5))); + f0f6_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f6))); + f0f7_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f7))); + f0f8_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f8))); + f0f9_2 = $mul64((new $Int64(0, f0_2)), (new $Int64(0, f9))); + f1f1_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f1))); + f1f2_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f2))); + f1f3_4 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f3_2))); + f1f4_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f4))); + f1f5_4 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f5_2))); + f1f6_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f6))); + f1f7_4 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f7_2))); + f1f8_2 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f8))); + f1f9_76 = $mul64((new $Int64(0, f1_2)), (new $Int64(0, f9_38))); + f2f2 = $mul64((new $Int64(0, f2)), (new $Int64(0, f2))); + f2f3_2 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f3))); + f2f4_2 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f4))); + f2f5_2 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f5))); + f2f6_2 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f6))); + f2f7_2 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f7))); + f2f8_38 = $mul64((new $Int64(0, f2_2)), (new $Int64(0, f8_19))); + f2f9_38 = $mul64((new $Int64(0, f2)), (new $Int64(0, f9_38))); + f3f3_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f3))); + f3f4_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f4))); + f3f5_4 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f5_2))); + f3f6_2 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f6))); + f3f7_76 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f7_38))); + f3f8_38 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f8_19))); + f3f9_76 = $mul64((new $Int64(0, f3_2)), (new $Int64(0, f9_38))); + f4f4 = $mul64((new $Int64(0, f4)), (new $Int64(0, f4))); + f4f5_2 = $mul64((new $Int64(0, f4_2)), (new $Int64(0, f5))); + f4f6_38 = $mul64((new $Int64(0, f4_2)), (new $Int64(0, f6_19))); + f4f7_38 = $mul64((new $Int64(0, f4)), (new $Int64(0, f7_38))); + f4f8_38 = $mul64((new $Int64(0, f4_2)), (new $Int64(0, f8_19))); + f4f9_38 = $mul64((new $Int64(0, f4)), (new $Int64(0, f9_38))); + f5f5_38 = $mul64((new $Int64(0, f5)), (new $Int64(0, f5_38))); + f5f6_38 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, f6_19))); + f5f7_76 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, f7_38))); + f5f8_38 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, f8_19))); + f5f9_76 = $mul64((new $Int64(0, f5_2)), (new $Int64(0, f9_38))); + f6f6_19 = $mul64((new $Int64(0, f6)), (new $Int64(0, f6_19))); + f6f7_38 = $mul64((new $Int64(0, f6)), (new $Int64(0, f7_38))); + f6f8_38 = $mul64((new $Int64(0, f6_2)), (new $Int64(0, f8_19))); + f6f9_38 = $mul64((new $Int64(0, f6)), (new $Int64(0, f9_38))); + f7f7_38 = $mul64((new $Int64(0, f7)), (new $Int64(0, f7_38))); + f7f8_38 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, f8_19))); + f7f9_76 = $mul64((new $Int64(0, f7_2)), (new $Int64(0, f9_38))); + f8f8_19 = $mul64((new $Int64(0, f8)), (new $Int64(0, f8_19))); + f8f9_38 = $mul64((new $Int64(0, f8)), (new $Int64(0, f9_38))); + f9f9_38 = $mul64((new $Int64(0, f9)), (new $Int64(0, f9_38))); + h0 = (x = (x$1 = (x$2 = (x$3 = new $Int64(f0f0.$high + f1f9_76.$high, f0f0.$low + f1f9_76.$low), new $Int64(x$3.$high + f2f8_38.$high, x$3.$low + f2f8_38.$low)), new $Int64(x$2.$high + f3f7_76.$high, x$2.$low + f3f7_76.$low)), new $Int64(x$1.$high + f4f6_38.$high, x$1.$low + f4f6_38.$low)), new $Int64(x.$high + f5f5_38.$high, x.$low + f5f5_38.$low)); + h1 = (x$4 = (x$5 = (x$6 = new $Int64(f0f1_2.$high + f2f9_38.$high, f0f1_2.$low + f2f9_38.$low), new $Int64(x$6.$high + f3f8_38.$high, x$6.$low + f3f8_38.$low)), new $Int64(x$5.$high + f4f7_38.$high, x$5.$low + f4f7_38.$low)), new $Int64(x$4.$high + f5f6_38.$high, x$4.$low + f5f6_38.$low)); + h2 = (x$7 = (x$8 = (x$9 = (x$10 = new $Int64(f0f2_2.$high + f1f1_2.$high, f0f2_2.$low + f1f1_2.$low), new $Int64(x$10.$high + f3f9_76.$high, x$10.$low + f3f9_76.$low)), new $Int64(x$9.$high + f4f8_38.$high, x$9.$low + f4f8_38.$low)), new $Int64(x$8.$high + f5f7_76.$high, x$8.$low + f5f7_76.$low)), new $Int64(x$7.$high + f6f6_19.$high, x$7.$low + f6f6_19.$low)); + h3 = (x$11 = (x$12 = (x$13 = new $Int64(f0f3_2.$high + f1f2_2.$high, f0f3_2.$low + f1f2_2.$low), new $Int64(x$13.$high + f4f9_38.$high, x$13.$low + f4f9_38.$low)), new $Int64(x$12.$high + f5f8_38.$high, x$12.$low + f5f8_38.$low)), new $Int64(x$11.$high + f6f7_38.$high, x$11.$low + f6f7_38.$low)); + h4 = (x$14 = (x$15 = (x$16 = (x$17 = new $Int64(f0f4_2.$high + f1f3_4.$high, f0f4_2.$low + f1f3_4.$low), new $Int64(x$17.$high + f2f2.$high, x$17.$low + f2f2.$low)), new $Int64(x$16.$high + f5f9_76.$high, x$16.$low + f5f9_76.$low)), new $Int64(x$15.$high + f6f8_38.$high, x$15.$low + f6f8_38.$low)), new $Int64(x$14.$high + f7f7_38.$high, x$14.$low + f7f7_38.$low)); + h5 = (x$18 = (x$19 = (x$20 = new $Int64(f0f5_2.$high + f1f4_2.$high, f0f5_2.$low + f1f4_2.$low), new $Int64(x$20.$high + f2f3_2.$high, x$20.$low + f2f3_2.$low)), new $Int64(x$19.$high + f6f9_38.$high, x$19.$low + f6f9_38.$low)), new $Int64(x$18.$high + f7f8_38.$high, x$18.$low + f7f8_38.$low)); + h6 = (x$21 = (x$22 = (x$23 = (x$24 = new $Int64(f0f6_2.$high + f1f5_4.$high, f0f6_2.$low + f1f5_4.$low), new $Int64(x$24.$high + f2f4_2.$high, x$24.$low + f2f4_2.$low)), new $Int64(x$23.$high + f3f3_2.$high, x$23.$low + f3f3_2.$low)), new $Int64(x$22.$high + f7f9_76.$high, x$22.$low + f7f9_76.$low)), new $Int64(x$21.$high + f8f8_19.$high, x$21.$low + f8f8_19.$low)); + h7 = (x$25 = (x$26 = (x$27 = new $Int64(f0f7_2.$high + f1f6_2.$high, f0f7_2.$low + f1f6_2.$low), new $Int64(x$27.$high + f2f5_2.$high, x$27.$low + f2f5_2.$low)), new $Int64(x$26.$high + f3f4_2.$high, x$26.$low + f3f4_2.$low)), new $Int64(x$25.$high + f8f9_38.$high, x$25.$low + f8f9_38.$low)); + h8 = (x$28 = (x$29 = (x$30 = (x$31 = new $Int64(f0f8_2.$high + f1f7_4.$high, f0f8_2.$low + f1f7_4.$low), new $Int64(x$31.$high + f2f6_2.$high, x$31.$low + f2f6_2.$low)), new $Int64(x$30.$high + f3f5_4.$high, x$30.$low + f3f5_4.$low)), new $Int64(x$29.$high + f4f4.$high, x$29.$low + f4f4.$low)), new $Int64(x$28.$high + f9f9_38.$high, x$28.$low + f9f9_38.$low)); + h9 = (x$32 = (x$33 = (x$34 = new $Int64(f0f9_2.$high + f1f8_2.$high, f0f9_2.$low + f1f8_2.$low), new $Int64(x$34.$high + f2f7_2.$high, x$34.$low + f2f7_2.$low)), new $Int64(x$33.$high + f3f6_2.$high, x$33.$low + f3f6_2.$low)), new $Int64(x$32.$high + f4f5_2.$high, x$32.$low + f4f5_2.$low)); + carry = arrayType.zero(); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$35 = carry[0], new $Int64(h1.$high + x$35.$high, h1.$low + x$35.$low)); + h0 = (x$36 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$36.$high, h0.$low - x$36.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$37 = carry[4], new $Int64(h5.$high + x$37.$high, h5.$low + x$37.$low)); + h4 = (x$38 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$38.$high, h4.$low - x$38.$low)); + carry[1] = $shiftRightInt64((new $Int64(h1.$high + 0, h1.$low + 16777216)), 25); + h2 = (x$39 = carry[1], new $Int64(h2.$high + x$39.$high, h2.$low + x$39.$low)); + h1 = (x$40 = $shiftLeft64(carry[1], 25), new $Int64(h1.$high - x$40.$high, h1.$low - x$40.$low)); + carry[5] = $shiftRightInt64((new $Int64(h5.$high + 0, h5.$low + 16777216)), 25); + h6 = (x$41 = carry[5], new $Int64(h6.$high + x$41.$high, h6.$low + x$41.$low)); + h5 = (x$42 = $shiftLeft64(carry[5], 25), new $Int64(h5.$high - x$42.$high, h5.$low - x$42.$low)); + carry[2] = $shiftRightInt64((new $Int64(h2.$high + 0, h2.$low + 33554432)), 26); + h3 = (x$43 = carry[2], new $Int64(h3.$high + x$43.$high, h3.$low + x$43.$low)); + h2 = (x$44 = $shiftLeft64(carry[2], 26), new $Int64(h2.$high - x$44.$high, h2.$low - x$44.$low)); + carry[6] = $shiftRightInt64((new $Int64(h6.$high + 0, h6.$low + 33554432)), 26); + h7 = (x$45 = carry[6], new $Int64(h7.$high + x$45.$high, h7.$low + x$45.$low)); + h6 = (x$46 = $shiftLeft64(carry[6], 26), new $Int64(h6.$high - x$46.$high, h6.$low - x$46.$low)); + carry[3] = $shiftRightInt64((new $Int64(h3.$high + 0, h3.$low + 16777216)), 25); + h4 = (x$47 = carry[3], new $Int64(h4.$high + x$47.$high, h4.$low + x$47.$low)); + h3 = (x$48 = $shiftLeft64(carry[3], 25), new $Int64(h3.$high - x$48.$high, h3.$low - x$48.$low)); + carry[7] = $shiftRightInt64((new $Int64(h7.$high + 0, h7.$low + 16777216)), 25); + h8 = (x$49 = carry[7], new $Int64(h8.$high + x$49.$high, h8.$low + x$49.$low)); + h7 = (x$50 = $shiftLeft64(carry[7], 25), new $Int64(h7.$high - x$50.$high, h7.$low - x$50.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$51 = carry[4], new $Int64(h5.$high + x$51.$high, h5.$low + x$51.$low)); + h4 = (x$52 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$52.$high, h4.$low - x$52.$low)); + carry[8] = $shiftRightInt64((new $Int64(h8.$high + 0, h8.$low + 33554432)), 26); + h9 = (x$53 = carry[8], new $Int64(h9.$high + x$53.$high, h9.$low + x$53.$low)); + h8 = (x$54 = $shiftLeft64(carry[8], 26), new $Int64(h8.$high - x$54.$high, h8.$low - x$54.$low)); + carry[9] = $shiftRightInt64((new $Int64(h9.$high + 0, h9.$low + 16777216)), 25); + h0 = (x$55 = $mul64(carry[9], new $Int64(0, 19)), new $Int64(h0.$high + x$55.$high, h0.$low + x$55.$low)); + h9 = (x$56 = $shiftLeft64(carry[9], 25), new $Int64(h9.$high - x$56.$high, h9.$low - x$56.$low)); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$57 = carry[0], new $Int64(h1.$high + x$57.$high, h1.$low + x$57.$low)); + h0 = (x$58 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$58.$high, h0.$low - x$58.$low)); + h.nilCheck, h[0] = (((h0.$low + ((h0.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[1] = (((h1.$low + ((h1.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[2] = (((h2.$low + ((h2.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[3] = (((h3.$low + ((h3.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[4] = (((h4.$low + ((h4.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[5] = (((h5.$low + ((h5.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[6] = (((h6.$low + ((h6.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[7] = (((h7.$low + ((h7.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[8] = (((h8.$low + ((h8.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[9] = (((h9.$low + ((h9.$high >> 31) * 4294967296)) >> 0)); + }; + feMul121666 = function(h, f) { + var carry, f, h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + h0 = $mul64((new $Int64(0, (f.nilCheck, f[0]))), new $Int64(0, 121666)); + h1 = $mul64((new $Int64(0, (f.nilCheck, f[1]))), new $Int64(0, 121666)); + h2 = $mul64((new $Int64(0, (f.nilCheck, f[2]))), new $Int64(0, 121666)); + h3 = $mul64((new $Int64(0, (f.nilCheck, f[3]))), new $Int64(0, 121666)); + h4 = $mul64((new $Int64(0, (f.nilCheck, f[4]))), new $Int64(0, 121666)); + h5 = $mul64((new $Int64(0, (f.nilCheck, f[5]))), new $Int64(0, 121666)); + h6 = $mul64((new $Int64(0, (f.nilCheck, f[6]))), new $Int64(0, 121666)); + h7 = $mul64((new $Int64(0, (f.nilCheck, f[7]))), new $Int64(0, 121666)); + h8 = $mul64((new $Int64(0, (f.nilCheck, f[8]))), new $Int64(0, 121666)); + h9 = $mul64((new $Int64(0, (f.nilCheck, f[9]))), new $Int64(0, 121666)); + carry = arrayType.zero(); + carry[9] = $shiftRightInt64((new $Int64(h9.$high + 0, h9.$low + 16777216)), 25); + h0 = (x = $mul64(carry[9], new $Int64(0, 19)), new $Int64(h0.$high + x.$high, h0.$low + x.$low)); + h9 = (x$1 = $shiftLeft64(carry[9], 25), new $Int64(h9.$high - x$1.$high, h9.$low - x$1.$low)); + carry[1] = $shiftRightInt64((new $Int64(h1.$high + 0, h1.$low + 16777216)), 25); + h2 = (x$2 = carry[1], new $Int64(h2.$high + x$2.$high, h2.$low + x$2.$low)); + h1 = (x$3 = $shiftLeft64(carry[1], 25), new $Int64(h1.$high - x$3.$high, h1.$low - x$3.$low)); + carry[3] = $shiftRightInt64((new $Int64(h3.$high + 0, h3.$low + 16777216)), 25); + h4 = (x$4 = carry[3], new $Int64(h4.$high + x$4.$high, h4.$low + x$4.$low)); + h3 = (x$5 = $shiftLeft64(carry[3], 25), new $Int64(h3.$high - x$5.$high, h3.$low - x$5.$low)); + carry[5] = $shiftRightInt64((new $Int64(h5.$high + 0, h5.$low + 16777216)), 25); + h6 = (x$6 = carry[5], new $Int64(h6.$high + x$6.$high, h6.$low + x$6.$low)); + h5 = (x$7 = $shiftLeft64(carry[5], 25), new $Int64(h5.$high - x$7.$high, h5.$low - x$7.$low)); + carry[7] = $shiftRightInt64((new $Int64(h7.$high + 0, h7.$low + 16777216)), 25); + h8 = (x$8 = carry[7], new $Int64(h8.$high + x$8.$high, h8.$low + x$8.$low)); + h7 = (x$9 = $shiftLeft64(carry[7], 25), new $Int64(h7.$high - x$9.$high, h7.$low - x$9.$low)); + carry[0] = $shiftRightInt64((new $Int64(h0.$high + 0, h0.$low + 33554432)), 26); + h1 = (x$10 = carry[0], new $Int64(h1.$high + x$10.$high, h1.$low + x$10.$low)); + h0 = (x$11 = $shiftLeft64(carry[0], 26), new $Int64(h0.$high - x$11.$high, h0.$low - x$11.$low)); + carry[2] = $shiftRightInt64((new $Int64(h2.$high + 0, h2.$low + 33554432)), 26); + h3 = (x$12 = carry[2], new $Int64(h3.$high + x$12.$high, h3.$low + x$12.$low)); + h2 = (x$13 = $shiftLeft64(carry[2], 26), new $Int64(h2.$high - x$13.$high, h2.$low - x$13.$low)); + carry[4] = $shiftRightInt64((new $Int64(h4.$high + 0, h4.$low + 33554432)), 26); + h5 = (x$14 = carry[4], new $Int64(h5.$high + x$14.$high, h5.$low + x$14.$low)); + h4 = (x$15 = $shiftLeft64(carry[4], 26), new $Int64(h4.$high - x$15.$high, h4.$low - x$15.$low)); + carry[6] = $shiftRightInt64((new $Int64(h6.$high + 0, h6.$low + 33554432)), 26); + h7 = (x$16 = carry[6], new $Int64(h7.$high + x$16.$high, h7.$low + x$16.$low)); + h6 = (x$17 = $shiftLeft64(carry[6], 26), new $Int64(h6.$high - x$17.$high, h6.$low - x$17.$low)); + carry[8] = $shiftRightInt64((new $Int64(h8.$high + 0, h8.$low + 33554432)), 26); + h9 = (x$18 = carry[8], new $Int64(h9.$high + x$18.$high, h9.$low + x$18.$low)); + h8 = (x$19 = $shiftLeft64(carry[8], 26), new $Int64(h8.$high - x$19.$high, h8.$low - x$19.$low)); + h.nilCheck, h[0] = (((h0.$low + ((h0.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[1] = (((h1.$low + ((h1.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[2] = (((h2.$low + ((h2.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[3] = (((h3.$low + ((h3.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[4] = (((h4.$low + ((h4.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[5] = (((h5.$low + ((h5.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[6] = (((h6.$low + ((h6.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[7] = (((h7.$low + ((h7.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[8] = (((h8.$low + ((h8.$high >> 31) * 4294967296)) >> 0)); + h.nilCheck, h[9] = (((h9.$low + ((h9.$high >> 31) * 4294967296)) >> 0)); + }; + feInvert = function(out, z) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, i, out, t0, t1, t2, t3, z; + _tmp = arrayType$1.zero(); + _tmp$1 = arrayType$1.zero(); + _tmp$2 = arrayType$1.zero(); + _tmp$3 = arrayType$1.zero(); + t0 = $clone(_tmp, fieldElement); + t1 = $clone(_tmp$1, fieldElement); + t2 = $clone(_tmp$2, fieldElement); + t3 = $clone(_tmp$3, fieldElement); + i = 0; + feSquare(t0, z); + i = 1; + while (true) { + if (!(i < 1)) { break; } + feSquare(t0, t0); + i = i + (1) >> 0; + } + feSquare(t1, t0); + i = 1; + while (true) { + if (!(i < 2)) { break; } + feSquare(t1, t1); + i = i + (1) >> 0; + } + feMul(t1, z, t1); + feMul(t0, t0, t1); + feSquare(t2, t0); + i = 1; + while (true) { + if (!(i < 1)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t1, t1, t2); + feSquare(t2, t1); + i = 1; + while (true) { + if (!(i < 5)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t1, t2, t1); + feSquare(t2, t1); + i = 1; + while (true) { + if (!(i < 10)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t2, t2, t1); + feSquare(t3, t2); + i = 1; + while (true) { + if (!(i < 20)) { break; } + feSquare(t3, t3); + i = i + (1) >> 0; + } + feMul(t2, t3, t2); + feSquare(t2, t2); + i = 1; + while (true) { + if (!(i < 10)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t1, t2, t1); + feSquare(t2, t1); + i = 1; + while (true) { + if (!(i < 50)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t2, t2, t1); + feSquare(t3, t2); + i = 1; + while (true) { + if (!(i < 100)) { break; } + feSquare(t3, t3); + i = i + (1) >> 0; + } + feMul(t2, t3, t2); + feSquare(t2, t2); + i = 1; + while (true) { + if (!(i < 50)) { break; } + feSquare(t2, t2); + i = i + (1) >> 0; + } + feMul(t1, t2, t1); + feSquare(t1, t1); + i = 1; + while (true) { + if (!(i < 5)) { break; } + feSquare(t1, t1); + i = i + (1) >> 0; + } + feMul(out, t1, t0); + }; + scalarMult = function(out, in$1, base) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, b, base, e, in$1, out, pos, swap, tmp0, tmp1, x, x1, x2, x3, y, z2, z3; + e = arrayType$2.zero(); + $copySlice(new sliceType(e), new sliceType(in$1)); + e[0] = ((e[0] & (248)) >>> 0); + e[31] = ((e[31] & (127)) >>> 0); + e[31] = ((e[31] | (64)) >>> 0); + _tmp = arrayType$1.zero(); + _tmp$1 = arrayType$1.zero(); + _tmp$2 = arrayType$1.zero(); + _tmp$3 = arrayType$1.zero(); + _tmp$4 = arrayType$1.zero(); + _tmp$5 = arrayType$1.zero(); + _tmp$6 = arrayType$1.zero(); + x1 = $clone(_tmp, fieldElement); + x2 = $clone(_tmp$1, fieldElement); + z2 = $clone(_tmp$2, fieldElement); + x3 = $clone(_tmp$3, fieldElement); + z3 = $clone(_tmp$4, fieldElement); + tmp0 = $clone(_tmp$5, fieldElement); + tmp1 = $clone(_tmp$6, fieldElement); + feFromBytes(x1, base); + feOne(x2); + feCopy(x3, x1); + feOne(z3); + swap = 0; + pos = 254; + while (true) { + if (!(pos >= 0)) { break; } + b = (y = (((pos & 7) >>> 0)), y < 32 ? ((x = (_q = pos / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x < 0 || x >= e.length) ? ($throwRuntimeError("index out of range"), undefined) : e[x])) >>> y) : 0) << 24 >>> 24; + b = (b & (1)) >>> 0; + swap = (swap ^ (((b >> 0)))) >> 0; + feCSwap(x2, x3, swap); + feCSwap(z2, z3, swap); + swap = ((b >> 0)); + feSub(tmp0, x3, z3); + feSub(tmp1, x2, z2); + feAdd(x2, x2, z2); + feAdd(z2, x3, z3); + feMul(z3, tmp0, x2); + feMul(z2, z2, tmp1); + feSquare(tmp0, tmp1); + feSquare(tmp1, x2); + feAdd(x3, z3, z2); + feSub(z2, z3, z2); + feMul(x2, tmp1, tmp0); + feSub(tmp1, tmp1, tmp0); + feSquare(z2, z2); + feMul121666(z3, tmp1); + feSquare(x3, x3); + feAdd(tmp0, tmp0, z3); + feMul(z3, x1, z2); + feMul(z2, tmp1, tmp0); + pos = pos - (1) >> 0; + } + feCSwap(x2, x3, swap); + feCSwap(z2, z3, swap); + feInvert(z2, z2); + feMul(x2, x2, z2); + feToBytes(out, x2); + }; + ScalarMult = function(dst, in$1, base) { + var base, dst, in$1; + scalarMult(dst, in$1, base); + }; + $pkg.ScalarMult = ScalarMult; + ScalarBaseMult = function(dst, in$1) { + var dst, in$1; + ScalarMult(dst, in$1, basePoint); + }; + $pkg.ScalarBaseMult = ScalarBaseMult; + fieldElement.init($Int32, 10); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + basePoint = $toNativeArray($kindUint8, [9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["crypto/tls"] = (function() { + var $pkg = {}, $init, bytes, list, crypto, aes, cipher, des, ecdsa, elliptic, hmac, md5, rand, rc4, rsa, sha1, sha256, sha512, subtle, x509, asn1, pem, errors, fmt, hash, cpu, io, ioutil, big, net, strconv, strings, sync, atomic, time, chacha20poly1305, curve25519, alert, keyAgreement, cipherSuite, macFunction, aead, fixedNonceAEAD, xorNonceAEAD, ssl30MAC, constantTimeHash, cthWrapper, tls10MAC, recordType, CurveID, ConnectionState, ClientAuthType, ClientSessionState, ClientSessionCache, SignatureScheme, ClientHelloInfo, CertificateRequestInfo, RenegotiationSupport, Config, ticketKey, Certificate, ecdsaSignature, Conn, halfConn, cbcMode, block, RecordHeaderError, clientHandshakeState, clientHelloMsg, serverHelloMsg, certificateMsg, serverKeyExchangeMsg, certificateStatusMsg, serverHelloDoneMsg, clientKeyExchangeMsg, finishedMsg, nextProtoMsg, certificateRequestMsg, certificateVerifyMsg, newSessionTicketMsg, helloRequestMsg, serverHandshakeState, rsaKeyAgreement, ecdheKeyAgreement, finishedHash, sessionState, listener, timeoutError, sliceType, ptrType, sliceType$1, sliceType$2, arrayType, sliceType$3, sliceType$4, ptrType$1, sliceType$5, sliceType$6, sliceType$7, ptrType$2, ptrType$3, sliceType$8, ptrType$4, arrayType$1, arrayType$2, arrayType$3, ptrType$5, ptrType$6, ptrType$10, ptrType$11, arrayType$4, sliceType$9, ptrType$12, ptrType$13, ptrType$14, ptrType$15, sliceType$10, sliceType$11, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, sliceType$12, ptrType$21, ptrType$22, ptrType$23, ptrType$24, ptrType$25, arrayType$5, ptrType$26, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, arrayType$6, arrayType$7, arrayType$8, ptrType$32, ptrType$33, ptrType$34, ptrType$35, funcType, funcType$1, funcType$2, funcType$3, ptrType$36, ptrType$37, ptrType$38, ptrType$39, funcType$4, sliceType$13, funcType$5, mapType, funcType$6, ptrType$40, funcType$7, funcType$8, funcType$9, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, funcType$10, ptrType$47, alertText, cipherSuites, ssl30Pad1, ssl30Pad2, supportedSignatureAlgorithms, defaultCurvePreferences, writerMutex, emptyConfig, emptyConfig$24ptr, once, varDefaultCipherSuites, errClosed, errShutdown, errEarlyCloseWrite, tls11SignatureSchemes, suppVersArray, errClientKeyExchange, errServerKeyExchange, masterSecretLabel, keyExpansionLabel, clientFinishedLabel, serverFinishedLabel, ssl3ClientFinishedMagic, ssl3ServerFinishedMagic, pickSignatureAlgorithm, verifyHandshakeSignature, cipherRC4, cipher3DES, cipherAES, macSHA1, macSHA256, aeadAESGCM, aeadChaCha20Poly1305, newConstantTimeHash, rsaKA, ecdheECDSAKA, ecdheRSAKA, mutualCipherSuite, ticketKeyFromBytes, defaultConfig, defaultCipherSuites, initDefaultCipherSuites, unexpectedMessageError, isSupportedSignatureAlgorithm, signatureFromSignatureScheme, extractPadding, extractPaddingSSL30, roundUp, padToBlockSize, makeClientHello, clientSessionCacheKey, mutualProtocol, hostnameInSNI, sha1Hash, md5SHA1Hash, hashForServerKeyExchange, curveForCurveID, splitPreMasterSecret, pHash, prf10, prf12, prf30, prfAndHashForVersion, prfForVersion, masterFromPreMasterSecret, keysFromMasterSecret, lookupTLSHash, newFinishedHash, finishedSum30, noExportedKeyingMaterial, ekmFromMasterSecret, Server, Client, NewListener, DialWithDialer, Dial, LoadX509KeyPair, X509KeyPair, parsePrivateKey; + bytes = $packages["bytes"]; + list = $packages["container/list"]; + crypto = $packages["crypto"]; + aes = $packages["crypto/aes"]; + cipher = $packages["crypto/cipher"]; + des = $packages["crypto/des"]; + ecdsa = $packages["crypto/ecdsa"]; + elliptic = $packages["crypto/elliptic"]; + hmac = $packages["crypto/hmac"]; + md5 = $packages["crypto/md5"]; + rand = $packages["crypto/rand"]; + rc4 = $packages["crypto/rc4"]; + rsa = $packages["crypto/rsa"]; + sha1 = $packages["crypto/sha1"]; + sha256 = $packages["crypto/sha256"]; + sha512 = $packages["crypto/sha512"]; + subtle = $packages["crypto/subtle"]; + x509 = $packages["crypto/x509"]; + asn1 = $packages["encoding/asn1"]; + pem = $packages["encoding/pem"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + hash = $packages["hash"]; + cpu = $packages["internal/cpu"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + big = $packages["math/big"]; + net = $packages["net"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + time = $packages["time"]; + chacha20poly1305 = $packages["vendor/golang_org/x/crypto/chacha20poly1305"]; + curve25519 = $packages["vendor/golang_org/x/crypto/curve25519"]; + alert = $pkg.alert = $newType(1, $kindUint8, "tls.alert", true, "crypto/tls", false, null); + keyAgreement = $pkg.keyAgreement = $newType(8, $kindInterface, "tls.keyAgreement", true, "crypto/tls", false, null); + cipherSuite = $pkg.cipherSuite = $newType(0, $kindStruct, "tls.cipherSuite", true, "crypto/tls", false, function(id_, keyLen_, macLen_, ivLen_, ka_, flags_, cipher_, mac_, aead_) { + this.$val = this; + if (arguments.length === 0) { + this.id = 0; + this.keyLen = 0; + this.macLen = 0; + this.ivLen = 0; + this.ka = $throwNilPointerError; + this.flags = 0; + this.cipher = $throwNilPointerError; + this.mac = $throwNilPointerError; + this.aead = $throwNilPointerError; + return; + } + this.id = id_; + this.keyLen = keyLen_; + this.macLen = macLen_; + this.ivLen = ivLen_; + this.ka = ka_; + this.flags = flags_; + this.cipher = cipher_; + this.mac = mac_; + this.aead = aead_; + }); + macFunction = $pkg.macFunction = $newType(8, $kindInterface, "tls.macFunction", true, "crypto/tls", false, null); + aead = $pkg.aead = $newType(8, $kindInterface, "tls.aead", true, "crypto/tls", false, null); + fixedNonceAEAD = $pkg.fixedNonceAEAD = $newType(0, $kindStruct, "tls.fixedNonceAEAD", true, "crypto/tls", false, function(nonce_, aead_) { + this.$val = this; + if (arguments.length === 0) { + this.nonce = arrayType$1.zero(); + this.aead = $ifaceNil; + return; + } + this.nonce = nonce_; + this.aead = aead_; + }); + xorNonceAEAD = $pkg.xorNonceAEAD = $newType(0, $kindStruct, "tls.xorNonceAEAD", true, "crypto/tls", false, function(nonceMask_, aead_) { + this.$val = this; + if (arguments.length === 0) { + this.nonceMask = arrayType$1.zero(); + this.aead = $ifaceNil; + return; + } + this.nonceMask = nonceMask_; + this.aead = aead_; + }); + ssl30MAC = $pkg.ssl30MAC = $newType(0, $kindStruct, "tls.ssl30MAC", true, "crypto/tls", false, function(h_, key_) { + this.$val = this; + if (arguments.length === 0) { + this.h = $ifaceNil; + this.key = sliceType$7.nil; + return; + } + this.h = h_; + this.key = key_; + }); + constantTimeHash = $pkg.constantTimeHash = $newType(8, $kindInterface, "tls.constantTimeHash", true, "crypto/tls", false, null); + cthWrapper = $pkg.cthWrapper = $newType(0, $kindStruct, "tls.cthWrapper", true, "crypto/tls", false, function(h_) { + this.$val = this; + if (arguments.length === 0) { + this.h = $ifaceNil; + return; + } + this.h = h_; + }); + tls10MAC = $pkg.tls10MAC = $newType(0, $kindStruct, "tls.tls10MAC", true, "crypto/tls", false, function(h_) { + this.$val = this; + if (arguments.length === 0) { + this.h = $ifaceNil; + return; + } + this.h = h_; + }); + recordType = $pkg.recordType = $newType(1, $kindUint8, "tls.recordType", true, "crypto/tls", false, null); + CurveID = $pkg.CurveID = $newType(2, $kindUint16, "tls.CurveID", true, "crypto/tls", true, null); + ConnectionState = $pkg.ConnectionState = $newType(0, $kindStruct, "tls.ConnectionState", true, "crypto/tls", true, function(Version_, HandshakeComplete_, DidResume_, CipherSuite_, NegotiatedProtocol_, NegotiatedProtocolIsMutual_, ServerName_, PeerCertificates_, VerifiedChains_, SignedCertificateTimestamps_, OCSPResponse_, ekm_, TLSUnique_) { + this.$val = this; + if (arguments.length === 0) { + this.Version = 0; + this.HandshakeComplete = false; + this.DidResume = false; + this.CipherSuite = 0; + this.NegotiatedProtocol = ""; + this.NegotiatedProtocolIsMutual = false; + this.ServerName = ""; + this.PeerCertificates = sliceType$10.nil; + this.VerifiedChains = sliceType$11.nil; + this.SignedCertificateTimestamps = sliceType$9.nil; + this.OCSPResponse = sliceType$7.nil; + this.ekm = $throwNilPointerError; + this.TLSUnique = sliceType$7.nil; + return; + } + this.Version = Version_; + this.HandshakeComplete = HandshakeComplete_; + this.DidResume = DidResume_; + this.CipherSuite = CipherSuite_; + this.NegotiatedProtocol = NegotiatedProtocol_; + this.NegotiatedProtocolIsMutual = NegotiatedProtocolIsMutual_; + this.ServerName = ServerName_; + this.PeerCertificates = PeerCertificates_; + this.VerifiedChains = VerifiedChains_; + this.SignedCertificateTimestamps = SignedCertificateTimestamps_; + this.OCSPResponse = OCSPResponse_; + this.ekm = ekm_; + this.TLSUnique = TLSUnique_; + }); + ClientAuthType = $pkg.ClientAuthType = $newType(4, $kindInt, "tls.ClientAuthType", true, "crypto/tls", true, null); + ClientSessionState = $pkg.ClientSessionState = $newType(0, $kindStruct, "tls.ClientSessionState", true, "crypto/tls", true, function(sessionTicket_, vers_, cipherSuite_, masterSecret_, serverCertificates_, verifiedChains_) { + this.$val = this; + if (arguments.length === 0) { + this.sessionTicket = sliceType$7.nil; + this.vers = 0; + this.cipherSuite = 0; + this.masterSecret = sliceType$7.nil; + this.serverCertificates = sliceType$10.nil; + this.verifiedChains = sliceType$11.nil; + return; + } + this.sessionTicket = sessionTicket_; + this.vers = vers_; + this.cipherSuite = cipherSuite_; + this.masterSecret = masterSecret_; + this.serverCertificates = serverCertificates_; + this.verifiedChains = verifiedChains_; + }); + ClientSessionCache = $pkg.ClientSessionCache = $newType(8, $kindInterface, "tls.ClientSessionCache", true, "crypto/tls", true, null); + SignatureScheme = $pkg.SignatureScheme = $newType(2, $kindUint16, "tls.SignatureScheme", true, "crypto/tls", true, null); + ClientHelloInfo = $pkg.ClientHelloInfo = $newType(0, $kindStruct, "tls.ClientHelloInfo", true, "crypto/tls", true, function(CipherSuites_, ServerName_, SupportedCurves_, SupportedPoints_, SignatureSchemes_, SupportedProtos_, SupportedVersions_, Conn_) { + this.$val = this; + if (arguments.length === 0) { + this.CipherSuites = sliceType$2.nil; + this.ServerName = ""; + this.SupportedCurves = sliceType$3.nil; + this.SupportedPoints = sliceType$7.nil; + this.SignatureSchemes = sliceType$6.nil; + this.SupportedProtos = sliceType$1.nil; + this.SupportedVersions = sliceType$2.nil; + this.Conn = $ifaceNil; + return; + } + this.CipherSuites = CipherSuites_; + this.ServerName = ServerName_; + this.SupportedCurves = SupportedCurves_; + this.SupportedPoints = SupportedPoints_; + this.SignatureSchemes = SignatureSchemes_; + this.SupportedProtos = SupportedProtos_; + this.SupportedVersions = SupportedVersions_; + this.Conn = Conn_; + }); + CertificateRequestInfo = $pkg.CertificateRequestInfo = $newType(0, $kindStruct, "tls.CertificateRequestInfo", true, "crypto/tls", true, function(AcceptableCAs_, SignatureSchemes_) { + this.$val = this; + if (arguments.length === 0) { + this.AcceptableCAs = sliceType$9.nil; + this.SignatureSchemes = sliceType$6.nil; + return; + } + this.AcceptableCAs = AcceptableCAs_; + this.SignatureSchemes = SignatureSchemes_; + }); + RenegotiationSupport = $pkg.RenegotiationSupport = $newType(4, $kindInt, "tls.RenegotiationSupport", true, "crypto/tls", true, null); + Config = $pkg.Config = $newType(0, $kindStruct, "tls.Config", true, "crypto/tls", true, function(Rand_, Time_, Certificates_, NameToCertificate_, GetCertificate_, GetClientCertificate_, GetConfigForClient_, VerifyPeerCertificate_, RootCAs_, NextProtos_, ServerName_, ClientAuth_, ClientCAs_, InsecureSkipVerify_, CipherSuites_, PreferServerCipherSuites_, SessionTicketsDisabled_, SessionTicketKey_, ClientSessionCache_, MinVersion_, MaxVersion_, CurvePreferences_, DynamicRecordSizingDisabled_, Renegotiation_, KeyLogWriter_, serverInitOnce_, mutex_, sessionTicketKeys_) { + this.$val = this; + if (arguments.length === 0) { + this.Rand = $ifaceNil; + this.Time = $throwNilPointerError; + this.Certificates = sliceType.nil; + this.NameToCertificate = false; + this.GetCertificate = $throwNilPointerError; + this.GetClientCertificate = $throwNilPointerError; + this.GetConfigForClient = $throwNilPointerError; + this.VerifyPeerCertificate = $throwNilPointerError; + this.RootCAs = ptrType.nil; + this.NextProtos = sliceType$1.nil; + this.ServerName = ""; + this.ClientAuth = 0; + this.ClientCAs = ptrType.nil; + this.InsecureSkipVerify = false; + this.CipherSuites = sliceType$2.nil; + this.PreferServerCipherSuites = false; + this.SessionTicketsDisabled = false; + this.SessionTicketKey = arrayType.zero(); + this.ClientSessionCache = $ifaceNil; + this.MinVersion = 0; + this.MaxVersion = 0; + this.CurvePreferences = sliceType$3.nil; + this.DynamicRecordSizingDisabled = false; + this.Renegotiation = 0; + this.KeyLogWriter = $ifaceNil; + this.serverInitOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.mutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); + this.sessionTicketKeys = sliceType$4.nil; + return; + } + this.Rand = Rand_; + this.Time = Time_; + this.Certificates = Certificates_; + this.NameToCertificate = NameToCertificate_; + this.GetCertificate = GetCertificate_; + this.GetClientCertificate = GetClientCertificate_; + this.GetConfigForClient = GetConfigForClient_; + this.VerifyPeerCertificate = VerifyPeerCertificate_; + this.RootCAs = RootCAs_; + this.NextProtos = NextProtos_; + this.ServerName = ServerName_; + this.ClientAuth = ClientAuth_; + this.ClientCAs = ClientCAs_; + this.InsecureSkipVerify = InsecureSkipVerify_; + this.CipherSuites = CipherSuites_; + this.PreferServerCipherSuites = PreferServerCipherSuites_; + this.SessionTicketsDisabled = SessionTicketsDisabled_; + this.SessionTicketKey = SessionTicketKey_; + this.ClientSessionCache = ClientSessionCache_; + this.MinVersion = MinVersion_; + this.MaxVersion = MaxVersion_; + this.CurvePreferences = CurvePreferences_; + this.DynamicRecordSizingDisabled = DynamicRecordSizingDisabled_; + this.Renegotiation = Renegotiation_; + this.KeyLogWriter = KeyLogWriter_; + this.serverInitOnce = serverInitOnce_; + this.mutex = mutex_; + this.sessionTicketKeys = sessionTicketKeys_; + }); + ticketKey = $pkg.ticketKey = $newType(0, $kindStruct, "tls.ticketKey", true, "crypto/tls", false, function(keyName_, aesKey_, hmacKey_) { + this.$val = this; + if (arguments.length === 0) { + this.keyName = arrayType$2.zero(); + this.aesKey = arrayType$2.zero(); + this.hmacKey = arrayType$2.zero(); + return; + } + this.keyName = keyName_; + this.aesKey = aesKey_; + this.hmacKey = hmacKey_; + }); + Certificate = $pkg.Certificate = $newType(0, $kindStruct, "tls.Certificate", true, "crypto/tls", true, function(Certificate_, PrivateKey_, OCSPStaple_, SignedCertificateTimestamps_, Leaf_) { + this.$val = this; + if (arguments.length === 0) { + this.Certificate = sliceType$9.nil; + this.PrivateKey = $ifaceNil; + this.OCSPStaple = sliceType$7.nil; + this.SignedCertificateTimestamps = sliceType$9.nil; + this.Leaf = ptrType$15.nil; + return; + } + this.Certificate = Certificate_; + this.PrivateKey = PrivateKey_; + this.OCSPStaple = OCSPStaple_; + this.SignedCertificateTimestamps = SignedCertificateTimestamps_; + this.Leaf = Leaf_; + }); + ecdsaSignature = $pkg.ecdsaSignature = $newType(0, $kindStruct, "tls.ecdsaSignature", true, "crypto/tls", false, function(R_, S_) { + this.$val = this; + if (arguments.length === 0) { + this.R = ptrType$4.nil; + this.S = ptrType$4.nil; + return; + } + this.R = R_; + this.S = S_; + }); + Conn = $pkg.Conn = $newType(0, $kindStruct, "tls.Conn", true, "crypto/tls", true, function(conn_, isClient_, handshakeStatus_, handshakeMutex_, handshakeErr_, vers_, haveVers_, config_, handshakes_, didResume_, cipherSuite_, ocspResponse_, scts_, peerCertificates_, verifiedChains_, serverName_, secureRenegotiation_, ekm_, clientFinishedIsFirst_, closeNotifyErr_, closeNotifySent_, clientFinished_, serverFinished_, clientProtocol_, clientProtocolFallback_, in$25_, out_, rawInput_, input_, hand_, buffering_, sendBuf_, bytesSent_, packetsSent_, warnCount_, activeCall_, tmp_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = $ifaceNil; + this.isClient = false; + this.handshakeStatus = 0; + this.handshakeMutex = new sync.Mutex.ptr(0, 0); + this.handshakeErr = $ifaceNil; + this.vers = 0; + this.haveVers = false; + this.config = ptrType$5.nil; + this.handshakes = 0; + this.didResume = false; + this.cipherSuite = 0; + this.ocspResponse = sliceType$7.nil; + this.scts = sliceType$9.nil; + this.peerCertificates = sliceType$10.nil; + this.verifiedChains = sliceType$11.nil; + this.serverName = ""; + this.secureRenegotiation = false; + this.ekm = $throwNilPointerError; + this.clientFinishedIsFirst = false; + this.closeNotifyErr = $ifaceNil; + this.closeNotifySent = false; + this.clientFinished = arrayType$1.zero(); + this.serverFinished = arrayType$1.zero(); + this.clientProtocol = ""; + this.clientProtocolFallback = false; + this.in$25 = new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil); + this.out = new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil); + this.rawInput = ptrType$11.nil; + this.input = ptrType$11.nil; + this.hand = new bytes.Buffer.ptr(sliceType$7.nil, 0, arrayType$3.zero(), 0); + this.buffering = false; + this.sendBuf = sliceType$7.nil; + this.bytesSent = new $Int64(0, 0); + this.packetsSent = new $Int64(0, 0); + this.warnCount = 0; + this.activeCall = 0; + this.tmp = arrayType$2.zero(); + return; + } + this.conn = conn_; + this.isClient = isClient_; + this.handshakeStatus = handshakeStatus_; + this.handshakeMutex = handshakeMutex_; + this.handshakeErr = handshakeErr_; + this.vers = vers_; + this.haveVers = haveVers_; + this.config = config_; + this.handshakes = handshakes_; + this.didResume = didResume_; + this.cipherSuite = cipherSuite_; + this.ocspResponse = ocspResponse_; + this.scts = scts_; + this.peerCertificates = peerCertificates_; + this.verifiedChains = verifiedChains_; + this.serverName = serverName_; + this.secureRenegotiation = secureRenegotiation_; + this.ekm = ekm_; + this.clientFinishedIsFirst = clientFinishedIsFirst_; + this.closeNotifyErr = closeNotifyErr_; + this.closeNotifySent = closeNotifySent_; + this.clientFinished = clientFinished_; + this.serverFinished = serverFinished_; + this.clientProtocol = clientProtocol_; + this.clientProtocolFallback = clientProtocolFallback_; + this.in$25 = in$25_; + this.out = out_; + this.rawInput = rawInput_; + this.input = input_; + this.hand = hand_; + this.buffering = buffering_; + this.sendBuf = sendBuf_; + this.bytesSent = bytesSent_; + this.packetsSent = packetsSent_; + this.warnCount = warnCount_; + this.activeCall = activeCall_; + this.tmp = tmp_; + }); + halfConn = $pkg.halfConn = $newType(0, $kindStruct, "tls.halfConn", true, "crypto/tls", false, function(Mutex_, err_, version_, cipher_, mac_, seq_, bfree_, additionalData_, nextCipher_, nextMac_, inDigestBuf_, outDigestBuf_) { + this.$val = this; + if (arguments.length === 0) { + this.Mutex = new sync.Mutex.ptr(0, 0); + this.err = $ifaceNil; + this.version = 0; + this.cipher = $ifaceNil; + this.mac = $ifaceNil; + this.seq = arrayType$7.zero(); + this.bfree = ptrType$11.nil; + this.additionalData = arrayType$8.zero(); + this.nextCipher = $ifaceNil; + this.nextMac = $ifaceNil; + this.inDigestBuf = sliceType$7.nil; + this.outDigestBuf = sliceType$7.nil; + return; + } + this.Mutex = Mutex_; + this.err = err_; + this.version = version_; + this.cipher = cipher_; + this.mac = mac_; + this.seq = seq_; + this.bfree = bfree_; + this.additionalData = additionalData_; + this.nextCipher = nextCipher_; + this.nextMac = nextMac_; + this.inDigestBuf = inDigestBuf_; + this.outDigestBuf = outDigestBuf_; + }); + cbcMode = $pkg.cbcMode = $newType(8, $kindInterface, "tls.cbcMode", true, "crypto/tls", false, null); + block = $pkg.block = $newType(0, $kindStruct, "tls.block", true, "crypto/tls", false, function(data_, off_, link_) { + this.$val = this; + if (arguments.length === 0) { + this.data = sliceType$7.nil; + this.off = 0; + this.link = ptrType$11.nil; + return; + } + this.data = data_; + this.off = off_; + this.link = link_; + }); + RecordHeaderError = $pkg.RecordHeaderError = $newType(0, $kindStruct, "tls.RecordHeaderError", true, "crypto/tls", true, function(Msg_, RecordHeader_) { + this.$val = this; + if (arguments.length === 0) { + this.Msg = ""; + this.RecordHeader = arrayType$4.zero(); + return; + } + this.Msg = Msg_; + this.RecordHeader = RecordHeader_; + }); + clientHandshakeState = $pkg.clientHandshakeState = $newType(0, $kindStruct, "tls.clientHandshakeState", true, "crypto/tls", false, function(c_, serverHello_, hello_, suite_, finishedHash_, masterSecret_, session_) { + this.$val = this; + if (arguments.length === 0) { + this.c = ptrType$17.nil; + this.serverHello = ptrType$18.nil; + this.hello = ptrType$16.nil; + this.suite = ptrType$1.nil; + this.finishedHash = new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$7.nil, 0, $throwNilPointerError); + this.masterSecret = sliceType$7.nil; + this.session = ptrType$10.nil; + return; + } + this.c = c_; + this.serverHello = serverHello_; + this.hello = hello_; + this.suite = suite_; + this.finishedHash = finishedHash_; + this.masterSecret = masterSecret_; + this.session = session_; + }); + clientHelloMsg = $pkg.clientHelloMsg = $newType(0, $kindStruct, "tls.clientHelloMsg", true, "crypto/tls", false, function(raw_, vers_, random_, sessionId_, cipherSuites_, compressionMethods_, nextProtoNeg_, serverName_, ocspStapling_, scts_, supportedCurves_, supportedPoints_, ticketSupported_, sessionTicket_, supportedSignatureAlgorithms_, secureRenegotiation_, secureRenegotiationSupported_, alpnProtocols_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.vers = 0; + this.random = sliceType$7.nil; + this.sessionId = sliceType$7.nil; + this.cipherSuites = sliceType$2.nil; + this.compressionMethods = sliceType$7.nil; + this.nextProtoNeg = false; + this.serverName = ""; + this.ocspStapling = false; + this.scts = false; + this.supportedCurves = sliceType$3.nil; + this.supportedPoints = sliceType$7.nil; + this.ticketSupported = false; + this.sessionTicket = sliceType$7.nil; + this.supportedSignatureAlgorithms = sliceType$6.nil; + this.secureRenegotiation = sliceType$7.nil; + this.secureRenegotiationSupported = false; + this.alpnProtocols = sliceType$1.nil; + return; + } + this.raw = raw_; + this.vers = vers_; + this.random = random_; + this.sessionId = sessionId_; + this.cipherSuites = cipherSuites_; + this.compressionMethods = compressionMethods_; + this.nextProtoNeg = nextProtoNeg_; + this.serverName = serverName_; + this.ocspStapling = ocspStapling_; + this.scts = scts_; + this.supportedCurves = supportedCurves_; + this.supportedPoints = supportedPoints_; + this.ticketSupported = ticketSupported_; + this.sessionTicket = sessionTicket_; + this.supportedSignatureAlgorithms = supportedSignatureAlgorithms_; + this.secureRenegotiation = secureRenegotiation_; + this.secureRenegotiationSupported = secureRenegotiationSupported_; + this.alpnProtocols = alpnProtocols_; + }); + serverHelloMsg = $pkg.serverHelloMsg = $newType(0, $kindStruct, "tls.serverHelloMsg", true, "crypto/tls", false, function(raw_, vers_, random_, sessionId_, cipherSuite_, compressionMethod_, nextProtoNeg_, nextProtos_, ocspStapling_, scts_, ticketSupported_, secureRenegotiation_, secureRenegotiationSupported_, alpnProtocol_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.vers = 0; + this.random = sliceType$7.nil; + this.sessionId = sliceType$7.nil; + this.cipherSuite = 0; + this.compressionMethod = 0; + this.nextProtoNeg = false; + this.nextProtos = sliceType$1.nil; + this.ocspStapling = false; + this.scts = sliceType$9.nil; + this.ticketSupported = false; + this.secureRenegotiation = sliceType$7.nil; + this.secureRenegotiationSupported = false; + this.alpnProtocol = ""; + return; + } + this.raw = raw_; + this.vers = vers_; + this.random = random_; + this.sessionId = sessionId_; + this.cipherSuite = cipherSuite_; + this.compressionMethod = compressionMethod_; + this.nextProtoNeg = nextProtoNeg_; + this.nextProtos = nextProtos_; + this.ocspStapling = ocspStapling_; + this.scts = scts_; + this.ticketSupported = ticketSupported_; + this.secureRenegotiation = secureRenegotiation_; + this.secureRenegotiationSupported = secureRenegotiationSupported_; + this.alpnProtocol = alpnProtocol_; + }); + certificateMsg = $pkg.certificateMsg = $newType(0, $kindStruct, "tls.certificateMsg", true, "crypto/tls", false, function(raw_, certificates_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.certificates = sliceType$9.nil; + return; + } + this.raw = raw_; + this.certificates = certificates_; + }); + serverKeyExchangeMsg = $pkg.serverKeyExchangeMsg = $newType(0, $kindStruct, "tls.serverKeyExchangeMsg", true, "crypto/tls", false, function(raw_, key_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.key = sliceType$7.nil; + return; + } + this.raw = raw_; + this.key = key_; + }); + certificateStatusMsg = $pkg.certificateStatusMsg = $newType(0, $kindStruct, "tls.certificateStatusMsg", true, "crypto/tls", false, function(raw_, statusType_, response_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.statusType = 0; + this.response = sliceType$7.nil; + return; + } + this.raw = raw_; + this.statusType = statusType_; + this.response = response_; + }); + serverHelloDoneMsg = $pkg.serverHelloDoneMsg = $newType(0, $kindStruct, "tls.serverHelloDoneMsg", true, "crypto/tls", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + clientKeyExchangeMsg = $pkg.clientKeyExchangeMsg = $newType(0, $kindStruct, "tls.clientKeyExchangeMsg", true, "crypto/tls", false, function(raw_, ciphertext_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.ciphertext = sliceType$7.nil; + return; + } + this.raw = raw_; + this.ciphertext = ciphertext_; + }); + finishedMsg = $pkg.finishedMsg = $newType(0, $kindStruct, "tls.finishedMsg", true, "crypto/tls", false, function(raw_, verifyData_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.verifyData = sliceType$7.nil; + return; + } + this.raw = raw_; + this.verifyData = verifyData_; + }); + nextProtoMsg = $pkg.nextProtoMsg = $newType(0, $kindStruct, "tls.nextProtoMsg", true, "crypto/tls", false, function(raw_, proto_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.proto = ""; + return; + } + this.raw = raw_; + this.proto = proto_; + }); + certificateRequestMsg = $pkg.certificateRequestMsg = $newType(0, $kindStruct, "tls.certificateRequestMsg", true, "crypto/tls", false, function(raw_, hasSignatureAndHash_, certificateTypes_, supportedSignatureAlgorithms_, certificateAuthorities_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.hasSignatureAndHash = false; + this.certificateTypes = sliceType$7.nil; + this.supportedSignatureAlgorithms = sliceType$6.nil; + this.certificateAuthorities = sliceType$9.nil; + return; + } + this.raw = raw_; + this.hasSignatureAndHash = hasSignatureAndHash_; + this.certificateTypes = certificateTypes_; + this.supportedSignatureAlgorithms = supportedSignatureAlgorithms_; + this.certificateAuthorities = certificateAuthorities_; + }); + certificateVerifyMsg = $pkg.certificateVerifyMsg = $newType(0, $kindStruct, "tls.certificateVerifyMsg", true, "crypto/tls", false, function(raw_, hasSignatureAndHash_, signatureAlgorithm_, signature_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.hasSignatureAndHash = false; + this.signatureAlgorithm = 0; + this.signature = sliceType$7.nil; + return; + } + this.raw = raw_; + this.hasSignatureAndHash = hasSignatureAndHash_; + this.signatureAlgorithm = signatureAlgorithm_; + this.signature = signature_; + }); + newSessionTicketMsg = $pkg.newSessionTicketMsg = $newType(0, $kindStruct, "tls.newSessionTicketMsg", true, "crypto/tls", false, function(raw_, ticket_) { + this.$val = this; + if (arguments.length === 0) { + this.raw = sliceType$7.nil; + this.ticket = sliceType$7.nil; + return; + } + this.raw = raw_; + this.ticket = ticket_; + }); + helloRequestMsg = $pkg.helloRequestMsg = $newType(0, $kindStruct, "tls.helloRequestMsg", true, "crypto/tls", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + serverHandshakeState = $pkg.serverHandshakeState = $newType(0, $kindStruct, "tls.serverHandshakeState", true, "crypto/tls", false, function(c_, clientHello_, hello_, suite_, ellipticOk_, ecdsaOk_, rsaDecryptOk_, rsaSignOk_, sessionState_, finishedHash_, masterSecret_, certsFromClient_, cert_, cachedClientHelloInfo_) { + this.$val = this; + if (arguments.length === 0) { + this.c = ptrType$17.nil; + this.clientHello = ptrType$16.nil; + this.hello = ptrType$18.nil; + this.suite = ptrType$1.nil; + this.ellipticOk = false; + this.ecdsaOk = false; + this.rsaDecryptOk = false; + this.rsaSignOk = false; + this.sessionState = ptrType$30.nil; + this.finishedHash = new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$7.nil, 0, $throwNilPointerError); + this.masterSecret = sliceType$7.nil; + this.certsFromClient = sliceType$9.nil; + this.cert = ptrType$6.nil; + this.cachedClientHelloInfo = ptrType$31.nil; + return; + } + this.c = c_; + this.clientHello = clientHello_; + this.hello = hello_; + this.suite = suite_; + this.ellipticOk = ellipticOk_; + this.ecdsaOk = ecdsaOk_; + this.rsaDecryptOk = rsaDecryptOk_; + this.rsaSignOk = rsaSignOk_; + this.sessionState = sessionState_; + this.finishedHash = finishedHash_; + this.masterSecret = masterSecret_; + this.certsFromClient = certsFromClient_; + this.cert = cert_; + this.cachedClientHelloInfo = cachedClientHelloInfo_; + }); + rsaKeyAgreement = $pkg.rsaKeyAgreement = $newType(0, $kindStruct, "tls.rsaKeyAgreement", true, "crypto/tls", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + ecdheKeyAgreement = $pkg.ecdheKeyAgreement = $newType(0, $kindStruct, "tls.ecdheKeyAgreement", true, "crypto/tls", false, function(version_, isRSA_, privateKey_, curveid_, publicKey_, x_, y_) { + this.$val = this; + if (arguments.length === 0) { + this.version = 0; + this.isRSA = false; + this.privateKey = sliceType$7.nil; + this.curveid = 0; + this.publicKey = sliceType$7.nil; + this.x = ptrType$4.nil; + this.y = ptrType$4.nil; + return; + } + this.version = version_; + this.isRSA = isRSA_; + this.privateKey = privateKey_; + this.curveid = curveid_; + this.publicKey = publicKey_; + this.x = x_; + this.y = y_; + }); + finishedHash = $pkg.finishedHash = $newType(0, $kindStruct, "tls.finishedHash", true, "crypto/tls", false, function(client_, server_, clientMD5_, serverMD5_, buffer_, version_, prf_) { + this.$val = this; + if (arguments.length === 0) { + this.client = $ifaceNil; + this.server = $ifaceNil; + this.clientMD5 = $ifaceNil; + this.serverMD5 = $ifaceNil; + this.buffer = sliceType$7.nil; + this.version = 0; + this.prf = $throwNilPointerError; + return; + } + this.client = client_; + this.server = server_; + this.clientMD5 = clientMD5_; + this.serverMD5 = serverMD5_; + this.buffer = buffer_; + this.version = version_; + this.prf = prf_; + }); + sessionState = $pkg.sessionState = $newType(0, $kindStruct, "tls.sessionState", true, "crypto/tls", false, function(vers_, cipherSuite_, masterSecret_, certificates_, usedOldKey_) { + this.$val = this; + if (arguments.length === 0) { + this.vers = 0; + this.cipherSuite = 0; + this.masterSecret = sliceType$7.nil; + this.certificates = sliceType$9.nil; + this.usedOldKey = false; + return; + } + this.vers = vers_; + this.cipherSuite = cipherSuite_; + this.masterSecret = masterSecret_; + this.certificates = certificates_; + this.usedOldKey = usedOldKey_; + }); + listener = $pkg.listener = $newType(0, $kindStruct, "tls.listener", true, "crypto/tls", false, function(Listener_, config_) { + this.$val = this; + if (arguments.length === 0) { + this.Listener = $ifaceNil; + this.config = ptrType$5.nil; + return; + } + this.Listener = Listener_; + this.config = config_; + }); + timeoutError = $pkg.timeoutError = $newType(0, $kindStruct, "tls.timeoutError", true, "crypto/tls", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + sliceType = $sliceType(Certificate); + ptrType = $ptrType(x509.CertPool); + sliceType$1 = $sliceType($String); + sliceType$2 = $sliceType($Uint16); + arrayType = $arrayType($Uint8, 32); + sliceType$3 = $sliceType(CurveID); + sliceType$4 = $sliceType(ticketKey); + ptrType$1 = $ptrType(cipherSuite); + sliceType$5 = $sliceType(ptrType$1); + sliceType$6 = $sliceType(SignatureScheme); + sliceType$7 = $sliceType($Uint8); + ptrType$2 = $ptrType(rsa.PublicKey); + ptrType$3 = $ptrType(ecdsa.PublicKey); + sliceType$8 = $sliceType($emptyInterface); + ptrType$4 = $ptrType(big.Int); + arrayType$1 = $arrayType($Uint8, 12); + arrayType$2 = $arrayType($Uint8, 16); + arrayType$3 = $arrayType($Uint8, 64); + ptrType$5 = $ptrType(Config); + ptrType$6 = $ptrType(Certificate); + ptrType$10 = $ptrType(ClientSessionState); + ptrType$11 = $ptrType(block); + arrayType$4 = $arrayType($Uint8, 5); + sliceType$9 = $sliceType(sliceType$7); + ptrType$12 = $ptrType($Int32); + ptrType$13 = $ptrType(helloRequestMsg); + ptrType$14 = $ptrType($Uint32); + ptrType$15 = $ptrType(x509.Certificate); + sliceType$10 = $sliceType(ptrType$15); + sliceType$11 = $sliceType(sliceType$10); + ptrType$16 = $ptrType(clientHelloMsg); + ptrType$17 = $ptrType(Conn); + ptrType$18 = $ptrType(serverHelloMsg); + ptrType$19 = $ptrType(certificateMsg); + ptrType$20 = $ptrType(time.Location); + sliceType$12 = $sliceType(x509.ExtKeyUsage); + ptrType$21 = $ptrType(certificateStatusMsg); + ptrType$22 = $ptrType(serverKeyExchangeMsg); + ptrType$23 = $ptrType(certificateRequestMsg); + ptrType$24 = $ptrType(serverHelloDoneMsg); + ptrType$25 = $ptrType(clientKeyExchangeMsg); + arrayType$5 = $arrayType($Uint8, 24); + ptrType$26 = $ptrType(finishedMsg); + ptrType$27 = $ptrType(newSessionTicketMsg); + ptrType$28 = $ptrType(nextProtoMsg); + ptrType$29 = $ptrType(certificateVerifyMsg); + ptrType$30 = $ptrType(sessionState); + ptrType$31 = $ptrType(ClientHelloInfo); + arrayType$6 = $arrayType($Uint8, 11); + arrayType$7 = $arrayType($Uint8, 8); + arrayType$8 = $arrayType($Uint8, 13); + ptrType$32 = $ptrType(net.Resolver); + ptrType$33 = $ptrType(pem.Block); + ptrType$34 = $ptrType(rsa.PrivateKey); + ptrType$35 = $ptrType(ecdsa.PrivateKey); + funcType = $funcType([$Uint16], [keyAgreement], false); + funcType$1 = $funcType([sliceType$7, sliceType$7, $Bool], [$emptyInterface], false); + funcType$2 = $funcType([$Uint16, sliceType$7], [macFunction], false); + funcType$3 = $funcType([sliceType$7, sliceType$7], [cipher.AEAD], false); + ptrType$36 = $ptrType(fixedNonceAEAD); + ptrType$37 = $ptrType(xorNonceAEAD); + ptrType$38 = $ptrType(cthWrapper); + ptrType$39 = $ptrType(ConnectionState); + funcType$4 = $funcType([$String, sliceType$7, $Int], [sliceType$7, $error], false); + sliceType$13 = $sliceType(arrayType); + funcType$5 = $funcType([], [time.Time], false); + mapType = $mapType($String, ptrType$6); + funcType$6 = $funcType([ptrType$31], [ptrType$6, $error], false); + ptrType$40 = $ptrType(CertificateRequestInfo); + funcType$7 = $funcType([ptrType$40], [ptrType$6, $error], false); + funcType$8 = $funcType([ptrType$31], [ptrType$5, $error], false); + funcType$9 = $funcType([sliceType$9, sliceType$11], [$error], false); + ptrType$42 = $ptrType(halfConn); + ptrType$43 = $ptrType(clientHandshakeState); + ptrType$44 = $ptrType(serverHandshakeState); + ptrType$45 = $ptrType(ecdheKeyAgreement); + ptrType$46 = $ptrType(finishedHash); + funcType$10 = $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [], false); + ptrType$47 = $ptrType(listener); + alert.prototype.String = function() { + var _entry, _tuple, e, ok, s; + e = this.$val; + _tuple = (_entry = alertText[alert.keyFor(e)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return "tls: " + s; + } + return "tls: alert(" + strconv.Itoa(((e >> 0))) + ")"; + }; + $ptrType(alert).prototype.String = function() { return new alert(this.$get()).String(); }; + alert.prototype.Error = function() { + var e; + e = this.$val; + return new alert(e).String(); + }; + $ptrType(alert).prototype.Error = function() { return new alert(this.$get()).Error(); }; + pickSignatureAlgorithm = function(pubkey, peerSigAlgs, ourSigAlgs, tlsVersion) { + var _i, _r, _r$1, _r$2, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, err$1, hashAlg, hashFunc, ourSigAlgs, peerSigAlgs, pubkey, sigAlg, sigAlg$1, sigType, sigType$1, tlsVersion, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$3 = $f._tmp$3; _tmp$30 = $f._tmp$30; _tmp$31 = $f._tmp$31; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; hashAlg = $f.hashAlg; hashFunc = $f.hashFunc; ourSigAlgs = $f.ourSigAlgs; peerSigAlgs = $f.peerSigAlgs; pubkey = $f.pubkey; sigAlg = $f.sigAlg; sigAlg$1 = $f.sigAlg$1; sigType = $f.sigType; sigType$1 = $f.sigType$1; tlsVersion = $f.tlsVersion; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sigAlg = 0; + sigType = 0; + hashFunc = 0; + err = $ifaceNil; + /* */ if (tlsVersion < 771 || (peerSigAlgs.$length === 0)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (tlsVersion < 771 || (peerSigAlgs.$length === 0)) { */ case 1: + _ref = pubkey; + /* */ if ($assertType(_ref, ptrType$2, true)[1]) { $s = 3; continue; } + /* */ if ($assertType(_ref, ptrType$3, true)[1]) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($assertType(_ref, ptrType$2, true)[1]) { */ case 3: + if (tlsVersion < 771) { + _tmp = 0; + _tmp$1 = 16; + _tmp$2 = 8; + _tmp$3 = $ifaceNil; + sigAlg = _tmp; + sigType = _tmp$1; + hashFunc = _tmp$2; + err = _tmp$3; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + } else { + _tmp$4 = 513; + _tmp$5 = 16; + _tmp$6 = 3; + _tmp$7 = $ifaceNil; + sigAlg = _tmp$4; + sigType = _tmp$5; + hashFunc = _tmp$6; + err = _tmp$7; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + } + $s = 6; continue; + /* } else if ($assertType(_ref, ptrType$3, true)[1]) { */ case 4: + _tmp$8 = 515; + _tmp$9 = 17; + _tmp$10 = 3; + _tmp$11 = $ifaceNil; + sigAlg = _tmp$8; + sigType = _tmp$9; + hashFunc = _tmp$10; + err = _tmp$11; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + /* } else { */ case 5: + _tmp$12 = 0; + _tmp$13 = 0; + _tmp$14 = 0; + _r = fmt.Errorf("tls: unsupported public key: %T", new sliceType$8([pubkey])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tmp$15 = _r; + sigAlg = _tmp$12; + sigType = _tmp$13; + hashFunc = _tmp$14; + err = _tmp$15; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + /* } */ case 6: + /* } */ case 2: + _ref$1 = peerSigAlgs; + _i = 0; + /* while (true) { */ case 8: + /* if (!(_i < _ref$1.$length)) { break; } */ if(!(_i < _ref$1.$length)) { $s = 9; continue; } + sigAlg$1 = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); + /* */ if (!isSupportedSignatureAlgorithm(sigAlg$1, ourSigAlgs)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!isSupportedSignatureAlgorithm(sigAlg$1, ourSigAlgs)) { */ case 10: + _i++; + /* continue; */ $s = 8; continue; + /* } */ case 11: + _r$1 = lookupTLSHash(sigAlg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + hashAlg = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $panic(new $String("tls: supported signature algorithm has an unknown hash function")); + } + sigType$1 = signatureFromSignatureScheme(sigAlg$1); + _ref$2 = pubkey; + /* */ if ($assertType(_ref$2, ptrType$2, true)[1]) { $s = 13; continue; } + /* */ if ($assertType(_ref$2, ptrType$3, true)[1]) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if ($assertType(_ref$2, ptrType$2, true)[1]) { */ case 13: + if ((sigType$1 === 16) || (sigType$1 === 18)) { + _tmp$16 = sigAlg$1; + _tmp$17 = sigType$1; + _tmp$18 = hashAlg; + _tmp$19 = $ifaceNil; + sigAlg = _tmp$16; + sigType = _tmp$17; + hashFunc = _tmp$18; + err = _tmp$19; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + } + $s = 16; continue; + /* } else if ($assertType(_ref$2, ptrType$3, true)[1]) { */ case 14: + if (sigType$1 === 17) { + _tmp$20 = sigAlg$1; + _tmp$21 = sigType$1; + _tmp$22 = hashAlg; + _tmp$23 = $ifaceNil; + sigAlg = _tmp$20; + sigType = _tmp$21; + hashFunc = _tmp$22; + err = _tmp$23; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + } + $s = 16; continue; + /* } else { */ case 15: + _tmp$24 = 0; + _tmp$25 = 0; + _tmp$26 = 0; + _r$2 = fmt.Errorf("tls: unsupported public key: %T", new sliceType$8([pubkey])); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tmp$27 = _r$2; + sigAlg = _tmp$24; + sigType = _tmp$25; + hashFunc = _tmp$26; + err = _tmp$27; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + /* } */ case 16: + _i++; + /* } */ $s = 8; continue; case 9: + _tmp$28 = 0; + _tmp$29 = 0; + _tmp$30 = 0; + _tmp$31 = errors.New("tls: peer doesn't support any common signature algorithms"); + sigAlg = _tmp$28; + sigType = _tmp$29; + hashFunc = _tmp$30; + err = _tmp$31; + $s = -1; return [sigAlg, sigType, hashFunc, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: pickSignatureAlgorithm }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$3 = _tmp$3; $f._tmp$30 = _tmp$30; $f._tmp$31 = _tmp$31; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.hashAlg = hashAlg; $f.hashFunc = hashFunc; $f.ourSigAlgs = ourSigAlgs; $f.peerSigAlgs = peerSigAlgs; $f.pubkey = pubkey; $f.sigAlg = sigAlg; $f.sigAlg$1 = sigAlg$1; $f.sigType = sigType; $f.sigType$1 = sigType$1; $f.tlsVersion = tlsVersion; $f.$s = $s; $f.$r = $r; return $f; + }; + verifyHandshakeSignature = function(sigType, pubkey, hashFunc, digest, sig) { + var _1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, _tuple$3, digest, ecdsaSig, err, err$1, err$2, hashFunc, ok, ok$1, ok$2, pubKey, pubKey$1, pubKey$2, pubkey, sig, sigType, signOpts, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; digest = $f.digest; ecdsaSig = $f.ecdsaSig; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; hashFunc = $f.hashFunc; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; pubKey = $f.pubKey; pubKey$1 = $f.pubKey$1; pubKey$2 = $f.pubKey$2; pubkey = $f.pubkey; sig = $f.sig; sigType = $f.sigType; signOpts = $f.signOpts; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = sigType; + /* */ if (_1 === (17)) { $s = 2; continue; } + /* */ if (_1 === (16)) { $s = 3; continue; } + /* */ if (_1 === (18)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_1 === (17)) { */ case 2: + _tuple = $assertType(pubkey, ptrType$3, true); + pubKey = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return errors.New("tls: ECDSA signing requires a ECDSA public key"); + } + ecdsaSig = new ecdsaSignature.ptr(ptrType$4.nil, ptrType$4.nil); + _r = asn1.Unmarshal(sig, ecdsaSig); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if (ecdsaSig.R.Sign() <= 0 || ecdsaSig.S.Sign() <= 0) { + $s = -1; return errors.New("tls: ECDSA signature contained zero or negative values"); + } + _r$1 = ecdsa.Verify(pubKey, digest, ecdsaSig.R, ecdsaSig.S); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!_r$1) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!_r$1) { */ case 8: + $s = -1; return errors.New("tls: ECDSA verification failure"); + /* } */ case 9: + $s = 6; continue; + /* } else if (_1 === (16)) { */ case 3: + _tuple$2 = $assertType(pubkey, ptrType$2, true); + pubKey$1 = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (!ok$1) { + $s = -1; return errors.New("tls: RSA signing requires a RSA public key"); + } + _r$2 = rsa.VerifyPKCS1v15(pubKey$1, hashFunc, digest, sig); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$1 = _r$2; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + $s = 6; continue; + /* } else if (_1 === (18)) { */ case 4: + _tuple$3 = $assertType(pubkey, ptrType$2, true); + pubKey$2 = _tuple$3[0]; + ok$2 = _tuple$3[1]; + if (!ok$2) { + $s = -1; return errors.New("tls: RSA signing requires a RSA public key"); + } + signOpts = new rsa.PSSOptions.ptr(-1, 0); + _r$3 = rsa.VerifyPSS(pubKey$2, hashFunc, digest, sig, signOpts); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$2 = _r$3; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + $s = 6; continue; + /* } else { */ case 5: + $s = -1; return errors.New("tls: unknown signature algorithm"); + /* } */ case 6: + case 1: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: verifyHandshakeSignature }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.digest = digest; $f.ecdsaSig = ecdsaSig; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.hashFunc = hashFunc; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.pubKey = pubKey; $f.pubKey$1 = pubKey$1; $f.pubKey$2 = pubKey$2; $f.pubkey = pubkey; $f.sig = sig; $f.sigType = sigType; $f.signOpts = signOpts; $f.$s = $s; $f.$r = $r; return $f; + }; + cipherRC4 = function(key, iv, isRead) { + var _tuple, cipher$1, isRead, iv, key; + _tuple = rc4.NewCipher(key); + cipher$1 = _tuple[0]; + return cipher$1; + }; + cipher3DES = function(key, iv, isRead) { + var _r, _r$1, _tuple, block$1, isRead, iv, key, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; block$1 = $f.block$1; isRead = $f.isRead; iv = $f.iv; key = $f.key; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = des.NewTripleDESCipher(key); + block$1 = _tuple[0]; + /* */ if (isRead) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (isRead) { */ case 1: + _r = cipher.NewCBCDecrypter(block$1, iv); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _r$1 = cipher.NewCBCEncrypter(block$1, iv); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: cipher3DES }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.block$1 = block$1; $f.isRead = isRead; $f.iv = iv; $f.key = key; $f.$s = $s; $f.$r = $r; return $f; + }; + cipherAES = function(key, iv, isRead) { + var _r, _r$1, _tuple, block$1, isRead, iv, key, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; block$1 = $f.block$1; isRead = $f.isRead; iv = $f.iv; key = $f.key; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = aes.NewCipher(key); + block$1 = _tuple[0]; + /* */ if (isRead) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (isRead) { */ case 1: + _r = cipher.NewCBCDecrypter(block$1, iv); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _r$1 = cipher.NewCBCEncrypter(block$1, iv); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: cipherAES }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.block$1 = block$1; $f.isRead = isRead; $f.iv = iv; $f.key = key; $f.$s = $s; $f.$r = $r; return $f; + }; + macSHA1 = function(version, key) { + var _r, key, mac, version, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; key = $f.key; mac = $f.mac; version = $f.version; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (version === 768) { + mac = new ssl30MAC.ptr(sha1.New(), $makeSlice(sliceType$7, key.$length)); + $copySlice(mac.key, key); + $s = -1; return new mac.constructor.elem(mac); + } + _r = hmac.New(newConstantTimeHash(sha1.New), key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return (x = new tls10MAC.ptr(_r), new x.constructor.elem(x)); + /* */ } return; } if ($f === undefined) { $f = { $blk: macSHA1 }; } $f._r = _r; $f.key = key; $f.mac = mac; $f.version = version; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + macSHA256 = function(version, key) { + var _r, key, version, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; key = $f.key; version = $f.version; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = hmac.New(sha256.New, key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return (x = new tls10MAC.ptr(_r), new x.constructor.elem(x)); + /* */ } return; } if ($f === undefined) { $f = { $blk: macSHA256 }; } $f._r = _r; $f.key = key; $f.version = version; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + fixedNonceAEAD.ptr.prototype.NonceSize = function() { + var f; + f = this; + return 8; + }; + fixedNonceAEAD.prototype.NonceSize = function() { return this.$val.NonceSize(); }; + fixedNonceAEAD.ptr.prototype.Overhead = function() { + var _r, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _r = f.aead.Overhead(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: fixedNonceAEAD.ptr.prototype.Overhead }; } $f._r = _r; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + fixedNonceAEAD.prototype.Overhead = function() { return this.$val.Overhead(); }; + fixedNonceAEAD.ptr.prototype.explicitNonceLen = function() { + var f; + f = this; + return 8; + }; + fixedNonceAEAD.prototype.explicitNonceLen = function() { return this.$val.explicitNonceLen(); }; + fixedNonceAEAD.ptr.prototype.Seal = function(out, nonce, plaintext, additionalData) { + var _r, additionalData, f, nonce, out, plaintext, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; f = $f.f; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + $copySlice($subslice(new sliceType$7(f.nonce), 4), nonce); + _r = f.aead.Seal(out, new sliceType$7(f.nonce), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: fixedNonceAEAD.ptr.prototype.Seal }; } $f._r = _r; $f.additionalData = additionalData; $f.f = f; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.$s = $s; $f.$r = $r; return $f; + }; + fixedNonceAEAD.prototype.Seal = function(out, nonce, plaintext, additionalData) { return this.$val.Seal(out, nonce, plaintext, additionalData); }; + fixedNonceAEAD.ptr.prototype.Open = function(out, nonce, plaintext, additionalData) { + var _r, additionalData, f, nonce, out, plaintext, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; additionalData = $f.additionalData; f = $f.f; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + $copySlice($subslice(new sliceType$7(f.nonce), 4), nonce); + _r = f.aead.Open(out, new sliceType$7(f.nonce), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: fixedNonceAEAD.ptr.prototype.Open }; } $f._r = _r; $f.additionalData = additionalData; $f.f = f; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.$s = $s; $f.$r = $r; return $f; + }; + fixedNonceAEAD.prototype.Open = function(out, nonce, plaintext, additionalData) { return this.$val.Open(out, nonce, plaintext, additionalData); }; + xorNonceAEAD.ptr.prototype.NonceSize = function() { + var f; + f = this; + return 8; + }; + xorNonceAEAD.prototype.NonceSize = function() { return this.$val.NonceSize(); }; + xorNonceAEAD.ptr.prototype.Overhead = function() { + var _r, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _r = f.aead.Overhead(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: xorNonceAEAD.ptr.prototype.Overhead }; } $f._r = _r; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + xorNonceAEAD.prototype.Overhead = function() { return this.$val.Overhead(); }; + xorNonceAEAD.ptr.prototype.explicitNonceLen = function() { + var f; + f = this; + return 0; + }; + xorNonceAEAD.prototype.explicitNonceLen = function() { return this.$val.explicitNonceLen(); }; + xorNonceAEAD.ptr.prototype.Seal = function(out, nonce, plaintext, additionalData) { + var _i, _i$1, _index, _index$1, _r, _ref, _ref$1, additionalData, b, b$1, f, i, i$1, nonce, out, plaintext, result, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _index = $f._index; _index$1 = $f._index$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; additionalData = $f.additionalData; b = $f.b; b$1 = $f.b$1; f = $f.f; i = $f.i; i$1 = $f.i$1; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; result = $f.result; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _ref = nonce; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _index = 4 + i >> 0; + (x$1 = f.nonceMask, ((_index < 0 || _index >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[_index] = (((x = f.nonceMask, ((_index < 0 || _index >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_index])) ^ (b)) << 24 >>> 24))); + _i++; + } + _r = f.aead.Seal(out, new sliceType$7(f.nonceMask), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + result = _r; + _ref$1 = nonce; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _index$1 = 4 + i$1 >> 0; + (x$3 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[_index$1] = (((x$2 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[_index$1])) ^ (b$1)) << 24 >>> 24))); + _i$1++; + } + $s = -1; return result; + /* */ } return; } if ($f === undefined) { $f = { $blk: xorNonceAEAD.ptr.prototype.Seal }; } $f._i = _i; $f._i$1 = _i$1; $f._index = _index; $f._index$1 = _index$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f.additionalData = additionalData; $f.b = b; $f.b$1 = b$1; $f.f = f; $f.i = i; $f.i$1 = i$1; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.result = result; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + xorNonceAEAD.prototype.Seal = function(out, nonce, plaintext, additionalData) { return this.$val.Seal(out, nonce, plaintext, additionalData); }; + xorNonceAEAD.ptr.prototype.Open = function(out, nonce, plaintext, additionalData) { + var _i, _i$1, _index, _index$1, _r, _ref, _ref$1, _tuple, additionalData, b, b$1, err, f, i, i$1, nonce, out, plaintext, result, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _index = $f._index; _index$1 = $f._index$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; additionalData = $f.additionalData; b = $f.b; b$1 = $f.b$1; err = $f.err; f = $f.f; i = $f.i; i$1 = $f.i$1; nonce = $f.nonce; out = $f.out; plaintext = $f.plaintext; result = $f.result; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _ref = nonce; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _index = 4 + i >> 0; + (x$1 = f.nonceMask, ((_index < 0 || _index >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[_index] = (((x = f.nonceMask, ((_index < 0 || _index >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_index])) ^ (b)) << 24 >>> 24))); + _i++; + } + _r = f.aead.Open(out, new sliceType$7(f.nonceMask), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + result = _tuple[0]; + err = _tuple[1]; + _ref$1 = nonce; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _index$1 = 4 + i$1 >> 0; + (x$3 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[_index$1] = (((x$2 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[_index$1])) ^ (b$1)) << 24 >>> 24))); + _i$1++; + } + $s = -1; return [result, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: xorNonceAEAD.ptr.prototype.Open }; } $f._i = _i; $f._i$1 = _i$1; $f._index = _index; $f._index$1 = _index$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.additionalData = additionalData; $f.b = b; $f.b$1 = b$1; $f.err = err; $f.f = f; $f.i = i; $f.i$1 = i$1; $f.nonce = nonce; $f.out = out; $f.plaintext = plaintext; $f.result = result; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + xorNonceAEAD.prototype.Open = function(out, nonce, plaintext, additionalData) { return this.$val.Open(out, nonce, plaintext, additionalData); }; + aeadAESGCM = function(key, fixedNonce) { + var _r, _tuple, _tuple$1, aead$1, aes$1, err, fixedNonce, key, ret, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; aead$1 = $f.aead$1; aes$1 = $f.aes$1; err = $f.err; fixedNonce = $f.fixedNonce; key = $f.key; ret = $f.ret; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = aes.NewCipher(key); + aes$1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + _r = cipher.NewGCM(aes$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + aead$1 = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + ret = new fixedNonceAEAD.ptr(arrayType$1.zero(), aead$1); + $copySlice(new sliceType$7(ret.nonce), fixedNonce); + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: aeadAESGCM }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.aead$1 = aead$1; $f.aes$1 = aes$1; $f.err = err; $f.fixedNonce = fixedNonce; $f.key = key; $f.ret = ret; $f.$s = $s; $f.$r = $r; return $f; + }; + aeadChaCha20Poly1305 = function(key, fixedNonce) { + var _tuple, aead$1, err, fixedNonce, key, ret; + _tuple = chacha20poly1305.New(key); + aead$1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + ret = new xorNonceAEAD.ptr(arrayType$1.zero(), aead$1); + $copySlice(new sliceType$7(ret.nonceMask), fixedNonce); + return ret; + }; + ssl30MAC.ptr.prototype.Size = function() { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + _r = s.h.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: ssl30MAC.ptr.prototype.Size }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + ssl30MAC.prototype.Size = function() { return this.$val.Size(); }; + ssl30MAC.ptr.prototype.MAC = function(digestBuf, seq, header, data, extra) { + var _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, data, digestBuf, extra, header, padLength, s, seq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; data = $f.data; digestBuf = $f.digestBuf; extra = $f.extra; header = $f.header; padLength = $f.padLength; s = $f.s; seq = $f.seq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + padLength = 48; + _r = s.h.Size(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (_r === 20) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r === 20) { */ case 1: + padLength = 40; + /* } */ case 2: + $r = s.h.Reset(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = s.h.Write(s.key); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = s.h.Write($subslice(new sliceType$7(ssl30Pad1), 0, padLength)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = s.h.Write(seq); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = s.h.Write($subslice(header, 0, 1)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = s.h.Write($subslice(header, 3, 5)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = s.h.Write(data); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = s.h.Sum($subslice(digestBuf, 0, 0)); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + digestBuf = _r$7; + $r = s.h.Reset(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$8 = s.h.Write(s.key); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = s.h.Write($subslice(new sliceType$7(ssl30Pad2), 0, padLength)); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _r$10 = s.h.Write(digestBuf); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + _r$11 = s.h.Sum($subslice(digestBuf, 0, 0)); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return _r$11; + /* */ } return; } if ($f === undefined) { $f = { $blk: ssl30MAC.ptr.prototype.MAC }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f.data = data; $f.digestBuf = digestBuf; $f.extra = extra; $f.header = header; $f.padLength = padLength; $f.s = s; $f.seq = seq; $f.$s = $s; $f.$r = $r; return $f; + }; + ssl30MAC.prototype.MAC = function(digestBuf, seq, header, data, extra) { return this.$val.MAC(digestBuf, seq, header, data, extra); }; + cthWrapper.ptr.prototype.Size = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.h.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: cthWrapper.ptr.prototype.Size }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + cthWrapper.prototype.Size = function() { return this.$val.Size(); }; + cthWrapper.ptr.prototype.BlockSize = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.h.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: cthWrapper.ptr.prototype.BlockSize }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + cthWrapper.prototype.BlockSize = function() { return this.$val.BlockSize(); }; + cthWrapper.ptr.prototype.Reset = function() { + var c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.h.Reset(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: cthWrapper.ptr.prototype.Reset }; } $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + cthWrapper.prototype.Reset = function() { return this.$val.Reset(); }; + cthWrapper.ptr.prototype.Write = function(p) { + var _r, c, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.h.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: cthWrapper.ptr.prototype.Write }; } $f._r = _r; $f.c = c; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + cthWrapper.prototype.Write = function(p) { return this.$val.Write(p); }; + cthWrapper.ptr.prototype.Sum = function(b) { + var _r, b, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.h.ConstantTimeSum(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: cthWrapper.ptr.prototype.Sum }; } $f._r = _r; $f.b = b; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + cthWrapper.prototype.Sum = function(b) { return this.$val.Sum(b); }; + newConstantTimeHash = function(h) { + var h; + return (function $b() { + var _r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = h(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return new cthWrapper.ptr($assertType(_r, constantTimeHash)); + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r = _r; $f.$s = $s; $f.$r = $r; return $f; + }); + }; + tls10MAC.ptr.prototype.Size = function() { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + _r = s.h.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: tls10MAC.ptr.prototype.Size }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + tls10MAC.prototype.Size = function() { return this.$val.Size(); }; + tls10MAC.ptr.prototype.MAC = function(digestBuf, seq, header, data, extra) { + var _r, _r$1, _r$2, _r$3, _r$4, data, digestBuf, extra, header, res, s, seq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; data = $f.data; digestBuf = $f.digestBuf; extra = $f.extra; header = $f.header; res = $f.res; s = $f.s; seq = $f.seq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + $r = s.h.Reset(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = s.h.Write(seq); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = s.h.Write(header); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = s.h.Write(data); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = s.h.Sum($subslice(digestBuf, 0, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + res = _r$3; + /* */ if (!(extra === sliceType$7.nil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(extra === sliceType$7.nil)) { */ case 6: + _r$4 = s.h.Write(extra); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 7: + $s = -1; return res; + /* */ } return; } if ($f === undefined) { $f = { $blk: tls10MAC.ptr.prototype.MAC }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.data = data; $f.digestBuf = digestBuf; $f.extra = extra; $f.header = header; $f.res = res; $f.s = s; $f.seq = seq; $f.$s = $s; $f.$r = $r; return $f; + }; + tls10MAC.prototype.MAC = function(digestBuf, seq, header, data, extra) { return this.$val.MAC(digestBuf, seq, header, data, extra); }; + rsaKA = function(version) { + var version, x; + return (x = new rsaKeyAgreement.ptr(), new x.constructor.elem(x)); + }; + ecdheECDSAKA = function(version) { + var version; + return new ecdheKeyAgreement.ptr(version, false, sliceType$7.nil, 0, sliceType$7.nil, ptrType$4.nil, ptrType$4.nil); + }; + ecdheRSAKA = function(version) { + var version; + return new ecdheKeyAgreement.ptr(version, true, sliceType$7.nil, 0, sliceType$7.nil, ptrType$4.nil, ptrType$4.nil); + }; + mutualCipherSuite = function(have, want) { + var _i, _i$1, _ref, _ref$1, have, id, suite, want; + _ref = have; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (id === want) { + _ref$1 = cipherSuites; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + suite = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (suite.id === want) { + return suite; + } + _i$1++; + } + return ptrType$1.nil; + } + _i++; + } + return ptrType$1.nil; + }; + ConnectionState.ptr.prototype.ExportKeyingMaterial = function(label, context, length) { + var _r, context, cs, label, length, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; context = $f.context; cs = $f.cs; label = $f.label; length = $f.length; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cs = this; + _r = cs.ekm(label, context, length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: ConnectionState.ptr.prototype.ExportKeyingMaterial }; } $f._r = _r; $f.context = context; $f.cs = cs; $f.label = label; $f.length = length; $f.$s = $s; $f.$r = $r; return $f; + }; + ConnectionState.prototype.ExportKeyingMaterial = function(label, context, length) { return this.$val.ExportKeyingMaterial(label, context, length); }; + ticketKeyFromBytes = function(b) { + var _r, b, hashed, key, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; hashed = $f.hashed; key = $f.key; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + key = new ticketKey.ptr(arrayType$2.zero(), arrayType$2.zero(), arrayType$2.zero()); + _r = sha512.Sum512(new sliceType$7(b)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hashed = $clone(_r, arrayType$3); + $copySlice(new sliceType$7(key.keyName), $subslice(new sliceType$7(hashed), 0, 16)); + $copySlice(new sliceType$7(key.aesKey), $subslice(new sliceType$7(hashed), 16, 32)); + $copySlice(new sliceType$7(key.hmacKey), $subslice(new sliceType$7(hashed), 32, 48)); + ticketKey.copy(key, key); + $s = -1; return key; + /* */ } return; } if ($f === undefined) { $f = { $blk: ticketKeyFromBytes }; } $f._r = _r; $f.b = b; $f.hashed = hashed; $f.key = key; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.ptr.prototype.Clone = function() { + var c, sessionTicketKeys, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; sessionTicketKeys = $f.sessionTicketKeys; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + c[0] = this; + $r = c[0].serverInitOnce.Do((function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].serverInit(ptrType$5.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sessionTicketKeys = sliceType$4.nil; + $r = c[0].mutex.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sessionTicketKeys = c[0].sessionTicketKeys; + $r = c[0].mutex.RUnlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new Config.ptr(c[0].Rand, c[0].Time, c[0].Certificates, c[0].NameToCertificate, c[0].GetCertificate, c[0].GetClientCertificate, c[0].GetConfigForClient, c[0].VerifyPeerCertificate, c[0].RootCAs, c[0].NextProtos, c[0].ServerName, c[0].ClientAuth, c[0].ClientCAs, c[0].InsecureSkipVerify, c[0].CipherSuites, c[0].PreferServerCipherSuites, c[0].SessionTicketsDisabled, $clone(c[0].SessionTicketKey, arrayType), c[0].ClientSessionCache, c[0].MinVersion, c[0].MaxVersion, c[0].CurvePreferences, c[0].DynamicRecordSizingDisabled, c[0].Renegotiation, c[0].KeyLogWriter, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sessionTicketKeys); + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.Clone }; } $f.c = c; $f.sessionTicketKeys = sessionTicketKeys; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.Clone = function() { return this.$val.Clone(); }; + Config.ptr.prototype.serverInit = function(originalConfig) { + var _i, _r, _r$1, _r$2, _ref, _tuple, _v, alreadySet, b, c, err, originalConfig, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tuple = $f._tuple; _v = $f._v; alreadySet = $f.alreadySet; b = $f.b; c = $f.c; err = $f.err; originalConfig = $f.originalConfig; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.SessionTicketsDisabled) { _v = true; $s = 3; continue s; } + _r = c.ticketKeys(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _v = !((_r.$length === 0)); case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return; + /* } */ case 2: + alreadySet = false; + _ref = c.SessionTicketKey; + _i = 0; + while (true) { + if (!(_i < 32)) { break; } + b = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + if (!((b === 0))) { + alreadySet = true; + break; + } + _i++; + } + /* */ if (!alreadySet) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!alreadySet) { */ case 5: + /* */ if (!(originalConfig === ptrType$5.nil)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(originalConfig === ptrType$5.nil)) { */ case 7: + $copySlice(new sliceType$7(c.SessionTicketKey), new sliceType$7(originalConfig.SessionTicketKey)); + $s = 9; continue; + /* } else { */ case 8: + _r$1 = io.ReadFull(c.rand(), new sliceType$7(c.SessionTicketKey)); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + c.SessionTicketsDisabled = true; + $s = -1; return; + } + /* } */ case 9: + /* } */ case 6: + /* */ if (!(originalConfig === ptrType$5.nil)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!(originalConfig === ptrType$5.nil)) { */ case 11: + $r = originalConfig.mutex.RLock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + c.sessionTicketKeys = originalConfig.sessionTicketKeys; + $r = originalConfig.mutex.RUnlock(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 13; continue; + /* } else { */ case 12: + _r$2 = ticketKeyFromBytes($clone(c.SessionTicketKey, arrayType)); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + c.sessionTicketKeys = new sliceType$4([$clone(_r$2, ticketKey)]); + /* } */ case 13: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.serverInit }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tuple = _tuple; $f._v = _v; $f.alreadySet = alreadySet; $f.b = b; $f.c = c; $f.err = err; $f.originalConfig = originalConfig; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.serverInit = function(originalConfig) { return this.$val.serverInit(originalConfig); }; + Config.ptr.prototype.ticketKeys = function() { + var c, ret, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; ret = $f.ret; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.mutex.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ret = c.sessionTicketKeys; + $r = c.mutex.RUnlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.ticketKeys }; } $f.c = c; $f.ret = ret; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.ticketKeys = function() { return this.$val.ticketKeys(); }; + Config.ptr.prototype.SetSessionTicketKeys = function(keys) { + var _i, _r, _ref, bytes$1, c, i, keys, newKeys, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; bytes$1 = $f.bytes$1; c = $f.c; i = $f.i; keys = $f.keys; newKeys = $f.newKeys; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (keys.$length === 0) { + $panic(new $String("tls: keys must have at least one key")); + } + newKeys = $makeSlice(sliceType$4, keys.$length); + _ref = keys; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + bytes$1 = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType); + _r = ticketKeyFromBytes($clone(bytes$1, arrayType)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + ticketKey.copy(((i < 0 || i >= newKeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : newKeys.$array[newKeys.$offset + i]), _r); + _i++; + /* } */ $s = 1; continue; case 2: + $r = c.mutex.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + c.sessionTicketKeys = newKeys; + $r = c.mutex.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.SetSessionTicketKeys }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f.bytes$1 = bytes$1; $f.c = c; $f.i = i; $f.keys = keys; $f.newKeys = newKeys; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.SetSessionTicketKeys = function(keys) { return this.$val.SetSessionTicketKeys(keys); }; + Config.ptr.prototype.rand = function() { + var c, r; + c = this; + r = c.Rand; + if ($interfaceIsEqual(r, $ifaceNil)) { + return rand.Reader; + } + return r; + }; + Config.prototype.rand = function() { return this.$val.rand(); }; + Config.ptr.prototype.time = function() { + var _r, c, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + t = c.Time; + if (t === $throwNilPointerError) { + t = time.Now; + } + _r = t(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.time }; } $f._r = _r; $f.c = c; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.time = function() { return this.$val.time(); }; + Config.ptr.prototype.cipherSuites = function() { + var _r, c, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + s = c.CipherSuites; + /* */ if (s === sliceType$2.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (s === sliceType$2.nil) { */ case 1: + _r = defaultCipherSuites(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + s = _r; + /* } */ case 2: + $s = -1; return s; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.cipherSuites }; } $f._r = _r; $f.c = c; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.cipherSuites = function() { return this.$val.cipherSuites(); }; + Config.ptr.prototype.minVersion = function() { + var c; + c = this; + if (c === ptrType$5.nil || (c.MinVersion === 0)) { + return 769; + } + return c.MinVersion; + }; + Config.prototype.minVersion = function() { return this.$val.minVersion(); }; + Config.ptr.prototype.maxVersion = function() { + var c; + c = this; + if (c === ptrType$5.nil || (c.MaxVersion === 0)) { + return 771; + } + return c.MaxVersion; + }; + Config.prototype.maxVersion = function() { return this.$val.maxVersion(); }; + Config.ptr.prototype.curvePreferences = function() { + var c; + c = this; + if (c === ptrType$5.nil || (c.CurvePreferences.$length === 0)) { + return defaultCurvePreferences; + } + return c.CurvePreferences; + }; + Config.prototype.curvePreferences = function() { return this.$val.curvePreferences(); }; + Config.ptr.prototype.mutualVersion = function(vers) { + var c, maxVersion, minVersion, vers; + c = this; + minVersion = c.minVersion(); + maxVersion = c.maxVersion(); + if (vers < minVersion) { + return [0, false]; + } + if (vers > maxVersion) { + vers = maxVersion; + } + return [vers, true]; + }; + Config.prototype.mutualVersion = function(vers) { return this.$val.mutualVersion(vers); }; + Config.ptr.prototype.getCertificate = function(clientHello) { + var _entry, _entry$1, _i, _r, _r$1, _ref, _tuple, _tuple$1, _tuple$2, c, candidate, cert, cert$1, cert$2, clientHello, err, i, labels, name, ok, ok$1, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; c = $f.c; candidate = $f.candidate; cert = $f.cert; cert$1 = $f.cert$1; cert$2 = $f.cert$2; clientHello = $f.clientHello; err = $f.err; i = $f.i; labels = $f.labels; name = $f.name; ok = $f.ok; ok$1 = $f.ok$1; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + /* */ if (!(c.GetCertificate === $throwNilPointerError) && ((c.Certificates.$length === 0) || clientHello.ServerName.length > 0)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(c.GetCertificate === $throwNilPointerError) && ((c.Certificates.$length === 0) || clientHello.ServerName.length > 0)) { */ case 1: + _r = c.GetCertificate(clientHello); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + cert = _tuple[0]; + err = _tuple[1]; + if (!(cert === ptrType$6.nil) || !($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [cert, err]; + } + /* } */ case 2: + if (c.Certificates.$length === 0) { + $s = -1; return [ptrType$6.nil, errors.New("tls: no certificates configured")]; + } + if ((c.Certificates.$length === 1) || c.NameToCertificate === false) { + $s = -1; return [(x = c.Certificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), $ifaceNil]; + } + _r$1 = strings.ToLower(clientHello.ServerName); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + name = _r$1; + while (true) { + if (!(name.length > 0 && (name.charCodeAt((name.length - 1 >> 0)) === 46))) { break; } + name = $substring(name, 0, (name.length - 1 >> 0)); + } + _tuple$1 = (_entry = c.NameToCertificate[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [ptrType$6.nil, false]); + cert$1 = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + $s = -1; return [cert$1, $ifaceNil]; + } + labels = strings.Split(name, "."); + _ref = labels; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= labels.$length) ? ($throwRuntimeError("index out of range"), undefined) : labels.$array[labels.$offset + i] = "*"); + candidate = strings.Join(labels, "."); + _tuple$2 = (_entry$1 = c.NameToCertificate[$String.keyFor(candidate)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$6.nil, false]); + cert$2 = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (ok$1) { + $s = -1; return [cert$2, $ifaceNil]; + } + _i++; + } + $s = -1; return [(x$1 = c.Certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.getCertificate }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.c = c; $f.candidate = candidate; $f.cert = cert; $f.cert$1 = cert$1; $f.cert$2 = cert$2; $f.clientHello = clientHello; $f.err = err; $f.i = i; $f.labels = labels; $f.name = name; $f.ok = ok; $f.ok$1 = ok$1; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.getCertificate = function(clientHello) { return this.$val.getCertificate(clientHello); }; + Config.ptr.prototype.BuildNameToCertificate = function() { + var _i, _i$1, _key, _key$1, _r, _ref, _ref$1, _tuple, c, cert, err, i, san, x, x$1, x509Cert, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _key = $f._key; _key$1 = $f._key$1; _r = $f._r; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; c = $f.c; cert = $f.cert; err = $f.err; i = $f.i; san = $f.san; x = $f.x; x$1 = $f.x$1; x509Cert = $f.x509Cert; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + c.NameToCertificate = {}; + _ref = c.Certificates; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + cert = (x = c.Certificates, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); + _r = x509.ParseCertificate((x$1 = cert.Certificate, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0]))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + x509Cert = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _i++; + /* continue; */ $s = 1; continue; + } + if (x509Cert.Subject.CommonName.length > 0) { + _key = x509Cert.Subject.CommonName; (c.NameToCertificate || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: cert }; + } + _ref$1 = x509Cert.DNSNames; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + san = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _key$1 = san; (c.NameToCertificate || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: cert }; + _i$1++; + } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.BuildNameToCertificate }; } $f._i = _i; $f._i$1 = _i$1; $f._key = _key; $f._key$1 = _key$1; $f._r = _r; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.c = c; $f.cert = cert; $f.err = err; $f.i = i; $f.san = san; $f.x = x; $f.x$1 = x$1; $f.x509Cert = x509Cert; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.BuildNameToCertificate = function() { return this.$val.BuildNameToCertificate(); }; + Config.ptr.prototype.writeKeyLog = function(clientRandom, masterSecret) { + var _r, _r$1, _tuple, c, clientRandom, err, logLine, masterSecret, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; clientRandom = $f.clientRandom; err = $f.err; logLine = $f.logLine; masterSecret = $f.masterSecret; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if ($interfaceIsEqual(c.KeyLogWriter, $ifaceNil)) { + $s = -1; return $ifaceNil; + } + _r = fmt.Sprintf("CLIENT_RANDOM %x %x\n", new sliceType$8([clientRandom, masterSecret])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + logLine = (new sliceType$7($stringToBytes(_r))); + $r = writerMutex.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = c.KeyLogWriter.Write(logLine); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + $r = writerMutex.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Config.ptr.prototype.writeKeyLog }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.clientRandom = clientRandom; $f.err = err; $f.logLine = logLine; $f.masterSecret = masterSecret; $f.$s = $s; $f.$r = $r; return $f; + }; + Config.prototype.writeKeyLog = function(clientRandom, masterSecret) { return this.$val.writeKeyLog(clientRandom, masterSecret); }; + defaultConfig = function() { + return emptyConfig; + }; + defaultCipherSuites = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = once.Do(initDefaultCipherSuites); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return varDefaultCipherSuites; + /* */ } return; } if ($f === undefined) { $f = { $blk: defaultCipherSuites }; } $f.$s = $s; $f.$r = $r; return $f; + }; + initDefaultCipherSuites = function() { + var _i, _i$1, _ref, _ref$1, existing, hasGCMAsm, hasGCMAsmAMD64, hasGCMAsmARM64, hasGCMAsmS390X, suite, topCipherSuites; + topCipherSuites = sliceType$2.nil; + hasGCMAsmAMD64 = cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ; + hasGCMAsmARM64 = cpu.ARM64.HasAES && cpu.ARM64.HasPMULL; + hasGCMAsmS390X = cpu.S390X.HasAES && cpu.S390X.HasAESCBC && cpu.S390X.HasAESCTR && (cpu.S390X.HasGHASH || cpu.S390X.HasAESGCM); + hasGCMAsm = hasGCMAsmAMD64 || hasGCMAsmARM64 || hasGCMAsmS390X; + if (hasGCMAsm) { + topCipherSuites = new sliceType$2([49199, 49200, 49195, 49196, 52392, 52393]); + } else { + topCipherSuites = new sliceType$2([52392, 52393, 49199, 49200, 49195, 49196]); + } + varDefaultCipherSuites = $makeSlice(sliceType$2, 0, cipherSuites.$length); + varDefaultCipherSuites = $appendSlice(varDefaultCipherSuites, topCipherSuites); + _ref = cipherSuites; + _i = 0; + NextCipherSuite: + while (true) { + if (!(_i < _ref.$length)) { break; } + suite = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!(((suite.flags & 16) === 0))) { + _i++; + continue; + } + _ref$1 = varDefaultCipherSuites; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + existing = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (existing === suite.id) { + _i++; + continue NextCipherSuite; + } + _i$1++; + } + varDefaultCipherSuites = $append(varDefaultCipherSuites, suite.id); + _i++; + } + }; + unexpectedMessageError = function(wanted, got) { + var _r, got, wanted, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; got = $f.got; wanted = $f.wanted; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = fmt.Errorf("tls: received unexpected handshake message of type %T when waiting for %T", new sliceType$8([got, wanted])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: unexpectedMessageError }; } $f._r = _r; $f.got = got; $f.wanted = wanted; $f.$s = $s; $f.$r = $r; return $f; + }; + isSupportedSignatureAlgorithm = function(sigAlg, supportedSignatureAlgorithms$1) { + var _i, _ref, s, sigAlg, supportedSignatureAlgorithms$1; + _ref = supportedSignatureAlgorithms$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (s === sigAlg) { + return true; + } + _i++; + } + return false; + }; + signatureFromSignatureScheme = function(signatureAlgorithm) { + var _1, signatureAlgorithm; + _1 = signatureAlgorithm; + if ((_1 === (513)) || (_1 === (1025)) || (_1 === (1281)) || (_1 === (1537))) { + return 16; + } else if ((_1 === (2052)) || (_1 === (2053)) || (_1 === (2054))) { + return 18; + } else if ((_1 === (515)) || (_1 === (1027)) || (_1 === (1283)) || (_1 === (1539))) { + return 17; + } else { + return 0; + } + }; + Conn.ptr.prototype.LocalAddr = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.conn.LocalAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.LocalAddr }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.LocalAddr = function() { return this.$val.LocalAddr(); }; + Conn.ptr.prototype.RemoteAddr = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.conn.RemoteAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.RemoteAddr }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.RemoteAddr = function() { return this.$val.RemoteAddr(); }; + Conn.ptr.prototype.SetDeadline = function(t) { + var _r, c, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.conn.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.SetDeadline }; } $f._r = _r; $f.c = c; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; + Conn.ptr.prototype.SetReadDeadline = function(t) { + var _r, c, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.conn.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.SetReadDeadline }; } $f._r = _r; $f.c = c; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; + Conn.ptr.prototype.SetWriteDeadline = function(t) { + var _r, c, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r = c.conn.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.SetWriteDeadline }; } $f._r = _r; $f.c = c; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; + halfConn.ptr.prototype.setErrorLocked = function(err) { + var err, hc; + hc = this; + hc.err = err; + return err; + }; + halfConn.prototype.setErrorLocked = function(err) { return this.$val.setErrorLocked(err); }; + halfConn.ptr.prototype.prepareCipherSpec = function(version, cipher$1, mac) { + var cipher$1, hc, mac, version; + hc = this; + hc.version = version; + hc.nextCipher = cipher$1; + hc.nextMac = mac; + }; + halfConn.prototype.prepareCipherSpec = function(version, cipher$1, mac) { return this.$val.prepareCipherSpec(version, cipher$1, mac); }; + halfConn.ptr.prototype.changeCipherSpec = function() { + var _i, _ref, hc, i, x; + hc = this; + if ($interfaceIsEqual(hc.nextCipher, $ifaceNil)) { + return new alert(80); + } + hc.cipher = hc.nextCipher; + hc.mac = hc.nextMac; + hc.nextCipher = $ifaceNil; + hc.nextMac = $ifaceNil; + _ref = hc.seq; + _i = 0; + while (true) { + if (!(_i < 8)) { break; } + i = _i; + (x = hc.seq, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = 0)); + _i++; + } + return $ifaceNil; + }; + halfConn.prototype.changeCipherSpec = function() { return this.$val.changeCipherSpec(); }; + halfConn.ptr.prototype.incSeq = function() { + var hc, i, x, x$1, x$2; + hc = this; + i = 7; + while (true) { + if (!(i >= 0)) { break; } + (x$1 = hc.seq, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i] = ((x = hc.seq, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) + (1) << 24 >>> 24))); + if (!(((x$2 = hc.seq, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) === 0))) { + return; + } + i = i - (1) >> 0; + } + $panic(new $String("TLS: sequence number wraparound")); + }; + halfConn.prototype.incSeq = function() { return this.$val.incSeq(); }; + extractPadding = function(payload) { + var _tmp, _tmp$1, b, good, i, mask, paddingLen, payload, t, t$1, toCheck, toRemove, x, x$1; + toRemove = 0; + good = 0; + if (payload.$length < 1) { + _tmp = 0; + _tmp$1 = 0; + toRemove = _tmp; + good = _tmp$1; + return [toRemove, good]; + } + paddingLen = (x = payload.$length - 1 >> 0, ((x < 0 || x >= payload.$length) ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + x])); + t = (((payload.$length - 1 >> 0) >>> 0)) - ((paddingLen >>> 0)) >>> 0; + good = ((((((~t >>> 0) >> 0)) >> 31 >> 0) << 24 >>> 24)); + toCheck = 256; + if (toCheck > payload.$length) { + toCheck = payload.$length; + } + i = 0; + while (true) { + if (!(i < toCheck)) { break; } + t$1 = ((paddingLen >>> 0)) - ((i >>> 0)) >>> 0; + mask = ((((((~t$1 >>> 0) >> 0)) >> 31 >> 0) << 24 >>> 24)); + b = (x$1 = (payload.$length - 1 >> 0) - i >> 0, ((x$1 < 0 || x$1 >= payload.$length) ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + x$1])); + good = (good & ~(((((mask & paddingLen) >>> 0) ^ ((mask & b) >>> 0)) << 24 >>> 24))) << 24 >>> 24; + i = i + (1) >> 0; + } + good = (good & ((good << 4 << 24 >>> 24))) >>> 0; + good = (good & ((good << 2 << 24 >>> 24))) >>> 0; + good = (good & ((good << 1 << 24 >>> 24))) >>> 0; + good = (((((good << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); + toRemove = ((paddingLen >> 0)) + 1 >> 0; + return [toRemove, good]; + }; + extractPaddingSSL30 = function(payload) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, good, paddingLen, payload, toRemove, x; + toRemove = 0; + good = 0; + if (payload.$length < 1) { + _tmp = 0; + _tmp$1 = 0; + toRemove = _tmp; + good = _tmp$1; + return [toRemove, good]; + } + paddingLen = (((x = payload.$length - 1 >> 0, ((x < 0 || x >= payload.$length) ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + x])) >> 0)) + 1 >> 0; + if (paddingLen > payload.$length) { + _tmp$2 = 0; + _tmp$3 = 0; + toRemove = _tmp$2; + good = _tmp$3; + return [toRemove, good]; + } + _tmp$4 = paddingLen; + _tmp$5 = 255; + toRemove = _tmp$4; + good = _tmp$5; + return [toRemove, good]; + }; + roundUp = function(a, b) { + var _r, _r$1, a, b; + return a + (_r = ((b - (_r$1 = a % b, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0)) % b, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0; + }; + halfConn.ptr.prototype.decrypt = function(b) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, alertValue, b, blockSize, c, c$1, c$2, c$3, err, explicitIVLen, hc, localMAC, macSize, n, n$1, nonce, ok, paddingGood, paddingLen, payload, prefixLen, remoteMAC, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; alertValue = $f.alertValue; b = $f.b; blockSize = $f.blockSize; c = $f.c; c$1 = $f.c$1; c$2 = $f.c$2; c$3 = $f.c$3; err = $f.err; explicitIVLen = $f.explicitIVLen; hc = $f.hc; localMAC = $f.localMAC; macSize = $f.macSize; n = $f.n; n$1 = $f.n$1; nonce = $f.nonce; ok = $f.ok; paddingGood = $f.paddingGood; paddingLen = $f.paddingLen; payload = $f.payload; prefixLen = $f.prefixLen; remoteMAC = $f.remoteMAC; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ok = false; + prefixLen = 0; + alertValue = 0; + hc = this; + payload = $subslice(b.data, 5); + macSize = 0; + /* */ if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { */ case 1: + _r = hc.mac.Size(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + macSize = _r; + /* } */ case 2: + paddingGood = 255; + paddingLen = 0; + explicitIVLen = 0; + /* */ if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { */ case 4: + _ref = hc.cipher; + /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref, aead, true)[1]) { $s = 7; continue; } + /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 6: + c = _ref; + $r = c.XORKeyStream(payload, payload); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 10; continue; + /* } else if ($assertType(_ref, aead, true)[1]) { */ case 7: + c$1 = _ref; + _r$1 = c$1.explicitNonceLen(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + explicitIVLen = _r$1; + if (payload.$length < explicitIVLen) { + _tmp = false; + _tmp$1 = 0; + _tmp$2 = 20; + ok = _tmp; + prefixLen = _tmp$1; + alertValue = _tmp$2; + $s = -1; return [ok, prefixLen, alertValue]; + } + nonce = $subslice(payload, 0, explicitIVLen); + payload = $subslice(payload, explicitIVLen); + if (nonce.$length === 0) { + nonce = new sliceType$7(hc.seq); + } + $copySlice(new sliceType$7(hc.additionalData), new sliceType$7(hc.seq)); + $copySlice($subslice(new sliceType$7(hc.additionalData), 8), $subslice(b.data, 0, 3)); + _r$2 = c$1.Overhead(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + n = payload.$length - _r$2 >> 0; + hc.additionalData[11] = (((n >> 8 >> 0) << 24 >>> 24)); + hc.additionalData[12] = ((n << 24 >>> 24)); + err = $ifaceNil; + _r$3 = c$1.Open($subslice(payload, 0, 0), nonce, payload, new sliceType$7(hc.additionalData)); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + payload = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$3 = false; + _tmp$4 = 0; + _tmp$5 = 20; + ok = _tmp$3; + prefixLen = _tmp$4; + alertValue = _tmp$5; + $s = -1; return [ok, prefixLen, alertValue]; + } + b.resize((5 + explicitIVLen >> 0) + payload.$length >> 0); + $s = 10; continue; + /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 8: + c$2 = _ref; + _r$4 = c$2.BlockSize(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + blockSize = _r$4; + if (hc.version >= 770) { + explicitIVLen = blockSize; + } + if (!(((_r$5 = payload.$length % blockSize, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) === 0)) || payload.$length < roundUp((explicitIVLen + macSize >> 0) + 1 >> 0, blockSize)) { + _tmp$6 = false; + _tmp$7 = 0; + _tmp$8 = 20; + ok = _tmp$6; + prefixLen = _tmp$7; + alertValue = _tmp$8; + $s = -1; return [ok, prefixLen, alertValue]; + } + /* */ if (explicitIVLen > 0) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (explicitIVLen > 0) { */ case 16: + $r = c$2.SetIV($subslice(payload, 0, explicitIVLen)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + payload = $subslice(payload, explicitIVLen); + /* } */ case 17: + $r = c$2.CryptBlocks(payload, payload); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (hc.version === 768) { + _tuple$1 = extractPaddingSSL30(payload); + paddingLen = _tuple$1[0]; + paddingGood = _tuple$1[1]; + } else { + _tuple$2 = extractPadding(payload); + paddingLen = _tuple$2[0]; + paddingGood = _tuple$2[1]; + } + $s = 10; continue; + /* } else { */ case 9: + c$3 = _ref; + $panic(new $String("unknown cipher type")); + /* } */ case 10: + /* } */ case 5: + /* */ if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { */ case 20: + if (payload.$length < macSize) { + _tmp$9 = false; + _tmp$10 = 0; + _tmp$11 = 20; + ok = _tmp$9; + prefixLen = _tmp$10; + alertValue = _tmp$11; + $s = -1; return [ok, prefixLen, alertValue]; + } + n$1 = (payload.$length - macSize >> 0) - paddingLen >> 0; + n$1 = subtle.ConstantTimeSelect((((((n$1 >>> 0)) >>> 31 >>> 0) >> 0)), 0, n$1); + (x = b.data, (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = (((n$1 >> 8 >> 0) << 24 >>> 24)))); + (x$1 = b.data, (4 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 4] = ((n$1 << 24 >>> 24)))); + remoteMAC = $subslice(payload, n$1, (n$1 + macSize >> 0)); + _r$6 = hc.mac.MAC(hc.inDigestBuf, $subslice(new sliceType$7(hc.seq), 0), $subslice(b.data, 0, 5), $subslice(payload, 0, n$1), $subslice(payload, (n$1 + macSize >> 0))); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + localMAC = _r$6; + if (!((subtle.ConstantTimeCompare(localMAC, remoteMAC) === 1)) || !((paddingGood === 255))) { + _tmp$12 = false; + _tmp$13 = 0; + _tmp$14 = 20; + ok = _tmp$12; + prefixLen = _tmp$13; + alertValue = _tmp$14; + $s = -1; return [ok, prefixLen, alertValue]; + } + hc.inDigestBuf = localMAC; + b.resize((5 + explicitIVLen >> 0) + n$1 >> 0); + /* } */ case 21: + hc.incSeq(); + _tmp$15 = true; + _tmp$16 = 5 + explicitIVLen >> 0; + _tmp$17 = 0; + ok = _tmp$15; + prefixLen = _tmp$16; + alertValue = _tmp$17; + $s = -1; return [ok, prefixLen, alertValue]; + /* */ } return; } if ($f === undefined) { $f = { $blk: halfConn.ptr.prototype.decrypt }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.alertValue = alertValue; $f.b = b; $f.blockSize = blockSize; $f.c = c; $f.c$1 = c$1; $f.c$2 = c$2; $f.c$3 = c$3; $f.err = err; $f.explicitIVLen = explicitIVLen; $f.hc = hc; $f.localMAC = localMAC; $f.macSize = macSize; $f.n = n; $f.n$1 = n$1; $f.nonce = nonce; $f.ok = ok; $f.paddingGood = paddingGood; $f.paddingLen = paddingLen; $f.payload = payload; $f.prefixLen = prefixLen; $f.remoteMAC = remoteMAC; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + halfConn.prototype.decrypt = function(b) { return this.$val.decrypt(b); }; + padToBlockSize = function(payload, blockSize) { + var _r, blockSize, finalBlock, i, overrun, paddingLen, payload, prefix; + prefix = sliceType$7.nil; + finalBlock = sliceType$7.nil; + overrun = (_r = payload.$length % blockSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + paddingLen = blockSize - overrun >> 0; + prefix = $subslice(payload, 0, (payload.$length - overrun >> 0)); + finalBlock = $makeSlice(sliceType$7, blockSize); + $copySlice(finalBlock, $subslice(payload, (payload.$length - overrun >> 0))); + i = overrun; + while (true) { + if (!(i < blockSize)) { break; } + ((i < 0 || i >= finalBlock.$length) ? ($throwRuntimeError("index out of range"), undefined) : finalBlock.$array[finalBlock.$offset + i] = (((paddingLen - 1 >> 0) << 24 >>> 24))); + i = i + (1) >> 0; + } + return [prefix, finalBlock]; + }; + halfConn.ptr.prototype.encrypt = function(b, explicitIVLen) { + var _r, _r$1, _r$2, _r$3, _ref, _tuple, b, blockSize, c, c$1, c$2, c$3, explicitIVLen, finalBlock, hc, mac, n, n$1, nonce, payload, payload$1, payloadLen, prefix, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; b = $f.b; blockSize = $f.blockSize; c = $f.c; c$1 = $f.c$1; c$2 = $f.c$2; c$3 = $f.c$3; explicitIVLen = $f.explicitIVLen; finalBlock = $f.finalBlock; hc = $f.hc; mac = $f.mac; n = $f.n; n$1 = $f.n$1; nonce = $f.nonce; payload = $f.payload; payload$1 = $f.payload$1; payloadLen = $f.payloadLen; prefix = $f.prefix; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hc = this; + /* */ if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { */ case 1: + _r = hc.mac.MAC(hc.outDigestBuf, $subslice(new sliceType$7(hc.seq), 0), $subslice(b.data, 0, 5), $subslice(b.data, (5 + explicitIVLen >> 0)), sliceType$7.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + mac = _r; + n = b.data.$length; + b.resize(n + mac.$length >> 0); + $copySlice($subslice(b.data, n), mac); + hc.outDigestBuf = mac; + /* } */ case 2: + payload = $subslice(b.data, 5); + /* */ if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { */ case 4: + _ref = hc.cipher; + /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref, aead, true)[1]) { $s = 7; continue; } + /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 6: + c = _ref; + $r = c.XORKeyStream(payload, payload); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 10; continue; + /* } else if ($assertType(_ref, aead, true)[1]) { */ case 7: + c$1 = _ref; + payloadLen = (b.data.$length - 5 >> 0) - explicitIVLen >> 0; + _r$1 = c$1.Overhead(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = b.resize(b.data.$length + _r$1 >> 0); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + nonce = $subslice(b.data, 5, (5 + explicitIVLen >> 0)); + if (nonce.$length === 0) { + nonce = new sliceType$7(hc.seq); + } + payload$1 = $subslice(b.data, (5 + explicitIVLen >> 0)); + payload$1 = $subslice(payload$1, 0, payloadLen); + $copySlice(new sliceType$7(hc.additionalData), new sliceType$7(hc.seq)); + $copySlice($subslice(new sliceType$7(hc.additionalData), 8), $subslice(b.data, 0, 3)); + hc.additionalData[11] = (((payloadLen >> 8 >> 0) << 24 >>> 24)); + hc.additionalData[12] = ((payloadLen << 24 >>> 24)); + _r$2 = c$1.Seal($subslice(payload$1, 0, 0), nonce, payload$1, new sliceType$7(hc.additionalData)); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = 10; continue; + /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 8: + c$2 = _ref; + _r$3 = c$2.BlockSize(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + blockSize = _r$3; + /* */ if (explicitIVLen > 0) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (explicitIVLen > 0) { */ case 16: + $r = c$2.SetIV($subslice(payload, 0, explicitIVLen)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + payload = $subslice(payload, explicitIVLen); + /* } */ case 17: + _tuple = padToBlockSize(payload, blockSize); + prefix = _tuple[0]; + finalBlock = _tuple[1]; + b.resize(((5 + explicitIVLen >> 0) + prefix.$length >> 0) + finalBlock.$length >> 0); + $r = c$2.CryptBlocks($subslice(b.data, (5 + explicitIVLen >> 0)), prefix); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = c$2.CryptBlocks($subslice(b.data, ((5 + explicitIVLen >> 0) + prefix.$length >> 0)), finalBlock); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 10; continue; + /* } else { */ case 9: + c$3 = _ref; + $panic(new $String("unknown cipher type")); + /* } */ case 10: + /* } */ case 5: + n$1 = b.data.$length - 5 >> 0; + (x = b.data, (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = (((n$1 >> 8 >> 0) << 24 >>> 24)))); + (x$1 = b.data, (4 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 4] = ((n$1 << 24 >>> 24)))); + hc.incSeq(); + $s = -1; return [true, 0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: halfConn.ptr.prototype.encrypt }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f.b = b; $f.blockSize = blockSize; $f.c = c; $f.c$1 = c$1; $f.c$2 = c$2; $f.c$3 = c$3; $f.explicitIVLen = explicitIVLen; $f.finalBlock = finalBlock; $f.hc = hc; $f.mac = mac; $f.n = n; $f.n$1 = n$1; $f.nonce = nonce; $f.payload = payload; $f.payload$1 = payload$1; $f.payloadLen = payloadLen; $f.prefix = prefix; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + halfConn.prototype.encrypt = function(b, explicitIVLen) { return this.$val.encrypt(b, explicitIVLen); }; + block.ptr.prototype.resize = function(n) { + var b, n; + b = this; + if (n > b.data.$capacity) { + b.reserve(n); + } + b.data = $subslice(b.data, 0, n); + }; + block.prototype.resize = function(n) { return this.$val.resize(n); }; + block.ptr.prototype.reserve = function(n) { + var b, data, m, n; + b = this; + if (b.data.$capacity >= n) { + return; + } + m = b.data.$capacity; + if (m === 0) { + m = 1024; + } + while (true) { + if (!(m < n)) { break; } + m = $imul(m, (2)); + } + data = $makeSlice(sliceType$7, b.data.$length, m); + $copySlice(data, b.data); + b.data = data; + }; + block.prototype.reserve = function(n) { return this.$val.reserve(n); }; + block.ptr.prototype.readFromUntil = function(r, n) { + var _r, _tuple, b, err, m, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; b = $f.b; err = $f.err; m = $f.m; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + if (b.data.$length >= n) { + $s = -1; return $ifaceNil; + } + b.reserve(n); + /* while (true) { */ case 1: + _r = r.Read($subslice(b.data, b.data.$length, b.data.$capacity)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + m = _tuple[0]; + err = _tuple[1]; + b.data = $subslice(b.data, 0, (b.data.$length + m >> 0)); + if (b.data.$length >= n) { + /* break; */ $s = 2; continue; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: block.ptr.prototype.readFromUntil }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.m = m; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + block.prototype.readFromUntil = function(r, n) { return this.$val.readFromUntil(r, n); }; + block.ptr.prototype.Read = function(p) { + var b, err, n, p; + n = 0; + err = $ifaceNil; + b = this; + n = $copySlice(p, $subslice(b.data, b.off)); + b.off = b.off + (n) >> 0; + return [n, err]; + }; + block.prototype.Read = function(p) { return this.$val.Read(p); }; + halfConn.ptr.prototype.newBlock = function() { + var b, hc; + hc = this; + b = hc.bfree; + if (b === ptrType$11.nil) { + return new block.ptr(sliceType$7.nil, 0, ptrType$11.nil); + } + hc.bfree = b.link; + b.link = ptrType$11.nil; + b.resize(0); + return b; + }; + halfConn.prototype.newBlock = function() { return this.$val.newBlock(); }; + halfConn.ptr.prototype.freeBlock = function(b) { + var b, hc; + hc = this; + b.link = hc.bfree; + hc.bfree = b; + }; + halfConn.prototype.freeBlock = function(b) { return this.$val.freeBlock(b); }; + halfConn.ptr.prototype.splitBlock = function(b, n) { + var b, bb, hc, n; + hc = this; + if (b.data.$length <= n) { + return [b, ptrType$11.nil]; + } + bb = hc.newBlock(); + bb.resize(b.data.$length - n >> 0); + $copySlice(bb.data, $subslice(b.data, n)); + b.data = $subslice(b.data, 0, n); + return [b, bb]; + }; + halfConn.prototype.splitBlock = function(b, n) { return this.$val.splitBlock(b, n); }; + RecordHeaderError.ptr.prototype.Error = function() { + var e; + e = this; + return "tls: " + e.Msg; + }; + RecordHeaderError.prototype.Error = function() { return this.$val.Error(); }; + Conn.ptr.prototype.newRecordHeaderError = function(msg) { + var c, err, msg; + err = new RecordHeaderError.ptr("", arrayType$4.zero()); + c = this; + err.Msg = msg; + $copySlice(new sliceType$7(err.RecordHeader), c.rawInput.data); + RecordHeaderError.copy(err, err); + return err; + }; + Conn.prototype.newRecordHeaderError = function(msg) { return this.$val.newRecordHeaderError(msg); }; + Conn.ptr.prototype.readRecord = function(want) { + var _1, _2, _3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, _v$1, alertValue, b, c, data, e, e$1, err, err$1, err$2, err$3, msg, msg$1, n, off, ok, ok$1, ok$2, typ, vers, want, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _3 = $f._3; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$27 = $f._r$27; _r$28 = $f._r$28; _r$29 = $f._r$29; _r$3 = $f._r$3; _r$30 = $f._r$30; _r$31 = $f._r$31; _r$32 = $f._r$32; _r$33 = $f._r$33; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _v = $f._v; _v$1 = $f._v$1; alertValue = $f.alertValue; b = $f.b; c = $f.c; data = $f.data; e = $f.e; e$1 = $f.e$1; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; msg = $f.msg; msg$1 = $f.msg$1; n = $f.n; off = $f.off; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; typ = $f.typ; vers = $f.vers; want = $f.want; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _1 = want; + /* */ if ((_1 === (22)) || (_1 === (20))) { $s = 2; continue; } + /* */ if (_1 === (23)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ((_1 === (22)) || (_1 === (20))) { */ case 2: + /* */ if (c.handshakeComplete()) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (c.handshakeComplete()) { */ case 6: + _r = c.sendAlert(80); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return c.in$25.setErrorLocked(errors.New("tls: handshake or ChangeCipherSpec requested while not in handshake")); + /* } */ case 7: + $s = 5; continue; + /* } else if (_1 === (23)) { */ case 3: + /* */ if (!c.handshakeComplete()) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!c.handshakeComplete()) { */ case 9: + _r$1 = c.sendAlert(80); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return c.in$25.setErrorLocked(errors.New("tls: application data record requested while in handshake")); + /* } */ case 10: + $s = 5; continue; + /* } else { */ case 4: + _r$2 = c.sendAlert(80); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return c.in$25.setErrorLocked(errors.New("tls: unknown record type requested")); + /* } */ case 5: + case 1: + /* Again: */ case 13: + if (c.rawInput === ptrType$11.nil) { + c.rawInput = c.in$25.newBlock(); + } + b = c.rawInput; + _r$3 = b.readFromUntil(c.conn, 5); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 15: + _tuple = $assertType(err, net.Error, true); + e = _tuple[0]; + ok = _tuple[1]; + if (!ok) { _v = true; $s = 19; continue s; } + _r$4 = e.Temporary(); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _v = !_r$4; case 19: + /* */ if (_v) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (_v) { */ case 17: + c.in$25.setErrorLocked(err); + /* } */ case 18: + $s = -1; return err; + /* } */ case 16: + typ = (((x = b.data, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) << 24 >>> 24)); + /* */ if ((want === 22) && (typ === 128)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if ((want === 22) && (typ === 128)) { */ case 21: + _r$5 = c.sendAlert(70); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return c.in$25.setErrorLocked((x$1 = c.newRecordHeaderError("unsupported SSLv2 handshake received"), new x$1.constructor.elem(x$1))); + /* } */ case 22: + vers = (((((x$2 = b.data, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) << 16 >>> 16)) << 8 << 16 >>> 16) | (((x$3 = b.data, (2 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 2])) << 16 >>> 16))) >>> 0; + n = ((((x$4 = b.data, (3 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 3])) >> 0)) << 8 >> 0) | (((x$5 = b.data, (4 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 4])) >> 0)); + /* */ if (c.haveVers && !((vers === c.vers))) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (c.haveVers && !((vers === c.vers))) { */ case 24: + _r$6 = c.sendAlert(70); /* */ $s = 26; case 26: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = fmt.Sprintf("received record with version %x when expecting version %x", new sliceType$8([new $Uint16(vers), new $Uint16(c.vers)])); /* */ $s = 27; case 27: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + msg = _r$7; + $s = -1; return c.in$25.setErrorLocked((x$6 = c.newRecordHeaderError(msg), new x$6.constructor.elem(x$6))); + /* } */ case 25: + /* */ if (n > 18432) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (n > 18432) { */ case 28: + _r$8 = c.sendAlert(22); /* */ $s = 30; case 30: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = fmt.Sprintf("oversized record received with length %d", new sliceType$8([new $Int(n)])); /* */ $s = 31; case 31: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + msg$1 = _r$9; + $s = -1; return c.in$25.setErrorLocked((x$7 = c.newRecordHeaderError(msg$1), new x$7.constructor.elem(x$7))); + /* } */ case 29: + /* */ if (!c.haveVers) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (!c.haveVers) { */ case 32: + /* */ if ((!((typ === 21)) && !((typ === want))) || vers >= 4096) { $s = 34; continue; } + /* */ $s = 35; continue; + /* if ((!((typ === 21)) && !((typ === want))) || vers >= 4096) { */ case 34: + _r$10 = c.sendAlert(10); /* */ $s = 36; case 36: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return c.in$25.setErrorLocked((x$8 = c.newRecordHeaderError("first record does not look like a TLS handshake"), new x$8.constructor.elem(x$8))); + /* } */ case 35: + /* } */ case 33: + _r$11 = b.readFromUntil(c.conn, 5 + n >> 0); /* */ $s = 37; case 37: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$1 = _r$11; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 38: + if ($interfaceIsEqual(err$1, io.EOF)) { + err$1 = io.ErrUnexpectedEOF; + } + _tuple$1 = $assertType(err$1, net.Error, true); + e$1 = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (!ok$1) { _v$1 = true; $s = 42; continue s; } + _r$12 = e$1.Temporary(); /* */ $s = 43; case 43: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _v$1 = !_r$12; case 42: + /* */ if (_v$1) { $s = 40; continue; } + /* */ $s = 41; continue; + /* if (_v$1) { */ case 40: + c.in$25.setErrorLocked(err$1); + /* } */ case 41: + $s = -1; return err$1; + /* } */ case 39: + _tuple$2 = c.in$25.splitBlock(b, 5 + n >> 0); + b = _tuple$2[0]; + c.rawInput = _tuple$2[1]; + _r$13 = c.in$25.decrypt(b); /* */ $s = 44; case 44: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$3 = _r$13; + ok$2 = _tuple$3[0]; + off = _tuple$3[1]; + alertValue = _tuple$3[2]; + /* */ if (!ok$2) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!ok$2) { */ case 45: + c.in$25.freeBlock(b); + _r$14 = c.sendAlert(alertValue); /* */ $s = 47; case 47: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$15 = c.in$25.setErrorLocked(_r$14); /* */ $s = 48; case 48: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return _r$15; + /* } */ case 46: + b.off = off; + data = $subslice(b.data, b.off); + /* */ if (data.$length > 16384) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (data.$length > 16384) { */ case 49: + _r$16 = c.sendAlert(22); /* */ $s = 51; case 51: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + err$2 = _r$16; + c.in$25.freeBlock(b); + $s = -1; return c.in$25.setErrorLocked(err$2); + /* } */ case 50: + if (!((typ === 21)) && data.$length > 0) { + c.warnCount = 0; + } + _2 = typ; + /* */ if (_2 === (21)) { $s = 53; continue; } + /* */ if (_2 === (20)) { $s = 54; continue; } + /* */ if (_2 === (23)) { $s = 55; continue; } + /* */ if (_2 === (22)) { $s = 56; continue; } + /* */ $s = 57; continue; + /* if (_2 === (21)) { */ case 53: + /* */ if (!((data.$length === 2))) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (!((data.$length === 2))) { */ case 59: + _r$17 = c.sendAlert(10); /* */ $s = 61; case 61: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$18 = c.in$25.setErrorLocked(_r$17); /* */ $s = 62; case 62: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _r$18; + /* break; */ $s = 52; continue; + /* } */ case 60: + if ((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 24 >>> 24)) === 0) { + c.in$25.setErrorLocked(io.EOF); + /* break; */ $s = 52; continue; + } + _3 = (0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]); + /* */ if (_3 === (1)) { $s = 64; continue; } + /* */ if (_3 === (2)) { $s = 65; continue; } + /* */ $s = 66; continue; + /* if (_3 === (1)) { */ case 64: + c.in$25.freeBlock(b); + c.warnCount = c.warnCount + (1) >> 0; + /* */ if (c.warnCount > 5) { $s = 68; continue; } + /* */ $s = 69; continue; + /* if (c.warnCount > 5) { */ case 68: + _r$19 = c.sendAlert(10); /* */ $s = 70; case 70: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _r$19; + $s = -1; return c.in$25.setErrorLocked(errors.New("tls: too many warn alerts")); + /* } */ case 69: + /* goto Again */ $s = 13; continue; + $s = 67; continue; + /* } else if (_3 === (2)) { */ case 65: + c.in$25.setErrorLocked(new net.OpError.ptr("remote error", "", $ifaceNil, $ifaceNil, new alert((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 24 >>> 24))))); + $s = 67; continue; + /* } else { */ case 66: + _r$20 = c.sendAlert(10); /* */ $s = 71; case 71: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _r$21 = c.in$25.setErrorLocked(_r$20); /* */ $s = 72; case 72: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$21; + /* } */ case 67: + case 63: + $s = 58; continue; + /* } else if (_2 === (20)) { */ case 54: + /* */ if (!((typ === want)) || !((data.$length === 1)) || !(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 1))) { $s = 73; continue; } + /* */ $s = 74; continue; + /* if (!((typ === want)) || !((data.$length === 1)) || !(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 1))) { */ case 73: + _r$22 = c.sendAlert(10); /* */ $s = 75; case 75: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _r$23 = c.in$25.setErrorLocked(_r$22); /* */ $s = 76; case 76: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _r$23; + /* break; */ $s = 52; continue; + /* } */ case 74: + /* */ if (c.hand.Len() > 0) { $s = 77; continue; } + /* */ $s = 78; continue; + /* if (c.hand.Len() > 0) { */ case 77: + _r$24 = c.sendAlert(10); /* */ $s = 79; case 79: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _r$25 = c.in$25.setErrorLocked(_r$24); /* */ $s = 80; case 80: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + _r$25; + /* break; */ $s = 52; continue; + /* } */ case 78: + err$3 = c.in$25.changeCipherSpec(); + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 81; continue; } + /* */ $s = 82; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 81: + _r$26 = c.sendAlert($assertType(err$3, alert)); /* */ $s = 83; case 83: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + _r$27 = c.in$25.setErrorLocked(_r$26); /* */ $s = 84; case 84: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } + _r$27; + /* } */ case 82: + $s = 58; continue; + /* } else if (_2 === (23)) { */ case 55: + /* */ if (!((typ === want))) { $s = 85; continue; } + /* */ $s = 86; continue; + /* if (!((typ === want))) { */ case 85: + _r$28 = c.sendAlert(10); /* */ $s = 87; case 87: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } + _r$29 = c.in$25.setErrorLocked(_r$28); /* */ $s = 88; case 88: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } + _r$29; + /* break; */ $s = 52; continue; + /* } */ case 86: + c.input = b; + b = ptrType$11.nil; + $s = 58; continue; + /* } else if (_2 === (22)) { */ case 56: + /* */ if (!((typ === want)) && !(c.isClient && !((c.config.Renegotiation === 0)))) { $s = 89; continue; } + /* */ $s = 90; continue; + /* if (!((typ === want)) && !(c.isClient && !((c.config.Renegotiation === 0)))) { */ case 89: + _r$30 = c.sendAlert(100); /* */ $s = 91; case 91: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } + _r$31 = c.in$25.setErrorLocked(_r$30); /* */ $s = 92; case 92: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } + $s = -1; return _r$31; + /* } */ case 90: + c.hand.Write(data); + $s = 58; continue; + /* } else { */ case 57: + _r$32 = c.sendAlert(10); /* */ $s = 93; case 93: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } + _r$33 = c.in$25.setErrorLocked(_r$32); /* */ $s = 94; case 94: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } + _r$33; + /* } */ case 58: + case 52: + if (!(b === ptrType$11.nil)) { + c.in$25.freeBlock(b); + } + $s = -1; return c.in$25.err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.readRecord }; } $f._1 = _1; $f._2 = _2; $f._3 = _3; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$27 = _r$27; $f._r$28 = _r$28; $f._r$29 = _r$29; $f._r$3 = _r$3; $f._r$30 = _r$30; $f._r$31 = _r$31; $f._r$32 = _r$32; $f._r$33 = _r$33; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._v = _v; $f._v$1 = _v$1; $f.alertValue = alertValue; $f.b = b; $f.c = c; $f.data = data; $f.e = e; $f.e$1 = e$1; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.msg = msg; $f.msg$1 = msg$1; $f.n = n; $f.off = off; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.typ = typ; $f.vers = vers; $f.want = want; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.readRecord = function(want) { return this.$val.readRecord(want); }; + Conn.ptr.prototype.sendAlertLocked = function(err) { + var _1, _r, _tuple, c, err, writeErr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _tuple = $f._tuple; c = $f.c; err = $f.err; writeErr = $f.writeErr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _1 = err; + if ((_1 === (100)) || (_1 === (0))) { + c.tmp[0] = 1; + } else { + c.tmp[0] = 2; + } + c.tmp[1] = ((err << 24 >>> 24)); + _r = c.writeRecordLocked(21, $subslice(new sliceType$7(c.tmp), 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + writeErr = _tuple[1]; + if (err === 0) { + $s = -1; return writeErr; + } + $s = -1; return c.out.setErrorLocked(new net.OpError.ptr("local error", "", $ifaceNil, $ifaceNil, new alert(err))); + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.sendAlertLocked }; } $f._1 = _1; $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.writeErr = writeErr; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.sendAlertLocked = function(err) { return this.$val.sendAlertLocked(err); }; + Conn.ptr.prototype.sendAlert = function(err) { + var _r, c, err, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; err = $f.err; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); + _r = c.sendAlertLocked(err); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.sendAlert }; } $f._r = _r; $f.c = c; $f.err = err; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.sendAlert = function(err) { return this.$val.sendAlert(err); }; + Conn.ptr.prototype.maxPayloadSizeForWrite = function(typ, explicitIVLen) { + var _r, _r$1, _r$2, _ref, blockSize, c, ciph, ciph$1, ciph$2, ciph$3, explicitIVLen, macSize, n, payloadBytes, pkt, typ, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; blockSize = $f.blockSize; c = $f.c; ciph = $f.ciph; ciph$1 = $f.ciph$1; ciph$2 = $f.ciph$2; ciph$3 = $f.ciph$3; explicitIVLen = $f.explicitIVLen; macSize = $f.macSize; n = $f.n; payloadBytes = $f.payloadBytes; pkt = $f.pkt; typ = $f.typ; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.config.DynamicRecordSizingDisabled || !((typ === 23))) { + $s = -1; return 16384; + } + if ((x = c.bytesSent, (x.$high > 0 || (x.$high === 0 && x.$low >= 131072)))) { + $s = -1; return 16384; + } + macSize = 0; + /* */ if (!($interfaceIsEqual(c.out.mac, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(c.out.mac, $ifaceNil))) { */ case 1: + _r = c.out.mac.Size(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + macSize = _r; + /* } */ case 2: + payloadBytes = 1203 - explicitIVLen >> 0; + /* */ if (!($interfaceIsEqual(c.out.cipher, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(c.out.cipher, $ifaceNil))) { */ case 4: + _ref = c.out.cipher; + /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref, cipher.AEAD, true)[1]) { $s = 7; continue; } + /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 6: + ciph = _ref; + payloadBytes = payloadBytes - (macSize) >> 0; + $s = 10; continue; + /* } else if ($assertType(_ref, cipher.AEAD, true)[1]) { */ case 7: + ciph$1 = _ref; + _r$1 = ciph$1.Overhead(); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + payloadBytes = payloadBytes - (_r$1) >> 0; + $s = 10; continue; + /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 8: + ciph$2 = _ref; + _r$2 = ciph$2.BlockSize(); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + blockSize = _r$2; + payloadBytes = ((payloadBytes & (~((blockSize - 1 >> 0)) >> 0))) - 1 >> 0; + payloadBytes = payloadBytes - (macSize) >> 0; + $s = 10; continue; + /* } else { */ case 9: + ciph$3 = _ref; + $panic(new $String("unknown cipher type")); + /* } */ case 10: + /* } */ case 5: + pkt = c.packetsSent; + c.packetsSent = (x$1 = c.packetsSent, x$2 = new $Int64(0, 1), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); + if ((pkt.$high > 0 || (pkt.$high === 0 && pkt.$low > 1000))) { + $s = -1; return 16384; + } + n = $imul(payloadBytes, (((x$3 = new $Int64(pkt.$high + 0, pkt.$low + 1), x$3.$low + ((x$3.$high >> 31) * 4294967296)) >> 0))); + if (n > 16384) { + n = 16384; + } + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.maxPayloadSizeForWrite }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f.blockSize = blockSize; $f.c = c; $f.ciph = ciph; $f.ciph$1 = ciph$1; $f.ciph$2 = ciph$2; $f.ciph$3 = ciph$3; $f.explicitIVLen = explicitIVLen; $f.macSize = macSize; $f.n = n; $f.payloadBytes = payloadBytes; $f.pkt = pkt; $f.typ = typ; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.maxPayloadSizeForWrite = function(typ, explicitIVLen) { return this.$val.maxPayloadSizeForWrite(typ, explicitIVLen); }; + Conn.ptr.prototype.write = function(data) { + var _r, _tuple, c, data, err, n, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; data = $f.data; err = $f.err; n = $f.n; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.buffering) { + c.sendBuf = $appendSlice(c.sendBuf, data); + $s = -1; return [data.$length, $ifaceNil]; + } + _r = c.conn.Write(data); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + c.bytesSent = (x = c.bytesSent, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.write }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.data = data; $f.err = err; $f.n = n; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.write = function(data) { return this.$val.write(data); }; + Conn.ptr.prototype.flush = function() { + var _r, _tuple, c, err, n, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.sendBuf.$length === 0) { + $s = -1; return [0, $ifaceNil]; + } + _r = c.conn.Write(c.sendBuf); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + c.bytesSent = (x = c.bytesSent, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + c.sendBuf = sliceType$7.nil; + c.buffering = false; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.flush }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.flush = function() { return this.$val.flush(); }; + Conn.ptr.prototype.writeRecordLocked = function(typ, data) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, _tuple$3, b, c, c$1, cbc, data, err, err$1, err$2, explicitIV, explicitIVIsSeq, explicitIVLen, m, maxPayload, n, ok, ok$1, typ, vers, x, x$1, x$2, x$3, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; b = $f.b; c = $f.c; c$1 = $f.c$1; cbc = $f.cbc; data = $f.data; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; explicitIV = $f.explicitIV; explicitIVIsSeq = $f.explicitIVIsSeq; explicitIVLen = $f.explicitIVLen; m = $f.m; maxPayload = $f.maxPayload; n = $f.n; ok = $f.ok; ok$1 = $f.ok$1; typ = $f.typ; vers = $f.vers; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + b = c.out.newBlock(); + $deferred.push([$methodVal(c.out, "freeBlock"), [b]]); + n = 0; + /* while (true) { */ case 1: + /* if (!(data.$length > 0)) { break; } */ if(!(data.$length > 0)) { $s = 2; continue; } + explicitIVLen = 0; + explicitIVIsSeq = false; + cbc = $ifaceNil; + /* */ if (c.out.version >= 770) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (c.out.version >= 770) { */ case 3: + ok = false; + _tuple = $assertType(c.out.cipher, cbcMode, true); + cbc = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (ok) { */ case 5: + _r = cbc.BlockSize(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + explicitIVLen = _r; + /* } */ case 6: + /* } */ case 4: + /* */ if (explicitIVLen === 0) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (explicitIVLen === 0) { */ case 8: + _tuple$1 = $assertType(c.out.cipher, aead, true); + c$1 = _tuple$1[0]; + ok$1 = _tuple$1[1]; + /* */ if (ok$1) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (ok$1) { */ case 10: + _r$1 = c$1.explicitNonceLen(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + explicitIVLen = _r$1; + explicitIVIsSeq = explicitIVLen > 0; + /* } */ case 11: + /* } */ case 9: + m = data.$length; + _r$2 = c.maxPayloadSizeForWrite(typ, explicitIVLen); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + maxPayload = _r$2; + if (m > maxPayload) { + m = maxPayload; + } + b.resize((5 + explicitIVLen >> 0) + m >> 0); + (x = b.data, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = ((typ << 24 >>> 24)))); + vers = c.vers; + if (vers === 0) { + vers = 769; + } + (x$1 = b.data, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1] = (((vers >>> 8 << 16 >>> 16) << 24 >>> 24)))); + (x$2 = b.data, (2 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 2] = ((vers << 24 >>> 24)))); + (x$3 = b.data, (3 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 3] = (((m >> 8 >> 0) << 24 >>> 24)))); + (x$4 = b.data, (4 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 4] = ((m << 24 >>> 24)))); + /* */ if (explicitIVLen > 0) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (explicitIVLen > 0) { */ case 14: + explicitIV = $subslice(b.data, 5, (5 + explicitIVLen >> 0)); + /* */ if (explicitIVIsSeq) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (explicitIVIsSeq) { */ case 16: + $copySlice(explicitIV, new sliceType$7(c.out.seq)); + $s = 18; continue; + /* } else { */ case 17: + _r$3 = io.ReadFull(c.config.rand(), explicitIV); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + /* } */ case 18: + /* } */ case 15: + $copySlice($subslice(b.data, (5 + explicitIVLen >> 0)), data); + _r$4 = c.out.encrypt(b, explicitIVLen); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = c.write(b.data); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [n, err$1]; + } + n = n + (m) >> 0; + data = $subslice(data, m); + /* } */ $s = 1; continue; case 2: + /* */ if (typ === 20) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (typ === 20) { */ case 22: + err$2 = c.out.changeCipherSpec(); + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 24: + _r$6 = c.sendAlertLocked($assertType(err$2, alert)); /* */ $s = 26; case 26: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [n, _r$6]; + /* } */ case 25: + /* } */ case 23: + $s = -1; return [n, $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.writeRecordLocked }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.b = b; $f.c = c; $f.c$1 = c$1; $f.cbc = cbc; $f.data = data; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.explicitIV = explicitIV; $f.explicitIVIsSeq = explicitIVIsSeq; $f.explicitIVLen = explicitIVLen; $f.m = m; $f.maxPayload = maxPayload; $f.n = n; $f.ok = ok; $f.ok$1 = ok$1; $f.typ = typ; $f.vers = vers; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.writeRecordLocked = function(typ, data) { return this.$val.writeRecordLocked(typ, data); }; + Conn.ptr.prototype.writeRecord = function(typ, data) { + var _r, c, data, typ, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; data = $f.data; typ = $f.typ; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); + _r = c.writeRecordLocked(typ, data); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.writeRecord }; } $f._r = _r; $f.c = c; $f.data = data; $f.typ = typ; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.writeRecord = function(typ, data) { return this.$val.writeRecord(typ, data); }; + Conn.ptr.prototype.readHandshake = function() { + var _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, data, err, err$1, err$2, err$3, m, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; c = $f.c; data = $f.data; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; m = $f.m; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + /* while (true) { */ case 1: + /* if (!(c.hand.Len() < 4)) { break; } */ if(!(c.hand.Len() < 4)) { $s = 2; continue; } + err = c.in$25.err; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + _r = c.readRecord(22); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err$1 = _r; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$1]; + } + /* } */ $s = 1; continue; case 2: + data = c.hand.Bytes(); + n = (((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) << 16 >> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0)) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); + /* */ if (n > 65536) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (n > 65536) { */ case 4: + _r$1 = c.sendAlertLocked(80); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = fmt.Errorf("tls: handshake message of length %d bytes exceeds maximum of %d bytes", new sliceType$8([new $Int(n), new $Int(65536)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = c.in$25.setErrorLocked(_r$2); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$3]; + /* } */ case 5: + /* while (true) { */ case 9: + /* if (!(c.hand.Len() < (4 + n >> 0))) { break; } */ if(!(c.hand.Len() < (4 + n >> 0))) { $s = 10; continue; } + err$2 = c.in$25.err; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$2]; + } + _r$4 = c.readRecord(22); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$3 = _r$4; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$3]; + } + /* } */ $s = 9; continue; case 10: + data = c.hand.Next(4 + n >> 0); + m = $ifaceNil; + _1 = (0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]); + /* */ if (_1 === (0)) { $s = 13; continue; } + /* */ if (_1 === (1)) { $s = 14; continue; } + /* */ if (_1 === (2)) { $s = 15; continue; } + /* */ if (_1 === (4)) { $s = 16; continue; } + /* */ if (_1 === (11)) { $s = 17; continue; } + /* */ if (_1 === (13)) { $s = 18; continue; } + /* */ if (_1 === (22)) { $s = 19; continue; } + /* */ if (_1 === (12)) { $s = 20; continue; } + /* */ if (_1 === (14)) { $s = 21; continue; } + /* */ if (_1 === (16)) { $s = 22; continue; } + /* */ if (_1 === (15)) { $s = 23; continue; } + /* */ if (_1 === (67)) { $s = 24; continue; } + /* */ if (_1 === (20)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (_1 === (0)) { */ case 13: + m = new helloRequestMsg.ptr(); + $s = 27; continue; + /* } else if (_1 === (1)) { */ case 14: + m = new clientHelloMsg.ptr(sliceType$7.nil, 0, sliceType$7.nil, sliceType$7.nil, sliceType$2.nil, sliceType$7.nil, false, "", false, false, sliceType$3.nil, sliceType$7.nil, false, sliceType$7.nil, sliceType$6.nil, sliceType$7.nil, false, sliceType$1.nil); + $s = 27; continue; + /* } else if (_1 === (2)) { */ case 15: + m = new serverHelloMsg.ptr(sliceType$7.nil, 0, sliceType$7.nil, sliceType$7.nil, 0, 0, false, sliceType$1.nil, false, sliceType$9.nil, false, sliceType$7.nil, false, ""); + $s = 27; continue; + /* } else if (_1 === (4)) { */ case 16: + m = new newSessionTicketMsg.ptr(sliceType$7.nil, sliceType$7.nil); + $s = 27; continue; + /* } else if (_1 === (11)) { */ case 17: + m = new certificateMsg.ptr(sliceType$7.nil, sliceType$9.nil); + $s = 27; continue; + /* } else if (_1 === (13)) { */ case 18: + m = new certificateRequestMsg.ptr(sliceType$7.nil, c.vers >= 771, sliceType$7.nil, sliceType$6.nil, sliceType$9.nil); + $s = 27; continue; + /* } else if (_1 === (22)) { */ case 19: + m = new certificateStatusMsg.ptr(sliceType$7.nil, 0, sliceType$7.nil); + $s = 27; continue; + /* } else if (_1 === (12)) { */ case 20: + m = new serverKeyExchangeMsg.ptr(sliceType$7.nil, sliceType$7.nil); + $s = 27; continue; + /* } else if (_1 === (14)) { */ case 21: + m = new serverHelloDoneMsg.ptr(); + $s = 27; continue; + /* } else if (_1 === (16)) { */ case 22: + m = new clientKeyExchangeMsg.ptr(sliceType$7.nil, sliceType$7.nil); + $s = 27; continue; + /* } else if (_1 === (15)) { */ case 23: + m = new certificateVerifyMsg.ptr(sliceType$7.nil, c.vers >= 771, 0, sliceType$7.nil); + $s = 27; continue; + /* } else if (_1 === (67)) { */ case 24: + m = new nextProtoMsg.ptr(sliceType$7.nil, ""); + $s = 27; continue; + /* } else if (_1 === (20)) { */ case 25: + m = new finishedMsg.ptr(sliceType$7.nil, sliceType$7.nil); + $s = 27; continue; + /* } else { */ case 26: + _r$5 = c.sendAlert(10); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = c.in$25.setErrorLocked(_r$5); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$6]; + /* } */ case 27: + case 12: + data = $appendSlice((sliceType$7.nil), data); + _r$7 = m.unmarshal(data); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + /* */ if (!_r$7) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!_r$7) { */ case 30: + _r$8 = c.sendAlert(10); /* */ $s = 33; case 33: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$9 = c.in$25.setErrorLocked(_r$8); /* */ $s = 34; case 34: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$9]; + /* } */ case 31: + $s = -1; return [m, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.readHandshake }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f.c = c; $f.data = data; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.m = m; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.readHandshake = function() { return this.$val.readHandshake(); }; + Conn.ptr.prototype.Write = function(b) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, err, err$1, err$2, err$3, m, n, n$1, ok, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; c = $f.c; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; m = $f.m; n = $f.n; n$1 = $f.n$1; ok = $f.ok; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + while (true) { + x = atomic.LoadInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$12(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c)))); + if (!(((x & 1) === 0))) { + $s = -1; return [0, errClosed]; + } + if (atomic.CompareAndSwapInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$12(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), x, x + 2 >> 0)) { + $deferred.push([atomic.AddInt32, [(c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$12(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), -2]]); + break; + } + } + _r = c.Handshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [0, err]; + } + $r = c.out.Mutex.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); + err$1 = c.out.err; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [0, err$1]; + } + if (!c.handshakeComplete()) { + $s = -1; return [0, new alert(80)]; + } + if (c.closeNotifySent) { + $s = -1; return [0, errShutdown]; + } + m = 0; + /* */ if (b.$length > 1 && c.vers <= 769) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (b.$length > 1 && c.vers <= 769) { */ case 3: + _tuple = $assertType(c.out.cipher, cipher.BlockMode, true); + ok = _tuple[1]; + /* */ if (ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (ok) { */ case 5: + _r$1 = c.writeRecordLocked(23, $subslice(b, 0, 1)); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err$2 = _tuple$1[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [n, c.out.setErrorLocked(err$2)]; + } + _tmp = 1; + _tmp$1 = $subslice(b, 1); + m = _tmp; + b = _tmp$1; + /* } */ case 6: + /* } */ case 4: + _r$2 = c.writeRecordLocked(23, b); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + n$1 = _tuple$2[0]; + err$3 = _tuple$2[1]; + $s = -1; return [n$1 + m >> 0, c.out.setErrorLocked(err$3)]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.Write }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.m = m; $f.n = n; $f.n$1 = n$1; $f.ok = ok; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.Write = function(b) { return this.$val.Write(b); }; + Conn.ptr.prototype.handleRenegotiation = function() { + var _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, msg, ok, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; msg = $f.msg; ok = $f.ok; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + _r = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = $assertType(msg, ptrType$13, true); + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$1 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return new alert(10); + /* } */ case 3: + /* */ if (!c.isClient) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!c.isClient) { */ case 5: + _r$2 = c.sendAlert(100); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 6: + _1 = c.config.Renegotiation; + /* */ if (_1 === (0)) { $s = 9; continue; } + /* */ if (_1 === (1)) { $s = 10; continue; } + /* */ if (_1 === (2)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (_1 === (0)) { */ case 9: + _r$3 = c.sendAlert(100); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } else if (_1 === (1)) { */ case 10: + /* */ if (c.handshakes > 1) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (c.handshakes > 1) { */ case 15: + _r$4 = c.sendAlert(100); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 16: + $s = 13; continue; + /* } else if (_1 === (2)) { */ case 11: + $s = 13; continue; + /* } else { */ case 12: + _r$5 = c.sendAlert(80); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return errors.New("tls: unknown Renegotiation value"); + /* } */ case 13: + case 8: + $r = c.handshakeMutex.Lock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); + atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$14(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 0); + _r$6 = c.clientHandshake(); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + c.handshakeErr = _r$6; + if ($interfaceIsEqual(c.handshakeErr, $ifaceNil)) { + c.handshakes = c.handshakes + (1) >> 0; + } + $s = -1; return c.handshakeErr; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.handleRenegotiation }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.msg = msg; $f.ok = ok; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.handleRenegotiation = function() { return this.$val.handleRenegotiation(); }; + Conn.ptr.prototype.Read = function(b) { + var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, c, emptyRecordCount, err, err$1, err$2, err$3, n, recErr, ri, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; b = $f.b; c = $f.c; emptyRecordCount = $f.emptyRecordCount; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; n = $f.n; recErr = $f.recErr; ri = $f.ri; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + c = this; + _r = c.Handshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + if (b.$length === 0) { + $s = -1; return [n, err]; + } + $r = c.in$25.Mutex.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.in$25.Mutex, "Unlock"), []]); + emptyRecordCount = 0; + /* while (true) { */ case 3: + /* if (!(emptyRecordCount <= 100)) { break; } */ if(!(emptyRecordCount <= 100)) { $s = 4; continue; } + /* while (true) { */ case 5: + /* if (!(c.input === ptrType$11.nil && $interfaceIsEqual(c.in$25.err, $ifaceNil))) { break; } */ if(!(c.input === ptrType$11.nil && $interfaceIsEqual(c.in$25.err, $ifaceNil))) { $s = 6; continue; } + _r$1 = c.readRecord(23); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = 0; + _tmp$1 = err$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* */ if (c.hand.Len() > 0) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (c.hand.Len() > 0) { */ case 8: + _r$2 = c.handleRenegotiation(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$2 = _r$2; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$2 = 0; + _tmp$3 = err$2; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + /* } */ case 9: + /* } */ $s = 5; continue; case 6: + err$3 = c.in$25.err; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = err$3; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + _tuple = c.input.Read(b); + n = _tuple[0]; + err = _tuple[1]; + if (c.input.off >= c.input.data.$length) { + c.in$25.freeBlock(c.input); + c.input = ptrType$11.nil; + } + ri = c.rawInput; + /* */ if (!(ri === ptrType$11.nil) && !((n === 0)) && $interfaceIsEqual(err, $ifaceNil) && c.input === ptrType$11.nil && ri.data.$length > 0 && ((((x = ri.data, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) << 24 >>> 24)) === 21)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!(ri === ptrType$11.nil) && !((n === 0)) && $interfaceIsEqual(err, $ifaceNil) && c.input === ptrType$11.nil && ri.data.$length > 0 && ((((x = ri.data, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) << 24 >>> 24)) === 21)) { */ case 11: + _r$3 = c.readRecord(23); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + recErr = _r$3; + if (!($interfaceIsEqual(recErr, $ifaceNil))) { + err = recErr; + } + /* } */ case 12: + if (!((n === 0)) || !($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = n; + _tmp$7 = err; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + } + emptyRecordCount = emptyRecordCount + (1) >> 0; + /* } */ $s = 3; continue; case 4: + _tmp$8 = 0; + _tmp$9 = io.ErrNoProgress; + n = _tmp$8; + err = _tmp$9; + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.b = b; $f.c = c; $f.emptyRecordCount = emptyRecordCount; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.n = n; $f.recErr = recErr; $f.ri = ri; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.Read = function(b) { return this.$val.Read(b); }; + Conn.ptr.prototype.Close = function() { + var _r, _r$1, _r$2, alertErr, c, err, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; alertErr = $f.alertErr; c = $f.c; err = $f.err; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + x = 0; + while (true) { + x = atomic.LoadInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$12(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c)))); + if (!(((x & 1) === 0))) { + $s = -1; return errClosed; + } + if (atomic.CompareAndSwapInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$12(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), x, x | 1)) { + break; + } + } + /* */ if (!((x === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((x === 0))) { */ case 1: + _r = c.conn.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + alertErr = $ifaceNil; + /* */ if (c.handshakeComplete()) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (c.handshakeComplete()) { */ case 4: + _r$1 = c.closeNotify(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + alertErr = _r$1; + /* } */ case 5: + _r$2 = c.conn.Close(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $s = -1; return alertErr; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.Close }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.alertErr = alertErr; $f.c = c; $f.err = err; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.Close = function() { return this.$val.Close(); }; + Conn.ptr.prototype.CloseWrite = function() { + var _r, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!c.handshakeComplete()) { + $s = -1; return errEarlyCloseWrite; + } + _r = c.closeNotify(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.CloseWrite }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; + Conn.ptr.prototype.closeNotify = function() { + var _r, c, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); + /* */ if (!c.closeNotifySent) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!c.closeNotifySent) { */ case 2: + _r = c.sendAlertLocked(0); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + c.closeNotifyErr = _r; + c.closeNotifySent = true; + /* } */ case 3: + $s = -1; return c.closeNotifyErr; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.closeNotify }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.closeNotify = function() { return this.$val.closeNotify(); }; + Conn.ptr.prototype.Handshake = function() { + var _r, _r$1, _r$2, c, err, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; c = $f.c; err = $f.err; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); + err = c.handshakeErr; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if (c.handshakeComplete()) { + $s = -1; return $ifaceNil; + } + $r = c.in$25.Mutex.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.in$25.Mutex, "Unlock"), []]); + /* */ if (c.isClient) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (c.isClient) { */ case 3: + _r = c.clientHandshake(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + c.handshakeErr = _r; + $s = 5; continue; + /* } else { */ case 4: + _r$1 = c.serverHandshake(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + c.handshakeErr = _r$1; + /* } */ case 5: + /* */ if ($interfaceIsEqual(c.handshakeErr, $ifaceNil)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($interfaceIsEqual(c.handshakeErr, $ifaceNil)) { */ case 8: + c.handshakes = c.handshakes + (1) >> 0; + $s = 10; continue; + /* } else { */ case 9: + _r$2 = c.flush(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 10: + if ($interfaceIsEqual(c.handshakeErr, $ifaceNil) && !c.handshakeComplete()) { + $panic(new $String("handshake should have had a result.")); + } + $s = -1; return c.handshakeErr; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.Handshake }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.c = c; $f.err = err; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.Handshake = function() { return this.$val.Handshake(); }; + Conn.ptr.prototype.ConnectionState = function() { + var c, state, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; state = $f.state; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); + state = new ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$9.nil, sliceType$7.nil, $throwNilPointerError, sliceType$7.nil); + state.HandshakeComplete = c.handshakeComplete(); + state.ServerName = c.serverName; + if (state.HandshakeComplete) { + state.Version = c.vers; + state.NegotiatedProtocol = c.clientProtocol; + state.DidResume = c.didResume; + state.NegotiatedProtocolIsMutual = !c.clientProtocolFallback; + state.CipherSuite = c.cipherSuite; + state.PeerCertificates = c.peerCertificates; + state.VerifiedChains = c.verifiedChains; + state.SignedCertificateTimestamps = c.scts; + state.OCSPResponse = c.ocspResponse; + if (!c.didResume) { + if (c.clientFinishedIsFirst) { + state.TLSUnique = new sliceType$7(c.clientFinished); + } else { + state.TLSUnique = new sliceType$7(c.serverFinished); + } + } + if (!((c.config.Renegotiation === 0))) { + state.ekm = noExportedKeyingMaterial; + } else { + state.ekm = c.ekm; + } + } + $s = -1; return state; + /* */ } return; } } catch(err) { $err = err; $s = -1; return new ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$9.nil, sliceType$7.nil, $throwNilPointerError, sliceType$7.nil); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.ConnectionState }; } $f.c = c; $f.state = state; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.ConnectionState = function() { return this.$val.ConnectionState(); }; + Conn.ptr.prototype.OCSPResponse = function() { + var c, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); + $s = -1; return c.ocspResponse; + /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType$7.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.OCSPResponse }; } $f.c = c; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.OCSPResponse = function() { return this.$val.OCSPResponse(); }; + Conn.ptr.prototype.VerifyHostname = function(host) { + var c, host, x, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; host = $f.host; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); + if (!c.isClient) { + $s = -1; return errors.New("tls: VerifyHostname called on TLS server connection"); + } + if (!c.handshakeComplete()) { + $s = -1; return errors.New("tls: handshake has not yet been performed"); + } + if (c.verifiedChains.$length === 0) { + $s = -1; return errors.New("tls: handshake did not verify certificate chain"); + } + $s = -1; return (x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).VerifyHostname(host); + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.VerifyHostname }; } $f.c = c; $f.host = host; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Conn.prototype.VerifyHostname = function(host) { return this.$val.VerifyHostname(host); }; + Conn.ptr.prototype.handshakeComplete = function() { + var c; + c = this; + return atomic.LoadUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$14(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c)))) === 1; + }; + Conn.prototype.handshakeComplete = function() { return this.$val.handshakeComplete(); }; + makeClientHello = function(config) { + var _i, _i$1, _i$2, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, _tuple, config, err, hello, l, nextProtosLength, possibleCipherSuites, proto, suite, suiteId, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; config = $f.config; err = $f.err; hello = $f.hello; l = $f.l; nextProtosLength = $f.nextProtosLength; possibleCipherSuites = $f.possibleCipherSuites; proto = $f.proto; suite = $f.suite; suiteId = $f.suiteId; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ((config.ServerName.length === 0) && !config.InsecureSkipVerify) { + $s = -1; return [ptrType$16.nil, errors.New("tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config")]; + } + nextProtosLength = 0; + _ref = config.NextProtos; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + proto = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + l = proto.length; + if ((l === 0) || l > 255) { + $s = -1; return [ptrType$16.nil, errors.New("tls: invalid NextProtos value")]; + } else { + nextProtosLength = nextProtosLength + ((1 + l >> 0)) >> 0; + } + _i++; + } + if (nextProtosLength > 65535) { + $s = -1; return [ptrType$16.nil, errors.New("tls: NextProtos values too large")]; + } + hello = new clientHelloMsg.ptr(sliceType$7.nil, config.maxVersion(), $makeSlice(sliceType$7, 32), sliceType$7.nil, sliceType$2.nil, new sliceType$7([0]), config.NextProtos.$length > 0, hostnameInSNI(config.ServerName), true, true, config.curvePreferences(), new sliceType$7([0]), false, sliceType$7.nil, sliceType$6.nil, sliceType$7.nil, true, config.NextProtos); + _r = config.cipherSuites(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + possibleCipherSuites = _r; + hello.cipherSuites = $makeSlice(sliceType$2, 0, possibleCipherSuites.$length); + _ref$1 = possibleCipherSuites; + _i$1 = 0; + /* while (true) { */ case 2: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 3; continue; } + suiteId = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _ref$2 = cipherSuites; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + suite = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + if (!((suite.id === suiteId))) { + _i$2++; + continue; + } + if (hello.vers < 771 && !(((suite.flags & 4) === 0))) { + _i$2++; + continue; + } + hello.cipherSuites = $append(hello.cipherSuites, suiteId); + _i$1++; + /* continue NextCipherSuite; */ $s = 2; continue s; + } + _i$1++; + /* } */ $s = 2; continue; case 3: + _r$1 = io.ReadFull(config.rand(), hello.random); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: + _r$2 = err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = errors.New("tls: short read from Rand: " + _r$2); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$3]; + /* } */ case 6: + if (hello.vers >= 771) { + hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms; + } + $s = -1; return [hello, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: makeClientHello }; } $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f.config = config; $f.err = err; $f.hello = hello; $f.l = l; $f.nextProtosLength = nextProtosLength; $f.possibleCipherSuites = possibleCipherSuites; $f.proto = proto; $f.suite = suite; $f.suiteId = suiteId; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.ptr.prototype.clientHandshake = function() { + var _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, _tuple$1, _tuple$2, c, cacheKey, candidateSession, cipherSuiteOk, err, err$1, hello, hs, id, ok, session, sessionCache, versOk, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; c = $f.c; cacheKey = $f.cacheKey; candidateSession = $f.candidateSession; cipherSuiteOk = $f.cipherSuiteOk; err = $f.err; err$1 = $f.err$1; hello = $f.hello; hs = $f.hs; id = $f.id; ok = $f.ok; session = $f.session; sessionCache = $f.sessionCache; versOk = $f.versOk; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.config === ptrType$5.nil) { + c.config = defaultConfig(); + } + c.didResume = false; + _r = makeClientHello(c.config); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + hello = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if (c.handshakes > 0) { + hello.secureRenegotiation = new sliceType$7(c.clientFinished); + } + session = ptrType$10.nil; + cacheKey = ""; + sessionCache = c.config.ClientSessionCache; + if (c.config.SessionTicketsDisabled) { + sessionCache = $ifaceNil; + } + if (!($interfaceIsEqual(sessionCache, $ifaceNil))) { + hello.ticketSupported = true; + } + /* */ if (!($interfaceIsEqual(sessionCache, $ifaceNil)) && (c.handshakes === 0)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(sessionCache, $ifaceNil)) && (c.handshakes === 0)) { */ case 2: + _r$1 = c.conn.RemoteAddr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = clientSessionCacheKey(_r$1, c.config); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + cacheKey = _r$2; + _r$3 = sessionCache.Get(cacheKey); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + candidateSession = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + cipherSuiteOk = false; + _ref = hello.cipherSuites; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (id === candidateSession.cipherSuite) { + cipherSuiteOk = true; + break; + } + _i++; + } + versOk = candidateSession.vers >= c.config.minVersion() && candidateSession.vers <= c.config.maxVersion(); + if (versOk && cipherSuiteOk) { + session = candidateSession; + } + } + /* } */ case 3: + /* */ if (!(session === ptrType$10.nil)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(session === ptrType$10.nil)) { */ case 7: + hello.sessionTicket = session.sessionTicket; + hello.sessionId = $makeSlice(sliceType$7, 16); + _r$4 = io.ReadFull(c.config.rand(), hello.sessionId); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 10: + _r$5 = err$1.Error(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = errors.New("tls: short read from Rand: " + _r$5); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 11: + /* } */ case 8: + hs = new clientHandshakeState.ptr(c, ptrType$18.nil, hello, ptrType$1.nil, new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$7.nil, 0, $throwNilPointerError), sliceType$7.nil, session); + _r$7 = hs.handshake(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err = _r$7; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (!($interfaceIsEqual(sessionCache, $ifaceNil)) && !(hs.session === ptrType$10.nil) && !(session === hs.session)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!($interfaceIsEqual(sessionCache, $ifaceNil)) && !(hs.session === ptrType$10.nil) && !(session === hs.session)) { */ case 15: + $r = sessionCache.Put(cacheKey, hs.session); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 16: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.clientHandshake }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.c = c; $f.cacheKey = cacheKey; $f.candidateSession = candidateSession; $f.cipherSuiteOk = cipherSuiteOk; $f.err = err; $f.err$1 = err$1; $f.hello = hello; $f.hs = hs; $f.id = id; $f.ok = ok; $f.session = session; $f.sessionCache = sessionCache; $f.versOk = versOk; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.clientHandshake = function() { return this.$val.clientHandshake(); }; + clientHandshakeState.ptr.prototype.handshake = function() { + var _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, err, err$1, err$10, err$11, err$12, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, isResume, msg, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; c = $f.c; err = $f.err; err$1 = $f.err$1; err$10 = $f.err$10; err$11 = $f.err$11; err$12 = $f.err$12; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; err$7 = $f.err$7; err$8 = $f.err$8; err$9 = $f.err$9; hs = $f.hs; isResume = $f.isResume; msg = $f.msg; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.writeRecord(22, hs.hello.marshal()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$1 = c.readHandshake(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + msg = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + ok = false; + _tuple$2 = $assertType(msg, ptrType$18, true); + hs.serverHello = _tuple$2[0]; + ok = _tuple$2[1]; + /* */ if (!ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!ok) { */ case 3: + _r$2 = c.sendAlert(10); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = unexpectedMessageError(hs.serverHello, msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 4: + _r$4 = hs.pickTLSVersion(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$1 = _r$4; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$5 = hs.pickCipherSuite(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$1 = _r$5; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$6 = hs.processServerHello(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$3 = _r$6; + isResume = _tuple$3[0]; + err$1 = _tuple$3[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$7 = newFinishedHash(c.vers, hs.suite); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + finishedHash.copy(hs.finishedHash, _r$7); + if (isResume || ((c.config.Certificates.$length === 0) && c.config.GetClientCertificate === $throwNilPointerError)) { + hs.finishedHash.discardHandshakeBuffer(); + } + _r$8 = hs.finishedHash.Write(hs.hello.marshal()); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = hs.finishedHash.Write(hs.serverHello.marshal()); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + c.buffering = true; + /* */ if (isResume) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (isResume) { */ case 13: + _r$10 = hs.establishKeys(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err$2 = _r$10; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + _r$11 = hs.readSessionTicket(); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$3 = _r$11; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + _r$12 = hs.readFinished(new sliceType$7(c.serverFinished)); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + err$4 = _r$12; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + c.clientFinishedIsFirst = false; + _r$13 = hs.sendFinished(new sliceType$7(c.clientFinished)); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + err$5 = _r$13; + if (!($interfaceIsEqual(err$5, $ifaceNil))) { + $s = -1; return err$5; + } + _r$14 = c.flush(); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$4 = _r$14; + err$6 = _tuple$4[1]; + if (!($interfaceIsEqual(err$6, $ifaceNil))) { + $s = -1; return err$6; + } + $s = 15; continue; + /* } else { */ case 14: + _r$15 = hs.doFullHandshake(); /* */ $s = 21; case 21: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + err$7 = _r$15; + if (!($interfaceIsEqual(err$7, $ifaceNil))) { + $s = -1; return err$7; + } + _r$16 = hs.establishKeys(); /* */ $s = 22; case 22: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + err$8 = _r$16; + if (!($interfaceIsEqual(err$8, $ifaceNil))) { + $s = -1; return err$8; + } + _r$17 = hs.sendFinished(new sliceType$7(c.clientFinished)); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + err$9 = _r$17; + if (!($interfaceIsEqual(err$9, $ifaceNil))) { + $s = -1; return err$9; + } + _r$18 = c.flush(); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _tuple$5 = _r$18; + err$10 = _tuple$5[1]; + if (!($interfaceIsEqual(err$10, $ifaceNil))) { + $s = -1; return err$10; + } + c.clientFinishedIsFirst = true; + _r$19 = hs.readSessionTicket(); /* */ $s = 25; case 25: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + err$11 = _r$19; + if (!($interfaceIsEqual(err$11, $ifaceNil))) { + $s = -1; return err$11; + } + _r$20 = hs.readFinished(new sliceType$7(c.serverFinished)); /* */ $s = 26; case 26: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + err$12 = _r$20; + if (!($interfaceIsEqual(err$12, $ifaceNil))) { + $s = -1; return err$12; + } + /* } */ case 15: + c.ekm = ekmFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.hello.random, hs.serverHello.random); + c.didResume = isResume; + atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$14(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 1); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.handshake }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.err$10 = err$10; $f.err$11 = err$11; $f.err$12 = err$12; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.err$7 = err$7; $f.err$8 = err$8; $f.err$9 = err$9; $f.hs = hs; $f.isResume = isResume; $f.msg = msg; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.handshake = function() { return this.$val.handshake(); }; + clientHandshakeState.ptr.prototype.pickTLSVersion = function() { + var _r, _r$1, _tuple, hs, ok, vers, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; hs = $f.hs; ok = $f.ok; vers = $f.vers; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + _tuple = hs.c.config.mutualVersion(hs.serverHello.vers); + vers = _tuple[0]; + ok = _tuple[1]; + /* */ if (!ok || vers < 769) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!ok || vers < 769) { */ case 1: + _r = hs.c.sendAlert(70); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = fmt.Errorf("tls: server selected unsupported protocol version %x", new sliceType$8([new $Uint16(hs.serverHello.vers)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + hs.c.vers = vers; + hs.c.haveVers = true; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.pickTLSVersion }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.hs = hs; $f.ok = ok; $f.vers = vers; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.pickTLSVersion = function() { return this.$val.pickTLSVersion(); }; + clientHandshakeState.ptr.prototype.pickCipherSuite = function() { + var _r, hs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; hs = $f.hs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + hs.suite = mutualCipherSuite(hs.hello.cipherSuites, hs.serverHello.cipherSuite); + /* */ if (hs.suite === ptrType$1.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (hs.suite === ptrType$1.nil) { */ case 1: + _r = hs.c.sendAlert(40); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return errors.New("tls: server chose an unconfigured cipher suite"); + /* } */ case 2: + hs.c.cipherSuite = hs.suite.id; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.pickCipherSuite }; } $f._r = _r; $f.hs = hs; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.pickCipherSuite = function() { return this.$val.pickCipherSuite(); }; + clientHandshakeState.ptr.prototype.doFullHandshake = function() { + var _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, asn1Data, c, cert, cert$1, certMsg, certReq, certRequested, certVerify, certs, chainToSend, ckx, cs, digest, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, hashFunc, hs, i, i$1, key, keyAgreement$1, msg, ok, ok$1, opts, preMasterSecret, shd, sigType, signOpts, signatureAlgorithm, skx, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$27 = $f._r$27; _r$28 = $f._r$28; _r$29 = $f._r$29; _r$3 = $f._r$3; _r$30 = $f._r$30; _r$31 = $f._r$31; _r$32 = $f._r$32; _r$33 = $f._r$33; _r$34 = $f._r$34; _r$35 = $f._r$35; _r$36 = $f._r$36; _r$37 = $f._r$37; _r$38 = $f._r$38; _r$39 = $f._r$39; _r$4 = $f._r$4; _r$40 = $f._r$40; _r$41 = $f._r$41; _r$42 = $f._r$42; _r$43 = $f._r$43; _r$44 = $f._r$44; _r$45 = $f._r$45; _r$46 = $f._r$46; _r$47 = $f._r$47; _r$48 = $f._r$48; _r$49 = $f._r$49; _r$5 = $f._r$5; _r$50 = $f._r$50; _r$51 = $f._r$51; _r$52 = $f._r$52; _r$53 = $f._r$53; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$11 = $f._tuple$11; _tuple$12 = $f._tuple$12; _tuple$13 = $f._tuple$13; _tuple$14 = $f._tuple$14; _tuple$15 = $f._tuple$15; _tuple$16 = $f._tuple$16; _tuple$17 = $f._tuple$17; _tuple$18 = $f._tuple$18; _tuple$19 = $f._tuple$19; _tuple$2 = $f._tuple$2; _tuple$20 = $f._tuple$20; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; asn1Data = $f.asn1Data; c = $f.c; cert = $f.cert; cert$1 = $f.cert$1; certMsg = $f.certMsg; certReq = $f.certReq; certRequested = $f.certRequested; certVerify = $f.certVerify; certs = $f.certs; chainToSend = $f.chainToSend; ckx = $f.ckx; cs = $f.cs; digest = $f.digest; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; err$7 = $f.err$7; hashFunc = $f.hashFunc; hs = $f.hs; i = $f.i; i$1 = $f.i$1; key = $f.key; keyAgreement$1 = $f.keyAgreement$1; msg = $f.msg; ok = $f.ok; ok$1 = $f.ok$1; opts = $f.opts; preMasterSecret = $f.preMasterSecret; shd = $f.shd; sigType = $f.sigType; signOpts = $f.signOpts; signatureAlgorithm = $f.signatureAlgorithm; skx = $f.skx; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = $assertType(msg, ptrType$19, true); + certMsg = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok || (certMsg.certificates.$length === 0)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok || (certMsg.certificates.$length === 0)) { */ case 2: + _r$1 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = unexpectedMessageError(certMsg, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 3: + _r$3 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* */ if (c.handshakes === 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (c.handshakes === 0) { */ case 7: + certs = $makeSlice(sliceType$10, certMsg.certificates.$length); + _ref = certMsg.certificates; + _i = 0; + /* while (true) { */ case 10: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 11; continue; } + i = _i; + asn1Data = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$4 = x509.ParseCertificate(asn1Data); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + cert = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 13: + _r$5 = c.sendAlert(42); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = err$1.Error(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = errors.New("tls: failed to parse certificate from server: " + _r$6); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 14: + ((i < 0 || i >= certs.$length) ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + i] = cert); + _i++; + /* } */ $s = 10; continue; case 11: + /* */ if (!c.config.InsecureSkipVerify) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!c.config.InsecureSkipVerify) { */ case 18: + _r$8 = c.config.time(); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + opts = new x509.VerifyOptions.ptr(c.config.ServerName, x509.NewCertPool(), c.config.RootCAs, $clone(_r$8, time.Time), sliceType$12.nil, 0); + _ref$1 = certs; + _i$1 = 0; + /* while (true) { */ case 21: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 22; continue; } + i$1 = _i$1; + cert$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i$1 === 0) { + _i$1++; + /* continue; */ $s = 21; continue; + } + opts.Intermediates.AddCert(cert$1); + _i$1++; + /* } */ $s = 21; continue; case 22: + _r$9 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).Verify($clone(opts, x509.VerifyOptions)); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$3 = _r$9; + c.verifiedChains = _tuple$3[0]; + err = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 24: + _r$10 = c.sendAlert(42); /* */ $s = 26; case 26: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return err; + /* } */ case 25: + /* } */ case 19: + /* */ if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { */ case 27: + _r$11 = c.config.VerifyPeerCertificate(certMsg.certificates, c.verifiedChains); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$2 = _r$11; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 30: + _r$12 = c.sendAlert(42); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + $s = -1; return err$2; + /* } */ case 31: + /* } */ case 28: + _ref$2 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey; + /* */ if ($assertType(_ref$2, ptrType$2, true)[1] || $assertType(_ref$2, ptrType$3, true)[1]) { $s = 33; continue; } + /* */ $s = 34; continue; + /* switch (0) { default: if ($assertType(_ref$2, ptrType$2, true)[1] || $assertType(_ref$2, ptrType$3, true)[1]) { */ case 33: + /* break; */ $s = 35; continue; + $s = 35; continue; + /* } else { */ case 34: + _r$13 = c.sendAlert(43); /* */ $s = 36; case 36: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + _r$14 = fmt.Errorf("tls: server's certificate contains an unsupported type of public key: %T", new sliceType$8([(0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey])); /* */ $s = 37; case 37: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $s = -1; return _r$14; + /* } } */ case 35: + c.peerCertificates = certs; + $s = 9; continue; + /* } else { */ case 8: + /* */ if (!bytes.Equal((x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).Raw, (x$1 = certMsg.certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if (!bytes.Equal((x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).Raw, (x$1 = certMsg.certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))) { */ case 38: + _r$15 = c.sendAlert(42); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _r$15; + $s = -1; return errors.New("tls: server's identity changed during renegotiation"); + /* } */ case 39: + /* } */ case 9: + _r$16 = c.readHandshake(); /* */ $s = 41; case 41: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$4 = _r$16; + msg = _tuple$4[0]; + err = _tuple$4[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$5 = $assertType(msg, ptrType$21, true); + cs = _tuple$5[0]; + ok = _tuple$5[1]; + /* */ if (ok) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (ok) { */ case 42: + /* */ if (!hs.serverHello.ocspStapling) { $s = 44; continue; } + /* */ $s = 45; continue; + /* if (!hs.serverHello.ocspStapling) { */ case 44: + _r$17 = c.sendAlert(10); /* */ $s = 46; case 46: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _r$17; + $s = -1; return errors.New("tls: received unexpected CertificateStatus message"); + /* } */ case 45: + _r$18 = hs.finishedHash.Write(cs.marshal()); /* */ $s = 47; case 47: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _r$18; + if (cs.statusType === 1) { + c.ocspResponse = cs.response; + } + _r$19 = c.readHandshake(); /* */ $s = 48; case 48: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _tuple$6 = _r$19; + msg = _tuple$6[0]; + err = _tuple$6[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 43: + _r$20 = hs.suite.ka(c.vers); /* */ $s = 49; case 49: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + keyAgreement$1 = _r$20; + _tuple$7 = $assertType(msg, ptrType$22, true); + skx = _tuple$7[0]; + ok = _tuple$7[1]; + /* */ if (ok) { $s = 50; continue; } + /* */ $s = 51; continue; + /* if (ok) { */ case 50: + _r$21 = hs.finishedHash.Write(skx.marshal()); /* */ $s = 52; case 52: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$21; + _r$22 = keyAgreement$1.processServerKeyExchange(c.config, hs.hello, hs.serverHello, (x$2 = c.peerCertificates, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), skx); /* */ $s = 53; case 53: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + err = _r$22; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 54; continue; } + /* */ $s = 55; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 54: + _r$23 = c.sendAlert(10); /* */ $s = 56; case 56: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _r$23; + $s = -1; return err; + /* } */ case 55: + _r$24 = c.readHandshake(); /* */ $s = 57; case 57: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _tuple$8 = _r$24; + msg = _tuple$8[0]; + err = _tuple$8[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 51: + chainToSend = ptrType$6.nil; + certRequested = false; + _tuple$9 = $assertType(msg, ptrType$23, true); + certReq = _tuple$9[0]; + ok = _tuple$9[1]; + /* */ if (ok) { $s = 58; continue; } + /* */ $s = 59; continue; + /* if (ok) { */ case 58: + certRequested = true; + _r$25 = hs.finishedHash.Write(certReq.marshal()); /* */ $s = 60; case 60: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + _r$25; + _r$26 = hs.getCertificate(certReq); /* */ $s = 61; case 61: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + _tuple$10 = _r$26; + chainToSend = _tuple$10[0]; + err = _tuple$10[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 62; continue; } + /* */ $s = 63; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 62: + _r$27 = c.sendAlert(80); /* */ $s = 64; case 64: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } + _r$27; + $s = -1; return err; + /* } */ case 63: + _r$28 = c.readHandshake(); /* */ $s = 65; case 65: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } + _tuple$11 = _r$28; + msg = _tuple$11[0]; + err = _tuple$11[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 59: + _tuple$12 = $assertType(msg, ptrType$24, true); + shd = _tuple$12[0]; + ok = _tuple$12[1]; + /* */ if (!ok) { $s = 66; continue; } + /* */ $s = 67; continue; + /* if (!ok) { */ case 66: + _r$29 = c.sendAlert(10); /* */ $s = 68; case 68: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } + _r$29; + _r$30 = unexpectedMessageError(shd, msg); /* */ $s = 69; case 69: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } + $s = -1; return _r$30; + /* } */ case 67: + _r$31 = hs.finishedHash.Write(shd.marshal()); /* */ $s = 70; case 70: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } + _r$31; + /* */ if (certRequested) { $s = 71; continue; } + /* */ $s = 72; continue; + /* if (certRequested) { */ case 71: + certMsg = new certificateMsg.ptr(sliceType$7.nil, sliceType$9.nil); + certMsg.certificates = chainToSend.Certificate; + _r$32 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 73; case 73: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } + _r$32; + _r$33 = c.writeRecord(22, certMsg.marshal()); /* */ $s = 74; case 74: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } + _tuple$13 = _r$33; + err$3 = _tuple$13[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 72: + _r$34 = keyAgreement$1.generateClientKeyExchange(c.config, hs.hello, (x$3 = c.peerCertificates, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 75; case 75: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } + _tuple$14 = _r$34; + preMasterSecret = _tuple$14[0]; + ckx = _tuple$14[1]; + err = _tuple$14[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 76; continue; } + /* */ $s = 77; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 76: + _r$35 = c.sendAlert(80); /* */ $s = 78; case 78: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } + _r$35; + $s = -1; return err; + /* } */ case 77: + /* */ if (!(ckx === ptrType$25.nil)) { $s = 79; continue; } + /* */ $s = 80; continue; + /* if (!(ckx === ptrType$25.nil)) { */ case 79: + _r$36 = hs.finishedHash.Write(ckx.marshal()); /* */ $s = 81; case 81: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } + _r$36; + _r$37 = c.writeRecord(22, ckx.marshal()); /* */ $s = 82; case 82: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } + _tuple$15 = _r$37; + err$4 = _tuple$15[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + /* } */ case 80: + /* */ if (!(chainToSend === ptrType$6.nil) && chainToSend.Certificate.$length > 0) { $s = 83; continue; } + /* */ $s = 84; continue; + /* if (!(chainToSend === ptrType$6.nil) && chainToSend.Certificate.$length > 0) { */ case 83: + certVerify = new certificateVerifyMsg.ptr(sliceType$7.nil, c.vers >= 771, 0, sliceType$7.nil); + _tuple$16 = $assertType(chainToSend.PrivateKey, crypto.Signer, true); + key = _tuple$16[0]; + ok$1 = _tuple$16[1]; + /* */ if (!ok$1) { $s = 85; continue; } + /* */ $s = 86; continue; + /* if (!ok$1) { */ case 85: + _r$38 = c.sendAlert(80); /* */ $s = 87; case 87: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } + _r$38; + _r$39 = fmt.Errorf("tls: client certificate private key of type %T does not implement crypto.Signer", new sliceType$8([chainToSend.PrivateKey])); /* */ $s = 88; case 88: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } + $s = -1; return _r$39; + /* } */ case 86: + _r$40 = key.Public(); /* */ $s = 89; case 89: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } + _r$41 = pickSignatureAlgorithm(_r$40, certReq.supportedSignatureAlgorithms, hs.hello.supportedSignatureAlgorithms, c.vers); /* */ $s = 90; case 90: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } + _tuple$17 = _r$41; + signatureAlgorithm = _tuple$17[0]; + sigType = _tuple$17[1]; + hashFunc = _tuple$17[2]; + err$5 = _tuple$17[3]; + /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 91; continue; } + /* */ $s = 92; continue; + /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 91: + _r$42 = c.sendAlert(80); /* */ $s = 93; case 93: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } + _r$42; + $s = -1; return err$5; + /* } */ case 92: + if (certVerify.hasSignatureAndHash) { + certVerify.signatureAlgorithm = signatureAlgorithm; + } + _r$43 = $clone(hs.finishedHash, finishedHash).hashForClientCertificate(sigType, hashFunc, hs.masterSecret); /* */ $s = 94; case 94: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } + _tuple$18 = _r$43; + digest = _tuple$18[0]; + err$5 = _tuple$18[1]; + /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 95; continue; } + /* */ $s = 96; continue; + /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 95: + _r$44 = c.sendAlert(80); /* */ $s = 97; case 97: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } + _r$44; + $s = -1; return err$5; + /* } */ case 96: + signOpts = (new crypto.Hash(hashFunc)); + if (sigType === 18) { + signOpts = new rsa.PSSOptions.ptr(-1, hashFunc); + } + _r$45 = key.Sign(c.config.rand(), digest, signOpts); /* */ $s = 98; case 98: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } + _tuple$19 = _r$45; + certVerify.signature = _tuple$19[0]; + err$5 = _tuple$19[1]; + /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 99; continue; } + /* */ $s = 100; continue; + /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 99: + _r$46 = c.sendAlert(80); /* */ $s = 101; case 101: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } + _r$46; + $s = -1; return err$5; + /* } */ case 100: + _r$47 = hs.finishedHash.Write(certVerify.marshal()); /* */ $s = 102; case 102: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } + _r$47; + _r$48 = c.writeRecord(22, certVerify.marshal()); /* */ $s = 103; case 103: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } + _tuple$20 = _r$48; + err$6 = _tuple$20[1]; + if (!($interfaceIsEqual(err$6, $ifaceNil))) { + $s = -1; return err$6; + } + /* } */ case 84: + _r$49 = masterFromPreMasterSecret(c.vers, hs.suite, preMasterSecret, hs.hello.random, hs.serverHello.random); /* */ $s = 104; case 104: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } + hs.masterSecret = _r$49; + _r$50 = c.config.writeKeyLog(hs.hello.random, hs.masterSecret); /* */ $s = 105; case 105: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } + err$7 = _r$50; + /* */ if (!($interfaceIsEqual(err$7, $ifaceNil))) { $s = 106; continue; } + /* */ $s = 107; continue; + /* if (!($interfaceIsEqual(err$7, $ifaceNil))) { */ case 106: + _r$51 = c.sendAlert(80); /* */ $s = 108; case 108: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } + _r$51; + _r$52 = err$7.Error(); /* */ $s = 109; case 109: if($c) { $c = false; _r$52 = _r$52.$blk(); } if (_r$52 && _r$52.$blk !== undefined) { break s; } + _r$53 = errors.New("tls: failed to write to key log: " + _r$52); /* */ $s = 110; case 110: if($c) { $c = false; _r$53 = _r$53.$blk(); } if (_r$53 && _r$53.$blk !== undefined) { break s; } + $s = -1; return _r$53; + /* } */ case 107: + hs.finishedHash.discardHandshakeBuffer(); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.doFullHandshake }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$27 = _r$27; $f._r$28 = _r$28; $f._r$29 = _r$29; $f._r$3 = _r$3; $f._r$30 = _r$30; $f._r$31 = _r$31; $f._r$32 = _r$32; $f._r$33 = _r$33; $f._r$34 = _r$34; $f._r$35 = _r$35; $f._r$36 = _r$36; $f._r$37 = _r$37; $f._r$38 = _r$38; $f._r$39 = _r$39; $f._r$4 = _r$4; $f._r$40 = _r$40; $f._r$41 = _r$41; $f._r$42 = _r$42; $f._r$43 = _r$43; $f._r$44 = _r$44; $f._r$45 = _r$45; $f._r$46 = _r$46; $f._r$47 = _r$47; $f._r$48 = _r$48; $f._r$49 = _r$49; $f._r$5 = _r$5; $f._r$50 = _r$50; $f._r$51 = _r$51; $f._r$52 = _r$52; $f._r$53 = _r$53; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$11 = _tuple$11; $f._tuple$12 = _tuple$12; $f._tuple$13 = _tuple$13; $f._tuple$14 = _tuple$14; $f._tuple$15 = _tuple$15; $f._tuple$16 = _tuple$16; $f._tuple$17 = _tuple$17; $f._tuple$18 = _tuple$18; $f._tuple$19 = _tuple$19; $f._tuple$2 = _tuple$2; $f._tuple$20 = _tuple$20; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.asn1Data = asn1Data; $f.c = c; $f.cert = cert; $f.cert$1 = cert$1; $f.certMsg = certMsg; $f.certReq = certReq; $f.certRequested = certRequested; $f.certVerify = certVerify; $f.certs = certs; $f.chainToSend = chainToSend; $f.ckx = ckx; $f.cs = cs; $f.digest = digest; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.err$7 = err$7; $f.hashFunc = hashFunc; $f.hs = hs; $f.i = i; $f.i$1 = i$1; $f.key = key; $f.keyAgreement$1 = keyAgreement$1; $f.msg = msg; $f.ok = ok; $f.ok$1 = ok$1; $f.opts = opts; $f.preMasterSecret = preMasterSecret; $f.shd = shd; $f.sigType = sigType; $f.signOpts = signOpts; $f.signatureAlgorithm = signatureAlgorithm; $f.skx = skx; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.doFullHandshake = function() { return this.$val.doFullHandshake(); }; + clientHandshakeState.ptr.prototype.establishKeys = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; c = $f.c; clientCipher = $f.clientCipher; clientHash = $f.clientHash; clientIV = $f.clientIV; clientKey = $f.clientKey; clientMAC = $f.clientMAC; hs = $f.hs; serverCipher = $f.serverCipher; serverHash = $f.serverHash; serverIV = $f.serverIV; serverKey = $f.serverKey; serverMAC = $f.serverMAC; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = keysFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.hello.random, hs.serverHello.random, hs.suite.macLen, hs.suite.keyLen, hs.suite.ivLen); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + clientMAC = _tuple[0]; + serverMAC = _tuple[1]; + clientKey = _tuple[2]; + serverKey = _tuple[3]; + clientIV = _tuple[4]; + serverIV = _tuple[5]; + _tmp = $ifaceNil; + _tmp$1 = $ifaceNil; + clientCipher = _tmp; + serverCipher = _tmp$1; + _tmp$2 = $ifaceNil; + _tmp$3 = $ifaceNil; + clientHash = _tmp$2; + serverHash = _tmp$3; + /* */ if (!(hs.suite.cipher === $throwNilPointerError)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(hs.suite.cipher === $throwNilPointerError)) { */ case 2: + _r$1 = hs.suite.cipher(clientKey, clientIV, false); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + clientCipher = _r$1; + _r$2 = hs.suite.mac(c.vers, clientMAC); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + clientHash = _r$2; + _r$3 = hs.suite.cipher(serverKey, serverIV, true); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + serverCipher = _r$3; + _r$4 = hs.suite.mac(c.vers, serverMAC); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + serverHash = _r$4; + $s = 4; continue; + /* } else { */ case 3: + _r$5 = hs.suite.aead(clientKey, clientIV); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + clientCipher = _r$5; + _r$6 = hs.suite.aead(serverKey, serverIV); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + serverCipher = _r$6; + /* } */ case 4: + c.in$25.prepareCipherSpec(c.vers, serverCipher, serverHash); + c.out.prepareCipherSpec(c.vers, clientCipher, clientHash); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.establishKeys }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.c = c; $f.clientCipher = clientCipher; $f.clientHash = clientHash; $f.clientIV = clientIV; $f.clientKey = clientKey; $f.clientMAC = clientMAC; $f.hs = hs; $f.serverCipher = serverCipher; $f.serverHash = serverHash; $f.serverIV = serverIV; $f.serverKey = serverKey; $f.serverMAC = serverMAC; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.establishKeys = function() { return this.$val.establishKeys(); }; + clientHandshakeState.ptr.prototype.serverResumedSession = function() { + var hs; + hs = this; + return !(hs.session === ptrType$10.nil) && !(hs.hello.sessionId === sliceType$7.nil) && bytes.Equal(hs.serverHello.sessionId, hs.hello.sessionId); + }; + clientHandshakeState.prototype.serverResumedSession = function() { return this.$val.serverResumedSession(); }; + clientHandshakeState.ptr.prototype.processServerHello = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, c, clientDidALPN, clientDidNPN, expectedSecureRenegotiation, hs, serverHasALPN, serverHasNPN, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; c = $f.c; clientDidALPN = $f.clientDidALPN; clientDidNPN = $f.clientDidNPN; expectedSecureRenegotiation = $f.expectedSecureRenegotiation; hs = $f.hs; serverHasALPN = $f.serverHasALPN; serverHasNPN = $f.serverHasNPN; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + /* */ if (!((hs.serverHello.compressionMethod === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((hs.serverHello.compressionMethod === 0))) { */ case 1: + _r = c.sendAlert(10); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return [false, errors.New("tls: server selected unsupported compression format")]; + /* } */ case 2: + /* */ if ((c.handshakes === 0) && hs.serverHello.secureRenegotiationSupported) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((c.handshakes === 0) && hs.serverHello.secureRenegotiationSupported) { */ case 4: + c.secureRenegotiation = true; + /* */ if (!((hs.serverHello.secureRenegotiation.$length === 0))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((hs.serverHello.secureRenegotiation.$length === 0))) { */ case 6: + _r$1 = c.sendAlert(40); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return [false, errors.New("tls: initial handshake had non-empty renegotiation extension")]; + /* } */ case 7: + /* } */ case 5: + /* */ if (c.handshakes > 0 && c.secureRenegotiation) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (c.handshakes > 0 && c.secureRenegotiation) { */ case 9: + expectedSecureRenegotiation = arrayType$5.zero(); + $copySlice(new sliceType$7(expectedSecureRenegotiation), new sliceType$7(c.clientFinished)); + $copySlice($subslice(new sliceType$7(expectedSecureRenegotiation), 12), new sliceType$7(c.serverFinished)); + /* */ if (!bytes.Equal(hs.serverHello.secureRenegotiation, new sliceType$7(expectedSecureRenegotiation))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!bytes.Equal(hs.serverHello.secureRenegotiation, new sliceType$7(expectedSecureRenegotiation))) { */ case 11: + _r$2 = c.sendAlert(40); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return [false, errors.New("tls: incorrect renegotiation extension contents")]; + /* } */ case 12: + /* } */ case 10: + clientDidNPN = hs.hello.nextProtoNeg; + clientDidALPN = hs.hello.alpnProtocols.$length > 0; + serverHasNPN = hs.serverHello.nextProtoNeg; + serverHasALPN = hs.serverHello.alpnProtocol.length > 0; + /* */ if (!clientDidNPN && serverHasNPN) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!clientDidNPN && serverHasNPN) { */ case 14: + _r$3 = c.sendAlert(40); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return [false, errors.New("tls: server advertised unrequested NPN extension")]; + /* } */ case 15: + /* */ if (!clientDidALPN && serverHasALPN) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (!clientDidALPN && serverHasALPN) { */ case 17: + _r$4 = c.sendAlert(40); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + $s = -1; return [false, errors.New("tls: server advertised unrequested ALPN extension")]; + /* } */ case 18: + /* */ if (serverHasNPN && serverHasALPN) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (serverHasNPN && serverHasALPN) { */ case 20: + _r$5 = c.sendAlert(40); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return [false, errors.New("tls: server advertised both NPN and ALPN extensions")]; + /* } */ case 21: + if (serverHasALPN) { + c.clientProtocol = hs.serverHello.alpnProtocol; + c.clientProtocolFallback = false; + } + c.scts = hs.serverHello.scts; + if (!hs.serverResumedSession()) { + $s = -1; return [false, $ifaceNil]; + } + /* */ if (!((hs.session.vers === c.vers))) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!((hs.session.vers === c.vers))) { */ case 23: + _r$6 = c.sendAlert(40); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = -1; return [false, errors.New("tls: server resumed a session with a different version")]; + /* } */ case 24: + /* */ if (!((hs.session.cipherSuite === hs.suite.id))) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (!((hs.session.cipherSuite === hs.suite.id))) { */ case 26: + _r$7 = c.sendAlert(40); /* */ $s = 28; case 28: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + $s = -1; return [false, errors.New("tls: server resumed a session with a different cipher suite")]; + /* } */ case 27: + hs.masterSecret = hs.session.masterSecret; + c.peerCertificates = hs.session.serverCertificates; + c.verifiedChains = hs.session.verifiedChains; + $s = -1; return [true, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.processServerHello }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.c = c; $f.clientDidALPN = clientDidALPN; $f.clientDidNPN = clientDidNPN; $f.expectedSecureRenegotiation = expectedSecureRenegotiation; $f.hs = hs; $f.serverHasALPN = serverHasALPN; $f.serverHasNPN = serverHasNPN; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.processServerHello = function() { return this.$val.processServerHello(); }; + clientHandshakeState.ptr.prototype.readFinished = function(out) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, hs, msg, ok, out, serverFinished, verify, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; hs = $f.hs; msg = $f.msg; ok = $f.ok; out = $f.out; serverFinished = $f.serverFinished; verify = $f.verify; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.readRecord(20); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + if (!($interfaceIsEqual(c.in$25.err, $ifaceNil))) { + $s = -1; return c.in$25.err; + } + _r$1 = c.readHandshake(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = $assertType(msg, ptrType$26, true); + serverFinished = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!ok) { */ case 3: + _r$2 = c.sendAlert(10); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = unexpectedMessageError(serverFinished, msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 4: + _r$4 = $clone(hs.finishedHash, finishedHash).serverSum(hs.masterSecret); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + verify = _r$4; + /* */ if (!((verify.$length === serverFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, serverFinished.verifyData) === 1))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!((verify.$length === serverFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, serverFinished.verifyData) === 1))) { */ case 8: + _r$5 = c.sendAlert(40); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return errors.New("tls: server's Finished message was incorrect"); + /* } */ case 9: + _r$6 = hs.finishedHash.Write(serverFinished.marshal()); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $copySlice(out, verify); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.readFinished }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.hs = hs; $f.msg = msg; $f.ok = ok; $f.out = out; $f.serverFinished = serverFinished; $f.verify = verify; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.readFinished = function(out) { return this.$val.readFinished(out); }; + clientHandshakeState.ptr.prototype.readSessionTicket = function() { + var _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, c, err, hs, msg, ok, sessionTicketMsg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; hs = $f.hs; msg = $f.msg; ok = $f.ok; sessionTicketMsg = $f.sessionTicketMsg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + if (!hs.serverHello.ticketSupported) { + $s = -1; return $ifaceNil; + } + c = hs.c; + _r = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = $assertType(msg, ptrType$27, true); + sessionTicketMsg = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$1 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = unexpectedMessageError(sessionTicketMsg, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 3: + _r$3 = hs.finishedHash.Write(sessionTicketMsg.marshal()); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + hs.session = new ClientSessionState.ptr(sessionTicketMsg.ticket, c.vers, hs.suite.id, hs.masterSecret, c.peerCertificates, c.verifiedChains); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.readSessionTicket }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.hs = hs; $f.msg = msg; $f.ok = ok; $f.sessionTicketMsg = sessionTicketMsg; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.readSessionTicket = function() { return this.$val.readSessionTicket(); }; + clientHandshakeState.ptr.prototype.sendFinished = function(out) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, _tuple$3, c, err, err$1, err$2, fallback, finished, hs, nextProto, out, proto, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; c = $f.c; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; fallback = $f.fallback; finished = $f.finished; hs = $f.hs; nextProto = $f.nextProto; out = $f.out; proto = $f.proto; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.writeRecord(20, new sliceType$7([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (hs.serverHello.nextProtoNeg) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (hs.serverHello.nextProtoNeg) { */ case 2: + nextProto = new nextProtoMsg.ptr(sliceType$7.nil, ""); + _tuple$1 = mutualProtocol(c.config.NextProtos, hs.serverHello.nextProtos); + proto = _tuple$1[0]; + fallback = _tuple$1[1]; + nextProto.proto = proto; + c.clientProtocol = proto; + c.clientProtocolFallback = fallback; + _r$1 = hs.finishedHash.Write(nextProto.marshal()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = c.writeRecord(22, nextProto.marshal()); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ case 3: + finished = new finishedMsg.ptr(sliceType$7.nil, sliceType$7.nil); + _r$3 = $clone(hs.finishedHash, finishedHash).clientSum(hs.masterSecret); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + finished.verifyData = _r$3; + _r$4 = hs.finishedHash.Write(finished.marshal()); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = c.writeRecord(22, finished.marshal()); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + err$2 = _tuple$3[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + $copySlice(out, finished.verifyData); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.sendFinished }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.fallback = fallback; $f.finished = finished; $f.hs = hs; $f.nextProto = nextProto; $f.out = out; $f.proto = proto; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.sendFinished = function(out) { return this.$val.sendFinished(out); }; + clientHandshakeState.ptr.prototype.getCertificate = function(certReq) { + var _1, _i, _i$1, _i$2, _i$3, _r, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, c, ca, cert, certReq, certType, chain, ecdsaAvail, err, hs, i, j, rsaAvail, signatureSchemes, x509Cert, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; c = $f.c; ca = $f.ca; cert = $f.cert; certReq = $f.certReq; certType = $f.certType; chain = $f.chain; ecdsaAvail = $f.ecdsaAvail; err = $f.err; hs = $f.hs; i = $f.i; j = $f.j; rsaAvail = $f.rsaAvail; signatureSchemes = $f.signatureSchemes; x509Cert = $f.x509Cert; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + chain = [chain]; + hs = this; + c = hs.c; + _tmp = false; + _tmp$1 = false; + rsaAvail = _tmp; + ecdsaAvail = _tmp$1; + _ref = certReq.certificateTypes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + certType = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _1 = certType; + if (_1 === (1)) { + rsaAvail = true; + } else if (_1 === (64)) { + ecdsaAvail = true; + } + _i++; + } + /* */ if (!(c.config.GetClientCertificate === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(c.config.GetClientCertificate === $throwNilPointerError)) { */ case 1: + signatureSchemes = sliceType$6.nil; + if (!certReq.hasSignatureAndHash) { + signatureSchemes = tls11SignatureSchemes; + if (!ecdsaAvail) { + signatureSchemes = $subslice(signatureSchemes, 3); + } + if (!rsaAvail) { + signatureSchemes = $subslice(signatureSchemes, 0, (signatureSchemes.$length - 4 >> 0)); + } + } else { + signatureSchemes = certReq.supportedSignatureAlgorithms; + } + _r = c.config.GetClientCertificate(new CertificateRequestInfo.ptr(certReq.certificateAuthorities, signatureSchemes)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + _ref$1 = c.config.Certificates; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + i = _i$1; + chain[0] = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), Certificate); + /* */ if (!rsaAvail && !ecdsaAvail) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!rsaAvail && !ecdsaAvail) { */ case 6: + _i$1++; + /* continue; */ $s = 4; continue; + /* } */ case 7: + _ref$2 = chain[0].Certificate; + _i$2 = 0; + /* while (true) { */ case 8: + /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 9; continue; } + j = _i$2; + cert = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + x509Cert = chain[0].Leaf; + /* */ if (!((j === 0)) || x509Cert === ptrType$15.nil) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!((j === 0)) || x509Cert === ptrType$15.nil) { */ case 10: + err = $ifaceNil; + _r$1 = x509.ParseCertificate(cert); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + x509Cert = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 13: + _r$2 = c.sendAlert(80); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = err.Error(); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = errors.New("tls: failed to parse client certificate #" + strconv.Itoa(i) + ": " + _r$3); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [ptrType$6.nil, _r$4]; + /* } */ case 14: + /* } */ case 11: + if (rsaAvail && (x509Cert.PublicKeyAlgorithm === 1)) { + } else if (ecdsaAvail && (x509Cert.PublicKeyAlgorithm === 3)) { + } else { + _i$1++; + /* continue findCert; */ $s = 4; continue s; + } + if (certReq.certificateAuthorities.$length === 0) { + $s = -1; return [chain[0], $ifaceNil]; + } + _ref$3 = certReq.certificateAuthorities; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + ca = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + if (bytes.Equal(x509Cert.RawIssuer, ca)) { + $s = -1; return [chain[0], $ifaceNil]; + } + _i$3++; + } + _i$2++; + /* } */ $s = 8; continue; case 9: + _i$1++; + /* } */ $s = 4; continue; case 5: + $s = -1; return [new Certificate.ptr(sliceType$9.nil, $ifaceNil, sliceType$7.nil, sliceType$9.nil, ptrType$15.nil), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientHandshakeState.ptr.prototype.getCertificate }; } $f._1 = _1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.c = c; $f.ca = ca; $f.cert = cert; $f.certReq = certReq; $f.certType = certType; $f.chain = chain; $f.ecdsaAvail = ecdsaAvail; $f.err = err; $f.hs = hs; $f.i = i; $f.j = j; $f.rsaAvail = rsaAvail; $f.signatureSchemes = signatureSchemes; $f.x509Cert = x509Cert; $f.$s = $s; $f.$r = $r; return $f; + }; + clientHandshakeState.prototype.getCertificate = function(certReq) { return this.$val.getCertificate(certReq); }; + clientSessionCacheKey = function(serverAddr, config) { + var _r, config, serverAddr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; config = $f.config; serverAddr = $f.serverAddr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (config.ServerName.length > 0) { + $s = -1; return config.ServerName; + } + _r = serverAddr.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: clientSessionCacheKey }; } $f._r = _r; $f.config = config; $f.serverAddr = serverAddr; $f.$s = $s; $f.$r = $r; return $f; + }; + mutualProtocol = function(protos, preferenceProtos) { + var _i, _i$1, _ref, _ref$1, c, preferenceProtos, protos, s; + _ref = preferenceProtos; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = protos; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + c = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (s === c) { + return [s, false]; + } + _i$1++; + } + _i++; + } + return [(0 >= protos.$length ? ($throwRuntimeError("index out of range"), undefined) : protos.$array[protos.$offset + 0]), true]; + }; + hostnameInSNI = function(name) { + var host, i, name; + host = name; + if (host.length > 0 && (host.charCodeAt(0) === 91) && (host.charCodeAt((host.length - 1 >> 0)) === 93)) { + host = $substring(host, 1, (host.length - 1 >> 0)); + } + i = strings.LastIndex(host, "%"); + if (i > 0) { + host = $substring(host, 0, i); + } + if (!(net.ParseIP(host) === net.IP.nil)) { + return ""; + } + while (true) { + if (!(name.length > 0 && (name.charCodeAt((name.length - 1 >> 0)) === 46))) { break; } + name = $substring(name, 0, (name.length - 1 >> 0)); + } + return name; + }; + clientHelloMsg.ptr.prototype.marshal = function() { + var _i, _i$1, _i$2, _i$3, _i$4, _i$5, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, curve, extensionsLength, i, l, l$1, l$2, l$3, l$4, l$5, l$6, length, lengths, m, numExtensions, pointFormat, s, s$1, sigAlgo, stringsLength, suite, x, x$1, x$2, y, z; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + length = ((((35 + m.sessionId.$length >> 0) + 2 >> 0) + ($imul(m.cipherSuites.$length, 2)) >> 0) + 1 >> 0) + m.compressionMethods.$length >> 0; + numExtensions = 0; + extensionsLength = 0; + if (m.nextProtoNeg) { + numExtensions = numExtensions + (1) >> 0; + } + if (m.ocspStapling) { + extensionsLength = extensionsLength + (5) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.serverName.length > 0) { + extensionsLength = extensionsLength + ((5 + m.serverName.length >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.supportedCurves.$length > 0) { + extensionsLength = extensionsLength + ((2 + ($imul(2, m.supportedCurves.$length)) >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.supportedPoints.$length > 0) { + extensionsLength = extensionsLength + ((1 + m.supportedPoints.$length >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.ticketSupported) { + extensionsLength = extensionsLength + (m.sessionTicket.$length) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.supportedSignatureAlgorithms.$length > 0) { + extensionsLength = extensionsLength + ((2 + ($imul(2, m.supportedSignatureAlgorithms.$length)) >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.secureRenegotiationSupported) { + extensionsLength = extensionsLength + ((1 + m.secureRenegotiation.$length >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (m.alpnProtocols.$length > 0) { + extensionsLength = extensionsLength + (2) >> 0; + _ref = m.alpnProtocols; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + l = s.length; + if ((l === 0) || l > 255) { + $panic(new $String("invalid ALPN protocol")); + } + extensionsLength = extensionsLength + (1) >> 0; + extensionsLength = extensionsLength + (s.length) >> 0; + _i++; + } + numExtensions = numExtensions + (1) >> 0; + } + if (m.scts) { + numExtensions = numExtensions + (1) >> 0; + } + if (numExtensions > 0) { + extensionsLength = extensionsLength + (($imul(4, numExtensions))) >> 0; + length = length + ((2 + extensionsLength >> 0)) >> 0; + } + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 1); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (((m.vers >>> 8 << 16 >>> 16) << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = ((m.vers << 24 >>> 24))); + $copySlice($subslice(x, 6, 38), m.random); + (38 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 38] = ((m.sessionId.$length << 24 >>> 24))); + $copySlice($subslice(x, 39, (39 + m.sessionId.$length >> 0)), m.sessionId); + y = $subslice(x, (39 + m.sessionId.$length >> 0)); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((m.cipherSuites.$length >> 7 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = (((m.cipherSuites.$length << 1 >> 0) << 24 >>> 24))); + _ref$1 = m.cipherSuites; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + suite = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + (x$1 = 2 + ($imul(i, 2)) >> 0, ((x$1 < 0 || x$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + x$1] = (((suite >>> 8 << 16 >>> 16) << 24 >>> 24)))); + (x$2 = 3 + ($imul(i, 2)) >> 0, ((x$2 < 0 || x$2 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + x$2] = ((suite << 24 >>> 24)))); + _i$1++; + } + z = $subslice(y, (2 + ($imul(m.cipherSuites.$length, 2)) >> 0)); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((m.compressionMethods.$length << 24 >>> 24))); + $copySlice($subslice(z, 1), m.compressionMethods); + z = $subslice(z, (1 + m.compressionMethods.$length >> 0)); + if (numExtensions > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((extensionsLength >> 8 >> 0) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((extensionsLength << 24 >>> 24))); + z = $subslice(z, 2); + } + if (m.nextProtoNeg) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 51); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 116); + z = $subslice(z, 4); + } + if (m.serverName.length > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 0); + l$1 = m.serverName.length + 5 >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$1 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$1 << 24 >>> 24))); + z = $subslice(z, 4); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((((m.serverName.length + 3 >> 0)) >> 8 >> 0) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = (((m.serverName.length + 3 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = (((m.serverName.length >> 8 >> 0) << 24 >>> 24))); + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = ((m.serverName.length << 24 >>> 24))); + $copySlice($subslice(z, 5), (new sliceType$7($stringToBytes(m.serverName)))); + z = $subslice(z, l$1); + } + if (m.ocspStapling) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 5); + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = 0); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = 5); + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = 1); + z = $subslice(z, 9); + } + if (m.supportedCurves.$length > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 10); + l$2 = 2 + ($imul(2, m.supportedCurves.$length)) >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$2 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$2 << 24 >>> 24))); + l$2 = l$2 - (2) >> 0; + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = (((l$2 >> 8 >> 0) << 24 >>> 24))); + (5 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 5] = ((l$2 << 24 >>> 24))); + z = $subslice(z, 6); + _ref$2 = m.supportedCurves; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + curve = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((curve >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((curve << 24 >>> 24))); + z = $subslice(z, 2); + _i$2++; + } + } + if (m.supportedPoints.$length > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 11); + l$3 = 1 + m.supportedPoints.$length >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$3 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$3 << 24 >>> 24))); + l$3 = l$3 - (1) >> 0; + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = ((l$3 << 24 >>> 24))); + z = $subslice(z, 5); + _ref$3 = m.supportedPoints; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + pointFormat = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = pointFormat); + z = $subslice(z, 1); + _i$3++; + } + } + if (m.ticketSupported) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 35); + l$4 = m.sessionTicket.$length; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$4 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$4 << 24 >>> 24))); + z = $subslice(z, 4); + $copySlice(z, m.sessionTicket); + z = $subslice(z, m.sessionTicket.$length); + } + if (m.supportedSignatureAlgorithms.$length > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 13); + l$5 = 2 + ($imul(2, m.supportedSignatureAlgorithms.$length)) >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$5 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$5 << 24 >>> 24))); + z = $subslice(z, 4); + l$5 = l$5 - (2) >> 0; + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((l$5 >> 8 >> 0) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((l$5 << 24 >>> 24))); + z = $subslice(z, 2); + _ref$4 = m.supportedSignatureAlgorithms; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$4.$length)) { break; } + sigAlgo = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((sigAlgo >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((sigAlgo << 24 >>> 24))); + z = $subslice(z, 2); + _i$4++; + } + } + if (m.secureRenegotiationSupported) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 255); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 1); + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = 0); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = (((m.secureRenegotiation.$length + 1 >> 0) << 24 >>> 24))); + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = ((m.secureRenegotiation.$length << 24 >>> 24))); + z = $subslice(z, 5); + $copySlice(z, m.secureRenegotiation); + z = $subslice(z, m.secureRenegotiation.$length); + } + if (m.alpnProtocols.$length > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 16); + lengths = $subslice(z, 2); + z = $subslice(z, 6); + stringsLength = 0; + _ref$5 = m.alpnProtocols; + _i$5 = 0; + while (true) { + if (!(_i$5 < _ref$5.$length)) { break; } + s$1 = ((_i$5 < 0 || _i$5 >= _ref$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$5.$array[_ref$5.$offset + _i$5]); + l$6 = s$1.length; + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((l$6 << 24 >>> 24))); + $copyString($subslice(z, 1), s$1); + z = $subslice(z, (1 + l$6 >> 0)); + stringsLength = stringsLength + ((1 + l$6 >> 0)) >> 0; + _i$5++; + } + (2 >= lengths.$length ? ($throwRuntimeError("index out of range"), undefined) : lengths.$array[lengths.$offset + 2] = (((stringsLength >> 8 >> 0) << 24 >>> 24))); + (3 >= lengths.$length ? ($throwRuntimeError("index out of range"), undefined) : lengths.$array[lengths.$offset + 3] = ((stringsLength << 24 >>> 24))); + stringsLength = stringsLength + (2) >> 0; + (0 >= lengths.$length ? ($throwRuntimeError("index out of range"), undefined) : lengths.$array[lengths.$offset + 0] = (((stringsLength >> 8 >> 0) << 24 >>> 24))); + (1 >= lengths.$length ? ($throwRuntimeError("index out of range"), undefined) : lengths.$array[lengths.$offset + 1] = ((stringsLength << 24 >>> 24))); + } + if (m.scts) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 18); + z = $subslice(z, 4); + } + m.raw = x; + return x; + }; + clientHelloMsg.prototype.marshal = function() { return this.$val.marshal(); }; + clientHelloMsg.ptr.prototype.unmarshal = function(data) { + var _1, _i, _q, _q$1, _q$2, _r, _r$1, _ref, cipherSuiteLen, compressionMethodsLen, d, d$1, d$2, d$3, d$4, data, extension, extensionsLength, i, i$1, i$2, l, l$1, l$2, l$3, l$4, length, m, n, nameLen, nameType, namesLen, numCipherSuites, numCurves, sessionIdLen, stringLen, x, x$1, x$2, x$3, x$4, x$5; + m = this; + if (data.$length < 42) { + return false; + } + m.raw = data; + m.vers = (((((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) << 16 >>> 16))) >>> 0; + m.random = $subslice(data, 6, 38); + sessionIdLen = (((38 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 38]) >> 0)); + if (sessionIdLen > 32 || data.$length < (39 + sessionIdLen >> 0)) { + return false; + } + m.sessionId = $subslice(data, 39, (39 + sessionIdLen >> 0)); + data = $subslice(data, (39 + sessionIdLen >> 0)); + if (data.$length < 2) { + return false; + } + cipherSuiteLen = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + if (((_r = cipherSuiteLen % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 1) || data.$length < (2 + cipherSuiteLen >> 0)) { + return false; + } + numCipherSuites = (_q = cipherSuiteLen / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + m.cipherSuites = $makeSlice(sliceType$2, numCipherSuites); + i = 0; + while (true) { + if (!(i < numCipherSuites)) { break; } + (x$2 = m.cipherSuites, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = ((((((x = 2 + ($imul(2, i)) >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) << 16 >>> 16)) << 8 << 16 >>> 16) | (((x$1 = 3 + ($imul(2, i)) >> 0, ((x$1 < 0 || x$1 >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x$1])) << 16 >>> 16))) >>> 0))); + if ((x$3 = m.cipherSuites, ((i < 0 || i >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i])) === 255) { + m.secureRenegotiationSupported = true; + } + i = i + (1) >> 0; + } + data = $subslice(data, (2 + cipherSuiteLen >> 0)); + if (data.$length < 1) { + return false; + } + compressionMethodsLen = (((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)); + if (data.$length < (1 + compressionMethodsLen >> 0)) { + return false; + } + m.compressionMethods = $subslice(data, 1, (1 + compressionMethodsLen >> 0)); + data = $subslice(data, (1 + compressionMethodsLen >> 0)); + m.nextProtoNeg = false; + m.serverName = ""; + m.ocspStapling = false; + m.ticketSupported = false; + m.sessionTicket = sliceType$7.nil; + m.supportedSignatureAlgorithms = sliceType$6.nil; + m.alpnProtocols = sliceType$1.nil; + m.scts = false; + if (data.$length === 0) { + return true; + } + if (data.$length < 2) { + return false; + } + extensionsLength = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + data = $subslice(data, 2); + if (!((extensionsLength === data.$length))) { + return false; + } + while (true) { + if (!(!((data.$length === 0)))) { break; } + if (data.$length < 4) { + return false; + } + extension = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + length = ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); + data = $subslice(data, 4); + if (data.$length < length) { + return false; + } + _1 = extension; + if (_1 === (0)) { + d = $subslice(data, 0, length); + if (d.$length < 2) { + return false; + } + namesLen = ((((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >> 0)); + d = $subslice(d, 2); + if (!((d.$length === namesLen))) { + return false; + } + while (true) { + if (!(d.$length > 0)) { break; } + if (d.$length < 3) { + return false; + } + nameType = (0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]); + nameLen = ((((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >> 0)) << 8 >> 0) | (((2 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 2]) >> 0)); + d = $subslice(d, 3); + if (d.$length < nameLen) { + return false; + } + if (nameType === 0) { + m.serverName = ($bytesToString($subslice(d, 0, nameLen))); + if (strings.HasSuffix(m.serverName, ".")) { + return false; + } + break; + } + d = $subslice(d, nameLen); + } + } else if (_1 === (13172)) { + if (length > 0) { + return false; + } + m.nextProtoNeg = true; + } else if (_1 === (5)) { + m.ocspStapling = length > 0 && ((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 1); + } else if (_1 === (10)) { + if (length < 2) { + return false; + } + l = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + if (((_r$1 = l % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1) || !((length === (l + 2 >> 0)))) { + return false; + } + numCurves = (_q$1 = l / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + m.supportedCurves = $makeSlice(sliceType$3, numCurves); + d$1 = $subslice(data, 2); + i$1 = 0; + while (true) { + if (!(i$1 < numCurves)) { break; } + (x$4 = m.supportedCurves, ((i$1 < 0 || i$1 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i$1] = ((((((0 >= d$1.$length ? ($throwRuntimeError("index out of range"), undefined) : d$1.$array[d$1.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= d$1.$length ? ($throwRuntimeError("index out of range"), undefined) : d$1.$array[d$1.$offset + 1]) << 16 >>> 16))) >>> 0))); + d$1 = $subslice(d$1, 2); + i$1 = i$1 + (1) >> 0; + } + } else if (_1 === (11)) { + if (length < 1) { + return false; + } + l$1 = (((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)); + if (!((length === (l$1 + 1 >> 0)))) { + return false; + } + m.supportedPoints = $makeSlice(sliceType$7, l$1); + $copySlice(m.supportedPoints, $subslice(data, 1)); + } else if (_1 === (35)) { + m.ticketSupported = true; + m.sessionTicket = $subslice(data, 0, length); + } else if (_1 === (13)) { + if (length < 2 || !(((length & 1) === 0))) { + return false; + } + l$2 = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + if (!((l$2 === (length - 2 >> 0)))) { + return false; + } + n = (_q$2 = l$2 / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); + d$2 = $subslice(data, 2); + m.supportedSignatureAlgorithms = $makeSlice(sliceType$6, n); + _ref = m.supportedSignatureAlgorithms; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$2 = _i; + (x$5 = m.supportedSignatureAlgorithms, ((i$2 < 0 || i$2 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i$2] = ((((((0 >= d$2.$length ? ($throwRuntimeError("index out of range"), undefined) : d$2.$array[d$2.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= d$2.$length ? ($throwRuntimeError("index out of range"), undefined) : d$2.$array[d$2.$offset + 1]) << 16 >>> 16))) >>> 0))); + d$2 = $subslice(d$2, 2); + _i++; + } + } else if (_1 === (65281)) { + if (length === 0) { + return false; + } + d$3 = $subslice(data, 0, length); + l$3 = (((0 >= d$3.$length ? ($throwRuntimeError("index out of range"), undefined) : d$3.$array[d$3.$offset + 0]) >> 0)); + d$3 = $subslice(d$3, 1); + if (!((l$3 === d$3.$length))) { + return false; + } + m.secureRenegotiation = d$3; + m.secureRenegotiationSupported = true; + } else if (_1 === (16)) { + if (length < 2) { + return false; + } + l$4 = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + if (!((l$4 === (length - 2 >> 0)))) { + return false; + } + d$4 = $subslice(data, 2, length); + while (true) { + if (!(!((d$4.$length === 0)))) { break; } + stringLen = (((0 >= d$4.$length ? ($throwRuntimeError("index out of range"), undefined) : d$4.$array[d$4.$offset + 0]) >> 0)); + d$4 = $subslice(d$4, 1); + if ((stringLen === 0) || stringLen > d$4.$length) { + return false; + } + m.alpnProtocols = $append(m.alpnProtocols, ($bytesToString($subslice(d$4, 0, stringLen)))); + d$4 = $subslice(d$4, stringLen); + } + } else if (_1 === (18)) { + m.scts = true; + if (!((length === 0))) { + return false; + } + } + data = $subslice(data, length); + } + return true; + }; + clientHelloMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + serverHelloMsg.ptr.prototype.marshal = function() { + var _i, _i$1, _i$2, _i$3, _ref, _ref$1, _ref$2, _ref$3, alpnLen, alpnLen$1, extensionsLength, l, l$1, l$2, length, m, nextProtoLen, numExtensions, sct, sct$1, sctLen, v, v$1, x, z; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + length = 38 + m.sessionId.$length >> 0; + numExtensions = 0; + extensionsLength = 0; + nextProtoLen = 0; + if (m.nextProtoNeg) { + numExtensions = numExtensions + (1) >> 0; + _ref = m.nextProtos; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + nextProtoLen = nextProtoLen + (v.length) >> 0; + _i++; + } + nextProtoLen = nextProtoLen + (m.nextProtos.$length) >> 0; + extensionsLength = extensionsLength + (nextProtoLen) >> 0; + } + if (m.ocspStapling) { + numExtensions = numExtensions + (1) >> 0; + } + if (m.ticketSupported) { + numExtensions = numExtensions + (1) >> 0; + } + if (m.secureRenegotiationSupported) { + extensionsLength = extensionsLength + ((1 + m.secureRenegotiation.$length >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + alpnLen = m.alpnProtocol.length; + if (alpnLen > 0) { + if (alpnLen >= 256) { + $panic(new $String("invalid ALPN protocol")); + } + extensionsLength = extensionsLength + ((3 + alpnLen >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + sctLen = 0; + if (m.scts.$length > 0) { + _ref$1 = m.scts; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + sct = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + sctLen = sctLen + ((sct.$length + 2 >> 0)) >> 0; + _i$1++; + } + extensionsLength = extensionsLength + ((2 + sctLen >> 0)) >> 0; + numExtensions = numExtensions + (1) >> 0; + } + if (numExtensions > 0) { + extensionsLength = extensionsLength + (($imul(4, numExtensions))) >> 0; + length = length + ((2 + extensionsLength >> 0)) >> 0; + } + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 2); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (((m.vers >>> 8 << 16 >>> 16) << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = ((m.vers << 24 >>> 24))); + $copySlice($subslice(x, 6, 38), m.random); + (38 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 38] = ((m.sessionId.$length << 24 >>> 24))); + $copySlice($subslice(x, 39, (39 + m.sessionId.$length >> 0)), m.sessionId); + z = $subslice(x, (39 + m.sessionId.$length >> 0)); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((m.cipherSuite >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((m.cipherSuite << 24 >>> 24))); + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = m.compressionMethod); + z = $subslice(z, 3); + if (numExtensions > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((extensionsLength >> 8 >> 0) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((extensionsLength << 24 >>> 24))); + z = $subslice(z, 2); + } + if (m.nextProtoNeg) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 51); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 116); + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((nextProtoLen >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((nextProtoLen << 24 >>> 24))); + z = $subslice(z, 4); + _ref$2 = m.nextProtos; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + v$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + l = v$1.length; + if (l > 255) { + l = 255; + } + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((l << 24 >>> 24))); + $copySlice($subslice(z, 1), (new sliceType$7($stringToBytes($substring(v$1, 0, l))))); + z = $subslice(z, (1 + l >> 0)); + _i$2++; + } + } + if (m.ocspStapling) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 5); + z = $subslice(z, 4); + } + if (m.ticketSupported) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 35); + z = $subslice(z, 4); + } + if (m.secureRenegotiationSupported) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 255); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 1); + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = 0); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = (((m.secureRenegotiation.$length + 1 >> 0) << 24 >>> 24))); + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = ((m.secureRenegotiation.$length << 24 >>> 24))); + z = $subslice(z, 5); + $copySlice(z, m.secureRenegotiation); + z = $subslice(z, m.secureRenegotiation.$length); + } + alpnLen$1 = m.alpnProtocol.length; + if (alpnLen$1 > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 16); + l$1 = 3 + alpnLen$1 >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$1 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$1 << 24 >>> 24))); + l$1 = l$1 - (2) >> 0; + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = (((l$1 >> 8 >> 0) << 24 >>> 24))); + (5 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 5] = ((l$1 << 24 >>> 24))); + l$1 = l$1 - (1) >> 0; + (6 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 6] = ((l$1 << 24 >>> 24))); + $copySlice($subslice(z, 7), (new sliceType$7($stringToBytes(m.alpnProtocol)))); + z = $subslice(z, (7 + alpnLen$1 >> 0)); + } + if (sctLen > 0) { + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = 0); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = 18); + l$2 = sctLen + 2 >> 0; + (2 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 2] = (((l$2 >> 8 >> 0) << 24 >>> 24))); + (3 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 3] = ((l$2 << 24 >>> 24))); + (4 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 4] = (((sctLen >> 8 >> 0) << 24 >>> 24))); + (5 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 5] = ((sctLen << 24 >>> 24))); + z = $subslice(z, 6); + _ref$3 = m.scts; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + sct$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = (((sct$1.$length >> 8 >> 0) << 24 >>> 24))); + (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = ((sct$1.$length << 24 >>> 24))); + $copySlice($subslice(z, 2), sct$1); + z = $subslice(z, (sct$1.$length + 2 >> 0)); + _i$3++; + } + } + m.raw = x; + return x; + }; + serverHelloMsg.prototype.marshal = function() { return this.$val.marshal(); }; + serverHelloMsg.ptr.prototype.unmarshal = function(data) { + var _1, d, d$1, d$2, d$3, data, extension, extensionsLength, l, l$1, l$2, l$3, length, m, sctLen, sessionIdLen; + m = this; + if (data.$length < 42) { + return false; + } + m.raw = data; + m.vers = (((((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) << 16 >>> 16))) >>> 0; + m.random = $subslice(data, 6, 38); + sessionIdLen = (((38 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 38]) >> 0)); + if (sessionIdLen > 32 || data.$length < (39 + sessionIdLen >> 0)) { + return false; + } + m.sessionId = $subslice(data, 39, (39 + sessionIdLen >> 0)); + data = $subslice(data, (39 + sessionIdLen >> 0)); + if (data.$length < 3) { + return false; + } + m.cipherSuite = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + m.compressionMethod = (2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]); + data = $subslice(data, 3); + m.nextProtoNeg = false; + m.nextProtos = sliceType$1.nil; + m.ocspStapling = false; + m.scts = sliceType$9.nil; + m.ticketSupported = false; + m.alpnProtocol = ""; + if (data.$length === 0) { + return true; + } + if (data.$length < 2) { + return false; + } + extensionsLength = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + data = $subslice(data, 2); + if (!((data.$length === extensionsLength))) { + return false; + } + while (true) { + if (!(!((data.$length === 0)))) { break; } + if (data.$length < 4) { + return false; + } + extension = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + length = ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); + data = $subslice(data, 4); + if (data.$length < length) { + return false; + } + _1 = extension; + if (_1 === (13172)) { + m.nextProtoNeg = true; + d = $subslice(data, 0, length); + while (true) { + if (!(d.$length > 0)) { break; } + l = (((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >> 0)); + d = $subslice(d, 1); + if ((l === 0) || l > d.$length) { + return false; + } + m.nextProtos = $append(m.nextProtos, ($bytesToString($subslice(d, 0, l)))); + d = $subslice(d, l); + } + } else if (_1 === (5)) { + if (length > 0) { + return false; + } + m.ocspStapling = true; + } else if (_1 === (35)) { + if (length > 0) { + return false; + } + m.ticketSupported = true; + } else if (_1 === (65281)) { + if (length === 0) { + return false; + } + d$1 = $subslice(data, 0, length); + l$1 = (((0 >= d$1.$length ? ($throwRuntimeError("index out of range"), undefined) : d$1.$array[d$1.$offset + 0]) >> 0)); + d$1 = $subslice(d$1, 1); + if (!((l$1 === d$1.$length))) { + return false; + } + m.secureRenegotiation = d$1; + m.secureRenegotiationSupported = true; + } else if (_1 === (16)) { + d$2 = $subslice(data, 0, length); + if (d$2.$length < 3) { + return false; + } + l$2 = ((((0 >= d$2.$length ? ($throwRuntimeError("index out of range"), undefined) : d$2.$array[d$2.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= d$2.$length ? ($throwRuntimeError("index out of range"), undefined) : d$2.$array[d$2.$offset + 1]) >> 0)); + if (!((l$2 === (d$2.$length - 2 >> 0)))) { + return false; + } + d$2 = $subslice(d$2, 2); + l$2 = (((0 >= d$2.$length ? ($throwRuntimeError("index out of range"), undefined) : d$2.$array[d$2.$offset + 0]) >> 0)); + if (!((l$2 === (d$2.$length - 1 >> 0)))) { + return false; + } + d$2 = $subslice(d$2, 1); + if (d$2.$length === 0) { + return false; + } + m.alpnProtocol = ($bytesToString(d$2)); + } else if (_1 === (18)) { + d$3 = $subslice(data, 0, length); + if (d$3.$length < 2) { + return false; + } + l$3 = ((((0 >= d$3.$length ? ($throwRuntimeError("index out of range"), undefined) : d$3.$array[d$3.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= d$3.$length ? ($throwRuntimeError("index out of range"), undefined) : d$3.$array[d$3.$offset + 1]) >> 0)); + d$3 = $subslice(d$3, 2); + if (!((d$3.$length === l$3)) || (l$3 === 0)) { + return false; + } + m.scts = $makeSlice(sliceType$9, 0, 3); + while (true) { + if (!(!((d$3.$length === 0)))) { break; } + if (d$3.$length < 2) { + return false; + } + sctLen = ((((0 >= d$3.$length ? ($throwRuntimeError("index out of range"), undefined) : d$3.$array[d$3.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= d$3.$length ? ($throwRuntimeError("index out of range"), undefined) : d$3.$array[d$3.$offset + 1]) >> 0)); + d$3 = $subslice(d$3, 2); + if ((sctLen === 0) || d$3.$length < sctLen) { + return false; + } + m.scts = $append(m.scts, $subslice(d$3, 0, sctLen)); + d$3 = $subslice(d$3, sctLen); + } + } + data = $subslice(data, length); + } + return true; + }; + serverHelloMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + certificateMsg.ptr.prototype.marshal = function() { + var _i, _i$1, _ref, _ref$1, certificateOctets, i, length, m, slice, slice$1, x, y; + x = sliceType$7.nil; + m = this; + if (!(m.raw === sliceType$7.nil)) { + x = m.raw; + return x; + } + i = 0; + _ref = m.certificates; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + i = i + (slice.$length) >> 0; + _i++; + } + length = (3 + ($imul(3, m.certificates.$length)) >> 0) + i >> 0; + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 11); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + certificateOctets = length - 3 >> 0; + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (((certificateOctets >> 16 >> 0) << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (((certificateOctets >> 8 >> 0) << 24 >>> 24))); + (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = ((certificateOctets << 24 >>> 24))); + y = $subslice(x, 7); + _ref$1 = m.certificates; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + slice$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((slice$1.$length >> 16 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = (((slice$1.$length >> 8 >> 0) << 24 >>> 24))); + (2 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 2] = ((slice$1.$length << 24 >>> 24))); + $copySlice($subslice(y, 3), slice$1); + y = $subslice(y, (3 + slice$1.$length >> 0)); + _i$1++; + } + m.raw = x; + return x; + }; + certificateMsg.prototype.marshal = function() { return this.$val.marshal(); }; + certificateMsg.ptr.prototype.unmarshal = function(data) { + var certLen, certLen$1, certsLen, d, data, i, m, numCerts, x; + m = this; + if (data.$length < 7) { + return false; + } + m.raw = data; + certsLen = (((((((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) >>> 0)) << 16 >>> 0) | ((((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) >>> 0)) << 8 >>> 0)) >>> 0) | (((6 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 6]) >>> 0))) >>> 0; + if (!((((data.$length >>> 0)) === (certsLen + 7 >>> 0)))) { + return false; + } + numCerts = 0; + d = $subslice(data, 7); + while (true) { + if (!(certsLen > 0)) { break; } + if (d.$length < 4) { + return false; + } + certLen = (((((((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 2]) >>> 0))) >>> 0; + if (((d.$length >>> 0)) < (3 + certLen >>> 0)) { + return false; + } + d = $subslice(d, (3 + certLen >>> 0)); + certsLen = certsLen - ((3 + certLen >>> 0)) >>> 0; + numCerts = numCerts + (1) >> 0; + } + m.certificates = $makeSlice(sliceType$9, numCerts); + d = $subslice(data, 7); + i = 0; + while (true) { + if (!(i < numCerts)) { break; } + certLen$1 = (((((((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 2]) >>> 0))) >>> 0; + (x = m.certificates, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = $subslice(d, 3, (3 + certLen$1 >>> 0)))); + d = $subslice(d, (3 + certLen$1 >>> 0)); + i = i + (1) >> 0; + } + return true; + }; + certificateMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + serverKeyExchangeMsg.ptr.prototype.marshal = function() { + var length, m, x; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + length = m.key.$length; + x = $makeSlice(sliceType$7, (length + 4 >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 12); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + $copySlice($subslice(x, 4), m.key); + m.raw = x; + return x; + }; + serverKeyExchangeMsg.prototype.marshal = function() { return this.$val.marshal(); }; + serverKeyExchangeMsg.ptr.prototype.unmarshal = function(data) { + var data, m; + m = this; + m.raw = data; + if (data.$length < 4) { + return false; + } + m.key = $subslice(data, 4); + return true; + }; + serverKeyExchangeMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + certificateStatusMsg.ptr.prototype.marshal = function() { + var l, m, x; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + x = sliceType$7.nil; + if (m.statusType === 1) { + x = $makeSlice(sliceType$7, (8 + m.response.$length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 22); + l = m.response.$length + 4 >> 0; + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((l >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((l >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((l << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = 1); + l = l - (4) >> 0; + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (((l >> 16 >> 0) << 24 >>> 24))); + (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = (((l >> 8 >> 0) << 24 >>> 24))); + (7 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 7] = ((l << 24 >>> 24))); + $copySlice($subslice(x, 8), m.response); + } else { + x = new sliceType$7([22, 0, 0, 1, m.statusType]); + } + m.raw = x; + return x; + }; + certificateStatusMsg.prototype.marshal = function() { return this.$val.marshal(); }; + certificateStatusMsg.ptr.prototype.unmarshal = function(data) { + var data, m, respLen; + m = this; + m.raw = data; + if (data.$length < 5) { + return false; + } + m.statusType = (4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]); + m.response = sliceType$7.nil; + if (m.statusType === 1) { + if (data.$length < 8) { + return false; + } + respLen = (((((((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) >>> 0)) << 16 >>> 0) | ((((6 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 6]) >>> 0)) << 8 >>> 0)) >>> 0) | (((7 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 7]) >>> 0))) >>> 0; + if (!((((data.$length >>> 0)) === (8 + respLen >>> 0)))) { + return false; + } + m.response = $subslice(data, 8); + } + return true; + }; + certificateStatusMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + serverHelloDoneMsg.ptr.prototype.marshal = function() { + var m, x; + m = this; + x = $makeSlice(sliceType$7, 4); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 14); + return x; + }; + serverHelloDoneMsg.prototype.marshal = function() { return this.$val.marshal(); }; + serverHelloDoneMsg.ptr.prototype.unmarshal = function(data) { + var data, m; + m = this; + return data.$length === 4; + }; + serverHelloDoneMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + clientKeyExchangeMsg.ptr.prototype.marshal = function() { + var length, m, x; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + length = m.ciphertext.$length; + x = $makeSlice(sliceType$7, (length + 4 >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 16); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + $copySlice($subslice(x, 4), m.ciphertext); + m.raw = x; + return x; + }; + clientKeyExchangeMsg.prototype.marshal = function() { return this.$val.marshal(); }; + clientKeyExchangeMsg.ptr.prototype.unmarshal = function(data) { + var data, l, m; + m = this; + m.raw = data; + if (data.$length < 4) { + return false; + } + l = (((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) << 16 >> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0)) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); + if (!((l === (data.$length - 4 >> 0)))) { + return false; + } + m.ciphertext = $subslice(data, 4); + return true; + }; + clientKeyExchangeMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + finishedMsg.ptr.prototype.marshal = function() { + var m, x; + x = sliceType$7.nil; + m = this; + if (!(m.raw === sliceType$7.nil)) { + x = m.raw; + return x; + } + x = $makeSlice(sliceType$7, (4 + m.verifyData.$length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 20); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((m.verifyData.$length << 24 >>> 24))); + $copySlice($subslice(x, 4), m.verifyData); + m.raw = x; + return x; + }; + finishedMsg.prototype.marshal = function() { return this.$val.marshal(); }; + finishedMsg.ptr.prototype.unmarshal = function(data) { + var data, m; + m = this; + m.raw = data; + if (data.$length < 4) { + return false; + } + m.verifyData = $subslice(data, 4); + return true; + }; + finishedMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + nextProtoMsg.ptr.prototype.marshal = function() { + var _r, l, length, m, padding, x, y; + m = this; + if (!(m.raw === sliceType$7.nil)) { + return m.raw; + } + l = m.proto.length; + if (l > 255) { + l = 255; + } + padding = 32 - (_r = ((l + 2 >> 0)) % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0; + length = (l + padding >> 0) + 2 >> 0; + x = $makeSlice(sliceType$7, (length + 4 >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 67); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + y = $subslice(x, 4); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = ((l << 24 >>> 24))); + $copySlice($subslice(y, 1), (new sliceType$7($stringToBytes($substring(m.proto, 0, l))))); + y = $subslice(y, (1 + l >> 0)); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = ((padding << 24 >>> 24))); + m.raw = x; + return x; + }; + nextProtoMsg.prototype.marshal = function() { return this.$val.marshal(); }; + nextProtoMsg.ptr.prototype.unmarshal = function(data) { + var data, m, paddingLen, protoLen; + m = this; + m.raw = data; + if (data.$length < 5) { + return false; + } + data = $subslice(data, 4); + protoLen = (((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)); + data = $subslice(data, 1); + if (data.$length < protoLen) { + return false; + } + m.proto = ($bytesToString($subslice(data, 0, protoLen))); + data = $subslice(data, protoLen); + if (data.$length < 1) { + return false; + } + paddingLen = (((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)); + data = $subslice(data, 1); + if (!((data.$length === paddingLen))) { + return false; + } + return true; + }; + nextProtoMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + certificateRequestMsg.ptr.prototype.marshal = function() { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, ca, ca$1, casLength, length, m, n, sigAlgo, x, y; + x = sliceType$7.nil; + m = this; + if (!(m.raw === sliceType$7.nil)) { + x = m.raw; + return x; + } + length = (1 + m.certificateTypes.$length >> 0) + 2 >> 0; + casLength = 0; + _ref = m.certificateAuthorities; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ca = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + casLength = casLength + ((2 + ca.$length >> 0)) >> 0; + _i++; + } + length = length + (casLength) >> 0; + if (m.hasSignatureAndHash) { + length = length + ((2 + ($imul(2, m.supportedSignatureAlgorithms.$length)) >> 0)) >> 0; + } + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 13); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = ((m.certificateTypes.$length << 24 >>> 24))); + $copySlice($subslice(x, 5), m.certificateTypes); + y = $subslice(x, (5 + m.certificateTypes.$length >> 0)); + if (m.hasSignatureAndHash) { + n = $imul(m.supportedSignatureAlgorithms.$length, 2); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((n >> 8 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((n << 24 >>> 24))); + y = $subslice(y, 2); + _ref$1 = m.supportedSignatureAlgorithms; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + sigAlgo = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((sigAlgo >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((sigAlgo << 24 >>> 24))); + y = $subslice(y, 2); + _i$1++; + } + } + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((casLength >> 8 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((casLength << 24 >>> 24))); + y = $subslice(y, 2); + _ref$2 = m.certificateAuthorities; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + ca$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((ca$1.$length >> 8 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((ca$1.$length << 24 >>> 24))); + y = $subslice(y, 2); + $copySlice(y, ca$1); + y = $subslice(y, ca$1.$length); + _i$2++; + } + m.raw = x; + return x; + }; + certificateRequestMsg.prototype.marshal = function() { return this.$val.marshal(); }; + certificateRequestMsg.ptr.prototype.unmarshal = function(data) { + var _i, _q, _ref, caLen, cas, casLength, data, i, length, m, numCertTypes, numSigAlgos, sigAndHashLen, x; + m = this; + m.raw = data; + if (data.$length < 5) { + return false; + } + length = (((((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >>> 0)) << 16 >>> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >>> 0))) >>> 0; + if (!(((((data.$length >>> 0)) - 4 >>> 0) === length))) { + return false; + } + numCertTypes = (((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) >> 0)); + data = $subslice(data, 5); + if ((numCertTypes === 0) || data.$length <= numCertTypes) { + return false; + } + m.certificateTypes = $makeSlice(sliceType$7, numCertTypes); + if (!(($copySlice(m.certificateTypes, data) === numCertTypes))) { + return false; + } + data = $subslice(data, numCertTypes); + if (m.hasSignatureAndHash) { + if (data.$length < 2) { + return false; + } + sigAndHashLen = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + data = $subslice(data, 2); + if (!((((sigAndHashLen & 1) >>> 0) === 0))) { + return false; + } + if (data.$length < ((sigAndHashLen >> 0))) { + return false; + } + numSigAlgos = (_q = sigAndHashLen / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + m.supportedSignatureAlgorithms = $makeSlice(sliceType$6, numSigAlgos); + _ref = m.supportedSignatureAlgorithms; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + (x = m.supportedSignatureAlgorithms, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = ((((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0))); + data = $subslice(data, 2); + _i++; + } + } + if (data.$length < 2) { + return false; + } + casLength = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + data = $subslice(data, 2); + if (data.$length < ((casLength >> 0))) { + return false; + } + cas = $makeSlice(sliceType$7, casLength); + $copySlice(cas, data); + data = $subslice(data, casLength); + m.certificateAuthorities = sliceType$9.nil; + while (true) { + if (!(cas.$length > 0)) { break; } + if (cas.$length < 2) { + return false; + } + caLen = (((((0 >= cas.$length ? ($throwRuntimeError("index out of range"), undefined) : cas.$array[cas.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= cas.$length ? ($throwRuntimeError("index out of range"), undefined) : cas.$array[cas.$offset + 1]) << 16 >>> 16))) >>> 0; + cas = $subslice(cas, 2); + if (cas.$length < ((caLen >> 0))) { + return false; + } + m.certificateAuthorities = $append(m.certificateAuthorities, $subslice(cas, 0, caLen)); + cas = $subslice(cas, caLen); + } + return data.$length === 0; + }; + certificateRequestMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + certificateVerifyMsg.ptr.prototype.marshal = function() { + var length, m, siglength, x, y; + x = sliceType$7.nil; + m = this; + if (!(m.raw === sliceType$7.nil)) { + x = m.raw; + return x; + } + siglength = m.signature.$length; + length = 2 + siglength >> 0; + if (m.hasSignatureAndHash) { + length = length + (2) >> 0; + } + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 15); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + y = $subslice(x, 4); + if (m.hasSignatureAndHash) { + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((m.signatureAlgorithm >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((m.signatureAlgorithm << 24 >>> 24))); + y = $subslice(y, 2); + } + (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((siglength >> 8 >> 0) << 24 >>> 24))); + (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((siglength << 24 >>> 24))); + $copySlice($subslice(y, 2), m.signature); + m.raw = x; + return x; + }; + certificateVerifyMsg.prototype.marshal = function() { return this.$val.marshal(); }; + certificateVerifyMsg.ptr.prototype.unmarshal = function(data) { + var data, length, m, siglength; + m = this; + m.raw = data; + if (data.$length < 6) { + return false; + } + length = (((((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >>> 0)) << 16 >>> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >>> 0))) >>> 0; + if (!(((((data.$length >>> 0)) - 4 >>> 0) === length))) { + return false; + } + data = $subslice(data, 4); + if (m.hasSignatureAndHash) { + m.signatureAlgorithm = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + data = $subslice(data, 2); + } + if (data.$length < 2) { + return false; + } + siglength = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) + (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) >> 0; + data = $subslice(data, 2); + if (!((data.$length === siglength))) { + return false; + } + m.signature = data; + return true; + }; + certificateVerifyMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + newSessionTicketMsg.ptr.prototype.marshal = function() { + var length, m, ticketLen, x; + x = sliceType$7.nil; + m = this; + if (!(m.raw === sliceType$7.nil)) { + x = m.raw; + return x; + } + ticketLen = m.ticket.$length; + length = 6 + ticketLen >> 0; + x = $makeSlice(sliceType$7, (4 + length >> 0)); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 4); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); + (8 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 8] = (((ticketLen >> 8 >> 0) << 24 >>> 24))); + (9 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 9] = ((ticketLen << 24 >>> 24))); + $copySlice($subslice(x, 10), m.ticket); + m.raw = x; + return x; + }; + newSessionTicketMsg.prototype.marshal = function() { return this.$val.marshal(); }; + newSessionTicketMsg.ptr.prototype.unmarshal = function(data) { + var data, length, m, ticketLen; + m = this; + m.raw = data; + if (data.$length < 10) { + return false; + } + length = (((((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >>> 0)) << 16 >>> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >>> 0))) >>> 0; + if (!(((((data.$length >>> 0)) - 4 >>> 0) === length))) { + return false; + } + ticketLen = ((((8 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 8]) >> 0)) << 8 >> 0) + (((9 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 9]) >> 0)) >> 0; + if (!(((data.$length - 10 >> 0) === ticketLen))) { + return false; + } + m.ticket = $subslice(data, 10); + return true; + }; + newSessionTicketMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + helloRequestMsg.ptr.prototype.marshal = function() { + return new sliceType$7([0, 0, 0, 0]); + }; + helloRequestMsg.prototype.marshal = function() { return this.$val.marshal(); }; + helloRequestMsg.ptr.prototype.unmarshal = function(data) { + var data; + return data.$length === 4; + }; + helloRequestMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + Conn.ptr.prototype.serverHandshake = function() { + var _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, err, err$1, err$10, err$11, err$12, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, isResume, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; c = $f.c; err = $f.err; err$1 = $f.err$1; err$10 = $f.err$10; err$11 = $f.err$11; err$12 = $f.err$12; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; err$7 = $f.err$7; err$8 = $f.err$8; err$9 = $f.err$9; hs = $f.hs; isResume = $f.isResume; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + c[0] = this; + $r = c[0].config.serverInitOnce.Do((function(c) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = c[0].config.serverInit(ptrType$5.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + hs = new serverHandshakeState.ptr(c[0], ptrType$16.nil, ptrType$18.nil, ptrType$1.nil, false, false, false, false, ptrType$30.nil, new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$7.nil, 0, $throwNilPointerError), sliceType$7.nil, sliceType$9.nil, ptrType$6.nil, ptrType$31.nil); + _r = hs.readClientHello(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + isResume = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + c[0].buffering = true; + /* */ if (isResume) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (isResume) { */ case 3: + _r$1 = hs.doResumeHandshake(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$2 = hs.establishKeys(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$2 = _r$2; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + /* */ if (hs.hello.ticketSupported) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (hs.hello.ticketSupported) { */ case 8: + _r$3 = hs.sendSessionTicket(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$3 = _r$3; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 9: + _r$4 = hs.sendFinished(new sliceType$7(c[0].serverFinished)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$4 = _r$4; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + _r$5 = c[0].flush(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + err$5 = _tuple$1[1]; + if (!($interfaceIsEqual(err$5, $ifaceNil))) { + $s = -1; return err$5; + } + c[0].clientFinishedIsFirst = false; + _r$6 = hs.readFinished(sliceType$7.nil); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err$6 = _r$6; + if (!($interfaceIsEqual(err$6, $ifaceNil))) { + $s = -1; return err$6; + } + c[0].didResume = true; + $s = 5; continue; + /* } else { */ case 4: + _r$7 = hs.doFullHandshake(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err$7 = _r$7; + if (!($interfaceIsEqual(err$7, $ifaceNil))) { + $s = -1; return err$7; + } + _r$8 = hs.establishKeys(); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err$8 = _r$8; + if (!($interfaceIsEqual(err$8, $ifaceNil))) { + $s = -1; return err$8; + } + _r$9 = hs.readFinished(new sliceType$7(c[0].clientFinished)); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err$9 = _r$9; + if (!($interfaceIsEqual(err$9, $ifaceNil))) { + $s = -1; return err$9; + } + c[0].clientFinishedIsFirst = true; + c[0].buffering = true; + _r$10 = hs.sendSessionTicket(); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err$10 = _r$10; + if (!($interfaceIsEqual(err$10, $ifaceNil))) { + $s = -1; return err$10; + } + _r$11 = hs.sendFinished(sliceType$7.nil); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err$11 = _r$11; + if (!($interfaceIsEqual(err$11, $ifaceNil))) { + $s = -1; return err$11; + } + _r$12 = c[0].flush(); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$2 = _r$12; + err$12 = _tuple$2[1]; + if (!($interfaceIsEqual(err$12, $ifaceNil))) { + $s = -1; return err$12; + } + /* } */ case 5: + c[0].ekm = ekmFromMasterSecret(c[0].vers, hs.suite, hs.masterSecret, hs.clientHello.random, hs.hello.random); + atomic.StoreUint32((c[0].$ptr_handshakeStatus || (c[0].$ptr_handshakeStatus = new ptrType$14(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c[0]))), 1); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.serverHandshake }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.err$10 = err$10; $f.err$11 = err$11; $f.err$12 = err$12; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.err$7 = err$7; $f.err$8 = err$8; $f.err$9 = err$9; $f.hs = hs; $f.isResume = isResume; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.serverHandshake = function() { return this.$val.serverHandshake(); }; + serverHandshakeState.ptr.prototype.readClientHello = function() { + var _arg, _arg$1, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, c, compression, curve, err, err$1, fallback, foundCompression, hs, id, id$1, isResume, msg, newConfig, ok, ok$1, ok$2, pointFormat, preferenceList, preferredCurves, priv, priv$1, selectedProto, supported, supportedCurve, supportedList, supportedPointFormat, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _i$4 = $f._i$4; _i$5 = $f._i$5; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _ref$4 = $f._ref$4; _ref$5 = $f._ref$5; _ref$6 = $f._ref$6; _ref$7 = $f._ref$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; c = $f.c; compression = $f.compression; curve = $f.curve; err = $f.err; err$1 = $f.err$1; fallback = $f.fallback; foundCompression = $f.foundCompression; hs = $f.hs; id = $f.id; id$1 = $f.id$1; isResume = $f.isResume; msg = $f.msg; newConfig = $f.newConfig; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; pointFormat = $f.pointFormat; preferenceList = $f.preferenceList; preferredCurves = $f.preferredCurves; priv = $f.priv; priv$1 = $f.priv$1; selectedProto = $f.selectedProto; supported = $f.supported; supportedCurve = $f.supportedCurve; supportedList = $f.supportedList; supportedPointFormat = $f.supportedPointFormat; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + newConfig = [newConfig]; + isResume = false; + err = $ifaceNil; + hs = this; + c[0] = hs.c; + _r = c[0].readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = false; + _tmp$1 = err; + isResume = _tmp; + err = _tmp$1; + $s = -1; return [isResume, err]; + } + ok = false; + _tuple$1 = $assertType(msg, ptrType$16, true); + hs.clientHello = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$1 = c[0].sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _tmp$2 = false; + _r$2 = unexpectedMessageError(hs.clientHello, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tmp$3 = _r$2; + isResume = _tmp$2; + err = _tmp$3; + $s = -1; return [isResume, err]; + /* } */ case 3: + /* */ if (!(c[0].config.GetConfigForClient === $throwNilPointerError)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(c[0].config.GetConfigForClient === $throwNilPointerError)) { */ case 6: + _r$3 = c[0].config.GetConfigForClient(hs.clientHelloInfo()); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + newConfig[0] = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 9; continue; } + /* */ if (!(newConfig[0] === ptrType$5.nil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 9: + _r$4 = c[0].sendAlert(80); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _tmp$4 = false; + _tmp$5 = err$1; + isResume = _tmp$4; + err = _tmp$5; + $s = -1; return [isResume, err]; + /* } else if (!(newConfig[0] === ptrType$5.nil)) { */ case 10: + $r = newConfig[0].serverInitOnce.Do((function(c, newConfig) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = newConfig[0].serverInit(c[0].config); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(c, newConfig)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + c[0].config = newConfig[0]; + /* } */ case 11: + /* } */ case 7: + _tuple$3 = c[0].config.mutualVersion(hs.clientHello.vers); + c[0].vers = _tuple$3[0]; + ok = _tuple$3[1]; + /* */ if (!ok) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!ok) { */ case 14: + _r$5 = c[0].sendAlert(70); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _tmp$6 = false; + _r$6 = fmt.Errorf("tls: client offered an unsupported, maximum protocol version of %x", new sliceType$8([new $Uint16(hs.clientHello.vers)])); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tmp$7 = _r$6; + isResume = _tmp$6; + err = _tmp$7; + $s = -1; return [isResume, err]; + /* } */ case 15: + c[0].haveVers = true; + hs.hello = new serverHelloMsg.ptr(sliceType$7.nil, 0, sliceType$7.nil, sliceType$7.nil, 0, 0, false, sliceType$1.nil, false, sliceType$9.nil, false, sliceType$7.nil, false, ""); + supportedCurve = false; + preferredCurves = c[0].config.curvePreferences(); + _ref = hs.clientHello.supportedCurves; + _i = 0; + Curves: + while (true) { + if (!(_i < _ref.$length)) { break; } + curve = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = preferredCurves; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + supported = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (supported === curve) { + supportedCurve = true; + break Curves; + } + _i$1++; + } + _i++; + } + supportedPointFormat = false; + _ref$2 = hs.clientHello.supportedPoints; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + pointFormat = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + if (pointFormat === 0) { + supportedPointFormat = true; + break; + } + _i$2++; + } + hs.ellipticOk = supportedCurve && supportedPointFormat; + foundCompression = false; + _ref$3 = hs.clientHello.compressionMethods; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + compression = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + if (compression === 0) { + foundCompression = true; + break; + } + _i$3++; + } + /* */ if (!foundCompression) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!foundCompression) { */ case 18: + _r$7 = c[0].sendAlert(40); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + _tmp$8 = false; + _tmp$9 = errors.New("tls: client does not support uncompressed connections"); + isResume = _tmp$8; + err = _tmp$9; + $s = -1; return [isResume, err]; + /* } */ case 19: + hs.hello.vers = c[0].vers; + hs.hello.random = $makeSlice(sliceType$7, 32); + _r$8 = io.ReadFull(c[0].config.rand(), hs.hello.random); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$4 = _r$8; + err = _tuple$4[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 22: + _r$9 = c[0].sendAlert(80); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _tmp$10 = false; + _tmp$11 = err; + isResume = _tmp$10; + err = _tmp$11; + $s = -1; return [isResume, err]; + /* } */ case 23: + /* */ if (!((hs.clientHello.secureRenegotiation.$length === 0))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!((hs.clientHello.secureRenegotiation.$length === 0))) { */ case 25: + _r$10 = c[0].sendAlert(40); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + _tmp$12 = false; + _tmp$13 = errors.New("tls: initial handshake had non-empty renegotiation extension"); + isResume = _tmp$12; + err = _tmp$13; + $s = -1; return [isResume, err]; + /* } */ case 26: + hs.hello.secureRenegotiationSupported = hs.clientHello.secureRenegotiationSupported; + hs.hello.compressionMethod = 0; + if (hs.clientHello.serverName.length > 0) { + c[0].serverName = hs.clientHello.serverName; + } + if (hs.clientHello.alpnProtocols.$length > 0) { + _tuple$5 = mutualProtocol(hs.clientHello.alpnProtocols, c[0].config.NextProtos); + selectedProto = _tuple$5[0]; + fallback = _tuple$5[1]; + if (!fallback) { + hs.hello.alpnProtocol = selectedProto; + c[0].clientProtocol = selectedProto; + } + } else { + if (hs.clientHello.nextProtoNeg && c[0].config.NextProtos.$length > 0) { + hs.hello.nextProtoNeg = true; + hs.hello.nextProtos = c[0].config.NextProtos; + } + } + _r$11 = c[0].config.getCertificate(hs.clientHelloInfo()); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$6 = _r$11; + hs.cert = _tuple$6[0]; + err = _tuple$6[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 29; continue; } + /* */ $s = 30; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 29: + _r$12 = c[0].sendAlert(80); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + _tmp$14 = false; + _tmp$15 = err; + isResume = _tmp$14; + err = _tmp$15; + $s = -1; return [isResume, err]; + /* } */ case 30: + if (hs.clientHello.scts) { + hs.hello.scts = hs.cert.SignedCertificateTimestamps; + } + _tuple$7 = $assertType(hs.cert.PrivateKey, crypto.Signer, true); + priv = _tuple$7[0]; + ok$1 = _tuple$7[1]; + /* */ if (ok$1) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (ok$1) { */ case 32: + _r$13 = priv.Public(); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _ref$4 = _r$13; + /* */ if ($assertType(_ref$4, ptrType$3, true)[1]) { $s = 35; continue; } + /* */ if ($assertType(_ref$4, ptrType$2, true)[1]) { $s = 36; continue; } + /* */ $s = 37; continue; + /* if ($assertType(_ref$4, ptrType$3, true)[1]) { */ case 35: + hs.ecdsaOk = true; + $s = 38; continue; + /* } else if ($assertType(_ref$4, ptrType$2, true)[1]) { */ case 36: + hs.rsaSignOk = true; + $s = 38; continue; + /* } else { */ case 37: + _r$14 = c[0].sendAlert(80); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + _tmp$16 = false; + _r$15 = priv.Public(); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _arg = _r$15; + _r$16 = fmt.Errorf("tls: unsupported signing key type (%T)", new sliceType$8([_arg])); /* */ $s = 41; case 41: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tmp$17 = _r$16; + isResume = _tmp$16; + err = _tmp$17; + $s = -1; return [isResume, err]; + /* } */ case 38: + /* } */ case 33: + _tuple$8 = $assertType(hs.cert.PrivateKey, crypto.Decrypter, true); + priv$1 = _tuple$8[0]; + ok$2 = _tuple$8[1]; + /* */ if (ok$2) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (ok$2) { */ case 42: + _r$17 = priv$1.Public(); /* */ $s = 44; case 44: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _ref$5 = _r$17; + /* */ if ($assertType(_ref$5, ptrType$2, true)[1]) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if ($assertType(_ref$5, ptrType$2, true)[1]) { */ case 45: + hs.rsaDecryptOk = true; + $s = 47; continue; + /* } else { */ case 46: + _r$18 = c[0].sendAlert(80); /* */ $s = 48; case 48: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _r$18; + _tmp$18 = false; + _r$19 = priv$1.Public(); /* */ $s = 49; case 49: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _arg$1 = _r$19; + _r$20 = fmt.Errorf("tls: unsupported decryption key type (%T)", new sliceType$8([_arg$1])); /* */ $s = 50; case 50: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _tmp$19 = _r$20; + isResume = _tmp$18; + err = _tmp$19; + $s = -1; return [isResume, err]; + /* } */ case 47: + /* } */ case 43: + _r$21 = hs.checkForResumption(); /* */ $s = 53; case 53: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + /* */ if (_r$21) { $s = 51; continue; } + /* */ $s = 52; continue; + /* if (_r$21) { */ case 51: + _tmp$20 = true; + _tmp$21 = $ifaceNil; + isResume = _tmp$20; + err = _tmp$21; + $s = -1; return [isResume, err]; + /* } */ case 52: + _tmp$22 = sliceType$2.nil; + _tmp$23 = sliceType$2.nil; + preferenceList = _tmp$22; + supportedList = _tmp$23; + /* */ if (c[0].config.PreferServerCipherSuites) { $s = 54; continue; } + /* */ $s = 55; continue; + /* if (c[0].config.PreferServerCipherSuites) { */ case 54: + _r$22 = c[0].config.cipherSuites(); /* */ $s = 57; case 57: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + preferenceList = _r$22; + supportedList = hs.clientHello.cipherSuites; + $s = 56; continue; + /* } else { */ case 55: + preferenceList = hs.clientHello.cipherSuites; + _r$23 = c[0].config.cipherSuites(); /* */ $s = 58; case 58: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + supportedList = _r$23; + /* } */ case 56: + _ref$6 = preferenceList; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$6.$length)) { break; } + id = ((_i$4 < 0 || _i$4 >= _ref$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$6.$array[_ref$6.$offset + _i$4]); + if (hs.setCipherSuite(id, supportedList, c[0].vers)) { + break; + } + _i$4++; + } + /* */ if (hs.suite === ptrType$1.nil) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (hs.suite === ptrType$1.nil) { */ case 59: + _r$24 = c[0].sendAlert(40); /* */ $s = 61; case 61: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _r$24; + _tmp$24 = false; + _tmp$25 = errors.New("tls: no cipher suite supported by both client and server"); + isResume = _tmp$24; + err = _tmp$25; + $s = -1; return [isResume, err]; + /* } */ case 60: + _ref$7 = hs.clientHello.cipherSuites; + _i$5 = 0; + /* while (true) { */ case 62: + /* if (!(_i$5 < _ref$7.$length)) { break; } */ if(!(_i$5 < _ref$7.$length)) { $s = 63; continue; } + id$1 = ((_i$5 < 0 || _i$5 >= _ref$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$7.$array[_ref$7.$offset + _i$5]); + /* */ if (id$1 === 22016) { $s = 64; continue; } + /* */ $s = 65; continue; + /* if (id$1 === 22016) { */ case 64: + /* */ if (hs.clientHello.vers < c[0].config.maxVersion()) { $s = 66; continue; } + /* */ $s = 67; continue; + /* if (hs.clientHello.vers < c[0].config.maxVersion()) { */ case 66: + _r$25 = c[0].sendAlert(86); /* */ $s = 68; case 68: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + _r$25; + _tmp$26 = false; + _tmp$27 = errors.New("tls: client using inappropriate protocol fallback"); + isResume = _tmp$26; + err = _tmp$27; + $s = -1; return [isResume, err]; + /* } */ case 67: + /* break; */ $s = 63; continue; + /* } */ case 65: + _i$5++; + /* } */ $s = 62; continue; case 63: + _tmp$28 = false; + _tmp$29 = $ifaceNil; + isResume = _tmp$28; + err = _tmp$29; + $s = -1; return [isResume, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.readClientHello }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._i$4 = _i$4; $f._i$5 = _i$5; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._ref$4 = _ref$4; $f._ref$5 = _ref$5; $f._ref$6 = _ref$6; $f._ref$7 = _ref$7; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f.c = c; $f.compression = compression; $f.curve = curve; $f.err = err; $f.err$1 = err$1; $f.fallback = fallback; $f.foundCompression = foundCompression; $f.hs = hs; $f.id = id; $f.id$1 = id$1; $f.isResume = isResume; $f.msg = msg; $f.newConfig = newConfig; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.pointFormat = pointFormat; $f.preferenceList = preferenceList; $f.preferredCurves = preferredCurves; $f.priv = priv; $f.priv$1 = priv$1; $f.selectedProto = selectedProto; $f.supported = supported; $f.supportedCurve = supportedCurve; $f.supportedList = supportedList; $f.supportedPointFormat = supportedPointFormat; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.readClientHello = function() { return this.$val.readClientHello(); }; + serverHandshakeState.ptr.prototype.checkForResumption = function() { + var _arg, _arg$1, _arg$2, _i, _r, _r$1, _r$2, _ref, _tuple, c, cipherSuiteOk, hs, id, needClientCerts, ok, sessionHasClientCerts, sessionTicket, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tuple = $f._tuple; c = $f.c; cipherSuiteOk = $f.cipherSuiteOk; hs = $f.hs; id = $f.id; needClientCerts = $f.needClientCerts; ok = $f.ok; sessionHasClientCerts = $f.sessionHasClientCerts; sessionTicket = $f.sessionTicket; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + if (c.config.SessionTicketsDisabled) { + $s = -1; return false; + } + ok = false; + sessionTicket = $appendSlice(new sliceType$7([]), hs.clientHello.sessionTicket); + _r = c.decryptTicket(sessionTicket); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + hs.sessionState = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return false; + } + if (!((c.vers === hs.sessionState.vers))) { + $s = -1; return false; + } + cipherSuiteOk = false; + _ref = hs.clientHello.cipherSuites; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (id === hs.sessionState.cipherSuite) { + cipherSuiteOk = true; + break; + } + _i++; + } + if (!cipherSuiteOk) { + $s = -1; return false; + } + _arg = hs.sessionState.cipherSuite; + _r$1 = c.config.cipherSuites(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = _r$1; + _arg$2 = hs.sessionState.vers; + _r$2 = hs.setCipherSuite(_arg, _arg$1, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!_r$2) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!_r$2) { */ case 2: + $s = -1; return false; + /* } */ case 3: + sessionHasClientCerts = !((hs.sessionState.certificates.$length === 0)); + needClientCerts = (c.config.ClientAuth === 2) || (c.config.ClientAuth === 4); + if (needClientCerts && !sessionHasClientCerts) { + $s = -1; return false; + } + if (sessionHasClientCerts && (c.config.ClientAuth === 0)) { + $s = -1; return false; + } + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.checkForResumption }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tuple = _tuple; $f.c = c; $f.cipherSuiteOk = cipherSuiteOk; $f.hs = hs; $f.id = id; $f.needClientCerts = needClientCerts; $f.ok = ok; $f.sessionHasClientCerts = sessionHasClientCerts; $f.sessionTicket = sessionTicket; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.checkForResumption = function() { return this.$val.checkForResumption(); }; + serverHandshakeState.ptr.prototype.doResumeHandshake = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, c, err, err$1, hs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; err$1 = $f.err$1; hs = $f.hs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + hs.hello.cipherSuite = hs.suite.id; + hs.hello.sessionId = hs.clientHello.sessionId; + hs.hello.ticketSupported = hs.sessionState.usedOldKey; + _r = newFinishedHash(c.vers, hs.suite); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + finishedHash.copy(hs.finishedHash, _r); + hs.finishedHash.discardHandshakeBuffer(); + _r$1 = hs.finishedHash.Write(hs.clientHello.marshal()); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hs.finishedHash.Write(hs.hello.marshal()); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = c.writeRecord(22, hs.hello.marshal()); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (hs.sessionState.certificates.$length > 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (hs.sessionState.certificates.$length > 0) { */ case 5: + _r$4 = hs.processCertsFromClient(hs.sessionState.certificates); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ case 6: + hs.masterSecret = hs.sessionState.masterSecret; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.doResumeHandshake }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.hs = hs; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.doResumeHandshake = function() { return this.$val.doResumeHandshake(); }; + serverHandshakeState.ptr.prototype.doFullHandshake = function() { + var _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c, certMsg, certReq, certStatus, certVerify, ckx, digest, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hashFunc, helloDone, hs, keyAgreement$1, msg, ok, ok$1, preMasterSecret, pub, sigType, skx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$27 = $f._r$27; _r$28 = $f._r$28; _r$29 = $f._r$29; _r$3 = $f._r$3; _r$30 = $f._r$30; _r$31 = $f._r$31; _r$32 = $f._r$32; _r$33 = $f._r$33; _r$34 = $f._r$34; _r$35 = $f._r$35; _r$36 = $f._r$36; _r$37 = $f._r$37; _r$38 = $f._r$38; _r$39 = $f._r$39; _r$4 = $f._r$4; _r$40 = $f._r$40; _r$41 = $f._r$41; _r$42 = $f._r$42; _r$43 = $f._r$43; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$10 = $f._tuple$10; _tuple$11 = $f._tuple$11; _tuple$12 = $f._tuple$12; _tuple$13 = $f._tuple$13; _tuple$14 = $f._tuple$14; _tuple$15 = $f._tuple$15; _tuple$16 = $f._tuple$16; _tuple$17 = $f._tuple$17; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; _tuple$9 = $f._tuple$9; c = $f.c; certMsg = $f.certMsg; certReq = $f.certReq; certStatus = $f.certStatus; certVerify = $f.certVerify; ckx = $f.ckx; digest = $f.digest; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; err$6 = $f.err$6; err$7 = $f.err$7; err$8 = $f.err$8; err$9 = $f.err$9; hashFunc = $f.hashFunc; helloDone = $f.helloDone; hs = $f.hs; keyAgreement$1 = $f.keyAgreement$1; msg = $f.msg; ok = $f.ok; ok$1 = $f.ok$1; preMasterSecret = $f.preMasterSecret; pub = $f.pub; sigType = $f.sigType; skx = $f.skx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + if (hs.clientHello.ocspStapling && hs.cert.OCSPStaple.$length > 0) { + hs.hello.ocspStapling = true; + } + hs.hello.ticketSupported = hs.clientHello.ticketSupported && !c.config.SessionTicketsDisabled; + hs.hello.cipherSuite = hs.suite.id; + _r = newFinishedHash(hs.c.vers, hs.suite); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + finishedHash.copy(hs.finishedHash, _r); + if (c.config.ClientAuth === 0) { + hs.finishedHash.discardHandshakeBuffer(); + } + _r$1 = hs.finishedHash.Write(hs.clientHello.marshal()); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hs.finishedHash.Write(hs.hello.marshal()); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = c.writeRecord(22, hs.hello.marshal()); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + certMsg = new certificateMsg.ptr(sliceType$7.nil, sliceType$9.nil); + certMsg.certificates = hs.cert.Certificate; + _r$4 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = c.writeRecord(22, certMsg.marshal()); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* */ if (hs.hello.ocspStapling) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (hs.hello.ocspStapling) { */ case 7: + certStatus = new certificateStatusMsg.ptr(sliceType$7.nil, 0, sliceType$7.nil); + certStatus.statusType = 1; + certStatus.response = hs.cert.OCSPStaple; + _r$6 = hs.finishedHash.Write(certStatus.marshal()); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = c.writeRecord(22, certStatus.marshal()); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$2 = _r$7; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + /* } */ case 8: + _r$8 = hs.suite.ka(c.vers); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + keyAgreement$1 = _r$8; + _r$9 = keyAgreement$1.generateServerKeyExchange(c.config, hs.cert, hs.clientHello, hs.hello); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$3 = _r$9; + skx = _tuple$3[0]; + err$3 = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 13: + _r$10 = c.sendAlert(40); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return err$3; + /* } */ case 14: + /* */ if (!(skx === ptrType$22.nil)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!(skx === ptrType$22.nil)) { */ case 16: + _r$11 = hs.finishedHash.Write(skx.marshal()); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + _r$12 = c.writeRecord(22, skx.marshal()); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$4 = _r$12; + err$4 = _tuple$4[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + /* } */ case 17: + /* */ if (c.config.ClientAuth >= 1) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (c.config.ClientAuth >= 1) { */ case 20: + certReq = new certificateRequestMsg.ptr(sliceType$7.nil, false, sliceType$7.nil, sliceType$6.nil, sliceType$9.nil); + certReq.certificateTypes = new sliceType$7([1, 64]); + if (c.vers >= 771) { + certReq.hasSignatureAndHash = true; + certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms; + } + if (!(c.config.ClientCAs === ptrType.nil)) { + certReq.certificateAuthorities = c.config.ClientCAs.Subjects(); + } + _r$13 = hs.finishedHash.Write(certReq.marshal()); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + _r$14 = c.writeRecord(22, certReq.marshal()); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$5 = _r$14; + err$5 = _tuple$5[1]; + if (!($interfaceIsEqual(err$5, $ifaceNil))) { + $s = -1; return err$5; + } + /* } */ case 21: + helloDone = new serverHelloDoneMsg.ptr(); + _r$15 = hs.finishedHash.Write(helloDone.marshal()); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _r$15; + _r$16 = c.writeRecord(22, helloDone.marshal()); /* */ $s = 25; case 25: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$6 = _r$16; + err$6 = _tuple$6[1]; + if (!($interfaceIsEqual(err$6, $ifaceNil))) { + $s = -1; return err$6; + } + _r$17 = c.flush(); /* */ $s = 26; case 26: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tuple$7 = _r$17; + err$7 = _tuple$7[1]; + if (!($interfaceIsEqual(err$7, $ifaceNil))) { + $s = -1; return err$7; + } + pub = $ifaceNil; + _r$18 = c.readHandshake(); /* */ $s = 27; case 27: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _tuple$8 = _r$18; + msg = _tuple$8[0]; + err$3 = _tuple$8[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + ok = false; + /* */ if (c.config.ClientAuth >= 1) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (c.config.ClientAuth >= 1) { */ case 28: + _tuple$9 = $assertType(msg, ptrType$19, true); + certMsg = _tuple$9[0]; + ok = _tuple$9[1]; + /* */ if (!ok) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!ok) { */ case 30: + _r$19 = c.sendAlert(10); /* */ $s = 32; case 32: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _r$19; + _r$20 = unexpectedMessageError(certMsg, msg); /* */ $s = 33; case 33: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + $s = -1; return _r$20; + /* } */ case 31: + _r$21 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 34; case 34: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$21; + /* */ if (certMsg.certificates.$length === 0) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if (certMsg.certificates.$length === 0) { */ case 35: + _1 = c.config.ClientAuth; + /* */ if ((_1 === (2)) || (_1 === (4))) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if ((_1 === (2)) || (_1 === (4))) { */ case 38: + _r$22 = c.sendAlert(42); /* */ $s = 40; case 40: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _r$22; + $s = -1; return errors.New("tls: client didn't provide a certificate"); + /* } */ case 39: + case 37: + /* } */ case 36: + _r$23 = hs.processCertsFromClient(certMsg.certificates); /* */ $s = 41; case 41: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _tuple$10 = _r$23; + pub = _tuple$10[0]; + err$3 = _tuple$10[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + _r$24 = c.readHandshake(); /* */ $s = 42; case 42: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _tuple$11 = _r$24; + msg = _tuple$11[0]; + err$3 = _tuple$11[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 29: + _tuple$12 = $assertType(msg, ptrType$25, true); + ckx = _tuple$12[0]; + ok = _tuple$12[1]; + /* */ if (!ok) { $s = 43; continue; } + /* */ $s = 44; continue; + /* if (!ok) { */ case 43: + _r$25 = c.sendAlert(10); /* */ $s = 45; case 45: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + _r$25; + _r$26 = unexpectedMessageError(ckx, msg); /* */ $s = 46; case 46: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + $s = -1; return _r$26; + /* } */ case 44: + _r$27 = hs.finishedHash.Write(ckx.marshal()); /* */ $s = 47; case 47: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } + _r$27; + _r$28 = keyAgreement$1.processClientKeyExchange(c.config, hs.cert, ckx, c.vers); /* */ $s = 48; case 48: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } + _tuple$13 = _r$28; + preMasterSecret = _tuple$13[0]; + err$3 = _tuple$13[1]; + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 49: + _r$29 = c.sendAlert(40); /* */ $s = 51; case 51: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } + _r$29; + $s = -1; return err$3; + /* } */ case 50: + _r$30 = masterFromPreMasterSecret(c.vers, hs.suite, preMasterSecret, hs.clientHello.random, hs.hello.random); /* */ $s = 52; case 52: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } + hs.masterSecret = _r$30; + _r$31 = c.config.writeKeyLog(hs.clientHello.random, hs.masterSecret); /* */ $s = 53; case 53: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } + err$8 = _r$31; + /* */ if (!($interfaceIsEqual(err$8, $ifaceNil))) { $s = 54; continue; } + /* */ $s = 55; continue; + /* if (!($interfaceIsEqual(err$8, $ifaceNil))) { */ case 54: + _r$32 = c.sendAlert(80); /* */ $s = 56; case 56: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } + _r$32; + $s = -1; return err$8; + /* } */ case 55: + /* */ if (c.peerCertificates.$length > 0) { $s = 57; continue; } + /* */ $s = 58; continue; + /* if (c.peerCertificates.$length > 0) { */ case 57: + _r$33 = c.readHandshake(); /* */ $s = 59; case 59: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } + _tuple$14 = _r$33; + msg = _tuple$14[0]; + err$3 = _tuple$14[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + _tuple$15 = $assertType(msg, ptrType$29, true); + certVerify = _tuple$15[0]; + ok$1 = _tuple$15[1]; + /* */ if (!ok$1) { $s = 60; continue; } + /* */ $s = 61; continue; + /* if (!ok$1) { */ case 60: + _r$34 = c.sendAlert(10); /* */ $s = 62; case 62: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } + _r$34; + _r$35 = unexpectedMessageError(certVerify, msg); /* */ $s = 63; case 63: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } + $s = -1; return _r$35; + /* } */ case 61: + _r$36 = pickSignatureAlgorithm(pub, new sliceType$6([certVerify.signatureAlgorithm]), supportedSignatureAlgorithms, c.vers); /* */ $s = 64; case 64: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } + _tuple$16 = _r$36; + sigType = _tuple$16[1]; + hashFunc = _tuple$16[2]; + err$9 = _tuple$16[3]; + /* */ if (!($interfaceIsEqual(err$9, $ifaceNil))) { $s = 65; continue; } + /* */ $s = 66; continue; + /* if (!($interfaceIsEqual(err$9, $ifaceNil))) { */ case 65: + _r$37 = c.sendAlert(47); /* */ $s = 67; case 67: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } + _r$37; + $s = -1; return err$9; + /* } */ case 66: + digest = sliceType$7.nil; + _r$38 = $clone(hs.finishedHash, finishedHash).hashForClientCertificate(sigType, hashFunc, hs.masterSecret); /* */ $s = 68; case 68: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } + _tuple$17 = _r$38; + digest = _tuple$17[0]; + err$9 = _tuple$17[1]; + /* */ if ($interfaceIsEqual(err$9, $ifaceNil)) { $s = 69; continue; } + /* */ $s = 70; continue; + /* if ($interfaceIsEqual(err$9, $ifaceNil)) { */ case 69: + _r$39 = verifyHandshakeSignature(sigType, pub, hashFunc, digest, certVerify.signature); /* */ $s = 71; case 71: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } + err$9 = _r$39; + /* } */ case 70: + /* */ if (!($interfaceIsEqual(err$9, $ifaceNil))) { $s = 72; continue; } + /* */ $s = 73; continue; + /* if (!($interfaceIsEqual(err$9, $ifaceNil))) { */ case 72: + _r$40 = c.sendAlert(42); /* */ $s = 74; case 74: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } + _r$40; + _r$41 = err$9.Error(); /* */ $s = 75; case 75: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } + _r$42 = errors.New("tls: could not validate signature of connection nonces: " + _r$41); /* */ $s = 76; case 76: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } + $s = -1; return _r$42; + /* } */ case 73: + _r$43 = hs.finishedHash.Write(certVerify.marshal()); /* */ $s = 77; case 77: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } + _r$43; + /* } */ case 58: + hs.finishedHash.discardHandshakeBuffer(); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.doFullHandshake }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$27 = _r$27; $f._r$28 = _r$28; $f._r$29 = _r$29; $f._r$3 = _r$3; $f._r$30 = _r$30; $f._r$31 = _r$31; $f._r$32 = _r$32; $f._r$33 = _r$33; $f._r$34 = _r$34; $f._r$35 = _r$35; $f._r$36 = _r$36; $f._r$37 = _r$37; $f._r$38 = _r$38; $f._r$39 = _r$39; $f._r$4 = _r$4; $f._r$40 = _r$40; $f._r$41 = _r$41; $f._r$42 = _r$42; $f._r$43 = _r$43; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$10 = _tuple$10; $f._tuple$11 = _tuple$11; $f._tuple$12 = _tuple$12; $f._tuple$13 = _tuple$13; $f._tuple$14 = _tuple$14; $f._tuple$15 = _tuple$15; $f._tuple$16 = _tuple$16; $f._tuple$17 = _tuple$17; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f._tuple$9 = _tuple$9; $f.c = c; $f.certMsg = certMsg; $f.certReq = certReq; $f.certStatus = certStatus; $f.certVerify = certVerify; $f.ckx = ckx; $f.digest = digest; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.err$6 = err$6; $f.err$7 = err$7; $f.err$8 = err$8; $f.err$9 = err$9; $f.hashFunc = hashFunc; $f.helloDone = helloDone; $f.hs = hs; $f.keyAgreement$1 = keyAgreement$1; $f.msg = msg; $f.ok = ok; $f.ok$1 = ok$1; $f.preMasterSecret = preMasterSecret; $f.pub = pub; $f.sigType = sigType; $f.skx = skx; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.doFullHandshake = function() { return this.$val.doFullHandshake(); }; + serverHandshakeState.ptr.prototype.establishKeys = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; c = $f.c; clientCipher = $f.clientCipher; clientHash = $f.clientHash; clientIV = $f.clientIV; clientKey = $f.clientKey; clientMAC = $f.clientMAC; hs = $f.hs; serverCipher = $f.serverCipher; serverHash = $f.serverHash; serverIV = $f.serverIV; serverKey = $f.serverKey; serverMAC = $f.serverMAC; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = keysFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.clientHello.random, hs.hello.random, hs.suite.macLen, hs.suite.keyLen, hs.suite.ivLen); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + clientMAC = _tuple[0]; + serverMAC = _tuple[1]; + clientKey = _tuple[2]; + serverKey = _tuple[3]; + clientIV = _tuple[4]; + serverIV = _tuple[5]; + _tmp = $ifaceNil; + _tmp$1 = $ifaceNil; + clientCipher = _tmp; + serverCipher = _tmp$1; + _tmp$2 = $ifaceNil; + _tmp$3 = $ifaceNil; + clientHash = _tmp$2; + serverHash = _tmp$3; + /* */ if (hs.suite.aead === $throwNilPointerError) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (hs.suite.aead === $throwNilPointerError) { */ case 2: + _r$1 = hs.suite.cipher(clientKey, clientIV, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + clientCipher = _r$1; + _r$2 = hs.suite.mac(c.vers, clientMAC); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + clientHash = _r$2; + _r$3 = hs.suite.cipher(serverKey, serverIV, false); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + serverCipher = _r$3; + _r$4 = hs.suite.mac(c.vers, serverMAC); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + serverHash = _r$4; + $s = 4; continue; + /* } else { */ case 3: + _r$5 = hs.suite.aead(clientKey, clientIV); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + clientCipher = _r$5; + _r$6 = hs.suite.aead(serverKey, serverIV); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + serverCipher = _r$6; + /* } */ case 4: + c.in$25.prepareCipherSpec(c.vers, clientCipher, clientHash); + c.out.prepareCipherSpec(c.vers, serverCipher, serverHash); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.establishKeys }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.c = c; $f.clientCipher = clientCipher; $f.clientHash = clientHash; $f.clientIV = clientIV; $f.clientKey = clientKey; $f.clientMAC = clientMAC; $f.hs = hs; $f.serverCipher = serverCipher; $f.serverHash = serverHash; $f.serverIV = serverIV; $f.serverKey = serverKey; $f.serverMAC = serverMAC; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.establishKeys = function() { return this.$val.establishKeys(); }; + serverHandshakeState.ptr.prototype.readFinished = function(out) { + var _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, c, clientFinished, err, err$1, hs, msg, msg$1, nextProto, ok, ok$1, out, verify, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; c = $f.c; clientFinished = $f.clientFinished; err = $f.err; err$1 = $f.err$1; hs = $f.hs; msg = $f.msg; msg$1 = $f.msg$1; nextProto = $f.nextProto; ok = $f.ok; ok$1 = $f.ok$1; out = $f.out; verify = $f.verify; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.readRecord(20); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + if (!($interfaceIsEqual(c.in$25.err, $ifaceNil))) { + $s = -1; return c.in$25.err; + } + /* */ if (hs.hello.nextProtoNeg) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (hs.hello.nextProtoNeg) { */ case 2: + _r$1 = c.readHandshake(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + msg = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = $assertType(msg, ptrType$28, true); + nextProto = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!ok) { */ case 5: + _r$2 = c.sendAlert(10); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = unexpectedMessageError(nextProto, msg); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 6: + _r$4 = hs.finishedHash.Write(nextProto.marshal()); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + c.clientProtocol = nextProto.proto; + /* } */ case 3: + _r$5 = c.readHandshake(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + msg$1 = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _tuple$3 = $assertType(msg$1, ptrType$26, true); + clientFinished = _tuple$3[0]; + ok$1 = _tuple$3[1]; + /* */ if (!ok$1) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!ok$1) { */ case 11: + _r$6 = c.sendAlert(10); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = unexpectedMessageError(clientFinished, msg$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 12: + _r$8 = $clone(hs.finishedHash, finishedHash).clientSum(hs.masterSecret); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + verify = _r$8; + /* */ if (!((verify.$length === clientFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, clientFinished.verifyData) === 1))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!((verify.$length === clientFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, clientFinished.verifyData) === 1))) { */ case 16: + _r$9 = c.sendAlert(40); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + $s = -1; return errors.New("tls: client's Finished message is incorrect"); + /* } */ case 17: + _r$10 = hs.finishedHash.Write(clientFinished.marshal()); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $copySlice(out, verify); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.readFinished }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.c = c; $f.clientFinished = clientFinished; $f.err = err; $f.err$1 = err$1; $f.hs = hs; $f.msg = msg; $f.msg$1 = msg$1; $f.nextProto = nextProto; $f.ok = ok; $f.ok$1 = ok$1; $f.out = out; $f.verify = verify; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.readFinished = function(out) { return this.$val.readFinished(out); }; + serverHandshakeState.ptr.prototype.sendSessionTicket = function() { + var _r, _r$1, _r$2, _tuple, _tuple$1, c, err, err$1, hs, m, state, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; err$1 = $f.err$1; hs = $f.hs; m = $f.m; state = $f.state; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + state = [state]; + hs = this; + if (!hs.hello.ticketSupported) { + $s = -1; return $ifaceNil; + } + c = hs.c; + m = new newSessionTicketMsg.ptr(sliceType$7.nil, sliceType$7.nil); + err = $ifaceNil; + state[0] = new sessionState.ptr(c.vers, hs.suite.id, hs.masterSecret, hs.certsFromClient, false); + _r = c.encryptTicket(state[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + m.ticket = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$1 = hs.finishedHash.Write(m.marshal()); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = c.writeRecord(22, m.marshal()); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.sendSessionTicket }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.hs = hs; $f.m = m; $f.state = state; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.sendSessionTicket = function() { return this.$val.sendSessionTicket(); }; + serverHandshakeState.ptr.prototype.sendFinished = function(out) { + var _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, c, err, err$1, finished, hs, out, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; err$1 = $f.err$1; finished = $f.finished; hs = $f.hs; out = $f.out; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + _r = c.writeRecord(20, new sliceType$7([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + finished = new finishedMsg.ptr(sliceType$7.nil, sliceType$7.nil); + _r$1 = $clone(hs.finishedHash, finishedHash).serverSum(hs.masterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + finished.verifyData = _r$1; + _r$2 = hs.finishedHash.Write(finished.marshal()); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = c.writeRecord(22, finished.marshal()); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + c.cipherSuite = hs.suite.id; + $copySlice(out, finished.verifyData); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.sendFinished }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.finished = finished; $f.hs = hs; $f.out = out; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.sendFinished = function(out) { return this.$val.sendFinished(out); }; + serverHandshakeState.ptr.prototype.processCertsFromClient = function(certificates) { + var _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, asn1Data, c, cert, certificates, certs, chains, err, err$1, err$2, hs, i, key, key$1, opts, pub, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; asn1Data = $f.asn1Data; c = $f.c; cert = $f.cert; certificates = $f.certificates; certs = $f.certs; chains = $f.chains; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; hs = $f.hs; i = $f.i; key = $f.key; key$1 = $f.key$1; opts = $f.opts; pub = $f.pub; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hs = this; + c = hs.c; + hs.certsFromClient = certificates; + certs = $makeSlice(sliceType$10, certificates.$length); + err = $ifaceNil; + _ref = certificates; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + asn1Data = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = x509.ParseCertificate(asn1Data); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + ((i < 0 || i >= certs.$length) ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + i] = _tuple[0]); + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + _r$1 = c.sendAlert(42); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = errors.New("tls: failed to parse client certificate: " + _r$2); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$3]; + /* } */ case 5: + _i++; + /* } */ $s = 1; continue; case 2: + /* */ if (c.config.ClientAuth >= 3 && certs.$length > 0) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (c.config.ClientAuth >= 3 && certs.$length > 0) { */ case 9: + _r$4 = c.config.time(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + opts = new x509.VerifyOptions.ptr("", x509.NewCertPool(), c.config.ClientCAs, $clone(_r$4, time.Time), new sliceType$12([2]), 0); + _ref$1 = $subslice(certs, 1); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + cert = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + opts.Intermediates.AddCert(cert); + _i$1++; + } + _r$5 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).Verify($clone(opts, x509.VerifyOptions)); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + chains = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 13: + _r$6 = c.sendAlert(42); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = err$1.Error(); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = errors.New("tls: failed to verify client's certificate: " + _r$7); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$8]; + /* } */ case 14: + c.verifiedChains = chains; + /* } */ case 10: + /* */ if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { */ case 18: + _r$9 = c.config.VerifyPeerCertificate(certificates, c.verifiedChains); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err$2 = _r$9; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 21: + _r$10 = c.sendAlert(42); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + $s = -1; return [$ifaceNil, err$2]; + /* } */ case 22: + /* } */ case 19: + if (certs.$length === 0) { + $s = -1; return [$ifaceNil, $ifaceNil]; + } + pub = $ifaceNil; + _ref$2 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey; + /* */ if ($assertType(_ref$2, ptrType$3, true)[1] || $assertType(_ref$2, ptrType$2, true)[1]) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if ($assertType(_ref$2, ptrType$3, true)[1] || $assertType(_ref$2, ptrType$2, true)[1]) { */ case 24: + key = _ref$2; + pub = key; + $s = 26; continue; + /* } else { */ case 25: + key$1 = _ref$2; + _r$11 = c.sendAlert(43); /* */ $s = 27; case 27: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + _r$12 = fmt.Errorf("tls: client's certificate contains an unsupported public key of type %T", new sliceType$8([(0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey])); /* */ $s = 28; case 28: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$12]; + /* } */ case 26: + c.peerCertificates = certs; + $s = -1; return [pub, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandshakeState.ptr.prototype.processCertsFromClient }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.asn1Data = asn1Data; $f.c = c; $f.cert = cert; $f.certificates = certificates; $f.certs = certs; $f.chains = chains; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.hs = hs; $f.i = i; $f.key = key; $f.key$1 = key$1; $f.opts = opts; $f.pub = pub; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandshakeState.prototype.processCertsFromClient = function(certificates) { return this.$val.processCertsFromClient(certificates); }; + serverHandshakeState.ptr.prototype.setCipherSuite = function(id, supportedCipherSuites, version) { + var _i, _i$1, _ref, _ref$1, candidate, hs, id, s, supported, supportedCipherSuites, version; + hs = this; + _ref = supportedCipherSuites; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + supported = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (id === supported) { + candidate = ptrType$1.nil; + _ref$1 = cipherSuites; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + s = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (s.id === id) { + candidate = s; + break; + } + _i$1++; + } + if (candidate === ptrType$1.nil) { + _i++; + continue; + } + if (!(((candidate.flags & 1) === 0))) { + if (!hs.ellipticOk) { + _i++; + continue; + } + if (!(((candidate.flags & 2) === 0))) { + if (!hs.ecdsaOk) { + _i++; + continue; + } + } else if (!hs.rsaSignOk) { + _i++; + continue; + } + } else if (!hs.rsaDecryptOk) { + _i++; + continue; + } + if (version < 771 && !(((candidate.flags & 4) === 0))) { + _i++; + continue; + } + hs.suite = candidate; + return true; + } + _i++; + } + return false; + }; + serverHandshakeState.prototype.setCipherSuite = function(id, supportedCipherSuites, version) { return this.$val.setCipherSuite(id, supportedCipherSuites, version); }; + serverHandshakeState.ptr.prototype.clientHelloInfo = function() { + var hs, supportedVersions; + hs = this; + if (!(hs.cachedClientHelloInfo === ptrType$31.nil)) { + return hs.cachedClientHelloInfo; + } + supportedVersions = sliceType$2.nil; + if (hs.clientHello.vers > 771) { + supportedVersions = new sliceType$2(suppVersArray); + } else if (hs.clientHello.vers >= 768) { + supportedVersions = $subslice(new sliceType$2(suppVersArray), (771 - hs.clientHello.vers << 16 >>> 16)); + } + hs.cachedClientHelloInfo = new ClientHelloInfo.ptr(hs.clientHello.cipherSuites, hs.clientHello.serverName, hs.clientHello.supportedCurves, hs.clientHello.supportedPoints, hs.clientHello.supportedSignatureAlgorithms, hs.clientHello.alpnProtocols, supportedVersions, hs.c.conn); + return hs.cachedClientHelloInfo; + }; + serverHandshakeState.prototype.clientHelloInfo = function() { return this.$val.clientHelloInfo(); }; + rsaKeyAgreement.ptr.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { + var cert, clientHello, config, hello, ka; + ka = this; + return [ptrType$22.nil, $ifaceNil]; + }; + rsaKeyAgreement.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { return this.$val.generateServerKeyExchange(config, cert, clientHello, hello); }; + rsaKeyAgreement.ptr.prototype.processClientKeyExchange = function(config, cert, ckx, version) { + var _r, _tuple, _tuple$1, cert, ciphertext, ciphertextLen, ckx, config, err, ka, ok, preMasterSecret, priv, version, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cert = $f.cert; ciphertext = $f.ciphertext; ciphertextLen = $f.ciphertextLen; ckx = $f.ckx; config = $f.config; err = $f.err; ka = $f.ka; ok = $f.ok; preMasterSecret = $f.preMasterSecret; priv = $f.priv; version = $f.version; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ka = this; + if (ckx.ciphertext.$length < 2) { + $s = -1; return [sliceType$7.nil, errClientKeyExchange]; + } + ciphertext = ckx.ciphertext; + if (!((version === 768))) { + ciphertextLen = ((((x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) >> 0)) << 8 >> 0) | (((x$1 = ckx.ciphertext, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) >> 0)); + if (!((ciphertextLen === (ckx.ciphertext.$length - 2 >> 0)))) { + $s = -1; return [sliceType$7.nil, errClientKeyExchange]; + } + ciphertext = $subslice(ckx.ciphertext, 2); + } + _tuple = $assertType(cert.PrivateKey, crypto.Decrypter, true); + priv = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [sliceType$7.nil, errors.New("tls: certificate private key does not implement crypto.Decrypter")]; + } + _r = priv.Decrypt(config.rand(), ciphertext, new rsa.PKCS1v15DecryptOptions.ptr(48)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$1 = _r; + preMasterSecret = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, err]; + } + $s = -1; return [preMasterSecret, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: rsaKeyAgreement.ptr.prototype.processClientKeyExchange }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cert = cert; $f.ciphertext = ciphertext; $f.ciphertextLen = ciphertextLen; $f.ckx = ckx; $f.config = config; $f.err = err; $f.ka = ka; $f.ok = ok; $f.preMasterSecret = preMasterSecret; $f.priv = priv; $f.version = version; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + rsaKeyAgreement.prototype.processClientKeyExchange = function(config, cert, ckx, version) { return this.$val.processClientKeyExchange(config, cert, ckx, version); }; + rsaKeyAgreement.ptr.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { + var cert, clientHello, config, ka, serverHello, skx; + ka = this; + return errors.New("tls: unexpected ServerKeyExchange"); + }; + rsaKeyAgreement.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { return this.$val.processServerKeyExchange(config, clientHello, serverHello, cert, skx); }; + rsaKeyAgreement.ptr.prototype.generateClientKeyExchange = function(config, clientHello, cert) { + var _r, _r$1, _tuple, _tuple$1, cert, ckx, clientHello, config, encrypted, err, ka, preMasterSecret, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cert = $f.cert; ckx = $f.ckx; clientHello = $f.clientHello; config = $f.config; encrypted = $f.encrypted; err = $f.err; ka = $f.ka; preMasterSecret = $f.preMasterSecret; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ka = this; + preMasterSecret = $makeSlice(sliceType$7, 48); + (0 >= preMasterSecret.$length ? ($throwRuntimeError("index out of range"), undefined) : preMasterSecret.$array[preMasterSecret.$offset + 0] = (((clientHello.vers >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= preMasterSecret.$length ? ($throwRuntimeError("index out of range"), undefined) : preMasterSecret.$array[preMasterSecret.$offset + 1] = ((clientHello.vers << 24 >>> 24))); + _r = io.ReadFull(config.rand(), $subslice(preMasterSecret, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, ptrType$25.nil, err]; + } + _r$1 = rsa.EncryptPKCS1v15(config.rand(), $assertType(cert.PublicKey, ptrType$2), preMasterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + encrypted = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, ptrType$25.nil, err]; + } + ckx = new clientKeyExchangeMsg.ptr(sliceType$7.nil, sliceType$7.nil); + ckx.ciphertext = $makeSlice(sliceType$7, (encrypted.$length + 2 >> 0)); + (x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((encrypted.$length >> 8 >> 0) << 24 >>> 24)))); + (x$1 = ckx.ciphertext, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1] = ((encrypted.$length << 24 >>> 24)))); + $copySlice($subslice(ckx.ciphertext, 2), encrypted); + $s = -1; return [preMasterSecret, ckx, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: rsaKeyAgreement.ptr.prototype.generateClientKeyExchange }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cert = cert; $f.ckx = ckx; $f.clientHello = clientHello; $f.config = config; $f.encrypted = encrypted; $f.err = err; $f.ka = ka; $f.preMasterSecret = preMasterSecret; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + rsaKeyAgreement.prototype.generateClientKeyExchange = function(config, clientHello, cert) { return this.$val.generateClientKeyExchange(config, clientHello, cert); }; + sha1Hash = function(slices) { + var _i, _r, _r$1, _ref, hsha1, slice, slices, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; hsha1 = $f.hsha1; slice = $f.slice; slices = $f.slices; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hsha1 = sha1.New(); + _ref = slices; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = hsha1.Write(slice); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _i++; + /* } */ $s = 1; continue; case 2: + _r$1 = hsha1.Sum(sliceType$7.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: sha1Hash }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f.hsha1 = hsha1; $f.slice = slice; $f.slices = slices; $f.$s = $s; $f.$r = $r; return $f; + }; + md5SHA1Hash = function(slices) { + var _i, _r, _r$1, _r$2, _ref, hmd5, md5sha1, slice, slices, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; hmd5 = $f.hmd5; md5sha1 = $f.md5sha1; slice = $f.slice; slices = $f.slices; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + md5sha1 = $makeSlice(sliceType$7, 36); + hmd5 = md5.New(); + _ref = slices; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = hmd5.Write(slice); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _i++; + /* } */ $s = 1; continue; case 2: + _r$1 = hmd5.Sum(sliceType$7.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $copySlice(md5sha1, _r$1); + _r$2 = sha1Hash(slices); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $copySlice($subslice(md5sha1, 16), _r$2); + $s = -1; return md5sha1; + /* */ } return; } if ($f === undefined) { $f = { $blk: md5SHA1Hash }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f.hmd5 = hmd5; $f.md5sha1 = md5sha1; $f.slice = slice; $f.slices = slices; $f.$s = $s; $f.$r = $r; return $f; + }; + hashForServerKeyExchange = function(sigType, hashFunc, version, slices) { + var _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, digest, h, hashFunc, sigType, slice, slices, version, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; digest = $f.digest; h = $f.h; hashFunc = $f.hashFunc; sigType = $f.sigType; slice = $f.slice; slices = $f.slices; version = $f.version; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (version >= 771) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (version >= 771) { */ case 1: + _r = new crypto.Hash(hashFunc).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + h = _r; + _ref = slices; + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = h.Write(slice); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _i++; + /* } */ $s = 4; continue; case 5: + _r$2 = h.Sum(sliceType$7.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + digest = _r$2; + $s = -1; return [digest, $ifaceNil]; + /* } */ case 2: + /* */ if (sigType === 17) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (sigType === 17) { */ case 8: + _r$3 = sha1Hash(slices); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [_r$3, $ifaceNil]; + /* } */ case 9: + _r$4 = md5SHA1Hash(slices); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [_r$4, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: hashForServerKeyExchange }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.digest = digest; $f.h = h; $f.hashFunc = hashFunc; $f.sigType = sigType; $f.slice = slice; $f.slices = slices; $f.version = version; $f.$s = $s; $f.$r = $r; return $f; + }; + curveForCurveID = function(id) { + var _1, _r, _r$1, _r$2, id, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; id = $f.id; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = id; + /* */ if (_1 === (23)) { $s = 2; continue; } + /* */ if (_1 === (24)) { $s = 3; continue; } + /* */ if (_1 === (25)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_1 === (23)) { */ case 2: + _r = elliptic.P256(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [_r, true]; + /* } else if (_1 === (24)) { */ case 3: + _r$1 = elliptic.P384(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return [_r$1, true]; + /* } else if (_1 === (25)) { */ case 4: + _r$2 = elliptic.P521(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [_r$2, true]; + /* } else { */ case 5: + $s = -1; return [$ifaceNil, false]; + /* } */ case 6: + case 1: + $s = -1; return [$ifaceNil, false]; + /* */ } return; } if ($f === undefined) { $f = { $blk: curveForCurveID }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.id = id; $f.$s = $s; $f.$r = $r; return $f; + }; + ecdheKeyAgreement.ptr.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { + var _i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, candidate, cert, clientHello, config, curve, digest, ecdhePublic, err, err$1, err$2, hashFunc, hello, k, ka, ok, ok$1, preferredCurves, priv, public$1, scalar, serverECDHParams, sig, sigAndHashLen, sigType, signOpts, signatureAlgorithm, skx, x, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; c = $f.c; candidate = $f.candidate; cert = $f.cert; clientHello = $f.clientHello; config = $f.config; curve = $f.curve; digest = $f.digest; ecdhePublic = $f.ecdhePublic; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; hashFunc = $f.hashFunc; hello = $f.hello; k = $f.k; ka = $f.ka; ok = $f.ok; ok$1 = $f.ok$1; preferredCurves = $f.preferredCurves; priv = $f.priv; public$1 = $f.public$1; scalar = $f.scalar; serverECDHParams = $f.serverECDHParams; sig = $f.sig; sigAndHashLen = $f.sigAndHashLen; sigType = $f.sigType; signOpts = $f.signOpts; signatureAlgorithm = $f.signatureAlgorithm; skx = $f.skx; x = $f.x; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + public$1 = [public$1]; + scalar = [scalar]; + ka = this; + preferredCurves = config.curvePreferences(); + _ref = preferredCurves; + _i = 0; + NextCandidate: + while (true) { + if (!(_i < _ref.$length)) { break; } + candidate = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = clientHello.supportedCurves; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + c = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (candidate === c) { + ka.curveid = c; + break NextCandidate; + } + _i$1++; + } + _i++; + } + if (ka.curveid === 0) { + $s = -1; return [ptrType$22.nil, errors.New("tls: no supported elliptic curves offered")]; + } + ecdhePublic = sliceType$7.nil; + /* */ if (ka.curveid === 29) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ka.curveid === 29) { */ case 1: + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + scalar[0] = $clone(_tmp, arrayType); + public$1[0] = $clone(_tmp$1, arrayType); + _r = io.ReadFull(config.rand(), new sliceType$7(scalar[0])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$22.nil, err]; + } + curve25519.ScalarBaseMult(public$1[0], scalar[0]); + ka.privateKey = new sliceType$7(scalar[0]); + ecdhePublic = new sliceType$7(public$1[0]); + $s = 3; continue; + /* } else { */ case 2: + _r$1 = curveForCurveID(ka.curveid); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + curve = _tuple$1[0]; + ok = _tuple$1[1]; + if (!ok) { + $s = -1; return [ptrType$22.nil, errors.New("tls: preferredCurves includes unsupported curve")]; + } + _tmp$2 = ptrType$4.nil; + _tmp$3 = ptrType$4.nil; + x = _tmp$2; + y = _tmp$3; + err$1 = $ifaceNil; + _r$2 = elliptic.GenerateKey(curve, config.rand()); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + ka.privateKey = _tuple$2[0]; + x = _tuple$2[1]; + y = _tuple$2[2]; + err$1 = _tuple$2[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$22.nil, err$1]; + } + _r$3 = elliptic.Marshal(curve, x, y); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + ecdhePublic = _r$3; + /* } */ case 3: + serverECDHParams = $makeSlice(sliceType$7, (4 + ecdhePublic.$length >> 0)); + (0 >= serverECDHParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHParams.$array[serverECDHParams.$offset + 0] = 3); + (1 >= serverECDHParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHParams.$array[serverECDHParams.$offset + 1] = (((ka.curveid >>> 8 << 16 >>> 16) << 24 >>> 24))); + (2 >= serverECDHParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHParams.$array[serverECDHParams.$offset + 2] = ((ka.curveid << 24 >>> 24))); + (3 >= serverECDHParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHParams.$array[serverECDHParams.$offset + 3] = ((ecdhePublic.$length << 24 >>> 24))); + $copySlice($subslice(serverECDHParams, 4), ecdhePublic); + _tuple$3 = $assertType(cert.PrivateKey, crypto.Signer, true); + priv = _tuple$3[0]; + ok$1 = _tuple$3[1]; + if (!ok$1) { + $s = -1; return [ptrType$22.nil, errors.New("tls: certificate private key does not implement crypto.Signer")]; + } + _r$4 = priv.Public(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = pickSignatureAlgorithm(_r$4, clientHello.supportedSignatureAlgorithms, supportedSignatureAlgorithms, ka.version); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + signatureAlgorithm = _tuple$4[0]; + sigType = _tuple$4[1]; + hashFunc = _tuple$4[2]; + err$2 = _tuple$4[3]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [ptrType$22.nil, err$2]; + } + if (!(((sigType === 16) || (sigType === 18)) === ka.isRSA)) { + $s = -1; return [ptrType$22.nil, errors.New("tls: certificate cannot be used with the selected cipher suite")]; + } + _r$6 = hashForServerKeyExchange(sigType, hashFunc, ka.version, new sliceType$9([clientHello.random, hello.random, serverECDHParams])); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$5 = _r$6; + digest = _tuple$5[0]; + err$2 = _tuple$5[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [ptrType$22.nil, err$2]; + } + signOpts = (new crypto.Hash(hashFunc)); + if (sigType === 18) { + signOpts = new rsa.PSSOptions.ptr(-1, hashFunc); + } + _r$7 = priv.Sign(config.rand(), digest, signOpts); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$6 = _r$7; + sig = _tuple$6[0]; + err$2 = _tuple$6[1]; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 12: + _r$8 = err$2.Error(); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$9 = errors.New("tls: failed to sign ECDHE parameters: " + _r$8); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [ptrType$22.nil, _r$9]; + /* } */ case 13: + skx = new serverKeyExchangeMsg.ptr(sliceType$7.nil, sliceType$7.nil); + sigAndHashLen = 0; + if (ka.version >= 771) { + sigAndHashLen = 2; + } + skx.key = $makeSlice(sliceType$7, (((serverECDHParams.$length + sigAndHashLen >> 0) + 2 >> 0) + sig.$length >> 0)); + $copySlice(skx.key, serverECDHParams); + k = $subslice(skx.key, serverECDHParams.$length); + if (ka.version >= 771) { + (0 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 0] = (((signatureAlgorithm >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 1] = ((signatureAlgorithm << 24 >>> 24))); + k = $subslice(k, 2); + } + (0 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 0] = (((sig.$length >> 8 >> 0) << 24 >>> 24))); + (1 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 1] = ((sig.$length << 24 >>> 24))); + $copySlice($subslice(k, 2), sig); + $s = -1; return [skx, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ecdheKeyAgreement.ptr.prototype.generateServerKeyExchange }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.c = c; $f.candidate = candidate; $f.cert = cert; $f.clientHello = clientHello; $f.config = config; $f.curve = curve; $f.digest = digest; $f.ecdhePublic = ecdhePublic; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.hashFunc = hashFunc; $f.hello = hello; $f.k = k; $f.ka = ka; $f.ok = ok; $f.ok$1 = ok$1; $f.preferredCurves = preferredCurves; $f.priv = priv; $f.public$1 = public$1; $f.scalar = scalar; $f.serverECDHParams = serverECDHParams; $f.sig = sig; $f.sigAndHashLen = sigAndHashLen; $f.sigType = sigType; $f.signOpts = signOpts; $f.signatureAlgorithm = signatureAlgorithm; $f.skx = skx; $f.x = x; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + ecdheKeyAgreement.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { return this.$val.generateServerKeyExchange(config, cert, clientHello, hello); }; + ecdheKeyAgreement.ptr.prototype.processClientKeyExchange = function(config, cert, ckx, version) { + var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, cert, ckx, config, curve, ka, ok, preMasterSecret, scalar, sharedKey, theirPublic, version, x, x$1, xBytes, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; cert = $f.cert; ckx = $f.ckx; config = $f.config; curve = $f.curve; ka = $f.ka; ok = $f.ok; preMasterSecret = $f.preMasterSecret; scalar = $f.scalar; sharedKey = $f.sharedKey; theirPublic = $f.theirPublic; version = $f.version; x = $f.x; x$1 = $f.x$1; xBytes = $f.xBytes; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + scalar = [scalar]; + sharedKey = [sharedKey]; + theirPublic = [theirPublic]; + ka = this; + if ((ckx.ciphertext.$length === 0) || !(((((x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) >> 0)) === (ckx.ciphertext.$length - 1 >> 0)))) { + $s = -1; return [sliceType$7.nil, errClientKeyExchange]; + } + if (ka.curveid === 29) { + if (!((ckx.ciphertext.$length === 33))) { + $s = -1; return [sliceType$7.nil, errClientKeyExchange]; + } + _tmp = arrayType.zero(); + _tmp$1 = arrayType.zero(); + _tmp$2 = arrayType.zero(); + theirPublic[0] = $clone(_tmp, arrayType); + sharedKey[0] = $clone(_tmp$1, arrayType); + scalar[0] = $clone(_tmp$2, arrayType); + $copySlice(new sliceType$7(theirPublic[0]), $subslice(ckx.ciphertext, 1)); + $copySlice(new sliceType$7(scalar[0]), ka.privateKey); + curve25519.ScalarMult(sharedKey[0], scalar[0], theirPublic[0]); + $s = -1; return [new sliceType$7(sharedKey[0]), $ifaceNil]; + } + _r = curveForCurveID(ka.curveid); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + curve = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $panic(new $String("internal error")); + } + _r$1 = elliptic.Unmarshal(curve, $subslice(ckx.ciphertext, 1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + x$1 = _tuple$1[0]; + y = _tuple$1[1]; + if (x$1 === ptrType$4.nil) { + $s = -1; return [sliceType$7.nil, errClientKeyExchange]; + } + _r$2 = curve.ScalarMult(x$1, y, ka.privateKey); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + x$1 = _tuple$2[0]; + _r$3 = curve.Params(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + preMasterSecret = $makeSlice(sliceType$7, (((_r$3.BitSize + 7 >> 0)) >> 3 >> 0)); + xBytes = x$1.Bytes(); + $copySlice($subslice(preMasterSecret, (preMasterSecret.$length - xBytes.$length >> 0)), xBytes); + $s = -1; return [preMasterSecret, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ecdheKeyAgreement.ptr.prototype.processClientKeyExchange }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.cert = cert; $f.ckx = ckx; $f.config = config; $f.curve = curve; $f.ka = ka; $f.ok = ok; $f.preMasterSecret = preMasterSecret; $f.scalar = scalar; $f.sharedKey = sharedKey; $f.theirPublic = theirPublic; $f.version = version; $f.x = x; $f.x$1 = x$1; $f.xBytes = xBytes; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + ecdheKeyAgreement.prototype.processClientKeyExchange = function(config, cert, ckx, version) { return this.$val.processClientKeyExchange(config, cert, ckx, version); }; + ecdheKeyAgreement.ptr.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { + var _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, cert, clientHello, config, curve, digest, err, hashFunc, ka, ok, publicKey, publicLen, serverECDHParams, serverHello, sig, sigLen, sigType, signatureAlgorithm, skx, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; cert = $f.cert; clientHello = $f.clientHello; config = $f.config; curve = $f.curve; digest = $f.digest; err = $f.err; hashFunc = $f.hashFunc; ka = $f.ka; ok = $f.ok; publicKey = $f.publicKey; publicLen = $f.publicLen; serverECDHParams = $f.serverECDHParams; serverHello = $f.serverHello; sig = $f.sig; sigLen = $f.sigLen; sigType = $f.sigType; signatureAlgorithm = $f.signatureAlgorithm; skx = $f.skx; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ka = this; + if (skx.key.$length < 4) { + $s = -1; return errServerKeyExchange; + } + if (!(((x = skx.key, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 3))) { + $s = -1; return errors.New("tls: server selected unsupported curve"); + } + ka.curveid = (((((x$1 = skx.key, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) << 16 >>> 16)) << 8 << 16 >>> 16) | (((x$2 = skx.key, (2 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 2])) << 16 >>> 16))) >>> 0; + publicLen = (((x$3 = skx.key, (3 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 3])) >> 0)); + if ((publicLen + 4 >> 0) > skx.key.$length) { + $s = -1; return errServerKeyExchange; + } + serverECDHParams = $subslice(skx.key, 0, (4 + publicLen >> 0)); + publicKey = $subslice(serverECDHParams, 4); + sig = $subslice(skx.key, (4 + publicLen >> 0)); + if (sig.$length < 2) { + $s = -1; return errServerKeyExchange; + } + /* */ if (ka.curveid === 29) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ka.curveid === 29) { */ case 1: + if (!((publicKey.$length === 32))) { + $s = -1; return errors.New("tls: bad X25519 public value"); + } + ka.publicKey = publicKey; + $s = 3; continue; + /* } else { */ case 2: + _r = curveForCurveID(ka.curveid); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + curve = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return errors.New("tls: server selected unsupported curve"); + } + _r$1 = elliptic.Unmarshal(curve, publicKey); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + ka.x = _tuple$1[0]; + ka.y = _tuple$1[1]; + if (ka.x === ptrType$4.nil) { + $s = -1; return errServerKeyExchange; + } + /* } */ case 3: + signatureAlgorithm = 0; + if (ka.version >= 771) { + signatureAlgorithm = (((((0 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 1]) << 16 >>> 16))) >>> 0; + sig = $subslice(sig, 2); + if (sig.$length < 2) { + $s = -1; return errServerKeyExchange; + } + } + _r$2 = pickSignatureAlgorithm(cert.PublicKey, new sliceType$6([signatureAlgorithm]), clientHello.supportedSignatureAlgorithms, ka.version); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + sigType = _tuple$2[1]; + hashFunc = _tuple$2[2]; + err = _tuple$2[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if (!(((sigType === 16) || (sigType === 18)) === ka.isRSA)) { + $s = -1; return errServerKeyExchange; + } + sigLen = ((((0 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 1]) >> 0)); + if (!(((sigLen + 2 >> 0) === sig.$length))) { + $s = -1; return errServerKeyExchange; + } + sig = $subslice(sig, 2); + _r$3 = hashForServerKeyExchange(sigType, hashFunc, ka.version, new sliceType$9([clientHello.random, serverHello.random, serverECDHParams])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + digest = _tuple$3[0]; + err = _tuple$3[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$4 = verifyHandshakeSignature(sigType, cert.PublicKey, hashFunc, digest, sig); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: ecdheKeyAgreement.ptr.prototype.processServerKeyExchange }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.cert = cert; $f.clientHello = clientHello; $f.config = config; $f.curve = curve; $f.digest = digest; $f.err = err; $f.hashFunc = hashFunc; $f.ka = ka; $f.ok = ok; $f.publicKey = publicKey; $f.publicLen = publicLen; $f.serverECDHParams = serverECDHParams; $f.serverHello = serverHello; $f.sig = sig; $f.sigLen = sigLen; $f.sigType = sigType; $f.signatureAlgorithm = signatureAlgorithm; $f.skx = skx; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + ecdheKeyAgreement.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { return this.$val.processServerKeyExchange(config, clientHello, serverHello, cert, skx); }; + ecdheKeyAgreement.ptr.prototype.generateClientKeyExchange = function(config, clientHello, cert) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, cert, ckx, clientHello, config, curve, err, err$1, ka, mx, my, ok, ourPublic, preMasterSecret, priv, scalar, serialized, sharedKey, theirPublic, x, x$1, xBytes, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; cert = $f.cert; ckx = $f.ckx; clientHello = $f.clientHello; config = $f.config; curve = $f.curve; err = $f.err; err$1 = $f.err$1; ka = $f.ka; mx = $f.mx; my = $f.my; ok = $f.ok; ourPublic = $f.ourPublic; preMasterSecret = $f.preMasterSecret; priv = $f.priv; scalar = $f.scalar; serialized = $f.serialized; sharedKey = $f.sharedKey; theirPublic = $f.theirPublic; x = $f.x; x$1 = $f.x$1; xBytes = $f.xBytes; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ourPublic = [ourPublic]; + scalar = [scalar]; + sharedKey = [sharedKey]; + theirPublic = [theirPublic]; + ka = this; + if (ka.curveid === 0) { + $s = -1; return [sliceType$7.nil, ptrType$25.nil, errors.New("tls: missing ServerKeyExchange message")]; + } + _tmp = sliceType$7.nil; + _tmp$1 = sliceType$7.nil; + serialized = _tmp; + preMasterSecret = _tmp$1; + /* */ if (ka.curveid === 29) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ka.curveid === 29) { */ case 1: + _tmp$2 = arrayType.zero(); + _tmp$3 = arrayType.zero(); + _tmp$4 = arrayType.zero(); + _tmp$5 = arrayType.zero(); + ourPublic[0] = $clone(_tmp$2, arrayType); + theirPublic[0] = $clone(_tmp$3, arrayType); + sharedKey[0] = $clone(_tmp$4, arrayType); + scalar[0] = $clone(_tmp$5, arrayType); + _r = io.ReadFull(config.rand(), new sliceType$7(scalar[0])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, ptrType$25.nil, err]; + } + $copySlice(new sliceType$7(theirPublic[0]), ka.publicKey); + curve25519.ScalarBaseMult(ourPublic[0], scalar[0]); + curve25519.ScalarMult(sharedKey[0], scalar[0], theirPublic[0]); + serialized = new sliceType$7(ourPublic[0]); + preMasterSecret = new sliceType$7(sharedKey[0]); + $s = 3; continue; + /* } else { */ case 2: + _r$1 = curveForCurveID(ka.curveid); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + curve = _tuple$1[0]; + ok = _tuple$1[1]; + if (!ok) { + $panic(new $String("internal error")); + } + _r$2 = elliptic.GenerateKey(curve, config.rand()); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + priv = _tuple$2[0]; + mx = _tuple$2[1]; + my = _tuple$2[2]; + err$1 = _tuple$2[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, ptrType$25.nil, err$1]; + } + _r$3 = curve.ScalarMult(ka.x, ka.y, priv); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + x = _tuple$3[0]; + _r$4 = curve.Params(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + preMasterSecret = $makeSlice(sliceType$7, (((_r$4.BitSize + 7 >> 0)) >> 3 >> 0)); + xBytes = x.Bytes(); + $copySlice($subslice(preMasterSecret, (preMasterSecret.$length - xBytes.$length >> 0)), xBytes); + _r$5 = elliptic.Marshal(curve, mx, my); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + serialized = _r$5; + /* } */ case 3: + ckx = new clientKeyExchangeMsg.ptr(sliceType$7.nil, sliceType$7.nil); + ckx.ciphertext = $makeSlice(sliceType$7, (1 + serialized.$length >> 0)); + (x$1 = ckx.ciphertext, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = ((serialized.$length << 24 >>> 24)))); + $copySlice($subslice(ckx.ciphertext, 1), serialized); + $s = -1; return [preMasterSecret, ckx, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ecdheKeyAgreement.ptr.prototype.generateClientKeyExchange }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.cert = cert; $f.ckx = ckx; $f.clientHello = clientHello; $f.config = config; $f.curve = curve; $f.err = err; $f.err$1 = err$1; $f.ka = ka; $f.mx = mx; $f.my = my; $f.ok = ok; $f.ourPublic = ourPublic; $f.preMasterSecret = preMasterSecret; $f.priv = priv; $f.scalar = scalar; $f.serialized = serialized; $f.sharedKey = sharedKey; $f.theirPublic = theirPublic; $f.x = x; $f.x$1 = x$1; $f.xBytes = xBytes; $f.$s = $s; $f.$r = $r; return $f; + }; + ecdheKeyAgreement.prototype.generateClientKeyExchange = function(config, clientHello, cert) { return this.$val.generateClientKeyExchange(config, clientHello, cert); }; + splitPreMasterSecret = function(secret) { + var _q, _q$1, s1, s2, secret; + s1 = sliceType$7.nil; + s2 = sliceType$7.nil; + s1 = $subslice(secret, 0, (_q = ((secret.$length + 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + s2 = $subslice(secret, (_q$1 = secret.$length / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); + return [s1, s2]; + }; + pHash = function(result, secret, seed, hash$1) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, a, b, h, hash$1, j, result, secret, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; a = $f.a; b = $f.b; h = $f.h; hash$1 = $f.hash$1; j = $f.j; result = $f.result; secret = $f.secret; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = hmac.New(hash$1, secret); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + h = _r; + _r$1 = h.Write(seed); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = h.Sum(sliceType$7.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + a = _r$2; + j = 0; + /* while (true) { */ case 4: + /* if (!(j < result.$length)) { break; } */ if(!(j < result.$length)) { $s = 5; continue; } + $r = h.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = h.Write(a); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = h.Write(seed); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = h.Sum(sliceType$7.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + b = _r$5; + $copySlice($subslice(result, j), b); + j = j + (b.$length) >> 0; + $r = h.Reset(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$6 = h.Write(a); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = h.Sum(sliceType$7.nil); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + a = _r$7; + /* } */ $s = 4; continue; case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: pHash }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.a = a; $f.b = b; $f.h = h; $f.hash$1 = hash$1; $f.j = j; $f.result = result; $f.secret = secret; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + prf10 = function(result, secret, label, seed) { + var _i, _ref, _tuple, b, hashMD5, hashSHA1, i, label, labelAndSeed, result, result2, s1, s2, secret, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; _tuple = $f._tuple; b = $f.b; hashMD5 = $f.hashMD5; hashSHA1 = $f.hashSHA1; i = $f.i; label = $f.label; labelAndSeed = $f.labelAndSeed; result = $f.result; result2 = $f.result2; s1 = $f.s1; s2 = $f.s2; secret = $f.secret; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hashSHA1 = sha1.New; + hashMD5 = md5.New; + labelAndSeed = $makeSlice(sliceType$7, (label.$length + seed.$length >> 0)); + $copySlice(labelAndSeed, label); + $copySlice($subslice(labelAndSeed, label.$length), seed); + _tuple = splitPreMasterSecret(secret); + s1 = _tuple[0]; + s2 = _tuple[1]; + $r = pHash(result, s1, labelAndSeed, hashMD5); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + result2 = $makeSlice(sliceType$7, result.$length); + $r = pHash(result2, s2, labelAndSeed, hashSHA1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = result2; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + i] = ((((i < 0 || i >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + i]) ^ (b)) << 24 >>> 24)); + _i++; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: prf10 }; } $f._i = _i; $f._ref = _ref; $f._tuple = _tuple; $f.b = b; $f.hashMD5 = hashMD5; $f.hashSHA1 = hashSHA1; $f.i = i; $f.label = label; $f.labelAndSeed = labelAndSeed; $f.result = result; $f.result2 = result2; $f.s1 = s1; $f.s2 = s2; $f.secret = secret; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + prf12 = function(hashFunc) { + var hashFunc; + return (function $b(result, secret, label, seed) { + var label, labelAndSeed, result, secret, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; label = $f.label; labelAndSeed = $f.labelAndSeed; result = $f.result; secret = $f.secret; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + labelAndSeed = $makeSlice(sliceType$7, (label.$length + seed.$length >> 0)); + $copySlice(labelAndSeed, label); + $copySlice($subslice(labelAndSeed, label.$length), seed); + $r = pHash(result, secret, labelAndSeed, hashFunc); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.label = label; $f.labelAndSeed = labelAndSeed; $f.result = result; $f.secret = secret; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }); + }; + prf30 = function(result, secret, label, seed) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, b, digest, done, hashMD5, hashSHA1, i, j, label, result, secret, seed, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; b = $f.b; digest = $f.digest; done = $f.done; hashMD5 = $f.hashMD5; hashSHA1 = $f.hashSHA1; i = $f.i; j = $f.j; label = $f.label; result = $f.result; secret = $f.secret; seed = $f.seed; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hashSHA1 = sha1.New(); + hashMD5 = md5.New(); + done = 0; + i = 0; + b = arrayType$6.zero(); + /* while (true) { */ case 1: + /* if (!(done < result.$length)) { break; } */ if(!(done < result.$length)) { $s = 2; continue; } + j = 0; + while (true) { + if (!(j <= i)) { break; } + ((j < 0 || j >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[j] = (65 + ((i << 24 >>> 24)) << 24 >>> 24)); + j = j + (1) >> 0; + } + $r = hashSHA1.Reset(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = hashSHA1.Write($subslice(new sliceType$7(b), 0, (i + 1 >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = hashSHA1.Write(secret); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = hashSHA1.Write(seed); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = hashSHA1.Sum(sliceType$7.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + digest = _r$3; + $r = hashMD5.Reset(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = hashMD5.Write(secret); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = hashMD5.Write(digest); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = hashMD5.Sum(sliceType$7.nil); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + done = done + ($copySlice($subslice(result, done), _r$6)) >> 0; + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: prf30 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f.b = b; $f.digest = digest; $f.done = done; $f.hashMD5 = hashMD5; $f.hashSHA1 = hashSHA1; $f.i = i; $f.j = j; $f.label = label; $f.result = result; $f.secret = secret; $f.seed = seed; $f.$s = $s; $f.$r = $r; return $f; + }; + prfAndHashForVersion = function(version, suite) { + var _1, suite, version; + _1 = version; + if (_1 === (768)) { + return [prf30, 0]; + } else if ((_1 === (769)) || (_1 === (770))) { + return [prf10, 0]; + } else if (_1 === (771)) { + if (!(((suite.flags & 8) === 0))) { + return [prf12(sha512.New384), 6]; + } + return [prf12(sha256.New), 5]; + } else { + $panic(new $String("unknown version")); + } + }; + prfForVersion = function(version, suite) { + var _tuple, prf, suite, version; + _tuple = prfAndHashForVersion(version, suite); + prf = _tuple[0]; + return prf; + }; + masterFromPreMasterSecret = function(version, suite, preMasterSecret, clientRandom, serverRandom) { + var clientRandom, masterSecret, preMasterSecret, seed, serverRandom, suite, version, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; clientRandom = $f.clientRandom; masterSecret = $f.masterSecret; preMasterSecret = $f.preMasterSecret; seed = $f.seed; serverRandom = $f.serverRandom; suite = $f.suite; version = $f.version; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + seed = $makeSlice(sliceType$7, 0, (clientRandom.$length + serverRandom.$length >> 0)); + seed = $appendSlice(seed, clientRandom); + seed = $appendSlice(seed, serverRandom); + masterSecret = $makeSlice(sliceType$7, 48); + $r = prfForVersion(version, suite)(masterSecret, preMasterSecret, masterSecretLabel, seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return masterSecret; + /* */ } return; } if ($f === undefined) { $f = { $blk: masterFromPreMasterSecret }; } $f.clientRandom = clientRandom; $f.masterSecret = masterSecret; $f.preMasterSecret = preMasterSecret; $f.seed = seed; $f.serverRandom = serverRandom; $f.suite = suite; $f.version = version; $f.$s = $s; $f.$r = $r; return $f; + }; + keysFromMasterSecret = function(version, suite, masterSecret, clientRandom, serverRandom, macLen, keyLen, ivLen) { + var clientIV, clientKey, clientMAC, clientRandom, ivLen, keyLen, keyMaterial, macLen, masterSecret, n, seed, serverIV, serverKey, serverMAC, serverRandom, suite, version, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; clientIV = $f.clientIV; clientKey = $f.clientKey; clientMAC = $f.clientMAC; clientRandom = $f.clientRandom; ivLen = $f.ivLen; keyLen = $f.keyLen; keyMaterial = $f.keyMaterial; macLen = $f.macLen; masterSecret = $f.masterSecret; n = $f.n; seed = $f.seed; serverIV = $f.serverIV; serverKey = $f.serverKey; serverMAC = $f.serverMAC; serverRandom = $f.serverRandom; suite = $f.suite; version = $f.version; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + clientMAC = sliceType$7.nil; + serverMAC = sliceType$7.nil; + clientKey = sliceType$7.nil; + serverKey = sliceType$7.nil; + clientIV = sliceType$7.nil; + serverIV = sliceType$7.nil; + seed = $makeSlice(sliceType$7, 0, (serverRandom.$length + clientRandom.$length >> 0)); + seed = $appendSlice(seed, serverRandom); + seed = $appendSlice(seed, clientRandom); + n = (($imul(2, macLen)) + ($imul(2, keyLen)) >> 0) + ($imul(2, ivLen)) >> 0; + keyMaterial = $makeSlice(sliceType$7, n); + $r = prfForVersion(version, suite)(keyMaterial, masterSecret, keyExpansionLabel, seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + clientMAC = $subslice(keyMaterial, 0, macLen); + keyMaterial = $subslice(keyMaterial, macLen); + serverMAC = $subslice(keyMaterial, 0, macLen); + keyMaterial = $subslice(keyMaterial, macLen); + clientKey = $subslice(keyMaterial, 0, keyLen); + keyMaterial = $subslice(keyMaterial, keyLen); + serverKey = $subslice(keyMaterial, 0, keyLen); + keyMaterial = $subslice(keyMaterial, keyLen); + clientIV = $subslice(keyMaterial, 0, ivLen); + keyMaterial = $subslice(keyMaterial, ivLen); + serverIV = $subslice(keyMaterial, 0, ivLen); + $s = -1; return [clientMAC, serverMAC, clientKey, serverKey, clientIV, serverIV]; + /* */ } return; } if ($f === undefined) { $f = { $blk: keysFromMasterSecret }; } $f.clientIV = clientIV; $f.clientKey = clientKey; $f.clientMAC = clientMAC; $f.clientRandom = clientRandom; $f.ivLen = ivLen; $f.keyLen = keyLen; $f.keyMaterial = keyMaterial; $f.macLen = macLen; $f.masterSecret = masterSecret; $f.n = n; $f.seed = seed; $f.serverIV = serverIV; $f.serverKey = serverKey; $f.serverMAC = serverMAC; $f.serverRandom = serverRandom; $f.suite = suite; $f.version = version; $f.$s = $s; $f.$r = $r; return $f; + }; + lookupTLSHash = function(signatureAlgorithm) { + var _1, _r, signatureAlgorithm, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; signatureAlgorithm = $f.signatureAlgorithm; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = signatureAlgorithm; + /* */ if ((_1 === (513)) || (_1 === (515))) { $s = 2; continue; } + /* */ if ((_1 === (1025)) || (_1 === (2052)) || (_1 === (1027))) { $s = 3; continue; } + /* */ if ((_1 === (1281)) || (_1 === (2053)) || (_1 === (1283))) { $s = 4; continue; } + /* */ if ((_1 === (1537)) || (_1 === (2054)) || (_1 === (1539))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((_1 === (513)) || (_1 === (515))) { */ case 2: + $s = -1; return [3, $ifaceNil]; + /* } else if ((_1 === (1025)) || (_1 === (2052)) || (_1 === (1027))) { */ case 3: + $s = -1; return [5, $ifaceNil]; + /* } else if ((_1 === (1281)) || (_1 === (2053)) || (_1 === (1283))) { */ case 4: + $s = -1; return [6, $ifaceNil]; + /* } else if ((_1 === (1537)) || (_1 === (2054)) || (_1 === (1539))) { */ case 5: + $s = -1; return [7, $ifaceNil]; + /* } else { */ case 6: + _r = fmt.Errorf("tls: unsupported signature algorithm: %#04x", new sliceType$8([new SignatureScheme(signatureAlgorithm)])); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [0, _r]; + /* } */ case 7: + case 1: + $s = -1; return [0, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: lookupTLSHash }; } $f._1 = _1; $f._r = _r; $f.signatureAlgorithm = signatureAlgorithm; $f.$s = $s; $f.$r = $r; return $f; + }; + newFinishedHash = function(version, cipherSuite$1) { + var _r, _r$1, _tuple, buffer, cipherSuite$1, hash$1, prf, version, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; buffer = $f.buffer; cipherSuite$1 = $f.cipherSuite$1; hash$1 = $f.hash$1; prf = $f.prf; version = $f.version; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buffer = sliceType$7.nil; + if ((version === 768) || version >= 771) { + buffer = new sliceType$7([]); + } + _tuple = prfAndHashForVersion(version, cipherSuite$1); + prf = _tuple[0]; + hash$1 = _tuple[1]; + /* */ if (!((hash$1 === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((hash$1 === 0))) { */ case 1: + _r = new crypto.Hash(hash$1).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = new crypto.Hash(hash$1).New(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return new finishedHash.ptr(_r, _r$1, $ifaceNil, $ifaceNil, buffer, version, prf); + /* } */ case 2: + $s = -1; return new finishedHash.ptr(sha1.New(), sha1.New(), md5.New(), md5.New(), buffer, version, prf); + /* */ } return; } if ($f === undefined) { $f = { $blk: newFinishedHash }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.buffer = buffer; $f.cipherSuite$1 = cipherSuite$1; $f.hash$1 = hash$1; $f.prf = prf; $f.version = version; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.ptr.prototype.Write = function(msg) { + var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, err, h, msg, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; err = $f.err; h = $f.h; msg = $f.msg; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + h = this; + _r = h.client.Write(msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = h.server.Write(msg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* */ if (h.version < 771) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (h.version < 771) { */ case 3: + _r$2 = h.clientMD5.Write(msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = h.serverMD5.Write(msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 4: + if (!(h.buffer === sliceType$7.nil)) { + h.buffer = $appendSlice(h.buffer, msg); + } + _tmp = msg.$length; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedHash.ptr.prototype.Write }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.err = err; $f.h = h; $f.msg = msg; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.prototype.Write = function(msg) { return this.$val.Write(msg); }; + finishedHash.ptr.prototype.Sum = function() { + var _r, _r$1, _r$2, h, out, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; h = $f.h; out = $f.out; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + /* */ if (h.version >= 771) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (h.version >= 771) { */ case 1: + _r = h.client.Sum(sliceType$7.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + out = $makeSlice(sliceType$7, 0, 36); + _r$1 = h.clientMD5.Sum(out); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + out = _r$1; + _r$2 = h.client.Sum(out); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedHash.ptr.prototype.Sum }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.h = h; $f.out = out; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.prototype.Sum = function() { return this.$val.Sum(); }; + finishedSum30 = function(md5$1, sha1$1, masterSecret, magic) { + var _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, magic, masterSecret, md5$1, md5Digest, ret, sha1$1, sha1Digest, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; magic = $f.magic; masterSecret = $f.masterSecret; md5$1 = $f.md5$1; md5Digest = $f.md5Digest; ret = $f.ret; sha1$1 = $f.sha1$1; sha1Digest = $f.sha1Digest; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = md5$1.Write(magic); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + _r$1 = md5$1.Write(masterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = md5$1.Write(new sliceType$7(ssl30Pad1)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = md5$1.Sum(sliceType$7.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + md5Digest = _r$3; + $r = md5$1.Reset(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = md5$1.Write(masterSecret); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = md5$1.Write(new sliceType$7(ssl30Pad2)); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = md5$1.Write(md5Digest); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = md5$1.Sum(sliceType$7.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + md5Digest = _r$7; + _r$8 = sha1$1.Write(magic); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = sha1$1.Write(masterSecret); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _r$10 = sha1$1.Write($subslice(new sliceType$7(ssl30Pad1), 0, 40)); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + _r$11 = sha1$1.Sum(sliceType$7.nil); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + sha1Digest = _r$11; + $r = sha1$1.Reset(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$12 = sha1$1.Write(masterSecret); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + _r$13 = sha1$1.Write($subslice(new sliceType$7(ssl30Pad2), 0, 40)); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + _r$14 = sha1$1.Write(sha1Digest); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + _r$15 = sha1$1.Sum(sliceType$7.nil); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + sha1Digest = _r$15; + ret = $makeSlice(sliceType$7, (md5Digest.$length + sha1Digest.$length >> 0)); + $copySlice(ret, md5Digest); + $copySlice($subslice(ret, md5Digest.$length), sha1Digest); + $s = -1; return ret; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedSum30 }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f.magic = magic; $f.masterSecret = masterSecret; $f.md5$1 = md5$1; $f.md5Digest = md5Digest; $f.ret = ret; $f.sha1$1 = sha1$1; $f.sha1Digest = sha1Digest; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.ptr.prototype.clientSum = function(masterSecret) { + var _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, h, masterSecret, out, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r = $f._r; _r$1 = $f._r$1; h = $f.h; masterSecret = $f.masterSecret; out = $f.out; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + /* */ if (h.version === 768) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (h.version === 768) { */ case 1: + _r = finishedSum30(h.clientMD5, h.client, masterSecret, new sliceType$7(ssl3ClientFinishedMagic)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + out = $makeSlice(sliceType$7, 12); + _arg = out; + _arg$1 = masterSecret; + _arg$2 = clientFinishedLabel; + _r$1 = $clone(h, finishedHash).Sum(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$3 = _r$1; + $r = h.prf(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return out; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedHash.ptr.prototype.clientSum }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r = _r; $f._r$1 = _r$1; $f.h = h; $f.masterSecret = masterSecret; $f.out = out; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.prototype.clientSum = function(masterSecret) { return this.$val.clientSum(masterSecret); }; + finishedHash.ptr.prototype.serverSum = function(masterSecret) { + var _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, h, masterSecret, out, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r = $f._r; _r$1 = $f._r$1; h = $f.h; masterSecret = $f.masterSecret; out = $f.out; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + /* */ if (h.version === 768) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (h.version === 768) { */ case 1: + _r = finishedSum30(h.serverMD5, h.server, masterSecret, new sliceType$7(ssl3ServerFinishedMagic)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + out = $makeSlice(sliceType$7, 12); + _arg = out; + _arg$1 = masterSecret; + _arg$2 = serverFinishedLabel; + _r$1 = $clone(h, finishedHash).Sum(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$3 = _r$1; + $r = h.prf(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return out; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedHash.ptr.prototype.serverSum }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r = _r; $f._r$1 = _r$1; $f.h = h; $f.masterSecret = masterSecret; $f.out = out; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.prototype.serverSum = function(masterSecret) { return this.$val.serverSum(masterSecret); }; + finishedHash.ptr.prototype.hashForClientCertificate = function(sigType, hashAlg, masterSecret) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, h, hash$1, hashAlg, masterSecret, md5Hash, sha1Hash$1, sigType, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; h = $f.h; hash$1 = $f.hash$1; hashAlg = $f.hashAlg; masterSecret = $f.masterSecret; md5Hash = $f.md5Hash; sha1Hash$1 = $f.sha1Hash$1; sigType = $f.sigType; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + if (((h.version === 768) || h.version >= 771) && h.buffer === sliceType$7.nil) { + $panic(new $String("a handshake hash for a client-certificate was requested after discarding the handshake buffer")); + } + /* */ if (h.version === 768) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (h.version === 768) { */ case 1: + if (!((sigType === 16))) { + $s = -1; return [sliceType$7.nil, errors.New("tls: unsupported signature type for client certificate")]; + } + md5Hash = md5.New(); + _r = md5Hash.Write(h.buffer); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + sha1Hash$1 = sha1.New(); + _r$1 = sha1Hash$1.Write(h.buffer); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = finishedSum30(md5Hash, sha1Hash$1, masterSecret, sliceType$7.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [_r$2, $ifaceNil]; + /* } */ case 2: + /* */ if (h.version >= 771) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (h.version >= 771) { */ case 6: + _r$3 = new crypto.Hash(hashAlg).New(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + hash$1 = _r$3; + _r$4 = hash$1.Write(h.buffer); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = hash$1.Sum(sliceType$7.nil); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [_r$5, $ifaceNil]; + /* } */ case 7: + /* */ if (sigType === 17) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (sigType === 17) { */ case 11: + _r$6 = h.server.Sum(sliceType$7.nil); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [_r$6, $ifaceNil]; + /* } */ case 12: + _r$7 = $clone(h, finishedHash).Sum(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return [_r$7, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishedHash.ptr.prototype.hashForClientCertificate }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f.h = h; $f.hash$1 = hash$1; $f.hashAlg = hashAlg; $f.masterSecret = masterSecret; $f.md5Hash = md5Hash; $f.sha1Hash$1 = sha1Hash$1; $f.sigType = sigType; $f.$s = $s; $f.$r = $r; return $f; + }; + finishedHash.prototype.hashForClientCertificate = function(sigType, hashAlg, masterSecret) { return this.$val.hashForClientCertificate(sigType, hashAlg, masterSecret); }; + finishedHash.ptr.prototype.discardHandshakeBuffer = function() { + var h; + h = this; + h.buffer = sliceType$7.nil; + }; + finishedHash.prototype.discardHandshakeBuffer = function() { return this.$val.discardHandshakeBuffer(); }; + noExportedKeyingMaterial = function(label, context, length) { + var context, label, length; + return [sliceType$7.nil, errors.New("crypto/tls: ExportKeyingMaterial is unavailable when renegotiation is enabled")]; + }; + ekmFromMasterSecret = function(version, suite, masterSecret, clientRandom, serverRandom) { + var clientRandom, masterSecret, serverRandom, suite, version; + return (function $b(label, context, length) { + var _1, _r, _r$1, context, keyMaterial, label, length, seed, seedLen, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; context = $f.context; keyMaterial = $f.keyMaterial; label = $f.label; length = $f.length; seed = $f.seed; seedLen = $f.seedLen; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = label; + /* */ if (_1 === ("client finished") || _1 === ("server finished") || _1 === ("master secret") || _1 === ("key expansion")) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (_1 === ("client finished") || _1 === ("server finished") || _1 === ("master secret") || _1 === ("key expansion")) { */ case 2: + _r = fmt.Errorf("crypto/tls: reserved ExportKeyingMaterial label: %s", new sliceType$8([new $String(label)])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [sliceType$7.nil, _r]; + /* } */ case 3: + case 1: + seedLen = serverRandom.$length + clientRandom.$length >> 0; + if (!(context === sliceType$7.nil)) { + seedLen = seedLen + ((2 + context.$length >> 0)) >> 0; + } + seed = $makeSlice(sliceType$7, 0, seedLen); + seed = $appendSlice(seed, clientRandom); + seed = $appendSlice(seed, serverRandom); + /* */ if (!(context === sliceType$7.nil)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!(context === sliceType$7.nil)) { */ case 5: + /* */ if (context.$length >= 65536) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (context.$length >= 65536) { */ case 7: + _r$1 = fmt.Errorf("crypto/tls: ExportKeyingMaterial context too long", new sliceType$8([])); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return [sliceType$7.nil, _r$1]; + /* } */ case 8: + seed = $append(seed, (((context.$length >> 8 >> 0) << 24 >>> 24)), ((context.$length << 24 >>> 24))); + seed = $appendSlice(seed, context); + /* } */ case 6: + keyMaterial = $makeSlice(sliceType$7, length); + $r = prfForVersion(version, suite)(keyMaterial, masterSecret, (new sliceType$7($stringToBytes(label))), seed); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [keyMaterial, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f.context = context; $f.keyMaterial = keyMaterial; $f.label = label; $f.length = length; $f.seed = seed; $f.seedLen = seedLen; $f.$s = $s; $f.$r = $r; return $f; + }); + }; + sessionState.ptr.prototype.marshal = function() { + var _i, _i$1, _ref, _ref$1, cert, cert$1, length, ret, s, x; + s = this; + length = (6 + s.masterSecret.$length >> 0) + 2 >> 0; + _ref = s.certificates; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + cert = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + length = length + ((4 + cert.$length >> 0)) >> 0; + _i++; + } + ret = $makeSlice(sliceType$7, length); + x = ret; + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((s.vers >>> 8 << 16 >>> 16) << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = ((s.vers << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((s.cipherSuite >>> 8 << 16 >>> 16) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((s.cipherSuite << 24 >>> 24))); + (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (((s.masterSecret.$length >> 8 >> 0) << 24 >>> 24))); + (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = ((s.masterSecret.$length << 24 >>> 24))); + x = $subslice(x, 6); + $copySlice(x, s.masterSecret); + x = $subslice(x, s.masterSecret.$length); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((s.certificates.$length >> 8 >> 0) << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = ((s.certificates.$length << 24 >>> 24))); + x = $subslice(x, 2); + _ref$1 = s.certificates; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + cert$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((cert$1.$length >> 24 >> 0) << 24 >>> 24))); + (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((cert$1.$length >> 16 >> 0) << 24 >>> 24))); + (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((cert$1.$length >> 8 >> 0) << 24 >>> 24))); + (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((cert$1.$length << 24 >>> 24))); + $copySlice($subslice(x, 4), cert$1); + x = $subslice(x, (4 + cert$1.$length >> 0)); + _i$1++; + } + return ret; + }; + sessionState.prototype.marshal = function() { return this.$val.marshal(); }; + sessionState.ptr.prototype.unmarshal = function(data) { + var _i, _ref, certLen, data, i, masterSecretLen, numCerts, s, x; + s = this; + if (data.$length < 8) { + return false; + } + s.vers = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; + s.cipherSuite = (((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) << 16 >>> 16))) >>> 0; + masterSecretLen = ((((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) >> 0)) << 8 >> 0) | (((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) >> 0)); + data = $subslice(data, 6); + if (data.$length < masterSecretLen) { + return false; + } + s.masterSecret = $subslice(data, 0, masterSecretLen); + data = $subslice(data, masterSecretLen); + if (data.$length < 2) { + return false; + } + numCerts = ((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)); + data = $subslice(data, 2); + s.certificates = $makeSlice(sliceType$9, numCerts); + _ref = s.certificates; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if (data.$length < 4) { + return false; + } + certLen = ((((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) >> 0)) << 24 >> 0) | ((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) << 16 >> 0)) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0)) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); + data = $subslice(data, 4); + if (certLen < 0) { + return false; + } + if (data.$length < certLen) { + return false; + } + (x = s.certificates, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = $subslice(data, 0, certLen))); + data = $subslice(data, certLen); + _i++; + } + return data.$length === 0; + }; + sessionState.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; + Conn.ptr.prototype.encryptTicket = function(state) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, block$1, c, encrypted, err, err$1, iv, key, keyName, mac, macBytes, serialized, state, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; block$1 = $f.block$1; c = $f.c; encrypted = $f.encrypted; err = $f.err; err$1 = $f.err$1; iv = $f.iv; key = $f.key; keyName = $f.keyName; mac = $f.mac; macBytes = $f.macBytes; serialized = $f.serialized; state = $f.state; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + serialized = state.marshal(); + encrypted = $makeSlice(sliceType$7, ((32 + serialized.$length >> 0) + 32 >> 0)); + keyName = $subslice(encrypted, 0, 16); + iv = $subslice(encrypted, 16, 32); + macBytes = $subslice(encrypted, (encrypted.$length - 32 >> 0)); + _r = io.ReadFull(c.config.rand(), iv); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$7.nil, err]; + } + _r$1 = c.config.ticketKeys(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + key = $clone((x = _r$1, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), ticketKey); + $copySlice(keyName, new sliceType$7(key.keyName)); + _tuple$1 = aes.NewCipher(new sliceType$7(key.aesKey)); + block$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 3: + _r$2 = err$1.Error(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = errors.New("tls: failed to create cipher while encrypting ticket: " + _r$2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [sliceType$7.nil, _r$3]; + /* } */ case 4: + _r$4 = cipher.NewCTR(block$1, iv); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $r = _r$4.XORKeyStream($subslice(encrypted, 32), serialized); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$5 = hmac.New(sha256.New, new sliceType$7(key.hmacKey)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + mac = _r$5; + _r$6 = mac.Write($subslice(encrypted, 0, (encrypted.$length - 32 >> 0))); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = mac.Sum($subslice(macBytes, 0, 0)); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + $s = -1; return [encrypted, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.encryptTicket }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.block$1 = block$1; $f.c = c; $f.encrypted = encrypted; $f.err = err; $f.err$1 = err$1; $f.iv = iv; $f.key = key; $f.keyName = keyName; $f.mac = mac; $f.macBytes = macBytes; $f.serialized = serialized; $f.state = state; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.encryptTicket = function(state) { return this.$val.encryptTicket(state); }; + Conn.ptr.prototype.decryptTicket = function(encrypted) { + var _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, block$1, c, candidateKey, ciphertext, encrypted, err, expected, i, iv, key, keyIndex, keyName, keys, mac, macBytes, ok, plaintext, state, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _tuple = $f._tuple; block$1 = $f.block$1; c = $f.c; candidateKey = $f.candidateKey; ciphertext = $f.ciphertext; encrypted = $f.encrypted; err = $f.err; expected = $f.expected; i = $f.i; iv = $f.iv; key = $f.key; keyIndex = $f.keyIndex; keyName = $f.keyName; keys = $f.keys; mac = $f.mac; macBytes = $f.macBytes; ok = $f.ok; plaintext = $f.plaintext; state = $f.state; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c.config.SessionTicketsDisabled || encrypted.$length < 64) { + $s = -1; return [ptrType$30.nil, false]; + } + keyName = $subslice(encrypted, 0, 16); + iv = $subslice(encrypted, 16, 32); + macBytes = $subslice(encrypted, (encrypted.$length - 32 >> 0)); + _r = c.config.ticketKeys(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + keys = _r; + keyIndex = -1; + _ref = keys; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + candidateKey = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), ticketKey); + if (bytes.Equal(keyName, new sliceType$7(candidateKey.keyName))) { + keyIndex = i; + break; + } + _i++; + } + if (keyIndex === -1) { + $s = -1; return [ptrType$30.nil, false]; + } + key = ((keyIndex < 0 || keyIndex >= keys.$length) ? ($throwRuntimeError("index out of range"), undefined) : keys.$array[keys.$offset + keyIndex]); + _r$1 = hmac.New(sha256.New, new sliceType$7(key.hmacKey)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + mac = _r$1; + _r$2 = mac.Write($subslice(encrypted, 0, (encrypted.$length - 32 >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = mac.Sum(sliceType$7.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + expected = _r$3; + if (!((subtle.ConstantTimeCompare(macBytes, expected) === 1))) { + $s = -1; return [ptrType$30.nil, false]; + } + _tuple = aes.NewCipher(new sliceType$7(key.aesKey)); + block$1 = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$30.nil, false]; + } + ciphertext = $subslice(encrypted, 32, (encrypted.$length - 32 >> 0)); + plaintext = ciphertext; + _r$4 = cipher.NewCTR(block$1, iv); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $r = _r$4.XORKeyStream(plaintext, ciphertext); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + state = new sessionState.ptr(0, 0, sliceType$7.nil, sliceType$9.nil, keyIndex > 0); + ok = state.unmarshal(plaintext); + $s = -1; return [state, ok]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Conn.ptr.prototype.decryptTicket }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._tuple = _tuple; $f.block$1 = block$1; $f.c = c; $f.candidateKey = candidateKey; $f.ciphertext = ciphertext; $f.encrypted = encrypted; $f.err = err; $f.expected = expected; $f.i = i; $f.iv = iv; $f.key = key; $f.keyIndex = keyIndex; $f.keyName = keyName; $f.keys = keys; $f.mac = mac; $f.macBytes = macBytes; $f.ok = ok; $f.plaintext = plaintext; $f.state = state; $f.$s = $s; $f.$r = $r; return $f; + }; + Conn.prototype.decryptTicket = function(encrypted) { return this.$val.decryptTicket(encrypted); }; + Server = function(conn, config) { + var config, conn; + return new Conn.ptr(conn, false, 0, new sync.Mutex.ptr(0, 0), $ifaceNil, 0, false, config, 0, false, 0, sliceType$7.nil, sliceType$9.nil, sliceType$10.nil, sliceType$11.nil, "", false, $throwNilPointerError, false, $ifaceNil, false, arrayType$1.zero(), arrayType$1.zero(), "", false, new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil), new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil), ptrType$11.nil, ptrType$11.nil, new bytes.Buffer.ptr(sliceType$7.nil, 0, arrayType$3.zero(), 0), false, sliceType$7.nil, new $Int64(0, 0), new $Int64(0, 0), 0, 0, arrayType$2.zero()); + }; + $pkg.Server = Server; + Client = function(conn, config) { + var config, conn; + return new Conn.ptr(conn, true, 0, new sync.Mutex.ptr(0, 0), $ifaceNil, 0, false, config, 0, false, 0, sliceType$7.nil, sliceType$9.nil, sliceType$10.nil, sliceType$11.nil, "", false, $throwNilPointerError, false, $ifaceNil, false, arrayType$1.zero(), arrayType$1.zero(), "", false, new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil), new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$7.zero(), ptrType$11.nil, arrayType$8.zero(), $ifaceNil, $ifaceNil, sliceType$7.nil, sliceType$7.nil), ptrType$11.nil, ptrType$11.nil, new bytes.Buffer.ptr(sliceType$7.nil, 0, arrayType$3.zero(), 0), false, sliceType$7.nil, new $Int64(0, 0), new $Int64(0, 0), 0, 0, arrayType$2.zero()); + }; + $pkg.Client = Client; + listener.ptr.prototype.Accept = function() { + var _r, _tuple, c, err, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; err = $f.err; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = this; + _r = l.Listener.Accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + $s = -1; return [Server(c, l.config), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: listener.ptr.prototype.Accept }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + listener.prototype.Accept = function() { return this.$val.Accept(); }; + NewListener = function(inner, config) { + var config, inner, l; + l = new listener.ptr($ifaceNil, ptrType$5.nil); + l.Listener = inner; + l.config = config; + return l; + }; + $pkg.NewListener = NewListener; + timeoutError.ptr.prototype.Error = function() { + return "tls: DialWithDialer timed out"; + }; + timeoutError.prototype.Error = function() { return this.$val.Error(); }; + timeoutError.ptr.prototype.Timeout = function() { + return true; + }; + timeoutError.prototype.Timeout = function() { return this.$val.Timeout(); }; + timeoutError.ptr.prototype.Temporary = function() { + return true; + }; + timeoutError.prototype.Temporary = function() { return this.$val.Temporary(); }; + DialWithDialer = function(dialer, network, addr, config) { + var _r, _r$1, _r$2, _r$3, _tuple, addr, c, colonPos, config, conn, deadlineTimeout, dialer, err, errChannel, hostname, network, rawConn, timeout, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; addr = $f.addr; c = $f.c; colonPos = $f.colonPos; config = $f.config; conn = $f.conn; deadlineTimeout = $f.deadlineTimeout; dialer = $f.dialer; err = $f.err; errChannel = $f.errChannel; hostname = $f.hostname; network = $f.network; rawConn = $f.rawConn; timeout = $f.timeout; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conn = [conn]; + errChannel = [errChannel]; + timeout = dialer.Timeout; + if (!$clone(dialer.Deadline, time.Time).IsZero()) { + deadlineTimeout = time.Until($clone(dialer.Deadline, time.Time)); + if ((timeout.$high === 0 && timeout.$low === 0) || (deadlineTimeout.$high < timeout.$high || (deadlineTimeout.$high === timeout.$high && deadlineTimeout.$low < timeout.$low))) { + timeout = deadlineTimeout; + } + } + errChannel[0] = $chanNil; + /* */ if (!((timeout.$high === 0 && timeout.$low === 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((timeout.$high === 0 && timeout.$low === 0))) { */ case 1: + errChannel[0] = new $Chan($error, 2); + time.AfterFunc(timeout, (function(conn, errChannel) { return function $b() { + var x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(errChannel[0], (x = new timeoutError.ptr(), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; })(conn, errChannel)); + /* } */ case 2: + _tuple = dialer.Dial(network, addr); + rawConn = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$17.nil, err]; + } + colonPos = strings.LastIndex(addr, ":"); + if (colonPos === -1) { + colonPos = addr.length; + } + hostname = $substring(addr, 0, colonPos); + if (config === ptrType$5.nil) { + config = defaultConfig(); + } + /* */ if (config.ServerName === "") { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (config.ServerName === "") { */ case 3: + _r = config.Clone(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + c = _r; + c.ServerName = hostname; + config = c; + /* } */ case 4: + conn[0] = Client(rawConn, config); + /* */ if ((timeout.$high === 0 && timeout.$low === 0)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ((timeout.$high === 0 && timeout.$low === 0)) { */ case 6: + _r$1 = conn[0].Handshake(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + $s = 8; continue; + /* } else { */ case 7: + $go((function(conn, errChannel) { return function $b() { + var _r$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$2 = conn[0].Handshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = $send(errChannel[0], _r$2); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f.$s = $s; $f.$r = $r; return $f; + }; })(conn, errChannel), []); + _r$2 = $recv(errChannel[0]); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2[0]; + /* } */ case 8: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: + _r$3 = rawConn.Close(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return [ptrType$17.nil, err]; + /* } */ case 12: + $s = -1; return [conn[0], $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: DialWithDialer }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.addr = addr; $f.c = c; $f.colonPos = colonPos; $f.config = config; $f.conn = conn; $f.deadlineTimeout = deadlineTimeout; $f.dialer = dialer; $f.err = err; $f.errChannel = errChannel; $f.hostname = hostname; $f.network = network; $f.rawConn = rawConn; $f.timeout = timeout; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DialWithDialer = DialWithDialer; + Dial = function(network, addr, config) { + var _r, addr, config, network, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; addr = $f.addr; config = $f.config; network = $f.network; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = DialWithDialer(new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$20.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$32.nil, $chanNil, $throwNilPointerError), network, addr, config); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Dial }; } $f._r = _r; $f.addr = addr; $f.config = config; $f.network = network; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Dial = Dial; + LoadX509KeyPair = function(certFile, keyFile) { + var _r, _r$1, _r$2, _tuple, _tuple$1, certFile, certPEMBlock, err, keyFile, keyPEMBlock, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; certFile = $f.certFile; certPEMBlock = $f.certPEMBlock; err = $f.err; keyFile = $f.keyFile; keyPEMBlock = $f.keyPEMBlock; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = ioutil.ReadFile(certFile); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + certPEMBlock = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new Certificate.ptr(sliceType$9.nil, $ifaceNil, sliceType$7.nil, sliceType$9.nil, ptrType$15.nil), err]; + } + _r$1 = ioutil.ReadFile(keyFile); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + keyPEMBlock = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new Certificate.ptr(sliceType$9.nil, $ifaceNil, sliceType$7.nil, sliceType$9.nil, ptrType$15.nil), err]; + } + _r$2 = X509KeyPair(certPEMBlock, keyPEMBlock); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: LoadX509KeyPair }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.certFile = certFile; $f.certPEMBlock = certPEMBlock; $f.err = err; $f.keyFile = keyFile; $f.keyPEMBlock = keyPEMBlock; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.LoadX509KeyPair = LoadX509KeyPair; + X509KeyPair = function(certPEMBlock, keyPEMBlock) { + var _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, cert, certDERBlock, certPEMBlock, err, fail, keyDERBlock, keyPEMBlock, ok, ok$1, priv, priv$1, pub, pub$1, pub$2, skippedBlockTypes, x, x509Cert, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; cert = $f.cert; certDERBlock = $f.certDERBlock; certPEMBlock = $f.certPEMBlock; err = $f.err; fail = $f.fail; keyDERBlock = $f.keyDERBlock; keyPEMBlock = $f.keyPEMBlock; ok = $f.ok; ok$1 = $f.ok$1; priv = $f.priv; priv$1 = $f.priv$1; pub = $f.pub; pub$1 = $f.pub$1; pub$2 = $f.pub$2; skippedBlockTypes = $f.skippedBlockTypes; x = $f.x; x509Cert = $f.x509Cert; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fail = (function(err) { + var err; + return [new Certificate.ptr(sliceType$9.nil, $ifaceNil, sliceType$7.nil, sliceType$9.nil, ptrType$15.nil), err]; + }); + cert = new Certificate.ptr(sliceType$9.nil, $ifaceNil, sliceType$7.nil, sliceType$9.nil, ptrType$15.nil); + skippedBlockTypes = sliceType$1.nil; + /* while (true) { */ case 1: + certDERBlock = ptrType$33.nil; + _r = pem.Decode(certPEMBlock); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + certDERBlock = _tuple[0]; + certPEMBlock = _tuple[1]; + if (certDERBlock === ptrType$33.nil) { + /* break; */ $s = 2; continue; + } + if (certDERBlock.Type === "CERTIFICATE") { + cert.Certificate = $append(cert.Certificate, certDERBlock.Bytes); + } else { + skippedBlockTypes = $append(skippedBlockTypes, certDERBlock.Type); + } + /* } */ $s = 1; continue; case 2: + /* */ if (cert.Certificate.$length === 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (cert.Certificate.$length === 0) { */ case 4: + /* */ if (skippedBlockTypes.$length === 0) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (skippedBlockTypes.$length === 0) { */ case 6: + _r$1 = fail(errors.New("tls: failed to find any PEM data in certificate input")); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 7: + /* */ if ((skippedBlockTypes.$length === 1) && strings.HasSuffix((0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]), "PRIVATE KEY")) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if ((skippedBlockTypes.$length === 1) && strings.HasSuffix((0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]), "PRIVATE KEY")) { */ case 9: + _r$2 = fail(errors.New("tls: failed to find certificate PEM data in certificate input, but did find a private key; PEM inputs may have been switched")); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 10: + _r$3 = fmt.Errorf("tls: failed to find \"CERTIFICATE\" PEM block in certificate input after skipping PEM blocks of the following types: %v", new sliceType$8([skippedBlockTypes])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = fail(_r$3); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 5: + skippedBlockTypes = $subslice(skippedBlockTypes, 0, 0); + keyDERBlock = ptrType$33.nil; + /* while (true) { */ case 14: + _r$5 = pem.Decode(keyPEMBlock); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + keyDERBlock = _tuple$1[0]; + keyPEMBlock = _tuple$1[1]; + /* */ if (keyDERBlock === ptrType$33.nil) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (keyDERBlock === ptrType$33.nil) { */ case 17: + /* */ if (skippedBlockTypes.$length === 0) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (skippedBlockTypes.$length === 0) { */ case 19: + _r$6 = fail(errors.New("tls: failed to find any PEM data in key input")); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 20: + /* */ if ((skippedBlockTypes.$length === 1) && (0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]) === "CERTIFICATE") { $s = 22; continue; } + /* */ $s = 23; continue; + /* if ((skippedBlockTypes.$length === 1) && (0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]) === "CERTIFICATE") { */ case 22: + _r$7 = fail(errors.New("tls: found a certificate rather than a key in the PEM for the private key")); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 23: + _r$8 = fmt.Errorf("tls: failed to find PEM block with type ending in \"PRIVATE KEY\" in key input after skipping PEM blocks of the following types: %v", new sliceType$8([skippedBlockTypes])); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$9 = fail(_r$8); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return _r$9; + /* } */ case 18: + if (keyDERBlock.Type === "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY")) { + /* break; */ $s = 15; continue; + } + skippedBlockTypes = $append(skippedBlockTypes, keyDERBlock.Type); + /* } */ $s = 14; continue; case 15: + _r$10 = x509.ParseCertificate((x = cert.Certificate, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$2 = _r$10; + x509Cert = _tuple$2[0]; + err = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 28: + _r$11 = fail(err); /* */ $s = 30; case 30: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + $s = -1; return _r$11; + /* } */ case 29: + _r$12 = parsePrivateKey(keyDERBlock.Bytes); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + cert.PrivateKey = _tuple$3[0]; + err = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 32: + _r$13 = fail(err); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $s = -1; return _r$13; + /* } */ case 33: + _ref = x509Cert.PublicKey; + /* */ if ($assertType(_ref, ptrType$2, true)[1]) { $s = 35; continue; } + /* */ if ($assertType(_ref, ptrType$3, true)[1]) { $s = 36; continue; } + /* */ $s = 37; continue; + /* if ($assertType(_ref, ptrType$2, true)[1]) { */ case 35: + pub = _ref.$val; + _tuple$4 = $assertType(cert.PrivateKey, ptrType$34, true); + priv = _tuple$4[0]; + ok = _tuple$4[1]; + /* */ if (!ok) { $s = 39; continue; } + /* */ $s = 40; continue; + /* if (!ok) { */ case 39: + _r$14 = fail(errors.New("tls: private key type does not match public key type")); /* */ $s = 41; case 41: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $s = -1; return _r$14; + /* } */ case 40: + /* */ if (!((pub.N.Cmp(priv.PublicKey.N) === 0))) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (!((pub.N.Cmp(priv.PublicKey.N) === 0))) { */ case 42: + _r$15 = fail(errors.New("tls: private key does not match public key")); /* */ $s = 44; case 44: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return _r$15; + /* } */ case 43: + $s = 38; continue; + /* } else if ($assertType(_ref, ptrType$3, true)[1]) { */ case 36: + pub$1 = _ref.$val; + _tuple$5 = $assertType(cert.PrivateKey, ptrType$35, true); + priv$1 = _tuple$5[0]; + ok$1 = _tuple$5[1]; + /* */ if (!ok$1) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!ok$1) { */ case 45: + _r$16 = fail(errors.New("tls: private key type does not match public key type")); /* */ $s = 47; case 47: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + $s = -1; return _r$16; + /* } */ case 46: + /* */ if (!((pub$1.X.Cmp(priv$1.PublicKey.X) === 0)) || !((pub$1.Y.Cmp(priv$1.PublicKey.Y) === 0))) { $s = 48; continue; } + /* */ $s = 49; continue; + /* if (!((pub$1.X.Cmp(priv$1.PublicKey.X) === 0)) || !((pub$1.Y.Cmp(priv$1.PublicKey.Y) === 0))) { */ case 48: + _r$17 = fail(errors.New("tls: private key does not match public key")); /* */ $s = 50; case 50: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + $s = -1; return _r$17; + /* } */ case 49: + $s = 38; continue; + /* } else { */ case 37: + pub$2 = _ref; + _r$18 = fail(errors.New("tls: unknown public key algorithm")); /* */ $s = 51; case 51: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + $s = -1; return _r$18; + /* } */ case 38: + $s = -1; return [cert, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: X509KeyPair }; } $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.cert = cert; $f.certDERBlock = certDERBlock; $f.certPEMBlock = certPEMBlock; $f.err = err; $f.fail = fail; $f.keyDERBlock = keyDERBlock; $f.keyPEMBlock = keyPEMBlock; $f.ok = ok; $f.ok$1 = ok$1; $f.priv = priv; $f.priv$1 = priv$1; $f.pub = pub; $f.pub$1 = pub$1; $f.pub$2 = pub$2; $f.skippedBlockTypes = skippedBlockTypes; $f.x = x; $f.x509Cert = x509Cert; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.X509KeyPair = X509KeyPair; + parsePrivateKey = function(der) { + var _r, _r$1, _r$2, _ref, _tuple, _tuple$1, _tuple$2, der, err, err$1, err$2, key, key$1, key$2, key$3, key$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; der = $f.der; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; key = $f.key; key$1 = $f.key$1; key$2 = $f.key$2; key$3 = $f.key$3; key$4 = $f.key$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = x509.ParsePKCS1PrivateKey(der); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + key = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return [key, $ifaceNil]; + } + _r$1 = x509.ParsePKCS8PrivateKey(der); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + key$1 = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + _ref = key$1; + if ($assertType(_ref, ptrType$34, true)[1] || $assertType(_ref, ptrType$35, true)[1]) { + key$2 = _ref; + $s = -1; return [key$2, $ifaceNil]; + } else { + key$3 = _ref; + $s = -1; return [$ifaceNil, errors.New("tls: found unknown private key type in PKCS#8 wrapping")]; + } + } + _r$2 = x509.ParseECPrivateKey(der); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + key$4 = _tuple$2[0]; + err$2 = _tuple$2[1]; + if ($interfaceIsEqual(err$2, $ifaceNil)) { + $s = -1; return [key$4, $ifaceNil]; + } + $s = -1; return [$ifaceNil, errors.New("tls: failed to parse private key")]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parsePrivateKey }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.der = der; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.key = key; $f.key$1 = key$1; $f.key$2 = key$2; $f.key$3 = key$3; $f.key$4 = key$4; $f.$s = $s; $f.$r = $r; return $f; + }; + alert.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$36.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7, $error], false)}]; + ptrType$37.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7, $error], false)}]; + ssl30MAC.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MAC", name: "MAC", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}]; + ptrType$38.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}]; + tls10MAC.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MAC", name: "MAC", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}]; + ptrType$39.methods = [{prop: "ExportKeyingMaterial", name: "ExportKeyingMaterial", pkg: "", typ: $funcType([$String, sliceType$7, $Int], [sliceType$7, $error], false)}]; + ptrType$5.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "serverInit", name: "serverInit", pkg: "crypto/tls", typ: $funcType([ptrType$5], [], false)}, {prop: "ticketKeys", name: "ticketKeys", pkg: "crypto/tls", typ: $funcType([], [sliceType$4], false)}, {prop: "SetSessionTicketKeys", name: "SetSessionTicketKeys", pkg: "", typ: $funcType([sliceType$13], [], false)}, {prop: "rand", name: "rand", pkg: "crypto/tls", typ: $funcType([], [io.Reader], false)}, {prop: "time", name: "time", pkg: "crypto/tls", typ: $funcType([], [time.Time], false)}, {prop: "cipherSuites", name: "cipherSuites", pkg: "crypto/tls", typ: $funcType([], [sliceType$2], false)}, {prop: "minVersion", name: "minVersion", pkg: "crypto/tls", typ: $funcType([], [$Uint16], false)}, {prop: "maxVersion", name: "maxVersion", pkg: "crypto/tls", typ: $funcType([], [$Uint16], false)}, {prop: "curvePreferences", name: "curvePreferences", pkg: "crypto/tls", typ: $funcType([], [sliceType$3], false)}, {prop: "mutualVersion", name: "mutualVersion", pkg: "crypto/tls", typ: $funcType([$Uint16], [$Uint16, $Bool], false)}, {prop: "getCertificate", name: "getCertificate", pkg: "crypto/tls", typ: $funcType([ptrType$31], [ptrType$6, $error], false)}, {prop: "BuildNameToCertificate", name: "BuildNameToCertificate", pkg: "", typ: $funcType([], [], false)}, {prop: "writeKeyLog", name: "writeKeyLog", pkg: "crypto/tls", typ: $funcType([sliceType$7, sliceType$7], [$error], false)}]; + ptrType$17.methods = [{prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [net.Addr], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [net.Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "newRecordHeaderError", name: "newRecordHeaderError", pkg: "crypto/tls", typ: $funcType([$String], [RecordHeaderError], false)}, {prop: "readRecord", name: "readRecord", pkg: "crypto/tls", typ: $funcType([recordType], [$error], false)}, {prop: "sendAlertLocked", name: "sendAlertLocked", pkg: "crypto/tls", typ: $funcType([alert], [$error], false)}, {prop: "sendAlert", name: "sendAlert", pkg: "crypto/tls", typ: $funcType([alert], [$error], false)}, {prop: "maxPayloadSizeForWrite", name: "maxPayloadSizeForWrite", pkg: "crypto/tls", typ: $funcType([recordType, $Int], [$Int], false)}, {prop: "write", name: "write", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Int, $error], false)}, {prop: "flush", name: "flush", pkg: "crypto/tls", typ: $funcType([], [$Int, $error], false)}, {prop: "writeRecordLocked", name: "writeRecordLocked", pkg: "crypto/tls", typ: $funcType([recordType, sliceType$7], [$Int, $error], false)}, {prop: "writeRecord", name: "writeRecord", pkg: "crypto/tls", typ: $funcType([recordType, sliceType$7], [$Int, $error], false)}, {prop: "readHandshake", name: "readHandshake", pkg: "crypto/tls", typ: $funcType([], [$emptyInterface, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}, {prop: "handleRenegotiation", name: "handleRenegotiation", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "closeNotify", name: "closeNotify", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "Handshake", name: "Handshake", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ConnectionState", name: "ConnectionState", pkg: "", typ: $funcType([], [ConnectionState], false)}, {prop: "OCSPResponse", name: "OCSPResponse", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "VerifyHostname", name: "VerifyHostname", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "handshakeComplete", name: "handshakeComplete", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "clientHandshake", name: "clientHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "serverHandshake", name: "serverHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "encryptTicket", name: "encryptTicket", pkg: "crypto/tls", typ: $funcType([ptrType$30], [sliceType$7, $error], false)}, {prop: "decryptTicket", name: "decryptTicket", pkg: "crypto/tls", typ: $funcType([sliceType$7], [ptrType$30, $Bool], false)}]; + ptrType$42.methods = [{prop: "setErrorLocked", name: "setErrorLocked", pkg: "crypto/tls", typ: $funcType([$error], [$error], false)}, {prop: "prepareCipherSpec", name: "prepareCipherSpec", pkg: "crypto/tls", typ: $funcType([$Uint16, $emptyInterface, macFunction], [], false)}, {prop: "changeCipherSpec", name: "changeCipherSpec", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "incSeq", name: "incSeq", pkg: "crypto/tls", typ: $funcType([], [], false)}, {prop: "decrypt", name: "decrypt", pkg: "crypto/tls", typ: $funcType([ptrType$11], [$Bool, $Int, alert], false)}, {prop: "encrypt", name: "encrypt", pkg: "crypto/tls", typ: $funcType([ptrType$11, $Int], [$Bool, alert], false)}, {prop: "newBlock", name: "newBlock", pkg: "crypto/tls", typ: $funcType([], [ptrType$11], false)}, {prop: "freeBlock", name: "freeBlock", pkg: "crypto/tls", typ: $funcType([ptrType$11], [], false)}, {prop: "splitBlock", name: "splitBlock", pkg: "crypto/tls", typ: $funcType([ptrType$11, $Int], [ptrType$11, ptrType$11], false)}]; + ptrType$11.methods = [{prop: "resize", name: "resize", pkg: "crypto/tls", typ: $funcType([$Int], [], false)}, {prop: "reserve", name: "reserve", pkg: "crypto/tls", typ: $funcType([$Int], [], false)}, {prop: "readFromUntil", name: "readFromUntil", pkg: "crypto/tls", typ: $funcType([io.Reader, $Int], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}]; + RecordHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$43.methods = [{prop: "handshake", name: "handshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "pickTLSVersion", name: "pickTLSVersion", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "pickCipherSuite", name: "pickCipherSuite", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "doFullHandshake", name: "doFullHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "establishKeys", name: "establishKeys", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "serverResumedSession", name: "serverResumedSession", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "processServerHello", name: "processServerHello", pkg: "crypto/tls", typ: $funcType([], [$Bool, $error], false)}, {prop: "readFinished", name: "readFinished", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$error], false)}, {prop: "readSessionTicket", name: "readSessionTicket", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendFinished", name: "sendFinished", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$error], false)}, {prop: "getCertificate", name: "getCertificate", pkg: "crypto/tls", typ: $funcType([ptrType$23], [ptrType$6, $error], false)}]; + ptrType$16.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$18.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$19.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$22.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$21.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$24.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$25.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$26.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$28.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$23.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$29.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$27.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$13.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$44.methods = [{prop: "readClientHello", name: "readClientHello", pkg: "crypto/tls", typ: $funcType([], [$Bool, $error], false)}, {prop: "checkForResumption", name: "checkForResumption", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "doResumeHandshake", name: "doResumeHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "doFullHandshake", name: "doFullHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "establishKeys", name: "establishKeys", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readFinished", name: "readFinished", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$error], false)}, {prop: "sendSessionTicket", name: "sendSessionTicket", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendFinished", name: "sendFinished", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$error], false)}, {prop: "processCertsFromClient", name: "processCertsFromClient", pkg: "crypto/tls", typ: $funcType([sliceType$9], [crypto.PublicKey, $error], false)}, {prop: "setCipherSuite", name: "setCipherSuite", pkg: "crypto/tls", typ: $funcType([$Uint16, sliceType$2, $Uint16], [$Bool], false)}, {prop: "clientHelloInfo", name: "clientHelloInfo", pkg: "crypto/tls", typ: $funcType([], [ptrType$31], false)}]; + rsaKeyAgreement.methods = [{prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$16, ptrType$18], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$25, $Uint16], [sliceType$7, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$18, ptrType$15, ptrType$22], [$error], false)}, {prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$15], [sliceType$7, ptrType$25, $error], false)}]; + ptrType$45.methods = [{prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$16, ptrType$18], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$25, $Uint16], [sliceType$7, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$18, ptrType$15, ptrType$22], [$error], false)}, {prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$15], [sliceType$7, ptrType$25, $error], false)}]; + finishedHash.methods = [{prop: "Sum", name: "Sum", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "clientSum", name: "clientSum", pkg: "crypto/tls", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "serverSum", name: "serverSum", pkg: "crypto/tls", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "hashForClientCertificate", name: "hashForClientCertificate", pkg: "crypto/tls", typ: $funcType([$Uint8, crypto.Hash, sliceType$7], [sliceType$7, $error], false)}]; + ptrType$46.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}, {prop: "discardHandshakeBuffer", name: "discardHandshakeBuffer", pkg: "crypto/tls", typ: $funcType([], [], false)}]; + ptrType$30.methods = [{prop: "equal", name: "equal", pkg: "crypto/tls", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$7], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$7], [$Bool], false)}]; + ptrType$47.methods = [{prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [net.Conn, $error], false)}]; + timeoutError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + keyAgreement.init([{prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$15], [sliceType$7, ptrType$25, $error], false)}, {prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$16, ptrType$18], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$6, ptrType$25, $Uint16], [sliceType$7, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$5, ptrType$16, ptrType$18, ptrType$15, ptrType$22], [$error], false)}]); + cipherSuite.init("crypto/tls", [{prop: "id", name: "id", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "keyLen", name: "keyLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "macLen", name: "macLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ivLen", name: "ivLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ka", name: "ka", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "cipher", name: "cipher", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "mac", name: "mac", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: funcType$3, tag: ""}]); + macFunction.init([{prop: "MAC", name: "MAC", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}]); + aead.init([{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7, $error], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$7, sliceType$7, sliceType$7, sliceType$7], [sliceType$7], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}]); + fixedNonceAEAD.init("crypto/tls", [{prop: "nonce", name: "nonce", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: cipher.AEAD, tag: ""}]); + xorNonceAEAD.init("crypto/tls", [{prop: "nonceMask", name: "nonceMask", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: cipher.AEAD, tag: ""}]); + ssl30MAC.init("crypto/tls", [{prop: "h", name: "h", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + constantTimeHash.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ConstantTimeSum", name: "ConstantTimeSum", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$7], [$Int, $error], false)}]); + cthWrapper.init("crypto/tls", [{prop: "h", name: "h", embedded: false, exported: false, typ: constantTimeHash, tag: ""}]); + tls10MAC.init("crypto/tls", [{prop: "h", name: "h", embedded: false, exported: false, typ: hash.Hash, tag: ""}]); + ConnectionState.init("crypto/tls", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "HandshakeComplete", name: "HandshakeComplete", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "DidResume", name: "DidResume", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "CipherSuite", name: "CipherSuite", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "NegotiatedProtocol", name: "NegotiatedProtocol", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "NegotiatedProtocolIsMutual", name: "NegotiatedProtocolIsMutual", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "PeerCertificates", name: "PeerCertificates", embedded: false, exported: true, typ: sliceType$10, tag: ""}, {prop: "VerifiedChains", name: "VerifiedChains", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "SignedCertificateTimestamps", name: "SignedCertificateTimestamps", embedded: false, exported: true, typ: sliceType$9, tag: ""}, {prop: "OCSPResponse", name: "OCSPResponse", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "ekm", name: "ekm", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "TLSUnique", name: "TLSUnique", embedded: false, exported: true, typ: sliceType$7, tag: ""}]); + ClientSessionState.init("crypto/tls", [{prop: "sessionTicket", name: "sessionTicket", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "serverCertificates", name: "serverCertificates", embedded: false, exported: false, typ: sliceType$10, tag: ""}, {prop: "verifiedChains", name: "verifiedChains", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); + ClientSessionCache.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType$10, $Bool], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$String, ptrType$10], [], false)}]); + ClientHelloInfo.init("", [{prop: "CipherSuites", name: "CipherSuites", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "SupportedCurves", name: "SupportedCurves", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "SupportedPoints", name: "SupportedPoints", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "SignatureSchemes", name: "SignatureSchemes", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "SupportedProtos", name: "SupportedProtos", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "SupportedVersions", name: "SupportedVersions", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Conn", name: "Conn", embedded: false, exported: true, typ: net.Conn, tag: ""}]); + CertificateRequestInfo.init("", [{prop: "AcceptableCAs", name: "AcceptableCAs", embedded: false, exported: true, typ: sliceType$9, tag: ""}, {prop: "SignatureSchemes", name: "SignatureSchemes", embedded: false, exported: true, typ: sliceType$6, tag: ""}]); + Config.init("crypto/tls", [{prop: "Rand", name: "Rand", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "Time", name: "Time", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "Certificates", name: "Certificates", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "NameToCertificate", name: "NameToCertificate", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "GetCertificate", name: "GetCertificate", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "GetClientCertificate", name: "GetClientCertificate", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "GetConfigForClient", name: "GetConfigForClient", embedded: false, exported: true, typ: funcType$8, tag: ""}, {prop: "VerifyPeerCertificate", name: "VerifyPeerCertificate", embedded: false, exported: true, typ: funcType$9, tag: ""}, {prop: "RootCAs", name: "RootCAs", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "NextProtos", name: "NextProtos", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ClientAuth", name: "ClientAuth", embedded: false, exported: true, typ: ClientAuthType, tag: ""}, {prop: "ClientCAs", name: "ClientCAs", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "InsecureSkipVerify", name: "InsecureSkipVerify", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "CipherSuites", name: "CipherSuites", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "PreferServerCipherSuites", name: "PreferServerCipherSuites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SessionTicketsDisabled", name: "SessionTicketsDisabled", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SessionTicketKey", name: "SessionTicketKey", embedded: false, exported: true, typ: arrayType, tag: ""}, {prop: "ClientSessionCache", name: "ClientSessionCache", embedded: false, exported: true, typ: ClientSessionCache, tag: ""}, {prop: "MinVersion", name: "MinVersion", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "MaxVersion", name: "MaxVersion", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "CurvePreferences", name: "CurvePreferences", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "DynamicRecordSizingDisabled", name: "DynamicRecordSizingDisabled", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Renegotiation", name: "Renegotiation", embedded: false, exported: true, typ: RenegotiationSupport, tag: ""}, {prop: "KeyLogWriter", name: "KeyLogWriter", embedded: false, exported: true, typ: io.Writer, tag: ""}, {prop: "serverInitOnce", name: "serverInitOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "sessionTicketKeys", name: "sessionTicketKeys", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + ticketKey.init("crypto/tls", [{prop: "keyName", name: "keyName", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "aesKey", name: "aesKey", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "hmacKey", name: "hmacKey", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); + Certificate.init("", [{prop: "Certificate", name: "Certificate", embedded: false, exported: true, typ: sliceType$9, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: crypto.PrivateKey, tag: ""}, {prop: "OCSPStaple", name: "OCSPStaple", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "SignedCertificateTimestamps", name: "SignedCertificateTimestamps", embedded: false, exported: true, typ: sliceType$9, tag: ""}, {prop: "Leaf", name: "Leaf", embedded: false, exported: true, typ: ptrType$15, tag: ""}]); + ecdsaSignature.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "S", name: "S", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); + Conn.init("crypto/tls", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "isClient", name: "isClient", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "handshakeStatus", name: "handshakeStatus", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "handshakeMutex", name: "handshakeMutex", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "handshakeErr", name: "handshakeErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "haveVers", name: "haveVers", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "handshakes", name: "handshakes", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "didResume", name: "didResume", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "ocspResponse", name: "ocspResponse", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: sliceType$9, tag: ""}, {prop: "peerCertificates", name: "peerCertificates", embedded: false, exported: false, typ: sliceType$10, tag: ""}, {prop: "verifiedChains", name: "verifiedChains", embedded: false, exported: false, typ: sliceType$11, tag: ""}, {prop: "serverName", name: "serverName", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ekm", name: "ekm", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "clientFinishedIsFirst", name: "clientFinishedIsFirst", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closeNotifyErr", name: "closeNotifyErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "closeNotifySent", name: "closeNotifySent", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "clientFinished", name: "clientFinished", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "serverFinished", name: "serverFinished", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "clientProtocol", name: "clientProtocol", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "clientProtocolFallback", name: "clientProtocolFallback", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "in$25", name: "in", embedded: false, exported: false, typ: halfConn, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: halfConn, tag: ""}, {prop: "rawInput", name: "rawInput", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "input", name: "input", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "hand", name: "hand", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "buffering", name: "buffering", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sendBuf", name: "sendBuf", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "bytesSent", name: "bytesSent", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "packetsSent", name: "packetsSent", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "warnCount", name: "warnCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "activeCall", name: "activeCall", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); + halfConn.init("crypto/tls", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: sync.Mutex, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipher", name: "cipher", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "mac", name: "mac", embedded: false, exported: false, typ: macFunction, tag: ""}, {prop: "seq", name: "seq", embedded: false, exported: false, typ: arrayType$7, tag: ""}, {prop: "bfree", name: "bfree", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "additionalData", name: "additionalData", embedded: false, exported: false, typ: arrayType$8, tag: ""}, {prop: "nextCipher", name: "nextCipher", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "nextMac", name: "nextMac", embedded: false, exported: false, typ: macFunction, tag: ""}, {prop: "inDigestBuf", name: "inDigestBuf", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "outDigestBuf", name: "outDigestBuf", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + cbcMode.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$7, sliceType$7], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$7], [], false)}]); + block.init("crypto/tls", [{prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "link", name: "link", embedded: false, exported: false, typ: ptrType$11, tag: ""}]); + RecordHeaderError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RecordHeader", name: "RecordHeader", embedded: false, exported: true, typ: arrayType$4, tag: ""}]); + clientHandshakeState.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "serverHello", name: "serverHello", embedded: false, exported: false, typ: ptrType$18, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$16, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "finishedHash", name: "finishedHash", embedded: false, exported: false, typ: finishedHash, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "session", name: "session", embedded: false, exported: false, typ: ptrType$10, tag: ""}]); + clientHelloMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "random", name: "random", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "sessionId", name: "sessionId", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "cipherSuites", name: "cipherSuites", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "compressionMethods", name: "compressionMethods", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "nextProtoNeg", name: "nextProtoNeg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "serverName", name: "serverName", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "supportedCurves", name: "supportedCurves", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "supportedPoints", name: "supportedPoints", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "ticketSupported", name: "ticketSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sessionTicket", name: "sessionTicket", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "supportedSignatureAlgorithms", name: "supportedSignatureAlgorithms", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "secureRenegotiationSupported", name: "secureRenegotiationSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "alpnProtocols", name: "alpnProtocols", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + serverHelloMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "random", name: "random", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "sessionId", name: "sessionId", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "compressionMethod", name: "compressionMethod", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "nextProtoNeg", name: "nextProtoNeg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "nextProtos", name: "nextProtos", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: sliceType$9, tag: ""}, {prop: "ticketSupported", name: "ticketSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "secureRenegotiationSupported", name: "secureRenegotiationSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "alpnProtocol", name: "alpnProtocol", embedded: false, exported: false, typ: $String, tag: ""}]); + certificateMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "certificates", name: "certificates", embedded: false, exported: false, typ: sliceType$9, tag: ""}]); + serverKeyExchangeMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + certificateStatusMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "statusType", name: "statusType", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "response", name: "response", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + serverHelloDoneMsg.init("", []); + clientKeyExchangeMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "ciphertext", name: "ciphertext", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + finishedMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "verifyData", name: "verifyData", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + nextProtoMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "proto", name: "proto", embedded: false, exported: false, typ: $String, tag: ""}]); + certificateRequestMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "hasSignatureAndHash", name: "hasSignatureAndHash", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "certificateTypes", name: "certificateTypes", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "supportedSignatureAlgorithms", name: "supportedSignatureAlgorithms", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "certificateAuthorities", name: "certificateAuthorities", embedded: false, exported: false, typ: sliceType$9, tag: ""}]); + certificateVerifyMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "hasSignatureAndHash", name: "hasSignatureAndHash", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "signatureAlgorithm", name: "signatureAlgorithm", embedded: false, exported: false, typ: SignatureScheme, tag: ""}, {prop: "signature", name: "signature", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + newSessionTicketMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "ticket", name: "ticket", embedded: false, exported: false, typ: sliceType$7, tag: ""}]); + helloRequestMsg.init("", []); + serverHandshakeState.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "clientHello", name: "clientHello", embedded: false, exported: false, typ: ptrType$16, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$18, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ellipticOk", name: "ellipticOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ecdsaOk", name: "ecdsaOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rsaDecryptOk", name: "rsaDecryptOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rsaSignOk", name: "rsaSignOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sessionState", name: "sessionState", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "finishedHash", name: "finishedHash", embedded: false, exported: false, typ: finishedHash, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "certsFromClient", name: "certsFromClient", embedded: false, exported: false, typ: sliceType$9, tag: ""}, {prop: "cert", name: "cert", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "cachedClientHelloInfo", name: "cachedClientHelloInfo", embedded: false, exported: false, typ: ptrType$31, tag: ""}]); + rsaKeyAgreement.init("", []); + ecdheKeyAgreement.init("crypto/tls", [{prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "isRSA", name: "isRSA", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "privateKey", name: "privateKey", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "curveid", name: "curveid", embedded: false, exported: false, typ: CurveID, tag: ""}, {prop: "publicKey", name: "publicKey", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: ptrType$4, tag: ""}]); + finishedHash.init("crypto/tls", [{prop: "client", name: "client", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "server", name: "server", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "clientMD5", name: "clientMD5", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "serverMD5", name: "serverMD5", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "buffer", name: "buffer", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "prf", name: "prf", embedded: false, exported: false, typ: funcType$10, tag: ""}]); + sessionState.init("crypto/tls", [{prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "certificates", name: "certificates", embedded: false, exported: false, typ: sliceType$9, tag: ""}, {prop: "usedOldKey", name: "usedOldKey", embedded: false, exported: false, typ: $Bool, tag: ""}]); + listener.init("crypto/tls", [{prop: "Listener", name: "Listener", embedded: true, exported: true, typ: net.Listener, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); + timeoutError.init("", []); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = list.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = crypto.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = aes.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cipher.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = des.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ecdsa.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = elliptic.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hmac.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = md5.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rc4.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rsa.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha1.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha256.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sha512.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = subtle.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = x509.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = asn1.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = pem.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hash.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cpu.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ioutil.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = big.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = atomic.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = chacha20poly1305.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = curve25519.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + writerMutex = new sync.Mutex.ptr(0, 0); + emptyConfig = new Config.ptr($ifaceNil, $throwNilPointerError, sliceType.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType.nil, sliceType$1.nil, "", 0, ptrType.nil, false, sliceType$2.nil, false, false, arrayType.zero(), $ifaceNil, 0, 0, sliceType$3.nil, false, 0, $ifaceNil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$4.nil); + once = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + varDefaultCipherSuites = sliceType$2.nil; + alertText = $makeMap(alert.keyFor, [{ k: 0, v: "close notify" }, { k: 10, v: "unexpected message" }, { k: 20, v: "bad record MAC" }, { k: 21, v: "decryption failed" }, { k: 22, v: "record overflow" }, { k: 30, v: "decompression failure" }, { k: 40, v: "handshake failure" }, { k: 42, v: "bad certificate" }, { k: 43, v: "unsupported certificate" }, { k: 44, v: "revoked certificate" }, { k: 45, v: "expired certificate" }, { k: 46, v: "unknown certificate" }, { k: 47, v: "illegal parameter" }, { k: 48, v: "unknown certificate authority" }, { k: 49, v: "access denied" }, { k: 50, v: "error decoding message" }, { k: 51, v: "error decrypting message" }, { k: 70, v: "protocol version not supported" }, { k: 71, v: "insufficient security level" }, { k: 80, v: "internal error" }, { k: 86, v: "inappropriate fallback" }, { k: 90, v: "user canceled" }, { k: 100, v: "no renegotiation" }, { k: 120, v: "no application protocol" }]); + ssl30Pad1 = $toNativeArray($kindUint8, [54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54]); + ssl30Pad2 = $toNativeArray($kindUint8, [92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92]); + cipherSuites = new sliceType$5([new cipherSuite.ptr(52392, 32, 0, 12, ecdheRSAKA, 5, $throwNilPointerError, $throwNilPointerError, aeadChaCha20Poly1305), new cipherSuite.ptr(52393, 32, 0, 12, ecdheECDSAKA, 7, $throwNilPointerError, $throwNilPointerError, aeadChaCha20Poly1305), new cipherSuite.ptr(49199, 16, 0, 4, ecdheRSAKA, 5, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49195, 16, 0, 4, ecdheECDSAKA, 7, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49200, 32, 0, 4, ecdheRSAKA, 13, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49196, 32, 0, 4, ecdheECDSAKA, 15, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49191, 16, 32, 16, ecdheRSAKA, 21, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(49171, 16, 20, 16, ecdheRSAKA, 1, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49187, 16, 32, 16, ecdheECDSAKA, 23, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(49161, 16, 20, 16, ecdheECDSAKA, 3, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49172, 32, 20, 16, ecdheRSAKA, 1, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49162, 32, 20, 16, ecdheECDSAKA, 3, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(156, 16, 0, 4, rsaKA, 4, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(157, 32, 0, 4, rsaKA, 12, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(60, 16, 32, 16, rsaKA, 20, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(47, 16, 20, 16, rsaKA, 0, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(53, 32, 20, 16, rsaKA, 0, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49170, 24, 20, 8, ecdheRSAKA, 1, cipher3DES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(10, 24, 20, 8, rsaKA, 0, cipher3DES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(5, 16, 20, 0, rsaKA, 16, cipherRC4, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49169, 16, 20, 0, ecdheRSAKA, 17, cipherRC4, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49159, 16, 20, 0, ecdheECDSAKA, 19, cipherRC4, macSHA1, $throwNilPointerError)]); + supportedSignatureAlgorithms = new sliceType$6([1025, 1027, 1281, 1283, 1537, 1539, 513, 515]); + defaultCurvePreferences = new sliceType$3([29, 23, 24, 25]); + errClosed = errors.New("tls: use of closed connection"); + errShutdown = errors.New("tls: protocol is shutdown"); + errEarlyCloseWrite = errors.New("tls: CloseWrite called before handshake complete"); + tls11SignatureSchemes = new sliceType$6([1027, 1283, 1539, 1025, 1281, 1537, 513]); + suppVersArray = $toNativeArray($kindUint16, [771, 770, 769, 768]); + errClientKeyExchange = errors.New("tls: invalid ClientKeyExchange message"); + errServerKeyExchange = errors.New("tls: invalid ServerKeyExchange message"); + masterSecretLabel = (new sliceType$7($stringToBytes("master secret"))); + keyExpansionLabel = (new sliceType$7($stringToBytes("key expansion"))); + clientFinishedLabel = (new sliceType$7($stringToBytes("client finished"))); + serverFinishedLabel = (new sliceType$7($stringToBytes("server finished"))); + ssl3ClientFinishedMagic = $toNativeArray($kindUint8, [67, 76, 78, 84]); + ssl3ServerFinishedMagic = $toNativeArray($kindUint8, [83, 82, 86, 82]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["mime"] = (function() { + var $pkg = {}, $init, bufio, bytes, base64, errors, fmt, io, os, sort, strings, sync, unicode, utf8, sliceType, ptrType, sliceType$1, sliceType$2, errInvalidWord, maxBase64Len, mimeTypes, mimeTypes$24ptr, mimeTypesLower, mimeTypesLower$24ptr, extensionsMu, extensions, extensions$24ptr, osInitMime, typeFiles, isTSpecial, isTokenChar, isToken, FormatMediaType, checkMediaTypeDisposition, ParseMediaType, decode2231Enc, isNotTokenChar, consumeToken, consumeValue, consumeMediaParam, percentHexUnescape, ishex, unhex, setExtensionType, init, loadMimeFile, initMimeUnix; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + base64 = $packages["encoding/base64"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + os = $packages["os"]; + sort = $packages["sort"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + sliceType = $sliceType($String); + ptrType = $ptrType(strings.Builder); + sliceType$1 = $sliceType($Uint8); + sliceType$2 = $sliceType($emptyInterface); + isTSpecial = function(r) { + var r; + return strings.ContainsRune("()<>@,;:\\\"/[]?=", r); + }; + isTokenChar = function(r) { + var r; + return r > 32 && r < 127 && !isTSpecial(r); + }; + isToken = function(s) { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (s === "") { + $s = -1; return false; + } + _r = strings.IndexFunc(s, isNotTokenChar); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r < 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: isToken }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + FormatMediaType = function(t, param) { + var _entry, _entry$1, _i, _i$1, _i$2, _keys, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _rune, _tmp, _tmp$1, _v, a, attribute, attrs, b, character, index, major, offset, param, slash, sub, t, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _keys = $f._keys; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _rune = $f._rune; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _v = $f._v; a = $f.a; attribute = $f.attribute; attrs = $f.attrs; b = $f.b; character = $f.character; index = $f.index; major = $f.major; offset = $f.offset; param = $f.param; slash = $f.slash; sub = $f.sub; t = $f.t; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); + slash = strings.Index(t, "/"); + /* */ if (slash === -1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (slash === -1) { */ case 1: + _r = isToken(t); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!_r) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!_r) { */ case 4: + $s = -1; return ""; + /* } */ case 5: + _r$1 = strings.ToLower(t); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = b.WriteString(_r$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = 3; continue; + /* } else { */ case 2: + _tmp = $substring(t, 0, slash); + _tmp$1 = $substring(t, (slash + 1 >> 0)); + major = _tmp; + sub = _tmp$1; + _r$3 = isToken(major); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + if (!_r$3) { _v = true; $s = 11; continue s; } + _r$4 = isToken(sub); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _v = !_r$4; case 11: + /* */ if (_v) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_v) { */ case 9: + $s = -1; return ""; + /* } */ case 10: + _r$5 = strings.ToLower(major); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = b.WriteString(_r$5); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + b.WriteByte(47); + _r$7 = strings.ToLower(sub); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = b.WriteString(_r$7); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + /* } */ case 3: + attrs = $makeSlice(sliceType, 0, $keys(param).length); + _ref = param; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + a = _entry.k; + attrs = $append(attrs, a); + _i++; + } + $r = sort.Strings(attrs); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref$1 = attrs; + _i$1 = 0; + /* while (true) { */ case 19: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 20; continue; } + attribute = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + value = (_entry$1 = param[$String.keyFor(attribute)], _entry$1 !== undefined ? _entry$1.v : ""); + b.WriteByte(59); + b.WriteByte(32); + _r$9 = isToken(attribute); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + /* */ if (!_r$9) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!_r$9) { */ case 21: + $s = -1; return ""; + /* } */ case 22: + _r$10 = strings.ToLower(attribute); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$11 = b.WriteString(_r$10); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$11; + b.WriteByte(61); + _r$12 = isToken(value); /* */ $s = 28; case 28: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + /* */ if (_r$12) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (_r$12) { */ case 26: + b.WriteString(value); + _i$1++; + /* continue; */ $s = 19; continue; + /* } */ case 27: + b.WriteByte(34); + offset = 0; + _ref$2 = value; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.length)) { break; } + _rune = $decodeRune(_ref$2, _i$2); + index = _i$2; + character = _rune[0]; + if ((character === 34) || (character === 92)) { + b.WriteString($substring(value, offset, index)); + offset = index; + b.WriteByte(92); + } + if (!(((character & 128) === 0))) { + $s = -1; return ""; + } + _i$2 += _rune[1]; + } + b.WriteString($substring(value, offset)); + b.WriteByte(34); + _i$1++; + /* } */ $s = 19; continue; case 20: + $s = -1; return b.String(); + /* */ } return; } if ($f === undefined) { $f = { $blk: FormatMediaType }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._keys = _keys; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._rune = _rune; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._v = _v; $f.a = a; $f.attribute = attribute; $f.attrs = attrs; $f.b = b; $f.character = character; $f.index = index; $f.major = major; $f.offset = offset; $f.param = param; $f.slash = slash; $f.sub = sub; $f.t = t; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.FormatMediaType = FormatMediaType; + checkMediaTypeDisposition = function(s) { + var _r, _r$1, _tuple, _tuple$1, rest, s, subtype, typ, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; rest = $f.rest; s = $f.s; subtype = $f.subtype; typ = $f.typ; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = consumeToken(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + typ = _tuple[0]; + rest = _tuple[1]; + if (typ === "") { + $s = -1; return errors.New("mime: no media type"); + } + if (rest === "") { + $s = -1; return $ifaceNil; + } + if (!strings.HasPrefix(rest, "/")) { + $s = -1; return errors.New("mime: expected slash after first token"); + } + _r$1 = consumeToken($substring(rest, 1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + subtype = _tuple$1[0]; + rest = _tuple$1[1]; + if (subtype === "") { + $s = -1; return errors.New("mime: expected token after slash"); + } + if (!(rest === "")) { + $s = -1; return errors.New("mime: unexpected content after media subtype"); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: checkMediaTypeDisposition }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.rest = rest; $f.s = s; $f.subtype = subtype; $f.typ = typ; $f.$s = $s; $f.$r = $r; return $f; + }; + ParseMediaType = function(v) { + var _entry, _entry$1, _entry$2, _entry$3, _entry$4, _entry$5, _entry$6, _i, _key, _key$1, _key$2, _key$3, _keys, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, baseName, buf, continuation, decv, decv$1, decv$2, encodedPart, err, exists, i, idx, key, key$1, mediatype, n, ok, ok$1, ok$2, ok$3, ok$4, ok$5, params, pieceMap, pmap, rest, simplePart, singlePartKey, v, v$1, v$2, v$3, valid, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _entry$3 = $f._entry$3; _entry$4 = $f._entry$4; _entry$5 = $f._entry$5; _entry$6 = $f._entry$6; _i = $f._i; _key = $f._key; _key$1 = $f._key$1; _key$2 = $f._key$2; _key$3 = $f._key$3; _keys = $f._keys; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; baseName = $f.baseName; buf = $f.buf; continuation = $f.continuation; decv = $f.decv; decv$1 = $f.decv$1; decv$2 = $f.decv$2; encodedPart = $f.encodedPart; err = $f.err; exists = $f.exists; i = $f.i; idx = $f.idx; key = $f.key; key$1 = $f.key$1; mediatype = $f.mediatype; n = $f.n; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; ok$3 = $f.ok$3; ok$4 = $f.ok$4; ok$5 = $f.ok$5; params = $f.params; pieceMap = $f.pieceMap; pmap = $f.pmap; rest = $f.rest; simplePart = $f.simplePart; singlePartKey = $f.singlePartKey; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; v$3 = $f.v$3; valid = $f.valid; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mediatype = ""; + params = false; + err = $ifaceNil; + i = strings.Index(v, ";"); + if (i === -1) { + i = v.length; + } + _r = strings.ToLower($substring(v, 0, i)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = strings.TrimSpace(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + mediatype = _r$1; + _r$2 = checkMediaTypeDisposition(mediatype); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; + _tmp$1 = false; + _tmp$2 = err; + mediatype = _tmp; + params = _tmp$1; + err = _tmp$2; + $s = -1; return [mediatype, params, err]; + } + params = {}; + continuation = false; + v = $substring(v, i); + /* while (true) { */ case 4: + /* if (!(v.length > 0)) { break; } */ if(!(v.length > 0)) { $s = 5; continue; } + _r$3 = strings.TrimLeftFunc(v, unicode.IsSpace); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + v = _r$3; + if (v.length === 0) { + /* break; */ $s = 5; continue; + } + _r$4 = consumeMediaParam(v); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + key = _tuple[0]; + value = _tuple[1]; + rest = _tuple[2]; + /* */ if (key === "") { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (key === "") { */ case 8: + _r$5 = strings.TrimSpace(rest); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + /* */ if (_r$5 === ";") { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (_r$5 === ";") { */ case 10: + $s = -1; return [mediatype, params, err]; + /* } */ case 11: + _tmp$3 = mediatype; + _tmp$4 = false; + _tmp$5 = $pkg.ErrInvalidMediaParameter; + mediatype = _tmp$3; + params = _tmp$4; + err = _tmp$5; + $s = -1; return [mediatype, params, err]; + /* } */ case 9: + pmap = params; + idx = strings.Index(key, "*"); + if (!((idx === -1))) { + baseName = $substring(key, 0, idx); + if (continuation === false) { + continuation = {}; + } + ok = false; + _tuple$1 = (_entry = continuation[$String.keyFor(baseName)], _entry !== undefined ? [_entry.v, true] : [false, false]); + pmap = _tuple$1[0]; + ok = _tuple$1[1]; + if (!ok) { + _key = baseName; (continuation || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: {} }; + pmap = (_entry$1 = continuation[$String.keyFor(baseName)], _entry$1 !== undefined ? _entry$1.v : false); + } + } + _tuple$2 = (_entry$2 = pmap[$String.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : ["", false]); + exists = _tuple$2[1]; + if (exists) { + _tmp$6 = ""; + _tmp$7 = false; + _tmp$8 = errors.New("mime: duplicate parameter name"); + mediatype = _tmp$6; + params = _tmp$7; + err = _tmp$8; + $s = -1; return [mediatype, params, err]; + } + _key$1 = key; (pmap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: value }; + v = rest; + /* } */ $s = 4; continue; case 5: + buf = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); + _ref = continuation; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 13: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 14; continue; } + _entry$3 = _ref[_keys[_i]]; + if (_entry$3 === undefined) { + _i++; + /* continue; */ $s = 13; continue; + } + key$1 = _entry$3.k; + pieceMap = _entry$3.v; + singlePartKey = key$1 + "*"; + _tuple$3 = (_entry$4 = pieceMap[$String.keyFor(singlePartKey)], _entry$4 !== undefined ? [_entry$4.v, true] : ["", false]); + v$1 = _tuple$3[0]; + ok$1 = _tuple$3[1]; + /* */ if (ok$1) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (ok$1) { */ case 15: + _r$6 = decode2231Enc(v$1); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + decv = _tuple$4[0]; + ok$2 = _tuple$4[1]; + if (ok$2) { + _key$2 = key$1; (params || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$2)] = { k: _key$2, v: decv }; + } + _i++; + /* continue; */ $s = 13; continue; + /* } */ case 16: + buf.Reset(); + valid = false; + n = 0; + /* while (true) { */ case 18: + _r$7 = fmt.Sprintf("%s*%d", new sliceType$2([new $String(key$1), new $Int(n)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + simplePart = _r$7; + _tuple$5 = (_entry$5 = pieceMap[$String.keyFor(simplePart)], _entry$5 !== undefined ? [_entry$5.v, true] : ["", false]); + v$2 = _tuple$5[0]; + ok$3 = _tuple$5[1]; + if (ok$3) { + valid = true; + buf.WriteString(v$2); + n = n + (1) >> 0; + /* continue; */ $s = 18; continue; + } + encodedPart = simplePart + "*"; + _tuple$6 = (_entry$6 = pieceMap[$String.keyFor(encodedPart)], _entry$6 !== undefined ? [_entry$6.v, true] : ["", false]); + v$3 = _tuple$6[0]; + ok$4 = _tuple$6[1]; + if (!ok$4) { + /* break; */ $s = 19; continue; + } + valid = true; + /* */ if (n === 0) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (n === 0) { */ case 21: + _r$8 = decode2231Enc(v$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$7 = _r$8; + decv$1 = _tuple$7[0]; + ok$5 = _tuple$7[1]; + if (ok$5) { + buf.WriteString(decv$1); + } + $s = 23; continue; + /* } else { */ case 22: + _r$9 = percentHexUnescape(v$3); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$8 = _r$9; + decv$2 = _tuple$8[0]; + buf.WriteString(decv$2); + /* } */ case 23: + n = n + (1) >> 0; + /* } */ $s = 18; continue; case 19: + if (valid) { + _key$3 = key$1; (params || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$3)] = { k: _key$3, v: buf.String() }; + } + _i++; + /* } */ $s = 13; continue; case 14: + $s = -1; return [mediatype, params, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ParseMediaType }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._entry$3 = _entry$3; $f._entry$4 = _entry$4; $f._entry$5 = _entry$5; $f._entry$6 = _entry$6; $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._key$2 = _key$2; $f._key$3 = _key$3; $f._keys = _keys; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f.baseName = baseName; $f.buf = buf; $f.continuation = continuation; $f.decv = decv; $f.decv$1 = decv$1; $f.decv$2 = decv$2; $f.encodedPart = encodedPart; $f.err = err; $f.exists = exists; $f.i = i; $f.idx = idx; $f.key = key; $f.key$1 = key$1; $f.mediatype = mediatype; $f.n = n; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.ok$3 = ok$3; $f.ok$4 = ok$4; $f.ok$5 = ok$5; $f.params = params; $f.pieceMap = pieceMap; $f.pmap = pmap; $f.rest = rest; $f.simplePart = simplePart; $f.singlePartKey = singlePartKey; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.v$3 = v$3; $f.valid = valid; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ParseMediaType = ParseMediaType; + decode2231Enc = function(v) { + var _r, _r$1, _tuple, charset, encv, err, sv, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; charset = $f.charset; encv = $f.encv; err = $f.err; sv = $f.sv; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sv = strings.SplitN(v, "'", 3); + if (!((sv.$length === 3))) { + $s = -1; return ["", false]; + } + _r = strings.ToLower((0 >= sv.$length ? ($throwRuntimeError("index out of range"), undefined) : sv.$array[sv.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + charset = _r; + if (charset.length === 0) { + $s = -1; return ["", false]; + } + if (!(charset === "us-ascii") && !(charset === "utf-8")) { + $s = -1; return ["", false]; + } + _r$1 = percentHexUnescape((2 >= sv.$length ? ($throwRuntimeError("index out of range"), undefined) : sv.$array[sv.$offset + 2])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + encv = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", false]; + } + $s = -1; return [encv, true]; + /* */ } return; } if ($f === undefined) { $f = { $blk: decode2231Enc }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.charset = charset; $f.encv = encv; $f.err = err; $f.sv = sv; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + isNotTokenChar = function(r) { + var r; + return !isTokenChar(r); + }; + consumeToken = function(v) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, notPos, rest, token, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; notPos = $f.notPos; rest = $f.rest; token = $f.token; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + token = ""; + rest = ""; + _r = strings.IndexFunc(v, isNotTokenChar); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + notPos = _r; + if (notPos === -1) { + _tmp = v; + _tmp$1 = ""; + token = _tmp; + rest = _tmp$1; + $s = -1; return [token, rest]; + } + if (notPos === 0) { + _tmp$2 = ""; + _tmp$3 = v; + token = _tmp$2; + rest = _tmp$3; + $s = -1; return [token, rest]; + } + _tmp$4 = $substring(v, 0, notPos); + _tmp$5 = $substring(v, notPos); + token = _tmp$4; + rest = _tmp$5; + $s = -1; return [token, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: consumeToken }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f.notPos = notPos; $f.rest = rest; $f.token = token; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + consumeValue = function(v) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buffer, i, r, rest, v, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; buffer = $f.buffer; i = $f.i; r = $f.r; rest = $f.rest; v = $f.v; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + value = ""; + rest = ""; + if (v === "") { + $s = -1; return [value, rest]; + } + /* */ if (!((v.charCodeAt(0) === 34))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((v.charCodeAt(0) === 34))) { */ case 1: + _r = consumeToken(v); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + value = _tuple[0]; + rest = _tuple[1]; + $s = -1; return [value, rest]; + /* } */ case 2: + buffer = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); + i = 1; + while (true) { + if (!(i < v.length)) { break; } + r = v.charCodeAt(i); + if (r === 34) { + _tmp = buffer.String(); + _tmp$1 = $substring(v, (i + 1 >> 0)); + value = _tmp; + rest = _tmp$1; + $s = -1; return [value, rest]; + } + if ((r === 92) && (i + 1 >> 0) < v.length && !isTokenChar(((v.charCodeAt((i + 1 >> 0)) >> 0)))) { + buffer.WriteByte(v.charCodeAt((i + 1 >> 0))); + i = i + (1) >> 0; + i = i + (1) >> 0; + continue; + } + if ((r === 13) || (r === 10)) { + _tmp$2 = ""; + _tmp$3 = v; + value = _tmp$2; + rest = _tmp$3; + $s = -1; return [value, rest]; + } + buffer.WriteByte(v.charCodeAt(i)); + i = i + (1) >> 0; + } + _tmp$4 = ""; + _tmp$5 = v; + value = _tmp$4; + rest = _tmp$5; + $s = -1; return [value, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: consumeValue }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.buffer = buffer; $f.i = i; $f.r = r; $f.rest = rest; $f.v = v; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + consumeMediaParam = function(v) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, param, rest, rest2, v, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; param = $f.param; rest = $f.rest; rest2 = $f.rest2; v = $f.v; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + param = ""; + value = ""; + rest = ""; + _r = strings.TrimLeftFunc(v, unicode.IsSpace); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + rest = _r; + if (!strings.HasPrefix(rest, ";")) { + _tmp = ""; + _tmp$1 = ""; + _tmp$2 = v; + param = _tmp; + value = _tmp$1; + rest = _tmp$2; + $s = -1; return [param, value, rest]; + } + rest = $substring(rest, 1); + _r$1 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + rest = _r$1; + _r$2 = consumeToken(rest); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + param = _tuple[0]; + rest = _tuple[1]; + _r$3 = strings.ToLower(param); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + param = _r$3; + if (param === "") { + _tmp$3 = ""; + _tmp$4 = ""; + _tmp$5 = v; + param = _tmp$3; + value = _tmp$4; + rest = _tmp$5; + $s = -1; return [param, value, rest]; + } + _r$4 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + rest = _r$4; + if (!strings.HasPrefix(rest, "=")) { + _tmp$6 = ""; + _tmp$7 = ""; + _tmp$8 = v; + param = _tmp$6; + value = _tmp$7; + rest = _tmp$8; + $s = -1; return [param, value, rest]; + } + rest = $substring(rest, 1); + _r$5 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + rest = _r$5; + _r$6 = consumeValue(rest); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$1 = _r$6; + value = _tuple$1[0]; + rest2 = _tuple$1[1]; + if (value === "" && rest2 === rest) { + _tmp$9 = ""; + _tmp$10 = ""; + _tmp$11 = v; + param = _tmp$9; + value = _tmp$10; + rest = _tmp$11; + $s = -1; return [param, value, rest]; + } + rest = rest2; + _tmp$12 = param; + _tmp$13 = value; + _tmp$14 = rest; + param = _tmp$12; + value = _tmp$13; + rest = _tmp$14; + $s = -1; return [param, value, rest]; + /* */ } return; } if ($f === undefined) { $f = { $blk: consumeMediaParam }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.param = param; $f.rest = rest; $f.rest2 = rest2; $f.v = v; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + percentHexUnescape = function(s) { + var _1, _r, i, i$1, j, percents, s, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; i = $f.i; i$1 = $f.i$1; j = $f.j; percents = $f.percents; s = $f.s; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + percents = 0; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } + /* */ if (!((s.charCodeAt(i) === 37))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((s.charCodeAt(i) === 37))) { */ case 3: + i = i + (1) >> 0; + /* continue; */ $s = 1; continue; + /* } */ case 4: + percents = percents + (1) >> 0; + /* */ if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { */ case 5: + s = $substring(s, i); + if (s.length > 3) { + s = $substring(s, 0, 3); + } + _r = fmt.Errorf("mime: bogus characters after %%: %q", new sliceType$2([new $String(s)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return ["", _r]; + /* } */ case 6: + i = i + (3) >> 0; + /* } */ $s = 1; continue; case 2: + if (percents === 0) { + $s = -1; return [s, $ifaceNil]; + } + t = $makeSlice(sliceType$1, (s.length - ($imul(2, percents)) >> 0)); + j = 0; + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + _1 = s.charCodeAt(i$1); + if (_1 === (37)) { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = (((unhex(s.charCodeAt((i$1 + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i$1 + 2 >> 0)))) >>> 0)); + j = j + (1) >> 0; + i$1 = i$1 + (3) >> 0; + } else { + ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = s.charCodeAt(i$1)); + j = j + (1) >> 0; + i$1 = i$1 + (1) >> 0; + } + } + $s = -1; return [($bytesToString(t)), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: percentHexUnescape }; } $f._1 = _1; $f._r = _r; $f.i = i; $f.i$1 = i$1; $f.j = j; $f.percents = percents; $f.s = s; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + ishex = function(c) { + var c; + if (48 <= c && c <= 57) { + return true; + } else if (97 <= c && c <= 102) { + return true; + } else if (65 <= c && c <= 70) { + return true; + } + return false; + }; + unhex = function(c) { + var c; + if (48 <= c && c <= 57) { + return c - 48 << 24 >>> 24; + } else if (97 <= c && c <= 102) { + return (c - 97 << 24 >>> 24) + 10 << 24 >>> 24; + } else if (65 <= c && c <= 70) { + return (c - 65 << 24 >>> 24) + 10 << 24 >>> 24; + } + return 0; + }; + setExtensionType = function(extension, mimeType) { + var _entry, _i, _key, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, ei, err, extLower, extension, exts, justType, mimeType, ok, param, v, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ei = $f.ei; err = $f.err; extLower = $f.extLower; extension = $f.extension; exts = $f.exts; justType = $f.justType; mimeType = $f.mimeType; ok = $f.ok; param = $f.param; v = $f.v; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r = ParseMediaType(mimeType); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + justType = _tuple[0]; + param = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (strings.HasPrefix(mimeType, "text/") && (_entry = param[$String.keyFor("charset")], _entry !== undefined ? _entry.v : "") === "") { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (strings.HasPrefix(mimeType, "text/") && (_entry = param[$String.keyFor("charset")], _entry !== undefined ? _entry.v : "") === "") { */ case 2: + _key = "charset"; (param || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: "utf-8" }; + _r$1 = FormatMediaType(mimeType, param); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + mimeType = _r$1; + /* } */ case 3: + _r$2 = strings.ToLower(extension); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + extLower = _r$2; + $r = mimeTypes.Store(new $String(extension), new $String(mimeType)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = mimeTypesLower.Store(new $String(extLower), new $String(mimeType)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = extensionsMu.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(extensionsMu, "Unlock"), []]); + exts = sliceType.nil; + _r$3 = extensions.Load(new $String(justType)); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + ei = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + exts = $assertType(ei, sliceType); + } + _ref = exts; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (v === extLower) { + $s = -1; return $ifaceNil; + } + _i++; + } + $r = extensions.Store(new $String(justType), $append(exts, extLower)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: setExtensionType }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ei = ei; $f.err = err; $f.extLower = extLower; $f.extension = extension; $f.exts = exts; $f.justType = justType; $f.mimeType = mimeType; $f.ok = ok; $f.param = param; $f.v = v; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + init = function() { + osInitMime = initMimeUnix; + }; + loadMimeFile = function(filename) { + var _i, _r, _r$1, _r$2, _r$3, _ref, _tuple, err, err$1, ext, f, fields, filename, mimeType, scanner, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; ext = $f.ext; f = $f.f; fields = $f.fields; filename = $f.filename; mimeType = $f.mimeType; scanner = $f.scanner; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r = os.Open(filename); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + f = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return; + } + $deferred.push([$methodVal(f, "Close"), []]); + scanner = bufio.NewScanner(f); + /* while (true) { */ case 2: + _r$1 = scanner.Scan(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* if (!(_r$1)) { break; } */ if(!(_r$1)) { $s = 3; continue; } + _r$2 = strings.Fields(scanner.Text()); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + fields = _r$2; + /* */ if (fields.$length <= 1 || ((0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).charCodeAt(0) === 35)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (fields.$length <= 1 || ((0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).charCodeAt(0) === 35)) { */ case 6: + /* continue; */ $s = 2; continue; + /* } */ case 7: + mimeType = (0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]); + _ref = $subslice(fields, 1); + _i = 0; + /* while (true) { */ case 8: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } + ext = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (ext.charCodeAt(0) === 35) { + /* break; */ $s = 9; continue; + } + _r$3 = setExtensionType("." + ext, mimeType); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _i++; + /* } */ $s = 8; continue; case 9: + /* } */ $s = 2; continue; case 3: + err$1 = scanner.Err(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $panic(err$1); + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: loadMimeFile }; } $f._i = _i; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.ext = ext; $f.f = f; $f.fields = fields; $f.filename = filename; $f.mimeType = mimeType; $f.scanner = scanner; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + initMimeUnix = function() { + var _i, _ref, filename, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; filename = $f.filename; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = typeFiles; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + filename = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = loadMimeFile(filename); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initMimeUnix }; } $f._i = _i; $f._ref = _ref; $f.filename = filename; $f.$s = $s; $f.$r = $r; return $f; + }; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = base64.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = unicode.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + mimeTypes = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); + mimeTypesLower = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); + extensionsMu = new sync.Mutex.ptr(0, 0); + extensions = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); + osInitMime = $throwNilPointerError; + errInvalidWord = errors.New("mime: invalid RFC 2047 encoded-word"); + maxBase64Len = base64.StdEncoding.DecodedLen(63); + $pkg.ErrInvalidMediaParameter = errors.New("mime: invalid media parameter"); + typeFiles = new sliceType(["/etc/mime.types", "/etc/apache2/mime.types", "/etc/apache/mime.types"]); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["mime/quotedprintable"] = (function() { + var $pkg = {}, $init, bufio, bytes, fmt, io, Reader, sliceType, ptrType, sliceType$1, ptrType$1, crlf, lf, softSuffix, NewReader, fromHex, readHexByte, isQPDiscardWhitespace; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + Reader = $pkg.Reader = $newType(0, $kindStruct, "quotedprintable.Reader", true, "mime/quotedprintable", true, function(br_, rerr_, line_) { + this.$val = this; + if (arguments.length === 0) { + this.br = ptrType.nil; + this.rerr = $ifaceNil; + this.line = sliceType.nil; + return; + } + this.br = br_; + this.rerr = rerr_; + this.line = line_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(bufio.Reader); + sliceType$1 = $sliceType($emptyInterface); + ptrType$1 = $ptrType(Reader); + NewReader = function(r) { + var r; + return new Reader.ptr(bufio.NewReader(r), $ifaceNil, sliceType.nil); + }; + $pkg.NewReader = NewReader; + fromHex = function(b) { + var _r, b, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (b >= 48 && b <= 57) { + $s = -1; return [b - 48 << 24 >>> 24, $ifaceNil]; + } else if (b >= 65 && b <= 70) { + $s = -1; return [(b - 65 << 24 >>> 24) + 10 << 24 >>> 24, $ifaceNil]; + } else if (b >= 97 && b <= 102) { + $s = -1; return [(b - 97 << 24 >>> 24) + 10 << 24 >>> 24, $ifaceNil]; + } + _r = fmt.Errorf("quotedprintable: invalid hex byte 0x%02x", new sliceType$1([new $Uint8(b)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [0, _r]; + /* */ } return; } if ($f === undefined) { $f = { $blk: fromHex }; } $f._r = _r; $f.b = b; $f.$s = $s; $f.$r = $r; return $f; + }; + readHexByte = function(v) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, hb, lb, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; err = $f.err; hb = $f.hb; lb = $f.lb; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = 0; + err = $ifaceNil; + if (v.$length < 2) { + _tmp = 0; + _tmp$1 = io.ErrUnexpectedEOF; + b = _tmp; + err = _tmp$1; + $s = -1; return [b, err]; + } + _tmp$2 = 0; + _tmp$3 = 0; + hb = _tmp$2; + lb = _tmp$3; + _r = fromHex((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + hb = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = err; + b = _tmp$4; + err = _tmp$5; + $s = -1; return [b, err]; + } + _r$1 = fromHex((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + lb = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = 0; + _tmp$7 = err; + b = _tmp$6; + err = _tmp$7; + $s = -1; return [b, err]; + } + _tmp$8 = ((hb << 4 << 24 >>> 24) | lb) >>> 0; + _tmp$9 = $ifaceNil; + b = _tmp$8; + err = _tmp$9; + $s = -1; return [b, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: readHexByte }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.err = err; $f.hb = hb; $f.lb = lb; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + isQPDiscardWhitespace = function(r) { + var _1, r; + _1 = r; + if ((_1 === (10)) || (_1 === (13)) || (_1 === (32)) || (_1 === (9))) { + return true; + } + return false; + }; + Reader.ptr.prototype.Read = function(p) { + var _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, hasCR, hasLF, n, p, r, rightStripped, wholeLine, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; err = $f.err; hasCR = $f.hasCR; hasLF = $f.hasLF; n = $f.n; p = $f.p; r = $f.r; rightStripped = $f.rightStripped; wholeLine = $f.wholeLine; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + r = this; + /* while (true) { */ case 1: + /* if (!(p.$length > 0)) { break; } */ if(!(p.$length > 0)) { $s = 2; continue; } + /* */ if (r.line.$length === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (r.line.$length === 0) { */ case 3: + if (!($interfaceIsEqual(r.rerr, $ifaceNil))) { + _tmp = n; + _tmp$1 = r.rerr; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r = r.br.ReadSlice(10); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + r.line = _tuple[0]; + r.rerr = _tuple[1]; + hasLF = bytes.HasSuffix(r.line, lf); + hasCR = bytes.HasSuffix(r.line, crlf); + wholeLine = r.line; + _r$1 = bytes.TrimRightFunc(wholeLine, isQPDiscardWhitespace); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + r.line = _r$1; + /* */ if (bytes.HasSuffix(r.line, softSuffix)) { $s = 7; continue; } + /* */ if (hasLF) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (bytes.HasSuffix(r.line, softSuffix)) { */ case 7: + rightStripped = $subslice(wholeLine, r.line.$length); + r.line = $subslice(r.line, 0, (r.line.$length - 1 >> 0)); + /* */ if (!bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) && !((rightStripped.$length === 0) && r.line.$length > 0 && $interfaceIsEqual(r.rerr, io.EOF))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) && !((rightStripped.$length === 0) && r.line.$length > 0 && $interfaceIsEqual(r.rerr, io.EOF))) { */ case 10: + _r$2 = fmt.Errorf("quotedprintable: invalid bytes after =: %q", new sliceType$1([rightStripped])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + r.rerr = _r$2; + /* } */ case 11: + $s = 9; continue; + /* } else if (hasLF) { */ case 8: + if (hasCR) { + r.line = $append(r.line, 13, 10); + } else { + r.line = $append(r.line, 10); + } + /* } */ case 9: + /* continue; */ $s = 1; continue; + /* } */ case 4: + b = (x = r.line, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + /* */ if ((b === 61)) { $s = 14; continue; } + /* */ if ((b === 9) || (b === 13) || (b === 10)) { $s = 15; continue; } + /* */ if (b >= 128) { $s = 16; continue; } + /* */ if (b < 32 || b > 126) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if ((b === 61)) { */ case 14: + _r$3 = readHexByte($subslice(r.line, 1)); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + b = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (r.line.$length >= 2 && !(((x$1 = r.line, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) === 13)) && !(((x$2 = r.line, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) === 10))) { + b = 61; + /* break; */ $s = 13; continue; + } + _tmp$2 = n; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + r.line = $subslice(r.line, 2); + $s = 18; continue; + /* } else if ((b === 9) || (b === 13) || (b === 10)) { */ case 15: + /* break; */ $s = 13; continue; + $s = 18; continue; + /* } else if (b >= 128) { */ case 16: + /* break; */ $s = 13; continue; + $s = 18; continue; + /* } else if (b < 32 || b > 126) { */ case 17: + _tmp$4 = n; + _r$4 = fmt.Errorf("quotedprintable: invalid unescaped byte 0x%02x in body", new sliceType$1([new $Uint8(b)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp$5 = _r$4; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* } */ case 18: + case 13: + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = b); + p = $subslice(p, 1); + r.line = $subslice(r.line, 1); + n = n + (1) >> 0; + /* } */ $s = 1; continue; case 2: + _tmp$6 = n; + _tmp$7 = $ifaceNil; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.err = err; $f.hasCR = hasCR; $f.hasLF = hasLF; $f.n = n; $f.p = p; $f.r = r; $f.rightStripped = rightStripped; $f.wholeLine = wholeLine; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.Read = function(p) { return this.$val.Read(p); }; + ptrType$1.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + Reader.init("mime/quotedprintable", [{prop: "br", name: "br", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "rerr", name: "rerr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "line", name: "line", embedded: false, exported: false, typ: sliceType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + crlf = (new sliceType($stringToBytes("\r\n"))); + lf = (new sliceType($stringToBytes("\n"))); + softSuffix = (new sliceType($stringToBytes("="))); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net/textproto"] = (function() { + var $pkg = {}, $init, bufio, bytes, fmt, io, ioutil, net, strconv, strings, sync, MIMEHeader, Reader, dotReader, Error, ProtocolError, sliceType, sliceType$1, ptrType, ptrType$1, ptrType$2, sliceType$2, ptrType$9, commonHeader, isTokenTable, NewReader, trim, parseCodeLine, CanonicalMIMEHeaderKey, validHeaderFieldByte, canonicalMIMEHeaderKey, init, TrimString, isASCIISpace, isASCIILetter; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + net = $packages["net"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + MIMEHeader = $pkg.MIMEHeader = $newType(4, $kindMap, "textproto.MIMEHeader", true, "net/textproto", true, null); + Reader = $pkg.Reader = $newType(0, $kindStruct, "textproto.Reader", true, "net/textproto", true, function(R_, dot_, buf_) { + this.$val = this; + if (arguments.length === 0) { + this.R = ptrType.nil; + this.dot = ptrType$1.nil; + this.buf = sliceType.nil; + return; + } + this.R = R_; + this.dot = dot_; + this.buf = buf_; + }); + dotReader = $pkg.dotReader = $newType(0, $kindStruct, "textproto.dotReader", true, "net/textproto", false, function(r_, state_) { + this.$val = this; + if (arguments.length === 0) { + this.r = ptrType$2.nil; + this.state = 0; + return; + } + this.r = r_; + this.state = state_; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "textproto.Error", true, "net/textproto", true, function(Code_, Msg_) { + this.$val = this; + if (arguments.length === 0) { + this.Code = 0; + this.Msg = ""; + return; + } + this.Code = Code_; + this.Msg = Msg_; + }); + ProtocolError = $pkg.ProtocolError = $newType(8, $kindString, "textproto.ProtocolError", true, "net/textproto", true, null); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($String); + ptrType = $ptrType(bufio.Reader); + ptrType$1 = $ptrType(dotReader); + ptrType$2 = $ptrType(Reader); + sliceType$2 = $sliceType($emptyInterface); + ptrType$9 = $ptrType(Error); + MIMEHeader.prototype.Add = function(key, value) { + var _entry, _key, h, key, value; + h = this.$val; + key = CanonicalMIMEHeaderKey(key); + _key = key; (h || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = h[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil), value) }; + }; + $ptrType(MIMEHeader).prototype.Add = function(key, value) { return new MIMEHeader(this.$get()).Add(key, value); }; + MIMEHeader.prototype.Set = function(key, value) { + var _key, h, key, value; + h = this.$val; + _key = CanonicalMIMEHeaderKey(key); (h || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$1([value]) }; + }; + $ptrType(MIMEHeader).prototype.Set = function(key, value) { return new MIMEHeader(this.$get()).Set(key, value); }; + MIMEHeader.prototype.Get = function(key) { + var _entry, h, key, v; + h = this.$val; + if (h === false) { + return ""; + } + v = (_entry = h[$String.keyFor(CanonicalMIMEHeaderKey(key))], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (v.$length === 0) { + return ""; + } + return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); + }; + $ptrType(MIMEHeader).prototype.Get = function(key) { return new MIMEHeader(this.$get()).Get(key); }; + MIMEHeader.prototype.Del = function(key) { + var h, key; + h = this.$val; + delete h[$String.keyFor(CanonicalMIMEHeaderKey(key))]; + }; + $ptrType(MIMEHeader).prototype.Del = function(key) { return new MIMEHeader(this.$get()).Del(key); }; + NewReader = function(r) { + var r; + return new Reader.ptr(r, ptrType$1.nil, sliceType.nil); + }; + $pkg.NewReader = NewReader; + Reader.ptr.prototype.ReadLine = function() { + var _r, _tuple, err, line, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; line = $f.line; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + $s = -1; return [($bytesToString(line)), err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadLine }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.line = line; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadLine = function() { return this.$val.ReadLine(); }; + Reader.ptr.prototype.ReadLineBytes = function() { + var _r, _tuple, buf, err, line, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; buf = $f.buf; err = $f.err; line = $f.line; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + if (!(line === sliceType.nil)) { + buf = $makeSlice(sliceType, line.$length); + $copySlice(buf, line); + line = buf; + } + $s = -1; return [line, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadLineBytes }; } $f._r = _r; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.line = line; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadLineBytes = function() { return this.$val.ReadLineBytes(); }; + Reader.ptr.prototype.readLineSlice = function() { + var _r, _tuple, err, l, line, more, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; l = $f.l; line = $f.line; more = $f.more; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + $r = r.closeDot(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + line = sliceType.nil; + /* while (true) { */ case 2: + _r = r.R.ReadLine(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + l = _tuple[0]; + more = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + if (line === sliceType.nil && !more) { + $s = -1; return [l, $ifaceNil]; + } + line = $appendSlice(line, l); + if (!more) { + /* break; */ $s = 3; continue; + } + /* } */ $s = 2; continue; case 3: + $s = -1; return [line, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.readLineSlice }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.l = l; $f.line = line; $f.more = more; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.readLineSlice = function() { return this.$val.readLineSlice(); }; + Reader.ptr.prototype.ReadContinuedLine = function() { + var _r, _tuple, err, line, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; line = $f.line; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readContinuedLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + $s = -1; return [($bytesToString(line)), err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadContinuedLine }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.line = line; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadContinuedLine = function() { return this.$val.ReadContinuedLine(); }; + trim = function(s) { + var i, n, s, x, x$1; + i = 0; + while (true) { + if (!(i < s.$length && ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 32) || (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + n = s.$length; + while (true) { + if (!(n > i && (((x = n - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === 32) || ((x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1])) === 9)))) { break; } + n = n - (1) >> 0; + } + return $subslice(s, i, n); + }; + Reader.ptr.prototype.ReadContinuedLineBytes = function() { + var _r, _tuple, buf, err, line, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; buf = $f.buf; err = $f.err; line = $f.line; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readContinuedLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + if (!(line === sliceType.nil)) { + buf = $makeSlice(sliceType, line.$length); + $copySlice(buf, line); + line = buf; + } + $s = -1; return [line, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadContinuedLineBytes }; } $f._r = _r; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.line = line; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadContinuedLineBytes = function() { return this.$val.ReadContinuedLineBytes(); }; + Reader.ptr.prototype.readContinuedLineSlice = function() { + var _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, line, line$1, peek, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; line = $f.line; line$1 = $f.line$1; peek = $f.peek; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + if (line.$length === 0) { + $s = -1; return [line, $ifaceNil]; + } + /* */ if (r.R.Buffered() > 1) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (r.R.Buffered() > 1) { */ case 2: + _r$1 = r.R.Peek(1); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + peek = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil) && isASCIILetter((0 >= peek.$length ? ($throwRuntimeError("index out of range"), undefined) : peek.$array[peek.$offset + 0]))) { + $s = -1; return [trim(line), $ifaceNil]; + } + /* } */ case 3: + r.buf = $appendSlice($subslice(r.buf, 0, 0), trim(line)); + /* while (true) { */ case 5: + _r$2 = r.skipSpace(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* if (!(_r$2 > 0)) { break; } */ if(!(_r$2 > 0)) { $s = 6; continue; } + _r$3 = r.readLineSlice(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + line$1 = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + /* break; */ $s = 6; continue; + } + r.buf = $append(r.buf, 32); + r.buf = $appendSlice(r.buf, trim(line$1)); + /* } */ $s = 5; continue; case 6: + $s = -1; return [r.buf, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.readContinuedLineSlice }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.line = line; $f.line$1 = line$1; $f.peek = peek; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.readContinuedLineSlice = function() { return this.$val.readContinuedLineSlice(); }; + Reader.ptr.prototype.skipSpace = function() { + var _r, _tuple, c, err, n, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + n = 0; + /* while (true) { */ case 1: + _r = r.R.ReadByte(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 2; continue; + } + if (!((c === 32)) && !((c === 9))) { + r.R.UnreadByte(); + /* break; */ $s = 2; continue; + } + n = n + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.skipSpace }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.skipSpace = function() { return this.$val.skipSpace(); }; + Reader.ptr.prototype.readCodeLine = function(expectCode) { + var _r, _tuple, _tuple$1, code, continued, err, expectCode, line, message, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; code = $f.code; continued = $f.continued; err = $f.err; expectCode = $f.expectCode; line = $f.line; message = $f.message; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + code = 0; + continued = false; + message = ""; + err = $ifaceNil; + r = this; + _r = r.ReadLine(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [code, continued, message, err]; + } + _tuple$1 = parseCodeLine(line, expectCode); + code = _tuple$1[0]; + continued = _tuple$1[1]; + message = _tuple$1[2]; + err = _tuple$1[3]; + $s = -1; return [code, continued, message, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.readCodeLine }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.code = code; $f.continued = continued; $f.err = err; $f.expectCode = expectCode; $f.line = line; $f.message = message; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.readCodeLine = function(expectCode) { return this.$val.readCodeLine(expectCode); }; + parseCodeLine = function(line, expectCode) { + var _q, _q$1, _tuple, code, continued, err, expectCode, line, message; + code = 0; + continued = false; + message = ""; + err = $ifaceNil; + if (line.length < 4 || !((line.charCodeAt(3) === 32)) && !((line.charCodeAt(3) === 45))) { + err = new ProtocolError(("short response: " + line)); + return [code, continued, message, err]; + } + continued = line.charCodeAt(3) === 45; + _tuple = strconv.Atoi($substring(line, 0, 3)); + code = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || code < 100) { + err = new ProtocolError(("invalid response code: " + line)); + return [code, continued, message, err]; + } + message = $substring(line, 4); + if (1 <= expectCode && expectCode < 10 && !(((_q = code / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === expectCode)) || 10 <= expectCode && expectCode < 100 && !(((_q$1 = code / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) === expectCode)) || 100 <= expectCode && expectCode < 1000 && !((code === expectCode))) { + err = new Error.ptr(code, message); + } + return [code, continued, message, err]; + }; + Reader.ptr.prototype.ReadCodeLine = function(expectCode) { + var _r, _tuple, code, continued, err, expectCode, message, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; code = $f.code; continued = $f.continued; err = $f.err; expectCode = $f.expectCode; message = $f.message; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + code = 0; + message = ""; + err = $ifaceNil; + r = this; + _r = r.readCodeLine(expectCode); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + code = _tuple[0]; + continued = _tuple[1]; + message = _tuple[2]; + err = _tuple[3]; + if ($interfaceIsEqual(err, $ifaceNil) && continued) { + err = new ProtocolError(("unexpected multi-line response: " + message)); + } + $s = -1; return [code, message, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadCodeLine }; } $f._r = _r; $f._tuple = _tuple; $f.code = code; $f.continued = continued; $f.err = err; $f.expectCode = expectCode; $f.message = message; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadCodeLine = function(expectCode) { return this.$val.ReadCodeLine(expectCode); }; + Reader.ptr.prototype.ReadResponse = function(expectCode) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, code, code2, continued, err, err$1, expectCode, line, message, moreMessage, multi, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; code = $f.code; code2 = $f.code2; continued = $f.continued; err = $f.err; err$1 = $f.err$1; expectCode = $f.expectCode; line = $f.line; message = $f.message; moreMessage = $f.moreMessage; multi = $f.multi; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + code = 0; + message = ""; + err = $ifaceNil; + r = this; + _r = r.readCodeLine(expectCode); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + code = _tuple[0]; + continued = _tuple[1]; + message = _tuple[2]; + err = _tuple[3]; + multi = continued; + /* while (true) { */ case 2: + /* if (!(continued)) { break; } */ if(!(continued)) { $s = 3; continue; } + _r$1 = r.ReadLine(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + line = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = 0; + _tmp$1 = ""; + _tmp$2 = err$1; + code = _tmp; + message = _tmp$1; + err = _tmp$2; + $s = -1; return [code, message, err]; + } + code2 = 0; + moreMessage = ""; + _tuple$2 = parseCodeLine(line, 0); + code2 = _tuple$2[0]; + continued = _tuple$2[1]; + moreMessage = _tuple$2[2]; + err$1 = _tuple$2[3]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil)) || !((code2 === code))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil)) || !((code2 === code))) { */ case 5: + _r$2 = strings.TrimRight(line, "\r\n"); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + message = message + ("\n" + _r$2); + continued = true; + /* continue; */ $s = 2; continue; + /* } */ case 6: + message = message + ("\n" + moreMessage); + /* } */ $s = 2; continue; case 3: + if (!($interfaceIsEqual(err, $ifaceNil)) && multi && !(message === "")) { + err = new Error.ptr(code, message); + } + $s = -1; return [code, message, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadResponse }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.code = code; $f.code2 = code2; $f.continued = continued; $f.err = err; $f.err$1 = err$1; $f.expectCode = expectCode; $f.line = line; $f.message = message; $f.moreMessage = moreMessage; $f.multi = multi; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadResponse = function(expectCode) { return this.$val.ReadResponse(expectCode); }; + Reader.ptr.prototype.DotReader = function() { + var r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + $r = r.closeDot(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r.dot = new dotReader.ptr(r, 0); + $s = -1; return r.dot; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.DotReader }; } $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.DotReader = function() { return this.$val.DotReader(); }; + dotReader.ptr.prototype.Read = function(b) { + var _1, _r, _tuple, b, br, c, d, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _tuple = $f._tuple; b = $f.b; br = $f.br; c = $f.c; d = $f.d; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + d = this; + br = d.r.R; + /* while (true) { */ case 1: + /* if (!(n < b.$length && !((d.state === 5)))) { break; } */ if(!(n < b.$length && !((d.state === 5)))) { $s = 2; continue; } + c = 0; + _r = br.ReadByte(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } + /* break; */ $s = 2; continue; + } + switch (0) { default: + _1 = d.state; + if (_1 === (0)) { + if (c === 46) { + d.state = 1; + /* continue; */ $s = 1; continue; + } + if (c === 13) { + d.state = 3; + /* continue; */ $s = 1; continue; + } + d.state = 4; + } else if (_1 === (1)) { + if (c === 13) { + d.state = 2; + /* continue; */ $s = 1; continue; + } + if (c === 10) { + d.state = 5; + /* continue; */ $s = 1; continue; + } + d.state = 4; + } else if (_1 === (2)) { + if (c === 10) { + d.state = 5; + /* continue; */ $s = 1; continue; + } + br.UnreadByte(); + c = 13; + d.state = 4; + } else if (_1 === (3)) { + if (c === 10) { + d.state = 0; + break; + } + br.UnreadByte(); + c = 13; + d.state = 4; + } else if (_1 === (4)) { + if (c === 13) { + d.state = 3; + /* continue; */ $s = 1; continue; + } + if (c === 10) { + d.state = 0; + } + } + } + ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = c); + n = n + (1) >> 0; + /* } */ $s = 1; continue; case 2: + if ($interfaceIsEqual(err, $ifaceNil) && (d.state === 5)) { + err = io.EOF; + } + if (!($interfaceIsEqual(err, $ifaceNil)) && d.r.dot === d) { + d.r.dot = ptrType$1.nil; + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: dotReader.ptr.prototype.Read }; } $f._1 = _1; $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.br = br; $f.c = c; $f.d = d; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + dotReader.prototype.Read = function(b) { return this.$val.Read(b); }; + Reader.ptr.prototype.closeDot = function() { + var _r, buf, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; buf = $f.buf; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (r.dot === ptrType$1.nil) { + $s = -1; return; + } + buf = $makeSlice(sliceType, 128); + /* while (true) { */ case 1: + /* if (!(!(r.dot === ptrType$1.nil))) { break; } */ if(!(!(r.dot === ptrType$1.nil))) { $s = 2; continue; } + _r = r.dot.Read(buf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.closeDot }; } $f._r = _r; $f.buf = buf; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.closeDot = function() { return this.$val.closeDot(); }; + Reader.ptr.prototype.ReadDotBytes = function() { + var _r, _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.DotReader(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = ioutil.ReadAll(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadDotBytes }; } $f._r = _r; $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadDotBytes = function() { return this.$val.ReadDotBytes(); }; + Reader.ptr.prototype.ReadDotLines = function() { + var _r, _tuple, err, line, r, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; line = $f.line; r = $f.r; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + v = sliceType$1.nil; + err = $ifaceNil; + /* while (true) { */ case 1: + line = ""; + _r = r.ReadLine(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } + /* break; */ $s = 2; continue; + } + if (line.length > 0 && (line.charCodeAt(0) === 46)) { + if (line.length === 1) { + /* break; */ $s = 2; continue; + } + line = $substring(line, 1); + } + v = $append(v, line); + /* } */ $s = 1; continue; case 2: + $s = -1; return [v, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadDotLines }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.line = line; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadDotLines = function() { return this.$val.ReadDotLines(); }; + Reader.ptr.prototype.ReadMIMEHeader = function() { + var _entry, _key, _key$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, buf, endKey, err, err$1, err$2, hint, i, key, kv, line, m, r, strs, value, vv, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _key$1 = $f._key$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; buf = $f.buf; endKey = $f.endKey; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; hint = $f.hint; i = $f.i; key = $f.key; kv = $f.kv; line = $f.line; m = $f.m; r = $f.r; strs = $f.strs; value = $f.value; vv = $f.vv; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + strs = sliceType$1.nil; + _r = r.upcomingHeaderNewlines(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + hint = _r; + if (hint > 0) { + strs = $makeSlice(sliceType$1, hint); + } + m = ((hint < 0 || hint > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {}); + _r$1 = r.R.Peek(1); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + buf = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil) && (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 32) || ((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 9))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(err, $ifaceNil) && (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 32) || ((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 9))) { */ case 3: + _r$2 = r.readLineSlice(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + line = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [m, err$1]; + } + $s = -1; return [m, new ProtocolError(("malformed MIME header initial line: " + ($bytesToString(line))))]; + /* } */ case 4: + /* while (true) { */ case 6: + _r$3 = r.readContinuedLineSlice(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + kv = _tuple$2[0]; + err$2 = _tuple$2[1]; + if (kv.$length === 0) { + $s = -1; return [m, err$2]; + } + i = bytes.IndexByte(kv, 58); + if (i < 0) { + $s = -1; return [m, new ProtocolError(("malformed MIME header line: " + ($bytesToString(kv))))]; + } + endKey = i; + while (true) { + if (!(endKey > 0 && ((x = endKey - 1 >> 0, ((x < 0 || x >= kv.$length) ? ($throwRuntimeError("index out of range"), undefined) : kv.$array[kv.$offset + x])) === 32))) { break; } + endKey = endKey - (1) >> 0; + } + key = canonicalMIMEHeaderKey($subslice(kv, 0, endKey)); + if (key === "") { + /* continue; */ $s = 6; continue; + } + i = i + (1) >> 0; + while (true) { + if (!(i < kv.$length && ((((i < 0 || i >= kv.$length) ? ($throwRuntimeError("index out of range"), undefined) : kv.$array[kv.$offset + i]) === 32) || (((i < 0 || i >= kv.$length) ? ($throwRuntimeError("index out of range"), undefined) : kv.$array[kv.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + value = ($bytesToString($subslice(kv, i))); + vv = (_entry = m[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (vv === sliceType$1.nil && strs.$length > 0) { + _tmp = $subslice(strs, 0, 1, 1); + _tmp$1 = $subslice(strs, 1); + vv = _tmp; + strs = _tmp$1; + (0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0] = value); + _key = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + } else { + _key$1 = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append(vv, value) }; + } + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [m, err$2]; + } + /* } */ $s = 6; continue; case 7: + $s = -1; return [false, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadMIMEHeader }; } $f._entry = _entry; $f._key = _key; $f._key$1 = _key$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.buf = buf; $f.endKey = endKey; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.hint = hint; $f.i = i; $f.key = key; $f.kv = kv; $f.line = line; $f.m = m; $f.r = r; $f.strs = strs; $f.value = value; $f.vv = vv; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadMIMEHeader = function() { return this.$val.ReadMIMEHeader(); }; + Reader.ptr.prototype.upcomingHeaderNewlines = function() { + var _r, _r$1, _tuple, i, n, peek, r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; i = $f.i; n = $f.n; peek = $f.peek; r = $f.r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + r = this; + _r = r.R.Peek(1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + s = r.R.Buffered(); + if (s === 0) { + $s = -1; return n; + } + _r$1 = r.R.Peek(s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + peek = _tuple[0]; + while (true) { + if (!(peek.$length > 0)) { break; } + i = bytes.IndexByte(peek, 10); + if (i < 3) { + $s = -1; return n; + } + n = n + (1) >> 0; + peek = $subslice(peek, (i + 1 >> 0)); + } + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.upcomingHeaderNewlines }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.i = i; $f.n = n; $f.peek = peek; $f.r = r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.upcomingHeaderNewlines = function() { return this.$val.upcomingHeaderNewlines(); }; + CanonicalMIMEHeaderKey = function(s) { + var c, i, s, upper; + upper = true; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (!validHeaderFieldByte(c)) { + return s; + } + if (upper && 97 <= c && c <= 122) { + return canonicalMIMEHeaderKey((new sliceType($stringToBytes(s)))); + } + if (!upper && 65 <= c && c <= 90) { + return canonicalMIMEHeaderKey((new sliceType($stringToBytes(s)))); + } + upper = c === 45; + i = i + (1) >> 0; + } + return s; + }; + $pkg.CanonicalMIMEHeaderKey = CanonicalMIMEHeaderKey; + validHeaderFieldByte = function(b) { + var b; + return ((b >> 0)) < 127 && ((b < 0 || b >= isTokenTable.length) ? ($throwRuntimeError("index out of range"), undefined) : isTokenTable[b]); + }; + canonicalMIMEHeaderKey = function(a) { + var _entry, _i, _i$1, _ref, _ref$1, a, c, c$1, i, upper, v; + _ref = a; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (validHeaderFieldByte(c)) { + _i++; + continue; + } + return ($bytesToString(a)); + } + upper = true; + _ref$1 = a; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (upper && 97 <= c$1 && c$1 <= 122) { + c$1 = c$1 - (32) << 24 >>> 24; + } else if (!upper && 65 <= c$1 && c$1 <= 90) { + c$1 = c$1 + (32) << 24 >>> 24; + } + ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = c$1); + upper = c$1 === 45; + _i$1++; + } + v = (_entry = commonHeader[$String.keyFor(($bytesToString(a)))], _entry !== undefined ? _entry.v : ""); + if (!(v === "")) { + return v; + } + return ($bytesToString(a)); + }; + init = function() { + var _i, _key, _ref, v; + _ref = new sliceType$1(["Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Ranges", "Cache-Control", "Cc", "Connection", "Content-Id", "Content-Language", "Content-Length", "Content-Transfer-Encoding", "Content-Type", "Cookie", "Date", "Dkim-Signature", "Etag", "Expires", "From", "Host", "If-Modified-Since", "If-None-Match", "In-Reply-To", "Last-Modified", "Location", "Message-Id", "Mime-Version", "Pragma", "Received", "Return-Path", "Server", "Set-Cookie", "Subject", "To", "User-Agent", "Via", "X-Forwarded-For", "X-Imforwards", "X-Powered-By"]); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _key = v; (commonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; + _i++; + } + }; + Error.ptr.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r = fmt.Sprintf("%03d %s", new sliceType$2([new $Int(e.Code), new $String(e.Msg)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Error.ptr.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + ProtocolError.prototype.Error = function() { + var p; + p = this.$val; + return (p); + }; + $ptrType(ProtocolError).prototype.Error = function() { return new ProtocolError(this.$get()).Error(); }; + TrimString = function(s) { + var s; + while (true) { + if (!(s.length > 0 && isASCIISpace(s.charCodeAt(0)))) { break; } + s = $substring(s, 1); + } + while (true) { + if (!(s.length > 0 && isASCIISpace(s.charCodeAt((s.length - 1 >> 0))))) { break; } + s = $substring(s, 0, (s.length - 1 >> 0)); + } + return s; + }; + $pkg.TrimString = TrimString; + isASCIISpace = function(b) { + var b; + return (b === 32) || (b === 9) || (b === 10) || (b === 13); + }; + isASCIILetter = function(b) { + var b; + b = (b | (32)) >>> 0; + return 97 <= b && b <= 122; + }; + MIMEHeader.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}]; + ptrType$2.methods = [{prop: "ReadLine", name: "ReadLine", pkg: "", typ: $funcType([], [$String, $error], false)}, {prop: "ReadLineBytes", name: "ReadLineBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "readLineSlice", name: "readLineSlice", pkg: "net/textproto", typ: $funcType([], [sliceType, $error], false)}, {prop: "ReadContinuedLine", name: "ReadContinuedLine", pkg: "", typ: $funcType([], [$String, $error], false)}, {prop: "ReadContinuedLineBytes", name: "ReadContinuedLineBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "readContinuedLineSlice", name: "readContinuedLineSlice", pkg: "net/textproto", typ: $funcType([], [sliceType, $error], false)}, {prop: "skipSpace", name: "skipSpace", pkg: "net/textproto", typ: $funcType([], [$Int], false)}, {prop: "readCodeLine", name: "readCodeLine", pkg: "net/textproto", typ: $funcType([$Int], [$Int, $Bool, $String, $error], false)}, {prop: "ReadCodeLine", name: "ReadCodeLine", pkg: "", typ: $funcType([$Int], [$Int, $String, $error], false)}, {prop: "ReadResponse", name: "ReadResponse", pkg: "", typ: $funcType([$Int], [$Int, $String, $error], false)}, {prop: "DotReader", name: "DotReader", pkg: "", typ: $funcType([], [io.Reader], false)}, {prop: "closeDot", name: "closeDot", pkg: "net/textproto", typ: $funcType([], [], false)}, {prop: "ReadDotBytes", name: "ReadDotBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "ReadDotLines", name: "ReadDotLines", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "ReadMIMEHeader", name: "ReadMIMEHeader", pkg: "", typ: $funcType([], [MIMEHeader, $error], false)}, {prop: "upcomingHeaderNewlines", name: "upcomingHeaderNewlines", pkg: "net/textproto", typ: $funcType([], [$Int], false)}]; + ptrType$1.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$9.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ProtocolError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + MIMEHeader.init($String, sliceType$1); + Reader.init("net/textproto", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "dot", name: "dot", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}]); + dotReader.init("net/textproto", [{prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: $Int, tag: ""}]); + Error.init("", [{prop: "Code", name: "Code", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ioutil.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + commonHeader = {}; + isTokenTable = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, true, true, true, true, false, false, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true]); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["mime/multipart"] = (function() { + var $pkg = {}, $init, bufio, bytes, rand, errors, fmt, io, ioutil, mime, quotedprintable, textproto, os, sort, strings, Form, FileHeader, File, sectionReadCloser, Part, stickyErrorReader, partReader, Reader, sliceType, ptrType, sliceType$1, arrayType, sliceType$2, ptrType$1, sliceType$3, ptrType$2, ptrType$3, ptrType$4, sliceType$4, mapType, mapType$1, ptrType$7, mapType$2, ptrType$8, emptyParams, quoteEscaper, NewReader, newPart, scanUntilBoundary, matchAfterPrefix, skipLWSPChar; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + rand = $packages["crypto/rand"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + mime = $packages["mime"]; + quotedprintable = $packages["mime/quotedprintable"]; + textproto = $packages["net/textproto"]; + os = $packages["os"]; + sort = $packages["sort"]; + strings = $packages["strings"]; + Form = $pkg.Form = $newType(0, $kindStruct, "multipart.Form", true, "mime/multipart", true, function(Value_, File_) { + this.$val = this; + if (arguments.length === 0) { + this.Value = false; + this.File = false; + return; + } + this.Value = Value_; + this.File = File_; + }); + FileHeader = $pkg.FileHeader = $newType(0, $kindStruct, "multipart.FileHeader", true, "mime/multipart", true, function(Filename_, Header_, Size_, content_, tmpfile_) { + this.$val = this; + if (arguments.length === 0) { + this.Filename = ""; + this.Header = false; + this.Size = new $Int64(0, 0); + this.content = sliceType$1.nil; + this.tmpfile = ""; + return; + } + this.Filename = Filename_; + this.Header = Header_; + this.Size = Size_; + this.content = content_; + this.tmpfile = tmpfile_; + }); + File = $pkg.File = $newType(8, $kindInterface, "multipart.File", true, "mime/multipart", true, null); + sectionReadCloser = $pkg.sectionReadCloser = $newType(0, $kindStruct, "multipart.sectionReadCloser", true, "mime/multipart", false, function(SectionReader_) { + this.$val = this; + if (arguments.length === 0) { + this.SectionReader = ptrType$7.nil; + return; + } + this.SectionReader = SectionReader_; + }); + Part = $pkg.Part = $newType(0, $kindStruct, "multipart.Part", true, "mime/multipart", true, function(Header_, mr_, disposition_, dispositionParams_, r_, n_, total_, err_, readErr_) { + this.$val = this; + if (arguments.length === 0) { + this.Header = false; + this.mr = ptrType$4.nil; + this.disposition = ""; + this.dispositionParams = false; + this.r = $ifaceNil; + this.n = 0; + this.total = new $Int64(0, 0); + this.err = $ifaceNil; + this.readErr = $ifaceNil; + return; + } + this.Header = Header_; + this.mr = mr_; + this.disposition = disposition_; + this.dispositionParams = dispositionParams_; + this.r = r_; + this.n = n_; + this.total = total_; + this.err = err_; + this.readErr = readErr_; + }); + stickyErrorReader = $pkg.stickyErrorReader = $newType(0, $kindStruct, "multipart.stickyErrorReader", true, "mime/multipart", false, function(r_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.r = $ifaceNil; + this.err = $ifaceNil; + return; + } + this.r = r_; + this.err = err_; + }); + partReader = $pkg.partReader = $newType(0, $kindStruct, "multipart.partReader", true, "mime/multipart", false, function(p_) { + this.$val = this; + if (arguments.length === 0) { + this.p = ptrType$3.nil; + return; + } + this.p = p_; + }); + Reader = $pkg.Reader = $newType(0, $kindStruct, "multipart.Reader", true, "mime/multipart", true, function(bufReader_, currentPart_, partsRead_, nl_, nlDashBoundary_, dashBoundaryDash_, dashBoundary_) { + this.$val = this; + if (arguments.length === 0) { + this.bufReader = ptrType$2.nil; + this.currentPart = ptrType$3.nil; + this.partsRead = 0; + this.nl = sliceType$1.nil; + this.nlDashBoundary = sliceType$1.nil; + this.dashBoundaryDash = sliceType$1.nil; + this.dashBoundary = sliceType$1.nil; + return; + } + this.bufReader = bufReader_; + this.currentPart = currentPart_; + this.partsRead = partsRead_; + this.nl = nl_; + this.nlDashBoundary = nlDashBoundary_; + this.dashBoundaryDash = dashBoundaryDash_; + this.dashBoundary = dashBoundary_; + }); + sliceType = $sliceType($String); + ptrType = $ptrType(Form); + sliceType$1 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 64); + sliceType$2 = $sliceType(io.Reader); + ptrType$1 = $ptrType(FileHeader); + sliceType$3 = $sliceType(ptrType$1); + ptrType$2 = $ptrType(bufio.Reader); + ptrType$3 = $ptrType(Part); + ptrType$4 = $ptrType(Reader); + sliceType$4 = $sliceType($emptyInterface); + mapType = $mapType($String, sliceType); + mapType$1 = $mapType($String, sliceType$3); + ptrType$7 = $ptrType(io.SectionReader); + mapType$2 = $mapType($String, $String); + ptrType$8 = $ptrType(stickyErrorReader); + Reader.ptr.prototype.ReadForm = function(maxMemory) { + var _r, maxMemory, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; maxMemory = $f.maxMemory; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r = r.readForm(maxMemory); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.ReadForm }; } $f._r = _r; $f.maxMemory = maxMemory; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.ReadForm = function(maxMemory) { return this.$val.ReadForm(maxMemory); }; + Reader.ptr.prototype.readForm = function(maxMemory) { + var _, _entry, _entry$1, _key, _key$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, cerr, err, err$1, err$2, err$3, fh, file, filename, form, maxMemory, maxValueBytes, n, n$1, name, p, r, size, x, x$1, x$2, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ = $f._; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _key$1 = $f._key$1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; b = $f.b; cerr = $f.cerr; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; fh = $f.fh; file = $f.file; filename = $f.filename; form = $f.form; maxMemory = $f.maxMemory; maxValueBytes = $f.maxValueBytes; n = $f.n; n$1 = $f.n$1; name = $f.name; p = $f.p; r = $f.r; size = $f.size; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + form = [form]; + _ = ptrType.nil; + err[0] = $ifaceNil; + r = this; + form[0] = new Form.ptr({}, {}); + $deferred.push([(function(err, form) { return function() { + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + form[0].RemoveAll(); + } + }; })(err, form), []]); + maxValueBytes = new $Int64(maxMemory.$high + 0, maxMemory.$low + 10485760); + /* while (true) { */ case 1: + b = [b]; + _r = r.NextPart(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p = _tuple[0]; + err$1 = _tuple[1]; + if ($interfaceIsEqual(err$1, io.EOF)) { + /* break; */ $s = 2; continue; + } + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = ptrType.nil; + _tmp$1 = err$1; + _ = _tmp; + err[0] = _tmp$1; + $s = -1; return [_, err[0]]; + } + _r$1 = p.FormName(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + name = _r$1; + /* */ if (name === "") { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (name === "") { */ case 5: + /* continue; */ $s = 1; continue; + /* } */ case 6: + _r$2 = p.FileName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + filename = _r$2; + b[0] = new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + /* */ if (filename === "") { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (filename === "") { */ case 8: + _r$3 = io.CopyN(b[0], p, new $Int64(maxValueBytes.$high + 0, maxValueBytes.$low + 1)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + n = _tuple$1[0]; + err$2 = _tuple$1[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil)) && !($interfaceIsEqual(err$2, io.EOF))) { + _tmp$2 = ptrType.nil; + _tmp$3 = err$2; + _ = _tmp$2; + err[0] = _tmp$3; + $s = -1; return [_, err[0]]; + } + maxValueBytes = (x = n, new $Int64(maxValueBytes.$high - x.$high, maxValueBytes.$low - x.$low)); + if ((maxValueBytes.$high < 0 || (maxValueBytes.$high === 0 && maxValueBytes.$low < 0))) { + _tmp$4 = ptrType.nil; + _tmp$5 = $pkg.ErrMessageTooLarge; + _ = _tmp$4; + err[0] = _tmp$5; + $s = -1; return [_, err[0]]; + } + _key = name; (form[0].Value || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = form[0].Value[$String.keyFor(name)], _entry !== undefined ? _entry.v : sliceType.nil), b[0].String()) }; + /* continue; */ $s = 1; continue; + /* } */ case 9: + fh = new FileHeader.ptr(filename, p.Header, new $Int64(0, 0), sliceType$1.nil, ""); + _r$4 = io.CopyN(b[0], p, new $Int64(maxMemory.$high + 0, maxMemory.$low + 1)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + n$1 = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, io.EOF))) { + _tmp$6 = ptrType.nil; + _tmp$7 = err$1; + _ = _tmp$6; + err[0] = _tmp$7; + $s = -1; return [_, err[0]]; + } + /* */ if ((n$1.$high > maxMemory.$high || (n$1.$high === maxMemory.$high && n$1.$low > maxMemory.$low))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ((n$1.$high > maxMemory.$high || (n$1.$high === maxMemory.$high && n$1.$low > maxMemory.$low))) { */ case 12: + _r$5 = ioutil.TempFile("", "multipart-"); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + file = _tuple$3[0]; + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + _tmp$8 = ptrType.nil; + _tmp$9 = err$3; + _ = _tmp$8; + err[0] = _tmp$9; + $s = -1; return [_, err[0]]; + } + _r$6 = io.Copy(file, io.MultiReader(new sliceType$2([b[0], p]))); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + size = _tuple$4[0]; + err$3 = _tuple$4[1]; + _r$7 = file.Close(); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + cerr = _r$7; + if ($interfaceIsEqual(err$3, $ifaceNil)) { + err$3 = cerr; + } + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + os.Remove(file.Name()); + _tmp$10 = ptrType.nil; + _tmp$11 = err$3; + _ = _tmp$10; + err[0] = _tmp$11; + $s = -1; return [_, err[0]]; + } + fh.tmpfile = file.Name(); + fh.Size = size; + $s = 14; continue; + /* } else { */ case 13: + fh.content = b[0].Bytes(); + fh.Size = (new $Int64(0, fh.content.$length)); + maxMemory = (x$1 = n$1, new $Int64(maxMemory.$high - x$1.$high, maxMemory.$low - x$1.$low)); + maxValueBytes = (x$2 = n$1, new $Int64(maxValueBytes.$high - x$2.$high, maxValueBytes.$low - x$2.$low)); + /* } */ case 14: + _key$1 = name; (form[0].File || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = form[0].File[$String.keyFor(name)], _entry$1 !== undefined ? _entry$1.v : sliceType$3.nil), fh) }; + /* } */ $s = 1; continue; case 2: + _tmp$12 = form[0]; + _tmp$13 = $ifaceNil; + _ = _tmp$12; + err[0] = _tmp$13; + $s = -1; return [_, err[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [_, err[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.readForm }; } $f._ = _; $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._key$1 = _key$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.b = b; $f.cerr = cerr; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.fh = fh; $f.file = file; $f.filename = filename; $f.form = form; $f.maxMemory = maxMemory; $f.maxValueBytes = maxValueBytes; $f.n = n; $f.n$1 = n$1; $f.name = name; $f.p = p; $f.r = r; $f.size = size; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Reader.prototype.readForm = function(maxMemory) { return this.$val.readForm(maxMemory); }; + Form.ptr.prototype.RemoveAll = function() { + var _entry, _i, _i$1, _keys, _ref, _ref$1, e, err, f, fh, fhs; + f = this; + err = $ifaceNil; + _ref = f.File; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + fhs = _entry.v; + _ref$1 = fhs; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + fh = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (!(fh.tmpfile === "")) { + e = os.Remove(fh.tmpfile); + if (!($interfaceIsEqual(e, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { + err = e; + } + } + _i$1++; + } + _i++; + } + return err; + }; + Form.prototype.RemoveAll = function() { return this.$val.RemoveAll(); }; + FileHeader.ptr.prototype.Open = function() { + var _r, _returncast, b, fh, r, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _returncast = $f._returncast; b = $f.b; fh = $f.fh; r = $f.r; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fh = this; + b = fh.content; + if (!(b === sliceType$1.nil)) { + r = io.NewSectionReader(bytes.NewReader(b), new $Int64(0, 0), (new $Int64(0, b.$length))); + $s = -1; return [(x = new sectionReadCloser.ptr(r), new x.constructor.elem(x)), $ifaceNil]; + } + _r = os.Open(fh.tmpfile); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _returncast = _r; + $s = -1; return [_returncast[0], _returncast[1]]; + /* */ } return; } if ($f === undefined) { $f = { $blk: FileHeader.ptr.prototype.Open }; } $f._r = _r; $f._returncast = _returncast; $f.b = b; $f.fh = fh; $f.r = r; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + FileHeader.prototype.Open = function() { return this.$val.Open(); }; + sectionReadCloser.ptr.prototype.Close = function() { + var rc; + rc = this; + return $ifaceNil; + }; + sectionReadCloser.prototype.Close = function() { return this.$val.Close(); }; + Part.ptr.prototype.FormName = function() { + var _entry, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + /* */ if (p.dispositionParams === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (p.dispositionParams === false) { */ case 1: + $r = p.parseContentDisposition(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!(p.disposition === "form-data")) { + $s = -1; return ""; + } + $s = -1; return (_entry = p.dispositionParams[$String.keyFor("name")], _entry !== undefined ? _entry.v : ""); + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.FormName }; } $f._entry = _entry; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.FormName = function() { return this.$val.FormName(); }; + Part.ptr.prototype.FileName = function() { + var _entry, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + /* */ if (p.dispositionParams === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (p.dispositionParams === false) { */ case 1: + $r = p.parseContentDisposition(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return (_entry = p.dispositionParams[$String.keyFor("filename")], _entry !== undefined ? _entry.v : ""); + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.FileName }; } $f._entry = _entry; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.FileName = function() { return this.$val.FileName(); }; + Part.ptr.prototype.parseContentDisposition = function() { + var _r, _tuple, err, p, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; p = $f.p; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + v = new textproto.MIMEHeader(p.Header).Get("Content-Disposition"); + err = $ifaceNil; + _r = mime.ParseMediaType(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p.disposition = _tuple[0]; + p.dispositionParams = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + p.dispositionParams = emptyParams; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.parseContentDisposition }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.p = p; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.parseContentDisposition = function() { return this.$val.parseContentDisposition(); }; + NewReader = function(r, boundary) { + var b, boundary, r; + b = (new sliceType$1($stringToBytes("\r\n--" + boundary + "--"))); + return new Reader.ptr(bufio.NewReaderSize(new stickyErrorReader.ptr(r, $ifaceNil), 4096), ptrType$3.nil, 0, $subslice(b, 0, 2), $subslice(b, 0, (b.$length - 2 >> 0)), $subslice(b, 2), $subslice(b, 2, (b.$length - 2 >> 0))); + }; + $pkg.NewReader = NewReader; + stickyErrorReader.ptr.prototype.Read = function(p) { + var _, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, p, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ = $f._; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; n = $f.n; p = $f.p; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + _ = $ifaceNil; + r = this; + if (!($interfaceIsEqual(r.err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = r.err; + n = _tmp; + _ = _tmp$1; + $s = -1; return [n, _]; + } + _r = r.r.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + r.err = _tuple[1]; + _tmp$2 = n; + _tmp$3 = r.err; + n = _tmp$2; + _ = _tmp$3; + $s = -1; return [n, _]; + /* */ } return; } if ($f === undefined) { $f = { $blk: stickyErrorReader.ptr.prototype.Read }; } $f._ = _; $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.n = n; $f.p = p; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + stickyErrorReader.prototype.Read = function(p) { return this.$val.Read(p); }; + newPart = function(mr) { + var _r, bp, err, mr, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; bp = $f.bp; err = $f.err; mr = $f.mr; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + bp = new Part.ptr({}, mr, "", false, $ifaceNil, 0, new $Int64(0, 0), $ifaceNil, $ifaceNil); + _r = bp.populateHeaders(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$3.nil, err]; + } + bp.r = (x = new partReader.ptr(bp), new x.constructor.elem(x)); + if (new textproto.MIMEHeader(bp.Header).Get("Content-Transfer-Encoding") === "quoted-printable") { + new textproto.MIMEHeader(bp.Header).Del("Content-Transfer-Encoding"); + bp.r = quotedprintable.NewReader(bp.r); + } + $s = -1; return [bp, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: newPart }; } $f._r = _r; $f.bp = bp; $f.err = err; $f.mr = mr; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.ptr.prototype.populateHeaders = function() { + var _r, _tuple, bp, err, header, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; bp = $f.bp; err = $f.err; header = $f.header; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + bp = this; + r = textproto.NewReader(bp.mr.bufReader); + _r = r.ReadMIMEHeader(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + header = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + bp.Header = header; + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.populateHeaders }; } $f._r = _r; $f._tuple = _tuple; $f.bp = bp; $f.err = err; $f.header = header; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.populateHeaders = function() { return this.$val.populateHeaders(); }; + Part.ptr.prototype.Read = function(d) { + var _r, _tuple, d, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; d = $f.d; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + p = this; + _r = p.r.Read(d); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.Read }; } $f._r = _r; $f._tuple = _tuple; $f.d = d; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.Read = function(d) { return this.$val.Read(d); }; + partReader.ptr.prototype.Read = function(d) { + var _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, br, d, n, p, peek, pr, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; br = $f.br; d = $f.d; n = $f.n; p = $f.p; peek = $f.peek; pr = $f.pr; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pr = this; + p = pr.p; + br = p.mr.bufReader; + /* while (true) { */ case 1: + /* if (!((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil))) { break; } */ if(!((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil))) { $s = 2; continue; } + _r = br.Peek(br.Buffered()); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + peek = _tuple[0]; + _tuple$1 = scanUntilBoundary(peek, p.mr.dashBoundary, p.mr.nlDashBoundary, p.total, p.readErr); + p.n = _tuple$1[0]; + p.err = _tuple$1[1]; + /* */ if ((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil)) { */ case 4: + _r$1 = br.Peek(peek.$length + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + p.readErr = _tuple$2[1]; + if ($interfaceIsEqual(p.readErr, io.EOF)) { + p.readErr = io.ErrUnexpectedEOF; + } + /* } */ case 5: + /* } */ $s = 1; continue; case 2: + if (p.n === 0) { + $s = -1; return [0, p.err]; + } + n = d.$length; + if (n > p.n) { + n = p.n; + } + _r$2 = br.Read($subslice(d, 0, n)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$3 = _r$2; + n = _tuple$3[0]; + p.total = (x = p.total, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + p.n = p.n - (n) >> 0; + if (p.n === 0) { + $s = -1; return [n, p.err]; + } + $s = -1; return [n, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: partReader.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.br = br; $f.d = d; $f.n = n; $f.p = p; $f.peek = peek; $f.pr = pr; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + partReader.prototype.Read = function(d) { return this.$val.Read(d); }; + scanUntilBoundary = function(buf, dashBoundary, nlDashBoundary, total, readErr) { + var _1, _2, buf, dashBoundary, i, i$1, nlDashBoundary, readErr, total; + if ((total.$high === 0 && total.$low === 0)) { + if (bytes.HasPrefix(buf, dashBoundary)) { + _1 = matchAfterPrefix(buf, dashBoundary, readErr); + if (_1 === (-1)) { + return [dashBoundary.$length, $ifaceNil]; + } else if (_1 === (0)) { + return [0, $ifaceNil]; + } else if (_1 === (1)) { + return [0, io.EOF]; + } + } + if (bytes.HasPrefix(dashBoundary, buf)) { + return [0, readErr]; + } + } + i = bytes.Index(buf, nlDashBoundary); + if (i >= 0) { + _2 = matchAfterPrefix($subslice(buf, i), nlDashBoundary, readErr); + if (_2 === (-1)) { + return [i + nlDashBoundary.$length >> 0, $ifaceNil]; + } else if (_2 === (0)) { + return [i, $ifaceNil]; + } else if (_2 === (1)) { + return [i, io.EOF]; + } + } + if (bytes.HasPrefix(nlDashBoundary, buf)) { + return [0, readErr]; + } + i$1 = bytes.LastIndexByte(buf, (0 >= nlDashBoundary.$length ? ($throwRuntimeError("index out of range"), undefined) : nlDashBoundary.$array[nlDashBoundary.$offset + 0])); + if (i$1 >= 0 && bytes.HasPrefix(nlDashBoundary, $subslice(buf, i$1))) { + return [i$1, $ifaceNil]; + } + return [buf.$length, readErr]; + }; + matchAfterPrefix = function(buf, prefix, readErr) { + var buf, c, prefix, readErr, x; + if (buf.$length === prefix.$length) { + if (!($interfaceIsEqual(readErr, $ifaceNil))) { + return 1; + } + return 0; + } + c = (x = prefix.$length, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])); + if ((c === 32) || (c === 9) || (c === 13) || (c === 10) || (c === 45)) { + return 1; + } + return -1; + }; + Part.ptr.prototype.Close = function() { + var _r, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r = io.Copy(ioutil.Discard, p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Part.ptr.prototype.Close }; } $f._r = _r; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Part.prototype.Close = function() { return this.$val.Close(); }; + Reader.ptr.prototype.NextPart = function() { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, bp, err, err$1, expectNewPart, line, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; bp = $f.bp; err = $f.err; err$1 = $f.err$1; expectNewPart = $f.expectNewPart; line = $f.line; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (!(r.currentPart === ptrType$3.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(r.currentPart === ptrType$3.nil)) { */ case 1: + _r = r.currentPart.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + /* } */ case 2: + /* */ if (($bytesToString(r.dashBoundary)) === "--") { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (($bytesToString(r.dashBoundary)) === "--") { */ case 4: + _r$1 = fmt.Errorf("multipart: boundary is empty", new sliceType$4([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return [ptrType$3.nil, _r$1]; + /* } */ case 5: + expectNewPart = false; + /* while (true) { */ case 7: + _r$2 = r.bufReader.ReadSlice(10); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + line = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, io.EOF) && r.isFinalBoundary(line)) { + $s = -1; return [ptrType$3.nil, io.EOF]; + } + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 10: + _r$3 = fmt.Errorf("multipart: NextPart: %v", new sliceType$4([err])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [ptrType$3.nil, _r$3]; + /* } */ case 11: + /* */ if (r.isBoundaryDelimiterLine(line)) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (r.isBoundaryDelimiterLine(line)) { */ case 13: + r.partsRead = r.partsRead + (1) >> 0; + _r$4 = newPart(r); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + bp = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$3.nil, err$1]; + } + r.currentPart = bp; + $s = -1; return [bp, $ifaceNil]; + /* } */ case 14: + if (r.isFinalBoundary(line)) { + $s = -1; return [ptrType$3.nil, io.EOF]; + } + /* */ if (expectNewPart) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (expectNewPart) { */ case 16: + _r$5 = fmt.Errorf("multipart: expecting a new Part; got line %q", new sliceType$4([new $String(($bytesToString(line)))])); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [ptrType$3.nil, _r$5]; + /* } */ case 17: + /* */ if (r.partsRead === 0) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (r.partsRead === 0) { */ case 19: + /* continue; */ $s = 7; continue; + /* } */ case 20: + /* */ if (bytes.Equal(line, r.nl)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (bytes.Equal(line, r.nl)) { */ case 21: + expectNewPart = true; + /* continue; */ $s = 7; continue; + /* } */ case 22: + _r$6 = fmt.Errorf("multipart: unexpected line in Next(): %q", new sliceType$4([line])); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [ptrType$3.nil, _r$6]; + /* } */ $s = 7; continue; case 8: + $s = -1; return [ptrType$3.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Reader.ptr.prototype.NextPart }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.bp = bp; $f.err = err; $f.err$1 = err$1; $f.expectNewPart = expectNewPart; $f.line = line; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Reader.prototype.NextPart = function() { return this.$val.NextPart(); }; + Reader.ptr.prototype.isFinalBoundary = function(line) { + var line, mr, rest; + mr = this; + if (!bytes.HasPrefix(line, mr.dashBoundaryDash)) { + return false; + } + rest = $subslice(line, mr.dashBoundaryDash.$length); + rest = skipLWSPChar(rest); + return (rest.$length === 0) || bytes.Equal(rest, mr.nl); + }; + Reader.prototype.isFinalBoundary = function(line) { return this.$val.isFinalBoundary(line); }; + Reader.ptr.prototype.isBoundaryDelimiterLine = function(line) { + var line, mr, rest, ret; + ret = false; + mr = this; + if (!bytes.HasPrefix(line, mr.dashBoundary)) { + ret = false; + return ret; + } + rest = $subslice(line, mr.dashBoundary.$length); + rest = skipLWSPChar(rest); + if ((mr.partsRead === 0) && (rest.$length === 1) && ((0 >= rest.$length ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + 0]) === 10)) { + mr.nl = $subslice(mr.nl, 1); + mr.nlDashBoundary = $subslice(mr.nlDashBoundary, 1); + } + ret = bytes.Equal(rest, mr.nl); + return ret; + }; + Reader.prototype.isBoundaryDelimiterLine = function(line) { return this.$val.isBoundaryDelimiterLine(line); }; + skipLWSPChar = function(b) { + var b; + while (true) { + if (!(b.$length > 0 && (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 32) || ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 9)))) { break; } + b = $subslice(b, 1); + } + return b; + }; + ptrType.methods = [{prop: "RemoveAll", name: "RemoveAll", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$1.methods = [{prop: "Open", name: "Open", pkg: "", typ: $funcType([], [File, $error], false)}]; + sectionReadCloser.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$3.methods = [{prop: "FormName", name: "FormName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FileName", name: "FileName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "parseContentDisposition", name: "parseContentDisposition", pkg: "mime/multipart", typ: $funcType([], [], false)}, {prop: "populateHeaders", name: "populateHeaders", pkg: "mime/multipart", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$8.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; + partReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; + ptrType$4.methods = [{prop: "ReadForm", name: "ReadForm", pkg: "", typ: $funcType([$Int64], [ptrType, $error], false)}, {prop: "readForm", name: "readForm", pkg: "mime/multipart", typ: $funcType([$Int64], [ptrType, $error], false)}, {prop: "NextPart", name: "NextPart", pkg: "", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "isFinalBoundary", name: "isFinalBoundary", pkg: "mime/multipart", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "isBoundaryDelimiterLine", name: "isBoundaryDelimiterLine", pkg: "mime/multipart", typ: $funcType([sliceType$1], [$Bool], false)}]; + Form.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: mapType$1, tag: ""}]); + FileHeader.init("mime/multipart", [{prop: "Filename", name: "Filename", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: textproto.MIMEHeader, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "content", name: "content", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmpfile", name: "tmpfile", embedded: false, exported: false, typ: $String, tag: ""}]); + File.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}]); + sectionReadCloser.init("", [{prop: "SectionReader", name: "SectionReader", embedded: true, exported: true, typ: ptrType$7, tag: ""}]); + Part.init("mime/multipart", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: textproto.MIMEHeader, tag: ""}, {prop: "mr", name: "mr", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "disposition", name: "disposition", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "dispositionParams", name: "dispositionParams", embedded: false, exported: false, typ: mapType$2, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "total", name: "total", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "readErr", name: "readErr", embedded: false, exported: false, typ: $error, tag: ""}]); + stickyErrorReader.init("mime/multipart", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + partReader.init("mime/multipart", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$3, tag: ""}]); + Reader.init("mime/multipart", [{prop: "bufReader", name: "bufReader", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "currentPart", name: "currentPart", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "partsRead", name: "partsRead", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "nl", name: "nl", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "nlDashBoundary", name: "nlDashBoundary", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "dashBoundaryDash", name: "dashBoundaryDash", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "dashBoundary", name: "dashBoundary", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ioutil.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = mime.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = quotedprintable.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = textproto.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrMessageTooLarge = errors.New("multipart: message too large"); + emptyParams = {}; + quoteEscaper = strings.NewReplacer(new sliceType(["\\", "\\\\", "\"", "\\\""])); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net/http/httptrace"] = (function() { + var $pkg = {}, $init, context, tls, nettrace, net, textproto, reflect, time, clientEventContextKey, ClientTrace, WroteRequestInfo, DNSStartInfo, DNSDoneInfo, GotConnInfo, ptrType, sliceType, funcType, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, sliceType$1, funcType$10, funcType$11, ContextClientTrace; + context = $packages["context"]; + tls = $packages["crypto/tls"]; + nettrace = $packages["internal/nettrace"]; + net = $packages["net"]; + textproto = $packages["net/textproto"]; + reflect = $packages["reflect"]; + time = $packages["time"]; + clientEventContextKey = $pkg.clientEventContextKey = $newType(0, $kindStruct, "httptrace.clientEventContextKey", true, "net/http/httptrace", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + ClientTrace = $pkg.ClientTrace = $newType(0, $kindStruct, "httptrace.ClientTrace", true, "net/http/httptrace", true, function(GetConn_, GotConn_, PutIdleConn_, GotFirstResponseByte_, Got100Continue_, Got1xxResponse_, DNSStart_, DNSDone_, ConnectStart_, ConnectDone_, TLSHandshakeStart_, TLSHandshakeDone_, WroteHeaderField_, WroteHeaders_, Wait100Continue_, WroteRequest_) { + this.$val = this; + if (arguments.length === 0) { + this.GetConn = $throwNilPointerError; + this.GotConn = $throwNilPointerError; + this.PutIdleConn = $throwNilPointerError; + this.GotFirstResponseByte = $throwNilPointerError; + this.Got100Continue = $throwNilPointerError; + this.Got1xxResponse = $throwNilPointerError; + this.DNSStart = $throwNilPointerError; + this.DNSDone = $throwNilPointerError; + this.ConnectStart = $throwNilPointerError; + this.ConnectDone = $throwNilPointerError; + this.TLSHandshakeStart = $throwNilPointerError; + this.TLSHandshakeDone = $throwNilPointerError; + this.WroteHeaderField = $throwNilPointerError; + this.WroteHeaders = $throwNilPointerError; + this.Wait100Continue = $throwNilPointerError; + this.WroteRequest = $throwNilPointerError; + return; + } + this.GetConn = GetConn_; + this.GotConn = GotConn_; + this.PutIdleConn = PutIdleConn_; + this.GotFirstResponseByte = GotFirstResponseByte_; + this.Got100Continue = Got100Continue_; + this.Got1xxResponse = Got1xxResponse_; + this.DNSStart = DNSStart_; + this.DNSDone = DNSDone_; + this.ConnectStart = ConnectStart_; + this.ConnectDone = ConnectDone_; + this.TLSHandshakeStart = TLSHandshakeStart_; + this.TLSHandshakeDone = TLSHandshakeDone_; + this.WroteHeaderField = WroteHeaderField_; + this.WroteHeaders = WroteHeaders_; + this.Wait100Continue = Wait100Continue_; + this.WroteRequest = WroteRequest_; + }); + WroteRequestInfo = $pkg.WroteRequestInfo = $newType(0, $kindStruct, "httptrace.WroteRequestInfo", true, "net/http/httptrace", true, function(Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Err = $ifaceNil; + return; + } + this.Err = Err_; + }); + DNSStartInfo = $pkg.DNSStartInfo = $newType(0, $kindStruct, "httptrace.DNSStartInfo", true, "net/http/httptrace", true, function(Host_) { + this.$val = this; + if (arguments.length === 0) { + this.Host = ""; + return; + } + this.Host = Host_; + }); + DNSDoneInfo = $pkg.DNSDoneInfo = $newType(0, $kindStruct, "httptrace.DNSDoneInfo", true, "net/http/httptrace", true, function(Addrs_, Err_, Coalesced_) { + this.$val = this; + if (arguments.length === 0) { + this.Addrs = sliceType.nil; + this.Err = $ifaceNil; + this.Coalesced = false; + return; + } + this.Addrs = Addrs_; + this.Err = Err_; + this.Coalesced = Coalesced_; + }); + GotConnInfo = $pkg.GotConnInfo = $newType(0, $kindStruct, "httptrace.GotConnInfo", true, "net/http/httptrace", true, function(Conn_, Reused_, WasIdle_, IdleTime_) { + this.$val = this; + if (arguments.length === 0) { + this.Conn = $ifaceNil; + this.Reused = false; + this.WasIdle = false; + this.IdleTime = new time.Duration(0, 0); + return; + } + this.Conn = Conn_; + this.Reused = Reused_; + this.WasIdle = WasIdle_; + this.IdleTime = IdleTime_; + }); + ptrType = $ptrType(ClientTrace); + sliceType = $sliceType(net.IPAddr); + funcType = $funcType([$String], [], false); + funcType$1 = $funcType([GotConnInfo], [], false); + funcType$2 = $funcType([$error], [], false); + funcType$3 = $funcType([], [], false); + funcType$4 = $funcType([$Int, textproto.MIMEHeader], [$error], false); + funcType$5 = $funcType([DNSStartInfo], [], false); + funcType$6 = $funcType([DNSDoneInfo], [], false); + funcType$7 = $funcType([$String, $String], [], false); + funcType$8 = $funcType([$String, $String, $error], [], false); + funcType$9 = $funcType([tls.ConnectionState, $error], [], false); + sliceType$1 = $sliceType($String); + funcType$10 = $funcType([$String, sliceType$1], [], false); + funcType$11 = $funcType([WroteRequestInfo], [], false); + ContextClientTrace = function(ctx) { + var _r, _tuple, ctx, trace, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; ctx = $f.ctx; trace = $f.trace; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = ctx.Value((x = new clientEventContextKey.ptr(), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = $assertType(_r, ptrType, true); + trace = _tuple[0]; + $s = -1; return trace; + /* */ } return; } if ($f === undefined) { $f = { $blk: ContextClientTrace }; } $f._r = _r; $f._tuple = _tuple; $f.ctx = ctx; $f.trace = trace; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ContextClientTrace = ContextClientTrace; + ptrType.methods = [{prop: "compose", name: "compose", pkg: "net/http/httptrace", typ: $funcType([ptrType], [], false)}, {prop: "hasNetHooks", name: "hasNetHooks", pkg: "net/http/httptrace", typ: $funcType([], [$Bool], false)}]; + clientEventContextKey.init("", []); + ClientTrace.init("", [{prop: "GetConn", name: "GetConn", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "GotConn", name: "GotConn", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "PutIdleConn", name: "PutIdleConn", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "GotFirstResponseByte", name: "GotFirstResponseByte", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Got100Continue", name: "Got100Continue", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Got1xxResponse", name: "Got1xxResponse", embedded: false, exported: true, typ: funcType$4, tag: ""}, {prop: "DNSStart", name: "DNSStart", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "DNSDone", name: "DNSDone", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "ConnectStart", name: "ConnectStart", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "ConnectDone", name: "ConnectDone", embedded: false, exported: true, typ: funcType$8, tag: ""}, {prop: "TLSHandshakeStart", name: "TLSHandshakeStart", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "TLSHandshakeDone", name: "TLSHandshakeDone", embedded: false, exported: true, typ: funcType$9, tag: ""}, {prop: "WroteHeaderField", name: "WroteHeaderField", embedded: false, exported: true, typ: funcType$10, tag: ""}, {prop: "WroteHeaders", name: "WroteHeaders", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Wait100Continue", name: "Wait100Continue", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "WroteRequest", name: "WroteRequest", embedded: false, exported: true, typ: funcType$11, tag: ""}]); + WroteRequestInfo.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + DNSStartInfo.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); + DNSDoneInfo.init("", [{prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "Coalesced", name: "Coalesced", embedded: false, exported: true, typ: $Bool, tag: ""}]); + GotConnInfo.init("", [{prop: "Conn", name: "Conn", embedded: false, exported: true, typ: net.Conn, tag: ""}, {prop: "Reused", name: "Reused", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "WasIdle", name: "WasIdle", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IdleTime", name: "IdleTime", embedded: false, exported: true, typ: time.Duration, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = context.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = tls.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = nettrace.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = textproto.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net/http/internal"] = (function() { + var $pkg = {}, $init, bufio, bytes, errors, fmt, io, chunkedReader, chunkedWriter, FlushAfterChunkWriter, sliceType, ptrType, arrayType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, ptrType$4, NewChunkedReader, readChunkLine, trimTrailingWhitespace, isASCIISpace, removeChunkExtension, NewChunkedWriter, parseHexUint; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + chunkedReader = $pkg.chunkedReader = $newType(0, $kindStruct, "internal.chunkedReader", true, "net/http/internal", false, function(r_, n_, err_, buf_, checkEnd_) { + this.$val = this; + if (arguments.length === 0) { + this.r = ptrType.nil; + this.n = new $Uint64(0, 0); + this.err = $ifaceNil; + this.buf = arrayType.zero(); + this.checkEnd = false; + return; + } + this.r = r_; + this.n = n_; + this.err = err_; + this.buf = buf_; + this.checkEnd = checkEnd_; + }); + chunkedWriter = $pkg.chunkedWriter = $newType(0, $kindStruct, "internal.chunkedWriter", true, "net/http/internal", false, function(Wire_) { + this.$val = this; + if (arguments.length === 0) { + this.Wire = $ifaceNil; + return; + } + this.Wire = Wire_; + }); + FlushAfterChunkWriter = $pkg.FlushAfterChunkWriter = $newType(0, $kindStruct, "internal.FlushAfterChunkWriter", true, "net/http/internal", true, function(Writer_) { + this.$val = this; + if (arguments.length === 0) { + this.Writer = ptrType$4.nil; + return; + } + this.Writer = Writer_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(bufio.Reader); + arrayType = $arrayType($Uint8, 2); + sliceType$1 = $sliceType($emptyInterface); + ptrType$1 = $ptrType(FlushAfterChunkWriter); + ptrType$2 = $ptrType(chunkedReader); + ptrType$3 = $ptrType(chunkedWriter); + ptrType$4 = $ptrType(bufio.Writer); + NewChunkedReader = function(r) { + var _tuple, br, ok, r; + _tuple = $assertType(r, ptrType, true); + br = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + br = bufio.NewReader(r); + } + return new chunkedReader.ptr(br, new $Uint64(0, 0), $ifaceNil, arrayType.zero(), false); + }; + $pkg.NewChunkedReader = NewChunkedReader; + chunkedReader.ptr.prototype.beginChunk = function() { + var _r, _tuple, _tuple$1, cr, line, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cr = $f.cr; line = $f.line; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + line = sliceType.nil; + _r = readChunkLine(cr.r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + line = _tuple[0]; + cr.err = _tuple[1]; + if (!($interfaceIsEqual(cr.err, $ifaceNil))) { + $s = -1; return; + } + _tuple$1 = parseHexUint(line); + cr.n = _tuple$1[0]; + cr.err = _tuple$1[1]; + if (!($interfaceIsEqual(cr.err, $ifaceNil))) { + $s = -1; return; + } + if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { + cr.err = io.EOF; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkedReader.ptr.prototype.beginChunk }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cr = cr; $f.line = line; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkedReader.prototype.beginChunk = function() { return this.$val.beginChunk(); }; + chunkedReader.ptr.prototype.chunkHeaderAvailable = function() { + var _r, _tuple, cr, n, peek, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; cr = $f.cr; n = $f.n; peek = $f.peek; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + n = cr.r.Buffered(); + /* */ if (n > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (n > 0) { */ case 1: + _r = cr.r.Peek(n); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + peek = _tuple[0]; + $s = -1; return bytes.IndexByte(peek, 10) >= 0; + /* } */ case 2: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkedReader.ptr.prototype.chunkHeaderAvailable }; } $f._r = _r; $f._tuple = _tuple; $f.cr = cr; $f.n = n; $f.peek = peek; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkedReader.prototype.chunkHeaderAvailable = function() { return this.$val.chunkHeaderAvailable(); }; + chunkedReader.ptr.prototype.Read = function(b) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _v, b, cr, err, n, n0, rbuf, x, x$1, x$2, x$3, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; b = $f.b; cr = $f.cr; err = $f.err; n = $f.n; n0 = $f.n0; rbuf = $f.rbuf; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + cr = this; + /* while (true) { */ case 1: + /* if (!($interfaceIsEqual(cr.err, $ifaceNil))) { break; } */ if(!($interfaceIsEqual(cr.err, $ifaceNil))) { $s = 2; continue; } + /* */ if (cr.checkEnd) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (cr.checkEnd) { */ case 3: + if (n > 0 && cr.r.Buffered() < 2) { + /* break; */ $s = 2; continue; + } + _r = io.ReadFull(cr.r, $subslice(new sliceType(cr.buf), 0, 2)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + cr.err = _tuple[1]; + if ($interfaceIsEqual(cr.err, $ifaceNil)) { + if (!(($bytesToString(new sliceType(cr.buf))) === "\r\n")) { + cr.err = errors.New("malformed chunked encoding"); + /* break; */ $s = 2; continue; + } + } + cr.checkEnd = false; + /* } */ case 4: + /* */ if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { */ case 6: + if (!(n > 0)) { _v = false; $s = 10; continue s; } + _r$1 = cr.chunkHeaderAvailable(); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = !_r$1; case 10: + /* */ if (_v) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (_v) { */ case 8: + /* break; */ $s = 2; continue; + /* } */ case 9: + $r = cr.beginChunk(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 1; continue; + /* } */ case 7: + if (b.$length === 0) { + /* break; */ $s = 2; continue; + } + rbuf = b; + if ((x$1 = (new $Uint64(0, rbuf.$length)), x$2 = cr.n, (x$1.$high > x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { + rbuf = $subslice(rbuf, 0, $flatten64(cr.n)); + } + n0 = 0; + _r$2 = cr.r.Read(rbuf); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + n0 = _tuple$1[0]; + cr.err = _tuple$1[1]; + n = n + (n0) >> 0; + b = $subslice(b, n0); + cr.n = (x$3 = cr.n, x$4 = (new $Uint64(0, n0)), new $Uint64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)); + if ((x$5 = cr.n, (x$5.$high === 0 && x$5.$low === 0)) && $interfaceIsEqual(cr.err, $ifaceNil)) { + cr.checkEnd = true; + } + /* } */ $s = 1; continue; case 2: + _tmp = n; + _tmp$1 = cr.err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkedReader.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.b = b; $f.cr = cr; $f.err = err; $f.n = n; $f.n0 = n0; $f.rbuf = rbuf; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkedReader.prototype.Read = function(b) { return this.$val.Read(b); }; + readChunkLine = function(b) { + var _r, _tuple, _tuple$1, b, err, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; err = $f.err; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = b.ReadSlice(10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } else if ($interfaceIsEqual(err, bufio.ErrBufferFull)) { + err = $pkg.ErrLineTooLong; + } + $s = -1; return [sliceType.nil, err]; + } + if (p.$length >= 4096) { + $s = -1; return [sliceType.nil, $pkg.ErrLineTooLong]; + } + p = trimTrailingWhitespace(p); + _tuple$1 = removeChunkExtension(p); + p = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType.nil, err]; + } + $s = -1; return [p, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: readChunkLine }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.err = err; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + trimTrailingWhitespace = function(b) { + var b, x; + while (true) { + if (!(b.$length > 0 && isASCIISpace((x = b.$length - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x]))))) { break; } + b = $subslice(b, 0, (b.$length - 1 >> 0)); + } + return b; + }; + isASCIISpace = function(b) { + var b; + return (b === 32) || (b === 9) || (b === 10) || (b === 13); + }; + removeChunkExtension = function(p) { + var p, semi; + semi = bytes.IndexByte(p, 59); + if (semi === -1) { + return [p, $ifaceNil]; + } + return [$subslice(p, 0, semi), $ifaceNil]; + }; + NewChunkedWriter = function(w) { + var w; + return new chunkedWriter.ptr(w); + }; + $pkg.NewChunkedWriter = NewChunkedWriter; + chunkedWriter.ptr.prototype.Write = function(data) { + var _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, bw, cw, data, err, n, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; bw = $f.bw; cw = $f.cw; data = $f.data; err = $f.err; n = $f.n; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + cw = this; + if (data.$length === 0) { + _tmp = 0; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r = fmt.Fprintf(cw.Wire, "%x\r\n", new sliceType$1([new $Int(data.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = 0; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + _r$1 = cw.Wire.Write(data); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + if (!((n === data.$length))) { + err = io.ErrShortWrite; + $s = -1; return [n, err]; + } + _r$2 = io.WriteString(cw.Wire, "\r\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [n, err]; + } + _tuple$3 = $assertType(cw.Wire, ptrType$1, true); + bw = _tuple$3[0]; + ok = _tuple$3[1]; + /* */ if (ok) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ok) { */ case 4: + _r$3 = bw.Writer.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + /* } */ case 5: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkedWriter.ptr.prototype.Write }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.bw = bw; $f.cw = cw; $f.data = data; $f.err = err; $f.n = n; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkedWriter.prototype.Write = function(data) { return this.$val.Write(data); }; + chunkedWriter.ptr.prototype.Close = function() { + var _r, _tuple, cw, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; cw = $f.cw; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cw = this; + _r = io.WriteString(cw.Wire, "0\r\n"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkedWriter.ptr.prototype.Close }; } $f._r = _r; $f._tuple = _tuple; $f.cw = cw; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkedWriter.prototype.Close = function() { return this.$val.Close(); }; + parseHexUint = function(v) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, i, n, v, x; + n = new $Uint64(0, 0); + err = $ifaceNil; + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (48 <= b && b <= 57) { + b = b - 48 << 24 >>> 24; + } else if (97 <= b && b <= 102) { + b = (b - 97 << 24 >>> 24) + 10 << 24 >>> 24; + } else if (65 <= b && b <= 70) { + b = (b - 65 << 24 >>> 24) + 10 << 24 >>> 24; + } else { + _tmp = new $Uint64(0, 0); + _tmp$1 = errors.New("invalid byte in chunk length"); + n = _tmp; + err = _tmp$1; + return [n, err]; + } + if (i === 16) { + _tmp$2 = new $Uint64(0, 0); + _tmp$3 = errors.New("http chunk length too large"); + n = _tmp$2; + err = _tmp$3; + return [n, err]; + } + n = $shiftLeft64(n, (4)); + n = (x = (new $Uint64(0, b)), new $Uint64(n.$high | x.$high, (n.$low | x.$low) >>> 0)); + _i++; + } + return [n, err]; + }; + ptrType$2.methods = [{prop: "beginChunk", name: "beginChunk", pkg: "net/http/internal", typ: $funcType([], [], false)}, {prop: "chunkHeaderAvailable", name: "chunkHeaderAvailable", pkg: "net/http/internal", typ: $funcType([], [$Bool], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$3.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + chunkedReader.init("net/http/internal", [{prop: "r", name: "r", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "checkEnd", name: "checkEnd", embedded: false, exported: false, typ: $Bool, tag: ""}]); + chunkedWriter.init("", [{prop: "Wire", name: "Wire", embedded: false, exported: true, typ: io.Writer, tag: ""}]); + FlushAfterChunkWriter.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$4, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrLineTooLong = errors.New("header line too long"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["path"] = (function() { + var $pkg = {}, $init, errors, strings, utf8, lazybuf, sliceType, ptrType, Clean, Split; + errors = $packages["errors"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + lazybuf = $pkg.lazybuf = $newType(0, $kindStruct, "path.lazybuf", true, "path", false, function(s_, buf_, w_) { + this.$val = this; + if (arguments.length === 0) { + this.s = ""; + this.buf = sliceType.nil; + this.w = 0; + return; + } + this.s = s_; + this.buf = buf_; + this.w = w_; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(lazybuf); + lazybuf.ptr.prototype.index = function(i) { + var b, i, x; + b = this; + if (!(b.buf === sliceType.nil)) { + return (x = b.buf, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); + } + return b.s.charCodeAt(i); + }; + lazybuf.prototype.index = function(i) { return this.$val.index(i); }; + lazybuf.ptr.prototype.append = function(c) { + var b, c, x, x$1; + b = this; + if (b.buf === sliceType.nil) { + if (b.w < b.s.length && (b.s.charCodeAt(b.w) === c)) { + b.w = b.w + (1) >> 0; + return; + } + b.buf = $makeSlice(sliceType, b.s.length); + $copyString(b.buf, $substring(b.s, 0, b.w)); + } + (x = b.buf, x$1 = b.w, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); + b.w = b.w + (1) >> 0; + }; + lazybuf.prototype.append = function(c) { return this.$val.append(c); }; + lazybuf.ptr.prototype.string = function() { + var b; + b = this; + if (b.buf === sliceType.nil) { + return $substring(b.s, 0, b.w); + } + return ($bytesToString($subslice(b.buf, 0, b.w))); + }; + lazybuf.prototype.string = function() { return this.$val.string(); }; + Clean = function(path) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, dotdot, n, out, path, r, rooted; + if (path === "") { + return "."; + } + rooted = path.charCodeAt(0) === 47; + n = path.length; + out = new lazybuf.ptr(path, sliceType.nil, 0); + _tmp = 0; + _tmp$1 = 0; + r = _tmp; + dotdot = _tmp$1; + if (rooted) { + out.append(47); + _tmp$2 = 1; + _tmp$3 = 1; + r = _tmp$2; + dotdot = _tmp$3; + } + while (true) { + if (!(r < n)) { break; } + if ((path.charCodeAt(r) === 47)) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (((r + 1 >> 0) === n) || (path.charCodeAt((r + 1 >> 0)) === 47))) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (path.charCodeAt((r + 1 >> 0)) === 46) && (((r + 2 >> 0) === n) || (path.charCodeAt((r + 2 >> 0)) === 47))) { + r = r + (2) >> 0; + if (out.w > dotdot) { + out.w = out.w - (1) >> 0; + while (true) { + if (!(out.w > dotdot && !((out.index(out.w) === 47)))) { break; } + out.w = out.w - (1) >> 0; + } + } else if (!rooted) { + if (out.w > 0) { + out.append(47); + } + out.append(46); + out.append(46); + dotdot = out.w; + } + } else { + if (rooted && !((out.w === 1)) || !rooted && !((out.w === 0))) { + out.append(47); + } + while (true) { + if (!(r < n && !((path.charCodeAt(r) === 47)))) { break; } + out.append(path.charCodeAt(r)); + r = r + (1) >> 0; + } + } + } + if (out.w === 0) { + return "."; + } + return out.string(); + }; + $pkg.Clean = Clean; + Split = function(path) { + var _tmp, _tmp$1, dir, file, i, path; + dir = ""; + file = ""; + i = strings.LastIndex(path, "/"); + _tmp = $substring(path, 0, (i + 1 >> 0)); + _tmp$1 = $substring(path, (i + 1 >> 0)); + dir = _tmp; + file = _tmp$1; + return [dir, file]; + }; + $pkg.Split = Split; + ptrType.methods = [{prop: "index", name: "index", pkg: "path", typ: $funcType([$Int], [$Uint8], false)}, {prop: "append", name: "append", pkg: "path", typ: $funcType([$Uint8], [], false)}, {prop: "string", name: "string", pkg: "path", typ: $funcType([], [$String], false)}]; + lazybuf.init("path", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrBadPattern = errors.New("syntax error in pattern"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/text/transform"] = (function() { + var $pkg = {}, $init, bytes, errors, io, utf8, errInconsistentByteCount, errShortInternal; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + io = $packages["io"]; + utf8 = $packages["unicode/utf8"]; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.ErrShortDst = errors.New("transform: short destination buffer"); + $pkg.ErrShortSrc = errors.New("transform: short source buffer"); + $pkg.ErrEndOfSpan = errors.New("transform: input and output are not identical"); + errInconsistentByteCount = errors.New("transform: inconsistent byte count returned"); + errShortInternal = errors.New("transform: short internal buffer"); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/text/unicode/bidi"] = (function() { + var $pkg = {}, $init, list, fmt, log, sort, utf8, Properties, bidiTrie, Class, sliceType$2, arrayType$3, sliceType$8, ptrType$11, trie, controlByteToClass, bidiValues, bidiIndex, LookupRune, Lookup, LookupString, newBidiTrie; + list = $packages["container/list"]; + fmt = $packages["fmt"]; + log = $packages["log"]; + sort = $packages["sort"]; + utf8 = $packages["unicode/utf8"]; + Properties = $pkg.Properties = $newType(0, $kindStruct, "bidi.Properties", true, "vendor/golang_org/x/text/unicode/bidi", true, function(entry_, last_) { + this.$val = this; + if (arguments.length === 0) { + this.entry = 0; + this.last = 0; + return; + } + this.entry = entry_; + this.last = last_; + }); + bidiTrie = $pkg.bidiTrie = $newType(0, $kindStruct, "bidi.bidiTrie", true, "vendor/golang_org/x/text/unicode/bidi", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + Class = $pkg.Class = $newType(4, $kindUint, "bidi.Class", true, "vendor/golang_org/x/text/unicode/bidi", true, null); + sliceType$2 = $sliceType(Class); + arrayType$3 = $arrayType($Uint8, 4); + sliceType$8 = $sliceType($Uint8); + ptrType$11 = $ptrType(bidiTrie); + Properties.ptr.prototype.Class = function() { + var c, p, x; + p = this; + c = ((((p.entry & 15) >>> 0) >>> 0)); + if (c === 14) { + c = (x = (p.last & 15) >>> 0, ((x < 0 || x >= controlByteToClass.length) ? ($throwRuntimeError("index out of range"), undefined) : controlByteToClass[x])); + } + return c; + }; + Properties.prototype.Class = function() { return this.$val.Class(); }; + Properties.ptr.prototype.IsBracket = function() { + var p; + p = this; + return !((((p.entry & 240) >>> 0) === 0)); + }; + Properties.prototype.IsBracket = function() { return this.$val.IsBracket(); }; + Properties.ptr.prototype.IsOpeningBracket = function() { + var p; + p = this; + return !((((p.entry & 16) >>> 0) === 0)); + }; + Properties.prototype.IsOpeningBracket = function() { return this.$val.IsOpeningBracket(); }; + LookupRune = function(r) { + var _tuple, buf, n, p, r, size; + p = new Properties.ptr(0, 0); + size = 0; + buf = arrayType$3.zero(); + n = utf8.EncodeRune(new sliceType$8(buf), r); + _tuple = Lookup($subslice(new sliceType$8(buf), 0, n)); + Properties.copy(p, _tuple[0]); + size = _tuple[1]; + return [p, size]; + }; + $pkg.LookupRune = LookupRune; + Lookup = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, p, s, sz; + p = new Properties.ptr(0, 0); + sz = 0; + c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); + if (c0 < 128) { + _tmp = new Properties.ptr(((c0 < 0 || c0 >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[c0]), 0); + _tmp$1 = 1; + Properties.copy(p, _tmp); + sz = _tmp$1; + return [p, sz]; + } else if (c0 < 194) { + _tmp$2 = new Properties.ptr(0, 0); + _tmp$3 = 1; + Properties.copy(p, _tmp$2); + sz = _tmp$3; + return [p, sz]; + } else if (c0 < 224) { + if (s.$length < 2) { + _tmp$4 = new Properties.ptr(0, 0); + _tmp$5 = 0; + Properties.copy(p, _tmp$4); + sz = _tmp$5; + return [p, sz]; + } + i = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = new Properties.ptr(0, 0); + _tmp$7 = 1; + Properties.copy(p, _tmp$6); + sz = _tmp$7; + return [p, sz]; + } + _tmp$8 = new Properties.ptr(trie.lookupValue(((i >>> 0)), c1), 0); + _tmp$9 = 2; + Properties.copy(p, _tmp$8); + sz = _tmp$9; + return [p, sz]; + } else if (c0 < 240) { + if (s.$length < 3) { + _tmp$10 = new Properties.ptr(0, 0); + _tmp$11 = 0; + Properties.copy(p, _tmp$10); + sz = _tmp$11; + return [p, sz]; + } + i$1 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = new Properties.ptr(0, 0); + _tmp$13 = 1; + Properties.copy(p, _tmp$12); + sz = _tmp$13; + return [p, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o]); + c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = new Properties.ptr(0, 0); + _tmp$15 = 1; + Properties.copy(p, _tmp$14); + sz = _tmp$15; + return [p, sz]; + } + _tmp$16 = new Properties.ptr(trie.lookupValue(((i$1 >>> 0)), c2), c2); + _tmp$17 = 3; + Properties.copy(p, _tmp$16); + sz = _tmp$17; + return [p, sz]; + } else if (c0 < 248) { + if (s.$length < 4) { + _tmp$18 = new Properties.ptr(0, 0); + _tmp$19 = 0; + Properties.copy(p, _tmp$18); + sz = _tmp$19; + return [p, sz]; + } + i$2 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = new Properties.ptr(0, 0); + _tmp$21 = 1; + Properties.copy(p, _tmp$20); + sz = _tmp$21; + return [p, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); + c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = new Properties.ptr(0, 0); + _tmp$23 = 1; + Properties.copy(p, _tmp$22); + sz = _tmp$23; + return [p, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); + c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = new Properties.ptr(0, 0); + _tmp$25 = 1; + Properties.copy(p, _tmp$24); + sz = _tmp$25; + return [p, sz]; + } + _tmp$26 = new Properties.ptr(trie.lookupValue(((i$2 >>> 0)), c3), 0); + _tmp$27 = 4; + Properties.copy(p, _tmp$26); + sz = _tmp$27; + return [p, sz]; + } + _tmp$28 = new Properties.ptr(0, 0); + _tmp$29 = 1; + Properties.copy(p, _tmp$28); + sz = _tmp$29; + return [p, sz]; + }; + $pkg.Lookup = Lookup; + LookupString = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, p, s, sz; + p = new Properties.ptr(0, 0); + sz = 0; + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp = new Properties.ptr(((c0 < 0 || c0 >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[c0]), 0); + _tmp$1 = 1; + Properties.copy(p, _tmp); + sz = _tmp$1; + return [p, sz]; + } else if (c0 < 194) { + _tmp$2 = new Properties.ptr(0, 0); + _tmp$3 = 1; + Properties.copy(p, _tmp$2); + sz = _tmp$3; + return [p, sz]; + } else if (c0 < 224) { + if (s.length < 2) { + _tmp$4 = new Properties.ptr(0, 0); + _tmp$5 = 0; + Properties.copy(p, _tmp$4); + sz = _tmp$5; + return [p, sz]; + } + i = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = new Properties.ptr(0, 0); + _tmp$7 = 1; + Properties.copy(p, _tmp$6); + sz = _tmp$7; + return [p, sz]; + } + _tmp$8 = new Properties.ptr(trie.lookupValue(((i >>> 0)), c1), 0); + _tmp$9 = 2; + Properties.copy(p, _tmp$8); + sz = _tmp$9; + return [p, sz]; + } else if (c0 < 240) { + if (s.length < 3) { + _tmp$10 = new Properties.ptr(0, 0); + _tmp$11 = 0; + Properties.copy(p, _tmp$10); + sz = _tmp$11; + return [p, sz]; + } + i$1 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1$1 = s.charCodeAt(1); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = new Properties.ptr(0, 0); + _tmp$13 = 1; + Properties.copy(p, _tmp$12); + sz = _tmp$13; + return [p, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o]); + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = new Properties.ptr(0, 0); + _tmp$15 = 1; + Properties.copy(p, _tmp$14); + sz = _tmp$15; + return [p, sz]; + } + _tmp$16 = new Properties.ptr(trie.lookupValue(((i$1 >>> 0)), c2), c2); + _tmp$17 = 3; + Properties.copy(p, _tmp$16); + sz = _tmp$17; + return [p, sz]; + } else if (c0 < 248) { + if (s.length < 4) { + _tmp$18 = new Properties.ptr(0, 0); + _tmp$19 = 0; + Properties.copy(p, _tmp$18); + sz = _tmp$19; + return [p, sz]; + } + i$2 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); + c1$2 = s.charCodeAt(1); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = new Properties.ptr(0, 0); + _tmp$21 = 1; + Properties.copy(p, _tmp$20); + sz = _tmp$21; + return [p, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); + c2$1 = s.charCodeAt(2); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = new Properties.ptr(0, 0); + _tmp$23 = 1; + Properties.copy(p, _tmp$22); + sz = _tmp$23; + return [p, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = new Properties.ptr(0, 0); + _tmp$25 = 1; + Properties.copy(p, _tmp$24); + sz = _tmp$25; + return [p, sz]; + } + _tmp$26 = new Properties.ptr(trie.lookupValue(((i$2 >>> 0)), c3), 0); + _tmp$27 = 4; + Properties.copy(p, _tmp$26); + sz = _tmp$27; + return [p, sz]; + } + _tmp$28 = new Properties.ptr(0, 0); + _tmp$29 = 1; + Properties.copy(p, _tmp$28); + sz = _tmp$29; + return [p, sz]; + }; + $pkg.LookupString = LookupString; + newBidiTrie = function(i) { + var i; + return new bidiTrie.ptr(); + }; + bidiTrie.ptr.prototype.lookupValue = function(n, b) { + var b, n, t, x; + t = this; + return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[x]))); + }; + bidiTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; + Properties.methods = [{prop: "Class", name: "Class", pkg: "", typ: $funcType([], [Class], false)}, {prop: "IsBracket", name: "IsBracket", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsOpeningBracket", name: "IsOpeningBracket", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "reverseBracket", name: "reverseBracket", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([$Int32], [$Int32], false)}]; + ptrType$11.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([sliceType$8], [$Uint8, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([sliceType$8], [$Uint8], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([$String], [$Uint8, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([$String], [$Uint8], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([$Uint32, $Uint8], [$Uint8], false)}]; + Class.methods = [{prop: "in$", name: "in", pkg: "vendor/golang_org/x/text/unicode/bidi", typ: $funcType([sliceType$2], [$Bool], true)}]; + Properties.init("vendor/golang_org/x/text/unicode/bidi", [{prop: "entry", name: "entry", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + bidiTrie.init("", []); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = list.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = log.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + trie = newBidiTrie(0); + bidiValues = $toNativeArray($kindUint8, [11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 7, 8, 9, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7, 7, 8, 9, 10, 10, 4, 4, 4, 10, 10, 58, 42, 10, 3, 6, 3, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 10, 4, 4, 4, 4, 10, 10, 10, 10, 0, 10, 10, 11, 10, 10, 4, 4, 2, 2, 10, 0, 10, 10, 10, 2, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 10, 4, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 12, 1, 12, 12, 1, 12, 12, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 10, 10, 13, 4, 4, 13, 6, 13, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 13, 13, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 5, 10, 12, 12, 12, 12, 12, 12, 13, 13, 12, 12, 10, 12, 12, 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 12, 12, 12, 1, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 0, 0, 12, 12, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 4, 10, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 12, 58, 42, 58, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 0, 0, 0, 12, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 0, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 7, 14, 14, 14, 14, 14, 6, 4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 14, 14, 14, 14, 11, 11, 11, 11, 11, 11, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 10, 154, 138, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 10, 154, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 10, 10, 10, 10, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 10, 0, 10, 0, 10, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 3, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 122, 106, 154, 138, 186, 170, 154, 138, 122, 106, 218, 42, 58, 202, 154, 138, 122, 106, 154, 138, 186, 170, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 9, 10, 10, 10, 10, 0, 0, 0, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 10, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 10, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 6, 0, 10, 6, 10, 10, 10, 154, 138, 122, 106, 154, 138, 4, 10, 10, 3, 3, 10, 10, 10, 0, 10, 4, 4, 10, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 11, 0, 10, 10, 4, 4, 4, 10, 10, 58, 42, 10, 3, 6, 3, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 250, 234, 10, 58, 42, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 10, 10, 10, 4, 4, 0, 10, 10, 10, 10, 10, 10, 10, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 11, 11, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 12, 12, 1, 1, 1, 1, 1, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 12, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 12, 12, 12, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]); + bidiIndex = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 0, 0, 9, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 8, 17, 18, 18, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 28, 30, 31, 32, 33, 34, 35, 36, 26, 37, 38, 39, 0, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 56, 57, 58, 59, 60, 0, 61, 0, 62, 63, 0, 64, 65, 66, 67, 0, 68, 69, 70, 71, 72, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 84, 84, 84, 86, 87, 88, 84, 89, 90, 91, 92, 84, 84, 84, 84, 84, 84, 93, 84, 84, 94, 84, 95, 0, 0, 0, 0, 84, 84, 96, 97, 84, 84, 84, 84, 84, 98, 99, 100, 0, 0, 0, 101, 0, 102, 0, 103, 104, 105, 106, 107, 84, 84, 84, 108, 109, 0, 110, 111, 0, 0, 0, 112, 113, 114, 115, 116, 0, 117, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 120, 0, 0, 0, 0, 121, 122, 123, 124, 125, 0, 126, 0, 127, 128, 0, 129, 130, 131, 132, 133, 134, 135, 136, 137, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 140, 14, 14, 14, 14, 14, 14, 141, 14, 14, 142, 143, 144, 14, 145, 146, 147, 0, 148, 0, 0, 0, 0, 149, 84, 150, 151, 0, 0, 0, 152, 0, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 154, 154, 154, 155, 154, 154, 154, 156, 154, 154, 157, 158, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 159, 154, 154, 154, 154, 154, 154, 160, 161, 162, 0, 163, 164, 165, 166, 167, 0, 0, 168, 169, 170, 0, 0, 171, 172, 173, 174, 0, 0, 175, 176, 177, 178, 179, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 182, 183, 0, 0, 0, 0, 0, 184, 0, 185, 0, 186, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 193, 0, 84, 194, 0, 0, 84, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, 198, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 201, 202, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 154, 154, 205, 154, 206, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 14, 14, 14, 207, 154, 154, 154, 154, 208, 84, 209, 210, 211, 212, 0, 0, 0, 213, 0, 0, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 214, 84, 107, 84, 215, 216, 217, 218, 0, 219, 220, 221, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 0, 0, 0, 11, 0, 0, 0, 0, 12, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 224, 224, 224, 224, 5, 5, 5, 225, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + controlByteToClass = $toNativeArray($kindUint, [0, 0, 0, 0, 0, 0, 21, 22, 23, 24, 18, 19, 20, 16, 17, 0]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/text/secure/bidirule"] = (function() { + var $pkg = {}, $init, errors, utf8, transform, bidi, ruleState, ruleTransition, Transformer, arrayType, arrayType$1, sliceType, ptrType, transitions, asciiTable, DirectionString, ValidString, init; + errors = $packages["errors"]; + utf8 = $packages["unicode/utf8"]; + transform = $packages["vendor/golang_org/x/text/transform"]; + bidi = $packages["vendor/golang_org/x/text/unicode/bidi"]; + ruleState = $pkg.ruleState = $newType(1, $kindUint8, "bidirule.ruleState", true, "vendor/golang_org/x/text/secure/bidirule", false, null); + ruleTransition = $pkg.ruleTransition = $newType(0, $kindStruct, "bidirule.ruleTransition", true, "vendor/golang_org/x/text/secure/bidirule", false, function(next_, mask_) { + this.$val = this; + if (arguments.length === 0) { + this.next = 0; + this.mask = 0; + return; + } + this.next = next_; + this.mask = mask_; + }); + Transformer = $pkg.Transformer = $newType(0, $kindStruct, "bidirule.Transformer", true, "vendor/golang_org/x/text/secure/bidirule", true, function(state_, hasRTL_, seen_) { + this.$val = this; + if (arguments.length === 0) { + this.state = 0; + this.hasRTL = false; + this.seen = 0; + return; + } + this.state = state_; + this.hasRTL = hasRTL_; + this.seen = seen_; + }); + arrayType = $arrayType(bidi.Properties, 128); + arrayType$1 = $arrayType(ruleTransition, 2); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(Transformer); + DirectionString = function(s) { + var _tuple, c, e, i, s, sz; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _tuple = bidi.LookupString($substring(s, i)); + e = $clone(_tuple[0], bidi.Properties); + sz = _tuple[1]; + if (sz === 0) { + i = i + (1) >> 0; + continue; + } + c = $clone(e, bidi.Properties).Class(); + if ((c === 1) || (c === 13) || (c === 5)) { + return 1; + } + i = i + (sz) >> 0; + } + return 0; + }; + $pkg.DirectionString = DirectionString; + ValidString = function(s) { + var _tuple, n, ok, s, t; + t = new Transformer.ptr(0, false, 0); + _tuple = t.advanceString(s); + n = _tuple[0]; + ok = _tuple[1]; + if (!ok || n < s.length) { + return false; + } + return t.isFinal(); + }; + $pkg.ValidString = ValidString; + Transformer.ptr.prototype.isRTL = function() { + var t; + t = this; + return !((((t.seen & 8226) >>> 0) === 0)); + }; + Transformer.prototype.isRTL = function() { return this.$val.isRTL(); }; + Transformer.ptr.prototype.isFinal = function() { + var t; + t = this; + return (t.state === 2) || (t.state === 4) || (t.state === 0); + }; + Transformer.prototype.isFinal = function() { return this.$val.isFinal(); }; + Transformer.ptr.prototype.Reset = function() { + var t; + t = this; + Transformer.copy(t, new Transformer.ptr(0, false, 0)); + }; + Transformer.prototype.Reset = function() { return this.$val.Reset(); }; + Transformer.ptr.prototype.Transform = function(dst, src, atEOF) { + var _tmp, _tmp$1, _tmp$2, _tuple, atEOF, dst, err, err1, n, nDst, nSrc, src, t; + nDst = 0; + nSrc = 0; + err = $ifaceNil; + t = this; + if (dst.$length < src.$length) { + src = $subslice(src, 0, dst.$length); + atEOF = false; + err = transform.ErrShortDst; + } + _tuple = t.Span(src, atEOF); + n = _tuple[0]; + err1 = _tuple[1]; + $copySlice(dst, $subslice(src, 0, n)); + if ($interfaceIsEqual(err, $ifaceNil) || !($interfaceIsEqual(err1, $ifaceNil)) && !($interfaceIsEqual(err1, transform.ErrShortSrc))) { + err = err1; + } + _tmp = n; + _tmp$1 = n; + _tmp$2 = err; + nDst = _tmp; + nSrc = _tmp$1; + err = _tmp$2; + return [nDst, nSrc, err]; + }; + Transformer.prototype.Transform = function(dst, src, atEOF) { return this.$val.Transform(dst, src, atEOF); }; + Transformer.ptr.prototype.Span = function(src, atEOF) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, atEOF, err, n, ok, src, t; + n = 0; + err = $ifaceNil; + t = this; + if ((t.state === 5) && t.isRTL()) { + _tmp = 0; + _tmp$1 = $pkg.ErrInvalid; + n = _tmp; + err = _tmp$1; + return [n, err]; + } + _tuple = t.advance(src); + n = _tuple[0]; + ok = _tuple[1]; + switch (0) { default: + if (!ok) { + err = $pkg.ErrInvalid; + } else if (n < src.$length) { + if (!atEOF) { + err = transform.ErrShortSrc; + break; + } + err = $pkg.ErrInvalid; + } else if (!t.isFinal()) { + err = $pkg.ErrInvalid; + } + } + _tmp$2 = n; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + return [n, err]; + }; + Transformer.prototype.Span = function(src, atEOF) { return this.$val.Span(src, atEOF); }; + init = function() { + var _i, _ref, _tuple, i, p; + _ref = asciiTable; + _i = 0; + while (true) { + if (!(_i < 128)) { break; } + i = _i; + _tuple = bidi.LookupRune(((i >> 0))); + p = $clone(_tuple[0], bidi.Properties); + bidi.Properties.copy(((i < 0 || i >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[i]), p); + _i++; + } + }; + Transformer.ptr.prototype.advance = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, e, n, ok, s, sz, t, tr, x, x$1, y; + n = 0; + ok = false; + t = this; + e = new bidi.Properties.ptr(0, 0); + sz = 0; + while (true) { + if (!(n < s.$length)) { break; } + if (((n < 0 || n >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + n]) < 128) { + _tmp = $clone((x = ((n < 0 || n >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + n]), ((x < 0 || x >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[x])), bidi.Properties); + _tmp$1 = 1; + bidi.Properties.copy(e, _tmp); + sz = _tmp$1; + } else { + _tuple = bidi.Lookup($subslice(s, n)); + bidi.Properties.copy(e, _tuple[0]); + sz = _tuple[1]; + if (sz <= 1) { + if (sz === 1) { + _tmp$2 = n; + _tmp$3 = false; + n = _tmp$2; + ok = _tmp$3; + return [n, ok]; + } + _tmp$4 = n; + _tmp$5 = true; + n = _tmp$4; + ok = _tmp$5; + return [n, ok]; + } + } + c = (((y = $clone(e, bidi.Properties).Class(), y < 32 ? (1 << y) : 0) << 16 >>> 16)); + t.seen = (t.seen | (c)) >>> 0; + if (((t.seen & 36) >>> 0) === 36) { + t.state = 5; + _tmp$6 = n; + _tmp$7 = false; + n = _tmp$6; + ok = _tmp$7; + return [n, ok]; + } + tr = $clone((x$1 = t.state, ((x$1 < 0 || x$1 >= transitions.length) ? ($throwRuntimeError("index out of range"), undefined) : transitions[x$1])), arrayType$1); + if (!((((tr[0].mask & c) >>> 0) === 0))) { + t.state = tr[0].next; + } else if (!((((tr[1].mask & c) >>> 0) === 0))) { + t.state = tr[1].next; + } else { + t.state = 5; + if (t.isRTL()) { + _tmp$8 = n; + _tmp$9 = false; + n = _tmp$8; + ok = _tmp$9; + return [n, ok]; + } + } + n = n + (sz) >> 0; + } + _tmp$10 = n; + _tmp$11 = true; + n = _tmp$10; + ok = _tmp$11; + return [n, ok]; + }; + Transformer.prototype.advance = function(s) { return this.$val.advance(s); }; + Transformer.ptr.prototype.advanceString = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, e, n, ok, s, sz, t, tr, x, x$1, y; + n = 0; + ok = false; + t = this; + e = new bidi.Properties.ptr(0, 0); + sz = 0; + while (true) { + if (!(n < s.length)) { break; } + if (s.charCodeAt(n) < 128) { + _tmp = $clone((x = s.charCodeAt(n), ((x < 0 || x >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[x])), bidi.Properties); + _tmp$1 = 1; + bidi.Properties.copy(e, _tmp); + sz = _tmp$1; + } else { + _tuple = bidi.LookupString($substring(s, n)); + bidi.Properties.copy(e, _tuple[0]); + sz = _tuple[1]; + if (sz <= 1) { + if (sz === 1) { + _tmp$2 = n; + _tmp$3 = false; + n = _tmp$2; + ok = _tmp$3; + return [n, ok]; + } + _tmp$4 = n; + _tmp$5 = true; + n = _tmp$4; + ok = _tmp$5; + return [n, ok]; + } + } + c = (((y = $clone(e, bidi.Properties).Class(), y < 32 ? (1 << y) : 0) << 16 >>> 16)); + t.seen = (t.seen | (c)) >>> 0; + if (((t.seen & 36) >>> 0) === 36) { + t.state = 5; + _tmp$6 = n; + _tmp$7 = false; + n = _tmp$6; + ok = _tmp$7; + return [n, ok]; + } + tr = $clone((x$1 = t.state, ((x$1 < 0 || x$1 >= transitions.length) ? ($throwRuntimeError("index out of range"), undefined) : transitions[x$1])), arrayType$1); + if (!((((tr[0].mask & c) >>> 0) === 0))) { + t.state = tr[0].next; + } else if (!((((tr[1].mask & c) >>> 0) === 0))) { + t.state = tr[1].next; + } else { + t.state = 5; + if (t.isRTL()) { + _tmp$8 = n; + _tmp$9 = false; + n = _tmp$8; + ok = _tmp$9; + return [n, ok]; + } + } + n = n + (sz) >> 0; + } + _tmp$10 = n; + _tmp$11 = true; + n = _tmp$10; + ok = _tmp$11; + return [n, ok]; + }; + Transformer.prototype.advanceString = function(s) { return this.$val.advanceString(s); }; + ptrType.methods = [{prop: "isRTL", name: "isRTL", pkg: "vendor/golang_org/x/text/secure/bidirule", typ: $funcType([], [$Bool], false)}, {prop: "isFinal", name: "isFinal", pkg: "vendor/golang_org/x/text/secure/bidirule", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Transform", name: "Transform", pkg: "", typ: $funcType([sliceType, sliceType, $Bool], [$Int, $Int, $error], false)}, {prop: "Span", name: "Span", pkg: "", typ: $funcType([sliceType, $Bool], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "vendor/golang_org/x/text/secure/bidirule", typ: $funcType([sliceType], [$Int, $Bool], false)}, {prop: "advanceString", name: "advanceString", pkg: "vendor/golang_org/x/text/secure/bidirule", typ: $funcType([$String], [$Int, $Bool], false)}]; + ruleTransition.init("vendor/golang_org/x/text/secure/bidirule", [{prop: "next", name: "next", embedded: false, exported: false, typ: ruleState, tag: ""}, {prop: "mask", name: "mask", embedded: false, exported: false, typ: $Uint16, tag: ""}]); + Transformer.init("vendor/golang_org/x/text/secure/bidirule", [{prop: "state", name: "state", embedded: false, exported: false, typ: ruleState, tag: ""}, {prop: "hasRTL", name: "hasRTL", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "seen", name: "seen", embedded: false, exported: false, typ: $Uint16, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = transform.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bidi.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + asciiTable = arrayType.zero(); + $pkg.ErrInvalid = errors.New("bidirule: failed Bidi Rule"); + transitions = $toNativeArray($kindArray, [$toNativeArray($kindStruct, [new ruleTransition.ptr(2, 1), new ruleTransition.ptr(4, 8194)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(2, 5), new ruleTransition.ptr(1, 7256)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(2, 4101), new ruleTransition.ptr(1, 3160)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(4, 8230), new ruleTransition.ptr(3, 7256)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(4, 12326), new ruleTransition.ptr(3, 3160)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(5, 0), new ruleTransition.ptr(5, 0)])]); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/text/unicode/norm"] = (function() { + var $pkg = {}, $init, fmt, io, utf8, transform, ssState, streamSafe, reorderBuffer, insertErr, Properties, lookupFunc, formInfo, qcInfo, input, Iter, iterFunc, Form, normWriter, normReader, nfcTrie, nfkcTrie, valueRange, sparseBlocks, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, sliceType$4, sliceType$5, ptrType$1, sliceType$6, arrayType, arrayType$1, arrayType$2, ptrType$2, funcType, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, formTable, ccc, decomps, nfcValues, nfcIndex, nfcSparseOffset, nfcSparseValues, nfkcValues, nfkcIndex, nfkcSparseOffset, nfkcSparseValues, recompMap, errs, nfcSparse, nfkcSparse, nfcData, nfkcData, appendFlush, isHangul, isHangulString, isJamoVT, decomposeHangul, combine, lookupInfoNFC, lookupInfoNFKC, compInfo, inputBytes, inputString, nextASCIIBytes, nextASCIIString, nextHangul, nextDone, nextMulti, nextMultiNorm, nextDecomposed, doNormDecomposed, nextCGJDecompose, nextComposed, doNormComposed, nextCGJCompose, cmpNormalBytes, patchTail, appendQuick, doAppend, doAppendInner, lastBoundary, decomposeSegment, lastRuneStart, decomposeToLastBoundary, newNfcTrie, newNfkcTrie, flushTransform; + fmt = $packages["fmt"]; + io = $packages["io"]; + utf8 = $packages["unicode/utf8"]; + transform = $packages["vendor/golang_org/x/text/transform"]; + ssState = $pkg.ssState = $newType(4, $kindInt, "norm.ssState", true, "vendor/golang_org/x/text/unicode/norm", false, null); + streamSafe = $pkg.streamSafe = $newType(1, $kindUint8, "norm.streamSafe", true, "vendor/golang_org/x/text/unicode/norm", false, null); + reorderBuffer = $pkg.reorderBuffer = $newType(0, $kindStruct, "norm.reorderBuffer", true, "vendor/golang_org/x/text/unicode/norm", false, function(rune_, byte$1_, nbyte_, ss_, nrune_, f_, src_, nsrc_, tmpBytes_, out_, flushF_) { + this.$val = this; + if (arguments.length === 0) { + this.rune = arrayType.zero(); + this.byte$1 = arrayType$1.zero(); + this.nbyte = 0; + this.ss = 0; + this.nrune = 0; + this.f = new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError); + this.src = new input.ptr("", sliceType$4.nil); + this.nsrc = 0; + this.tmpBytes = new input.ptr("", sliceType$4.nil); + this.out = sliceType$4.nil; + this.flushF = $throwNilPointerError; + return; + } + this.rune = rune_; + this.byte$1 = byte$1_; + this.nbyte = nbyte_; + this.ss = ss_; + this.nrune = nrune_; + this.f = f_; + this.src = src_; + this.nsrc = nsrc_; + this.tmpBytes = tmpBytes_; + this.out = out_; + this.flushF = flushF_; + }); + insertErr = $pkg.insertErr = $newType(4, $kindInt, "norm.insertErr", true, "vendor/golang_org/x/text/unicode/norm", false, null); + Properties = $pkg.Properties = $newType(0, $kindStruct, "norm.Properties", true, "vendor/golang_org/x/text/unicode/norm", true, function(pos_, size_, ccc_, tccc_, nLead_, flags_, index_) { + this.$val = this; + if (arguments.length === 0) { + this.pos = 0; + this.size = 0; + this.ccc = 0; + this.tccc = 0; + this.nLead = 0; + this.flags = 0; + this.index = 0; + return; + } + this.pos = pos_; + this.size = size_; + this.ccc = ccc_; + this.tccc = tccc_; + this.nLead = nLead_; + this.flags = flags_; + this.index = index_; + }); + lookupFunc = $pkg.lookupFunc = $newType(4, $kindFunc, "norm.lookupFunc", true, "vendor/golang_org/x/text/unicode/norm", false, null); + formInfo = $pkg.formInfo = $newType(0, $kindStruct, "norm.formInfo", true, "vendor/golang_org/x/text/unicode/norm", false, function(form_, composing_, compatibility_, info_, nextMain_) { + this.$val = this; + if (arguments.length === 0) { + this.form = 0; + this.composing = false; + this.compatibility = false; + this.info = $throwNilPointerError; + this.nextMain = $throwNilPointerError; + return; + } + this.form = form_; + this.composing = composing_; + this.compatibility = compatibility_; + this.info = info_; + this.nextMain = nextMain_; + }); + qcInfo = $pkg.qcInfo = $newType(1, $kindUint8, "norm.qcInfo", true, "vendor/golang_org/x/text/unicode/norm", false, null); + input = $pkg.input = $newType(0, $kindStruct, "norm.input", true, "vendor/golang_org/x/text/unicode/norm", false, function(str_, bytes_) { + this.$val = this; + if (arguments.length === 0) { + this.str = ""; + this.bytes = sliceType$4.nil; + return; + } + this.str = str_; + this.bytes = bytes_; + }); + Iter = $pkg.Iter = $newType(0, $kindStruct, "norm.Iter", true, "vendor/golang_org/x/text/unicode/norm", true, function(rb_, buf_, info_, next_, asciiF_, p_, multiSeg_) { + this.$val = this; + if (arguments.length === 0) { + this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + this.buf = arrayType$1.zero(); + this.info = new Properties.ptr(0, 0, 0, 0, 0, 0, 0); + this.next = $throwNilPointerError; + this.asciiF = $throwNilPointerError; + this.p = 0; + this.multiSeg = sliceType$4.nil; + return; + } + this.rb = rb_; + this.buf = buf_; + this.info = info_; + this.next = next_; + this.asciiF = asciiF_; + this.p = p_; + this.multiSeg = multiSeg_; + }); + iterFunc = $pkg.iterFunc = $newType(4, $kindFunc, "norm.iterFunc", true, "vendor/golang_org/x/text/unicode/norm", false, null); + Form = $pkg.Form = $newType(4, $kindInt, "norm.Form", true, "vendor/golang_org/x/text/unicode/norm", true, null); + normWriter = $pkg.normWriter = $newType(0, $kindStruct, "norm.normWriter", true, "vendor/golang_org/x/text/unicode/norm", false, function(rb_, w_, buf_) { + this.$val = this; + if (arguments.length === 0) { + this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + this.w = $ifaceNil; + this.buf = sliceType$4.nil; + return; + } + this.rb = rb_; + this.w = w_; + this.buf = buf_; + }); + normReader = $pkg.normReader = $newType(0, $kindStruct, "norm.normReader", true, "vendor/golang_org/x/text/unicode/norm", false, function(rb_, r_, inbuf_, outbuf_, bufStart_, lastBoundary_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + this.r = $ifaceNil; + this.inbuf = sliceType$4.nil; + this.outbuf = sliceType$4.nil; + this.bufStart = 0; + this.lastBoundary = 0; + this.err = $ifaceNil; + return; + } + this.rb = rb_; + this.r = r_; + this.inbuf = inbuf_; + this.outbuf = outbuf_; + this.bufStart = bufStart_; + this.lastBoundary = lastBoundary_; + this.err = err_; + }); + nfcTrie = $pkg.nfcTrie = $newType(0, $kindStruct, "norm.nfcTrie", true, "vendor/golang_org/x/text/unicode/norm", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + nfkcTrie = $pkg.nfkcTrie = $newType(0, $kindStruct, "norm.nfkcTrie", true, "vendor/golang_org/x/text/unicode/norm", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + valueRange = $pkg.valueRange = $newType(0, $kindStruct, "norm.valueRange", true, "vendor/golang_org/x/text/unicode/norm", false, function(value_, lo_, hi_) { + this.$val = this; + if (arguments.length === 0) { + this.value = 0; + this.lo = 0; + this.hi = 0; + return; + } + this.value = value_; + this.lo = lo_; + this.hi = hi_; + }); + sparseBlocks = $pkg.sparseBlocks = $newType(0, $kindStruct, "norm.sparseBlocks", true, "vendor/golang_org/x/text/unicode/norm", false, function(values_, offset_) { + this.$val = this; + if (arguments.length === 0) { + this.values = sliceType$2.nil; + this.offset = sliceType.nil; + return; + } + this.values = values_; + this.offset = offset_; + }); + sliceType = $sliceType($Uint16); + sliceType$1 = $sliceType($error); + sliceType$2 = $sliceType(valueRange); + ptrType = $ptrType(formInfo); + sliceType$3 = $sliceType(ptrType); + sliceType$4 = $sliceType($Uint8); + sliceType$5 = $sliceType(Properties); + ptrType$1 = $ptrType(streamSafe); + sliceType$6 = $sliceType($emptyInterface); + arrayType = $arrayType(Properties, 32); + arrayType$1 = $arrayType($Uint8, 128); + arrayType$2 = $arrayType(Properties, 31); + ptrType$2 = $ptrType(reorderBuffer); + funcType = $funcType([ptrType$2], [$Bool], false); + ptrType$3 = $ptrType(input); + ptrType$4 = $ptrType(Iter); + ptrType$5 = $ptrType(normWriter); + ptrType$6 = $ptrType(normReader); + ptrType$7 = $ptrType(nfcTrie); + ptrType$8 = $ptrType(nfkcTrie); + ptrType$9 = $ptrType(sparseBlocks); + $ptrType(streamSafe).prototype.first = function(p) { + var p, ss; + ss = this; + ss.$set((($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24))); + }; + $ptrType(streamSafe).prototype.next = function(p) { + var n, p, ss; + ss = this; + if (ss.$get() > 30) { + $panic(new $String("streamSafe was not reset")); + } + n = $clone(p, Properties).nLeadingNonStarters(); + ss.$set(ss.$get() + (((n << 24 >>> 24))) << 24 >>> 24); + if (ss.$get() > 30) { + ss.$set(0); + return 2; + } + if (n === 0) { + ss.$set((($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24))); + return 1; + } + return 0; + }; + $ptrType(streamSafe).prototype.backwards = function(p) { + var c, p, ss; + ss = this; + if (ss.$get() > 30) { + $panic(new $String("streamSafe was not reset")); + } + c = ss.$get() + (($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24)) << 24 >>> 24; + if (c > 30) { + return 2; + } + ss.$set(c); + if ($clone(p, Properties).nLeadingNonStarters() === 0) { + return 1; + } + return 0; + }; + streamSafe.prototype.isMax = function() { + var ss; + ss = this.$val; + return ss === 30; + }; + $ptrType(streamSafe).prototype.isMax = function() { return new streamSafe(this.$get()).isMax(); }; + reorderBuffer.ptr.prototype.init = function(f, src) { + var f, rb, src; + rb = this; + formInfo.copy(rb.f, ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f])); + rb.src.setBytes(src); + rb.nsrc = src.$length; + rb.ss = 0; + }; + reorderBuffer.prototype.init = function(f, src) { return this.$val.init(f, src); }; + reorderBuffer.ptr.prototype.initString = function(f, src) { + var f, rb, src; + rb = this; + formInfo.copy(rb.f, ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f])); + rb.src.setString(src); + rb.nsrc = src.length; + rb.ss = 0; + }; + reorderBuffer.prototype.initString = function(f, src) { return this.$val.initString(f, src); }; + reorderBuffer.ptr.prototype.setFlusher = function(out, f) { + var f, out, rb; + rb = this; + rb.out = out; + rb.flushF = f; + }; + reorderBuffer.prototype.setFlusher = function(out, f) { return this.$val.setFlusher(out, f); }; + reorderBuffer.ptr.prototype.reset = function() { + var rb; + rb = this; + rb.nrune = 0; + rb.nbyte = 0; + }; + reorderBuffer.prototype.reset = function() { return this.$val.reset(); }; + reorderBuffer.ptr.prototype.doFlush = function() { + var _r, rb, res, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; rb = $f.rb; res = $f.res; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = this; + if (rb.f.composing) { + rb.compose(); + } + _r = rb.flushF(rb); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + res = _r; + rb.reset(); + $s = -1; return res; + /* */ } return; } if ($f === undefined) { $f = { $blk: reorderBuffer.ptr.prototype.doFlush }; } $f._r = _r; $f.rb = rb; $f.res = res; $f.$s = $s; $f.$r = $r; return $f; + }; + reorderBuffer.prototype.doFlush = function() { return this.$val.doFlush(); }; + appendFlush = function(rb) { + var end, i, rb, start, x, x$1; + i = 0; + while (true) { + if (!(i < rb.nrune)) { break; } + start = (x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])).pos; + end = start + (x$1 = rb.rune, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])).size << 24 >>> 24; + rb.out = $appendSlice(rb.out, $subslice(new sliceType$4(rb.byte$1), start, end)); + i = i + (1) >> 0; + } + return true; + }; + reorderBuffer.ptr.prototype.flushCopy = function(buf) { + var buf, i, p, rb, runep, x; + rb = this; + p = 0; + i = 0; + while (true) { + if (!(i < rb.nrune)) { break; } + runep = $clone((x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); + p = p + ($copySlice($subslice(buf, p), $subslice(new sliceType$4(rb.byte$1), runep.pos, (runep.pos + runep.size << 24 >>> 24)))) >> 0; + i = i + (1) >> 0; + } + rb.reset(); + return p; + }; + reorderBuffer.prototype.flushCopy = function(buf) { return this.$val.flushCopy(buf); }; + reorderBuffer.ptr.prototype.insertOrdered = function(info) { + var b, cc, info, n, pos, rb, x, x$1; + rb = this; + n = rb.nrune; + b = new sliceType$5(rb.rune); + cc = info.ccc; + if (cc > 0) { + while (true) { + if (!(n > 0)) { break; } + if ((x = n - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc <= cc) { + break; + } + Properties.copy(((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n]), (x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$1]))); + n = n - (1) >> 0; + } + } + rb.nrune = rb.nrune + (1) >> 0; + pos = (rb.nbyte); + rb.nbyte = rb.nbyte + (4) << 24 >>> 24; + info.pos = pos; + Properties.copy(((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n]), info); + }; + reorderBuffer.prototype.insertOrdered = function(info) { return this.$val.insertOrdered(info); }; + reorderBuffer.ptr.prototype.insertFlush = function(src, i, info) { + var _r, i, info, rb, rune, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; info = $f.info; rb = $f.rb; rune = $f.rune; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = this; + rune = src.hangul(i); + if (!((rune === 0))) { + rb.decomposeHangul(rune); + $s = -1; return 0; + } + /* */ if ($clone(info, Properties).hasDecomposition()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($clone(info, Properties).hasDecomposition()) { */ case 1: + _r = rb.insertDecomposed($clone(info, Properties).Decomposition()); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } */ case 2: + rb.insertSingle($clone(src, input), i, $clone(info, Properties)); + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: reorderBuffer.ptr.prototype.insertFlush }; } $f._r = _r; $f.i = i; $f.info = info; $f.rb = rb; $f.rune = rune; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + reorderBuffer.prototype.insertFlush = function(src, i, info) { return this.$val.insertFlush(src, i, info); }; + reorderBuffer.ptr.prototype.insertUnsafe = function(src, i, info) { + var _r, i, info, rb, rune, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; info = $f.info; rb = $f.rb; rune = $f.rune; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = this; + rune = src.hangul(i); + if (!((rune === 0))) { + rb.decomposeHangul(rune); + } + /* */ if ($clone(info, Properties).hasDecomposition()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($clone(info, Properties).hasDecomposition()) { */ case 1: + _r = rb.insertDecomposed($clone(info, Properties).Decomposition()); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r; + $s = 3; continue; + /* } else { */ case 2: + rb.insertSingle($clone(src, input), i, $clone(info, Properties)); + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: reorderBuffer.ptr.prototype.insertUnsafe }; } $f._r = _r; $f.i = i; $f.info = info; $f.rb = rb; $f.rune = rune; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + reorderBuffer.prototype.insertUnsafe = function(src, i, info) { return this.$val.insertUnsafe(src, i, info); }; + reorderBuffer.ptr.prototype.insertDecomposed = function(dcomp) { + var _r, _r$1, _v, dcomp, i, info, rb, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _v = $f._v; dcomp = $f.dcomp; i = $f.i; info = $f.info; rb = $f.rb; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = this; + rb.tmpBytes.setBytes(dcomp); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < dcomp.$length)) { break; } */ if(!(i < dcomp.$length)) { $s = 2; continue; } + _r = rb.f.info($clone(rb.tmpBytes, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if (!($clone(info, Properties).BoundaryBefore() && rb.nrune > 0)) { _v = false; $s = 6; continue s; } + _r$1 = rb.doFlush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = !_r$1; case 6: + /* */ if (_v) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_v) { */ case 4: + $s = -1; return -1; + /* } */ case 5: + i = i + ($copySlice($subslice(new sliceType$4(rb.byte$1), rb.nbyte), $subslice(dcomp, i, (i + ((info.size >> 0)) >> 0)))) >> 0; + rb.insertOrdered($clone(info, Properties)); + /* } */ $s = 1; continue; case 2: + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: reorderBuffer.ptr.prototype.insertDecomposed }; } $f._r = _r; $f._r$1 = _r$1; $f._v = _v; $f.dcomp = dcomp; $f.i = i; $f.info = info; $f.rb = rb; $f.$s = $s; $f.$r = $r; return $f; + }; + reorderBuffer.prototype.insertDecomposed = function(dcomp) { return this.$val.insertDecomposed(dcomp); }; + reorderBuffer.ptr.prototype.insertSingle = function(src, i, info) { + var i, info, rb, src; + rb = this; + src.copySlice($subslice(new sliceType$4(rb.byte$1), rb.nbyte), i, i + ((info.size >> 0)) >> 0); + rb.insertOrdered($clone(info, Properties)); + }; + reorderBuffer.prototype.insertSingle = function(src, i, info) { return this.$val.insertSingle(src, i, info); }; + reorderBuffer.ptr.prototype.insertCGJ = function() { + var rb; + rb = this; + rb.insertSingle(new input.ptr("\xCD\x8F", sliceType$4.nil), 0, new Properties.ptr(0, 2, 0, 0, 0, 0, 0)); + }; + reorderBuffer.prototype.insertCGJ = function() { return this.$val.insertCGJ(); }; + reorderBuffer.ptr.prototype.appendRune = function(r) { + var bn, r, rb, sz, x, x$1; + rb = this; + bn = rb.nbyte; + sz = utf8.EncodeRune($subslice(new sliceType$4(rb.byte$1), bn), (r)); + rb.nbyte = rb.nbyte + (4) << 24 >>> 24; + Properties.copy((x = rb.rune, x$1 = rb.nrune, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), new Properties.ptr(bn, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0)); + rb.nrune = rb.nrune + (1) >> 0; + }; + reorderBuffer.prototype.appendRune = function(r) { return this.$val.appendRune(r); }; + reorderBuffer.ptr.prototype.assignRune = function(pos, r) { + var bn, pos, r, rb, sz, x, x$1; + rb = this; + bn = (x = rb.rune, ((pos < 0 || pos >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[pos])).pos; + sz = utf8.EncodeRune($subslice(new sliceType$4(rb.byte$1), bn), (r)); + Properties.copy((x$1 = rb.rune, ((pos < 0 || pos >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[pos])), new Properties.ptr(bn, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0)); + }; + reorderBuffer.prototype.assignRune = function(pos, r) { return this.$val.assignRune(pos, r); }; + reorderBuffer.ptr.prototype.runeAt = function(n) { + var _tuple, inf, n, r, rb, x; + rb = this; + inf = $clone((x = rb.rune, ((n < 0 || n >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[n])), Properties); + _tuple = utf8.DecodeRune($subslice(new sliceType$4(rb.byte$1), inf.pos, (inf.pos + inf.size << 24 >>> 24))); + r = _tuple[0]; + return r; + }; + reorderBuffer.prototype.runeAt = function(n) { return this.$val.runeAt(n); }; + reorderBuffer.ptr.prototype.bytesAt = function(n) { + var inf, n, rb, x; + rb = this; + inf = $clone((x = rb.rune, ((n < 0 || n >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[n])), Properties); + return $subslice(new sliceType$4(rb.byte$1), inf.pos, (((inf.pos >> 0)) + ((inf.size >> 0)) >> 0)); + }; + reorderBuffer.prototype.bytesAt = function(n) { return this.$val.bytesAt(n); }; + isHangul = function(b) { + var b, b0, b1; + if (b.$length < 3) { + return false; + } + b0 = (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]); + if (b0 < 234) { + return false; + } + b1 = (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]); + if ((b0 === 234)) { + return b1 >= 176; + } else if (b0 < 237) { + return true; + } else if (b0 > 237) { + return false; + } else if (b1 < 158) { + return true; + } + return (b1 === 158) && (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) < 164; + }; + isHangulString = function(b) { + var b, b0, b1; + if (b.length < 3) { + return false; + } + b0 = b.charCodeAt(0); + if (b0 < 234) { + return false; + } + b1 = b.charCodeAt(1); + if ((b0 === 234)) { + return b1 >= 176; + } else if (b0 < 237) { + return true; + } else if (b0 > 237) { + return false; + } else if (b1 < 158) { + return true; + } + return (b1 === 158) && b.charCodeAt(2) < 164; + }; + isJamoVT = function(b) { + var b; + return ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 225) && (((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) & 252) >>> 0)) === 132); + }; + decomposeHangul = function(buf, r) { + var _q, _q$1, _r, _r$1, buf, r, x; + r = r - (44032) >> 0; + x = (_r = r % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + r = (_q = r / (28), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + utf8.EncodeRune(buf, 4352 + (_q$1 = r / 21, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + utf8.EncodeRune($subslice(buf, 3), 4449 + (_r$1 = r % 21, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0); + if (!((x === 0))) { + utf8.EncodeRune($subslice(buf, 6), 4519 + x >> 0); + return 9; + } + return 6; + }; + reorderBuffer.ptr.prototype.decomposeHangul = function(r) { + var _q, _q$1, _r, _r$1, r, rb, x; + rb = this; + r = r - (44032) >> 0; + x = (_r = r % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + r = (_q = r / (28), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + rb.appendRune(4352 + (_q$1 = r / 21, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + rb.appendRune(4449 + (_r$1 = r % 21, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0); + if (!((x === 0))) { + rb.appendRune(4519 + x >> 0); + } + }; + reorderBuffer.prototype.decomposeHangul = function(r) { return this.$val.decomposeHangul(r); }; + reorderBuffer.ptr.prototype.combineHangul = function(s, i, k) { + var _r, b, bn, cccB, cccC, i, k, l, rb, s, v, x; + rb = this; + b = new sliceType$5(rb.rune); + bn = rb.nrune; + while (true) { + if (!(i < bn)) { break; } + cccB = (x = k - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc; + cccC = ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]).ccc; + if (cccB === 0) { + s = k - 1 >> 0; + } + if (!((s === (k - 1 >> 0))) && cccB >= cccC) { + Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); + k = k + (1) >> 0; + } else { + l = rb.runeAt(s); + v = rb.runeAt(i); + if (4352 <= l && l < 4371 && 4449 <= v && v < 4470) { + rb.assignRune(s, (44032 + ($imul(((l - 4352 >> 0)), 588)) >> 0) + ($imul(((v - 4449 >> 0)), 28)) >> 0); + } else if (44032 <= l && l < 55204 && 4519 < v && v < 4547 && (((_r = ((l - 44032 >> 0)) % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) === 0)) { + rb.assignRune(s, (l + v >> 0) - 4519 >> 0); + } else { + Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); + k = k + (1) >> 0; + } + } + i = i + (1) >> 0; + } + rb.nrune = k; + }; + reorderBuffer.prototype.combineHangul = function(s, i, k) { return this.$val.combineHangul(s, i, k); }; + reorderBuffer.ptr.prototype.compose = function() { + var _tmp, _tmp$1, b, blocked, bn, cccB, cccC, combined, i, ii, k, rb, s, x; + rb = this; + bn = rb.nrune; + if (bn === 0) { + return; + } + k = 1; + b = new sliceType$5(rb.rune); + _tmp = 0; + _tmp$1 = 1; + s = _tmp; + i = _tmp$1; + while (true) { + if (!(i < bn)) { break; } + if (isJamoVT(rb.bytesAt(i))) { + rb.combineHangul(s, i, k); + return; + } + ii = $clone(((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]), Properties); + if ($clone(ii, Properties).combinesBackward()) { + cccB = (x = k - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc; + cccC = ii.ccc; + blocked = false; + if (cccB === 0) { + s = k - 1 >> 0; + } else { + blocked = !((s === (k - 1 >> 0))) && cccB >= cccC; + } + if (!blocked) { + combined = combine(rb.runeAt(s), rb.runeAt(i)); + if (!((combined === 0))) { + rb.assignRune(s, combined); + i = i + (1) >> 0; + continue; + } + } + } + Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); + k = k + (1) >> 0; + i = i + (1) >> 0; + } + rb.nrune = k; + }; + reorderBuffer.prototype.compose = function() { return this.$val.compose(); }; + Properties.ptr.prototype.BoundaryBefore = function() { + var p; + p = this; + if ((p.ccc === 0) && !$clone(p, Properties).combinesBackward()) { + return true; + } + return false; + }; + Properties.prototype.BoundaryBefore = function() { return this.$val.BoundaryBefore(); }; + Properties.ptr.prototype.BoundaryAfter = function() { + var p; + p = this; + return $clone(p, Properties).isInert(); + }; + Properties.prototype.BoundaryAfter = function() { return this.$val.BoundaryAfter(); }; + Properties.ptr.prototype.isYesC = function() { + var p; + p = this; + return ((p.flags & 16) >>> 0) === 0; + }; + Properties.prototype.isYesC = function() { return this.$val.isYesC(); }; + Properties.ptr.prototype.isYesD = function() { + var p; + p = this; + return ((p.flags & 4) >>> 0) === 0; + }; + Properties.prototype.isYesD = function() { return this.$val.isYesD(); }; + Properties.ptr.prototype.combinesBackward = function() { + var p; + p = this; + return !((((p.flags & 8) >>> 0) === 0)); + }; + Properties.prototype.combinesBackward = function() { return this.$val.combinesBackward(); }; + Properties.ptr.prototype.hasDecomposition = function() { + var p; + p = this; + return !((((p.flags & 4) >>> 0) === 0)); + }; + Properties.prototype.hasDecomposition = function() { return this.$val.hasDecomposition(); }; + Properties.ptr.prototype.isInert = function() { + var p; + p = this; + return (((p.flags & 63) >>> 0) === 0) && (p.ccc === 0); + }; + Properties.prototype.isInert = function() { return this.$val.isInert(); }; + Properties.ptr.prototype.multiSegment = function() { + var p; + p = this; + return p.index >= 6253 && p.index < 12128; + }; + Properties.prototype.multiSegment = function() { return this.$val.multiSegment(); }; + Properties.ptr.prototype.nLeadingNonStarters = function() { + var p; + p = this; + return p.nLead; + }; + Properties.prototype.nLeadingNonStarters = function() { return this.$val.nLeadingNonStarters(); }; + Properties.ptr.prototype.nTrailingNonStarters = function() { + var p; + p = this; + return ((((p.flags & 3) >>> 0) << 24 >>> 24)); + }; + Properties.prototype.nTrailingNonStarters = function() { return this.$val.nTrailingNonStarters(); }; + Properties.ptr.prototype.Decomposition = function() { + var i, n, p; + p = this; + if (p.index === 0) { + return sliceType$4.nil; + } + i = p.index; + n = (((i < 0 || i >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[i]) & 63) >>> 0; + i = i + (1) << 16 >>> 16; + return $subslice(new sliceType$4(decomps), i, (i + ((n << 16 >>> 16)) << 16 >>> 16)); + }; + Properties.prototype.Decomposition = function() { return this.$val.Decomposition(); }; + Properties.ptr.prototype.Size = function() { + var p; + p = this; + return ((p.size >> 0)); + }; + Properties.prototype.Size = function() { return this.$val.Size(); }; + Properties.ptr.prototype.CCC = function() { + var p, x; + p = this; + if (p.index >= 19064) { + return 0; + } + return (x = p.ccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); + }; + Properties.prototype.CCC = function() { return this.$val.CCC(); }; + Properties.ptr.prototype.LeadCCC = function() { + var p, x; + p = this; + return (x = p.ccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); + }; + Properties.prototype.LeadCCC = function() { return this.$val.LeadCCC(); }; + Properties.ptr.prototype.TrailCCC = function() { + var p, x; + p = this; + return (x = p.tccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); + }; + Properties.prototype.TrailCCC = function() { return this.$val.TrailCCC(); }; + combine = function(a, b) { + var _entry, a, b, key; + key = (((((a << 16 >>> 16)) >>> 0)) << 16 >>> 0) + ((((b << 16 >>> 16)) >>> 0)) >>> 0; + return (_entry = recompMap[$Uint32.keyFor(key)], _entry !== undefined ? _entry.v : 0); + }; + lookupInfoNFC = function(b, i) { + var _tuple, b, i, sz, v; + _tuple = b.charinfoNFC(i); + v = _tuple[0]; + sz = _tuple[1]; + return compInfo(v, sz); + }; + lookupInfoNFKC = function(b, i) { + var _tuple, b, i, sz, v; + _tuple = b.charinfoNFKC(i); + v = _tuple[0]; + sz = _tuple[1]; + return compInfo(v, sz); + }; + Form.prototype.Properties = function(s) { + var _tuple, _tuple$1, f, s; + f = this.$val; + if ((f === 0) || (f === 1)) { + _tuple = nfcData.lookup(s); + return compInfo(_tuple[0], _tuple[1]); + } + _tuple$1 = nfkcData.lookup(s); + return compInfo(_tuple$1[0], _tuple$1[1]); + }; + $ptrType(Form).prototype.Properties = function(s) { return new Form(this.$get()).Properties(s); }; + Form.prototype.PropertiesString = function(s) { + var _tuple, _tuple$1, f, s; + f = this.$val; + if ((f === 0) || (f === 1)) { + _tuple = nfcData.lookupString(s); + return compInfo(_tuple[0], _tuple[1]); + } + _tuple$1 = nfkcData.lookupString(s); + return compInfo(_tuple$1[0], _tuple$1[1]); + }; + $ptrType(Form).prototype.PropertiesString = function(s) { return new Form(this.$get()).PropertiesString(s); }; + compInfo = function(v, sz) { + var c, f, h, p, p$1, sz, v, x; + if (v === 0) { + return new Properties.ptr(0, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0); + } else if (v >= 32768) { + p = new Properties.ptr(0, ((sz << 24 >>> 24)), ((v << 24 >>> 24)), ((v << 24 >>> 24)), 0, (((v >>> 8 << 16 >>> 16) << 24 >>> 24)), 0); + if (p.ccc > 0 || $clone(p, Properties).combinesBackward()) { + p.nLead = ((((p.flags & 3) >>> 0) << 24 >>> 24)); + } + return p; + } + h = ((v < 0 || v >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[v]); + f = (((((((h & 192) >>> 0) << 24 >>> 24)) >>> 2 << 24 >>> 24)) | 4) >>> 0; + p$1 = new Properties.ptr(0, ((sz << 24 >>> 24)), 0, 0, 0, f, v); + if (v >= 11422) { + v = v + ((((((h & 63) >>> 0) << 16 >>> 16)) + 1 << 16 >>> 16)) << 16 >>> 16; + c = ((v < 0 || v >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[v]); + p$1.tccc = c >>> 2 << 24 >>> 24; + p$1.flags = (p$1.flags | (((((c & 3) >>> 0) << 24 >>> 24)))) >>> 0; + if (v >= 18862) { + p$1.nLead = (c & 3) >>> 0; + if (v >= 19103) { + p$1.flags = (p$1.flags & (3)) >>> 0; + p$1.index = 0; + return p$1; + } + p$1.ccc = (x = v + 1 << 16 >>> 16, ((x < 0 || x >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[x])); + } + } + return p$1; + }; + inputBytes = function(str) { + var str; + return new input.ptr("", str); + }; + inputString = function(str) { + var str; + return new input.ptr(str, sliceType$4.nil); + }; + input.ptr.prototype.setBytes = function(str) { + var in$1, str; + in$1 = this; + in$1.str = ""; + in$1.bytes = str; + }; + input.prototype.setBytes = function(str) { return this.$val.setBytes(str); }; + input.ptr.prototype.setString = function(str) { + var in$1, str; + in$1 = this; + in$1.str = str; + in$1.bytes = sliceType$4.nil; + }; + input.prototype.setString = function(str) { return this.$val.setString(str); }; + input.ptr.prototype._byte = function(p) { + var in$1, p, x; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + return in$1.str.charCodeAt(p); + } + return (x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])); + }; + input.prototype._byte = function(p) { return this.$val._byte(p); }; + input.ptr.prototype.skipASCII = function(p, max) { + var in$1, max, p, x; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + while (true) { + if (!(p < max && in$1.str.charCodeAt(p) < 128)) { break; } + p = p + (1) >> 0; + } + } else { + while (true) { + if (!(p < max && (x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])) < 128)) { break; } + p = p + (1) >> 0; + } + } + return p; + }; + input.prototype.skipASCII = function(p, max) { return this.$val.skipASCII(p, max); }; + input.ptr.prototype.skipContinuationBytes = function(p) { + var in$1, p, x; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + while (true) { + if (!(p < in$1.str.length && !utf8.RuneStart(in$1.str.charCodeAt(p)))) { break; } + p = p + (1) >> 0; + } + } else { + while (true) { + if (!(p < in$1.bytes.$length && !utf8.RuneStart((x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p]))))) { break; } + p = p + (1) >> 0; + } + } + return p; + }; + input.prototype.skipContinuationBytes = function(p) { return this.$val.skipContinuationBytes(p); }; + input.ptr.prototype.appendSlice = function(buf, b, e) { + var b, buf, e, i, in$1; + in$1 = this; + if (!(in$1.bytes === sliceType$4.nil)) { + return $appendSlice(buf, $subslice(in$1.bytes, b, e)); + } + i = b; + while (true) { + if (!(i < e)) { break; } + buf = $append(buf, in$1.str.charCodeAt(i)); + i = i + (1) >> 0; + } + return buf; + }; + input.prototype.appendSlice = function(buf, b, e) { return this.$val.appendSlice(buf, b, e); }; + input.ptr.prototype.copySlice = function(buf, b, e) { + var b, buf, e, in$1; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + return $copyString(buf, $substring(in$1.str, b, e)); + } + return $copySlice(buf, $subslice(in$1.bytes, b, e)); + }; + input.prototype.copySlice = function(buf, b, e) { return this.$val.copySlice(buf, b, e); }; + input.ptr.prototype.charinfoNFC = function(p) { + var in$1, p; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + return nfcData.lookupString($substring(in$1.str, p)); + } + return nfcData.lookup($subslice(in$1.bytes, p)); + }; + input.prototype.charinfoNFC = function(p) { return this.$val.charinfoNFC(p); }; + input.ptr.prototype.charinfoNFKC = function(p) { + var in$1, p; + in$1 = this; + if (in$1.bytes === sliceType$4.nil) { + return nfkcData.lookupString($substring(in$1.str, p)); + } + return nfkcData.lookup($subslice(in$1.bytes, p)); + }; + input.prototype.charinfoNFKC = function(p) { return this.$val.charinfoNFKC(p); }; + input.ptr.prototype.hangul = function(p) { + var _tuple, _tuple$1, in$1, p, r, size; + r = 0; + in$1 = this; + size = 0; + if (in$1.bytes === sliceType$4.nil) { + if (!isHangulString($substring(in$1.str, p))) { + r = 0; + return r; + } + _tuple = utf8.DecodeRuneInString($substring(in$1.str, p)); + r = _tuple[0]; + size = _tuple[1]; + } else { + if (!isHangul($subslice(in$1.bytes, p))) { + r = 0; + return r; + } + _tuple$1 = utf8.DecodeRune($subslice(in$1.bytes, p)); + r = _tuple$1[0]; + size = _tuple$1[1]; + } + if (!((size === 3))) { + r = 0; + return r; + } + r = r; + return r; + }; + input.prototype.hangul = function(p) { return this.$val.hangul(p); }; + Iter.ptr.prototype.Init = function(f, src) { + var _r, f, i, src, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; i = $f.i; src = $f.src; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = this; + i.p = 0; + if (src.$length === 0) { + i.setDone(); + i.rb.nsrc = 0; + $s = -1; return; + } + i.multiSeg = sliceType$4.nil; + i.rb.init(f, src); + i.next = i.rb.f.nextMain; + i.asciiF = nextASCIIBytes; + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Iter.ptr.prototype.Init }; } $f._r = _r; $f.f = f; $f.i = i; $f.src = src; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Iter.prototype.Init = function(f, src) { return this.$val.Init(f, src); }; + Iter.ptr.prototype.InitString = function(f, src) { + var _r, f, i, src, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; i = $f.i; src = $f.src; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = this; + i.p = 0; + if (src.length === 0) { + i.setDone(); + i.rb.nsrc = 0; + $s = -1; return; + } + i.multiSeg = sliceType$4.nil; + i.rb.initString(f, src); + i.next = i.rb.f.nextMain; + i.asciiF = nextASCIIString; + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Iter.ptr.prototype.InitString }; } $f._r = _r; $f.f = f; $f.i = i; $f.src = src; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Iter.prototype.InitString = function(f, src) { return this.$val.InitString(f, src); }; + Iter.ptr.prototype.Seek = function(offset, whence) { + var _1, _r, _r$1, _r$2, abs, i, offset, whence, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; abs = $f.abs; i = $f.i; offset = $f.offset; whence = $f.whence; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = this; + abs = new $Int64(0, 0); + _1 = whence; + /* */ if (_1 === (0)) { $s = 2; continue; } + /* */ if (_1 === (1)) { $s = 3; continue; } + /* */ if (_1 === (2)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_1 === (0)) { */ case 2: + abs = offset; + $s = 6; continue; + /* } else if (_1 === (1)) { */ case 3: + abs = (x = (new $Int64(0, i.p)), new $Int64(x.$high + offset.$high, x.$low + offset.$low)); + $s = 6; continue; + /* } else if (_1 === (2)) { */ case 4: + abs = (x$1 = (new $Int64(0, i.rb.nsrc)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); + $s = 6; continue; + /* } else { */ case 5: + _r = fmt.Errorf("norm: invalid whence", new sliceType$6([])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [new $Int64(0, 0), _r]; + /* } */ case 6: + case 1: + /* */ if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { */ case 8: + _r$1 = fmt.Errorf("norm: negative position", new sliceType$6([])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return [new $Int64(0, 0), _r$1]; + /* } */ case 9: + if ((((abs.$low + ((abs.$high >> 31) * 4294967296)) >> 0)) >= i.rb.nsrc) { + i.setDone(); + $s = -1; return [(new $Int64(0, i.p)), $ifaceNil]; + } + i.p = (((abs.$low + ((abs.$high >> 31) * 4294967296)) >> 0)); + i.multiSeg = sliceType$4.nil; + i.next = i.rb.f.nextMain; + _r$2 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + Properties.copy(i.info, _r$2); + (x$2 = i.rb, (x$2.$ptr_ss || (x$2.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$2)))).first($clone(i.info, Properties)); + $s = -1; return [abs, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Iter.ptr.prototype.Seek }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.abs = abs; $f.i = i; $f.offset = offset; $f.whence = whence; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Iter.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + Iter.ptr.prototype.returnSlice = function(a, b) { + var a, b, i; + i = this; + if (i.rb.src.bytes === sliceType$4.nil) { + return $subslice(new sliceType$4(i.buf), 0, $copyString(new sliceType$4(i.buf), $substring(i.rb.src.str, a, b))); + } + return $subslice(i.rb.src.bytes, a, b); + }; + Iter.prototype.returnSlice = function(a, b) { return this.$val.returnSlice(a, b); }; + Iter.ptr.prototype.Pos = function() { + var i; + i = this; + return i.p; + }; + Iter.prototype.Pos = function() { return this.$val.Pos(); }; + Iter.ptr.prototype.setDone = function() { + var i; + i = this; + i.next = nextDone; + i.p = i.rb.nsrc; + }; + Iter.prototype.setDone = function() { return this.$val.setDone(); }; + Iter.ptr.prototype.Done = function() { + var i; + i = this; + return i.p >= i.rb.nsrc; + }; + Iter.prototype.Done = function() { return this.$val.Done(); }; + Iter.ptr.prototype.Next = function() { + var _r, i, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = this; + _r = i.next(i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Iter.ptr.prototype.Next }; } $f._r = _r; $f.i = i; $f.$s = $s; $f.$r = $r; return $f; + }; + Iter.prototype.Next = function() { return this.$val.Next(); }; + nextASCIIBytes = function(i) { + var _r, _r$1, i, p, p0, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; i = $f.i; p = $f.p; p0 = $f.p0; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = i.p + 1 >> 0; + if (p >= i.rb.nsrc) { + i.setDone(); + $s = -1; return $subslice(i.rb.src.bytes, i.p, p); + } + if ((x = i.rb.src.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])) < 128) { + p0 = i.p; + i.p = p; + $s = -1; return $subslice(i.rb.src.bytes, p0, p); + } + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + i.next = i.rb.f.nextMain; + _r$1 = i.next(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextASCIIBytes }; } $f._r = _r; $f._r$1 = _r$1; $f.i = i; $f.p = p; $f.p0 = p0; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + nextASCIIString = function(i) { + var _r, _r$1, i, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; i = $f.i; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = i.p + 1 >> 0; + if (p >= i.rb.nsrc) { + i.buf[0] = i.rb.src.str.charCodeAt(i.p); + i.setDone(); + $s = -1; return $subslice(new sliceType$4(i.buf), 0, 1); + } + if (i.rb.src.str.charCodeAt(p) < 128) { + i.buf[0] = i.rb.src.str.charCodeAt(i.p); + i.p = p; + $s = -1; return $subslice(new sliceType$4(i.buf), 0, 1); + } + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + i.next = i.rb.f.nextMain; + _r$1 = i.next(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextASCIIString }; } $f._r = _r; $f._r$1 = _r$1; $f.i = i; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + nextHangul = function(i) { + var _r, _r$1, i, next, p, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; i = $f.i; next = $f.next; p = $f.p; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = i.p; + next = p + 3 >> 0; + /* */ if (next >= i.rb.nsrc) { $s = 1; continue; } + /* */ if (i.rb.src.hangul(next) === 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (next >= i.rb.nsrc) { */ case 1: + i.setDone(); + $s = 3; continue; + /* } else if (i.rb.src.hangul(next) === 0) { */ case 2: + (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + i.next = i.rb.f.nextMain; + _r$1 = i.next(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 3: + i.p = next; + $s = -1; return $subslice(new sliceType$4(i.buf), 0, decomposeHangul(new sliceType$4(i.buf), i.rb.src.hangul(p))); + /* */ } return; } if ($f === undefined) { $f = { $blk: nextHangul }; } $f._r = _r; $f._r$1 = _r$1; $f.i = i; $f.next = next; $f.p = p; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + nextDone = function(i) { + var i; + return sliceType$4.nil; + }; + nextMulti = function(i) { + var _r, _r$1, d, i, info, j, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; d = $f.d; i = $f.i; info = $f.info; j = $f.j; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + j = 0; + d = i.multiSeg; + j = 1; + while (true) { + if (!(j < d.$length && !utf8.RuneStart(((j < 0 || j >= d.$length) ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + j])))) { break; } + j = j + (1) >> 0; + } + /* while (true) { */ case 1: + /* if (!(j < d.$length)) { break; } */ if(!(j < d.$length)) { $s = 2; continue; } + _r = i.rb.f.info(new input.ptr("", d), j); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if ($clone(info, Properties).BoundaryBefore()) { + i.multiSeg = $subslice(d, j); + $s = -1; return $subslice(d, 0, j); + } + j = j + (((info.size >> 0))) >> 0; + /* } */ $s = 1; continue; case 2: + i.next = i.rb.f.nextMain; + _r$1 = i.next(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextMulti }; } $f._r = _r; $f._r$1 = _r$1; $f.d = d; $f.i = i; $f.info = info; $f.j = j; $f.$s = $s; $f.$r = $r; return $f; + }; + nextMultiNorm = function(i) { + var _r, _r$1, d, i, info, j, seg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; d = $f.d; i = $f.i; info = $f.info; j = $f.j; seg = $f.seg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + j = 0; + d = i.multiSeg; + /* while (true) { */ case 1: + /* if (!(j < d.$length)) { break; } */ if(!(j < d.$length)) { $s = 2; continue; } + _r = i.rb.f.info(new input.ptr("", d), j); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + /* */ if ($clone(info, Properties).BoundaryBefore()) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($clone(info, Properties).BoundaryBefore()) { */ case 4: + i.rb.compose(); + seg = $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); + $r = i.rb.insertUnsafe(new input.ptr("", d), j, $clone(info, Properties)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i.multiSeg = $subslice(d, (j + ((info.size >> 0)) >> 0)); + $s = -1; return seg; + /* } */ case 5: + $r = i.rb.insertUnsafe(new input.ptr("", d), j, $clone(info, Properties)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + j = j + (((info.size >> 0))) >> 0; + /* } */ $s = 1; continue; case 2: + i.multiSeg = sliceType$4.nil; + i.next = nextComposed; + _r$1 = doNormComposed(i); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextMultiNorm }; } $f._r = _r; $f._r$1 = _r$1; $f.d = d; $f.i = i; $f.info = info; $f.j = j; $f.seg = seg; $f.$s = $s; $f.$r = $r; return $f; + }; + nextDecomposed = function(i) { + var _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, i, inCopyStart, next, outCopyStart, outp, p, p$1, p$2, prevCC, prevCC$1, r, sz, v, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; d = $f.d; i = $f.i; inCopyStart = $f.inCopyStart; next = $f.next; outCopyStart = $f.outCopyStart; outp = $f.outp; p = $f.p; p$1 = $f.p$1; p$2 = $f.p$2; prevCC = $f.prevCC; prevCC$1 = $f.prevCC$1; r = $f.r; sz = $f.sz; v = $f.v; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + next = sliceType$4.nil; + outp = 0; + _tmp = i.p; + _tmp$1 = 0; + inCopyStart = _tmp; + outCopyStart = _tmp$1; + /* while (true) { */ case 1: + sz = ((i.info.size >> 0)); + /* */ if (sz <= 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (sz <= 1) { */ case 3: + i.rb.ss = 0; + p = i.p; + i.p = i.p + (1) >> 0; + if (i.p >= i.rb.nsrc) { + i.setDone(); + next = i.returnSlice(p, i.p); + $s = -1; return next; + } else if (i.rb.src._byte(i.p) < 128) { + i.next = i.asciiF; + next = i.returnSlice(p, i.p); + $s = -1; return next; + } + outp = outp + (1) >> 0; + $s = 5; continue; + /* } else { */ case 4: + d = $clone(i.info, Properties).Decomposition(); + /* */ if (!(d === sliceType$4.nil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(d === sliceType$4.nil)) { */ case 6: + p$1 = outp + d.$length >> 0; + /* */ if (outp > 0) { $s = 9; continue; } + /* */ if ($clone(i.info, Properties).multiSegment()) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (outp > 0) { */ case 9: + i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); + if (p$1 > 128) { + next = $subslice(new sliceType$4(i.buf), 0, outp); + $s = -1; return next; + } + $s = 11; continue; + /* } else if ($clone(i.info, Properties).multiSegment()) { */ case 10: + /* */ if (i.multiSeg === sliceType$4.nil) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (i.multiSeg === sliceType$4.nil) { */ case 12: + i.multiSeg = d; + i.next = nextMulti; + _r = nextMulti(i); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + next = _r; + $s = -1; return next; + /* } */ case 13: + d = i.multiSeg; + i.multiSeg = sliceType$4.nil; + p$1 = d.$length; + /* } */ case 11: + prevCC = i.info.tccc; + i.p = i.p + (sz) >> 0; + /* */ if (i.p >= i.rb.nsrc) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (i.p >= i.rb.nsrc) { */ case 15: + i.setDone(); + Properties.copy(i.info, new Properties.ptr(0, 0, 0, 0, 0, 0, 0)); + $s = 17; continue; + /* } else { */ case 16: + _r$1 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + Properties.copy(i.info, _r$1); + /* } */ case 17: + _1 = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); + if (_1 === (2)) { + i.next = nextCGJDecompose; + if (outp > 0) { + $copySlice($subslice(new sliceType$4(i.buf), outp), d); + next = $subslice(new sliceType$4(i.buf), 0, p$1); + $s = -1; return next; + } + next = d; + $s = -1; return next; + } else if (_1 === (1)) { + if (outp > 0) { + $copySlice($subslice(new sliceType$4(i.buf), outp), d); + next = $subslice(new sliceType$4(i.buf), 0, p$1); + $s = -1; return next; + } + next = d; + $s = -1; return next; + } + $copySlice($subslice(new sliceType$4(i.buf), outp), d); + outp = p$1; + _tmp$2 = i.p; + _tmp$3 = outp; + inCopyStart = _tmp$2; + outCopyStart = _tmp$3; + /* */ if (i.info.ccc < prevCC) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (i.info.ccc < prevCC) { */ case 19: + /* goto doNorm */ $s = 21; continue; + /* } */ case 20: + /* continue; */ $s = 1; continue; + $s = 8; continue; + /* } else { */ case 7: + r = i.rb.src.hangul(i.p); + if (!((r === 0))) { + outp = decomposeHangul(new sliceType$4(i.buf), r); + i.p = i.p + (3) >> 0; + _tmp$4 = i.p; + _tmp$5 = outp; + inCopyStart = _tmp$4; + outCopyStart = _tmp$5; + if (i.p >= i.rb.nsrc) { + i.setDone(); + /* break; */ $s = 2; continue; + } else if (!((i.rb.src.hangul(i.p) === 0))) { + i.next = nextHangul; + next = $subslice(new sliceType$4(i.buf), 0, outp); + $s = -1; return next; + } + } else { + p$2 = outp + sz >> 0; + if (p$2 > 128) { + /* break; */ $s = 2; continue; + } + outp = p$2; + i.p = i.p + (sz) >> 0; + } + /* } */ case 8: + /* } */ case 5: + if (i.p >= i.rb.nsrc) { + i.setDone(); + /* break; */ $s = 2; continue; + } + prevCC$1 = i.info.tccc; + _r$2 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + Properties.copy(i.info, _r$2); + v = (x$1 = i.rb, (x$1.$ptr_ss || (x$1.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$1)))).next($clone(i.info, Properties)); + if (v === 1) { + /* break; */ $s = 2; continue; + } else if (v === 2) { + i.next = nextCGJDecompose; + /* break; */ $s = 2; continue; + } + /* */ if (i.info.ccc < prevCC$1) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (i.info.ccc < prevCC$1) { */ case 23: + /* goto doNorm */ $s = 21; continue; + /* } */ case 24: + /* } */ $s = 1; continue; case 2: + if (outCopyStart === 0) { + next = i.returnSlice(inCopyStart, i.p); + $s = -1; return next; + } else if (inCopyStart < i.p) { + i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); + } + next = $subslice(new sliceType$4(i.buf), 0, outp); + $s = -1; return next; + /* doNorm: */ case 21: + i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); + _r$3 = i.rb.insertDecomposed($subslice(new sliceType$4(i.buf), 0, outp)); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = doNormDecomposed(i); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + next = _r$4; + $s = -1; return next; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextDecomposed }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f.d = d; $f.i = i; $f.inCopyStart = inCopyStart; $f.next = next; $f.outCopyStart = outCopyStart; $f.outp = outp; $f.p = p; $f.p$1 = p$1; $f.p$2 = p$2; $f.prevCC = prevCC; $f.prevCC$1 = prevCC$1; $f.r = r; $f.sz = sz; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + doNormDecomposed = function(i) { + var _r, i, s, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; s = $f.s; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* while (true) { */ case 1: + $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i.p = i.p + (((i.info.size >> 0))) >> 0; + if (i.p >= i.rb.nsrc) { + i.setDone(); + /* break; */ $s = 2; continue; + } + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + if (i.info.ccc === 0) { + /* break; */ $s = 2; continue; + } + s = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); + if (s === 2) { + i.next = nextCGJDecompose; + /* break; */ $s = 2; continue; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); + /* */ } return; } if ($f === undefined) { $f = { $blk: doNormDecomposed }; } $f._r = _r; $f.i = i; $f.s = s; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + nextCGJDecompose = function(i) { + var _r, buf, i, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; buf = $f.buf; i = $f.i; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i.rb.ss = 0; + i.rb.insertCGJ(); + i.next = nextDecomposed; + (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); + _r = doNormDecomposed(i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + buf = _r; + $s = -1; return buf; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextCGJDecompose }; } $f._r = _r; $f.buf = buf; $f.i = i; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + nextComposed = function(i) { + var _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, d, i, info, outp, p, prevCC, startp, sz, v, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; d = $f.d; i = $f.i; info = $f.info; outp = $f.outp; p = $f.p; prevCC = $f.prevCC; startp = $f.startp; sz = $f.sz; v = $f.v; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tmp = 0; + _tmp$1 = i.p; + outp = _tmp; + startp = _tmp$1; + prevCC = 0; + /* while (true) { */ case 1: + /* */ if (!$clone(i.info, Properties).isYesC()) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!$clone(i.info, Properties).isYesC()) { */ case 3: + /* goto doNorm */ $s = 5; continue; + /* } */ case 4: + prevCC = i.info.tccc; + sz = ((i.info.size >> 0)); + if (sz === 0) { + sz = 1; + } + p = outp + sz >> 0; + if (p > 128) { + /* break; */ $s = 2; continue; + } + outp = p; + i.p = i.p + (sz) >> 0; + if (i.p >= i.rb.nsrc) { + i.setDone(); + /* break; */ $s = 2; continue; + } else if (i.rb.src._byte(i.p) < 128) { + i.rb.ss = 0; + i.next = i.asciiF; + /* break; */ $s = 2; continue; + } + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + v = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); + if (v === 1) { + /* break; */ $s = 2; continue; + } else if (v === 2) { + i.next = nextCGJCompose; + /* break; */ $s = 2; continue; + } + /* */ if (i.info.ccc < prevCC) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (i.info.ccc < prevCC) { */ case 7: + /* goto doNorm */ $s = 5; continue; + /* } */ case 8: + /* } */ $s = 1; continue; case 2: + $s = -1; return i.returnSlice(startp, i.p); + /* doNorm: */ case 5: + i.p = startp; + _r$1 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + Properties.copy(i.info, _r$1); + (x$1 = i.rb, (x$1.$ptr_ss || (x$1.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$1)))).first($clone(i.info, Properties)); + /* */ if ($clone(i.info, Properties).multiSegment()) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ($clone(i.info, Properties).multiSegment()) { */ case 10: + d = $clone(i.info, Properties).Decomposition(); + _r$2 = i.rb.f.info(new input.ptr("", d), 0); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + info = $clone(_r$2, Properties); + $r = i.rb.insertUnsafe(new input.ptr("", d), 0, $clone(info, Properties)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i.multiSeg = $subslice(d, ((info.size >> 0))); + i.next = nextMultiNorm; + _r$3 = nextMultiNorm(i); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 11: + (x$2 = i.rb, (x$2.$ptr_ss || (x$2.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$2)))).first($clone(i.info, Properties)); + $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = doNormComposed(i); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextComposed }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.d = d; $f.i = i; $f.info = info; $f.outp = outp; $f.p = p; $f.prevCC = prevCC; $f.startp = startp; $f.sz = sz; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + doNormComposed = function(i) { + var _r, i, s, seg, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; s = $f.s; seg = $f.seg; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* while (true) { */ case 1: + i.p = i.p + (((i.info.size >> 0))) >> 0; + if (i.p >= i.rb.nsrc) { + i.setDone(); + /* break; */ $s = 2; continue; + } + _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + Properties.copy(i.info, _r); + s = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); + if (s === 1) { + /* break; */ $s = 2; continue; + } else if (s === 2) { + i.next = nextCGJCompose; + /* break; */ $s = 2; continue; + } + $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 1; continue; case 2: + i.rb.compose(); + seg = $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); + $s = -1; return seg; + /* */ } return; } if ($f === undefined) { $f = { $blk: doNormComposed }; } $f._r = _r; $f.i = i; $f.s = s; $f.seg = seg; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + nextCGJCompose = function(i) { + var _r, i, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i.rb.ss = 0; + i.rb.insertCGJ(); + i.next = nextComposed; + (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); + $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r = doNormComposed(i); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: nextCGJCompose }; } $f._r = _r; $f.i = i; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Form.prototype.Bytes = function(b) { + var _r, _r$1, _tuple, b, f, ft, n, ok, out, rb, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; b = $f.b; f = $f.f; ft = $f.ft; n = $f.n; ok = $f.ok; out = $f.out; rb = $f.rb; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = [rb]; + f = this.$val; + src = $clone(inputBytes(b), input); + ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + _r = ft.quickSpan($clone(src, input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return b; + } + out = $makeSlice(sliceType$4, n, b.$length); + $copySlice(out, $subslice(b, 0, n)); + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), b.$length, new input.ptr("", sliceType$4.nil), out, appendFlush); + _r$1 = doAppendInner(rb[0], n); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.Bytes }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.b = b; $f.f = f; $f.ft = ft; $f.n = n; $f.ok = ok; $f.out = out; $f.rb = rb; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.Bytes = function(b) { return new Form(this.$get()).Bytes(b); }; + Form.prototype.String = function(s) { + var _r, _r$1, _tuple, f, ft, n, ok, out, rb, s, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; f = $f.f; ft = $f.ft; n = $f.n; ok = $f.ok; out = $f.out; rb = $f.rb; s = $f.s; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = [rb]; + f = this.$val; + src = $clone(inputString(s), input); + ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + _r = ft.quickSpan($clone(src, input), 0, s.length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return s; + } + out = $makeSlice(sliceType$4, n, s.length); + $copyString(out, $substring(s, 0, n)); + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), s.length, new input.ptr("", sliceType$4.nil), out, appendFlush); + _r$1 = doAppendInner(rb[0], n); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return ($bytesToString(_r$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.String }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.f = f; $f.ft = ft; $f.n = n; $f.ok = ok; $f.out = out; $f.rb = rb; $f.s = s; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.String = function(s) { return new Form(this.$get()).String(s); }; + Form.prototype.IsNormal = function(b) { + var _r, _r$1, _r$2, _tuple, _tuple$1, b, bp, f, ft, ok, rb, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; bp = $f.bp; f = $f.f; ft = $f.ft; ok = $f.ok; rb = $f.rb; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = [rb]; + f = this.$val; + src = $clone(inputBytes(b), input); + ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + _r = ft.quickSpan($clone(src, input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + bp = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return true; + } + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), b.$length, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + rb[0].setFlusher(sliceType$4.nil, cmpNormalBytes); + /* while (true) { */ case 2: + /* if (!(bp < b.$length)) { break; } */ if(!(bp < b.$length)) { $s = 3; continue; } + rb[0].out = $subslice(b, bp); + _r$1 = decomposeSegment(rb[0], bp, true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + bp = _r$1; + if (bp < 0) { + $s = -1; return false; + } + _r$2 = rb[0].f.quickSpan($clone(rb[0].src, input), bp, b.$length, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + bp = _tuple$1[0]; + /* } */ $s = 2; continue; case 3: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.IsNormal }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.bp = bp; $f.f = f; $f.ft = ft; $f.ok = ok; $f.rb = rb; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.IsNormal = function(b) { return new Form(this.$get()).IsNormal(b); }; + cmpNormalBytes = function(rb) { + var b, i, info, p, pe, rb, x, x$1; + b = rb.out; + i = 0; + while (true) { + if (!(i < rb.nrune)) { break; } + info = $clone((x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); + if (((info.size >> 0)) > b.$length) { + return false; + } + p = info.pos; + pe = p + info.size << 24 >>> 24; + while (true) { + if (!(p < pe)) { break; } + if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === (x$1 = rb.byte$1, ((p < 0 || p >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[p]))))) { + return false; + } + b = $subslice(b, 1); + p = p + (1) << 24 >>> 24; + } + i = i + (1) >> 0; + } + return true; + }; + Form.prototype.IsNormalString = function(s) { + var _r, _r$1, _r$2, _tuple, _tuple$1, bp, f, ft, ok, rb, s, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; bp = $f.bp; f = $f.f; ft = $f.ft; ok = $f.ok; rb = $f.rb; s = $f.s; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + bp = [bp]; + rb = [rb]; + s = [s]; + f = this.$val; + src = $clone(inputString(s[0]), input); + ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + _r = ft.quickSpan($clone(src, input), 0, s[0].length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + bp[0] = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return true; + } + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), s[0].length, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + rb[0].setFlusher(sliceType$4.nil, (function(bp, rb, s) { return function(rb$1) { + var i, info, p, pe, rb$1, x, x$1; + i = 0; + while (true) { + if (!(i < rb$1.nrune)) { break; } + info = $clone((x = rb$1.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); + if ((bp[0] + ((info.size >> 0)) >> 0) > s[0].length) { + return false; + } + p = info.pos; + pe = p + info.size << 24 >>> 24; + while (true) { + if (!(p < pe)) { break; } + if (!((s[0].charCodeAt(bp[0]) === (x$1 = rb$1.byte$1, ((p < 0 || p >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[p]))))) { + return false; + } + bp[0] = bp[0] + (1) >> 0; + p = p + (1) << 24 >>> 24; + } + i = i + (1) >> 0; + } + return true; + }; })(bp, rb, s)); + /* while (true) { */ case 2: + /* if (!(bp[0] < s[0].length)) { break; } */ if(!(bp[0] < s[0].length)) { $s = 3; continue; } + _r$1 = decomposeSegment(rb[0], bp[0], true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + bp[0] = _r$1; + if (bp[0] < 0) { + $s = -1; return false; + } + _r$2 = rb[0].f.quickSpan($clone(rb[0].src, input), bp[0], s[0].length, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + bp[0] = _tuple$1[0]; + /* } */ $s = 2; continue; case 3: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.IsNormalString }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.bp = bp; $f.f = f; $f.ft = ft; $f.ok = ok; $f.rb = rb; $f.s = s; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.IsNormalString = function(s) { return new Form(this.$get()).IsNormalString(s); }; + patchTail = function(rb) { + var _r, _r$1, _r$2, _r$3, _tuple, buf, end, extra, info, p, rb, s, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; buf = $f.buf; end = $f.end; extra = $f.extra; info = $f.info; p = $f.p; rb = $f.rb; s = $f.s; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = lastRuneStart(rb.f, rb.out); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + info = $clone(_tuple[0], Properties); + p = _tuple[1]; + if ((p === -1) || (info.size === 0)) { + $s = -1; return true; + } + end = p + ((info.size >> 0)) >> 0; + extra = rb.out.$length - end >> 0; + /* */ if (extra > 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (extra > 0) { */ case 2: + x = $makeSlice(sliceType$4, 0); + x = $appendSlice(x, $subslice(rb.out, (rb.out.$length - extra >> 0))); + rb.out = $subslice(rb.out, 0, end); + $r = decomposeToLastBoundary(rb); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = rb.doFlush(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + rb.out = $appendSlice(rb.out, x); + $s = -1; return false; + /* } */ case 3: + buf = $subslice(rb.out, p); + rb.out = $subslice(rb.out, 0, p); + $r = decomposeToLastBoundary(rb); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + s = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); + /* */ if (s === 1) { $s = 7; continue; } + /* */ if (s === 2) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (s === 1) { */ case 7: + _r$2 = rb.doFlush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).first($clone(info, Properties)); + $s = 9; continue; + /* } else if (s === 2) { */ case 8: + _r$3 = rb.doFlush(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + rb.insertCGJ(); + rb.ss = 0; + /* } */ case 9: + $r = rb.insertUnsafe($clone(inputBytes(buf), input), 0, $clone(info, Properties)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: patchTail }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.buf = buf; $f.end = end; $f.extra = extra; $f.info = info; $f.p = p; $f.rb = rb; $f.s = s; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + appendQuick = function(rb, i) { + var _r, _tuple, end, i, rb, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; end = $f.end; i = $f.i; rb = $f.rb; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (rb.nsrc === i) { + $s = -1; return i; + } + _r = rb.f.quickSpan($clone(rb.src, input), i, rb.nsrc, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + end = _tuple[0]; + rb.out = rb.src.appendSlice(rb.out, i, end); + $s = -1; return end; + /* */ } return; } if ($f === undefined) { $f = { $blk: appendQuick }; } $f._r = _r; $f._tuple = _tuple; $f.end = end; $f.i = i; $f.rb = rb; $f.$s = $s; $f.$r = $r; return $f; + }; + Form.prototype.Append = function(out, src) { + var _r, f, out, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; out = $f.out; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).doAppend(out, $clone(inputBytes(src), input), src.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.Append }; } $f._r = _r; $f.f = f; $f.out = out; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.Append = function(out, src) { return new Form(this.$get()).Append(out, src); }; + Form.prototype.doAppend = function(out, src, n) { + var _r, _r$1, _r$2, _tuple, f, ft, n, out, p, rb, rb$1, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; f = $f.f; ft = $f.ft; n = $f.n; out = $f.out; p = $f.p; rb = $f.rb; rb$1 = $f.rb$1; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = [rb]; + rb$1 = [rb$1]; + f = this.$val; + if (n === 0) { + $s = -1; return out; + } + ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + /* */ if (out.$length === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (out.$length === 0) { */ case 1: + _r = ft.quickSpan($clone(src, input), 0, n, true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + p = _tuple[0]; + out = src.appendSlice(out, 0, p); + if (p === n) { + $s = -1; return out; + } + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), n, new input.ptr("", sliceType$4.nil), out, appendFlush); + _r$1 = doAppendInner(rb[0], p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + rb$1[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), n, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + _r$2 = doAppend(rb$1[0], out, 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.doAppend }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.f = f; $f.ft = ft; $f.n = n; $f.out = out; $f.p = p; $f.rb = rb; $f.rb$1 = rb$1; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.doAppend = function(out, src, n) { return new Form(this.$get()).doAppend(out, src, n); }; + doAppend = function(rb, out, p) { + var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, doMerge, fd, info, n, out, p, q, rb, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; doMerge = $f.doMerge; fd = $f.fd; info = $f.info; n = $f.n; out = $f.out; p = $f.p; q = $f.q; rb = $f.rb; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb.setFlusher(out, appendFlush); + _tmp = $clone(rb.src, input); + _tmp$1 = rb.nsrc; + src = $clone(_tmp, input); + n = _tmp$1; + doMerge = out.$length > 0; + q = src.skipContinuationBytes(p); + /* */ if (q > p) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (q > p) { */ case 1: + rb.out = src.appendSlice(rb.out, p, q); + p = q; + _r = patchTail(rb); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + doMerge = _r; + /* } */ case 2: + fd = rb.f; + /* */ if (doMerge) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (doMerge) { */ case 4: + info = new Properties.ptr(0, 0, 0, 0, 0, 0, 0); + /* */ if (p < n) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (p < n) { */ case 6: + _r$1 = fd.info($clone(src, input), p); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + Properties.copy(info, _r$1); + /* */ if (!$clone(info, Properties).BoundaryBefore() || $clone(info, Properties).nLeadingNonStarters() > 0) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!$clone(info, Properties).BoundaryBefore() || $clone(info, Properties).nLeadingNonStarters() > 0) { */ case 9: + /* */ if (p === 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (p === 0) { */ case 11: + $r = decomposeToLastBoundary(rb); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + _r$2 = decomposeSegment(rb, p, true); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + p = _r$2; + /* } */ case 10: + /* } */ case 7: + /* */ if (info.size === 0) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (info.size === 0) { */ case 15: + _r$3 = rb.doFlush(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return src.appendSlice(rb.out, p, n); + /* } */ case 16: + /* */ if (rb.nrune > 0) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (rb.nrune > 0) { */ case 18: + _r$4 = doAppendInner(rb, p); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 19: + /* } */ case 5: + _r$5 = appendQuick(rb, p); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + p = _r$5; + _r$6 = doAppendInner(rb, p); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* */ } return; } if ($f === undefined) { $f = { $blk: doAppend }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.doMerge = doMerge; $f.fd = fd; $f.info = info; $f.n = n; $f.out = out; $f.p = p; $f.q = q; $f.rb = rb; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + doAppendInner = function(rb, p) { + var _r, _r$1, n, p, rb, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; n = $f.n; p = $f.p; rb = $f.rb; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = rb.nsrc; + /* while (true) { */ case 1: + /* if (!(p < n)) { break; } */ if(!(p < n)) { $s = 2; continue; } + _r = decomposeSegment(rb, p, true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + p = _r; + _r$1 = appendQuick(rb, p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + p = _r$1; + /* } */ $s = 1; continue; case 2: + $s = -1; return rb.out; + /* */ } return; } if ($f === undefined) { $f = { $blk: doAppendInner }; } $f._r = _r; $f._r$1 = _r$1; $f.n = n; $f.p = p; $f.rb = rb; $f.$s = $s; $f.$r = $r; return $f; + }; + Form.prototype.AppendString = function(out, src) { + var _r, f, out, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; out = $f.out; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).doAppend(out, $clone(inputString(src), input), src.length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.AppendString }; } $f._r = _r; $f.f = f; $f.out = out; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.AppendString = function(out, src) { return new Form(this.$get()).AppendString(out, src); }; + Form.prototype.QuickSpan = function(b) { + var _r, _tuple, b, f, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; b = $f.b; f = $f.f; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.QuickSpan }; } $f._r = _r; $f._tuple = _tuple; $f.b = b; $f.f = f; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.QuickSpan = function(b) { return new Form(this.$get()).QuickSpan(b); }; + Form.prototype.Span = function(b, atEOF) { + var _r, _tmp, _tmp$1, _tuple, atEOF, b, err, f, n, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; atEOF = $f.atEOF; b = $f.b; err = $f.err; f = $f.f; n = $f.n; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + f = this.$val; + _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), 0, b.$length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + ok = _tuple[1]; + if (n < b.$length) { + if (!ok) { + err = transform.ErrEndOfSpan; + } else { + err = transform.ErrShortSrc; + } + } + _tmp = n; + _tmp$1 = err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.Span }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.atEOF = atEOF; $f.b = b; $f.err = err; $f.f = f; $f.n = n; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.Span = function(b, atEOF) { return new Form(this.$get()).Span(b, atEOF); }; + Form.prototype.SpanString = function(s, atEOF) { + var _r, _tmp, _tmp$1, _tuple, atEOF, err, f, n, ok, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; atEOF = $f.atEOF; err = $f.err; f = $f.f; n = $f.n; ok = $f.ok; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + f = this.$val; + _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputString(s), input), 0, s.length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + ok = _tuple[1]; + if (n < s.length) { + if (!ok) { + err = transform.ErrEndOfSpan; + } else { + err = transform.ErrShortSrc; + } + } + _tmp = n; + _tmp$1 = err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.SpanString }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.atEOF = atEOF; $f.err = err; $f.f = f; $f.n = n; $f.ok = ok; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.SpanString = function(s, atEOF) { return new Form(this.$get()).SpanString(s, atEOF); }; + formInfo.ptr.prototype.quickSpan = function(src, i, end, atEOF) { + var _1, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, atEOF, end, f, i, info, j, lastCC, lastSegStart, n, ok, src, ss, ss$24ptr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; atEOF = $f.atEOF; end = $f.end; f = $f.f; i = $f.i; info = $f.info; j = $f.j; lastCC = $f.lastCC; lastSegStart = $f.lastSegStart; n = $f.n; ok = $f.ok; src = $f.src; ss = $f.ss; ss$24ptr = $f.ss$24ptr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + ok = false; + f = this; + lastCC = 0; + ss = 0; + lastSegStart = i; + n = end; + /* while (true) { */ case 1: + /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } + j = src.skipASCII(i, n); + if (!((i === j))) { + i = j; + lastSegStart = i - 1 >> 0; + lastCC = 0; + ss = 0; + /* continue; */ $s = 1; continue; + } + _r = f.info($clone(src, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if (info.size === 0) { + if (atEOF) { + _tmp = n; + _tmp$1 = true; + n = _tmp; + ok = _tmp$1; + $s = -1; return [n, ok]; + } + _tmp$2 = lastSegStart; + _tmp$3 = true; + n = _tmp$2; + ok = _tmp$3; + $s = -1; return [n, ok]; + } + _1 = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); + if (_1 === (1)) { + lastSegStart = i; + } else if (_1 === (2)) { + _tmp$4 = lastSegStart; + _tmp$5 = false; + n = _tmp$4; + ok = _tmp$5; + $s = -1; return [n, ok]; + } else if (_1 === (0)) { + if (lastCC > info.ccc) { + _tmp$6 = lastSegStart; + _tmp$7 = false; + n = _tmp$6; + ok = _tmp$7; + $s = -1; return [n, ok]; + } + } + if (f.composing) { + if (!$clone(info, Properties).isYesC()) { + /* break; */ $s = 2; continue; + } + } else { + if (!$clone(info, Properties).isYesD()) { + /* break; */ $s = 2; continue; + } + } + lastCC = info.ccc; + i = i + (((info.size >> 0))) >> 0; + /* } */ $s = 1; continue; case 2: + if (i === n) { + if (!atEOF) { + n = lastSegStart; + } + _tmp$8 = n; + _tmp$9 = true; + n = _tmp$8; + ok = _tmp$9; + $s = -1; return [n, ok]; + } + _tmp$10 = lastSegStart; + _tmp$11 = false; + n = _tmp$10; + ok = _tmp$11; + $s = -1; return [n, ok]; + /* */ } return; } if ($f === undefined) { $f = { $blk: formInfo.ptr.prototype.quickSpan }; } $f._1 = _1; $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f.atEOF = atEOF; $f.end = end; $f.f = f; $f.i = i; $f.info = info; $f.j = j; $f.lastCC = lastCC; $f.lastSegStart = lastSegStart; $f.n = n; $f.ok = ok; $f.src = src; $f.ss = ss; $f.ss$24ptr = ss$24ptr; $f.$s = $s; $f.$r = $r; return $f; + }; + formInfo.prototype.quickSpan = function(src, i, end, atEOF) { return this.$val.quickSpan(src, i, end, atEOF); }; + Form.prototype.QuickSpanString = function(s) { + var _r, _tuple, f, n, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; f = $f.f; n = $f.n; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputString(s), input), 0, s.length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n = _tuple[0]; + $s = -1; return n; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.QuickSpanString }; } $f._r = _r; $f._tuple = _tuple; $f.f = f; $f.n = n; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.QuickSpanString = function(s) { return new Form(this.$get()).QuickSpanString(s); }; + Form.prototype.FirstBoundary = function(b) { + var _r, b, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).firstBoundary($clone(inputBytes(b), input), b.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.FirstBoundary }; } $f._r = _r; $f.b = b; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.FirstBoundary = function(b) { return new Form(this.$get()).FirstBoundary(b); }; + Form.prototype.firstBoundary = function(src, nsrc) { + var _r, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; fd = $f.fd; i = $f.i; info = $f.info; nsrc = $f.nsrc; s = $f.s; src = $f.src; ss = $f.ss; ss$24ptr = $f.ss$24ptr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + i = src.skipContinuationBytes(0); + if (i >= nsrc) { + $s = -1; return -1; + } + fd = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + ss = 0; + /* while (true) { */ case 1: + _r = fd.info($clone(src, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if (info.size === 0) { + $s = -1; return -1; + } + s = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); + if (!((s === 0))) { + $s = -1; return i; + } + i = i + (((info.size >> 0))) >> 0; + if (i >= nsrc) { + if (!$clone(info, Properties).BoundaryAfter() && !new streamSafe(ss).isMax()) { + $s = -1; return -1; + } + $s = -1; return nsrc; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.firstBoundary }; } $f._r = _r; $f.f = f; $f.fd = fd; $f.i = i; $f.info = info; $f.nsrc = nsrc; $f.s = s; $f.src = src; $f.ss = ss; $f.ss$24ptr = ss$24ptr; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.firstBoundary = function(src, nsrc) { return new Form(this.$get()).firstBoundary(src, nsrc); }; + Form.prototype.FirstBoundaryInString = function(s) { + var _r, f, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; f = $f.f; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).firstBoundary($clone(inputString(s), input), s.length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.FirstBoundaryInString }; } $f._r = _r; $f.f = f; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.FirstBoundaryInString = function(s) { return new Form(this.$get()).FirstBoundaryInString(s); }; + Form.prototype.NextBoundary = function(b, atEOF) { + var _r, atEOF, b, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; atEOF = $f.atEOF; b = $f.b; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).nextBoundary($clone(inputBytes(b), input), b.$length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.NextBoundary }; } $f._r = _r; $f.atEOF = atEOF; $f.b = b; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.NextBoundary = function(b, atEOF) { return new Form(this.$get()).NextBoundary(b, atEOF); }; + Form.prototype.NextBoundaryInString = function(s, atEOF) { + var _r, atEOF, f, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; atEOF = $f.atEOF; f = $f.f; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = new Form(f).nextBoundary($clone(inputString(s), input), s.length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.NextBoundaryInString }; } $f._r = _r; $f.atEOF = atEOF; $f.f = f; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.NextBoundaryInString = function(s, atEOF) { return new Form(this.$get()).NextBoundaryInString(s, atEOF); }; + Form.prototype.nextBoundary = function(src, nsrc, atEOF) { + var _r, _r$1, atEOF, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; atEOF = $f.atEOF; f = $f.f; fd = $f.fd; i = $f.i; info = $f.info; nsrc = $f.nsrc; s = $f.s; src = $f.src; ss = $f.ss; ss$24ptr = $f.ss$24ptr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + if (nsrc === 0) { + if (atEOF) { + $s = -1; return 0; + } + $s = -1; return -1; + } + fd = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); + _r = fd.info($clone(src, input), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if (info.size === 0) { + if (atEOF) { + $s = -1; return 1; + } + $s = -1; return -1; + } + ss = 0; + (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).first($clone(info, Properties)); + i = ((info.size >> 0)); + /* while (true) { */ case 2: + /* if (!(i < nsrc)) { break; } */ if(!(i < nsrc)) { $s = 3; continue; } + _r$1 = fd.info($clone(src, input), i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + Properties.copy(info, _r$1); + if (info.size === 0) { + if (atEOF) { + $s = -1; return i; + } + $s = -1; return -1; + } + s = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); + if (!((s === 0))) { + $s = -1; return i; + } + i = i + (((info.size >> 0))) >> 0; + /* } */ $s = 2; continue; case 3: + if (!atEOF && !$clone(info, Properties).BoundaryAfter() && !new streamSafe(ss).isMax()) { + $s = -1; return -1; + } + $s = -1; return nsrc; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.nextBoundary }; } $f._r = _r; $f._r$1 = _r$1; $f.atEOF = atEOF; $f.f = f; $f.fd = fd; $f.i = i; $f.info = info; $f.nsrc = nsrc; $f.s = s; $f.src = src; $f.ss = ss; $f.ss$24ptr = ss$24ptr; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.nextBoundary = function(src, nsrc, atEOF) { return new Form(this.$get()).nextBoundary(src, nsrc, atEOF); }; + Form.prototype.LastBoundary = function(b) { + var _r, b, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; b = $f.b; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + _r = lastBoundary(((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]), b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.LastBoundary }; } $f._r = _r; $f.b = b; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.LastBoundary = function(b) { return new Form(this.$get()).LastBoundary(b); }; + lastBoundary = function(fd, b) { + var _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, fd, i, info, p, ss, ss$24ptr, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; fd = $f.fd; i = $f.i; info = $f.info; p = $f.p; ss = $f.ss; ss$24ptr = $f.ss$24ptr; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = b.$length; + _r = lastRuneStart(fd, b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + info = $clone(_tuple[0], Properties); + p = _tuple[1]; + if (p === -1) { + $s = -1; return -1; + } + /* */ if (info.size === 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (info.size === 0) { */ case 2: + if (p === 0) { + $s = -1; return -1; + } + i = p; + _r$1 = lastRuneStart(fd, $subslice(b, 0, i)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + Properties.copy(info, _tuple$1[0]); + p = _tuple$1[1]; + if (p === -1) { + $s = -1; return i; + } + /* } */ case 3: + if (!(((p + ((info.size >> 0)) >> 0) === i))) { + $s = -1; return i; + } + if ($clone(info, Properties).BoundaryAfter()) { + $s = -1; return i; + } + ss = 0; + v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); + i = p; + /* while (true) { */ case 5: + /* if (!(i >= 0 && !((v === 1)))) { break; } */ if(!(i >= 0 && !((v === 1)))) { $s = 6; continue; } + _r$2 = lastRuneStart(fd, $subslice(b, 0, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + Properties.copy(info, _tuple$2[0]); + p = _tuple$2[1]; + v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); + if (v === 2) { + /* break; */ $s = 6; continue; + } + if (!(((p + ((info.size >> 0)) >> 0) === i))) { + if (p === -1) { + $s = -1; return -1; + } + $s = -1; return i; + } + i = p; + /* } */ $s = 5; continue; case 6: + $s = -1; return i; + /* */ } return; } if ($f === undefined) { $f = { $blk: lastBoundary }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.fd = fd; $f.i = i; $f.info = info; $f.p = p; $f.ss = ss; $f.ss$24ptr = ss$24ptr; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + decomposeSegment = function(rb, sp, atEOF) { + var _r, _r$1, _r$2, _r$3, _r$4, atEOF, err, err$1, info, rb, s, s$1, sp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; atEOF = $f.atEOF; err = $f.err; err$1 = $f.err$1; info = $f.info; rb = $f.rb; s = $f.s; s$1 = $f.s$1; sp = $f.sp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = rb.f.info($clone(rb.src, input), sp); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + info = $clone(_r, Properties); + if (info.size === 0) { + $s = -1; return 0; + } + s = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); + /* */ if (s === 1) { $s = 2; continue; } + /* */ if (s === 2) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (s === 1) { */ case 2: + /* */ if (rb.nrune > 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (rb.nrune > 0) { */ case 5: + /* goto end */ $s = 7; continue; + /* } */ case 6: + $s = 4; continue; + /* } else if (s === 2) { */ case 3: + rb.insertCGJ(); + /* goto end */ $s = 7; continue; + /* } */ case 4: + _r$1 = rb.insertFlush($clone(rb.src, input), sp, $clone(info, Properties)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!((err === 0))) { + $s = -1; return ((err >> 0)); + } + /* while (true) { */ case 9: + sp = sp + (((info.size >> 0))) >> 0; + if (sp >= rb.nsrc) { + if (!atEOF && !$clone(info, Properties).BoundaryAfter()) { + $s = -1; return -2; + } + /* break; */ $s = 10; continue; + } + _r$2 = rb.f.info($clone(rb.src, input), sp); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + Properties.copy(info, _r$2); + if (info.size === 0) { + if (!atEOF) { + $s = -1; return -2; + } + /* break; */ $s = 10; continue; + } + s$1 = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); + if (s$1 === 1) { + /* break; */ $s = 10; continue; + } else if (s$1 === 2) { + rb.insertCGJ(); + /* break; */ $s = 10; continue; + } + _r$3 = rb.insertFlush($clone(rb.src, input), sp, $clone(info, Properties)); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$1 = _r$3; + if (!((err$1 === 0))) { + $s = -1; return ((err$1 >> 0)); + } + /* } */ $s = 9; continue; case 10: + /* end: */ case 7: + _r$4 = rb.doFlush(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (!_r$4) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!_r$4) { */ case 13: + $s = -1; return -1; + /* } */ case 14: + $s = -1; return sp; + /* */ } return; } if ($f === undefined) { $f = { $blk: decomposeSegment }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.atEOF = atEOF; $f.err = err; $f.err$1 = err$1; $f.info = info; $f.rb = rb; $f.s = s; $f.s$1 = s$1; $f.sp = sp; $f.$s = $s; $f.$r = $r; return $f; + }; + lastRuneStart = function(fd, buf) { + var _r, buf, fd, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; buf = $f.buf; fd = $f.fd; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = buf.$length - 1 >> 0; + while (true) { + if (!(p >= 0 && !utf8.RuneStart(((p < 0 || p >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + p])))) { break; } + p = p - (1) >> 0; + } + if (p < 0) { + $s = -1; return [new Properties.ptr(0, 0, 0, 0, 0, 0, 0), -1]; + } + _r = fd.info($clone(inputBytes(buf), input), p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return [_r, p]; + /* */ } return; } if ($f === undefined) { $f = { $blk: lastRuneStart }; } $f._r = _r; $f.buf = buf; $f.fd = fd; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + decomposeToLastBoundary = function(rb) { + var _r, _r$1, _tuple, _tuple$1, add, buf, cp, fd, i, info, p, padd, rb, ss, ss$24ptr, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; add = $f.add; buf = $f.buf; cp = $f.cp; fd = $f.fd; i = $f.i; info = $f.info; p = $f.p; padd = $f.padd; rb = $f.rb; ss = $f.ss; ss$24ptr = $f.ss$24ptr; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fd = rb.f; + _r = lastRuneStart(fd, rb.out); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + info = $clone(_tuple[0], Properties); + i = _tuple[1]; + if (!((((info.size >> 0)) === (rb.out.$length - i >> 0)))) { + $s = -1; return; + } + if ($clone(info, Properties).BoundaryAfter()) { + $s = -1; return; + } + add = arrayType$2.zero(); + padd = 0; + ss = 0; + p = rb.out.$length; + /* while (true) { */ case 2: + Properties.copy(((padd < 0 || padd >= add.length) ? ($throwRuntimeError("index out of range"), undefined) : add[padd]), info); + v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); + if (v === 2) { + /* break; */ $s = 3; continue; + } + padd = padd + (1) >> 0; + p = p - (((info.size >> 0))) >> 0; + if ((v === 1) || p < 0) { + /* break; */ $s = 3; continue; + } + _r$1 = lastRuneStart(fd, $subslice(rb.out, 0, p)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + Properties.copy(info, _tuple$1[0]); + i = _tuple$1[1]; + if (!((((info.size >> 0)) === (p - i >> 0)))) { + /* break; */ $s = 3; continue; + } + /* } */ $s = 2; continue; case 3: + rb.ss = ss; + buf = arrayType$1.zero(); + cp = $subslice(new sliceType$4(buf), 0, $copySlice(new sliceType$4(buf), $subslice(rb.out, p))); + rb.out = $subslice(rb.out, 0, p); + padd = padd - (1) >> 0; + /* while (true) { */ case 5: + /* if (!(padd >= 0)) { break; } */ if(!(padd >= 0)) { $s = 6; continue; } + Properties.copy(info, ((padd < 0 || padd >= add.length) ? ($throwRuntimeError("index out of range"), undefined) : add[padd])); + $r = rb.insertUnsafe($clone(inputBytes(cp), input), 0, $clone(info, Properties)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cp = $subslice(cp, info.size); + padd = padd - (1) >> 0; + /* } */ $s = 5; continue; case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: decomposeToLastBoundary }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.add = add; $f.buf = buf; $f.cp = cp; $f.fd = fd; $f.i = i; $f.info = info; $f.p = p; $f.padd = padd; $f.rb = rb; $f.ss = ss; $f.ss$24ptr = ss$24ptr; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + normWriter.ptr.prototype.Write = function(data) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, bn, data, err, i, m, n, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; bn = $f.bn; data = $f.data; err = $f.err; i = $f.i; m = $f.m; n = $f.n; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + /* while (true) { */ case 1: + /* if (!(data.$length > 0)) { break; } */ if(!(data.$length > 0)) { $s = 2; continue; } + m = data.$length; + if (m > 4000) { + m = 4000; + } + input.copy(w.rb.src, inputBytes($subslice(data, 0, m))); + w.rb.nsrc = m; + _r = doAppend(w.rb, w.buf, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + w.buf = _r; + data = $subslice(data, m); + n = n + (m) >> 0; + _r$1 = lastBoundary(w.rb.f, w.buf); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + i = _r$1; + if (i === -1) { + i = 0; + } + /* */ if (i > 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (i > 0) { */ case 5: + _r$2 = w.w.Write($subslice(w.buf, 0, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 2; continue; + } + bn = $copySlice(w.buf, $subslice(w.buf, i)); + w.buf = $subslice(w.buf, 0, bn); + /* } */ case 6: + /* } */ $s = 1; continue; case 2: + _tmp = n; + _tmp$1 = err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: normWriter.ptr.prototype.Write }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.bn = bn; $f.data = data; $f.err = err; $f.i = i; $f.m = m; $f.n = n; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + normWriter.prototype.Write = function(data) { return this.$val.Write(data); }; + normWriter.ptr.prototype.Close = function() { + var _r, _tuple, err, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; err = $f.err; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + /* */ if (w.buf.$length > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (w.buf.$length > 0) { */ case 1: + _r = w.w.Write(w.buf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: normWriter.ptr.prototype.Close }; } $f._r = _r; $f._tuple = _tuple; $f.err = err; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + normWriter.prototype.Close = function() { return this.$val.Close(); }; + Form.prototype.Writer = function(w) { + var f, w, wr; + f = this.$val; + wr = new normWriter.ptr(new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError), w, sliceType$4.nil); + wr.rb.init(f, sliceType$4.nil); + return wr; + }; + $ptrType(Form).prototype.Writer = function(w) { return new Form(this.$get()).Writer(w); }; + normReader.ptr.prototype.Read = function(p) { + var _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, n$1, outn, p, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; n = $f.n; n$1 = $f.n$1; outn = $f.outn; p = $f.p; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* while (true) { */ case 1: + if ((r.lastBoundary - r.bufStart >> 0) > 0) { + n = $copySlice(p, $subslice(r.outbuf, r.bufStart, r.lastBoundary)); + r.bufStart = r.bufStart + (n) >> 0; + if ((r.lastBoundary - r.bufStart >> 0) > 0) { + $s = -1; return [n, $ifaceNil]; + } + $s = -1; return [n, r.err]; + } + if (!($interfaceIsEqual(r.err, $ifaceNil))) { + $s = -1; return [0, r.err]; + } + outn = $copySlice(r.outbuf, $subslice(r.outbuf, r.lastBoundary)); + r.outbuf = $subslice(r.outbuf, 0, outn); + r.bufStart = 0; + _r = r.r.Read(r.inbuf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + n$1 = _tuple[0]; + err = _tuple[1]; + input.copy(r.rb.src, inputBytes($subslice(r.inbuf, 0, n$1))); + _tmp = n$1; + _tmp$1 = err; + r.rb.nsrc = _tmp; + r.err = _tmp$1; + /* */ if (n$1 > 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (n$1 > 0) { */ case 4: + _r$1 = doAppend(r.rb, r.outbuf, 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + r.outbuf = _r$1; + /* } */ case 5: + /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if ($interfaceIsEqual(err, io.EOF)) { */ case 7: + r.lastBoundary = r.outbuf.$length; + $s = 9; continue; + /* } else { */ case 8: + _r$2 = lastBoundary(r.rb.f, r.outbuf); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + r.lastBoundary = _r$2; + if (r.lastBoundary === -1) { + r.lastBoundary = 0; + } + /* } */ case 9: + /* } */ $s = 1; continue; case 2: + $s = -1; return [0, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: normReader.ptr.prototype.Read }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.n$1 = n$1; $f.outn = outn; $f.p = p; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + normReader.prototype.Read = function(p) { return this.$val.Read(p); }; + Form.prototype.Reader = function(r) { + var buf, f, r, rr; + f = this.$val; + buf = $makeSlice(sliceType$4, 4000); + rr = new normReader.ptr(new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError), r, buf, sliceType$4.nil, 0, 0, $ifaceNil); + rr.rb.init(f, buf); + return rr; + }; + $ptrType(Form).prototype.Reader = function(r) { return new Form(this.$get()).Reader(r); }; + nfcTrie.ptr.prototype.lookup = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.$length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.$length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o]); + c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.$length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); + c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); + c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + nfcTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; + nfcTrie.ptr.prototype.lookupString = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1$1 = s.charCodeAt(1); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o]); + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); + c1$2 = s.charCodeAt(1); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); + c2$1 = s.charCodeAt(2); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + nfcTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; + newNfcTrie = function(i) { + var i; + return new nfcTrie.ptr(); + }; + nfcTrie.ptr.prototype.lookupValue = function(n, b) { + var b, n, t, x; + t = this; + if (n < 45) { + return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[x]))); + } else { + n = n - (45) >>> 0; + return (nfcSparse.lookup(n, b)); + } + }; + nfcTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; + nfkcTrie.ptr.prototype.lookup = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.$length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.$length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o]); + c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.$length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); + c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); + c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + nfkcTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; + nfkcTrie.ptr.prototype.lookupString = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1$1 = s.charCodeAt(1); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o]); + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); + c1$2 = s.charCodeAt(1); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); + c2$1 = s.charCodeAt(2); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + nfkcTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; + newNfkcTrie = function(i) { + var i; + return new nfkcTrie.ptr(); + }; + nfkcTrie.ptr.prototype.lookupValue = function(n, b) { + var b, n, t, x; + t = this; + if (n < 91) { + return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[x]))); + } else { + n = n - (91) >>> 0; + return (nfkcSparse.lookup(n, b)); + } + }; + nfkcTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; + Form.prototype.Reset = function() { + }; + $ptrType(Form).prototype.Reset = function() { return new Form(this.$get()).Reset(); }; + Form.prototype.Transform = function(dst, src, atEOF) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, atEOF, b, dst, eof, err, f, i, n, nDst, nSrc, ns, ok, src, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; atEOF = $f.atEOF; b = $f.b; dst = $f.dst; eof = $f.eof; err = $f.err; f = $f.f; i = $f.i; n = $f.n; nDst = $f.nDst; nSrc = $f.nSrc; ns = $f.ns; ok = $f.ok; src = $f.src; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + nDst = 0; + nSrc = 0; + err = $ifaceNil; + f = this.$val; + n = 0; + b = src; + eof = atEOF; + ns = dst.$length; + if (ns < b.$length) { + err = transform.ErrShortDst; + eof = false; + b = $subslice(b, 0, ns); + } + _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), n, b.$length, eof); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + i = _tuple[0]; + ok = _tuple[1]; + n = n + ($copySlice($subslice(dst, n), $subslice(b, n, i))) >> 0; + /* */ if (!ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok) { */ case 2: + _r$1 = new Form(f).transform($subslice(dst, n), $subslice(src, n), atEOF); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + nDst = _tuple$1[0]; + nSrc = _tuple$1[1]; + err = _tuple$1[2]; + _tmp = nDst + n >> 0; + _tmp$1 = nSrc + n >> 0; + _tmp$2 = err; + nDst = _tmp; + nSrc = _tmp$1; + err = _tmp$2; + $s = -1; return [nDst, nSrc, err]; + /* } */ case 3: + if (n < src.$length && !atEOF) { + err = transform.ErrShortSrc; + } + _tmp$3 = n; + _tmp$4 = n; + _tmp$5 = err; + nDst = _tmp$3; + nSrc = _tmp$4; + err = _tmp$5; + $s = -1; return [nDst, nSrc, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.Transform }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.atEOF = atEOF; $f.b = b; $f.dst = dst; $f.eof = eof; $f.err = err; $f.f = f; $f.i = i; $f.n = n; $f.nDst = nDst; $f.nSrc = nSrc; $f.ns = ns; $f.ok = ok; $f.src = src; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.Transform = function(dst, src, atEOF) { return new Form(this.$get()).Transform(dst, src, atEOF); }; + flushTransform = function(rb) { + var rb; + if (rb.out.$length < ($imul(rb.nrune, 4))) { + return false; + } + rb.out = $subslice(rb.out, rb.flushCopy(rb.out)); + return true; + }; + Form.prototype.transform = function(dst, src, atEOF) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, atEOF, dst, end, eof, err, f, n, n$1, nDst, nSrc, ok, rb, src, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; atEOF = $f.atEOF; dst = $f.dst; end = $f.end; eof = $f.eof; err = $f.err; f = $f.f; n = $f.n; n$1 = $f.n$1; nDst = $f.nDst; nSrc = $f.nSrc; ok = $f.ok; rb = $f.rb; src = $f.src; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rb = [rb]; + nDst = 0; + nSrc = 0; + err = $ifaceNil; + f = this.$val; + rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); + rb[0].init(f, src); + /* while (true) { */ case 1: + rb[0].setFlusher($subslice(dst, nDst), flushTransform); + _r = decomposeSegment(rb[0], nSrc, atEOF); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + end = _r; + if (end < 0) { + _tmp = nDst; + _tmp$1 = nSrc; + _tmp$2 = (x = -end, ((x < 0 || x >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + x])); + nDst = _tmp; + nSrc = _tmp$1; + err = _tmp$2; + $s = -1; return [nDst, nSrc, err]; + } + nDst = dst.$length - rb[0].out.$length >> 0; + nSrc = end; + end = rb[0].nsrc; + eof = atEOF; + n = (nSrc + dst.$length >> 0) - nDst >> 0; + if (n < end) { + err = transform.ErrShortDst; + end = n; + eof = false; + } + _r$1 = rb[0].f.quickSpan($clone(rb[0].src, input), nSrc, end, eof); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + end = _tuple[0]; + ok = _tuple[1]; + n$1 = $copySlice($subslice(dst, nDst), $subslice(rb[0].src.bytes, nSrc, end)); + nSrc = nSrc + (n$1) >> 0; + nDst = nDst + (n$1) >> 0; + if (ok) { + if (n$1 < rb[0].nsrc && !atEOF) { + err = transform.ErrShortSrc; + } + _tmp$3 = nDst; + _tmp$4 = nSrc; + _tmp$5 = err; + nDst = _tmp$3; + nSrc = _tmp$4; + err = _tmp$5; + $s = -1; return [nDst, nSrc, err]; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return [nDst, nSrc, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Form.prototype.transform }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.atEOF = atEOF; $f.dst = dst; $f.end = end; $f.eof = eof; $f.err = err; $f.f = f; $f.n = n; $f.n$1 = n$1; $f.nDst = nDst; $f.nSrc = nSrc; $f.ok = ok; $f.rb = rb; $f.src = src; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Form).prototype.transform = function(dst, src, atEOF) { return new Form(this.$get()).transform(dst, src, atEOF); }; + sparseBlocks.ptr.prototype.lookup = function(n, b) { + var _q, b, header, hi, lo, m, n, offset, r, t, x, x$1, x$2; + t = this; + offset = (x = t.offset, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])); + header = $clone((x$1 = t.values, ((offset < 0 || offset >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + offset])), valueRange); + lo = offset + 1 << 16 >>> 16; + hi = lo + ((header.lo << 16 >>> 16)) << 16 >>> 16; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo << 16 >>> 16)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) << 16 >>> 16; + r = $clone((x$2 = t.values, ((m < 0 || m >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + m])), valueRange); + if (r.lo <= b && b <= r.hi) { + return r.value + ((((b - r.lo << 24 >>> 24) << 16 >>> 16)) * header.value << 16 >>> 16) << 16 >>> 16; + } + if (b < r.lo) { + hi = m; + } else { + lo = m + 1 << 16 >>> 16; + } + } + return 0; + }; + sparseBlocks.prototype.lookup = function(n, b) { return this.$val.lookup(n, b); }; + streamSafe.methods = [{prop: "isMax", name: "isMax", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}]; + ptrType$1.methods = [{prop: "first", name: "first", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Properties], [], false)}, {prop: "next", name: "next", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Properties], [ssState], false)}, {prop: "backwards", name: "backwards", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Properties], [ssState], false)}]; + ptrType$2.methods = [{prop: "init", name: "init", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Form, sliceType$4], [], false)}, {prop: "initString", name: "initString", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Form, $String], [], false)}, {prop: "setFlusher", name: "setFlusher", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4, funcType], [], false)}, {prop: "reset", name: "reset", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "doFlush", name: "doFlush", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "flush", name: "flush", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [sliceType$4], false)}, {prop: "flushCopy", name: "flushCopy", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "insertOrdered", name: "insertOrdered", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([Properties], [], false)}, {prop: "insertFlush", name: "insertFlush", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [insertErr], false)}, {prop: "insertUnsafe", name: "insertUnsafe", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [], false)}, {prop: "insertDecomposed", name: "insertDecomposed", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [insertErr], false)}, {prop: "insertSingle", name: "insertSingle", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [], false)}, {prop: "insertCGJ", name: "insertCGJ", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "appendRune", name: "appendRune", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int32], [], false)}, {prop: "assignRune", name: "assignRune", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int, $Int32], [], false)}, {prop: "runeAt", name: "runeAt", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Int32], false)}, {prop: "bytesAt", name: "bytesAt", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [sliceType$4], false)}, {prop: "decomposeHangul", name: "decomposeHangul", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int32], [], false)}, {prop: "combineHangul", name: "combineHangul", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int, $Int, $Int], [], false)}, {prop: "compose", name: "compose", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [], false)}]; + Properties.methods = [{prop: "BoundaryBefore", name: "BoundaryBefore", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "BoundaryAfter", name: "BoundaryAfter", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "isYesC", name: "isYesC", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "isYesD", name: "isYesD", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "combinesForward", name: "combinesForward", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "combinesBackward", name: "combinesBackward", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "hasDecomposition", name: "hasDecomposition", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "isInert", name: "isInert", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "multiSegment", name: "multiSegment", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "nLeadingNonStarters", name: "nLeadingNonStarters", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Uint8], false)}, {prop: "nTrailingNonStarters", name: "nTrailingNonStarters", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [$Uint8], false)}, {prop: "Decomposition", name: "Decomposition", pkg: "", typ: $funcType([], [sliceType$4], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CCC", name: "CCC", pkg: "", typ: $funcType([], [$Uint8], false)}, {prop: "LeadCCC", name: "LeadCCC", pkg: "", typ: $funcType([], [$Uint8], false)}, {prop: "TrailCCC", name: "TrailCCC", pkg: "", typ: $funcType([], [$Uint8], false)}]; + ptrType.methods = [{prop: "quickSpan", name: "quickSpan", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int, $Int, $Bool], [$Int, $Bool], false)}]; + ptrType$3.methods = [{prop: "setBytes", name: "setBytes", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [], false)}, {prop: "setString", name: "setString", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$String], [], false)}, {prop: "_byte", name: "_byte", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint8], false)}, {prop: "skipASCII", name: "skipASCII", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "skipContinuationBytes", name: "skipContinuationBytes", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Int], false)}, {prop: "appendSlice", name: "appendSlice", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4, $Int, $Int], [sliceType$4], false)}, {prop: "copySlice", name: "copySlice", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4, $Int, $Int], [$Int], false)}, {prop: "charinfoNFC", name: "charinfoNFC", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint16, $Int], false)}, {prop: "charinfoNFKC", name: "charinfoNFKC", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint16, $Int], false)}, {prop: "hangul", name: "hangul", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int], [$Int32], false)}]; + ptrType$4.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([Form, sliceType$4], [], false)}, {prop: "InitString", name: "InitString", pkg: "", typ: $funcType([Form, $String], [], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "returnSlice", name: "returnSlice", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Int, $Int], [sliceType$4], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "setDone", name: "setDone", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([], [sliceType$4], false)}]; + Form.methods = [{prop: "Properties", name: "Properties", pkg: "", typ: $funcType([sliceType$4], [Properties], false)}, {prop: "PropertiesString", name: "PropertiesString", pkg: "", typ: $funcType([$String], [Properties], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([sliceType$4], [sliceType$4], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "IsNormal", name: "IsNormal", pkg: "", typ: $funcType([sliceType$4], [$Bool], false)}, {prop: "IsNormalString", name: "IsNormalString", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([sliceType$4, sliceType$4], [sliceType$4], true)}, {prop: "doAppend", name: "doAppend", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4, input, $Int], [sliceType$4], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([sliceType$4, $String], [sliceType$4], false)}, {prop: "QuickSpan", name: "QuickSpan", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "Span", name: "Span", pkg: "", typ: $funcType([sliceType$4, $Bool], [$Int, $error], false)}, {prop: "SpanString", name: "SpanString", pkg: "", typ: $funcType([$String, $Bool], [$Int, $error], false)}, {prop: "QuickSpanString", name: "QuickSpanString", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "FirstBoundary", name: "FirstBoundary", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "firstBoundary", name: "firstBoundary", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int], [$Int], false)}, {prop: "FirstBoundaryInString", name: "FirstBoundaryInString", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "NextBoundary", name: "NextBoundary", pkg: "", typ: $funcType([sliceType$4, $Bool], [$Int], false)}, {prop: "NextBoundaryInString", name: "NextBoundaryInString", pkg: "", typ: $funcType([$String, $Bool], [$Int], false)}, {prop: "nextBoundary", name: "nextBoundary", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([input, $Int, $Bool], [$Int], false)}, {prop: "LastBoundary", name: "LastBoundary", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "Writer", name: "Writer", pkg: "", typ: $funcType([io.Writer], [io.WriteCloser], false)}, {prop: "Reader", name: "Reader", pkg: "", typ: $funcType([io.Reader], [io.Reader], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Transform", name: "Transform", pkg: "", typ: $funcType([sliceType$4, sliceType$4, $Bool], [$Int, $Int, $error], false)}, {prop: "transform", name: "transform", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4, sliceType$4, $Bool], [$Int, $Int, $error], false)}]; + ptrType$5.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$6.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}]; + ptrType$7.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; + ptrType$8.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; + ptrType$9.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; + reorderBuffer.init("vendor/golang_org/x/text/unicode/norm", [{prop: "rune", name: "rune", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "byte$1", name: "byte", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "nbyte", name: "nbyte", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "ss", name: "ss", embedded: false, exported: false, typ: streamSafe, tag: ""}, {prop: "nrune", name: "nrune", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "f", name: "f", embedded: false, exported: false, typ: formInfo, tag: ""}, {prop: "src", name: "src", embedded: false, exported: false, typ: input, tag: ""}, {prop: "nsrc", name: "nsrc", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tmpBytes", name: "tmpBytes", embedded: false, exported: false, typ: input, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "flushF", name: "flushF", embedded: false, exported: false, typ: funcType, tag: ""}]); + Properties.init("vendor/golang_org/x/text/unicode/norm", [{prop: "pos", name: "pos", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "ccc", name: "ccc", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "tccc", name: "tccc", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "nLead", name: "nLead", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: qcInfo, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: $Uint16, tag: ""}]); + lookupFunc.init([input, $Int], [Properties], false); + formInfo.init("vendor/golang_org/x/text/unicode/norm", [{prop: "form", name: "form", embedded: false, exported: false, typ: Form, tag: ""}, {prop: "composing", name: "composing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "compatibility", name: "compatibility", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: lookupFunc, tag: ""}, {prop: "nextMain", name: "nextMain", embedded: false, exported: false, typ: iterFunc, tag: ""}]); + input.init("vendor/golang_org/x/text/unicode/norm", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + Iter.init("vendor/golang_org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: Properties, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: iterFunc, tag: ""}, {prop: "asciiF", name: "asciiF", embedded: false, exported: false, typ: iterFunc, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "multiSeg", name: "multiSeg", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + iterFunc.init([ptrType$4], [sliceType$4], false); + normWriter.init("vendor/golang_org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + normReader.init("vendor/golang_org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "inbuf", name: "inbuf", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "outbuf", name: "outbuf", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "bufStart", name: "bufStart", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastBoundary", name: "lastBoundary", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + nfcTrie.init("", []); + nfkcTrie.init("", []); + valueRange.init("vendor/golang_org/x/text/unicode/norm", [{prop: "value", name: "value", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + sparseBlocks.init("vendor/golang_org/x/text/unicode/norm", [{prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: sliceType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = transform.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ccc = $toNativeArray($kindUint8, [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 84, 91, 103, 107, 118, 122, 129, 130, 132, 202, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 233, 234, 240]); + decomps = $toNativeArray($kindUint8, [0, 65, 32, 65, 33, 65, 34, 65, 35, 65, 36, 65, 37, 65, 38, 65, 39, 65, 40, 65, 41, 65, 42, 65, 43, 65, 44, 65, 45, 65, 46, 65, 47, 65, 48, 65, 49, 65, 50, 65, 51, 65, 52, 65, 53, 65, 54, 65, 55, 65, 56, 65, 57, 65, 58, 65, 59, 65, 60, 65, 61, 65, 62, 65, 63, 65, 64, 65, 65, 65, 66, 65, 67, 65, 68, 65, 69, 65, 70, 65, 71, 65, 72, 65, 73, 65, 74, 65, 75, 65, 76, 65, 77, 65, 78, 65, 79, 65, 80, 65, 81, 65, 82, 65, 83, 65, 84, 65, 85, 65, 86, 65, 87, 65, 88, 65, 89, 65, 90, 65, 91, 65, 92, 65, 93, 65, 94, 65, 95, 65, 96, 65, 97, 65, 98, 65, 99, 65, 100, 65, 101, 65, 102, 65, 103, 65, 104, 65, 105, 65, 106, 65, 107, 65, 108, 65, 109, 65, 110, 65, 111, 65, 112, 65, 113, 65, 114, 65, 115, 65, 116, 65, 117, 65, 118, 65, 119, 65, 120, 65, 121, 65, 122, 65, 123, 65, 124, 65, 125, 65, 126, 66, 194, 162, 66, 194, 163, 66, 194, 165, 66, 194, 166, 66, 194, 172, 66, 194, 183, 66, 195, 134, 66, 195, 176, 66, 196, 166, 66, 196, 167, 66, 196, 177, 66, 197, 139, 66, 197, 147, 66, 198, 142, 66, 198, 144, 66, 198, 171, 66, 200, 162, 66, 200, 183, 66, 201, 144, 66, 201, 145, 66, 201, 146, 66, 201, 148, 66, 201, 149, 66, 201, 153, 66, 201, 155, 66, 201, 156, 66, 201, 159, 66, 201, 161, 66, 201, 163, 66, 201, 165, 66, 201, 166, 66, 201, 168, 66, 201, 169, 66, 201, 170, 66, 201, 171, 66, 201, 173, 66, 201, 175, 66, 201, 176, 66, 201, 177, 66, 201, 178, 66, 201, 179, 66, 201, 180, 66, 201, 181, 66, 201, 184, 66, 201, 185, 66, 201, 187, 66, 202, 129, 66, 202, 130, 66, 202, 131, 66, 202, 137, 66, 202, 138, 66, 202, 139, 66, 202, 140, 66, 202, 144, 66, 202, 145, 66, 202, 146, 66, 202, 149, 66, 202, 157, 66, 202, 159, 66, 202, 185, 66, 206, 145, 66, 206, 146, 66, 206, 147, 66, 206, 148, 66, 206, 149, 66, 206, 150, 66, 206, 151, 66, 206, 152, 66, 206, 153, 66, 206, 154, 66, 206, 155, 66, 206, 156, 66, 206, 157, 66, 206, 158, 66, 206, 159, 66, 206, 160, 66, 206, 161, 66, 206, 163, 66, 206, 164, 66, 206, 165, 66, 206, 166, 66, 206, 167, 66, 206, 168, 66, 206, 169, 66, 206, 177, 66, 206, 178, 66, 206, 179, 66, 206, 180, 66, 206, 181, 66, 206, 182, 66, 206, 183, 66, 206, 184, 66, 206, 185, 66, 206, 186, 66, 206, 187, 66, 206, 188, 66, 206, 189, 66, 206, 190, 66, 206, 191, 66, 207, 128, 66, 207, 129, 66, 207, 130, 66, 207, 131, 66, 207, 132, 66, 207, 133, 66, 207, 134, 66, 207, 135, 66, 207, 136, 66, 207, 137, 66, 207, 156, 66, 207, 157, 66, 208, 189, 66, 209, 138, 66, 209, 140, 66, 215, 144, 66, 215, 145, 66, 215, 146, 66, 215, 147, 66, 215, 148, 66, 215, 155, 66, 215, 156, 66, 215, 157, 66, 215, 162, 66, 215, 168, 66, 215, 170, 66, 216, 161, 66, 216, 167, 66, 216, 168, 66, 216, 169, 66, 216, 170, 66, 216, 171, 66, 216, 172, 66, 216, 173, 66, 216, 174, 66, 216, 175, 66, 216, 176, 66, 216, 177, 66, 216, 178, 66, 216, 179, 66, 216, 180, 66, 216, 181, 66, 216, 182, 66, 216, 183, 66, 216, 184, 66, 216, 185, 66, 216, 186, 66, 217, 129, 66, 217, 130, 66, 217, 131, 66, 217, 132, 66, 217, 133, 66, 217, 134, 66, 217, 135, 66, 217, 136, 66, 217, 137, 66, 217, 138, 66, 217, 174, 66, 217, 175, 66, 217, 177, 66, 217, 185, 66, 217, 186, 66, 217, 187, 66, 217, 190, 66, 217, 191, 66, 218, 128, 66, 218, 131, 66, 218, 132, 66, 218, 134, 66, 218, 135, 66, 218, 136, 66, 218, 140, 66, 218, 141, 66, 218, 142, 66, 218, 145, 66, 218, 152, 66, 218, 161, 66, 218, 164, 66, 218, 166, 66, 218, 169, 66, 218, 173, 66, 218, 175, 66, 218, 177, 66, 218, 179, 66, 218, 186, 66, 218, 187, 66, 218, 190, 66, 219, 129, 66, 219, 133, 66, 219, 134, 66, 219, 135, 66, 219, 136, 66, 219, 137, 66, 219, 139, 66, 219, 140, 66, 219, 144, 66, 219, 146, 67, 224, 188, 139, 67, 225, 131, 156, 67, 225, 132, 128, 67, 225, 132, 129, 67, 225, 132, 130, 67, 225, 132, 131, 67, 225, 132, 132, 67, 225, 132, 133, 67, 225, 132, 134, 67, 225, 132, 135, 67, 225, 132, 136, 67, 225, 132, 137, 67, 225, 132, 138, 67, 225, 132, 139, 67, 225, 132, 140, 67, 225, 132, 141, 67, 225, 132, 142, 67, 225, 132, 143, 67, 225, 132, 144, 67, 225, 132, 145, 67, 225, 132, 146, 67, 225, 132, 148, 67, 225, 132, 149, 67, 225, 132, 154, 67, 225, 132, 156, 67, 225, 132, 157, 67, 225, 132, 158, 67, 225, 132, 160, 67, 225, 132, 161, 67, 225, 132, 162, 67, 225, 132, 163, 67, 225, 132, 167, 67, 225, 132, 169, 67, 225, 132, 171, 67, 225, 132, 172, 67, 225, 132, 173, 67, 225, 132, 174, 67, 225, 132, 175, 67, 225, 132, 178, 67, 225, 132, 182, 67, 225, 133, 128, 67, 225, 133, 135, 67, 225, 133, 140, 67, 225, 133, 151, 67, 225, 133, 152, 67, 225, 133, 153, 67, 225, 133, 160, 67, 225, 134, 132, 67, 225, 134, 133, 67, 225, 134, 136, 67, 225, 134, 145, 67, 225, 134, 146, 67, 225, 134, 148, 67, 225, 134, 158, 67, 225, 134, 161, 67, 225, 135, 135, 67, 225, 135, 136, 67, 225, 135, 140, 67, 225, 135, 142, 67, 225, 135, 147, 67, 225, 135, 151, 67, 225, 135, 153, 67, 225, 135, 157, 67, 225, 135, 159, 67, 225, 135, 177, 67, 225, 135, 178, 67, 225, 180, 130, 67, 225, 180, 150, 67, 225, 180, 151, 67, 225, 180, 156, 67, 225, 180, 157, 67, 225, 180, 165, 67, 225, 181, 187, 67, 225, 182, 133, 67, 226, 128, 130, 67, 226, 128, 131, 67, 226, 128, 144, 67, 226, 128, 147, 67, 226, 128, 148, 67, 226, 130, 169, 67, 226, 134, 144, 67, 226, 134, 145, 67, 226, 134, 146, 67, 226, 134, 147, 67, 226, 136, 130, 67, 226, 136, 135, 67, 226, 136, 145, 67, 226, 136, 146, 67, 226, 148, 130, 67, 226, 150, 160, 67, 226, 151, 139, 67, 226, 166, 133, 67, 226, 166, 134, 67, 226, 181, 161, 67, 227, 128, 129, 67, 227, 128, 130, 67, 227, 128, 136, 67, 227, 128, 137, 67, 227, 128, 138, 67, 227, 128, 139, 67, 227, 128, 140, 67, 227, 128, 141, 67, 227, 128, 142, 67, 227, 128, 143, 67, 227, 128, 144, 67, 227, 128, 145, 67, 227, 128, 146, 67, 227, 128, 148, 67, 227, 128, 149, 67, 227, 128, 150, 67, 227, 128, 151, 67, 227, 130, 161, 67, 227, 130, 162, 67, 227, 130, 163, 67, 227, 130, 164, 67, 227, 130, 165, 67, 227, 130, 166, 67, 227, 130, 167, 67, 227, 130, 168, 67, 227, 130, 169, 67, 227, 130, 170, 67, 227, 130, 171, 67, 227, 130, 173, 67, 227, 130, 175, 67, 227, 130, 177, 67, 227, 130, 179, 67, 227, 130, 181, 67, 227, 130, 183, 67, 227, 130, 185, 67, 227, 130, 187, 67, 227, 130, 189, 67, 227, 130, 191, 67, 227, 131, 129, 67, 227, 131, 131, 67, 227, 131, 132, 67, 227, 131, 134, 67, 227, 131, 136, 67, 227, 131, 138, 67, 227, 131, 139, 67, 227, 131, 140, 67, 227, 131, 141, 67, 227, 131, 142, 67, 227, 131, 143, 67, 227, 131, 146, 67, 227, 131, 149, 67, 227, 131, 152, 67, 227, 131, 155, 67, 227, 131, 158, 67, 227, 131, 159, 67, 227, 131, 160, 67, 227, 131, 161, 67, 227, 131, 162, 67, 227, 131, 163, 67, 227, 131, 164, 67, 227, 131, 165, 67, 227, 131, 166, 67, 227, 131, 167, 67, 227, 131, 168, 67, 227, 131, 169, 67, 227, 131, 170, 67, 227, 131, 171, 67, 227, 131, 172, 67, 227, 131, 173, 67, 227, 131, 175, 67, 227, 131, 176, 67, 227, 131, 177, 67, 227, 131, 178, 67, 227, 131, 179, 67, 227, 131, 187, 67, 227, 131, 188, 67, 227, 146, 158, 67, 227, 146, 185, 67, 227, 146, 187, 67, 227, 147, 159, 67, 227, 148, 149, 67, 227, 155, 174, 67, 227, 155, 188, 67, 227, 158, 129, 67, 227, 160, 175, 67, 227, 161, 162, 67, 227, 161, 188, 67, 227, 163, 135, 67, 227, 163, 163, 67, 227, 164, 156, 67, 227, 164, 186, 67, 227, 168, 174, 67, 227, 169, 172, 67, 227, 171, 164, 67, 227, 172, 136, 67, 227, 172, 153, 67, 227, 173, 137, 67, 227, 174, 157, 67, 227, 176, 152, 67, 227, 177, 142, 67, 227, 180, 179, 67, 227, 182, 150, 67, 227, 186, 172, 67, 227, 186, 184, 67, 227, 188, 155, 67, 227, 191, 188, 67, 228, 128, 136, 67, 228, 128, 152, 67, 228, 128, 185, 67, 228, 129, 134, 67, 228, 130, 150, 67, 228, 131, 163, 67, 228, 132, 175, 67, 228, 136, 130, 67, 228, 136, 167, 67, 228, 138, 160, 67, 228, 140, 129, 67, 228, 140, 180, 67, 228, 141, 153, 67, 228, 143, 149, 67, 228, 143, 153, 67, 228, 144, 139, 67, 228, 145, 171, 67, 228, 148, 171, 67, 228, 149, 157, 67, 228, 149, 161, 67, 228, 149, 171, 67, 228, 151, 151, 67, 228, 151, 185, 67, 228, 152, 181, 67, 228, 154, 190, 67, 228, 155, 135, 67, 228, 166, 149, 67, 228, 167, 166, 67, 228, 169, 174, 67, 228, 169, 182, 67, 228, 170, 178, 67, 228, 172, 179, 67, 228, 175, 142, 67, 228, 179, 142, 67, 228, 179, 173, 67, 228, 179, 184, 67, 228, 181, 150, 67, 228, 184, 128, 67, 228, 184, 129, 67, 228, 184, 131, 67, 228, 184, 137, 67, 228, 184, 138, 67, 228, 184, 139, 67, 228, 184, 141, 67, 228, 184, 153, 67, 228, 184, 166, 67, 228, 184, 168, 67, 228, 184, 173, 67, 228, 184, 178, 67, 228, 184, 182, 67, 228, 184, 184, 67, 228, 184, 185, 67, 228, 184, 189, 67, 228, 184, 191, 67, 228, 185, 129, 67, 228, 185, 153, 67, 228, 185, 157, 67, 228, 186, 130, 67, 228, 186, 133, 67, 228, 186, 134, 67, 228, 186, 140, 67, 228, 186, 148, 67, 228, 186, 160, 67, 228, 186, 164, 67, 228, 186, 174, 67, 228, 186, 186, 67, 228, 187, 128, 67, 228, 187, 140, 67, 228, 187, 164, 67, 228, 188, 129, 67, 228, 188, 145, 67, 228, 189, 160, 67, 228, 190, 128, 67, 228, 190, 134, 67, 228, 190, 139, 67, 228, 190, 174, 67, 228, 190, 187, 67, 228, 190, 191, 67, 229, 128, 130, 67, 229, 128, 171, 67, 229, 129, 186, 67, 229, 130, 153, 67, 229, 131, 143, 67, 229, 131, 154, 67, 229, 131, 167, 67, 229, 132, 170, 67, 229, 132, 191, 67, 229, 133, 128, 67, 229, 133, 133, 67, 229, 133, 141, 67, 229, 133, 148, 67, 229, 133, 164, 67, 229, 133, 165, 67, 229, 133, 167, 67, 229, 133, 168, 67, 229, 133, 169, 67, 229, 133, 171, 67, 229, 133, 173, 67, 229, 133, 183, 67, 229, 134, 128, 67, 229, 134, 130, 67, 229, 134, 141, 67, 229, 134, 146, 67, 229, 134, 149, 67, 229, 134, 150, 67, 229, 134, 151, 67, 229, 134, 153, 67, 229, 134, 164, 67, 229, 134, 171, 67, 229, 134, 172, 67, 229, 134, 181, 67, 229, 134, 183, 67, 229, 135, 137, 67, 229, 135, 140, 67, 229, 135, 156, 67, 229, 135, 158, 67, 229, 135, 160, 67, 229, 135, 181, 67, 229, 136, 128, 67, 229, 136, 131, 67, 229, 136, 135, 67, 229, 136, 151, 67, 229, 136, 157, 67, 229, 136, 169, 67, 229, 136, 186, 67, 229, 136, 187, 67, 229, 137, 134, 67, 229, 137, 141, 67, 229, 137, 178, 67, 229, 137, 183, 67, 229, 138, 137, 67, 229, 138, 155, 67, 229, 138, 163, 67, 229, 138, 179, 67, 229, 138, 180, 67, 229, 139, 135, 67, 229, 139, 137, 67, 229, 139, 146, 67, 229, 139, 158, 67, 229, 139, 164, 67, 229, 139, 181, 67, 229, 139, 185, 67, 229, 139, 186, 67, 229, 140, 133, 67, 229, 140, 134, 67, 229, 140, 149, 67, 229, 140, 151, 67, 229, 140, 154, 67, 229, 140, 184, 67, 229, 140, 187, 67, 229, 140, 191, 67, 229, 141, 129, 67, 229, 141, 132, 67, 229, 141, 133, 67, 229, 141, 137, 67, 229, 141, 145, 67, 229, 141, 148, 67, 229, 141, 154, 67, 229, 141, 156, 67, 229, 141, 169, 67, 229, 141, 176, 67, 229, 141, 179, 67, 229, 141, 181, 67, 229, 141, 189, 67, 229, 141, 191, 67, 229, 142, 130, 67, 229, 142, 182, 67, 229, 143, 131, 67, 229, 143, 136, 67, 229, 143, 138, 67, 229, 143, 140, 67, 229, 143, 159, 67, 229, 143, 163, 67, 229, 143, 165, 67, 229, 143, 171, 67, 229, 143, 175, 67, 229, 143, 177, 67, 229, 143, 179, 67, 229, 144, 134, 67, 229, 144, 136, 67, 229, 144, 141, 67, 229, 144, 143, 67, 229, 144, 157, 67, 229, 144, 184, 67, 229, 144, 185, 67, 229, 145, 130, 67, 229, 145, 136, 67, 229, 145, 168, 67, 229, 146, 158, 67, 229, 146, 162, 67, 229, 146, 189, 67, 229, 147, 182, 67, 229, 148, 144, 67, 229, 149, 143, 67, 229, 149, 147, 67, 229, 149, 149, 67, 229, 149, 163, 67, 229, 150, 132, 67, 229, 150, 135, 67, 229, 150, 153, 67, 229, 150, 157, 67, 229, 150, 171, 67, 229, 150, 179, 67, 229, 150, 182, 67, 229, 151, 128, 67, 229, 151, 130, 67, 229, 151, 162, 67, 229, 152, 134, 67, 229, 153, 145, 67, 229, 153, 168, 67, 229, 153, 180, 67, 229, 155, 151, 67, 229, 155, 155, 67, 229, 155, 185, 67, 229, 156, 150, 67, 229, 156, 151, 67, 229, 156, 159, 67, 229, 156, 176, 67, 229, 158, 139, 67, 229, 159, 142, 67, 229, 159, 180, 67, 229, 160, 141, 67, 229, 160, 177, 67, 229, 160, 178, 67, 229, 161, 128, 67, 229, 161, 154, 67, 229, 161, 158, 67, 229, 162, 168, 67, 229, 162, 172, 67, 229, 162, 179, 67, 229, 163, 152, 67, 229, 163, 159, 67, 229, 163, 171, 67, 229, 163, 174, 67, 229, 163, 176, 67, 229, 163, 178, 67, 229, 163, 183, 67, 229, 164, 130, 67, 229, 164, 134, 67, 229, 164, 138, 67, 229, 164, 149, 67, 229, 164, 154, 67, 229, 164, 156, 67, 229, 164, 162, 67, 229, 164, 167, 67, 229, 164, 169, 67, 229, 165, 132, 67, 229, 165, 136, 67, 229, 165, 145, 67, 229, 165, 148, 67, 229, 165, 162, 67, 229, 165, 179, 67, 229, 167, 152, 67, 229, 167, 172, 67, 229, 168, 155, 67, 229, 168, 167, 67, 229, 169, 162, 67, 229, 169, 166, 67, 229, 170, 181, 67, 229, 172, 136, 67, 229, 172, 168, 67, 229, 172, 190, 67, 229, 173, 144, 67, 229, 173, 151, 67, 229, 173, 166, 67, 229, 174, 128, 67, 229, 174, 133, 67, 229, 174, 151, 67, 229, 175, 131, 67, 229, 175, 152, 67, 229, 175, 167, 67, 229, 175, 174, 67, 229, 175, 179, 67, 229, 175, 184, 67, 229, 175, 191, 67, 229, 176, 134, 67, 229, 176, 143, 67, 229, 176, 162, 67, 229, 176, 184, 67, 229, 176, 191, 67, 229, 177, 160, 67, 229, 177, 162, 67, 229, 177, 164, 67, 229, 177, 165, 67, 229, 177, 174, 67, 229, 177, 177, 67, 229, 178, 141, 67, 229, 179, 128, 67, 229, 180, 153, 67, 229, 181, 131, 67, 229, 181, 144, 67, 229, 181, 171, 67, 229, 181, 174, 67, 229, 181, 188, 67, 229, 182, 178, 67, 229, 182, 186, 67, 229, 183, 155, 67, 229, 183, 161, 67, 229, 183, 162, 67, 229, 183, 165, 67, 229, 183, 166, 67, 229, 183, 177, 67, 229, 183, 189, 67, 229, 183, 190, 67, 229, 184, 168, 67, 229, 184, 189, 67, 229, 185, 169, 67, 229, 185, 178, 67, 229, 185, 180, 67, 229, 185, 186, 67, 229, 185, 188, 67, 229, 185, 191, 67, 229, 186, 166, 67, 229, 186, 176, 67, 229, 186, 179, 67, 229, 186, 182, 67, 229, 187, 137, 67, 229, 187, 138, 67, 229, 187, 146, 67, 229, 187, 147, 67, 229, 187, 153, 67, 229, 187, 172, 67, 229, 187, 180, 67, 229, 187, 190, 67, 229, 188, 132, 67, 229, 188, 139, 67, 229, 188, 147, 67, 229, 188, 162, 67, 229, 189, 144, 67, 229, 189, 147, 67, 229, 189, 161, 67, 229, 189, 162, 67, 229, 189, 169, 67, 229, 189, 171, 67, 229, 189, 179, 67, 229, 190, 139, 67, 229, 190, 140, 67, 229, 190, 151, 67, 229, 190, 154, 67, 229, 190, 169, 67, 229, 190, 173, 67, 229, 191, 131, 67, 229, 191, 141, 67, 229, 191, 151, 67, 229, 191, 181, 67, 229, 191, 185, 67, 230, 128, 146, 67, 230, 128, 156, 67, 230, 129, 181, 67, 230, 130, 129, 67, 230, 130, 148, 67, 230, 131, 135, 67, 230, 131, 152, 67, 230, 131, 161, 67, 230, 132, 136, 67, 230, 133, 132, 67, 230, 133, 136, 67, 230, 133, 140, 67, 230, 133, 142, 67, 230, 133, 160, 67, 230, 133, 168, 67, 230, 133, 186, 67, 230, 134, 142, 67, 230, 134, 144, 67, 230, 134, 164, 67, 230, 134, 175, 67, 230, 134, 178, 67, 230, 135, 158, 67, 230, 135, 178, 67, 230, 135, 182, 67, 230, 136, 128, 67, 230, 136, 136, 67, 230, 136, 144, 67, 230, 136, 155, 67, 230, 136, 174, 67, 230, 136, 180, 67, 230, 136, 182, 67, 230, 137, 139, 67, 230, 137, 147, 67, 230, 137, 157, 67, 230, 138, 149, 67, 230, 138, 177, 67, 230, 139, 137, 67, 230, 139, 143, 67, 230, 139, 147, 67, 230, 139, 148, 67, 230, 139, 188, 67, 230, 139, 190, 67, 230, 140, 135, 67, 230, 140, 189, 67, 230, 141, 144, 67, 230, 141, 149, 67, 230, 141, 168, 67, 230, 141, 187, 67, 230, 142, 131, 67, 230, 142, 160, 67, 230, 142, 169, 67, 230, 143, 132, 67, 230, 143, 133, 67, 230, 143, 164, 67, 230, 144, 156, 67, 230, 144, 162, 67, 230, 145, 146, 67, 230, 145, 169, 67, 230, 145, 183, 67, 230, 145, 190, 67, 230, 146, 154, 67, 230, 146, 157, 67, 230, 147, 132, 67, 230, 148, 175, 67, 230, 148, 180, 67, 230, 149, 143, 67, 230, 149, 150, 67, 230, 149, 172, 67, 230, 149, 184, 67, 230, 150, 135, 67, 230, 150, 151, 67, 230, 150, 153, 67, 230, 150, 164, 67, 230, 150, 176, 67, 230, 150, 185, 67, 230, 151, 133, 67, 230, 151, 160, 67, 230, 151, 162, 67, 230, 151, 163, 67, 230, 151, 165, 67, 230, 152, 147, 67, 230, 152, 160, 67, 230, 153, 137, 67, 230, 153, 180, 67, 230, 154, 136, 67, 230, 154, 145, 67, 230, 154, 156, 67, 230, 154, 180, 67, 230, 155, 134, 67, 230, 155, 176, 67, 230, 155, 180, 67, 230, 155, 184, 67, 230, 156, 128, 67, 230, 156, 136, 67, 230, 156, 137, 67, 230, 156, 151, 67, 230, 156, 155, 67, 230, 156, 161, 67, 230, 156, 168, 67, 230, 157, 142, 67, 230, 157, 147, 67, 230, 157, 150, 67, 230, 157, 158, 67, 230, 157, 187, 67, 230, 158, 133, 67, 230, 158, 151, 67, 230, 159, 179, 67, 230, 159, 186, 67, 230, 160, 151, 67, 230, 160, 159, 67, 230, 160, 170, 67, 230, 161, 146, 67, 230, 162, 129, 67, 230, 162, 133, 67, 230, 162, 142, 67, 230, 162, 168, 67, 230, 164, 148, 67, 230, 165, 130, 67, 230, 166, 163, 67, 230, 167, 170, 67, 230, 168, 130, 67, 230, 168, 147, 67, 230, 170, 168, 67, 230, 171, 147, 67, 230, 171, 155, 67, 230, 172, 132, 67, 230, 172, 160, 67, 230, 172, 161, 67, 230, 173, 148, 67, 230, 173, 162, 67, 230, 173, 163, 67, 230, 173, 178, 67, 230, 173, 183, 67, 230, 173, 185, 67, 230, 174, 159, 67, 230, 174, 174, 67, 230, 174, 179, 67, 230, 174, 186, 67, 230, 174, 187, 67, 230, 175, 139, 67, 230, 175, 141, 67, 230, 175, 148, 67, 230, 175, 155, 67, 230, 176, 143, 67, 230, 176, 148, 67, 230, 176, 180, 67, 230, 177, 142, 67, 230, 177, 167, 67, 230, 178, 136, 67, 230, 178, 191, 67, 230, 179, 140, 67, 230, 179, 141, 67, 230, 179, 165, 67, 230, 179, 168, 67, 230, 180, 150, 67, 230, 180, 155, 67, 230, 180, 158, 67, 230, 180, 180, 67, 230, 180, 190, 67, 230, 181, 129, 67, 230, 181, 169, 67, 230, 181, 170, 67, 230, 181, 183, 67, 230, 181, 184, 67, 230, 182, 133, 67, 230, 183, 139, 67, 230, 183, 154, 67, 230, 183, 170, 67, 230, 183, 185, 67, 230, 184, 154, 67, 230, 184, 175, 67, 230, 185, 174, 67, 230, 186, 128, 67, 230, 186, 156, 67, 230, 186, 186, 67, 230, 187, 135, 67, 230, 187, 139, 67, 230, 187, 145, 67, 230, 187, 155, 67, 230, 188, 143, 67, 230, 188, 148, 67, 230, 188, 162, 67, 230, 188, 163, 67, 230, 189, 174, 67, 230, 191, 134, 67, 230, 191, 171, 67, 230, 191, 190, 67, 231, 128, 155, 67, 231, 128, 158, 67, 231, 128, 185, 67, 231, 129, 138, 67, 231, 129, 171, 67, 231, 129, 176, 67, 231, 129, 183, 67, 231, 129, 189, 67, 231, 130, 153, 67, 231, 130, 173, 67, 231, 131, 136, 67, 231, 131, 153, 67, 231, 132, 161, 67, 231, 133, 133, 67, 231, 133, 137, 67, 231, 133, 174, 67, 231, 134, 156, 67, 231, 135, 142, 67, 231, 135, 144, 67, 231, 136, 144, 67, 231, 136, 155, 67, 231, 136, 168, 67, 231, 136, 170, 67, 231, 136, 171, 67, 231, 136, 181, 67, 231, 136, 182, 67, 231, 136, 187, 67, 231, 136, 191, 67, 231, 137, 135, 67, 231, 137, 144, 67, 231, 137, 153, 67, 231, 137, 155, 67, 231, 137, 162, 67, 231, 137, 185, 67, 231, 138, 128, 67, 231, 138, 149, 67, 231, 138, 172, 67, 231, 138, 175, 67, 231, 139, 128, 67, 231, 139, 188, 67, 231, 140, 170, 67, 231, 141, 181, 67, 231, 141, 186, 67, 231, 142, 132, 67, 231, 142, 135, 67, 231, 142, 137, 67, 231, 142, 139, 67, 231, 142, 165, 67, 231, 142, 178, 67, 231, 143, 158, 67, 231, 144, 134, 67, 231, 144, 137, 67, 231, 144, 162, 67, 231, 145, 135, 67, 231, 145, 156, 67, 231, 145, 169, 67, 231, 145, 177, 67, 231, 146, 133, 67, 231, 146, 137, 67, 231, 146, 152, 67, 231, 147, 138, 67, 231, 147, 156, 67, 231, 147, 166, 67, 231, 148, 134, 67, 231, 148, 152, 67, 231, 148, 159, 67, 231, 148, 164, 67, 231, 148, 168, 67, 231, 148, 176, 67, 231, 148, 178, 67, 231, 148, 179, 67, 231, 148, 183, 67, 231, 148, 187, 67, 231, 148, 190, 67, 231, 149, 153, 67, 231, 149, 165, 67, 231, 149, 176, 67, 231, 150, 139, 67, 231, 150, 146, 67, 231, 151, 162, 67, 231, 152, 144, 67, 231, 152, 157, 67, 231, 152, 159, 67, 231, 153, 130, 67, 231, 153, 169, 67, 231, 153, 182, 67, 231, 153, 189, 67, 231, 154, 174, 67, 231, 154, 191, 67, 231, 155, 138, 67, 231, 155, 155, 67, 231, 155, 163, 67, 231, 155, 167, 67, 231, 155, 174, 67, 231, 155, 180, 67, 231, 156, 129, 67, 231, 156, 158, 67, 231, 156, 159, 67, 231, 157, 128, 67, 231, 157, 138, 67, 231, 158, 139, 67, 231, 158, 167, 67, 231, 159, 155, 67, 231, 159, 162, 67, 231, 159, 179, 67, 231, 161, 142, 67, 231, 161, 171, 67, 231, 162, 140, 67, 231, 162, 145, 67, 231, 163, 138, 67, 231, 163, 140, 67, 231, 163, 187, 67, 231, 164, 170, 67, 231, 164, 186, 67, 231, 164, 188, 67, 231, 164, 190, 67, 231, 165, 136, 67, 231, 165, 137, 67, 231, 165, 144, 67, 231, 165, 150, 67, 231, 165, 157, 67, 231, 165, 158, 67, 231, 165, 165, 67, 231, 165, 191, 67, 231, 166, 129, 67, 231, 166, 141, 67, 231, 166, 142, 67, 231, 166, 143, 67, 231, 166, 174, 67, 231, 166, 184, 67, 231, 166, 190, 67, 231, 167, 138, 67, 231, 167, 152, 67, 231, 167, 171, 67, 231, 168, 156, 67, 231, 169, 128, 67, 231, 169, 138, 67, 231, 169, 143, 67, 231, 169, 180, 67, 231, 169, 186, 67, 231, 170, 129, 67, 231, 170, 177, 67, 231, 171, 139, 67, 231, 171, 174, 67, 231, 171, 185, 67, 231, 172, 160, 67, 231, 174, 143, 67, 231, 175, 128, 67, 231, 175, 134, 67, 231, 175, 137, 67, 231, 176, 190, 67, 231, 177, 160, 67, 231, 177, 179, 67, 231, 177, 187, 67, 231, 178, 146, 67, 231, 178, 190, 67, 231, 179, 146, 67, 231, 179, 150, 67, 231, 179, 163, 67, 231, 179, 167, 67, 231, 179, 168, 67, 231, 179, 184, 67, 231, 180, 128, 67, 231, 180, 144, 67, 231, 180, 162, 67, 231, 180, 175, 67, 231, 181, 130, 67, 231, 181, 155, 67, 231, 181, 163, 67, 231, 182, 160, 67, 231, 182, 190, 67, 231, 183, 135, 67, 231, 183, 180, 67, 231, 184, 130, 67, 231, 184, 137, 67, 231, 184, 183, 67, 231, 185, 129, 67, 231, 185, 133, 67, 231, 188, 182, 67, 231, 188, 190, 67, 231, 189, 145, 67, 231, 189, 178, 67, 231, 189, 185, 67, 231, 189, 186, 67, 231, 190, 133, 67, 231, 190, 138, 67, 231, 190, 149, 67, 231, 190, 154, 67, 231, 190, 189, 67, 231, 191, 186, 67, 232, 128, 129, 67, 232, 128, 133, 67, 232, 128, 140, 67, 232, 128, 146, 67, 232, 128, 179, 67, 232, 129, 134, 67, 232, 129, 160, 67, 232, 129, 175, 67, 232, 129, 176, 67, 232, 129, 190, 67, 232, 129, 191, 67, 232, 130, 137, 67, 232, 130, 139, 67, 232, 130, 173, 67, 232, 130, 178, 67, 232, 132, 131, 67, 232, 132, 190, 67, 232, 135, 152, 67, 232, 135, 163, 67, 232, 135, 168, 67, 232, 135, 170, 67, 232, 135, 173, 67, 232, 135, 179, 67, 232, 135, 188, 67, 232, 136, 129, 67, 232, 136, 132, 67, 232, 136, 140, 67, 232, 136, 152, 67, 232, 136, 155, 67, 232, 136, 159, 67, 232, 137, 174, 67, 232, 137, 175, 67, 232, 137, 178, 67, 232, 137, 184, 67, 232, 137, 185, 67, 232, 138, 139, 67, 232, 138, 145, 67, 232, 138, 157, 67, 232, 138, 177, 67, 232, 138, 179, 67, 232, 138, 189, 67, 232, 139, 165, 67, 232, 139, 166, 67, 232, 140, 157, 67, 232, 140, 163, 67, 232, 140, 182, 67, 232, 141, 146, 67, 232, 141, 147, 67, 232, 141, 163, 67, 232, 142, 173, 67, 232, 142, 189, 67, 232, 143, 137, 67, 232, 143, 138, 67, 232, 143, 140, 67, 232, 143, 156, 67, 232, 143, 167, 67, 232, 143, 175, 67, 232, 143, 177, 67, 232, 144, 189, 67, 232, 145, 137, 67, 232, 145, 151, 67, 232, 147, 174, 67, 232, 147, 177, 67, 232, 147, 179, 67, 232, 147, 188, 67, 232, 148, 150, 67, 232, 149, 164, 67, 232, 151, 141, 67, 232, 151, 186, 67, 232, 152, 134, 67, 232, 152, 146, 67, 232, 152, 173, 67, 232, 152, 191, 67, 232, 153, 141, 67, 232, 153, 144, 67, 232, 153, 156, 67, 232, 153, 167, 67, 232, 153, 169, 67, 232, 153, 171, 67, 232, 154, 136, 67, 232, 154, 169, 67, 232, 155, 162, 67, 232, 156, 142, 67, 232, 156, 168, 67, 232, 157, 171, 67, 232, 157, 185, 67, 232, 158, 134, 67, 232, 158, 186, 67, 232, 159, 161, 67, 232, 160, 129, 67, 232, 160, 159, 67, 232, 161, 128, 67, 232, 161, 140, 67, 232, 161, 160, 67, 232, 161, 163, 67, 232, 163, 130, 67, 232, 163, 143, 67, 232, 163, 151, 67, 232, 163, 158, 67, 232, 163, 161, 67, 232, 163, 184, 67, 232, 163, 186, 67, 232, 164, 144, 67, 232, 165, 129, 67, 232, 165, 164, 67, 232, 165, 190, 67, 232, 166, 134, 67, 232, 166, 139, 67, 232, 166, 150, 67, 232, 167, 146, 67, 232, 167, 163, 67, 232, 168, 128, 67, 232, 170, 160, 67, 232, 170, 170, 67, 232, 170, 191, 67, 232, 171, 139, 67, 232, 171, 146, 67, 232, 171, 150, 67, 232, 171, 173, 67, 232, 171, 184, 67, 232, 171, 190, 67, 232, 172, 129, 67, 232, 172, 185, 67, 232, 173, 152, 67, 232, 174, 128, 67, 232, 174, 138, 67, 232, 176, 183, 67, 232, 177, 134, 67, 232, 177, 136, 67, 232, 177, 149, 67, 232, 177, 184, 67, 232, 178, 157, 67, 232, 178, 161, 67, 232, 178, 169, 67, 232, 178, 171, 67, 232, 179, 129, 67, 232, 179, 130, 67, 232, 179, 135, 67, 232, 179, 136, 67, 232, 179, 147, 67, 232, 180, 136, 67, 232, 180, 155, 67, 232, 181, 164, 67, 232, 181, 176, 67, 232, 181, 183, 67, 232, 182, 179, 67, 232, 182, 188, 67, 232, 183, 139, 67, 232, 183, 175, 67, 232, 183, 176, 67, 232, 186, 171, 67, 232, 187, 138, 67, 232, 187, 148, 67, 232, 188, 166, 67, 232, 188, 170, 67, 232, 188, 184, 67, 232, 188, 187, 67, 232, 189, 162, 67, 232, 190, 155, 67, 232, 190, 158, 67, 232, 190, 176, 67, 232, 190, 181, 67, 232, 190, 182, 67, 233, 128, 163, 67, 233, 128, 184, 67, 233, 129, 138, 67, 233, 129, 169, 67, 233, 129, 178, 67, 233, 129, 188, 67, 233, 130, 143, 67, 233, 130, 145, 67, 233, 130, 148, 67, 233, 131, 142, 67, 233, 131, 158, 67, 233, 131, 177, 67, 233, 131, 189, 67, 233, 132, 145, 67, 233, 132, 155, 67, 233, 133, 137, 67, 233, 133, 141, 67, 233, 133, 170, 67, 233, 134, 153, 67, 233, 134, 180, 67, 233, 135, 134, 67, 233, 135, 140, 67, 233, 135, 143, 67, 233, 135, 145, 67, 233, 136, 180, 67, 233, 136, 184, 67, 233, 137, 182, 67, 233, 137, 188, 67, 233, 139, 151, 67, 233, 139, 152, 67, 233, 140, 132, 67, 233, 141, 138, 67, 233, 143, 185, 67, 233, 144, 149, 67, 233, 149, 183, 67, 233, 150, 128, 67, 233, 150, 139, 67, 233, 150, 173, 67, 233, 150, 183, 67, 233, 152, 156, 67, 233, 152, 174, 67, 233, 153, 139, 67, 233, 153, 141, 67, 233, 153, 181, 67, 233, 153, 184, 67, 233, 153, 188, 67, 233, 154, 134, 67, 233, 154, 163, 67, 233, 154, 182, 67, 233, 154, 183, 67, 233, 154, 184, 67, 233, 154, 185, 67, 233, 155, 131, 67, 233, 155, 162, 67, 233, 155, 163, 67, 233, 155, 168, 67, 233, 155, 182, 67, 233, 155, 183, 67, 233, 156, 163, 67, 233, 156, 178, 67, 233, 157, 136, 67, 233, 157, 145, 67, 233, 157, 150, 67, 233, 157, 158, 67, 233, 157, 162, 67, 233, 157, 169, 67, 233, 159, 139, 67, 233, 159, 155, 67, 233, 159, 160, 67, 233, 159, 173, 67, 233, 159, 179, 67, 233, 159, 191, 67, 233, 160, 129, 67, 233, 160, 133, 67, 233, 160, 139, 67, 233, 160, 152, 67, 233, 160, 169, 67, 233, 160, 187, 67, 233, 161, 158, 67, 233, 162, 168, 67, 233, 163, 155, 67, 233, 163, 159, 67, 233, 163, 162, 67, 233, 163, 175, 67, 233, 163, 188, 67, 233, 164, 168, 67, 233, 164, 169, 67, 233, 166, 150, 67, 233, 166, 153, 67, 233, 166, 167, 67, 233, 166, 172, 67, 233, 167, 130, 67, 233, 167, 177, 67, 233, 167, 190, 67, 233, 169, 170, 67, 233, 170, 168, 67, 233, 171, 152, 67, 233, 171, 159, 67, 233, 172, 146, 67, 233, 172, 165, 67, 233, 172, 175, 67, 233, 172, 178, 67, 233, 172, 188, 67, 233, 173, 154, 67, 233, 173, 175, 67, 233, 177, 128, 67, 233, 177, 151, 67, 233, 179, 165, 67, 233, 179, 189, 67, 233, 181, 167, 67, 233, 182, 180, 67, 233, 183, 186, 67, 233, 184, 158, 67, 233, 185, 181, 67, 233, 185, 191, 67, 233, 186, 151, 67, 233, 186, 159, 67, 233, 186, 165, 67, 233, 186, 187, 67, 233, 187, 131, 67, 233, 187, 141, 67, 233, 187, 142, 67, 233, 187, 145, 67, 233, 187, 185, 67, 233, 187, 189, 67, 233, 187, 190, 67, 233, 188, 133, 67, 233, 188, 142, 67, 233, 188, 143, 67, 233, 188, 147, 67, 233, 188, 150, 67, 233, 188, 160, 67, 233, 188, 187, 67, 233, 189, 131, 67, 233, 189, 138, 67, 233, 189, 146, 67, 233, 190, 141, 67, 233, 190, 142, 67, 233, 190, 156, 67, 233, 190, 159, 67, 233, 190, 160, 67, 234, 156, 167, 67, 234, 157, 175, 67, 234, 172, 183, 67, 234, 173, 146, 68, 240, 160, 132, 162, 68, 240, 160, 148, 156, 68, 240, 160, 148, 165, 68, 240, 160, 149, 139, 68, 240, 160, 152, 186, 68, 240, 160, 160, 132, 68, 240, 160, 163, 158, 68, 240, 160, 168, 172, 68, 240, 160, 173, 163, 68, 240, 161, 147, 164, 68, 240, 161, 154, 168, 68, 240, 161, 155, 170, 68, 240, 161, 167, 136, 68, 240, 161, 172, 152, 68, 240, 161, 180, 139, 68, 240, 161, 183, 164, 68, 240, 161, 183, 166, 68, 240, 162, 134, 131, 68, 240, 162, 134, 159, 68, 240, 162, 140, 177, 68, 240, 162, 155, 148, 68, 240, 162, 161, 132, 68, 240, 162, 161, 138, 68, 240, 162, 172, 140, 68, 240, 162, 175, 177, 68, 240, 163, 128, 138, 68, 240, 163, 138, 184, 68, 240, 163, 141, 159, 68, 240, 163, 142, 147, 68, 240, 163, 142, 156, 68, 240, 163, 143, 131, 68, 240, 163, 143, 149, 68, 240, 163, 145, 173, 68, 240, 163, 154, 163, 68, 240, 163, 162, 167, 68, 240, 163, 170, 141, 68, 240, 163, 171, 186, 68, 240, 163, 178, 188, 68, 240, 163, 180, 158, 68, 240, 163, 187, 145, 68, 240, 163, 189, 158, 68, 240, 163, 190, 142, 68, 240, 164, 137, 163, 68, 240, 164, 139, 174, 68, 240, 164, 142, 171, 68, 240, 164, 152, 136, 68, 240, 164, 156, 181, 68, 240, 164, 160, 148, 68, 240, 164, 176, 182, 68, 240, 164, 178, 146, 68, 240, 164, 190, 161, 68, 240, 164, 190, 184, 68, 240, 165, 129, 132, 68, 240, 165, 131, 178, 68, 240, 165, 131, 179, 68, 240, 165, 132, 153, 68, 240, 165, 132, 179, 68, 240, 165, 137, 137, 68, 240, 165, 144, 157, 68, 240, 165, 152, 166, 68, 240, 165, 154, 154, 68, 240, 165, 155, 133, 68, 240, 165, 165, 188, 68, 240, 165, 170, 167, 68, 240, 165, 174, 171, 68, 240, 165, 178, 128, 68, 240, 165, 179, 144, 68, 240, 165, 190, 134, 68, 240, 166, 135, 154, 68, 240, 166, 136, 168, 68, 240, 166, 137, 135, 68, 240, 166, 139, 153, 68, 240, 166, 140, 190, 68, 240, 166, 147, 154, 68, 240, 166, 148, 163, 68, 240, 166, 150, 168, 68, 240, 166, 158, 167, 68, 240, 166, 158, 181, 68, 240, 166, 172, 188, 68, 240, 166, 176, 182, 68, 240, 166, 179, 149, 68, 240, 166, 181, 171, 68, 240, 166, 188, 172, 68, 240, 166, 190, 177, 68, 240, 167, 131, 146, 68, 240, 167, 143, 138, 68, 240, 167, 153, 167, 68, 240, 167, 162, 174, 68, 240, 167, 165, 166, 68, 240, 167, 178, 168, 68, 240, 167, 187, 147, 68, 240, 167, 188, 175, 68, 240, 168, 151, 146, 68, 240, 168, 151, 173, 68, 240, 168, 156, 174, 68, 240, 168, 175, 186, 68, 240, 168, 181, 183, 68, 240, 169, 133, 133, 68, 240, 169, 135, 159, 68, 240, 169, 136, 154, 68, 240, 169, 144, 138, 68, 240, 169, 146, 150, 68, 240, 169, 150, 182, 68, 240, 169, 172, 176, 68, 240, 170, 131, 142, 68, 240, 170, 132, 133, 68, 240, 170, 136, 142, 68, 240, 170, 138, 145, 68, 240, 170, 142, 146, 68, 240, 170, 152, 128, 66, 33, 33, 66, 33, 63, 66, 46, 46, 66, 48, 44, 66, 48, 46, 66, 49, 44, 66, 49, 46, 66, 49, 48, 66, 49, 49, 66, 49, 50, 66, 49, 51, 66, 49, 52, 66, 49, 53, 66, 49, 54, 66, 49, 55, 66, 49, 56, 66, 49, 57, 66, 50, 44, 66, 50, 46, 66, 50, 48, 66, 50, 49, 66, 50, 50, 66, 50, 51, 66, 50, 52, 66, 50, 53, 66, 50, 54, 66, 50, 55, 66, 50, 56, 66, 50, 57, 66, 51, 44, 66, 51, 46, 66, 51, 48, 66, 51, 49, 66, 51, 50, 66, 51, 51, 66, 51, 52, 66, 51, 53, 66, 51, 54, 66, 51, 55, 66, 51, 56, 66, 51, 57, 66, 52, 44, 66, 52, 46, 66, 52, 48, 66, 52, 49, 66, 52, 50, 66, 52, 51, 66, 52, 52, 66, 52, 53, 66, 52, 54, 66, 52, 55, 66, 52, 56, 66, 52, 57, 66, 53, 44, 66, 53, 46, 66, 53, 48, 66, 54, 44, 66, 54, 46, 66, 55, 44, 66, 55, 46, 66, 56, 44, 66, 56, 46, 66, 57, 44, 66, 57, 46, 66, 61, 61, 66, 63, 33, 66, 63, 63, 66, 65, 85, 66, 66, 113, 66, 67, 68, 66, 68, 74, 66, 68, 90, 66, 68, 122, 66, 71, 66, 66, 71, 121, 66, 72, 80, 66, 72, 86, 66, 72, 103, 66, 72, 122, 66, 73, 73, 66, 73, 74, 66, 73, 85, 66, 73, 86, 66, 73, 88, 66, 75, 66, 66, 75, 75, 66, 75, 77, 66, 76, 74, 66, 76, 106, 66, 77, 66, 66, 77, 67, 66, 77, 68, 66, 77, 86, 66, 77, 87, 66, 78, 74, 66, 78, 106, 66, 78, 111, 66, 80, 72, 66, 80, 82, 66, 80, 97, 66, 82, 115, 66, 83, 68, 66, 83, 77, 66, 83, 83, 66, 83, 118, 66, 84, 77, 66, 86, 73, 66, 87, 67, 66, 87, 90, 66, 87, 98, 66, 88, 73, 66, 99, 99, 66, 99, 100, 66, 99, 109, 66, 100, 66, 66, 100, 97, 66, 100, 108, 66, 100, 109, 66, 100, 122, 66, 101, 86, 66, 102, 102, 66, 102, 105, 66, 102, 108, 66, 102, 109, 66, 104, 97, 66, 105, 105, 66, 105, 106, 66, 105, 110, 66, 105, 118, 66, 105, 120, 66, 107, 65, 66, 107, 86, 66, 107, 87, 66, 107, 103, 66, 107, 108, 66, 107, 109, 66, 107, 116, 66, 108, 106, 66, 108, 109, 66, 108, 110, 66, 108, 120, 66, 109, 50, 66, 109, 51, 66, 109, 65, 66, 109, 86, 66, 109, 87, 66, 109, 98, 66, 109, 103, 66, 109, 108, 66, 109, 109, 66, 109, 115, 66, 110, 65, 66, 110, 70, 66, 110, 86, 66, 110, 87, 66, 110, 106, 66, 110, 109, 66, 110, 115, 66, 111, 86, 66, 112, 65, 66, 112, 70, 66, 112, 86, 66, 112, 87, 66, 112, 99, 66, 112, 115, 66, 115, 114, 66, 115, 116, 66, 118, 105, 66, 120, 105, 67, 40, 49, 41, 67, 40, 50, 41, 67, 40, 51, 41, 67, 40, 52, 41, 67, 40, 53, 41, 67, 40, 54, 41, 67, 40, 55, 41, 67, 40, 56, 41, 67, 40, 57, 41, 67, 40, 65, 41, 67, 40, 66, 41, 67, 40, 67, 41, 67, 40, 68, 41, 67, 40, 69, 41, 67, 40, 70, 41, 67, 40, 71, 41, 67, 40, 72, 41, 67, 40, 73, 41, 67, 40, 74, 41, 67, 40, 75, 41, 67, 40, 76, 41, 67, 40, 77, 41, 67, 40, 78, 41, 67, 40, 79, 41, 67, 40, 80, 41, 67, 40, 81, 41, 67, 40, 82, 41, 67, 40, 83, 41, 67, 40, 84, 41, 67, 40, 85, 41, 67, 40, 86, 41, 67, 40, 87, 41, 67, 40, 88, 41, 67, 40, 89, 41, 67, 40, 90, 41, 67, 40, 97, 41, 67, 40, 98, 41, 67, 40, 99, 41, 67, 40, 100, 41, 67, 40, 101, 41, 67, 40, 102, 41, 67, 40, 103, 41, 67, 40, 104, 41, 67, 40, 105, 41, 67, 40, 106, 41, 67, 40, 107, 41, 67, 40, 108, 41, 67, 40, 109, 41, 67, 40, 110, 41, 67, 40, 111, 41, 67, 40, 112, 41, 67, 40, 113, 41, 67, 40, 114, 41, 67, 40, 115, 41, 67, 40, 116, 41, 67, 40, 117, 41, 67, 40, 118, 41, 67, 40, 119, 41, 67, 40, 120, 41, 67, 40, 121, 41, 67, 40, 122, 41, 67, 46, 46, 46, 67, 49, 48, 46, 67, 49, 49, 46, 67, 49, 50, 46, 67, 49, 51, 46, 67, 49, 52, 46, 67, 49, 53, 46, 67, 49, 54, 46, 67, 49, 55, 46, 67, 49, 56, 46, 67, 49, 57, 46, 67, 50, 48, 46, 67, 58, 58, 61, 67, 61, 61, 61, 67, 67, 111, 46, 67, 70, 65, 88, 67, 71, 72, 122, 67, 71, 80, 97, 67, 73, 73, 73, 67, 76, 84, 68, 67, 76, 194, 183, 67, 77, 72, 122, 67, 77, 80, 97, 67, 77, 206, 169, 67, 80, 80, 77, 67, 80, 80, 86, 67, 80, 84, 69, 67, 84, 69, 76, 67, 84, 72, 122, 67, 86, 73, 73, 67, 88, 73, 73, 67, 97, 47, 99, 67, 97, 47, 115, 67, 97, 202, 190, 67, 98, 97, 114, 67, 99, 47, 111, 67, 99, 47, 117, 67, 99, 97, 108, 67, 99, 109, 50, 67, 99, 109, 51, 67, 100, 109, 50, 67, 100, 109, 51, 67, 101, 114, 103, 67, 102, 102, 105, 67, 102, 102, 108, 67, 103, 97, 108, 67, 104, 80, 97, 67, 105, 105, 105, 67, 107, 72, 122, 67, 107, 80, 97, 67, 107, 109, 50, 67, 107, 109, 51, 67, 107, 206, 169, 67, 108, 111, 103, 67, 108, 194, 183, 67, 109, 105, 108, 67, 109, 109, 50, 67, 109, 109, 51, 67, 109, 111, 108, 67, 114, 97, 100, 67, 118, 105, 105, 67, 120, 105, 105, 67, 194, 176, 67, 67, 194, 176, 70, 67, 202, 188, 110, 67, 206, 188, 65, 67, 206, 188, 70, 67, 206, 188, 86, 67, 206, 188, 87, 67, 206, 188, 103, 67, 206, 188, 108, 67, 206, 188, 109, 67, 206, 188, 115, 68, 40, 49, 48, 41, 68, 40, 49, 49, 41, 68, 40, 49, 50, 41, 68, 40, 49, 51, 41, 68, 40, 49, 52, 41, 68, 40, 49, 53, 41, 68, 40, 49, 54, 41, 68, 40, 49, 55, 41, 68, 40, 49, 56, 41, 68, 40, 49, 57, 41, 68, 40, 50, 48, 41, 68, 48, 231, 130, 185, 68, 49, 226, 129, 132, 68, 49, 230, 151, 165, 68, 49, 230, 156, 136, 68, 49, 231, 130, 185, 68, 50, 230, 151, 165, 68, 50, 230, 156, 136, 68, 50, 231, 130, 185, 68, 51, 230, 151, 165, 68, 51, 230, 156, 136, 68, 51, 231, 130, 185, 68, 52, 230, 151, 165, 68, 52, 230, 156, 136, 68, 52, 231, 130, 185, 68, 53, 230, 151, 165, 68, 53, 230, 156, 136, 68, 53, 231, 130, 185, 68, 54, 230, 151, 165, 68, 54, 230, 156, 136, 68, 54, 231, 130, 185, 68, 55, 230, 151, 165, 68, 55, 230, 156, 136, 68, 55, 231, 130, 185, 68, 56, 230, 151, 165, 68, 56, 230, 156, 136, 68, 56, 231, 130, 185, 68, 57, 230, 151, 165, 68, 57, 230, 156, 136, 68, 57, 231, 130, 185, 68, 86, 73, 73, 73, 68, 97, 46, 109, 46, 68, 107, 99, 97, 108, 68, 112, 46, 109, 46, 68, 118, 105, 105, 105, 68, 213, 165, 214, 130, 68, 213, 180, 213, 165, 68, 213, 180, 213, 171, 68, 213, 180, 213, 173, 68, 213, 180, 213, 182, 68, 213, 190, 213, 182, 68, 215, 144, 215, 156, 68, 216, 167, 217, 180, 68, 216, 168, 216, 172, 68, 216, 168, 216, 173, 68, 216, 168, 216, 174, 68, 216, 168, 216, 177, 68, 216, 168, 216, 178, 68, 216, 168, 217, 133, 68, 216, 168, 217, 134, 68, 216, 168, 217, 135, 68, 216, 168, 217, 137, 68, 216, 168, 217, 138, 68, 216, 170, 216, 172, 68, 216, 170, 216, 173, 68, 216, 170, 216, 174, 68, 216, 170, 216, 177, 68, 216, 170, 216, 178, 68, 216, 170, 217, 133, 68, 216, 170, 217, 134, 68, 216, 170, 217, 135, 68, 216, 170, 217, 137, 68, 216, 170, 217, 138, 68, 216, 171, 216, 172, 68, 216, 171, 216, 177, 68, 216, 171, 216, 178, 68, 216, 171, 217, 133, 68, 216, 171, 217, 134, 68, 216, 171, 217, 135, 68, 216, 171, 217, 137, 68, 216, 171, 217, 138, 68, 216, 172, 216, 173, 68, 216, 172, 217, 133, 68, 216, 172, 217, 137, 68, 216, 172, 217, 138, 68, 216, 173, 216, 172, 68, 216, 173, 217, 133, 68, 216, 173, 217, 137, 68, 216, 173, 217, 138, 68, 216, 174, 216, 172, 68, 216, 174, 216, 173, 68, 216, 174, 217, 133, 68, 216, 174, 217, 137, 68, 216, 174, 217, 138, 68, 216, 179, 216, 172, 68, 216, 179, 216, 173, 68, 216, 179, 216, 174, 68, 216, 179, 216, 177, 68, 216, 179, 217, 133, 68, 216, 179, 217, 135, 68, 216, 179, 217, 137, 68, 216, 179, 217, 138, 68, 216, 180, 216, 172, 68, 216, 180, 216, 173, 68, 216, 180, 216, 174, 68, 216, 180, 216, 177, 68, 216, 180, 217, 133, 68, 216, 180, 217, 135, 68, 216, 180, 217, 137, 68, 216, 180, 217, 138, 68, 216, 181, 216, 173, 68, 216, 181, 216, 174, 68, 216, 181, 216, 177, 68, 216, 181, 217, 133, 68, 216, 181, 217, 137, 68, 216, 181, 217, 138, 68, 216, 182, 216, 172, 68, 216, 182, 216, 173, 68, 216, 182, 216, 174, 68, 216, 182, 216, 177, 68, 216, 182, 217, 133, 68, 216, 182, 217, 137, 68, 216, 182, 217, 138, 68, 216, 183, 216, 173, 68, 216, 183, 217, 133, 68, 216, 183, 217, 137, 68, 216, 183, 217, 138, 68, 216, 184, 217, 133, 68, 216, 185, 216, 172, 68, 216, 185, 217, 133, 68, 216, 185, 217, 137, 68, 216, 185, 217, 138, 68, 216, 186, 216, 172, 68, 216, 186, 217, 133, 68, 216, 186, 217, 137, 68, 216, 186, 217, 138, 68, 217, 129, 216, 172, 68, 217, 129, 216, 173, 68, 217, 129, 216, 174, 68, 217, 129, 217, 133, 68, 217, 129, 217, 137, 68, 217, 129, 217, 138, 68, 217, 130, 216, 173, 68, 217, 130, 217, 133, 68, 217, 130, 217, 137, 68, 217, 130, 217, 138, 68, 217, 131, 216, 167, 68, 217, 131, 216, 172, 68, 217, 131, 216, 173, 68, 217, 131, 216, 174, 68, 217, 131, 217, 132, 68, 217, 131, 217, 133, 68, 217, 131, 217, 137, 68, 217, 131, 217, 138, 68, 217, 132, 216, 167, 68, 217, 132, 216, 172, 68, 217, 132, 216, 173, 68, 217, 132, 216, 174, 68, 217, 132, 217, 133, 68, 217, 132, 217, 135, 68, 217, 132, 217, 137, 68, 217, 132, 217, 138, 68, 217, 133, 216, 167, 68, 217, 133, 216, 172, 68, 217, 133, 216, 173, 68, 217, 133, 216, 174, 68, 217, 133, 217, 133, 68, 217, 133, 217, 137, 68, 217, 133, 217, 138, 68, 217, 134, 216, 172, 68, 217, 134, 216, 173, 68, 217, 134, 216, 174, 68, 217, 134, 216, 177, 68, 217, 134, 216, 178, 68, 217, 134, 217, 133, 68, 217, 134, 217, 134, 68, 217, 134, 217, 135, 68, 217, 134, 217, 137, 68, 217, 134, 217, 138, 68, 217, 135, 216, 172, 68, 217, 135, 217, 133, 68, 217, 135, 217, 137, 68, 217, 135, 217, 138, 68, 217, 136, 217, 180, 68, 217, 138, 216, 172, 68, 217, 138, 216, 173, 68, 217, 138, 216, 174, 68, 217, 138, 216, 177, 68, 217, 138, 216, 178, 68, 217, 138, 217, 133, 68, 217, 138, 217, 134, 68, 217, 138, 217, 135, 68, 217, 138, 217, 137, 68, 217, 138, 217, 138, 68, 217, 138, 217, 180, 68, 219, 135, 217, 180, 69, 40, 225, 132, 128, 41, 69, 40, 225, 132, 130, 41, 69, 40, 225, 132, 131, 41, 69, 40, 225, 132, 133, 41, 69, 40, 225, 132, 134, 41, 69, 40, 225, 132, 135, 41, 69, 40, 225, 132, 137, 41, 69, 40, 225, 132, 139, 41, 69, 40, 225, 132, 140, 41, 69, 40, 225, 132, 142, 41, 69, 40, 225, 132, 143, 41, 69, 40, 225, 132, 144, 41, 69, 40, 225, 132, 145, 41, 69, 40, 225, 132, 146, 41, 69, 40, 228, 184, 128, 41, 69, 40, 228, 184, 131, 41, 69, 40, 228, 184, 137, 41, 69, 40, 228, 185, 157, 41, 69, 40, 228, 186, 140, 41, 69, 40, 228, 186, 148, 41, 69, 40, 228, 187, 163, 41, 69, 40, 228, 188, 129, 41, 69, 40, 228, 188, 145, 41, 69, 40, 229, 133, 171, 41, 69, 40, 229, 133, 173, 41, 69, 40, 229, 138, 180, 41, 69, 40, 229, 141, 129, 41, 69, 40, 229, 141, 148, 41, 69, 40, 229, 144, 141, 41, 69, 40, 229, 145, 188, 41, 69, 40, 229, 155, 155, 41, 69, 40, 229, 156, 159, 41, 69, 40, 229, 173, 166, 41, 69, 40, 230, 151, 165, 41, 69, 40, 230, 156, 136, 41, 69, 40, 230, 156, 137, 41, 69, 40, 230, 156, 168, 41, 69, 40, 230, 160, 170, 41, 69, 40, 230, 176, 180, 41, 69, 40, 231, 129, 171, 41, 69, 40, 231, 137, 185, 41, 69, 40, 231, 155, 163, 41, 69, 40, 231, 164, 190, 41, 69, 40, 231, 165, 157, 41, 69, 40, 231, 165, 173, 41, 69, 40, 232, 135, 170, 41, 69, 40, 232, 135, 179, 41, 69, 40, 232, 178, 161, 41, 69, 40, 232, 179, 135, 41, 69, 40, 233, 135, 145, 41, 69, 48, 226, 129, 132, 51, 69, 49, 48, 230, 151, 165, 69, 49, 48, 230, 156, 136, 69, 49, 48, 231, 130, 185, 69, 49, 49, 230, 151, 165, 69, 49, 49, 230, 156, 136, 69, 49, 49, 231, 130, 185, 69, 49, 50, 230, 151, 165, 69, 49, 50, 230, 156, 136, 69, 49, 50, 231, 130, 185, 69, 49, 51, 230, 151, 165, 69, 49, 51, 231, 130, 185, 69, 49, 52, 230, 151, 165, 69, 49, 52, 231, 130, 185, 69, 49, 53, 230, 151, 165, 69, 49, 53, 231, 130, 185, 69, 49, 54, 230, 151, 165, 69, 49, 54, 231, 130, 185, 69, 49, 55, 230, 151, 165, 69, 49, 55, 231, 130, 185, 69, 49, 56, 230, 151, 165, 69, 49, 56, 231, 130, 185, 69, 49, 57, 230, 151, 165, 69, 49, 57, 231, 130, 185, 69, 49, 226, 129, 132, 50, 69, 49, 226, 129, 132, 51, 69, 49, 226, 129, 132, 52, 69, 49, 226, 129, 132, 53, 69, 49, 226, 129, 132, 54, 69, 49, 226, 129, 132, 55, 69, 49, 226, 129, 132, 56, 69, 49, 226, 129, 132, 57, 69, 50, 48, 230, 151, 165, 69, 50, 48, 231, 130, 185, 69, 50, 49, 230, 151, 165, 69, 50, 49, 231, 130, 185, 69, 50, 50, 230, 151, 165, 69, 50, 50, 231, 130, 185, 69, 50, 51, 230, 151, 165, 69, 50, 51, 231, 130, 185, 69, 50, 52, 230, 151, 165, 69, 50, 52, 231, 130, 185, 69, 50, 53, 230, 151, 165, 69, 50, 54, 230, 151, 165, 69, 50, 55, 230, 151, 165, 69, 50, 56, 230, 151, 165, 69, 50, 57, 230, 151, 165, 69, 50, 226, 129, 132, 51, 69, 50, 226, 129, 132, 53, 69, 51, 48, 230, 151, 165, 69, 51, 49, 230, 151, 165, 69, 51, 226, 129, 132, 52, 69, 51, 226, 129, 132, 53, 69, 51, 226, 129, 132, 56, 69, 52, 226, 129, 132, 53, 69, 53, 226, 129, 132, 54, 69, 53, 226, 129, 132, 56, 69, 55, 226, 129, 132, 56, 69, 65, 226, 136, 149, 109, 69, 86, 226, 136, 149, 109, 69, 109, 226, 136, 149, 115, 70, 49, 226, 129, 132, 49, 48, 70, 67, 226, 136, 149, 107, 103, 70, 109, 226, 136, 149, 115, 50, 70, 216, 168, 216, 173, 217, 138, 70, 216, 168, 216, 174, 217, 138, 70, 216, 170, 216, 172, 217, 133, 70, 216, 170, 216, 172, 217, 137, 70, 216, 170, 216, 172, 217, 138, 70, 216, 170, 216, 173, 216, 172, 70, 216, 170, 216, 173, 217, 133, 70, 216, 170, 216, 174, 217, 133, 70, 216, 170, 216, 174, 217, 137, 70, 216, 170, 216, 174, 217, 138, 70, 216, 170, 217, 133, 216, 172, 70, 216, 170, 217, 133, 216, 173, 70, 216, 170, 217, 133, 216, 174, 70, 216, 170, 217, 133, 217, 137, 70, 216, 170, 217, 133, 217, 138, 70, 216, 172, 216, 173, 217, 137, 70, 216, 172, 216, 173, 217, 138, 70, 216, 172, 217, 133, 216, 173, 70, 216, 172, 217, 133, 217, 137, 70, 216, 172, 217, 133, 217, 138, 70, 216, 173, 216, 172, 217, 138, 70, 216, 173, 217, 133, 217, 137, 70, 216, 173, 217, 133, 217, 138, 70, 216, 179, 216, 172, 216, 173, 70, 216, 179, 216, 172, 217, 137, 70, 216, 179, 216, 173, 216, 172, 70, 216, 179, 216, 174, 217, 137, 70, 216, 179, 216, 174, 217, 138, 70, 216, 179, 217, 133, 216, 172, 70, 216, 179, 217, 133, 216, 173, 70, 216, 179, 217, 133, 217, 133, 70, 216, 180, 216, 172, 217, 138, 70, 216, 180, 216, 173, 217, 133, 70, 216, 180, 216, 173, 217, 138, 70, 216, 180, 217, 133, 216, 174, 70, 216, 180, 217, 133, 217, 133, 70, 216, 181, 216, 173, 216, 173, 70, 216, 181, 216, 173, 217, 138, 70, 216, 181, 217, 132, 217, 137, 70, 216, 181, 217, 132, 219, 146, 70, 216, 181, 217, 133, 217, 133, 70, 216, 182, 216, 173, 217, 137, 70, 216, 182, 216, 173, 217, 138, 70, 216, 182, 216, 174, 217, 133, 70, 216, 183, 217, 133, 216, 173, 70, 216, 183, 217, 133, 217, 133, 70, 216, 183, 217, 133, 217, 138, 70, 216, 185, 216, 172, 217, 133, 70, 216, 185, 217, 133, 217, 133, 70, 216, 185, 217, 133, 217, 137, 70, 216, 185, 217, 133, 217, 138, 70, 216, 186, 217, 133, 217, 133, 70, 216, 186, 217, 133, 217, 137, 70, 216, 186, 217, 133, 217, 138, 70, 217, 129, 216, 174, 217, 133, 70, 217, 129, 217, 133, 217, 138, 70, 217, 130, 217, 132, 219, 146, 70, 217, 130, 217, 133, 216, 173, 70, 217, 130, 217, 133, 217, 133, 70, 217, 130, 217, 133, 217, 138, 70, 217, 131, 217, 133, 217, 133, 70, 217, 131, 217, 133, 217, 138, 70, 217, 132, 216, 172, 216, 172, 70, 217, 132, 216, 172, 217, 133, 70, 217, 132, 216, 172, 217, 138, 70, 217, 132, 216, 173, 217, 133, 70, 217, 132, 216, 173, 217, 137, 70, 217, 132, 216, 173, 217, 138, 70, 217, 132, 216, 174, 217, 133, 70, 217, 132, 217, 133, 216, 173, 70, 217, 132, 217, 133, 217, 138, 70, 217, 133, 216, 172, 216, 173, 70, 217, 133, 216, 172, 216, 174, 70, 217, 133, 216, 172, 217, 133, 70, 217, 133, 216, 172, 217, 138, 70, 217, 133, 216, 173, 216, 172, 70, 217, 133, 216, 173, 217, 133, 70, 217, 133, 216, 173, 217, 138, 70, 217, 133, 216, 174, 216, 172, 70, 217, 133, 216, 174, 217, 133, 70, 217, 133, 216, 174, 217, 138, 70, 217, 133, 217, 133, 217, 138, 70, 217, 134, 216, 172, 216, 173, 70, 217, 134, 216, 172, 217, 133, 70, 217, 134, 216, 172, 217, 137, 70, 217, 134, 216, 172, 217, 138, 70, 217, 134, 216, 173, 217, 133, 70, 217, 134, 216, 173, 217, 137, 70, 217, 134, 216, 173, 217, 138, 70, 217, 134, 217, 133, 217, 137, 70, 217, 134, 217, 133, 217, 138, 70, 217, 135, 217, 133, 216, 172, 70, 217, 135, 217, 133, 217, 133, 70, 217, 138, 216, 172, 217, 138, 70, 217, 138, 216, 173, 217, 138, 70, 217, 138, 217, 133, 217, 133, 70, 217, 138, 217, 133, 217, 138, 70, 217, 138, 217, 148, 216, 167, 70, 217, 138, 217, 148, 216, 172, 70, 217, 138, 217, 148, 216, 173, 70, 217, 138, 217, 148, 216, 174, 70, 217, 138, 217, 148, 216, 177, 70, 217, 138, 217, 148, 216, 178, 70, 217, 138, 217, 148, 217, 133, 70, 217, 138, 217, 148, 217, 134, 70, 217, 138, 217, 148, 217, 135, 70, 217, 138, 217, 148, 217, 136, 70, 217, 138, 217, 148, 217, 137, 70, 217, 138, 217, 148, 217, 138, 70, 217, 138, 217, 148, 219, 134, 70, 217, 138, 217, 148, 219, 135, 70, 217, 138, 217, 148, 219, 136, 70, 217, 138, 217, 148, 219, 144, 70, 217, 138, 217, 148, 219, 149, 70, 224, 185, 141, 224, 184, 178, 70, 224, 186, 171, 224, 186, 153, 70, 224, 186, 171, 224, 186, 161, 70, 224, 187, 141, 224, 186, 178, 70, 224, 189, 128, 224, 190, 181, 70, 224, 189, 130, 224, 190, 183, 70, 224, 189, 140, 224, 190, 183, 70, 224, 189, 145, 224, 190, 183, 70, 224, 189, 150, 224, 190, 183, 70, 224, 189, 155, 224, 190, 183, 70, 224, 190, 144, 224, 190, 181, 70, 224, 190, 146, 224, 190, 183, 70, 224, 190, 156, 224, 190, 183, 70, 224, 190, 161, 224, 190, 183, 70, 224, 190, 166, 224, 190, 183, 70, 224, 190, 171, 224, 190, 183, 70, 226, 128, 178, 226, 128, 178, 70, 226, 128, 181, 226, 128, 181, 70, 226, 136, 171, 226, 136, 171, 70, 226, 136, 174, 226, 136, 174, 70, 227, 129, 187, 227, 129, 139, 70, 227, 130, 136, 227, 130, 138, 70, 227, 130, 173, 227, 131, 173, 70, 227, 130, 179, 227, 130, 179, 70, 227, 130, 179, 227, 131, 136, 70, 227, 131, 136, 227, 131, 179, 70, 227, 131, 138, 227, 131, 142, 70, 227, 131, 155, 227, 131, 179, 70, 227, 131, 159, 227, 131, 170, 70, 227, 131, 170, 227, 131, 169, 70, 227, 131, 172, 227, 131, 160, 70, 229, 164, 167, 230, 173, 163, 70, 229, 185, 179, 230, 136, 144, 70, 230, 152, 142, 230, 178, 187, 70, 230, 152, 173, 229, 146, 140, 71, 114, 97, 100, 226, 136, 149, 115, 71, 227, 128, 148, 83, 227, 128, 149, 72, 40, 225, 132, 128, 225, 133, 161, 41, 72, 40, 225, 132, 130, 225, 133, 161, 41, 72, 40, 225, 132, 131, 225, 133, 161, 41, 72, 40, 225, 132, 133, 225, 133, 161, 41, 72, 40, 225, 132, 134, 225, 133, 161, 41, 72, 40, 225, 132, 135, 225, 133, 161, 41, 72, 40, 225, 132, 137, 225, 133, 161, 41, 72, 40, 225, 132, 139, 225, 133, 161, 41, 72, 40, 225, 132, 140, 225, 133, 161, 41, 72, 40, 225, 132, 140, 225, 133, 174, 41, 72, 40, 225, 132, 142, 225, 133, 161, 41, 72, 40, 225, 132, 143, 225, 133, 161, 41, 72, 40, 225, 132, 144, 225, 133, 161, 41, 72, 40, 225, 132, 145, 225, 133, 161, 41, 72, 40, 225, 132, 146, 225, 133, 161, 41, 72, 114, 97, 100, 226, 136, 149, 115, 50, 72, 216, 167, 217, 131, 216, 168, 216, 177, 72, 216, 167, 217, 132, 217, 132, 217, 135, 72, 216, 177, 216, 179, 217, 136, 217, 132, 72, 216, 177, 219, 140, 216, 167, 217, 132, 72, 216, 181, 217, 132, 216, 185, 217, 133, 72, 216, 185, 217, 132, 217, 138, 217, 135, 72, 217, 133, 216, 173, 217, 133, 216, 175, 72, 217, 136, 216, 179, 217, 132, 217, 133, 73, 226, 128, 178, 226, 128, 178, 226, 128, 178, 73, 226, 128, 181, 226, 128, 181, 226, 128, 181, 73, 226, 136, 171, 226, 136, 171, 226, 136, 171, 73, 226, 136, 174, 226, 136, 174, 226, 136, 174, 73, 227, 128, 148, 228, 184, 137, 227, 128, 149, 73, 227, 128, 148, 228, 186, 140, 227, 128, 149, 73, 227, 128, 148, 229, 139, 157, 227, 128, 149, 73, 227, 128, 148, 229, 174, 137, 227, 128, 149, 73, 227, 128, 148, 230, 137, 147, 227, 128, 149, 73, 227, 128, 148, 230, 149, 151, 227, 128, 149, 73, 227, 128, 148, 230, 156, 172, 227, 128, 149, 73, 227, 128, 148, 231, 130, 185, 227, 128, 149, 73, 227, 128, 148, 231, 155, 151, 227, 128, 149, 73, 227, 130, 162, 227, 131, 188, 227, 131, 171, 73, 227, 130, 164, 227, 131, 179, 227, 131, 129, 73, 227, 130, 166, 227, 130, 169, 227, 131, 179, 73, 227, 130, 170, 227, 131, 179, 227, 130, 185, 73, 227, 130, 170, 227, 131, 188, 227, 131, 160, 73, 227, 130, 171, 227, 130, 164, 227, 131, 170, 73, 227, 130, 177, 227, 131, 188, 227, 130, 185, 73, 227, 130, 179, 227, 131, 171, 227, 131, 138, 73, 227, 130, 187, 227, 131, 179, 227, 131, 129, 73, 227, 130, 187, 227, 131, 179, 227, 131, 136, 73, 227, 131, 134, 227, 130, 153, 227, 130, 183, 73, 227, 131, 136, 227, 130, 153, 227, 131, 171, 73, 227, 131, 142, 227, 131, 131, 227, 131, 136, 73, 227, 131, 143, 227, 130, 164, 227, 131, 132, 73, 227, 131, 146, 227, 130, 153, 227, 131, 171, 73, 227, 131, 146, 227, 130, 154, 227, 130, 179, 73, 227, 131, 149, 227, 131, 169, 227, 131, 179, 73, 227, 131, 152, 227, 130, 154, 227, 130, 189, 73, 227, 131, 152, 227, 131, 171, 227, 131, 132, 73, 227, 131, 155, 227, 131, 188, 227, 131, 171, 73, 227, 131, 155, 227, 131, 188, 227, 131, 179, 73, 227, 131, 158, 227, 130, 164, 227, 131, 171, 73, 227, 131, 158, 227, 131, 131, 227, 131, 143, 73, 227, 131, 158, 227, 131, 171, 227, 130, 175, 73, 227, 131, 164, 227, 131, 188, 227, 131, 171, 73, 227, 131, 166, 227, 130, 162, 227, 131, 179, 73, 227, 131, 175, 227, 131, 131, 227, 131, 136, 76, 226, 128, 178, 226, 128, 178, 226, 128, 178, 226, 128, 178, 76, 226, 136, 171, 226, 136, 171, 226, 136, 171, 226, 136, 171, 76, 227, 130, 162, 227, 131, 171, 227, 131, 149, 227, 130, 161, 76, 227, 130, 168, 227, 131, 188, 227, 130, 171, 227, 131, 188, 76, 227, 130, 171, 227, 130, 153, 227, 131, 173, 227, 131, 179, 76, 227, 130, 171, 227, 130, 153, 227, 131, 179, 227, 131, 158, 76, 227, 130, 171, 227, 131, 169, 227, 131, 131, 227, 131, 136, 76, 227, 130, 171, 227, 131, 173, 227, 131, 170, 227, 131, 188, 76, 227, 130, 173, 227, 130, 153, 227, 131, 139, 227, 131, 188, 76, 227, 130, 173, 227, 131, 165, 227, 131, 170, 227, 131, 188, 76, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 76, 227, 130, 175, 227, 131, 173, 227, 131, 188, 227, 131, 141, 76, 227, 130, 181, 227, 130, 164, 227, 130, 175, 227, 131, 171, 76, 227, 130, 191, 227, 130, 153, 227, 131, 188, 227, 130, 185, 76, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 131, 132, 76, 227, 131, 146, 227, 130, 154, 227, 130, 175, 227, 131, 171, 76, 227, 131, 149, 227, 130, 163, 227, 131, 188, 227, 131, 136, 76, 227, 131, 152, 227, 130, 153, 227, 131, 188, 227, 130, 191, 76, 227, 131, 152, 227, 130, 154, 227, 131, 139, 227, 131, 146, 76, 227, 131, 152, 227, 130, 154, 227, 131, 179, 227, 130, 185, 76, 227, 131, 155, 227, 130, 153, 227, 131, 171, 227, 131, 136, 76, 227, 131, 158, 227, 130, 164, 227, 130, 175, 227, 131, 173, 76, 227, 131, 159, 227, 130, 175, 227, 131, 173, 227, 131, 179, 76, 227, 131, 161, 227, 131, 188, 227, 131, 136, 227, 131, 171, 76, 227, 131, 170, 227, 131, 131, 227, 131, 136, 227, 131, 171, 76, 227, 131, 171, 227, 131, 146, 227, 130, 154, 227, 131, 188, 76, 230, 160, 170, 229, 188, 143, 228, 188, 154, 231, 164, 190, 78, 40, 225, 132, 139, 225, 133, 169, 225, 132, 146, 225, 133, 174, 41, 79, 216, 172, 217, 132, 32, 216, 172, 217, 132, 216, 167, 217, 132, 217, 135, 79, 227, 130, 162, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 131, 136, 79, 227, 130, 162, 227, 131, 179, 227, 131, 152, 227, 130, 154, 227, 130, 162, 79, 227, 130, 173, 227, 131, 173, 227, 131, 175, 227, 131, 131, 227, 131, 136, 79, 227, 130, 181, 227, 131, 179, 227, 131, 129, 227, 131, 188, 227, 131, 160, 79, 227, 131, 143, 227, 130, 153, 227, 131, 188, 227, 131, 172, 227, 131, 171, 79, 227, 131, 152, 227, 130, 175, 227, 130, 191, 227, 131, 188, 227, 131, 171, 79, 227, 131, 155, 227, 130, 154, 227, 130, 164, 227, 131, 179, 227, 131, 136, 79, 227, 131, 158, 227, 131, 179, 227, 130, 183, 227, 131, 167, 227, 131, 179, 79, 227, 131, 161, 227, 130, 171, 227, 130, 153, 227, 131, 136, 227, 131, 179, 79, 227, 131, 171, 227, 131, 188, 227, 131, 149, 227, 130, 153, 227, 131, 171, 81, 40, 225, 132, 139, 225, 133, 169, 225, 132, 140, 225, 133, 165, 225, 134, 171, 41, 82, 227, 130, 173, 227, 130, 153, 227, 131, 171, 227, 130, 191, 227, 130, 153, 227, 131, 188, 82, 227, 130, 173, 227, 131, 173, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 82, 227, 130, 173, 227, 131, 173, 227, 131, 161, 227, 131, 188, 227, 131, 136, 227, 131, 171, 82, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 227, 131, 136, 227, 131, 179, 82, 227, 130, 175, 227, 131, 171, 227, 130, 187, 227, 130, 153, 227, 130, 164, 227, 131, 173, 82, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 130, 187, 227, 131, 179, 227, 131, 136, 82, 227, 131, 146, 227, 130, 154, 227, 130, 162, 227, 130, 185, 227, 131, 136, 227, 131, 171, 82, 227, 131, 149, 227, 130, 153, 227, 131, 131, 227, 130, 183, 227, 130, 167, 227, 131, 171, 82, 227, 131, 159, 227, 131, 170, 227, 131, 143, 227, 130, 153, 227, 131, 188, 227, 131, 171, 82, 227, 131, 172, 227, 131, 179, 227, 131, 136, 227, 130, 177, 227, 130, 153, 227, 131, 179, 97, 216, 181, 217, 132, 217, 137, 32, 216, 167, 217, 132, 217, 132, 217, 135, 32, 216, 185, 217, 132, 217, 138, 217, 135, 32, 217, 136, 216, 179, 217, 132, 217, 133, 6, 224, 167, 135, 224, 166, 190, 1, 6, 224, 167, 135, 224, 167, 151, 1, 6, 224, 173, 135, 224, 172, 190, 1, 6, 224, 173, 135, 224, 173, 150, 1, 6, 224, 173, 135, 224, 173, 151, 1, 6, 224, 174, 146, 224, 175, 151, 1, 6, 224, 175, 134, 224, 174, 190, 1, 6, 224, 175, 134, 224, 175, 151, 1, 6, 224, 175, 135, 224, 174, 190, 1, 6, 224, 178, 191, 224, 179, 149, 1, 6, 224, 179, 134, 224, 179, 149, 1, 6, 224, 179, 134, 224, 179, 150, 1, 6, 224, 181, 134, 224, 180, 190, 1, 6, 224, 181, 134, 224, 181, 151, 1, 6, 224, 181, 135, 224, 180, 190, 1, 6, 224, 183, 153, 224, 183, 159, 1, 6, 225, 128, 165, 225, 128, 174, 1, 6, 225, 172, 133, 225, 172, 181, 1, 6, 225, 172, 135, 225, 172, 181, 1, 6, 225, 172, 137, 225, 172, 181, 1, 6, 225, 172, 139, 225, 172, 181, 1, 6, 225, 172, 141, 225, 172, 181, 1, 6, 225, 172, 145, 225, 172, 181, 1, 6, 225, 172, 186, 225, 172, 181, 1, 6, 225, 172, 188, 225, 172, 181, 1, 6, 225, 172, 190, 225, 172, 181, 1, 6, 225, 172, 191, 225, 172, 181, 1, 6, 225, 173, 130, 225, 172, 181, 1, 8, 240, 145, 132, 177, 240, 145, 132, 167, 1, 8, 240, 145, 132, 178, 240, 145, 132, 167, 1, 8, 240, 145, 141, 135, 240, 145, 140, 190, 1, 8, 240, 145, 141, 135, 240, 145, 141, 151, 1, 8, 240, 145, 146, 185, 240, 145, 146, 176, 1, 8, 240, 145, 146, 185, 240, 145, 146, 186, 1, 8, 240, 145, 146, 185, 240, 145, 146, 189, 1, 8, 240, 145, 150, 184, 240, 145, 150, 175, 1, 8, 240, 145, 150, 185, 240, 145, 150, 175, 1, 9, 224, 179, 134, 224, 179, 130, 224, 179, 149, 2, 9, 224, 183, 153, 224, 183, 143, 224, 183, 138, 18, 68, 68, 90, 204, 140, 201, 68, 68, 122, 204, 140, 201, 68, 100, 122, 204, 140, 201, 70, 217, 132, 216, 167, 217, 147, 201, 70, 217, 132, 216, 167, 217, 148, 201, 70, 217, 132, 216, 167, 217, 149, 181, 70, 225, 132, 128, 225, 133, 161, 1, 70, 225, 132, 130, 225, 133, 161, 1, 70, 225, 132, 131, 225, 133, 161, 1, 70, 225, 132, 133, 225, 133, 161, 1, 70, 225, 132, 134, 225, 133, 161, 1, 70, 225, 132, 135, 225, 133, 161, 1, 70, 225, 132, 137, 225, 133, 161, 1, 70, 225, 132, 139, 225, 133, 161, 1, 70, 225, 132, 139, 225, 133, 174, 1, 70, 225, 132, 140, 225, 133, 161, 1, 70, 225, 132, 142, 225, 133, 161, 1, 70, 225, 132, 143, 225, 133, 161, 1, 70, 225, 132, 144, 225, 133, 161, 1, 70, 225, 132, 145, 225, 133, 161, 1, 70, 225, 132, 146, 225, 133, 161, 1, 73, 227, 131, 161, 227, 130, 171, 227, 130, 153, 13, 76, 225, 132, 140, 225, 133, 174, 225, 132, 139, 225, 133, 180, 1, 76, 227, 130, 173, 227, 130, 153, 227, 130, 171, 227, 130, 153, 13, 76, 227, 130, 179, 227, 131, 188, 227, 131, 155, 227, 130, 154, 13, 76, 227, 131, 164, 227, 131, 188, 227, 131, 136, 227, 130, 153, 13, 79, 225, 132, 142, 225, 133, 161, 225, 134, 183, 225, 132, 128, 225, 133, 169, 1, 79, 227, 130, 164, 227, 131, 139, 227, 131, 179, 227, 130, 175, 227, 130, 153, 13, 79, 227, 130, 183, 227, 131, 170, 227, 131, 179, 227, 130, 175, 227, 130, 153, 13, 79, 227, 131, 152, 227, 130, 154, 227, 131, 188, 227, 130, 183, 227, 130, 153, 13, 79, 227, 131, 155, 227, 130, 154, 227, 131, 179, 227, 131, 136, 227, 130, 153, 13, 82, 227, 130, 168, 227, 130, 185, 227, 130, 175, 227, 131, 188, 227, 131, 136, 227, 130, 153, 13, 82, 227, 131, 149, 227, 130, 161, 227, 131, 169, 227, 131, 131, 227, 131, 136, 227, 130, 153, 13, 134, 224, 179, 134, 224, 179, 130, 1, 134, 224, 183, 153, 224, 183, 143, 1, 3, 60, 204, 184, 5, 3, 61, 204, 184, 5, 3, 62, 204, 184, 5, 3, 65, 204, 128, 201, 3, 65, 204, 129, 201, 3, 65, 204, 131, 201, 3, 65, 204, 132, 201, 3, 65, 204, 137, 201, 3, 65, 204, 140, 201, 3, 65, 204, 143, 201, 3, 65, 204, 145, 201, 3, 65, 204, 165, 181, 3, 65, 204, 168, 165, 3, 66, 204, 135, 201, 3, 66, 204, 163, 181, 3, 66, 204, 177, 181, 3, 67, 204, 129, 201, 3, 67, 204, 130, 201, 3, 67, 204, 135, 201, 3, 67, 204, 140, 201, 3, 68, 204, 135, 201, 3, 68, 204, 140, 201, 3, 68, 204, 163, 181, 3, 68, 204, 167, 165, 3, 68, 204, 173, 181, 3, 68, 204, 177, 181, 3, 69, 204, 128, 201, 3, 69, 204, 129, 201, 3, 69, 204, 131, 201, 3, 69, 204, 134, 201, 3, 69, 204, 135, 201, 3, 69, 204, 136, 201, 3, 69, 204, 137, 201, 3, 69, 204, 140, 201, 3, 69, 204, 143, 201, 3, 69, 204, 145, 201, 3, 69, 204, 168, 165, 3, 69, 204, 173, 181, 3, 69, 204, 176, 181, 3, 70, 204, 135, 201, 3, 71, 204, 129, 201, 3, 71, 204, 130, 201, 3, 71, 204, 132, 201, 3, 71, 204, 134, 201, 3, 71, 204, 135, 201, 3, 71, 204, 140, 201, 3, 71, 204, 167, 165, 3, 72, 204, 130, 201, 3, 72, 204, 135, 201, 3, 72, 204, 136, 201, 3, 72, 204, 140, 201, 3, 72, 204, 163, 181, 3, 72, 204, 167, 165, 3, 72, 204, 174, 181, 3, 73, 204, 128, 201, 3, 73, 204, 129, 201, 3, 73, 204, 130, 201, 3, 73, 204, 131, 201, 3, 73, 204, 132, 201, 3, 73, 204, 134, 201, 3, 73, 204, 135, 201, 3, 73, 204, 137, 201, 3, 73, 204, 140, 201, 3, 73, 204, 143, 201, 3, 73, 204, 145, 201, 3, 73, 204, 163, 181, 3, 73, 204, 168, 165, 3, 73, 204, 176, 181, 3, 74, 204, 130, 201, 3, 75, 204, 129, 201, 3, 75, 204, 140, 201, 3, 75, 204, 163, 181, 3, 75, 204, 167, 165, 3, 75, 204, 177, 181, 3, 76, 204, 129, 201, 3, 76, 204, 140, 201, 3, 76, 204, 167, 165, 3, 76, 204, 173, 181, 3, 76, 204, 177, 181, 3, 77, 204, 129, 201, 3, 77, 204, 135, 201, 3, 77, 204, 163, 181, 3, 78, 204, 128, 201, 3, 78, 204, 129, 201, 3, 78, 204, 131, 201, 3, 78, 204, 135, 201, 3, 78, 204, 140, 201, 3, 78, 204, 163, 181, 3, 78, 204, 167, 165, 3, 78, 204, 173, 181, 3, 78, 204, 177, 181, 3, 79, 204, 128, 201, 3, 79, 204, 129, 201, 3, 79, 204, 134, 201, 3, 79, 204, 137, 201, 3, 79, 204, 139, 201, 3, 79, 204, 140, 201, 3, 79, 204, 143, 201, 3, 79, 204, 145, 201, 3, 80, 204, 129, 201, 3, 80, 204, 135, 201, 3, 82, 204, 129, 201, 3, 82, 204, 135, 201, 3, 82, 204, 140, 201, 3, 82, 204, 143, 201, 3, 82, 204, 145, 201, 3, 82, 204, 167, 165, 3, 82, 204, 177, 181, 3, 83, 204, 130, 201, 3, 83, 204, 135, 201, 3, 83, 204, 166, 181, 3, 83, 204, 167, 165, 3, 84, 204, 135, 201, 3, 84, 204, 140, 201, 3, 84, 204, 163, 181, 3, 84, 204, 166, 181, 3, 84, 204, 167, 165, 3, 84, 204, 173, 181, 3, 84, 204, 177, 181, 3, 85, 204, 128, 201, 3, 85, 204, 129, 201, 3, 85, 204, 130, 201, 3, 85, 204, 134, 201, 3, 85, 204, 137, 201, 3, 85, 204, 138, 201, 3, 85, 204, 139, 201, 3, 85, 204, 140, 201, 3, 85, 204, 143, 201, 3, 85, 204, 145, 201, 3, 85, 204, 163, 181, 3, 85, 204, 164, 181, 3, 85, 204, 168, 165, 3, 85, 204, 173, 181, 3, 85, 204, 176, 181, 3, 86, 204, 131, 201, 3, 86, 204, 163, 181, 3, 87, 204, 128, 201, 3, 87, 204, 129, 201, 3, 87, 204, 130, 201, 3, 87, 204, 135, 201, 3, 87, 204, 136, 201, 3, 87, 204, 163, 181, 3, 88, 204, 135, 201, 3, 88, 204, 136, 201, 3, 89, 204, 128, 201, 3, 89, 204, 129, 201, 3, 89, 204, 130, 201, 3, 89, 204, 131, 201, 3, 89, 204, 132, 201, 3, 89, 204, 135, 201, 3, 89, 204, 136, 201, 3, 89, 204, 137, 201, 3, 89, 204, 163, 181, 3, 90, 204, 129, 201, 3, 90, 204, 130, 201, 3, 90, 204, 135, 201, 3, 90, 204, 140, 201, 3, 90, 204, 163, 181, 3, 90, 204, 177, 181, 3, 97, 204, 128, 201, 3, 97, 204, 129, 201, 3, 97, 204, 131, 201, 3, 97, 204, 132, 201, 3, 97, 204, 137, 201, 3, 97, 204, 140, 201, 3, 97, 204, 143, 201, 3, 97, 204, 145, 201, 3, 97, 204, 165, 181, 3, 97, 204, 168, 165, 3, 98, 204, 135, 201, 3, 98, 204, 163, 181, 3, 98, 204, 177, 181, 3, 99, 204, 129, 201, 3, 99, 204, 130, 201, 3, 99, 204, 135, 201, 3, 99, 204, 140, 201, 3, 100, 204, 135, 201, 3, 100, 204, 140, 201, 3, 100, 204, 163, 181, 3, 100, 204, 167, 165, 3, 100, 204, 173, 181, 3, 100, 204, 177, 181, 3, 101, 204, 128, 201, 3, 101, 204, 129, 201, 3, 101, 204, 131, 201, 3, 101, 204, 134, 201, 3, 101, 204, 135, 201, 3, 101, 204, 136, 201, 3, 101, 204, 137, 201, 3, 101, 204, 140, 201, 3, 101, 204, 143, 201, 3, 101, 204, 145, 201, 3, 101, 204, 168, 165, 3, 101, 204, 173, 181, 3, 101, 204, 176, 181, 3, 102, 204, 135, 201, 3, 103, 204, 129, 201, 3, 103, 204, 130, 201, 3, 103, 204, 132, 201, 3, 103, 204, 134, 201, 3, 103, 204, 135, 201, 3, 103, 204, 140, 201, 3, 103, 204, 167, 165, 3, 104, 204, 130, 201, 3, 104, 204, 135, 201, 3, 104, 204, 136, 201, 3, 104, 204, 140, 201, 3, 104, 204, 163, 181, 3, 104, 204, 167, 165, 3, 104, 204, 174, 181, 3, 104, 204, 177, 181, 3, 105, 204, 128, 201, 3, 105, 204, 129, 201, 3, 105, 204, 130, 201, 3, 105, 204, 131, 201, 3, 105, 204, 132, 201, 3, 105, 204, 134, 201, 3, 105, 204, 137, 201, 3, 105, 204, 140, 201, 3, 105, 204, 143, 201, 3, 105, 204, 145, 201, 3, 105, 204, 163, 181, 3, 105, 204, 168, 165, 3, 105, 204, 176, 181, 3, 106, 204, 130, 201, 3, 106, 204, 140, 201, 3, 107, 204, 129, 201, 3, 107, 204, 140, 201, 3, 107, 204, 163, 181, 3, 107, 204, 167, 165, 3, 107, 204, 177, 181, 3, 108, 204, 129, 201, 3, 108, 204, 140, 201, 3, 108, 204, 167, 165, 3, 108, 204, 173, 181, 3, 108, 204, 177, 181, 3, 109, 204, 129, 201, 3, 109, 204, 135, 201, 3, 109, 204, 163, 181, 3, 110, 204, 128, 201, 3, 110, 204, 129, 201, 3, 110, 204, 131, 201, 3, 110, 204, 135, 201, 3, 110, 204, 140, 201, 3, 110, 204, 163, 181, 3, 110, 204, 167, 165, 3, 110, 204, 173, 181, 3, 110, 204, 177, 181, 3, 111, 204, 128, 201, 3, 111, 204, 129, 201, 3, 111, 204, 134, 201, 3, 111, 204, 137, 201, 3, 111, 204, 139, 201, 3, 111, 204, 140, 201, 3, 111, 204, 143, 201, 3, 111, 204, 145, 201, 3, 112, 204, 129, 201, 3, 112, 204, 135, 201, 3, 114, 204, 129, 201, 3, 114, 204, 135, 201, 3, 114, 204, 140, 201, 3, 114, 204, 143, 201, 3, 114, 204, 145, 201, 3, 114, 204, 167, 165, 3, 114, 204, 177, 181, 3, 115, 204, 130, 201, 3, 115, 204, 135, 201, 3, 115, 204, 166, 181, 3, 115, 204, 167, 165, 3, 116, 204, 135, 201, 3, 116, 204, 136, 201, 3, 116, 204, 140, 201, 3, 116, 204, 163, 181, 3, 116, 204, 166, 181, 3, 116, 204, 167, 165, 3, 116, 204, 173, 181, 3, 116, 204, 177, 181, 3, 117, 204, 128, 201, 3, 117, 204, 129, 201, 3, 117, 204, 130, 201, 3, 117, 204, 134, 201, 3, 117, 204, 137, 201, 3, 117, 204, 138, 201, 3, 117, 204, 139, 201, 3, 117, 204, 140, 201, 3, 117, 204, 143, 201, 3, 117, 204, 145, 201, 3, 117, 204, 163, 181, 3, 117, 204, 164, 181, 3, 117, 204, 168, 165, 3, 117, 204, 173, 181, 3, 117, 204, 176, 181, 3, 118, 204, 131, 201, 3, 118, 204, 163, 181, 3, 119, 204, 128, 201, 3, 119, 204, 129, 201, 3, 119, 204, 130, 201, 3, 119, 204, 135, 201, 3, 119, 204, 136, 201, 3, 119, 204, 138, 201, 3, 119, 204, 163, 181, 3, 120, 204, 135, 201, 3, 120, 204, 136, 201, 3, 121, 204, 128, 201, 3, 121, 204, 129, 201, 3, 121, 204, 130, 201, 3, 121, 204, 131, 201, 3, 121, 204, 132, 201, 3, 121, 204, 135, 201, 3, 121, 204, 136, 201, 3, 121, 204, 137, 201, 3, 121, 204, 138, 201, 3, 121, 204, 163, 181, 3, 122, 204, 129, 201, 3, 122, 204, 130, 201, 3, 122, 204, 135, 201, 3, 122, 204, 140, 201, 3, 122, 204, 163, 181, 3, 122, 204, 177, 181, 4, 194, 168, 204, 128, 202, 4, 194, 168, 204, 129, 202, 4, 194, 168, 205, 130, 202, 4, 195, 134, 204, 129, 201, 4, 195, 134, 204, 132, 201, 4, 195, 152, 204, 129, 201, 4, 195, 166, 204, 129, 201, 4, 195, 166, 204, 132, 201, 4, 195, 184, 204, 129, 201, 4, 197, 191, 204, 135, 201, 4, 198, 183, 204, 140, 201, 4, 202, 146, 204, 140, 201, 4, 206, 145, 204, 128, 201, 4, 206, 145, 204, 129, 201, 4, 206, 145, 204, 132, 201, 4, 206, 145, 204, 134, 201, 4, 206, 145, 205, 133, 217, 4, 206, 149, 204, 128, 201, 4, 206, 149, 204, 129, 201, 4, 206, 151, 204, 128, 201, 4, 206, 151, 204, 129, 201, 4, 206, 151, 205, 133, 217, 4, 206, 153, 204, 128, 201, 4, 206, 153, 204, 129, 201, 4, 206, 153, 204, 132, 201, 4, 206, 153, 204, 134, 201, 4, 206, 153, 204, 136, 201, 4, 206, 159, 204, 128, 201, 4, 206, 159, 204, 129, 201, 4, 206, 161, 204, 148, 201, 4, 206, 165, 204, 128, 201, 4, 206, 165, 204, 129, 201, 4, 206, 165, 204, 132, 201, 4, 206, 165, 204, 134, 201, 4, 206, 165, 204, 136, 201, 4, 206, 169, 204, 128, 201, 4, 206, 169, 204, 129, 201, 4, 206, 169, 205, 133, 217, 4, 206, 177, 204, 132, 201, 4, 206, 177, 204, 134, 201, 4, 206, 177, 205, 133, 217, 4, 206, 181, 204, 128, 201, 4, 206, 181, 204, 129, 201, 4, 206, 183, 205, 133, 217, 4, 206, 185, 204, 128, 201, 4, 206, 185, 204, 129, 201, 4, 206, 185, 204, 132, 201, 4, 206, 185, 204, 134, 201, 4, 206, 185, 205, 130, 201, 4, 206, 191, 204, 128, 201, 4, 206, 191, 204, 129, 201, 4, 207, 129, 204, 147, 201, 4, 207, 129, 204, 148, 201, 4, 207, 133, 204, 128, 201, 4, 207, 133, 204, 129, 201, 4, 207, 133, 204, 132, 201, 4, 207, 133, 204, 134, 201, 4, 207, 133, 205, 130, 201, 4, 207, 137, 205, 133, 217, 4, 207, 146, 204, 129, 201, 4, 207, 146, 204, 136, 201, 4, 208, 134, 204, 136, 201, 4, 208, 144, 204, 134, 201, 4, 208, 144, 204, 136, 201, 4, 208, 147, 204, 129, 201, 4, 208, 149, 204, 128, 201, 4, 208, 149, 204, 134, 201, 4, 208, 149, 204, 136, 201, 4, 208, 150, 204, 134, 201, 4, 208, 150, 204, 136, 201, 4, 208, 151, 204, 136, 201, 4, 208, 152, 204, 128, 201, 4, 208, 152, 204, 132, 201, 4, 208, 152, 204, 134, 201, 4, 208, 152, 204, 136, 201, 4, 208, 154, 204, 129, 201, 4, 208, 158, 204, 136, 201, 4, 208, 163, 204, 132, 201, 4, 208, 163, 204, 134, 201, 4, 208, 163, 204, 136, 201, 4, 208, 163, 204, 139, 201, 4, 208, 167, 204, 136, 201, 4, 208, 171, 204, 136, 201, 4, 208, 173, 204, 136, 201, 4, 208, 176, 204, 134, 201, 4, 208, 176, 204, 136, 201, 4, 208, 179, 204, 129, 201, 4, 208, 181, 204, 128, 201, 4, 208, 181, 204, 134, 201, 4, 208, 181, 204, 136, 201, 4, 208, 182, 204, 134, 201, 4, 208, 182, 204, 136, 201, 4, 208, 183, 204, 136, 201, 4, 208, 184, 204, 128, 201, 4, 208, 184, 204, 132, 201, 4, 208, 184, 204, 134, 201, 4, 208, 184, 204, 136, 201, 4, 208, 186, 204, 129, 201, 4, 208, 190, 204, 136, 201, 4, 209, 131, 204, 132, 201, 4, 209, 131, 204, 134, 201, 4, 209, 131, 204, 136, 201, 4, 209, 131, 204, 139, 201, 4, 209, 135, 204, 136, 201, 4, 209, 139, 204, 136, 201, 4, 209, 141, 204, 136, 201, 4, 209, 150, 204, 136, 201, 4, 209, 180, 204, 143, 201, 4, 209, 181, 204, 143, 201, 4, 211, 152, 204, 136, 201, 4, 211, 153, 204, 136, 201, 4, 211, 168, 204, 136, 201, 4, 211, 169, 204, 136, 201, 4, 216, 167, 217, 147, 201, 4, 216, 167, 217, 148, 201, 4, 216, 167, 217, 149, 181, 4, 217, 136, 217, 148, 201, 4, 217, 138, 217, 148, 201, 4, 219, 129, 217, 148, 201, 4, 219, 146, 217, 148, 201, 4, 219, 149, 217, 148, 201, 5, 65, 204, 130, 204, 128, 202, 5, 65, 204, 130, 204, 129, 202, 5, 65, 204, 130, 204, 131, 202, 5, 65, 204, 130, 204, 137, 202, 5, 65, 204, 134, 204, 128, 202, 5, 65, 204, 134, 204, 129, 202, 5, 65, 204, 134, 204, 131, 202, 5, 65, 204, 134, 204, 137, 202, 5, 65, 204, 135, 204, 132, 202, 5, 65, 204, 136, 204, 132, 202, 5, 65, 204, 138, 204, 129, 202, 5, 65, 204, 163, 204, 130, 202, 5, 65, 204, 163, 204, 134, 202, 5, 67, 204, 167, 204, 129, 202, 5, 69, 204, 130, 204, 128, 202, 5, 69, 204, 130, 204, 129, 202, 5, 69, 204, 130, 204, 131, 202, 5, 69, 204, 130, 204, 137, 202, 5, 69, 204, 132, 204, 128, 202, 5, 69, 204, 132, 204, 129, 202, 5, 69, 204, 163, 204, 130, 202, 5, 69, 204, 167, 204, 134, 202, 5, 73, 204, 136, 204, 129, 202, 5, 76, 204, 163, 204, 132, 202, 5, 79, 204, 130, 204, 128, 202, 5, 79, 204, 130, 204, 129, 202, 5, 79, 204, 130, 204, 131, 202, 5, 79, 204, 130, 204, 137, 202, 5, 79, 204, 131, 204, 129, 202, 5, 79, 204, 131, 204, 132, 202, 5, 79, 204, 131, 204, 136, 202, 5, 79, 204, 132, 204, 128, 202, 5, 79, 204, 132, 204, 129, 202, 5, 79, 204, 135, 204, 132, 202, 5, 79, 204, 136, 204, 132, 202, 5, 79, 204, 155, 204, 128, 202, 5, 79, 204, 155, 204, 129, 202, 5, 79, 204, 155, 204, 131, 202, 5, 79, 204, 155, 204, 137, 202, 5, 79, 204, 155, 204, 163, 182, 5, 79, 204, 163, 204, 130, 202, 5, 79, 204, 168, 204, 132, 202, 5, 82, 204, 163, 204, 132, 202, 5, 83, 204, 129, 204, 135, 202, 5, 83, 204, 140, 204, 135, 202, 5, 83, 204, 163, 204, 135, 202, 5, 85, 204, 131, 204, 129, 202, 5, 85, 204, 132, 204, 136, 202, 5, 85, 204, 136, 204, 128, 202, 5, 85, 204, 136, 204, 129, 202, 5, 85, 204, 136, 204, 132, 202, 5, 85, 204, 136, 204, 140, 202, 5, 85, 204, 155, 204, 128, 202, 5, 85, 204, 155, 204, 129, 202, 5, 85, 204, 155, 204, 131, 202, 5, 85, 204, 155, 204, 137, 202, 5, 85, 204, 155, 204, 163, 182, 5, 97, 204, 130, 204, 128, 202, 5, 97, 204, 130, 204, 129, 202, 5, 97, 204, 130, 204, 131, 202, 5, 97, 204, 130, 204, 137, 202, 5, 97, 204, 134, 204, 128, 202, 5, 97, 204, 134, 204, 129, 202, 5, 97, 204, 134, 204, 131, 202, 5, 97, 204, 134, 204, 137, 202, 5, 97, 204, 135, 204, 132, 202, 5, 97, 204, 136, 204, 132, 202, 5, 97, 204, 138, 204, 129, 202, 5, 97, 204, 163, 204, 130, 202, 5, 97, 204, 163, 204, 134, 202, 5, 99, 204, 167, 204, 129, 202, 5, 101, 204, 130, 204, 128, 202, 5, 101, 204, 130, 204, 129, 202, 5, 101, 204, 130, 204, 131, 202, 5, 101, 204, 130, 204, 137, 202, 5, 101, 204, 132, 204, 128, 202, 5, 101, 204, 132, 204, 129, 202, 5, 101, 204, 163, 204, 130, 202, 5, 101, 204, 167, 204, 134, 202, 5, 105, 204, 136, 204, 129, 202, 5, 108, 204, 163, 204, 132, 202, 5, 111, 204, 130, 204, 128, 202, 5, 111, 204, 130, 204, 129, 202, 5, 111, 204, 130, 204, 131, 202, 5, 111, 204, 130, 204, 137, 202, 5, 111, 204, 131, 204, 129, 202, 5, 111, 204, 131, 204, 132, 202, 5, 111, 204, 131, 204, 136, 202, 5, 111, 204, 132, 204, 128, 202, 5, 111, 204, 132, 204, 129, 202, 5, 111, 204, 135, 204, 132, 202, 5, 111, 204, 136, 204, 132, 202, 5, 111, 204, 155, 204, 128, 202, 5, 111, 204, 155, 204, 129, 202, 5, 111, 204, 155, 204, 131, 202, 5, 111, 204, 155, 204, 137, 202, 5, 111, 204, 155, 204, 163, 182, 5, 111, 204, 163, 204, 130, 202, 5, 111, 204, 168, 204, 132, 202, 5, 114, 204, 163, 204, 132, 202, 5, 115, 204, 129, 204, 135, 202, 5, 115, 204, 140, 204, 135, 202, 5, 115, 204, 163, 204, 135, 202, 5, 117, 204, 131, 204, 129, 202, 5, 117, 204, 132, 204, 136, 202, 5, 117, 204, 136, 204, 128, 202, 5, 117, 204, 136, 204, 129, 202, 5, 117, 204, 136, 204, 132, 202, 5, 117, 204, 136, 204, 140, 202, 5, 117, 204, 155, 204, 128, 202, 5, 117, 204, 155, 204, 129, 202, 5, 117, 204, 155, 204, 131, 202, 5, 117, 204, 155, 204, 137, 202, 5, 117, 204, 155, 204, 163, 182, 5, 225, 190, 191, 204, 128, 202, 5, 225, 190, 191, 204, 129, 202, 5, 225, 190, 191, 205, 130, 202, 5, 225, 191, 190, 204, 128, 202, 5, 225, 191, 190, 204, 129, 202, 5, 225, 191, 190, 205, 130, 202, 5, 226, 134, 144, 204, 184, 5, 5, 226, 134, 146, 204, 184, 5, 5, 226, 134, 148, 204, 184, 5, 5, 226, 135, 144, 204, 184, 5, 5, 226, 135, 146, 204, 184, 5, 5, 226, 135, 148, 204, 184, 5, 5, 226, 136, 131, 204, 184, 5, 5, 226, 136, 136, 204, 184, 5, 5, 226, 136, 139, 204, 184, 5, 5, 226, 136, 163, 204, 184, 5, 5, 226, 136, 165, 204, 184, 5, 5, 226, 136, 188, 204, 184, 5, 5, 226, 137, 131, 204, 184, 5, 5, 226, 137, 133, 204, 184, 5, 5, 226, 137, 136, 204, 184, 5, 5, 226, 137, 141, 204, 184, 5, 5, 226, 137, 161, 204, 184, 5, 5, 226, 137, 164, 204, 184, 5, 5, 226, 137, 165, 204, 184, 5, 5, 226, 137, 178, 204, 184, 5, 5, 226, 137, 179, 204, 184, 5, 5, 226, 137, 182, 204, 184, 5, 5, 226, 137, 183, 204, 184, 5, 5, 226, 137, 186, 204, 184, 5, 5, 226, 137, 187, 204, 184, 5, 5, 226, 137, 188, 204, 184, 5, 5, 226, 137, 189, 204, 184, 5, 5, 226, 138, 130, 204, 184, 5, 5, 226, 138, 131, 204, 184, 5, 5, 226, 138, 134, 204, 184, 5, 5, 226, 138, 135, 204, 184, 5, 5, 226, 138, 145, 204, 184, 5, 5, 226, 138, 146, 204, 184, 5, 5, 226, 138, 162, 204, 184, 5, 5, 226, 138, 168, 204, 184, 5, 5, 226, 138, 169, 204, 184, 5, 5, 226, 138, 171, 204, 184, 5, 5, 226, 138, 178, 204, 184, 5, 5, 226, 138, 179, 204, 184, 5, 5, 226, 138, 180, 204, 184, 5, 5, 226, 138, 181, 204, 184, 5, 6, 206, 145, 204, 147, 205, 133, 218, 6, 206, 145, 204, 148, 205, 133, 218, 6, 206, 149, 204, 147, 204, 128, 202, 6, 206, 149, 204, 147, 204, 129, 202, 6, 206, 149, 204, 148, 204, 128, 202, 6, 206, 149, 204, 148, 204, 129, 202, 6, 206, 151, 204, 147, 205, 133, 218, 6, 206, 151, 204, 148, 205, 133, 218, 6, 206, 153, 204, 147, 204, 128, 202, 6, 206, 153, 204, 147, 204, 129, 202, 6, 206, 153, 204, 147, 205, 130, 202, 6, 206, 153, 204, 148, 204, 128, 202, 6, 206, 153, 204, 148, 204, 129, 202, 6, 206, 153, 204, 148, 205, 130, 202, 6, 206, 159, 204, 147, 204, 128, 202, 6, 206, 159, 204, 147, 204, 129, 202, 6, 206, 159, 204, 148, 204, 128, 202, 6, 206, 159, 204, 148, 204, 129, 202, 6, 206, 165, 204, 148, 204, 128, 202, 6, 206, 165, 204, 148, 204, 129, 202, 6, 206, 165, 204, 148, 205, 130, 202, 6, 206, 169, 204, 147, 205, 133, 218, 6, 206, 169, 204, 148, 205, 133, 218, 6, 206, 177, 204, 128, 205, 133, 218, 6, 206, 177, 204, 129, 205, 133, 218, 6, 206, 177, 204, 147, 205, 133, 218, 6, 206, 177, 204, 148, 205, 133, 218, 6, 206, 177, 205, 130, 205, 133, 218, 6, 206, 181, 204, 147, 204, 128, 202, 6, 206, 181, 204, 147, 204, 129, 202, 6, 206, 181, 204, 148, 204, 128, 202, 6, 206, 181, 204, 148, 204, 129, 202, 6, 206, 183, 204, 128, 205, 133, 218, 6, 206, 183, 204, 129, 205, 133, 218, 6, 206, 183, 204, 147, 205, 133, 218, 6, 206, 183, 204, 148, 205, 133, 218, 6, 206, 183, 205, 130, 205, 133, 218, 6, 206, 185, 204, 136, 204, 128, 202, 6, 206, 185, 204, 136, 204, 129, 202, 6, 206, 185, 204, 136, 205, 130, 202, 6, 206, 185, 204, 147, 204, 128, 202, 6, 206, 185, 204, 147, 204, 129, 202, 6, 206, 185, 204, 147, 205, 130, 202, 6, 206, 185, 204, 148, 204, 128, 202, 6, 206, 185, 204, 148, 204, 129, 202, 6, 206, 185, 204, 148, 205, 130, 202, 6, 206, 191, 204, 147, 204, 128, 202, 6, 206, 191, 204, 147, 204, 129, 202, 6, 206, 191, 204, 148, 204, 128, 202, 6, 206, 191, 204, 148, 204, 129, 202, 6, 207, 133, 204, 136, 204, 128, 202, 6, 207, 133, 204, 136, 204, 129, 202, 6, 207, 133, 204, 136, 205, 130, 202, 6, 207, 133, 204, 147, 204, 128, 202, 6, 207, 133, 204, 147, 204, 129, 202, 6, 207, 133, 204, 147, 205, 130, 202, 6, 207, 133, 204, 148, 204, 128, 202, 6, 207, 133, 204, 148, 204, 129, 202, 6, 207, 133, 204, 148, 205, 130, 202, 6, 207, 137, 204, 128, 205, 133, 218, 6, 207, 137, 204, 129, 205, 133, 218, 6, 207, 137, 204, 147, 205, 133, 218, 6, 207, 137, 204, 148, 205, 133, 218, 6, 207, 137, 205, 130, 205, 133, 218, 6, 224, 164, 168, 224, 164, 188, 9, 6, 224, 164, 176, 224, 164, 188, 9, 6, 224, 164, 179, 224, 164, 188, 9, 6, 224, 177, 134, 224, 177, 150, 133, 6, 224, 183, 153, 224, 183, 138, 17, 6, 227, 129, 134, 227, 130, 153, 13, 6, 227, 129, 139, 227, 130, 153, 13, 6, 227, 129, 141, 227, 130, 153, 13, 6, 227, 129, 143, 227, 130, 153, 13, 6, 227, 129, 145, 227, 130, 153, 13, 6, 227, 129, 147, 227, 130, 153, 13, 6, 227, 129, 149, 227, 130, 153, 13, 6, 227, 129, 151, 227, 130, 153, 13, 6, 227, 129, 153, 227, 130, 153, 13, 6, 227, 129, 155, 227, 130, 153, 13, 6, 227, 129, 157, 227, 130, 153, 13, 6, 227, 129, 159, 227, 130, 153, 13, 6, 227, 129, 161, 227, 130, 153, 13, 6, 227, 129, 164, 227, 130, 153, 13, 6, 227, 129, 166, 227, 130, 153, 13, 6, 227, 129, 168, 227, 130, 153, 13, 6, 227, 129, 175, 227, 130, 153, 13, 6, 227, 129, 175, 227, 130, 154, 13, 6, 227, 129, 178, 227, 130, 153, 13, 6, 227, 129, 178, 227, 130, 154, 13, 6, 227, 129, 181, 227, 130, 153, 13, 6, 227, 129, 181, 227, 130, 154, 13, 6, 227, 129, 184, 227, 130, 153, 13, 6, 227, 129, 184, 227, 130, 154, 13, 6, 227, 129, 187, 227, 130, 153, 13, 6, 227, 129, 187, 227, 130, 154, 13, 6, 227, 130, 157, 227, 130, 153, 13, 6, 227, 130, 166, 227, 130, 153, 13, 6, 227, 130, 171, 227, 130, 153, 13, 6, 227, 130, 173, 227, 130, 153, 13, 6, 227, 130, 175, 227, 130, 153, 13, 6, 227, 130, 177, 227, 130, 153, 13, 6, 227, 130, 179, 227, 130, 153, 13, 6, 227, 130, 181, 227, 130, 153, 13, 6, 227, 130, 183, 227, 130, 153, 13, 6, 227, 130, 185, 227, 130, 153, 13, 6, 227, 130, 187, 227, 130, 153, 13, 6, 227, 130, 189, 227, 130, 153, 13, 6, 227, 130, 191, 227, 130, 153, 13, 6, 227, 131, 129, 227, 130, 153, 13, 6, 227, 131, 132, 227, 130, 153, 13, 6, 227, 131, 134, 227, 130, 153, 13, 6, 227, 131, 136, 227, 130, 153, 13, 6, 227, 131, 143, 227, 130, 153, 13, 6, 227, 131, 143, 227, 130, 154, 13, 6, 227, 131, 146, 227, 130, 153, 13, 6, 227, 131, 146, 227, 130, 154, 13, 6, 227, 131, 149, 227, 130, 153, 13, 6, 227, 131, 149, 227, 130, 154, 13, 6, 227, 131, 152, 227, 130, 153, 13, 6, 227, 131, 152, 227, 130, 154, 13, 6, 227, 131, 155, 227, 130, 153, 13, 6, 227, 131, 155, 227, 130, 154, 13, 6, 227, 131, 175, 227, 130, 153, 13, 6, 227, 131, 176, 227, 130, 153, 13, 6, 227, 131, 177, 227, 130, 153, 13, 6, 227, 131, 178, 227, 130, 153, 13, 6, 227, 131, 189, 227, 130, 153, 13, 8, 206, 145, 204, 147, 204, 128, 205, 133, 219, 8, 206, 145, 204, 147, 204, 129, 205, 133, 219, 8, 206, 145, 204, 147, 205, 130, 205, 133, 219, 8, 206, 145, 204, 148, 204, 128, 205, 133, 219, 8, 206, 145, 204, 148, 204, 129, 205, 133, 219, 8, 206, 145, 204, 148, 205, 130, 205, 133, 219, 8, 206, 151, 204, 147, 204, 128, 205, 133, 219, 8, 206, 151, 204, 147, 204, 129, 205, 133, 219, 8, 206, 151, 204, 147, 205, 130, 205, 133, 219, 8, 206, 151, 204, 148, 204, 128, 205, 133, 219, 8, 206, 151, 204, 148, 204, 129, 205, 133, 219, 8, 206, 151, 204, 148, 205, 130, 205, 133, 219, 8, 206, 169, 204, 147, 204, 128, 205, 133, 219, 8, 206, 169, 204, 147, 204, 129, 205, 133, 219, 8, 206, 169, 204, 147, 205, 130, 205, 133, 219, 8, 206, 169, 204, 148, 204, 128, 205, 133, 219, 8, 206, 169, 204, 148, 204, 129, 205, 133, 219, 8, 206, 169, 204, 148, 205, 130, 205, 133, 219, 8, 206, 177, 204, 147, 204, 128, 205, 133, 219, 8, 206, 177, 204, 147, 204, 129, 205, 133, 219, 8, 206, 177, 204, 147, 205, 130, 205, 133, 219, 8, 206, 177, 204, 148, 204, 128, 205, 133, 219, 8, 206, 177, 204, 148, 204, 129, 205, 133, 219, 8, 206, 177, 204, 148, 205, 130, 205, 133, 219, 8, 206, 183, 204, 147, 204, 128, 205, 133, 219, 8, 206, 183, 204, 147, 204, 129, 205, 133, 219, 8, 206, 183, 204, 147, 205, 130, 205, 133, 219, 8, 206, 183, 204, 148, 204, 128, 205, 133, 219, 8, 206, 183, 204, 148, 204, 129, 205, 133, 219, 8, 206, 183, 204, 148, 205, 130, 205, 133, 219, 8, 207, 137, 204, 147, 204, 128, 205, 133, 219, 8, 207, 137, 204, 147, 204, 129, 205, 133, 219, 8, 207, 137, 204, 147, 205, 130, 205, 133, 219, 8, 207, 137, 204, 148, 204, 128, 205, 133, 219, 8, 207, 137, 204, 148, 204, 129, 205, 133, 219, 8, 207, 137, 204, 148, 205, 130, 205, 133, 219, 8, 240, 145, 130, 153, 240, 145, 130, 186, 9, 8, 240, 145, 130, 155, 240, 145, 130, 186, 9, 8, 240, 145, 130, 165, 240, 145, 130, 186, 9, 66, 194, 180, 1, 67, 32, 204, 129, 201, 67, 32, 204, 131, 201, 67, 32, 204, 132, 201, 67, 32, 204, 133, 201, 67, 32, 204, 134, 201, 67, 32, 204, 135, 201, 67, 32, 204, 136, 201, 67, 32, 204, 138, 201, 67, 32, 204, 139, 201, 67, 32, 204, 147, 201, 67, 32, 204, 148, 201, 67, 32, 204, 167, 165, 67, 32, 204, 168, 165, 67, 32, 204, 179, 181, 67, 32, 205, 130, 201, 67, 32, 205, 133, 217, 67, 32, 217, 139, 89, 67, 32, 217, 140, 93, 67, 32, 217, 141, 97, 67, 32, 217, 142, 101, 67, 32, 217, 143, 105, 67, 32, 217, 144, 109, 67, 32, 217, 145, 113, 67, 32, 217, 146, 117, 67, 65, 204, 138, 201, 67, 115, 204, 135, 201, 68, 32, 227, 130, 153, 13, 68, 32, 227, 130, 154, 13, 68, 194, 168, 204, 129, 202, 68, 206, 145, 204, 129, 201, 68, 206, 149, 204, 129, 201, 68, 206, 151, 204, 129, 201, 68, 206, 153, 204, 129, 201, 68, 206, 159, 204, 129, 201, 68, 206, 165, 204, 129, 201, 68, 206, 165, 204, 136, 201, 68, 206, 169, 204, 129, 201, 68, 206, 177, 204, 129, 201, 68, 206, 181, 204, 129, 201, 68, 206, 183, 204, 129, 201, 68, 206, 185, 204, 129, 201, 68, 206, 191, 204, 129, 201, 68, 207, 133, 204, 129, 201, 68, 207, 137, 204, 129, 201, 68, 215, 144, 214, 183, 49, 68, 215, 144, 214, 184, 53, 68, 215, 144, 214, 188, 65, 68, 215, 145, 214, 188, 65, 68, 215, 145, 214, 191, 73, 68, 215, 146, 214, 188, 65, 68, 215, 147, 214, 188, 65, 68, 215, 148, 214, 188, 65, 68, 215, 149, 214, 185, 57, 68, 215, 149, 214, 188, 65, 68, 215, 150, 214, 188, 65, 68, 215, 152, 214, 188, 65, 68, 215, 153, 214, 180, 37, 68, 215, 153, 214, 188, 65, 68, 215, 154, 214, 188, 65, 68, 215, 155, 214, 188, 65, 68, 215, 155, 214, 191, 73, 68, 215, 156, 214, 188, 65, 68, 215, 158, 214, 188, 65, 68, 215, 160, 214, 188, 65, 68, 215, 161, 214, 188, 65, 68, 215, 163, 214, 188, 65, 68, 215, 164, 214, 188, 65, 68, 215, 164, 214, 191, 73, 68, 215, 166, 214, 188, 65, 68, 215, 167, 214, 188, 65, 68, 215, 168, 214, 188, 65, 68, 215, 169, 214, 188, 65, 68, 215, 169, 215, 129, 77, 68, 215, 169, 215, 130, 81, 68, 215, 170, 214, 188, 65, 68, 215, 178, 214, 183, 49, 68, 216, 167, 217, 139, 89, 68, 216, 167, 217, 147, 201, 68, 216, 167, 217, 148, 201, 68, 216, 167, 217, 149, 181, 68, 216, 176, 217, 176, 121, 68, 216, 177, 217, 176, 121, 68, 217, 128, 217, 139, 89, 68, 217, 128, 217, 142, 101, 68, 217, 128, 217, 143, 105, 68, 217, 128, 217, 144, 109, 68, 217, 128, 217, 145, 113, 68, 217, 128, 217, 146, 117, 68, 217, 135, 217, 176, 121, 68, 217, 136, 217, 148, 201, 68, 217, 137, 217, 176, 121, 68, 217, 138, 217, 148, 201, 68, 219, 146, 217, 148, 201, 68, 219, 149, 217, 148, 201, 69, 32, 204, 136, 204, 128, 202, 69, 32, 204, 136, 204, 129, 202, 69, 32, 204, 136, 205, 130, 202, 69, 32, 204, 147, 204, 128, 202, 69, 32, 204, 147, 204, 129, 202, 69, 32, 204, 147, 205, 130, 202, 69, 32, 204, 148, 204, 128, 202, 69, 32, 204, 148, 204, 129, 202, 69, 32, 204, 148, 205, 130, 202, 69, 32, 217, 140, 217, 145, 114, 69, 32, 217, 141, 217, 145, 114, 69, 32, 217, 142, 217, 145, 114, 69, 32, 217, 143, 217, 145, 114, 69, 32, 217, 144, 217, 145, 114, 69, 32, 217, 145, 217, 176, 122, 69, 226, 171, 157, 204, 184, 5, 70, 206, 185, 204, 136, 204, 129, 202, 70, 207, 133, 204, 136, 204, 129, 202, 70, 215, 169, 214, 188, 215, 129, 78, 70, 215, 169, 214, 188, 215, 130, 82, 70, 217, 128, 217, 142, 217, 145, 114, 70, 217, 128, 217, 143, 217, 145, 114, 70, 217, 128, 217, 144, 217, 145, 114, 70, 224, 164, 149, 224, 164, 188, 9, 70, 224, 164, 150, 224, 164, 188, 9, 70, 224, 164, 151, 224, 164, 188, 9, 70, 224, 164, 156, 224, 164, 188, 9, 70, 224, 164, 161, 224, 164, 188, 9, 70, 224, 164, 162, 224, 164, 188, 9, 70, 224, 164, 171, 224, 164, 188, 9, 70, 224, 164, 175, 224, 164, 188, 9, 70, 224, 166, 161, 224, 166, 188, 9, 70, 224, 166, 162, 224, 166, 188, 9, 70, 224, 166, 175, 224, 166, 188, 9, 70, 224, 168, 150, 224, 168, 188, 9, 70, 224, 168, 151, 224, 168, 188, 9, 70, 224, 168, 156, 224, 168, 188, 9, 70, 224, 168, 171, 224, 168, 188, 9, 70, 224, 168, 178, 224, 168, 188, 9, 70, 224, 168, 184, 224, 168, 188, 9, 70, 224, 172, 161, 224, 172, 188, 9, 70, 224, 172, 162, 224, 172, 188, 9, 70, 224, 190, 178, 224, 190, 128, 157, 70, 224, 190, 179, 224, 190, 128, 157, 70, 227, 131, 134, 227, 130, 153, 13, 72, 240, 157, 133, 151, 240, 157, 133, 165, 173, 72, 240, 157, 133, 152, 240, 157, 133, 165, 173, 72, 240, 157, 134, 185, 240, 157, 133, 165, 173, 72, 240, 157, 134, 186, 240, 157, 133, 165, 173, 73, 224, 190, 178, 224, 189, 177, 224, 190, 128, 158, 73, 224, 190, 179, 224, 189, 177, 224, 190, 128, 158, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 174, 174, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 175, 174, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 176, 174, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 177, 174, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 178, 174, 76, 240, 157, 134, 185, 240, 157, 133, 165, 240, 157, 133, 174, 174, 76, 240, 157, 134, 185, 240, 157, 133, 165, 240, 157, 133, 175, 174, 76, 240, 157, 134, 186, 240, 157, 133, 165, 240, 157, 133, 174, 174, 76, 240, 157, 134, 186, 240, 157, 133, 165, 240, 157, 133, 175, 174, 131, 65, 204, 130, 201, 131, 65, 204, 134, 201, 131, 65, 204, 135, 201, 131, 65, 204, 136, 201, 131, 65, 204, 138, 201, 131, 65, 204, 163, 181, 131, 67, 204, 167, 165, 131, 69, 204, 130, 201, 131, 69, 204, 132, 201, 131, 69, 204, 163, 181, 131, 69, 204, 167, 165, 131, 73, 204, 136, 201, 131, 76, 204, 163, 181, 131, 79, 204, 130, 201, 131, 79, 204, 131, 201, 131, 79, 204, 132, 201, 131, 79, 204, 135, 201, 131, 79, 204, 136, 201, 131, 79, 204, 155, 173, 131, 79, 204, 163, 181, 131, 79, 204, 168, 165, 131, 82, 204, 163, 181, 131, 83, 204, 129, 201, 131, 83, 204, 140, 201, 131, 83, 204, 163, 181, 131, 85, 204, 131, 201, 131, 85, 204, 132, 201, 131, 85, 204, 136, 201, 131, 85, 204, 155, 173, 131, 97, 204, 130, 201, 131, 97, 204, 134, 201, 131, 97, 204, 135, 201, 131, 97, 204, 136, 201, 131, 97, 204, 138, 201, 131, 97, 204, 163, 181, 131, 99, 204, 167, 165, 131, 101, 204, 130, 201, 131, 101, 204, 132, 201, 131, 101, 204, 163, 181, 131, 101, 204, 167, 165, 131, 105, 204, 136, 201, 131, 108, 204, 163, 181, 131, 111, 204, 130, 201, 131, 111, 204, 131, 201, 131, 111, 204, 132, 201, 131, 111, 204, 135, 201, 131, 111, 204, 136, 201, 131, 111, 204, 155, 173, 131, 111, 204, 163, 181, 131, 111, 204, 168, 165, 131, 114, 204, 163, 181, 131, 115, 204, 129, 201, 131, 115, 204, 140, 201, 131, 115, 204, 163, 181, 131, 117, 204, 131, 201, 131, 117, 204, 132, 201, 131, 117, 204, 136, 201, 131, 117, 204, 155, 173, 132, 206, 145, 204, 147, 201, 132, 206, 145, 204, 148, 201, 132, 206, 149, 204, 147, 201, 132, 206, 149, 204, 148, 201, 132, 206, 151, 204, 147, 201, 132, 206, 151, 204, 148, 201, 132, 206, 153, 204, 147, 201, 132, 206, 153, 204, 148, 201, 132, 206, 159, 204, 147, 201, 132, 206, 159, 204, 148, 201, 132, 206, 165, 204, 148, 201, 132, 206, 169, 204, 147, 201, 132, 206, 169, 204, 148, 201, 132, 206, 177, 204, 128, 201, 132, 206, 177, 204, 129, 201, 132, 206, 177, 204, 147, 201, 132, 206, 177, 204, 148, 201, 132, 206, 177, 205, 130, 201, 132, 206, 181, 204, 147, 201, 132, 206, 181, 204, 148, 201, 132, 206, 183, 204, 128, 201, 132, 206, 183, 204, 129, 201, 132, 206, 183, 204, 147, 201, 132, 206, 183, 204, 148, 201, 132, 206, 183, 205, 130, 201, 132, 206, 185, 204, 136, 201, 132, 206, 185, 204, 147, 201, 132, 206, 185, 204, 148, 201, 132, 206, 191, 204, 147, 201, 132, 206, 191, 204, 148, 201, 132, 207, 133, 204, 136, 201, 132, 207, 133, 204, 147, 201, 132, 207, 133, 204, 148, 201, 132, 207, 137, 204, 128, 201, 132, 207, 137, 204, 129, 201, 132, 207, 137, 204, 147, 201, 132, 207, 137, 204, 148, 201, 132, 207, 137, 205, 130, 201, 134, 206, 145, 204, 147, 204, 128, 202, 134, 206, 145, 204, 147, 204, 129, 202, 134, 206, 145, 204, 147, 205, 130, 202, 134, 206, 145, 204, 148, 204, 128, 202, 134, 206, 145, 204, 148, 204, 129, 202, 134, 206, 145, 204, 148, 205, 130, 202, 134, 206, 151, 204, 147, 204, 128, 202, 134, 206, 151, 204, 147, 204, 129, 202, 134, 206, 151, 204, 147, 205, 130, 202, 134, 206, 151, 204, 148, 204, 128, 202, 134, 206, 151, 204, 148, 204, 129, 202, 134, 206, 151, 204, 148, 205, 130, 202, 134, 206, 169, 204, 147, 204, 128, 202, 134, 206, 169, 204, 147, 204, 129, 202, 134, 206, 169, 204, 147, 205, 130, 202, 134, 206, 169, 204, 148, 204, 128, 202, 134, 206, 169, 204, 148, 204, 129, 202, 134, 206, 169, 204, 148, 205, 130, 202, 134, 206, 177, 204, 147, 204, 128, 202, 134, 206, 177, 204, 147, 204, 129, 202, 134, 206, 177, 204, 147, 205, 130, 202, 134, 206, 177, 204, 148, 204, 128, 202, 134, 206, 177, 204, 148, 204, 129, 202, 134, 206, 177, 204, 148, 205, 130, 202, 134, 206, 183, 204, 147, 204, 128, 202, 134, 206, 183, 204, 147, 204, 129, 202, 134, 206, 183, 204, 147, 205, 130, 202, 134, 206, 183, 204, 148, 204, 128, 202, 134, 206, 183, 204, 148, 204, 129, 202, 134, 206, 183, 204, 148, 205, 130, 202, 134, 207, 137, 204, 147, 204, 128, 202, 134, 207, 137, 204, 147, 204, 129, 202, 134, 207, 137, 204, 147, 205, 130, 202, 134, 207, 137, 204, 148, 204, 128, 202, 134, 207, 137, 204, 148, 204, 129, 202, 134, 207, 137, 204, 148, 205, 130, 202, 66, 204, 128, 201, 50, 66, 204, 129, 201, 50, 66, 204, 147, 201, 50, 67, 225, 133, 161, 1, 0, 67, 225, 133, 162, 1, 0, 67, 225, 133, 163, 1, 0, 67, 225, 133, 164, 1, 0, 67, 225, 133, 165, 1, 0, 67, 225, 133, 166, 1, 0, 67, 225, 133, 167, 1, 0, 67, 225, 133, 168, 1, 0, 67, 225, 133, 169, 1, 0, 67, 225, 133, 170, 1, 0, 67, 225, 133, 171, 1, 0, 67, 225, 133, 172, 1, 0, 67, 225, 133, 173, 1, 0, 67, 225, 133, 174, 1, 0, 67, 225, 133, 175, 1, 0, 67, 225, 133, 176, 1, 0, 67, 225, 133, 177, 1, 0, 67, 225, 133, 178, 1, 0, 67, 225, 133, 179, 1, 0, 67, 225, 133, 180, 1, 0, 67, 225, 133, 181, 1, 0, 67, 225, 134, 170, 1, 0, 67, 225, 134, 172, 1, 0, 67, 225, 134, 173, 1, 0, 67, 225, 134, 176, 1, 0, 67, 225, 134, 177, 1, 0, 67, 225, 134, 178, 1, 0, 67, 225, 134, 179, 1, 0, 67, 225, 134, 180, 1, 0, 67, 225, 134, 181, 1, 0, 68, 204, 136, 204, 129, 202, 50, 67, 227, 130, 153, 13, 3, 67, 227, 130, 154, 13, 3, 70, 224, 189, 177, 224, 189, 178, 158, 38, 70, 224, 189, 177, 224, 189, 180, 162, 38, 70, 224, 189, 177, 224, 190, 128, 158, 38, 0, 1]); + nfcValues = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12143, 12148, 18056, 12153, 18071, 18076, 40960, 18086, 12258, 12263, 18091, 12283, 12398, 12403, 12408, 18111, 0, 12548, 12583, 12588, 18121, 18126, 18141, 0, 40960, 12723, 12728, 12733, 18191, 12853, 0, 0, 12923, 12928, 18201, 12933, 18216, 18221, 40960, 18231, 13038, 13043, 18236, 13063, 13183, 13188, 13193, 18256, 0, 13333, 13368, 13373, 18266, 18271, 18286, 0, 40960, 13513, 13518, 13523, 18336, 13648, 0, 13673, 12158, 12938, 18061, 18206, 12188, 12968, 12208, 12988, 12213, 12993, 12218, 12998, 12223, 13003, 12233, 13013, 0, 0, 18096, 18241, 12273, 13053, 12278, 13058, 12308, 13088, 12293, 13073, 12333, 13113, 12343, 13123, 12348, 13128, 12358, 13138, 12363, 13143, 0, 0, 12413, 13198, 12418, 13203, 12423, 13208, 12458, 13238, 12428, 0, 0, 0, 12468, 13248, 12488, 13273, 0, 12498, 13283, 12508, 13293, 12503, 13288, 0, 0, 0, 0, 12543, 13328, 12568, 13353, 12558, 13343, 0, 0, 0, 18131, 18276, 12593, 13378, 12603, 13388, 0, 0, 12633, 13418, 12658, 13443, 12643, 13428, 18166, 18311, 12668, 13453, 12683, 13468, 18171, 18316, 12708, 13498, 12693, 13483, 0, 0, 18181, 18326, 18186, 18331, 12738, 13528, 12748, 13538, 12753, 13543, 12783, 13573, 12818, 13608, 12858, 13653, 12878, 12893, 13693, 12903, 13703, 12908, 13708, 40960, 0, 0, 0, 0, 33024, 33024, 33024, 0, 0, 0, 0, 0, 0, 12168, 12948, 12438, 13218, 12608, 13393, 12758, 13548, 14799, 15198, 14792, 15191, 14806, 15205, 14785, 15184, 0, 14512, 14911, 14505, 14904, 13747, 13765, 0, 0, 12353, 13133, 12478, 13263, 18156, 18301, 14736, 15135, 13783, 13789, 13253, 0, 0, 0, 12328, 13108, 0, 0, 12538, 13323, 14519, 14918, 13741, 13759, 13753, 13771, 12173, 12953, 12178, 12958, 12298, 13078, 12303, 13083, 12443, 13223, 12448, 13228, 12613, 13398, 12618, 13403, 12648, 13433, 12653, 13438, 12763, 13553, 12768, 13558, 12678, 13463, 12703, 13493, 0, 0, 12378, 13158, 0, 0, 0, 0, 0, 0, 18066, 18211, 18106, 18251, 14687, 15086, 14652, 15051, 18136, 18281, 14680, 15079, 12868, 13663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39218, 39218, 39218, 39218, 39218, 33074, 39218, 39218, 39218, 39218, 39218, 39218, 39218, 33074, 33074, 39218, 33074, 39218, 33074, 39218, 39218, 33075, 33069, 33069, 33069, 33069, 33075, 39211, 33069, 33069, 33069, 33069, 33069, 33065, 33065, 39213, 39213, 39213, 39213, 39209, 39209, 33069, 33069, 33069, 33069, 39213, 39213, 33069, 39213, 39213, 33069, 33069, 33025, 33025, 33025, 33025, 39169, 33069, 33069, 33069, 33069, 33074, 33074, 33074, 18862, 18867, 39218, 18872, 19057, 39222, 33074, 33069, 33069, 33069, 33074, 33074, 33074, 33069, 33069, 0, 33074, 33074, 33074, 33069, 33069, 33069, 33069, 33074, 33075, 33069, 33069, 33074, 33076, 33077, 33077, 33076, 33077, 33077, 33076, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 0, 0, 0, 0, 368, 0, 0, 0, 0, 0, 33024, 0, 0, 0, 55, 0, 0, 0, 0, 0, 33024, 13729, 13801, 206, 13831, 13843, 13861, 0, 13891, 0, 13909, 13939, 15880, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 13879, 13927, 18430, 13975, 18472, 13993, 15984, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 14113, 14125, 0, 14107, 0, 0, 40960, 14089, 0, 0, 0, 0, 14173, 14149, 14191, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14161, 40960, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 40960, 0, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14293, 40960, 0, 0, 0, 40960, 0, 0, 14131, 14263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14095, 14227, 14101, 14233, 0, 0, 14119, 14251, 40960, 40960, 14377, 14383, 14137, 14269, 14143, 14275, 0, 0, 14155, 14287, 14167, 14299, 14179, 14311, 40960, 40960, 14389, 14395, 14221, 14353, 14185, 14317, 14197, 14329, 14203, 14335, 14209, 14341, 0, 0, 14215, 14347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33069, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33074, 33070, 33069, 33074, 33074, 33074, 33074, 33074, 33074, 33069, 33069, 33069, 33069, 33069, 33069, 33074, 33074, 33069, 33074, 33074, 33070, 33073, 33074, 33029, 33030, 33031, 33032, 33033, 33034, 33035, 33036, 33037, 33038, 33038, 33039, 33040, 33041, 0, 33042, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 40960, 33046, 33047, 33048, 33049, 33050, 33051, 33052, 33053, 39218, 39218, 39213, 33069, 33074, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33069, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33054, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 11558, 40960, 11566, 40960, 11574, 40960, 11582, 40960, 11590, 0, 0, 40960, 11598, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33026, 39168, 0, 0, 0, 0, 40960, 11606, 40960, 11614, 40960, 40960, 33074, 33074, 33069, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33077, 33066, 33069, 33065, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33075, 33073, 33073, 33069, 0, 33074, 33076, 33069, 33074, 33069, 12183, 12963, 12193, 12973, 12198, 12978, 12203, 12983, 14540, 14939, 12228, 13008, 12238, 13018, 12253, 13033, 12243, 13023, 12248, 13028, 14575, 14974, 14582, 14981, 12313, 13093, 12318, 13098, 14596, 14995, 12323, 13103, 12338, 13118, 12368, 13148, 12383, 13163, 12373, 13153, 12388, 13168, 12393, 13173, 12463, 13243, 14603, 15002, 12473, 13258, 12483, 13268, 12493, 13278, 18116, 18261, 14610, 15009, 12518, 13303, 12513, 13298, 12523, 13308, 12528, 13313, 12533, 13318, 12553, 13338, 12563, 13348, 12578, 13363, 12573, 13358, 14645, 15044, 14659, 15058, 14666, 15065, 14673, 15072, 12623, 13408, 12628, 13413, 12638, 13423, 18161, 18306, 14743, 15142, 12663, 13448, 12673, 13458, 18176, 18321, 14750, 15149, 14757, 15156, 14764, 15163, 12688, 13473, 12698, 13488, 12718, 13508, 12713, 13503, 12778, 13568, 12793, 13583, 12788, 13578, 14771, 15170, 14778, 15177, 12798, 13588, 12803, 13593, 12808, 13598, 12813, 13603, 12828, 13618, 12823, 13613, 12833, 13628, 12838, 13633, 12843, 13638, 12873, 13668, 12898, 13698, 12913, 13713, 12918, 13718, 13178, 13478, 13623, 13683, 0, 13777, 0, 0, 0, 0, 18081, 18226, 12163, 12943, 14456, 14855, 14449, 14848, 14470, 14869, 14463, 14862, 14526, 14925, 14484, 14883, 14477, 14876, 14498, 14897, 14491, 14890, 14533, 14932, 18101, 18246, 12288, 13068, 12268, 13048, 14554, 14953, 14547, 14946, 14568, 14967, 14561, 14960, 14589, 14988, 12433, 13213, 12453, 13233, 18151, 18296, 12598, 13383, 14624, 15023, 14617, 15016, 14638, 15037, 14631, 15030, 14729, 15128, 14701, 15100, 14694, 15093, 14715, 15114, 14708, 15107, 14722, 15121, 12773, 13563, 12743, 13533, 14820, 15219, 14813, 15212, 14834, 15233, 14827, 15226, 14841, 15240, 12848, 13643, 12888, 13688, 12883, 13678, 12863, 13658, 0, 0, 0, 0, 0, 0, 18436, 18442, 18718, 18742, 18726, 18750, 18734, 18758, 18346, 18352, 18574, 18598, 18582, 18606, 18590, 18614, 18454, 18460, 15800, 15816, 15808, 15824, 0, 0, 18358, 18364, 15592, 15608, 15600, 15616, 0, 0, 18478, 18484, 18766, 18790, 18774, 18798, 18782, 18806, 18370, 18376, 18622, 18646, 18630, 18654, 18638, 18662, 18502, 18508, 15896, 15920, 15904, 15928, 15912, 15936, 18382, 18388, 15640, 15664, 15648, 15672, 15656, 15680, 18514, 18520, 15944, 15960, 15952, 15968, 0, 0, 18394, 18400, 15688, 15704, 15696, 15712, 0, 0, 18532, 18538, 16000, 16024, 16008, 16032, 16016, 16040, 0, 18406, 0, 15720, 0, 15728, 0, 15736, 18556, 18562, 18814, 18838, 18822, 18846, 18830, 18854, 18412, 18418, 18670, 18694, 18678, 18702, 18686, 18710, 18424, 17182, 13969, 17188, 18466, 17194, 13987, 17200, 14017, 17206, 14041, 17212, 18544, 17218, 0, 0, 15776, 15784, 16772, 16802, 16782, 16812, 16792, 16822, 15576, 15584, 16592, 16622, 16602, 16632, 16612, 16642, 15848, 15856, 16832, 16862, 16842, 16872, 16852, 16882, 15624, 15632, 16652, 16682, 16662, 16692, 16672, 16702, 16064, 16072, 16892, 16922, 16902, 16932, 16912, 16942, 15744, 15752, 16712, 16742, 16722, 16752, 16732, 16762, 13957, 13951, 15760, 13963, 15768, 0, 18448, 15792, 13813, 13807, 13795, 17134, 13819, 33024, 467, 41216, 33024, 13735, 15832, 13981, 15840, 0, 18490, 15864, 13825, 17140, 13837, 17146, 13849, 15247, 15254, 15261, 14005, 13999, 15872, 17636, 0, 0, 14011, 15888, 13873, 13867, 13855, 17152, 0, 15268, 15275, 15282, 14059, 14053, 15976, 17644, 14029, 14035, 14065, 15992, 13921, 13915, 13903, 17164, 13897, 13723, 17128, 129, 0, 0, 16048, 14071, 16056, 0, 18568, 16080, 13885, 17158, 13933, 17176, 13945, 16982, 41216, 0, 0, 15366, 0, 40960, 15373, 40960, 0, 15380, 40960, 15387, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12133, 40960, 15401, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 15394, 12128, 12138, 15408, 15415, 40960, 40960, 15422, 15429, 40960, 40960, 15436, 15443, 40960, 40960, 40960, 40960, 0, 0, 15450, 15457, 40960, 40960, 15478, 15485, 40960, 40960, 15492, 15499, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 40960, 40960, 0, 40960, 15520, 15527, 15534, 15541, 0, 0, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16136, 40960, 16144, 40960, 16152, 40960, 16160, 40960, 16168, 40960, 16176, 40960, 16184, 40960, 16192, 40960, 16200, 40960, 16208, 40960, 16216, 40960, 16224, 0, 40960, 16232, 40960, 16240, 40960, 16248, 0, 0, 0, 0, 0, 40960, 16256, 16264, 40960, 16272, 16280, 40960, 16288, 16296, 40960, 16304, 16312, 40960, 16320, 16328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16128, 0, 0, 0, 0, 39171, 39171, 33024, 33024, 40960, 16336, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16352, 40960, 16360, 40960, 16368, 40960, 16376, 40960, 16384, 40960, 16392, 40960, 16400, 40960, 16408, 40960, 16416, 40960, 16424, 40960, 16432, 40960, 16440, 0, 40960, 16448, 40960, 16456, 40960, 16464, 0, 0, 0, 0, 0, 40960, 16472, 16480, 40960, 16488, 16496, 40960, 16504, 16512, 40960, 16520, 16528, 40960, 16536, 16544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 0, 16344, 0, 0, 16552, 16560, 16568, 16576, 0, 0, 40960, 16584, 0, 4983, 3323, 5075, 5023, 3671, 1771, 2271, 5675, 5675, 2571, 5215, 2371, 2567, 3055, 4047, 4447, 4759, 4819, 4871, 5147, 3443, 3583, 3755, 3907, 4703, 5191, 5491, 1807, 2227, 3463, 3791, 4755, 5571, 2739, 3703, 4739, 4887, 3107, 4539, 4831, 2847, 3343, 3607, 3867, 5159, 1871, 2023, 2131, 3211, 3455, 3787, 4079, 4471, 4747, 4771, 5063, 5359, 5539, 5567, 4139, 4203, 4387, 4675, 5243, 5579, 4939, 2503, 2875, 4315, 4507, 3839, 4147, 5015, 5351, 2499, 2703, 3447, 3627, 3679, 4371, 4411, 5287, 2127, 4519, 2035, 2031, 4247, 4391, 4699, 5295, 4967, 3111, 3443, 4951, 1783, 2659, 2963, 3887, 4015, 2163, 4155, 1887, 2935, 1751, 3563, 3235, 4367, 2247, 2483, 4091, 4707, 4923, 3511, 5111, 3555, 3127, 4635, 3159, 4011, 1835, 1959, 2027, 3411, 4347, 4595, 4935, 5211, 2139, 2319, 2583, 2863, 3263, 3707, 4159, 5271, 5499, 5583, 5607, 2103, 3315, 3491, 5099, 2811, 3031, 3059, 3203, 3691, 3767, 3943, 4235, 4399, 4499, 5083, 4715, 5123, 5247, 2063, 2107, 2339, 3751, 4851, 4923, 2843, 2955, 3151, 3503, 4311, 3875, 1851, 2431, 2659, 2759, 2967, 3903, 3931, 4459, 4491, 5219, 5347, 5363, 5423, 1875, 4223, 5199, 5323, 2991, 1815, 1911, 2663, 2695, 3247, 3443, 3779, 4043, 4727, 5143, 5667, 3299, 5283, 2099, 3375, 3387, 3599, 3655, 3915, 4007, 4135, 4363, 5435, 1967, 3075, 5299, 1895, 2731, 3631, 5087, 2919, 2999, 3395, 3887, 5307, 2071, 2303, 2711, 3283, 3359, 3423, 3571, 3911, 4027, 4439, 4855, 4867, 5207, 5335, 2179, 3659, 2307, 3783, 3947, 4743, 5311, 5547, 5587, 3383, 3623, 4547, 4279, 4291, 4327, 3863, 3743, 4963, 1843, 4651, 2075, 2059, 2827, 3115, 4339, 2643, 3587, 3311, 5095, 4839, 5291, 4899, 2855, 1927, 2395, 0, 0, 2479, 0, 3295, 0, 0, 2039, 3871, 4067, 4167, 4195, 4199, 4219, 5371, 4331, 4463, 0, 4751, 0, 4947, 0, 0, 5127, 5171, 0, 0, 0, 5455, 5459, 5463, 5563, 5163, 5319, 1879, 1915, 1935, 2123, 2135, 2199, 2379, 2407, 2415, 2475, 2487, 2707, 2715, 2979, 3019, 3027, 3051, 3223, 3271, 3303, 3415, 3611, 3639, 3687, 3771, 3803, 3919, 4143, 4171, 4179, 4175, 4183, 4187, 4191, 4211, 4215, 4251, 4271, 4299, 4399, 4407, 4415, 4435, 4475, 4555, 4607, 4607, 4711, 4879, 4903, 4955, 4959, 5027, 5031, 5119, 5127, 5339, 5407, 5431, 2971, 5918, 4579, 0, 0, 1759, 2019, 1955, 1867, 1931, 1975, 2119, 2147, 2379, 2359, 2375, 2403, 2479, 2495, 2563, 2575, 2603, 2619, 2851, 2859, 2907, 2939, 2987, 3011, 2995, 3027, 3015, 3051, 3079, 3167, 3179, 3187, 3227, 3295, 3343, 3347, 3367, 3495, 3511, 3599, 3675, 3667, 3687, 3715, 3771, 4115, 3807, 3859, 3871, 3935, 3963, 3999, 4035, 4039, 4067, 4071, 4087, 4107, 4103, 4151, 4275, 4299, 4323, 4379, 4399, 4427, 4475, 4655, 4695, 4811, 4883, 4895, 4903, 4927, 4947, 4931, 4955, 4951, 4943, 4959, 4971, 5031, 5091, 5139, 5195, 5227, 5303, 5339, 5371, 5391, 5407, 5419, 5431, 5515, 5675, 5813, 5808, 5858, 1543, 1583, 1587, 5988, 6033, 6153, 5655, 5671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1787, 1779, 1795, 5703, 1863, 1879, 1883, 1891, 1899, 1903, 1915, 1907, 1459, 5723, 1935, 1939, 1943, 1971, 5708, 1463, 1951, 1983, 5718, 1999, 2007, 1847, 2015, 2019, 6193, 2047, 2055, 1471, 2079, 2083, 2091, 2095, 1475, 2119, 2123, 2135, 2147, 2151, 2155, 2163, 2195, 2199, 2207, 2223, 2231, 2235, 2235, 2235, 5738, 3731, 2255, 2263, 5743, 2275, 2283, 2291, 2331, 2311, 2323, 2327, 2335, 2343, 2347, 2355, 2363, 2367, 2367, 2375, 2383, 2387, 2399, 2435, 2407, 2439, 2411, 2419, 2059, 2511, 2455, 2459, 2463, 2451, 2471, 2467, 2491, 5748, 2519, 2523, 2531, 2543, 2551, 2579, 5753, 5758, 2591, 2595, 2599, 2587, 2607, 1479, 1483, 2615, 2623, 2623, 5763, 2651, 2655, 2659, 2667, 5768, 2675, 2679, 2895, 2687, 1487, 2699, 2715, 2727, 2723, 5778, 2735, 5783, 2747, 2743, 2751, 2767, 2771, 1491, 2787, 2795, 2799, 2803, 1495, 5788, 1499, 2831, 2835, 2839, 2847, 6243, 2871, 5798, 5798, 4567, 2887, 2887, 1503, 5833, 6043, 2903, 2911, 1507, 2931, 2947, 2951, 2959, 2975, 1515, 1511, 2979, 5803, 2983, 3003, 3007, 3011, 3007, 3023, 3027, 3043, 3035, 3039, 3047, 3051, 3055, 3067, 3071, 3095, 3103, 3119, 3139, 5818, 3135, 3123, 3147, 3155, 3175, 5823, 3183, 3171, 3163, 1519, 3191, 3199, 3207, 3195, 1523, 3223, 3231, 5828, 3275, 3327, 3291, 1535, 3303, 1531, 1527, 1987, 1991, 3331, 3307, 4523, 1635, 3343, 3347, 3351, 3371, 3363, 5853, 1539, 3391, 3379, 3407, 3415, 5863, 3419, 3399, 3427, 1543, 3431, 3435, 3439, 3451, 5868, 3459, 1547, 3471, 5873, 3475, 1551, 3487, 3499, 3511, 3515, 5878, 5773, 5883, 3547, 5888, 3559, 3567, 3551, 3579, 3595, 3611, 3599, 3603, 3615, 3619, 5893, 3591, 3643, 3647, 1555, 3667, 3663, 5898, 3635, 3695, 5903, 5908, 3699, 3719, 3715, 3711, 1559, 3723, 3739, 3735, 3747, 5713, 3763, 5913, 3775, 5923, 3795, 3807, 3827, 5928, 3847, 3851, 5933, 5938, 3879, 3895, 1563, 3899, 1567, 1567, 3923, 3927, 3935, 3939, 3951, 1571, 3975, 5943, 4003, 5948, 4015, 5793, 4031, 5953, 5958, 5963, 1575, 1579, 4087, 5973, 5968, 5978, 5983, 4095, 4099, 4099, 4107, 1587, 4111, 1591, 1595, 5993, 4131, 4139, 4151, 1599, 5998, 4187, 6003, 6008, 4219, 4243, 1603, 4251, 4255, 4259, 6013, 6018, 6018, 4283, 1607, 6023, 4303, 4307, 1611, 6028, 4335, 1615, 4351, 4343, 4359, 6038, 4383, 1619, 4395, 4403, 4419, 1623, 6048, 6053, 1627, 6058, 4443, 6063, 4455, 4467, 4475, 6068, 6073, 4495, 6078, 4503, 5838, 1631, 4527, 4531, 1639, 4535, 2611, 6083, 6088, 5843, 5848, 4567, 4571, 5107, 1643, 4615, 4611, 4619, 2111, 4623, 4627, 4631, 4639, 6093, 4635, 4643, 4663, 4667, 4647, 4671, 4691, 4711, 4659, 4679, 4683, 4687, 6098, 6108, 6103, 1647, 4719, 4723, 4731, 6128, 4735, 6113, 1651, 1655, 6118, 6123, 1659, 4767, 4771, 4775, 4779, 4791, 4787, 4799, 4795, 4811, 4803, 4807, 4815, 1663, 4823, 4827, 1667, 4843, 4847, 6133, 4859, 4863, 1671, 4875, 1467, 6138, 6143, 1675, 1679, 4919, 4943, 4971, 4987, 6148, 5007, 5011, 5035, 5047, 6158, 5728, 5059, 5055, 5067, 5733, 5079, 5091, 6163, 6168, 5155, 5167, 5175, 6173, 5179, 5223, 5235, 5239, 5231, 5251, 5255, 6178, 5267, 1683, 5275, 6183, 1687, 5331, 2755, 5355, 6188, 6198, 1691, 1695, 5395, 6203, 1699, 6208, 5419, 5419, 5427, 6213, 5451, 1703, 5467, 5479, 5487, 5495, 1707, 6218, 5515, 5543, 5555, 1711, 1715, 5559, 6223, 1719, 6228, 6233, 6238, 5595, 1723, 5615, 5623, 5627, 5635, 5643, 5651, 6248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + nfcIndex = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 1, 2, 3, 46, 4, 5, 0, 47, 48, 6, 7, 8, 49, 9, 50, 51, 10, 0, 0, 11, 52, 53, 12, 0, 54, 55, 56, 0, 57, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, 0, 60, 61, 62, 63, 64, 65, 66, 67, 68, 63, 69, 70, 71, 0, 72, 73, 74, 75, 76, 0, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 87, 0, 88, 89, 90, 91, 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 94, 0, 0, 95, 0, 96, 0, 0, 0, 97, 98, 99, 0, 13, 100, 101, 102, 103, 0, 0, 104, 0, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 105, 0, 0, 106, 107, 0, 108, 109, 110, 23, 24, 111, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 114, 0, 115, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 117, 25, 26, 27, 118, 119, 0, 0, 0, 120, 0, 0, 121, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 0, 0, 0, 0, 126, 0, 0, 127, 128, 129, 130, 131, 0, 0, 132, 133, 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 141, 135, 136, 137, 138, 139, 140, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 143, 144, 145, 0, 0, 146, 147, 148, 149, 0, 0, 0, 150, 151, 152, 153, 0, 0, 154, 155, 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, 157, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 161, 162, 0, 163, 130, 0, 164, 165, 0, 0, 166, 63, 167, 0, 0, 0, 168, 169, 170, 0, 0, 171, 172, 115, 0, 173, 0, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 176, 177, 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 183, 184, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, 42, 43, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 13, 0, 0, 0, 0, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + nfcSparseOffset = new sliceType([0, 5, 9, 11, 13, 24, 40, 42, 47, 58, 73, 86, 94, 98, 103, 105, 122, 130, 137, 140, 147, 151, 155, 157, 159, 168, 172, 179, 184, 187, 197, 200, 207, 215, 218, 220, 222, 224, 229, 246, 258, 260, 266, 268, 270, 272, 274, 276, 278, 281, 284, 286, 289, 292, 296, 301, 310, 312, 315, 317, 328, 332, 346, 349, 355, 361, 372, 376, 378, 380, 382, 384, 386, 392, 396, 398, 400, 408, 412, 415, 417, 419, 421, 424, 426, 428, 430, 432, 438, 441, 443, 450, 456, 462, 470, 476, 482, 488, 492, 506, 515, 518, 521, 523, 526, 528, 532, 537, 539, 541, 546, 552, 554, 556, 558, 564, 567, 570, 578, 585, 588, 591, 593, 601, 604, 611, 614, 620, 622, 625, 627, 629, 631, 633, 636, 638, 640, 642, 655, 665, 667, 669, 675, 677, 680]); + nfcSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(0, 4, 0), new valueRange.ptr(41216, 168, 168), new valueRange.ptr(33024, 175, 175), new valueRange.ptr(33024, 180, 180), new valueRange.ptr(33024, 184, 184), new valueRange.ptr(145, 3, 0), new valueRange.ptr(18146, 160, 161), new valueRange.ptr(18196, 175, 176), new valueRange.ptr(40960, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 152, 157), new valueRange.ptr(6, 10, 0), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(40960, 133, 133), new valueRange.ptr(40960, 137, 137), new valueRange.ptr(18496, 138, 138), new valueRange.ptr(18526, 139, 139), new valueRange.ptr(14023, 140, 140), new valueRange.ptr(14047, 141, 141), new valueRange.ptr(18550, 142, 142), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14077, 147, 148), new valueRange.ptr(0, 15, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(40960, 141, 141), new valueRange.ptr(14245, 144, 144), new valueRange.ptr(14257, 145, 145), new valueRange.ptr(14239, 147, 147), new valueRange.ptr(40960, 150, 150), new valueRange.ptr(14359, 151, 151), new valueRange.ptr(14305, 156, 156), new valueRange.ptr(14281, 157, 157), new valueRange.ptr(14323, 158, 158), new valueRange.ptr(40960, 180, 181), new valueRange.ptr(14365, 182, 182), new valueRange.ptr(14371, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 131, 135), new valueRange.ptr(1, 4, 0), new valueRange.ptr(33043, 129, 130), new valueRange.ptr(33074, 132, 132), new valueRange.ptr(33069, 133, 133), new valueRange.ptr(33037, 135, 135), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33074, 144, 151), new valueRange.ptr(33049, 152, 152), new valueRange.ptr(33050, 153, 153), new valueRange.ptr(33051, 154, 154), new valueRange.ptr(14401, 162, 162), new valueRange.ptr(14407, 163, 163), new valueRange.ptr(14419, 164, 164), new valueRange.ptr(14413, 165, 165), new valueRange.ptr(14425, 166, 166), new valueRange.ptr(40960, 167, 167), new valueRange.ptr(0, 14, 0), new valueRange.ptr(14443, 128, 128), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(14431, 130, 130), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14437, 147, 147), new valueRange.ptr(40960, 149, 149), new valueRange.ptr(33074, 150, 156), new valueRange.ptr(33074, 159, 162), new valueRange.ptr(33069, 163, 163), new valueRange.ptr(33074, 164, 164), new valueRange.ptr(33074, 167, 168), new valueRange.ptr(33069, 170, 170), new valueRange.ptr(33074, 171, 172), new valueRange.ptr(33069, 173, 173), new valueRange.ptr(0, 12, 0), new valueRange.ptr(33055, 145, 145), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(33069, 177, 177), new valueRange.ptr(33074, 178, 179), new valueRange.ptr(33069, 180, 180), new valueRange.ptr(33074, 181, 182), new valueRange.ptr(33069, 183, 185), new valueRange.ptr(33074, 186, 186), new valueRange.ptr(33069, 187, 188), new valueRange.ptr(33074, 189, 189), new valueRange.ptr(33069, 190, 190), new valueRange.ptr(33074, 191, 191), new valueRange.ptr(5, 7, 0), new valueRange.ptr(33074, 128, 128), new valueRange.ptr(33074, 129, 129), new valueRange.ptr(33069, 130, 131), new valueRange.ptr(33069, 132, 133), new valueRange.ptr(33069, 134, 135), new valueRange.ptr(33069, 136, 137), new valueRange.ptr(33074, 138, 138), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33074, 171, 177), new valueRange.ptr(33069, 178, 178), new valueRange.ptr(33074, 179, 179), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33074, 150, 153), new valueRange.ptr(33074, 155, 163), new valueRange.ptr(33074, 165, 167), new valueRange.ptr(33074, 169, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 153, 155), new valueRange.ptr(0, 16, 0), new valueRange.ptr(33074, 148, 161), new valueRange.ptr(33069, 163, 163), new valueRange.ptr(33074, 164, 165), new valueRange.ptr(33069, 166, 166), new valueRange.ptr(33074, 167, 168), new valueRange.ptr(33069, 169, 169), new valueRange.ptr(33074, 170, 172), new valueRange.ptr(33069, 173, 175), new valueRange.ptr(33046, 176, 176), new valueRange.ptr(33047, 177, 177), new valueRange.ptr(33048, 178, 178), new valueRange.ptr(33074, 179, 181), new valueRange.ptr(33069, 182, 182), new valueRange.ptr(33074, 183, 184), new valueRange.ptr(33069, 185, 186), new valueRange.ptr(33074, 187, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 168, 168), new valueRange.ptr(16088, 169, 169), new valueRange.ptr(40960, 176, 176), new valueRange.ptr(16096, 177, 177), new valueRange.ptr(40960, 179, 179), new valueRange.ptr(16104, 180, 180), new valueRange.ptr(39170, 188, 188), new valueRange.ptr(8, 6, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(33074, 145, 145), new valueRange.ptr(33069, 146, 146), new valueRange.ptr(33074, 147, 147), new valueRange.ptr(33074, 148, 148), new valueRange.ptr(17692, 152, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(8, 6, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11422, 139, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(17756, 156, 157), new valueRange.ptr(17772, 159, 159), new valueRange.ptr(0, 3, 0), new valueRange.ptr(17812, 179, 179), new valueRange.ptr(17820, 182, 182), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(8, 3, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(17780, 153, 155), new valueRange.ptr(17804, 158, 158), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(0, 8, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11446, 136, 136), new valueRange.ptr(11438, 139, 139), new valueRange.ptr(11454, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 150, 151), new valueRange.ptr(17828, 156, 156), new valueRange.ptr(17836, 157, 157), new valueRange.ptr(0, 3, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(11462, 148, 148), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11470, 138, 138), new valueRange.ptr(11486, 139, 139), new valueRange.ptr(11478, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(6145, 4, 0), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(16112, 136, 136), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(33056, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(40960, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(11494, 128, 128), new valueRange.ptr(39168, 130, 130), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(11502, 135, 135), new valueRange.ptr(11510, 136, 136), new valueRange.ptr(12112, 138, 138), new valueRange.ptr(11736, 139, 139), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11518, 138, 138), new valueRange.ptr(11534, 139, 139), new valueRange.ptr(11526, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(27626, 7, 0), new valueRange.ptr(39172, 138, 138), new valueRange.ptr(39168, 143, 143), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16120, 154, 154), new valueRange.ptr(12120, 156, 156), new valueRange.ptr(11747, 157, 157), new valueRange.ptr(11542, 158, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33058, 184, 185), new valueRange.ptr(33028, 186, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33059, 136, 139), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33060, 184, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33061, 136, 139), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33069, 152, 153), new valueRange.ptr(33069, 181, 181), new valueRange.ptr(33069, 183, 183), new valueRange.ptr(33067, 185, 185), new valueRange.ptr(0, 16, 0), new valueRange.ptr(9796, 131, 131), new valueRange.ptr(9803, 141, 141), new valueRange.ptr(9810, 146, 146), new valueRange.ptr(9817, 151, 151), new valueRange.ptr(9824, 156, 156), new valueRange.ptr(9789, 169, 169), new valueRange.ptr(33062, 177, 177), new valueRange.ptr(33063, 178, 178), new valueRange.ptr(19076, 179, 179), new valueRange.ptr(33064, 180, 180), new valueRange.ptr(19085, 181, 181), new valueRange.ptr(17844, 182, 182), new valueRange.ptr(33280, 183, 183), new valueRange.ptr(17852, 184, 184), new valueRange.ptr(33280, 185, 185), new valueRange.ptr(33063, 186, 189), new valueRange.ptr(0, 11, 0), new valueRange.ptr(33063, 128, 128), new valueRange.ptr(19094, 129, 129), new valueRange.ptr(33074, 130, 131), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 134, 135), new valueRange.ptr(9838, 147, 147), new valueRange.ptr(9845, 157, 157), new valueRange.ptr(9852, 162, 162), new valueRange.ptr(9859, 167, 167), new valueRange.ptr(9866, 172, 172), new valueRange.ptr(9831, 185, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 134, 134), new valueRange.ptr(0, 5, 0), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(11550, 166, 166), new valueRange.ptr(39168, 174, 174), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(33028, 185, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 141, 141), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 128, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(47360, 161, 181), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 168, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 128, 130), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 157, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 148, 148), new valueRange.ptr(33028, 180, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 146, 146), new valueRange.ptr(33074, 157, 157), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33073, 169, 169), new valueRange.ptr(4, 2, 0), new valueRange.ptr(33070, 185, 186), new valueRange.ptr(33069, 187, 187), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 151, 151), new valueRange.ptr(33069, 152, 152), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33028, 160, 160), new valueRange.ptr(33074, 181, 188), new valueRange.ptr(33069, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33074, 176, 180), new valueRange.ptr(33069, 181, 186), new valueRange.ptr(33074, 187, 188), new valueRange.ptr(33069, 189, 189), new valueRange.ptr(0, 8, 0), new valueRange.ptr(11622, 128, 128), new valueRange.ptr(11630, 129, 129), new valueRange.ptr(40960, 130, 130), new valueRange.ptr(11638, 131, 131), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 171, 171), new valueRange.ptr(33069, 172, 172), new valueRange.ptr(33074, 173, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 170, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 166, 166), new valueRange.ptr(33028, 178, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33074, 144, 146), new valueRange.ptr(33025, 148, 148), new valueRange.ptr(33069, 149, 153), new valueRange.ptr(33074, 154, 155), new valueRange.ptr(33069, 156, 159), new valueRange.ptr(33074, 160, 160), new valueRange.ptr(33025, 162, 168), new valueRange.ptr(33069, 173, 173), new valueRange.ptr(33074, 180, 180), new valueRange.ptr(33074, 184, 185), new valueRange.ptr(4, 3, 0), new valueRange.ptr(1075, 128, 129), new valueRange.ptr(33024, 151, 151), new valueRange.ptr(33024, 190, 190), new valueRange.ptr(0, 13, 0), new valueRange.ptr(33074, 144, 145), new valueRange.ptr(33025, 146, 147), new valueRange.ptr(33074, 148, 151), new valueRange.ptr(33025, 152, 154), new valueRange.ptr(33074, 155, 156), new valueRange.ptr(33074, 161, 161), new valueRange.ptr(33025, 165, 166), new valueRange.ptr(33074, 167, 167), new valueRange.ptr(33069, 168, 168), new valueRange.ptr(33074, 169, 169), new valueRange.ptr(33025, 170, 171), new valueRange.ptr(33069, 172, 175), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(17019, 2, 0), new valueRange.ptr(440, 166, 166), new valueRange.ptr(87, 170, 171), new valueRange.ptr(7, 5, 0), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(15289, 154, 155), new valueRange.ptr(15303, 174, 174), new valueRange.ptr(14, 5, 0), new valueRange.ptr(15310, 141, 142), new valueRange.ptr(15317, 143, 143), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(25608, 10, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(15331, 132, 132), new valueRange.ptr(40960, 136, 136), new valueRange.ptr(15338, 137, 137), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(15345, 140, 140), new valueRange.ptr(40960, 163, 163), new valueRange.ptr(15352, 164, 165), new valueRange.ptr(15359, 166, 166), new valueRange.ptr(40960, 188, 188), new valueRange.ptr(7, 3, 0), new valueRange.ptr(15464, 160, 161), new valueRange.ptr(15506, 162, 163), new valueRange.ptr(15548, 170, 173), new valueRange.ptr(4, 1, 0), new valueRange.ptr(1163, 169, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(17629, 156, 156), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 175, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33068, 170, 170), new valueRange.ptr(33073, 171, 171), new valueRange.ptr(33075, 172, 172), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(33071, 174, 175), new valueRange.ptr(0, 3, 0), new valueRange.ptr(19103, 179, 179), new valueRange.ptr(19103, 181, 182), new valueRange.ptr(19103, 186, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(19103, 143, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 174, 190), new valueRange.ptr(0, 7, 0), new valueRange.ptr(33024, 132, 132), new valueRange.ptr(33024, 135, 135), new valueRange.ptr(33024, 144, 144), new valueRange.ptr(33024, 158, 158), new valueRange.ptr(33024, 161, 161), new valueRange.ptr(33024, 178, 178), new valueRange.ptr(33024, 187, 187), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33024, 128, 128), new valueRange.ptr(33024, 139, 139), new valueRange.ptr(33024, 142, 142), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 175, 175), new valueRange.ptr(33074, 180, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 158, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 176, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 134, 134), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 160, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 171, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 147, 147), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 179, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 128, 128), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(33074, 178, 179), new valueRange.ptr(33069, 180, 180), new valueRange.ptr(33074, 183, 184), new valueRange.ptr(33074, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 129, 129), new valueRange.ptr(33028, 182, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 173, 173), new valueRange.ptr(0, 6, 0), new valueRange.ptr(58624, 128, 128), new valueRange.ptr(50688, 129, 155), new valueRange.ptr(58624, 156, 156), new valueRange.ptr(50688, 157, 183), new valueRange.ptr(58624, 184, 184), new valueRange.ptr(50688, 185, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 147), new valueRange.ptr(58624, 148, 148), new valueRange.ptr(50688, 149, 175), new valueRange.ptr(58624, 176, 176), new valueRange.ptr(50688, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 139), new valueRange.ptr(58624, 140, 140), new valueRange.ptr(50688, 141, 167), new valueRange.ptr(58624, 168, 168), new valueRange.ptr(50688, 169, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(50688, 128, 131), new valueRange.ptr(58624, 132, 132), new valueRange.ptr(50688, 133, 159), new valueRange.ptr(58624, 160, 160), new valueRange.ptr(50688, 161, 187), new valueRange.ptr(58624, 188, 188), new valueRange.ptr(50688, 189, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 151), new valueRange.ptr(58624, 152, 152), new valueRange.ptr(50688, 153, 179), new valueRange.ptr(58624, 180, 180), new valueRange.ptr(50688, 181, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 143), new valueRange.ptr(58624, 144, 144), new valueRange.ptr(50688, 145, 171), new valueRange.ptr(58624, 172, 172), new valueRange.ptr(50688, 173, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(58624, 164, 164), new valueRange.ptr(50688, 165, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(6, 13, 0), new valueRange.ptr(17296, 157, 157), new valueRange.ptr(33045, 158, 158), new valueRange.ptr(17410, 159, 159), new valueRange.ptr(17392, 170, 171), new valueRange.ptr(17652, 172, 172), new valueRange.ptr(17660, 173, 173), new valueRange.ptr(17224, 174, 177), new valueRange.ptr(17254, 178, 180), new valueRange.ptr(17278, 181, 182), new valueRange.ptr(17290, 184, 184), new valueRange.ptr(17302, 185, 187), new valueRange.ptr(17326, 188, 188), new valueRange.ptr(17332, 190, 190), new valueRange.ptr(6, 8, 0), new valueRange.ptr(17338, 128, 129), new valueRange.ptr(17350, 131, 132), new valueRange.ptr(17368, 134, 137), new valueRange.ptr(17404, 138, 138), new valueRange.ptr(17272, 139, 139), new valueRange.ptr(17248, 140, 140), new valueRange.ptr(17320, 141, 141), new valueRange.ptr(17362, 142, 142), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 164, 165), new valueRange.ptr(33024, 176, 177), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 155, 157), new valueRange.ptr(33280, 158, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 144, 144), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 153, 153), new valueRange.ptr(33280, 178, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 188, 189), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33074, 160, 166), new valueRange.ptr(33069, 167, 173), new valueRange.ptr(33074, 174, 175), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33024, 137, 140), new valueRange.ptr(33024, 176, 178), new valueRange.ptr(33024, 180, 180), new valueRange.ptr(33024, 182, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 129, 140), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 181, 186), new valueRange.ptr(0, 4, 0), new valueRange.ptr(19103, 158, 159), new valueRange.ptr(19103, 163, 163), new valueRange.ptr(19103, 165, 166), new valueRange.ptr(19103, 170, 175), new valueRange.ptr(0, 5, 0), new valueRange.ptr(19103, 130, 135), new valueRange.ptr(19103, 138, 143), new valueRange.ptr(19103, 146, 151), new valueRange.ptr(19103, 154, 156), new valueRange.ptr(33024, 163, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 182, 186), new valueRange.ptr(44, 5, 0), new valueRange.ptr(33069, 141, 141), new valueRange.ptr(33074, 143, 143), new valueRange.ptr(33074, 184, 184), new valueRange.ptr(33025, 185, 186), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 165, 165), new valueRange.ptr(33069, 166, 166), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 134, 134), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(6142, 7, 0), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16952, 154, 154), new valueRange.ptr(40960, 155, 155), new valueRange.ptr(16962, 156, 156), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(16972, 171, 171), new valueRange.ptr(33028, 185, 186), new valueRange.ptr(0, 6, 0), new valueRange.ptr(33074, 128, 130), new valueRange.ptr(39168, 167, 167), new valueRange.ptr(11646, 174, 174), new valueRange.ptr(11656, 175, 175), new valueRange.ptr(40960, 177, 178), new valueRange.ptr(33028, 179, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 128, 128), new valueRange.ptr(33026, 138, 138), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 181, 181), new valueRange.ptr(33026, 182, 182), new valueRange.ptr(2, 1, 0), new valueRange.ptr(33026, 169, 170), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11666, 139, 139), new valueRange.ptr(11676, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(33074, 166, 172), new valueRange.ptr(33074, 176, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 130, 130), new valueRange.ptr(33026, 134, 134), new valueRange.ptr(27482, 6, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 185, 185), new valueRange.ptr(39168, 186, 186), new valueRange.ptr(11696, 187, 187), new valueRange.ptr(11686, 188, 189), new valueRange.ptr(11706, 190, 190), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 130, 130), new valueRange.ptr(33026, 131, 131), new valueRange.ptr(0, 5, 0), new valueRange.ptr(39168, 175, 175), new valueRange.ptr(40960, 184, 185), new valueRange.ptr(11716, 186, 186), new valueRange.ptr(11726, 187, 187), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 128, 128), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 182, 182), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 171, 171), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 180, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 135, 135), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 153, 153), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 130, 130), new valueRange.ptr(33028, 132, 133), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 176, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 176, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 158, 158), new valueRange.ptr(0, 12, 0), new valueRange.ptr(17868, 158, 158), new valueRange.ptr(17878, 159, 159), new valueRange.ptr(17930, 160, 160), new valueRange.ptr(17944, 161, 161), new valueRange.ptr(17958, 162, 162), new valueRange.ptr(17972, 163, 163), new valueRange.ptr(17986, 164, 164), new valueRange.ptr(33067, 165, 166), new valueRange.ptr(33025, 167, 169), new valueRange.ptr(33072, 173, 173), new valueRange.ptr(33067, 174, 178), new valueRange.ptr(33069, 187, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(33069, 128, 130), new valueRange.ptr(33074, 133, 137), new valueRange.ptr(33069, 138, 139), new valueRange.ptr(33074, 170, 173), new valueRange.ptr(17888, 187, 187), new valueRange.ptr(17898, 188, 188), new valueRange.ptr(18000, 189, 189), new valueRange.ptr(18028, 190, 190), new valueRange.ptr(18014, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(18042, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 130, 132), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33074, 128, 134), new valueRange.ptr(33074, 136, 152), new valueRange.ptr(33074, 155, 161), new valueRange.ptr(33074, 163, 164), new valueRange.ptr(33074, 166, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 144, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 132, 137), new valueRange.ptr(33026, 138, 138), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 147, 147)]); + nfkcValues = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12143, 12148, 18056, 12153, 18071, 18076, 40960, 18086, 12258, 12263, 18091, 12283, 12398, 12403, 12408, 18111, 0, 12548, 12583, 12588, 18121, 18126, 18141, 0, 40960, 12723, 12728, 12733, 18191, 12853, 0, 0, 12923, 12928, 18201, 12933, 18216, 18221, 40960, 18231, 13038, 13043, 18236, 13063, 13183, 13188, 13193, 18256, 0, 13333, 13368, 13373, 18266, 18271, 18286, 0, 40960, 13513, 13518, 13523, 18336, 13648, 0, 13673, 12158, 12938, 18061, 18206, 12188, 12968, 12208, 12988, 12213, 12993, 12218, 12998, 12223, 13003, 12233, 13013, 0, 0, 18096, 18241, 12273, 13053, 12278, 13058, 12308, 13088, 12293, 13073, 12333, 13113, 12343, 13123, 12348, 13128, 12358, 13138, 12363, 13143, 0, 0, 12413, 13198, 12418, 13203, 12423, 13208, 12458, 13238, 12428, 0, 6493, 6631, 12468, 13248, 12488, 13273, 0, 12498, 13283, 12508, 13293, 12503, 13288, 7084, 7220, 0, 0, 12543, 13328, 12568, 13353, 12558, 13343, 7260, 0, 0, 18131, 18276, 12593, 13378, 12603, 13388, 0, 0, 12633, 13418, 12658, 13443, 12643, 13428, 18166, 18311, 12668, 13453, 12683, 13468, 18171, 18316, 12708, 13498, 12693, 13483, 0, 0, 18181, 18326, 18186, 18331, 12738, 13528, 12748, 13538, 12753, 13543, 12783, 13573, 12818, 13608, 12858, 13653, 12878, 12893, 13693, 12903, 13703, 12908, 13708, 167, 0, 0, 0, 0, 11758, 11764, 11770, 6514, 6517, 6664, 6535, 6538, 6718, 12168, 12948, 12438, 13218, 12608, 13393, 12758, 13548, 14799, 15198, 14792, 15191, 14806, 15205, 14785, 15184, 0, 14512, 14911, 14505, 14904, 13747, 13765, 0, 0, 12353, 13133, 12478, 13263, 18156, 18301, 14736, 15135, 13783, 13789, 13253, 6466, 6469, 6607, 12328, 13108, 0, 0, 12538, 13323, 14519, 14918, 13741, 13759, 13753, 13771, 12173, 12953, 12178, 12958, 12298, 13078, 12303, 13083, 12443, 13223, 12448, 13228, 12613, 13398, 12618, 13403, 12648, 13433, 12653, 13438, 12763, 13553, 12768, 13558, 12678, 13463, 12703, 13493, 0, 0, 12378, 13158, 0, 0, 0, 0, 0, 0, 18066, 18211, 18106, 18251, 14687, 15086, 14652, 15051, 18136, 18281, 14680, 15079, 12868, 13663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39218, 39218, 39218, 39218, 39218, 33074, 39218, 39218, 39218, 39218, 39218, 39218, 39218, 33074, 33074, 39218, 33074, 39218, 33074, 39218, 39218, 33075, 33069, 33069, 33069, 33069, 33075, 39211, 33069, 33069, 33069, 33069, 33069, 33065, 33065, 39213, 39213, 39213, 39213, 39209, 39209, 33069, 33069, 33069, 33069, 39213, 39213, 33069, 39213, 39213, 33069, 33069, 33025, 33025, 33025, 33025, 39169, 33069, 33069, 33069, 33069, 33074, 33074, 33074, 18862, 18867, 39218, 18872, 19057, 39222, 33074, 33069, 33069, 33069, 33074, 33074, 33074, 33069, 33069, 0, 33074, 33074, 33074, 33069, 33069, 33069, 33069, 33074, 33075, 33069, 33069, 33074, 33076, 33077, 33077, 33076, 33077, 33077, 33076, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 0, 0, 0, 0, 368, 0, 0, 0, 0, 0, 17061, 0, 0, 0, 55, 0, 0, 0, 0, 0, 16986, 17531, 13801, 206, 13831, 13843, 13861, 0, 13891, 0, 13909, 13939, 15880, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 13879, 13927, 18430, 13975, 18472, 13993, 15984, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 18496, 18526, 14023, 14047, 18550, 0, 446, 464, 428, 17164, 17170, 506, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, 491, 494, 0, 392, 455, 0, 0, 0, 422, 0, 0, 0, 0, 0, 0, 14113, 14125, 0, 14107, 0, 0, 40960, 14089, 0, 0, 0, 0, 14173, 14149, 14191, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14161, 40960, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 40960, 0, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14293, 40960, 0, 0, 0, 40960, 0, 0, 14131, 14263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14095, 14227, 14101, 14233, 0, 0, 14119, 14251, 40960, 40960, 14377, 14383, 14137, 14269, 14143, 14275, 0, 0, 14155, 14287, 14167, 14299, 14179, 14311, 40960, 40960, 14389, 14395, 14221, 14353, 14185, 14317, 14197, 14329, 14203, 14335, 14209, 14341, 0, 0, 14215, 14347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7521, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33069, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33074, 33070, 33069, 33074, 33074, 33074, 33074, 33074, 33074, 33069, 33069, 33069, 33069, 33069, 33069, 33074, 33074, 33069, 33074, 33074, 33070, 33073, 33074, 33029, 33030, 33031, 33032, 33033, 33034, 33035, 33036, 33037, 33038, 33038, 33039, 33040, 33041, 0, 33042, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 40960, 33046, 33047, 33048, 33049, 33050, 33051, 33052, 33053, 39218, 39218, 39213, 33069, 33074, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33069, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33054, 0, 0, 0, 0, 7556, 8211, 8271, 8266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 11558, 40960, 11566, 40960, 11574, 40960, 11582, 40960, 11590, 0, 0, 40960, 11598, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33026, 39168, 0, 0, 0, 0, 40960, 11606, 40960, 11614, 40960, 40960, 105, 107, 111, 131, 245, 248, 1043, 133, 137, 139, 260, 263, 266, 143, 0, 151, 155, 224, 159, 254, 1047, 1051, 161, 169, 171, 1059, 299, 173, 1063, 446, 449, 452, 506, 509, 147, 165, 171, 173, 446, 449, 491, 506, 509, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 135, 257, 212, 266, 141, 269, 272, 278, 284, 287, 290, 1067, 362, 296, 1071, 365, 305, 302, 308, 311, 314, 317, 320, 332, 335, 236, 338, 341, 1055, 344, 347, 181, 350, 353, 356, 464, 33074, 33074, 33069, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33069, 33074, 33074, 33077, 33066, 33069, 33065, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33075, 33073, 33073, 33069, 0, 33074, 33076, 33069, 33074, 33069, 12183, 12963, 12193, 12973, 12198, 12978, 12203, 12983, 14540, 14939, 12228, 13008, 12238, 13018, 12253, 13033, 12243, 13023, 12248, 13028, 14575, 14974, 14582, 14981, 12313, 13093, 12318, 13098, 14596, 14995, 12323, 13103, 12338, 13118, 12368, 13148, 12383, 13163, 12373, 13153, 12388, 13168, 12393, 13173, 12463, 13243, 14603, 15002, 12473, 13258, 12483, 13268, 12493, 13278, 18116, 18261, 14610, 15009, 12518, 13303, 12513, 13298, 12523, 13308, 12528, 13313, 12533, 13318, 12553, 13338, 12563, 13348, 12578, 13363, 12573, 13358, 14645, 15044, 14659, 15058, 14666, 15065, 14673, 15072, 12623, 13408, 12628, 13413, 12638, 13423, 18161, 18306, 14743, 15142, 12663, 13448, 12673, 13458, 18176, 18321, 14750, 15149, 14757, 15156, 14764, 15163, 12688, 13473, 12698, 13488, 12718, 13508, 12713, 13503, 12778, 13568, 12793, 13583, 12788, 13578, 14771, 15170, 14778, 15177, 12798, 13588, 12803, 13593, 12808, 13598, 12813, 13603, 12828, 13618, 12823, 13613, 12833, 13628, 12838, 13633, 12843, 13638, 12873, 13668, 12898, 13698, 12913, 13713, 12918, 13718, 13178, 13478, 13623, 13683, 7136, 17111, 0, 0, 0, 0, 18081, 18226, 12163, 12943, 14456, 14855, 14449, 14848, 14470, 14869, 14463, 14862, 14526, 14925, 14484, 14883, 14477, 14876, 14498, 14897, 14491, 14890, 14533, 14932, 18101, 18246, 12288, 13068, 12268, 13048, 14554, 14953, 14547, 14946, 14568, 14967, 14561, 14960, 14589, 14988, 12433, 13213, 12453, 13233, 18151, 18296, 12598, 13383, 14624, 15023, 14617, 15016, 14638, 15037, 14631, 15030, 14729, 15128, 14701, 15100, 14694, 15093, 14715, 15114, 14708, 15107, 14722, 15121, 12773, 13563, 12743, 13533, 14820, 15219, 14813, 15212, 14834, 15233, 14827, 15226, 14841, 15240, 12848, 13643, 12888, 13688, 12883, 13678, 12863, 13658, 0, 0, 0, 0, 0, 0, 18436, 18442, 18718, 18742, 18726, 18750, 18734, 18758, 18346, 18352, 18574, 18598, 18582, 18606, 18590, 18614, 18454, 18460, 15800, 15816, 15808, 15824, 0, 0, 18358, 18364, 15592, 15608, 15600, 15616, 0, 0, 18478, 18484, 18766, 18790, 18774, 18798, 18782, 18806, 18370, 18376, 18622, 18646, 18630, 18654, 18638, 18662, 18502, 18508, 15896, 15920, 15904, 15928, 15912, 15936, 18382, 18388, 15640, 15664, 15648, 15672, 15656, 15680, 18514, 18520, 15944, 15960, 15952, 15968, 0, 0, 18394, 18400, 15688, 15704, 15696, 15712, 0, 0, 18532, 18538, 16000, 16024, 16008, 16032, 16016, 16040, 0, 18406, 0, 15720, 0, 15728, 0, 15736, 18556, 18562, 18814, 18838, 18822, 18846, 18830, 18854, 18412, 18418, 18670, 18694, 18678, 18702, 18686, 18710, 18424, 17182, 13969, 17188, 18466, 17194, 13987, 17200, 14017, 17206, 14041, 17212, 18544, 17218, 0, 0, 15776, 15784, 16772, 16802, 16782, 16812, 16792, 16822, 15576, 15584, 16592, 16622, 16602, 16632, 16612, 16642, 15848, 15856, 16832, 16862, 16842, 16872, 16852, 16882, 15624, 15632, 16652, 16682, 16662, 16692, 16672, 16702, 16064, 16072, 16892, 16922, 16902, 16932, 16912, 16942, 15744, 15752, 16712, 16742, 16722, 16752, 16732, 16762, 13957, 13951, 15760, 13963, 15768, 0, 18448, 15792, 13813, 13807, 13795, 17134, 13819, 17031, 467, 17031, 17056, 17538, 15832, 13981, 15840, 0, 18490, 15864, 13825, 17140, 13837, 17146, 13849, 17545, 17552, 17559, 14005, 13999, 15872, 17636, 0, 0, 14011, 15888, 13873, 13867, 13855, 17152, 0, 17566, 17573, 17580, 14059, 14053, 15976, 17644, 14029, 14035, 14065, 15992, 13921, 13915, 13903, 17164, 13897, 17524, 17531, 129, 0, 0, 16048, 14071, 16056, 0, 18568, 16080, 13885, 17158, 13933, 17176, 13945, 16986, 17036, 0, 7128, 7132, 71, 7252, 0, 7144, 7148, 233, 0, 7256, 143, 81, 81, 81, 145, 218, 83, 83, 89, 153, 0, 93, 6541, 0, 0, 97, 99, 101, 101, 101, 0, 0, 6559, 7112, 6568, 0, 117, 0, 440, 0, 117, 0, 87, 17106, 69, 71, 0, 139, 75, 77, 0, 91, 159, 533, 536, 539, 542, 147, 0, 7064, 488, 449, 377, 416, 1123, 0, 0, 0, 0, 73, 137, 139, 147, 149, 0, 0, 0, 0, 0, 0, 8750, 8762, 8942, 8726, 8858, 8738, 8864, 8888, 8900, 8744, 8906, 8756, 8894, 8912, 8918, 7356, 83, 6490, 7076, 6499, 109, 6571, 7120, 7496, 6502, 113, 6583, 7124, 89, 71, 73, 91, 147, 6628, 7192, 6637, 173, 6754, 7244, 7516, 6640, 177, 6757, 7248, 153, 135, 137, 155, 0, 15366, 0, 40960, 15373, 40960, 0, 15380, 40960, 15387, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12133, 40960, 15401, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 15394, 12128, 12138, 15408, 15415, 40960, 40960, 15422, 15429, 40960, 40960, 15436, 15443, 40960, 40960, 40960, 40960, 0, 0, 15450, 15457, 40960, 40960, 15478, 15485, 40960, 40960, 15492, 15499, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 40960, 40960, 0, 40960, 15520, 15527, 15534, 15541, 0, 0, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 37, 39, 41, 43, 45, 47, 49, 51, 6274, 6277, 6280, 6283, 6286, 6289, 6292, 6295, 6298, 6301, 6310, 6760, 6764, 6768, 6772, 6776, 6780, 6784, 6788, 6792, 7296, 7301, 7306, 7311, 7316, 7321, 7326, 7331, 7336, 7341, 7346, 6271, 6307, 6343, 6379, 6415, 6424, 6430, 6436, 6442, 7008, 7012, 7016, 7020, 7024, 7028, 7032, 7036, 7040, 7044, 7048, 6900, 6904, 6908, 6912, 6916, 6920, 6924, 6928, 6932, 6936, 6940, 6944, 6948, 6952, 6956, 6960, 6964, 6968, 6972, 6976, 6980, 6984, 6988, 6992, 6996, 7000, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 1727, 1763, 1775, 1791, 1799, 1811, 1819, 1827, 1839, 1923, 1947, 1963, 1979, 1995, 2011, 2043, 2047, 2051, 2103, 2143, 2159, 2167, 2171, 2183, 2211, 2215, 2239, 2243, 2251, 2267, 2423, 2443, 2507, 2527, 2535, 2539, 2555, 2583, 2627, 2639, 2671, 2683, 2687, 2691, 2715, 2719, 2763, 2775, 2783, 2791, 2807, 2815, 2823, 2867, 2871, 2879, 2883, 2891, 2899, 2915, 2943, 3063, 3083, 3087, 3215, 3219, 3239, 3243, 3251, 3259, 3267, 3279, 3319, 3335, 3355, 3467, 3479, 3495, 3507, 3519, 3527, 3531, 3535, 3539, 3543, 3727, 3799, 3811, 3815, 3819, 3823, 3831, 3835, 3855, 3883, 3891, 3955, 3959, 3967, 3971, 3979, 3983, 4019, 4023, 4051, 4055, 4059, 4063, 4083, 4119, 4123, 4127, 4163, 4227, 4231, 4263, 4279, 4287, 4319, 4355, 4423, 4431, 4451, 4463, 4471, 4479, 4483, 4487, 4511, 4515, 4543, 4551, 4559, 4563, 4575, 4583, 4587, 4591, 4599, 4603, 4763, 4783, 4835, 4839, 4847, 4891, 4899, 4907, 4915, 4975, 4979, 4987, 4991, 4995, 5039, 5043, 5051, 5071, 5075, 5103, 5111, 5115, 5151, 5183, 5203, 5207, 5215, 5259, 5263, 5279, 5315, 5327, 5343, 5367, 5375, 5379, 5383, 5387, 5399, 5403, 5411, 5439, 5443, 5447, 5471, 5475, 5483, 5503, 5507, 5511, 5519, 5523, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16136, 40960, 16144, 40960, 16152, 40960, 16160, 40960, 16168, 40960, 16176, 40960, 16184, 40960, 16192, 40960, 16200, 40960, 16208, 40960, 16216, 40960, 16224, 0, 40960, 16232, 40960, 16240, 40960, 16248, 0, 0, 0, 0, 0, 40960, 16256, 16264, 40960, 16272, 16280, 40960, 16288, 16296, 40960, 16304, 16312, 40960, 16320, 16328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16128, 0, 0, 0, 0, 39171, 39171, 17116, 17122, 40960, 16336, 9908, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16352, 40960, 16360, 40960, 16368, 40960, 16376, 40960, 16384, 40960, 16392, 40960, 16400, 40960, 16408, 40960, 16416, 40960, 16424, 40960, 16432, 40960, 16440, 0, 40960, 16448, 40960, 16456, 40960, 16464, 0, 0, 0, 0, 0, 40960, 16472, 16480, 40960, 16488, 16496, 40960, 16504, 16512, 40960, 16520, 16528, 40960, 16536, 16544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 0, 16344, 0, 0, 16552, 16560, 16568, 16576, 0, 0, 40960, 16584, 9929, 871, 811, 815, 819, 891, 823, 827, 831, 835, 839, 843, 847, 851, 855, 859, 18877, 18883, 18889, 18895, 18901, 18907, 18913, 18919, 18925, 18931, 18937, 18943, 18949, 18955, 18961, 18967, 18973, 18979, 18985, 18991, 18997, 963, 863, 867, 999, 1003, 1007, 1011, 1015, 1019, 1023, 875, 1027, 1031, 879, 883, 887, 895, 899, 903, 907, 911, 915, 919, 923, 927, 931, 935, 939, 943, 947, 1035, 1039, 951, 955, 959, 967, 971, 975, 979, 983, 987, 991, 995, 0, 0, 0, 1727, 1819, 1739, 2427, 1743, 1767, 1747, 3987, 1799, 1755, 1731, 2559, 2447, 1839, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8276, 8282, 8288, 8294, 8300, 8306, 8312, 8318, 8324, 8330, 8336, 8342, 8348, 8354, 10022, 10031, 10040, 10049, 10058, 10067, 10076, 10085, 10094, 10112, 10121, 10130, 10139, 10148, 10103, 11180, 10989, 0, 8360, 8384, 8372, 8456, 8390, 8420, 8366, 8414, 8378, 8432, 8480, 8510, 8504, 8492, 8570, 8462, 8474, 8498, 8486, 8528, 8444, 8516, 8558, 8534, 8426, 8396, 8450, 8468, 8522, 8402, 8564, 8438, 8540, 8408, 8546, 8552, 2351, 2819, 3239, 4295, 0, 0, 0, 0, 0, 0, 0, 0, 7108, 6313, 6316, 6319, 6322, 6325, 6328, 6331, 6334, 6337, 6346, 6349, 6352, 6355, 6358, 6361, 787, 795, 799, 807, 811, 815, 823, 831, 835, 843, 847, 851, 855, 859, 11800, 11808, 11816, 11824, 11832, 11840, 11848, 11856, 11872, 11880, 11888, 11896, 11904, 11912, 11987, 11931, 11864, 0, 1727, 1819, 1739, 2427, 1823, 1967, 1735, 1963, 1803, 2183, 3335, 3727, 3543, 3355, 5215, 2443, 3279, 3403, 3339, 4171, 2299, 3843, 4999, 4191, 2115, 4239, 3995, 2583, 5135, 1919, 2219, 3575, 5415, 1859, 2003, 3483, 1743, 1767, 1747, 2779, 2287, 2175, 2647, 2635, 4075, 1855, 5019, 2203, 2547, 6364, 6367, 6370, 6373, 6382, 6385, 6388, 6391, 6394, 6397, 6400, 6403, 6406, 6409, 6418, 7366, 7381, 7396, 7411, 7426, 7441, 7456, 7471, 7486, 8588, 8606, 8624, 6484, 7172, 6610, 7080, 1227, 1235, 1243, 1251, 1259, 1263, 1267, 1271, 1275, 1279, 1283, 1287, 1291, 1295, 1299, 1303, 1307, 1315, 1319, 1323, 1327, 1331, 1335, 1339, 1343, 1347, 1351, 1355, 1359, 1363, 1367, 1371, 1375, 1379, 1383, 1391, 1399, 1407, 1411, 1415, 1419, 1423, 1427, 1431, 1435, 1439, 1443, 0, 11020, 10664, 11036, 10368, 12004, 10378, 10388, 12072, 10677, 10398, 10408, 10418, 10716, 10729, 10690, 10703, 11945, 10742, 10755, 11198, 9915, 11217, 11236, 11052, 10768, 11255, 11274, 10781, 10428, 10438, 11959, 10794, 11068, 12021, 10448, 10458, 10807, 10468, 10478, 9936, 9943, 10488, 10498, 11293, 10820, 11084, 11312, 10833, 10518, 10508, 12092, 10846, 11331, 10528, 11100, 10538, 10872, 10548, 10885, 12038, 10859, 11116, 10898, 9950, 12055, 10558, 10568, 10911, 10578, 10588, 10598, 11132, 10924, 9957, 11350, 11920, 11148, 10937, 11973, 10608, 10618, 10950, 9964, 10963, 11164, 9971, 11369, 10628, 7351, 7371, 7386, 7401, 7416, 7431, 7446, 7461, 7476, 7491, 8594, 8612, 8630, 8642, 8654, 8666, 8678, 8690, 8702, 8714, 8774, 8786, 8798, 8810, 8822, 7188, 6598, 6454, 7140, 6727, 6742, 6604, 7164, 7168, 6496, 9985, 9999, 9978, 9992, 10976, 6730, 6706, 7264, 6682, 6643, 6505, 6520, 6472, 7152, 7506, 6733, 6709, 7268, 7280, 6694, 6652, 6487, 7196, 7088, 7068, 7116, 7284, 6697, 6601, 6655, 6622, 6721, 7288, 6700, 6592, 6658, 7228, 7156, 6676, 7204, 7232, 7160, 6679, 7208, 8936, 8956, 6550, 7200, 7092, 7072, 7240, 10006, 10157, 6745, 6724, 7292, 6703, 6736, 6712, 7272, 6685, 6646, 6529, 6739, 6715, 7276, 6688, 6649, 6532, 7212, 7096, 7501, 6457, 6586, 6589, 8949, 7060, 6595, 6475, 6625, 6478, 6634, 6508, 6511, 6661, 6667, 6670, 7216, 6673, 6691, 7224, 7236, 6544, 7511, 7100, 6547, 6748, 6565, 6580, 8930, 8924, 7361, 7376, 7391, 7406, 7421, 7436, 7451, 7466, 7481, 8582, 8600, 8618, 8636, 8648, 8660, 8672, 8684, 8696, 8708, 8768, 8780, 8792, 8804, 8816, 8828, 8834, 8840, 8846, 8852, 8870, 8876, 7184, 4983, 3323, 5075, 5023, 3671, 1771, 2271, 5675, 5675, 2571, 5215, 2371, 2567, 3055, 4047, 4447, 4759, 4819, 4871, 5147, 3443, 3583, 3755, 3907, 4703, 5191, 5491, 1807, 2227, 3463, 3791, 4755, 5571, 2739, 3703, 4739, 4887, 3107, 4539, 4831, 2847, 3343, 3607, 3867, 5159, 1871, 2023, 2131, 3211, 3455, 3787, 4079, 4471, 4747, 4771, 5063, 5359, 5539, 5567, 4139, 4203, 4387, 4675, 5243, 5579, 4939, 2503, 2875, 4315, 4507, 3839, 4147, 5015, 5351, 2499, 2703, 3447, 3627, 3679, 4371, 4411, 5287, 2127, 4519, 2035, 2031, 4247, 4391, 4699, 5295, 4967, 3111, 3443, 4951, 1783, 2659, 2963, 3887, 4015, 2163, 4155, 1887, 2935, 1751, 3563, 3235, 4367, 2247, 2483, 4091, 4707, 4923, 3511, 5111, 3555, 3127, 4635, 3159, 4011, 1835, 1959, 2027, 3411, 4347, 4595, 4935, 5211, 2139, 2319, 2583, 2863, 3263, 3707, 4159, 5271, 5499, 5583, 5607, 2103, 3315, 3491, 5099, 2811, 3031, 3059, 3203, 3691, 3767, 3943, 4235, 4399, 4499, 5083, 4715, 5123, 5247, 2063, 2107, 2339, 3751, 4851, 4923, 2843, 2955, 3151, 3503, 4311, 3875, 1851, 2431, 2659, 2759, 2967, 3903, 3931, 4459, 4491, 5219, 5347, 5363, 5423, 1875, 4223, 5199, 5323, 2991, 1815, 1911, 2663, 2695, 3247, 3443, 3779, 4043, 4727, 5143, 5667, 3299, 5283, 2099, 3375, 3387, 3599, 3655, 3915, 4007, 4135, 4363, 5435, 1967, 3075, 5299, 1895, 2731, 3631, 5087, 2919, 2999, 3395, 3887, 5307, 2071, 2303, 2711, 3283, 3359, 3423, 3571, 3911, 4027, 4439, 4855, 4867, 5207, 5335, 2179, 3659, 2307, 3783, 3947, 4743, 5311, 5547, 5587, 3383, 3623, 4547, 4279, 4291, 4327, 3863, 3743, 4963, 1843, 4651, 2075, 2059, 2827, 3115, 4339, 2643, 3587, 3311, 5095, 4839, 5291, 4899, 2855, 1927, 2395, 0, 0, 2479, 0, 3295, 0, 0, 2039, 3871, 4067, 4167, 4195, 4199, 4219, 5371, 4331, 4463, 0, 4751, 0, 4947, 0, 0, 5127, 5171, 0, 0, 0, 5455, 5459, 5463, 5563, 5163, 5319, 1879, 1915, 1935, 2123, 2135, 2199, 2379, 2407, 2415, 2475, 2487, 2707, 2715, 2979, 3019, 3027, 3051, 3223, 3271, 3303, 3415, 3611, 3639, 3687, 3771, 3803, 3919, 4143, 4171, 4179, 4175, 4183, 4187, 4191, 4211, 4215, 4251, 4271, 4299, 4399, 4407, 4415, 4435, 4475, 4555, 4607, 4607, 4711, 4879, 4903, 4955, 4959, 5027, 5031, 5119, 5127, 5339, 5407, 5431, 2971, 5918, 4579, 0, 0, 1759, 2019, 1955, 1867, 1931, 1975, 2119, 2147, 2379, 2359, 2375, 2403, 2479, 2495, 2563, 2575, 2603, 2619, 2851, 2859, 2907, 2939, 2987, 3011, 2995, 3027, 3015, 3051, 3079, 3167, 3179, 3187, 3227, 3295, 3343, 3347, 3367, 3495, 3511, 3599, 3675, 3667, 3687, 3715, 3771, 4115, 3807, 3859, 3871, 3935, 3963, 3999, 4035, 4039, 4067, 4071, 4087, 4107, 4103, 4151, 4275, 4299, 4323, 4379, 4399, 4427, 4475, 4655, 4695, 4811, 4883, 4895, 4903, 4927, 4947, 4931, 4955, 4951, 4943, 4959, 4971, 5031, 5091, 5139, 5195, 5227, 5303, 5339, 5371, 5391, 5407, 5419, 5431, 5515, 5675, 5813, 5808, 5858, 1543, 1583, 1587, 5988, 6033, 6153, 5655, 5671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6613, 6616, 6619, 7176, 7180, 6751, 6751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7541, 7526, 7531, 7546, 7536, 0, 0, 0, 0, 0, 17296, 33045, 17410, 557, 533, 542, 545, 548, 551, 554, 560, 563, 23, 17392, 17398, 17652, 17660, 17224, 17230, 17236, 17242, 17254, 17260, 17266, 17278, 17284, 0, 17290, 17302, 17308, 17314, 17326, 0, 17332, 0, 17338, 17344, 0, 17350, 17356, 0, 17368, 17374, 17380, 17386, 17404, 17272, 17248, 17320, 17362, 7551, 665, 665, 674, 674, 674, 674, 677, 677, 677, 677, 683, 683, 683, 683, 671, 671, 671, 671, 680, 680, 680, 680, 668, 668, 668, 668, 719, 719, 719, 719, 722, 722, 722, 722, 689, 689, 689, 689, 686, 686, 686, 686, 692, 692, 692, 692, 695, 695, 695, 695, 704, 704, 701, 701, 707, 707, 698, 698, 713, 713, 710, 710, 725, 725, 725, 725, 731, 731, 731, 731, 737, 737, 737, 737, 734, 734, 734, 734, 740, 740, 743, 743, 743, 743, 17518, 17518, 749, 749, 749, 749, 746, 746, 746, 746, 776, 776, 17512, 17512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 728, 728, 728, 758, 758, 755, 755, 761, 761, 8271, 767, 767, 752, 752, 764, 764, 773, 773, 773, 773, 653, 653, 9642, 9642, 9754, 9754, 9705, 9705, 9733, 9733, 9726, 9726, 9740, 9740, 9747, 9747, 9747, 9712, 9712, 9712, 770, 770, 770, 770, 9649, 9656, 9684, 9712, 9719, 7561, 7566, 7571, 7586, 7601, 7606, 7611, 7616, 7621, 7636, 7651, 7656, 7661, 7676, 7691, 7696, 7701, 7706, 7721, 7726, 7741, 7746, 7751, 7766, 7771, 7776, 7786, 7846, 7861, 7876, 7881, 7886, 7896, 7911, 7916, 7931, 7936, 7941, 7956, 7961, 7976, 7981, 7986, 7991, 7996, 8001, 8006, 8011, 8016, 8021, 8026, 8031, 8036, 8041, 8046, 8051, 8056, 8061, 8071, 8076, 8081, 8086, 8096, 8101, 8111, 8116, 8121, 8126, 8131, 8136, 8141, 8146, 8151, 8166, 8181, 8186, 8191, 8196, 8201, 8206, 8216, 8221, 8226, 8241, 8256, 8261, 17440, 17446, 17500, 17587, 17594, 17601, 17608, 17615, 17622, 9670, 9677, 9684, 9691, 9712, 9719, 7576, 7581, 7586, 7591, 7601, 7606, 7626, 7631, 7636, 7641, 7651, 7656, 7666, 7671, 7676, 7681, 7691, 7696, 7996, 8001, 8016, 8021, 8026, 8046, 8051, 8056, 8061, 8086, 8096, 8101, 8106, 8126, 8156, 8161, 8166, 8171, 8181, 8186, 17500, 8231, 8236, 8241, 8246, 8256, 8261, 9649, 9656, 9663, 9684, 9698, 7561, 7566, 7571, 7586, 7596, 7611, 7616, 7621, 7636, 7646, 7676, 7701, 7706, 7721, 7726, 7741, 7751, 7766, 7771, 7776, 7786, 7846, 7851, 7861, 7876, 7881, 7886, 7896, 7911, 7931, 7936, 7941, 7956, 7961, 7976, 7981, 7986, 7991, 8006, 8011, 8031, 8036, 8041, 8046, 8051, 8071, 8076, 8081, 8086, 8091, 8111, 8116, 8121, 8126, 8141, 8146, 8151, 8166, 8176, 8191, 8196, 17488, 8216, 8221, 8226, 8241, 8251, 9684, 9698, 7586, 7596, 7636, 7646, 7676, 7686, 7786, 7791, 7826, 7831, 8046, 8051, 8086, 8166, 8176, 8241, 8251, 17668, 17676, 17684, 7921, 7926, 7946, 7951, 7966, 7971, 7796, 7801, 7836, 7841, 7731, 7736, 7711, 7716, 7756, 7761, 7866, 7871, 7901, 7906, 7806, 7811, 7816, 7826, 7821, 7781, 7856, 7891, 7921, 7926, 7946, 7951, 7966, 7971, 7796, 7801, 7836, 7841, 7731, 7736, 7711, 7716, 7756, 7761, 7866, 7871, 7901, 7906, 7806, 7811, 7816, 7826, 7821, 7781, 7856, 7891, 7806, 7811, 7816, 7826, 7791, 7831, 7916, 7766, 7771, 7776, 7806, 7811, 7816, 7916, 7931, 17416, 17416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8977, 8998, 8998, 9005, 9012, 9033, 9040, 9047, 9082, 9082, 9117, 9110, 9138, 9124, 9131, 9166, 9166, 9159, 9173, 9173, 9215, 9215, 9243, 9187, 9187, 9180, 9201, 9201, 9208, 9208, 9250, 9264, 9264, 9271, 9271, 9278, 9285, 9292, 9299, 9299, 9306, 9320, 9334, 9327, 9341, 9341, 9362, 9369, 9418, 9432, 9425, 9397, 9397, 9439, 9439, 9446, 9446, 9488, 9495, 9502, 9460, 9474, 9509, 9516, 0, 0, 9467, 9600, 9607, 9565, 9572, 9544, 9544, 9551, 9593, 9586, 9628, 9628, 8970, 8991, 8984, 9026, 9019, 9061, 9054, 9096, 9068, 9089, 9145, 9222, 9194, 9257, 9411, 9453, 9621, 9614, 9635, 9530, 9376, 9579, 9362, 9418, 9313, 9390, 9537, 9523, 9404, 9383, 9404, 9537, 9075, 9103, 9481, 9348, 8963, 9383, 9292, 9243, 9152, 9558, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9236, 9355, 10175, 10166, 10220, 10202, 10184, 10211, 10229, 9229, 11388, 11004, 10193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 1155, 1159, 53, 55, 3, 63, 1215, 1219, 7004, 0, 0, 0, 0, 0, 0, 33074, 33074, 33074, 33074, 33074, 33074, 33074, 33069, 33069, 33069, 33069, 33069, 33069, 33069, 33074, 33074, 6259, 1091, 1087, 127, 127, 17, 19, 183, 187, 1207, 1211, 1195, 1199, 1171, 1175, 1163, 1167, 1179, 1183, 1187, 1191, 0, 0, 119, 123, 17001, 17001, 17001, 17001, 127, 127, 127, 25, 1155, 29, 0, 55, 53, 63, 3, 1091, 17, 19, 183, 187, 1207, 1211, 7, 13, 21, 23, 27, 57, 61, 59, 0, 121, 9, 11, 65, 0, 0, 0, 0, 17066, 17452, 17071, 0, 17076, 0, 17081, 17458, 17086, 17464, 17091, 17470, 17096, 17476, 17101, 17482, 566, 17422, 17422, 17428, 17428, 17494, 17494, 17434, 17434, 17506, 17506, 17506, 17506, 569, 569, 572, 572, 572, 572, 575, 575, 578, 578, 578, 578, 581, 581, 581, 581, 584, 584, 584, 584, 587, 587, 587, 587, 590, 590, 590, 590, 593, 593, 596, 596, 599, 599, 602, 602, 605, 605, 605, 605, 608, 608, 608, 608, 611, 611, 611, 611, 614, 614, 614, 614, 617, 617, 617, 617, 620, 620, 620, 620, 623, 623, 623, 623, 626, 626, 626, 626, 629, 629, 629, 629, 632, 632, 632, 632, 635, 635, 635, 635, 638, 638, 638, 638, 641, 641, 641, 641, 644, 644, 644, 644, 647, 647, 647, 647, 650, 650, 653, 653, 656, 656, 656, 656, 11776, 11776, 11784, 11784, 11792, 11792, 8066, 8066, 0, 0, 0, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 1143, 1147, 1159, 1179, 1183, 1155, 1451, 1443, 1223, 1231, 1239, 1247, 1255, 1387, 1395, 1403, 1311, 1455, 1227, 1235, 1243, 1251, 1259, 1263, 1267, 1271, 1275, 1279, 1283, 1287, 1291, 1295, 1299, 1303, 1307, 1315, 1319, 1323, 1327, 1331, 1335, 1339, 1343, 1347, 1351, 1355, 1359, 1363, 1367, 1371, 1375, 1379, 1383, 1391, 1399, 1407, 1411, 1415, 1419, 1423, 1427, 1431, 1447, 19064, 19070, 963, 787, 791, 19003, 795, 19009, 19015, 799, 803, 807, 19021, 19027, 19033, 19039, 19045, 19051, 871, 811, 815, 819, 891, 823, 827, 831, 835, 839, 843, 847, 851, 855, 859, 0, 0, 0, 18877, 18883, 18889, 18895, 18901, 18907, 0, 0, 18913, 18919, 18925, 18931, 18937, 18943, 0, 0, 18949, 18955, 18961, 18967, 18973, 18979, 0, 0, 18985, 18991, 18997, 0, 0, 0, 191, 194, 203, 16996, 200, 197, 1095, 0, 1131, 1099, 1103, 1107, 1111, 1135, 1139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 221, 242, 0, 0, 371, 374, 377, 380, 383, 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, 416, 419, 392, 422, 425, 428, 431, 434, 437, 509, 512, 515, 1115, 455, 464, 470, 506, 491, 488, 518, 521, 0, 0, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 569, 572, 584, 593, 0, 650, 602, 587, 617, 656, 635, 638, 641, 644, 605, 623, 629, 611, 632, 599, 608, 578, 581, 590, 596, 614, 620, 626, 659, 740, 716, 662, 0, 572, 584, 0, 647, 0, 0, 587, 0, 656, 635, 638, 641, 644, 605, 623, 629, 611, 632, 0, 608, 578, 581, 590, 0, 614, 0, 626, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 587, 0, 656, 0, 638, 0, 644, 605, 623, 0, 611, 632, 0, 608, 0, 0, 590, 0, 614, 0, 626, 0, 740, 0, 662, 0, 572, 584, 0, 647, 0, 0, 587, 617, 656, 635, 0, 641, 644, 605, 623, 629, 611, 632, 0, 608, 578, 581, 590, 0, 614, 620, 626, 659, 0, 716, 0, 569, 572, 584, 593, 647, 650, 602, 587, 617, 656, 0, 638, 641, 644, 605, 623, 629, 611, 632, 599, 608, 578, 581, 590, 596, 614, 620, 626, 0, 0, 0, 0, 0, 572, 584, 593, 0, 650, 602, 587, 617, 656, 0, 638, 641, 644, 605, 623, 629, 611, 632, 599, 608, 578, 581, 590, 596, 614, 620, 626, 0, 0, 0, 0, 6265, 6262, 6268, 6304, 6340, 6376, 6412, 6421, 6427, 6433, 6439, 0, 0, 0, 0, 0, 6796, 6800, 6804, 6808, 6812, 6816, 6820, 6824, 6828, 6832, 6836, 6840, 6844, 6848, 6852, 6856, 6860, 6864, 6868, 6872, 6876, 6880, 6884, 6888, 6892, 6896, 10014, 71, 101, 6460, 6577, 0, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 9901, 9922, 1283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3087, 2631, 2259, 17860, 1819, 2543, 4911, 2559, 1831, 3287, 3759, 3247, 2087, 2923, 1983, 3255, 2067, 4375, 3971, 5003, 2515, 2315, 3683, 3099, 3143, 1727, 1739, 5131, 2779, 1767, 2287, 3131, 5043, 3091, 4207, 4267, 2295, 3651, 3339, 3335, 3991, 2091, 2391, 5187, 0, 0, 0, 0, 1787, 1779, 1795, 5703, 1863, 1879, 1883, 1891, 1899, 1903, 1915, 1907, 1459, 5723, 1935, 1939, 1943, 1971, 5708, 1463, 1951, 1983, 5718, 1999, 2007, 1847, 2015, 2019, 6193, 2047, 2055, 1471, 2079, 2083, 2091, 2095, 1475, 2119, 2123, 2135, 2147, 2151, 2155, 2163, 2195, 2199, 2207, 2223, 2231, 2235, 2235, 2235, 5738, 3731, 2255, 2263, 5743, 2275, 2283, 2291, 2331, 2311, 2323, 2327, 2335, 2343, 2347, 2355, 2363, 2367, 2367, 2375, 2383, 2387, 2399, 2435, 2407, 2439, 2411, 2419, 2059, 2511, 2455, 2459, 2463, 2451, 2471, 2467, 2491, 5748, 2519, 2523, 2531, 2543, 2551, 2579, 5753, 5758, 2591, 2595, 2599, 2587, 2607, 1479, 1483, 2615, 2623, 2623, 5763, 2651, 2655, 2659, 2667, 5768, 2675, 2679, 2895, 2687, 1487, 2699, 2715, 2727, 2723, 5778, 2735, 5783, 2747, 2743, 2751, 2767, 2771, 1491, 2787, 2795, 2799, 2803, 1495, 5788, 1499, 2831, 2835, 2839, 2847, 6243, 2871, 5798, 5798, 4567, 2887, 2887, 1503, 5833, 6043, 2903, 2911, 1507, 2931, 2947, 2951, 2959, 2975, 1515, 1511, 2979, 5803, 2983, 3003, 3007, 3011, 3007, 3023, 3027, 3043, 3035, 3039, 3047, 3051, 3055, 3067, 3071, 3095, 3103, 3119, 3139, 5818, 3135, 3123, 3147, 3155, 3175, 5823, 3183, 3171, 3163, 1519, 3191, 3199, 3207, 3195, 1523, 3223, 3231, 5828, 3275, 3327, 3291, 1535, 3303, 1531, 1527, 1987, 1991, 3331, 3307, 4523, 1635, 3343, 3347, 3351, 3371, 3363, 5853, 1539, 3391, 3379, 3407, 3415, 5863, 3419, 3399, 3427, 1543, 3431, 3435, 3439, 3451, 5868, 3459, 1547, 3471, 5873, 3475, 1551, 3487, 3499, 3511, 3515, 5878, 5773, 5883, 3547, 5888, 3559, 3567, 3551, 3579, 3595, 3611, 3599, 3603, 3615, 3619, 5893, 3591, 3643, 3647, 1555, 3667, 3663, 5898, 3635, 3695, 5903, 5908, 3699, 3719, 3715, 3711, 1559, 3723, 3739, 3735, 3747, 5713, 3763, 5913, 3775, 5923, 3795, 3807, 3827, 5928, 3847, 3851, 5933, 5938, 3879, 3895, 1563, 3899, 1567, 1567, 3923, 3927, 3935, 3939, 3951, 1571, 3975, 5943, 4003, 5948, 4015, 5793, 4031, 5953, 5958, 5963, 1575, 1579, 4087, 5973, 5968, 5978, 5983, 4095, 4099, 4099, 4107, 1587, 4111, 1591, 1595, 5993, 4131, 4139, 4151, 1599, 5998, 4187, 6003, 6008, 4219, 4243, 1603, 4251, 4255, 4259, 6013, 6018, 6018, 4283, 1607, 6023, 4303, 4307, 1611, 6028, 4335, 1615, 4351, 4343, 4359, 6038, 4383, 1619, 4395, 4403, 4419, 1623, 6048, 6053, 1627, 6058, 4443, 6063, 4455, 4467, 4475, 6068, 6073, 4495, 6078, 4503, 5838, 1631, 4527, 4531, 1639, 4535, 2611, 6083, 6088, 5843, 5848, 4567, 4571, 5107, 1643, 4615, 4611, 4619, 2111, 4623, 4627, 4631, 4639, 6093, 4635, 4643, 4663, 4667, 4647, 4671, 4691, 4711, 4659, 4679, 4683, 4687, 6098, 6108, 6103, 1647, 4719, 4723, 4731, 6128, 4735, 6113, 1651, 1655, 6118, 6123, 1659, 4767, 4771, 4775, 4779, 4791, 4787, 4799, 4795, 4811, 4803, 4807, 4815, 1663, 4823, 4827, 1667, 4843, 4847, 6133, 4859, 4863, 1671, 4875, 1467, 6138, 6143, 1675, 1679, 4919, 4943, 4971, 4987, 6148, 5007, 5011, 5035, 5047, 6158, 5728, 5059, 5055, 5067, 5733, 5079, 5091, 6163, 6168, 5155, 5167, 5175, 6173, 5179, 5223, 5235, 5239, 5231, 5251, 5255, 6178, 5267, 1683, 5275, 6183, 1687, 5331, 2755, 5355, 6188, 6198, 1691, 1695, 5395, 6203, 1699, 6208, 5419, 5419, 5427, 6213, 5451, 1703, 5467, 5479, 5487, 5495, 1707, 6218, 5515, 5543, 5555, 1711, 1715, 5559, 6223, 1719, 6228, 6233, 6238, 5595, 1723, 5615, 5623, 5627, 5635, 5643, 5651, 6248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + nfkcIndex = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 1, 2, 3, 92, 4, 5, 0, 93, 94, 6, 7, 8, 9, 10, 95, 96, 11, 0, 0, 12, 97, 98, 13, 0, 99, 100, 101, 0, 102, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 104, 0, 105, 106, 107, 108, 109, 110, 111, 112, 113, 108, 114, 115, 116, 0, 117, 118, 119, 120, 121, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 132, 133, 134, 135, 136, 137, 0, 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 0, 0, 140, 0, 0, 141, 0, 142, 0, 0, 0, 143, 144, 145, 0, 14, 146, 147, 148, 149, 0, 0, 150, 151, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 152, 153, 154, 155, 26, 27, 156, 157, 158, 28, 29, 159, 160, 0, 0, 0, 0, 30, 31, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 0, 164, 0, 0, 0, 0, 0, 165, 0, 166, 0, 167, 0, 168, 0, 0, 169, 170, 32, 33, 34, 171, 172, 35, 36, 37, 173, 38, 39, 0, 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174, 175, 176, 0, 177, 0, 178, 179, 0, 0, 180, 181, 182, 183, 184, 0, 0, 185, 186, 0, 187, 0, 188, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 195, 189, 190, 191, 192, 193, 194, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 197, 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 204, 0, 205, 183, 0, 206, 207, 0, 0, 208, 108, 209, 0, 0, 0, 210, 211, 212, 0, 0, 213, 214, 215, 0, 216, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 219, 220, 0, 0, 0, 0, 0, 215, 0, 0, 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 226, 227, 0, 228, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 75, 239, 240, 241, 242, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 0, 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 78, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 246, 247, 0, 81, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 13, 0, 0, 0, 0, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + nfkcSparseOffset = new sliceType([0, 14, 18, 27, 37, 53, 55, 60, 71, 86, 99, 107, 111, 116, 118, 135, 143, 150, 153, 160, 164, 168, 170, 172, 181, 185, 192, 197, 200, 210, 213, 220, 228, 232, 234, 237, 241, 247, 264, 276, 278, 284, 286, 288, 290, 292, 294, 296, 298, 301, 304, 306, 309, 312, 316, 321, 330, 332, 335, 337, 348, 359, 373, 387, 403, 417, 424, 430, 445, 449, 451, 455, 457, 460, 462, 465, 467, 470, 472, 474, 476, 488, 498, 508, 511, 515, 517, 519, 521, 523, 526, 528, 530, 532, 534, 540, 543, 547, 549, 556, 562, 568, 576, 582, 588, 594, 598, 600, 602, 604, 606, 612, 615, 618, 626, 633, 636, 639, 641, 649, 652, 659, 662, 668, 670, 672, 675, 677, 679, 681, 683, 686, 688, 690, 692, 705, 715, 717, 719, 723, 728, 740, 745, 754, 760, 765, 769, 774, 778, 794, 808, 822, 836, 842, 844, 847, 857, 859]); + nfkcSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(2, 13, 0), new valueRange.ptr(1, 160, 160), new valueRange.ptr(17016, 168, 168), new valueRange.ptr(131, 170, 170), new valueRange.ptr(16996, 175, 175), new valueRange.ptr(37, 178, 179), new valueRange.ptr(16986, 180, 180), new valueRange.ptr(476, 181, 181), new valueRange.ptr(17041, 184, 184), new valueRange.ptr(35, 185, 185), new valueRange.ptr(159, 186, 186), new valueRange.ptr(8732, 188, 188), new valueRange.ptr(8720, 189, 189), new valueRange.ptr(8882, 190, 190), new valueRange.ptr(145, 3, 0), new valueRange.ptr(18146, 160, 161), new valueRange.ptr(18196, 175, 176), new valueRange.ptr(40960, 183, 183), new valueRange.ptr(3, 8, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(145, 176, 176), new valueRange.ptr(281, 177, 177), new valueRange.ptr(149, 178, 178), new valueRange.ptr(165, 179, 179), new valueRange.ptr(323, 180, 182), new valueRange.ptr(175, 183, 183), new valueRange.ptr(179, 184, 184), new valueRange.ptr(10, 9, 0), new valueRange.ptr(17006, 152, 152), new valueRange.ptr(17011, 153, 154), new valueRange.ptr(17046, 155, 155), new valueRange.ptr(16991, 156, 156), new valueRange.ptr(17026, 157, 157), new valueRange.ptr(275, 160, 160), new valueRange.ptr(153, 161, 161), new valueRange.ptr(167, 162, 163), new valueRange.ptr(359, 164, 164), new valueRange.ptr(0, 15, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(40960, 141, 141), new valueRange.ptr(14245, 144, 144), new valueRange.ptr(14257, 145, 145), new valueRange.ptr(14239, 147, 147), new valueRange.ptr(40960, 150, 150), new valueRange.ptr(14359, 151, 151), new valueRange.ptr(14305, 156, 156), new valueRange.ptr(14281, 157, 157), new valueRange.ptr(14323, 158, 158), new valueRange.ptr(40960, 180, 181), new valueRange.ptr(14365, 182, 182), new valueRange.ptr(14371, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 131, 135), new valueRange.ptr(1, 4, 0), new valueRange.ptr(33043, 129, 130), new valueRange.ptr(33074, 132, 132), new valueRange.ptr(33069, 133, 133), new valueRange.ptr(33037, 135, 135), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33074, 144, 151), new valueRange.ptr(33049, 152, 152), new valueRange.ptr(33050, 153, 153), new valueRange.ptr(33051, 154, 154), new valueRange.ptr(14401, 162, 162), new valueRange.ptr(14407, 163, 163), new valueRange.ptr(14419, 164, 164), new valueRange.ptr(14413, 165, 165), new valueRange.ptr(14425, 166, 166), new valueRange.ptr(40960, 167, 167), new valueRange.ptr(0, 14, 0), new valueRange.ptr(14443, 128, 128), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(14431, 130, 130), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14437, 147, 147), new valueRange.ptr(40960, 149, 149), new valueRange.ptr(33074, 150, 156), new valueRange.ptr(33074, 159, 162), new valueRange.ptr(33069, 163, 163), new valueRange.ptr(33074, 164, 164), new valueRange.ptr(33074, 167, 168), new valueRange.ptr(33069, 170, 170), new valueRange.ptr(33074, 171, 172), new valueRange.ptr(33069, 173, 173), new valueRange.ptr(0, 12, 0), new valueRange.ptr(33055, 145, 145), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(33069, 177, 177), new valueRange.ptr(33074, 178, 179), new valueRange.ptr(33069, 180, 180), new valueRange.ptr(33074, 181, 182), new valueRange.ptr(33069, 183, 185), new valueRange.ptr(33074, 186, 186), new valueRange.ptr(33069, 187, 188), new valueRange.ptr(33074, 189, 189), new valueRange.ptr(33069, 190, 190), new valueRange.ptr(33074, 191, 191), new valueRange.ptr(5, 7, 0), new valueRange.ptr(33074, 128, 128), new valueRange.ptr(33074, 129, 129), new valueRange.ptr(33069, 130, 131), new valueRange.ptr(33069, 132, 133), new valueRange.ptr(33069, 134, 135), new valueRange.ptr(33069, 136, 137), new valueRange.ptr(33074, 138, 138), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33074, 171, 177), new valueRange.ptr(33069, 178, 178), new valueRange.ptr(33074, 179, 179), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33074, 150, 153), new valueRange.ptr(33074, 155, 163), new valueRange.ptr(33074, 165, 167), new valueRange.ptr(33074, 169, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 153, 155), new valueRange.ptr(0, 16, 0), new valueRange.ptr(33074, 148, 161), new valueRange.ptr(33069, 163, 163), new valueRange.ptr(33074, 164, 165), new valueRange.ptr(33069, 166, 166), new valueRange.ptr(33074, 167, 168), new valueRange.ptr(33069, 169, 169), new valueRange.ptr(33074, 170, 172), new valueRange.ptr(33069, 173, 175), new valueRange.ptr(33046, 176, 176), new valueRange.ptr(33047, 177, 177), new valueRange.ptr(33048, 178, 178), new valueRange.ptr(33074, 179, 181), new valueRange.ptr(33069, 182, 182), new valueRange.ptr(33074, 183, 184), new valueRange.ptr(33069, 185, 186), new valueRange.ptr(33074, 187, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 168, 168), new valueRange.ptr(16088, 169, 169), new valueRange.ptr(40960, 176, 176), new valueRange.ptr(16096, 177, 177), new valueRange.ptr(40960, 179, 179), new valueRange.ptr(16104, 180, 180), new valueRange.ptr(39170, 188, 188), new valueRange.ptr(8, 6, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(33074, 145, 145), new valueRange.ptr(33069, 146, 146), new valueRange.ptr(33074, 147, 147), new valueRange.ptr(33074, 148, 148), new valueRange.ptr(17692, 152, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(8, 6, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11422, 139, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(17756, 156, 157), new valueRange.ptr(17772, 159, 159), new valueRange.ptr(0, 3, 0), new valueRange.ptr(17812, 179, 179), new valueRange.ptr(17820, 182, 182), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(8, 3, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(17780, 153, 155), new valueRange.ptr(17804, 158, 158), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(0, 8, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11446, 136, 136), new valueRange.ptr(11438, 139, 139), new valueRange.ptr(11454, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 150, 151), new valueRange.ptr(17828, 156, 156), new valueRange.ptr(17836, 157, 157), new valueRange.ptr(0, 3, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(11462, 148, 148), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11470, 138, 138), new valueRange.ptr(11486, 139, 139), new valueRange.ptr(11478, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(6145, 4, 0), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(16112, 136, 136), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(33056, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 188, 188), new valueRange.ptr(40960, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(11494, 128, 128), new valueRange.ptr(39168, 130, 130), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(11502, 135, 135), new valueRange.ptr(11510, 136, 136), new valueRange.ptr(12112, 138, 138), new valueRange.ptr(11736, 139, 139), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11518, 138, 138), new valueRange.ptr(11534, 139, 139), new valueRange.ptr(11526, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(27626, 7, 0), new valueRange.ptr(39172, 138, 138), new valueRange.ptr(39168, 143, 143), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16120, 154, 154), new valueRange.ptr(12120, 156, 156), new valueRange.ptr(11747, 157, 157), new valueRange.ptr(11542, 158, 159), new valueRange.ptr(0, 3, 0), new valueRange.ptr(9761, 179, 179), new valueRange.ptr(33058, 184, 185), new valueRange.ptr(33028, 186, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33059, 136, 139), new valueRange.ptr(0, 2, 0), new valueRange.ptr(9782, 179, 179), new valueRange.ptr(33060, 184, 185), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33061, 136, 139), new valueRange.ptr(9768, 156, 156), new valueRange.ptr(9775, 157, 157), new valueRange.ptr(0, 5, 0), new valueRange.ptr(779, 140, 140), new valueRange.ptr(33069, 152, 153), new valueRange.ptr(33069, 181, 181), new valueRange.ptr(33069, 183, 183), new valueRange.ptr(33067, 185, 185), new valueRange.ptr(0, 16, 0), new valueRange.ptr(9796, 131, 131), new valueRange.ptr(9803, 141, 141), new valueRange.ptr(9810, 146, 146), new valueRange.ptr(9817, 151, 151), new valueRange.ptr(9824, 156, 156), new valueRange.ptr(9789, 169, 169), new valueRange.ptr(33062, 177, 177), new valueRange.ptr(33063, 178, 178), new valueRange.ptr(19076, 179, 179), new valueRange.ptr(33064, 180, 180), new valueRange.ptr(19085, 181, 181), new valueRange.ptr(17844, 182, 182), new valueRange.ptr(17908, 183, 183), new valueRange.ptr(17852, 184, 184), new valueRange.ptr(17919, 185, 185), new valueRange.ptr(33063, 186, 189), new valueRange.ptr(0, 11, 0), new valueRange.ptr(33063, 128, 128), new valueRange.ptr(19094, 129, 129), new valueRange.ptr(33074, 130, 131), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 134, 135), new valueRange.ptr(9838, 147, 147), new valueRange.ptr(9845, 157, 157), new valueRange.ptr(9852, 162, 162), new valueRange.ptr(9859, 167, 167), new valueRange.ptr(9866, 172, 172), new valueRange.ptr(9831, 185, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 134, 134), new valueRange.ptr(0, 5, 0), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(11550, 166, 166), new valueRange.ptr(39168, 174, 174), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(33028, 185, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 141, 141), new valueRange.ptr(0, 1, 0), new valueRange.ptr(783, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 128, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(47360, 161, 181), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 168, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 128, 130), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 157, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 148, 148), new valueRange.ptr(33028, 180, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 146, 146), new valueRange.ptr(33074, 157, 157), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33073, 169, 169), new valueRange.ptr(4, 2, 0), new valueRange.ptr(33070, 185, 186), new valueRange.ptr(33069, 187, 187), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 151, 151), new valueRange.ptr(33069, 152, 152), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33028, 160, 160), new valueRange.ptr(33074, 181, 188), new valueRange.ptr(33069, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33074, 176, 180), new valueRange.ptr(33069, 181, 186), new valueRange.ptr(33074, 187, 188), new valueRange.ptr(33069, 189, 189), new valueRange.ptr(0, 8, 0), new valueRange.ptr(11622, 128, 128), new valueRange.ptr(11630, 129, 129), new valueRange.ptr(40960, 130, 130), new valueRange.ptr(11638, 131, 131), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 171, 171), new valueRange.ptr(33069, 172, 172), new valueRange.ptr(33074, 173, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 170, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 166, 166), new valueRange.ptr(33028, 178, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33074, 144, 146), new valueRange.ptr(33025, 148, 148), new valueRange.ptr(33069, 149, 153), new valueRange.ptr(33074, 154, 155), new valueRange.ptr(33069, 156, 159), new valueRange.ptr(33074, 160, 160), new valueRange.ptr(33025, 162, 168), new valueRange.ptr(33069, 173, 173), new valueRange.ptr(33074, 180, 180), new valueRange.ptr(33074, 184, 185), new valueRange.ptr(2, 10, 0), new valueRange.ptr(67, 172, 172), new valueRange.ptr(209, 173, 173), new valueRange.ptr(69, 174, 174), new valueRange.ptr(73, 176, 177), new valueRange.ptr(230, 178, 178), new valueRange.ptr(79, 179, 186), new valueRange.ptr(95, 188, 188), new valueRange.ptr(239, 189, 189), new valueRange.ptr(97, 190, 190), new valueRange.ptr(101, 191, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(1, 128, 138), new valueRange.ptr(1083, 145, 145), new valueRange.ptr(17051, 151, 151), new valueRange.ptr(29, 164, 164), new valueRange.ptr(6259, 165, 165), new valueRange.ptr(7004, 166, 166), new valueRange.ptr(1, 175, 175), new valueRange.ptr(9873, 179, 179), new valueRange.ptr(10238, 180, 180), new valueRange.ptr(9880, 182, 182), new valueRange.ptr(10248, 183, 183), new valueRange.ptr(6253, 188, 188), new valueRange.ptr(17001, 190, 190), new valueRange.ptr(2, 13, 0), new valueRange.ptr(6451, 135, 135), new valueRange.ptr(6448, 136, 136), new valueRange.ptr(6256, 137, 137), new valueRange.ptr(10638, 151, 151), new valueRange.ptr(1, 159, 159), new valueRange.ptr(33, 176, 176), new valueRange.ptr(147, 177, 177), new valueRange.ptr(41, 180, 185), new valueRange.ptr(23, 186, 186), new valueRange.ptr(1127, 187, 187), new valueRange.ptr(59, 188, 188), new valueRange.ptr(17, 189, 190), new valueRange.ptr(157, 191, 191), new valueRange.ptr(2, 15, 0), new valueRange.ptr(33, 128, 137), new valueRange.ptr(23, 138, 138), new valueRange.ptr(1127, 139, 139), new valueRange.ptr(59, 140, 140), new valueRange.ptr(17, 141, 142), new valueRange.ptr(131, 144, 144), new valueRange.ptr(139, 145, 145), new valueRange.ptr(159, 146, 146), new valueRange.ptr(177, 147, 147), new valueRange.ptr(260, 148, 148), new valueRange.ptr(145, 149, 149), new valueRange.ptr(151, 150, 153), new valueRange.ptr(161, 154, 154), new valueRange.ptr(167, 155, 156), new valueRange.ptr(6553, 168, 168), new valueRange.ptr(0, 13, 0), new valueRange.ptr(33074, 144, 145), new valueRange.ptr(33025, 146, 147), new valueRange.ptr(33074, 148, 151), new valueRange.ptr(33025, 152, 154), new valueRange.ptr(33074, 155, 156), new valueRange.ptr(33074, 161, 161), new valueRange.ptr(33025, 165, 166), new valueRange.ptr(33074, 167, 167), new valueRange.ptr(33069, 168, 168), new valueRange.ptr(33074, 169, 169), new valueRange.ptr(33025, 170, 171), new valueRange.ptr(33069, 172, 175), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(7, 6, 0), new valueRange.ptr(8576, 137, 137), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(15289, 154, 155), new valueRange.ptr(15303, 174, 174), new valueRange.ptr(14, 5, 0), new valueRange.ptr(15310, 141, 142), new valueRange.ptr(15317, 143, 143), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(371, 14, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(15331, 132, 132), new valueRange.ptr(40960, 136, 136), new valueRange.ptr(15338, 137, 137), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(15345, 140, 140), new valueRange.ptr(40960, 163, 163), new valueRange.ptr(15352, 164, 164), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(15359, 166, 166), new valueRange.ptr(9887, 172, 173), new valueRange.ptr(9894, 175, 175), new valueRange.ptr(10268, 176, 176), new valueRange.ptr(40960, 188, 188), new valueRange.ptr(7, 3, 0), new valueRange.ptr(15464, 160, 161), new valueRange.ptr(15506, 162, 163), new valueRange.ptr(15548, 170, 173), new valueRange.ptr(4, 1, 0), new valueRange.ptr(1163, 169, 170), new valueRange.ptr(2, 3, 0), new valueRange.ptr(87, 128, 143), new valueRange.ptr(131, 144, 169), new valueRange.ptr(33, 170, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(10651, 140, 140), new valueRange.ptr(611, 2, 0), new valueRange.ptr(7052, 180, 180), new valueRange.ptr(6445, 181, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(17629, 156, 156), new valueRange.ptr(0, 2, 0), new valueRange.ptr(149, 188, 188), new valueRange.ptr(109, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 175, 177), new valueRange.ptr(0, 2, 0), new valueRange.ptr(1151, 175, 175), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 160, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(3523, 159, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(5679, 179, 179), new valueRange.ptr(4, 11, 0), new valueRange.ptr(5527, 128, 130), new valueRange.ptr(5551, 131, 131), new valueRange.ptr(5575, 132, 133), new valueRange.ptr(5591, 134, 137), new valueRange.ptr(5611, 138, 140), new valueRange.ptr(5631, 141, 141), new valueRange.ptr(5639, 142, 142), new valueRange.ptr(5647, 143, 144), new valueRange.ptr(5659, 145, 147), new valueRange.ptr(5675, 148, 148), new valueRange.ptr(5683, 149, 149), new valueRange.ptr(4, 9, 0), new valueRange.ptr(1, 128, 128), new valueRange.ptr(33068, 170, 170), new valueRange.ptr(33073, 171, 171), new valueRange.ptr(33075, 172, 172), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(33071, 174, 174), new valueRange.ptr(33071, 175, 175), new valueRange.ptr(1203, 182, 182), new valueRange.ptr(2183, 184, 186), new valueRange.ptr(6, 9, 0), new valueRange.ptr(787, 177, 177), new valueRange.ptr(791, 178, 178), new valueRange.ptr(19003, 179, 179), new valueRange.ptr(795, 180, 180), new valueRange.ptr(19009, 181, 182), new valueRange.ptr(799, 183, 183), new valueRange.ptr(803, 184, 184), new valueRange.ptr(807, 185, 185), new valueRange.ptr(19021, 186, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 175, 175), new valueRange.ptr(33074, 180, 189), new valueRange.ptr(0, 3, 0), new valueRange.ptr(527, 156, 156), new valueRange.ptr(530, 157, 157), new valueRange.ptr(33074, 158, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 176, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(5691, 176, 176), new valueRange.ptr(12, 1, 0), new valueRange.ptr(215, 184, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 134, 134), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 132, 132), new valueRange.ptr(33074, 160, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 171, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 147, 147), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 179, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 128, 128), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33074, 176, 176), new valueRange.ptr(33074, 178, 179), new valueRange.ptr(33069, 180, 180), new valueRange.ptr(33074, 183, 184), new valueRange.ptr(33074, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 129, 129), new valueRange.ptr(33028, 182, 182), new valueRange.ptr(8, 3, 0), new valueRange.ptr(5687, 156, 157), new valueRange.ptr(293, 158, 158), new valueRange.ptr(5699, 159, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 173, 173), new valueRange.ptr(0, 6, 0), new valueRange.ptr(58624, 128, 128), new valueRange.ptr(50688, 129, 155), new valueRange.ptr(58624, 156, 156), new valueRange.ptr(50688, 157, 183), new valueRange.ptr(58624, 184, 184), new valueRange.ptr(50688, 185, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 147), new valueRange.ptr(58624, 148, 148), new valueRange.ptr(50688, 149, 175), new valueRange.ptr(58624, 176, 176), new valueRange.ptr(50688, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 139), new valueRange.ptr(58624, 140, 140), new valueRange.ptr(50688, 141, 167), new valueRange.ptr(58624, 168, 168), new valueRange.ptr(50688, 169, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(50688, 128, 131), new valueRange.ptr(58624, 132, 132), new valueRange.ptr(50688, 133, 159), new valueRange.ptr(58624, 160, 160), new valueRange.ptr(50688, 161, 187), new valueRange.ptr(58624, 188, 188), new valueRange.ptr(50688, 189, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 151), new valueRange.ptr(58624, 152, 152), new valueRange.ptr(50688, 153, 179), new valueRange.ptr(58624, 180, 180), new valueRange.ptr(50688, 181, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 143), new valueRange.ptr(58624, 144, 144), new valueRange.ptr(50688, 145, 171), new valueRange.ptr(58624, 172, 172), new valueRange.ptr(50688, 173, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(58624, 164, 164), new valueRange.ptr(50688, 165, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(2, 1, 0), new valueRange.ptr(3, 129, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 182, 186), new valueRange.ptr(44, 5, 0), new valueRange.ptr(33069, 141, 141), new valueRange.ptr(33074, 143, 143), new valueRange.ptr(33074, 184, 184), new valueRange.ptr(33025, 185, 186), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 165, 165), new valueRange.ptr(33069, 166, 166), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 134, 134), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(6142, 7, 0), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16952, 154, 154), new valueRange.ptr(40960, 155, 155), new valueRange.ptr(16962, 156, 156), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(16972, 171, 171), new valueRange.ptr(33028, 185, 186), new valueRange.ptr(0, 6, 0), new valueRange.ptr(33074, 128, 130), new valueRange.ptr(39168, 167, 167), new valueRange.ptr(11646, 174, 174), new valueRange.ptr(11656, 175, 175), new valueRange.ptr(40960, 177, 178), new valueRange.ptr(33028, 179, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 128, 128), new valueRange.ptr(33026, 138, 138), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 181, 181), new valueRange.ptr(33026, 182, 182), new valueRange.ptr(2, 1, 0), new valueRange.ptr(33026, 169, 170), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11666, 139, 139), new valueRange.ptr(11676, 140, 140), new valueRange.ptr(33028, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(33074, 166, 172), new valueRange.ptr(33074, 176, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 130, 130), new valueRange.ptr(33026, 134, 134), new valueRange.ptr(27482, 6, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 185, 185), new valueRange.ptr(39168, 186, 186), new valueRange.ptr(11696, 187, 187), new valueRange.ptr(11686, 188, 189), new valueRange.ptr(11706, 190, 190), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 130, 130), new valueRange.ptr(33026, 131, 131), new valueRange.ptr(0, 5, 0), new valueRange.ptr(39168, 175, 175), new valueRange.ptr(40960, 184, 185), new valueRange.ptr(11716, 186, 186), new valueRange.ptr(11726, 187, 187), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33028, 182, 182), new valueRange.ptr(33026, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 171, 171), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 180, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 135, 135), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33028, 153, 153), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33026, 130, 130), new valueRange.ptr(33028, 132, 133), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 176, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 176, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 158, 158), new valueRange.ptr(0, 12, 0), new valueRange.ptr(17868, 158, 158), new valueRange.ptr(17878, 159, 159), new valueRange.ptr(17930, 160, 160), new valueRange.ptr(17944, 161, 161), new valueRange.ptr(17958, 162, 162), new valueRange.ptr(17972, 163, 163), new valueRange.ptr(17986, 164, 164), new valueRange.ptr(33067, 165, 166), new valueRange.ptr(33025, 167, 169), new valueRange.ptr(33072, 173, 173), new valueRange.ptr(33067, 174, 178), new valueRange.ptr(33069, 187, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(33069, 128, 130), new valueRange.ptr(33074, 133, 137), new valueRange.ptr(33069, 138, 139), new valueRange.ptr(33074, 170, 173), new valueRange.ptr(17888, 187, 187), new valueRange.ptr(17898, 188, 188), new valueRange.ptr(18000, 189, 189), new valueRange.ptr(18028, 190, 190), new valueRange.ptr(18014, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(18042, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 130, 132), new valueRange.ptr(2, 3, 0), new valueRange.ptr(67, 128, 153), new valueRange.ptr(131, 154, 179), new valueRange.ptr(67, 180, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(91, 128, 141), new valueRange.ptr(131, 142, 148), new valueRange.ptr(147, 150, 167), new valueRange.ptr(67, 168, 191), new valueRange.ptr(2, 11, 0), new valueRange.ptr(115, 128, 129), new valueRange.ptr(131, 130, 155), new valueRange.ptr(67, 156, 156), new valueRange.ptr(71, 158, 159), new valueRange.ptr(79, 162, 162), new valueRange.ptr(85, 165, 166), new valueRange.ptr(93, 169, 172), new valueRange.ptr(103, 174, 181), new valueRange.ptr(131, 182, 185), new valueRange.ptr(141, 187, 187), new valueRange.ptr(145, 189, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(151, 128, 131), new valueRange.ptr(161, 133, 143), new valueRange.ptr(67, 144, 169), new valueRange.ptr(131, 170, 191), new valueRange.ptr(2, 8, 0), new valueRange.ptr(175, 128, 131), new valueRange.ptr(67, 132, 133), new valueRange.ptr(73, 135, 138), new valueRange.ptr(85, 141, 148), new valueRange.ptr(103, 150, 156), new valueRange.ptr(131, 158, 183), new valueRange.ptr(67, 184, 185), new valueRange.ptr(73, 187, 190), new valueRange.ptr(2, 5, 0), new valueRange.ptr(83, 128, 132), new valueRange.ptr(95, 134, 134), new valueRange.ptr(103, 138, 144), new valueRange.ptr(131, 146, 171), new valueRange.ptr(67, 172, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(107, 128, 133), new valueRange.ptr(131, 134, 159), new valueRange.ptr(67, 160, 185), new valueRange.ptr(131, 186, 191), new valueRange.ptr(2, 3, 0), new valueRange.ptr(143, 128, 147), new valueRange.ptr(67, 148, 173), new valueRange.ptr(131, 174, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(167, 128, 135), new valueRange.ptr(67, 136, 161), new valueRange.ptr(131, 162, 187), new valueRange.ptr(67, 188, 191), new valueRange.ptr(2, 3, 0), new valueRange.ptr(75, 128, 149), new valueRange.ptr(131, 150, 175), new valueRange.ptr(67, 176, 191), new valueRange.ptr(3, 15, 0), new valueRange.ptr(440, 128, 128), new valueRange.ptr(1119, 129, 129), new valueRange.ptr(443, 130, 154), new valueRange.ptr(1115, 155, 155), new valueRange.ptr(455, 156, 156), new valueRange.ptr(464, 157, 157), new valueRange.ptr(470, 158, 158), new valueRange.ptr(506, 159, 159), new valueRange.ptr(491, 160, 160), new valueRange.ptr(488, 161, 161), new valueRange.ptr(371, 162, 178), new valueRange.ptr(392, 179, 179), new valueRange.ptr(422, 180, 186), new valueRange.ptr(1119, 187, 187), new valueRange.ptr(443, 188, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(455, 128, 148), new valueRange.ptr(1115, 149, 149), new valueRange.ptr(455, 150, 150), new valueRange.ptr(464, 151, 151), new valueRange.ptr(470, 152, 152), new valueRange.ptr(506, 153, 153), new valueRange.ptr(491, 154, 154), new valueRange.ptr(488, 155, 155), new valueRange.ptr(371, 156, 172), new valueRange.ptr(392, 173, 173), new valueRange.ptr(422, 174, 180), new valueRange.ptr(1119, 181, 181), new valueRange.ptr(443, 182, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(473, 128, 142), new valueRange.ptr(1115, 143, 143), new valueRange.ptr(455, 144, 144), new valueRange.ptr(464, 145, 145), new valueRange.ptr(470, 146, 146), new valueRange.ptr(506, 147, 147), new valueRange.ptr(491, 148, 148), new valueRange.ptr(488, 149, 149), new valueRange.ptr(371, 150, 166), new valueRange.ptr(392, 167, 167), new valueRange.ptr(422, 168, 174), new valueRange.ptr(1119, 175, 175), new valueRange.ptr(443, 176, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(491, 128, 136), new valueRange.ptr(1115, 137, 137), new valueRange.ptr(455, 138, 138), new valueRange.ptr(464, 139, 139), new valueRange.ptr(470, 140, 140), new valueRange.ptr(506, 141, 141), new valueRange.ptr(491, 142, 142), new valueRange.ptr(488, 143, 143), new valueRange.ptr(371, 144, 160), new valueRange.ptr(392, 161, 161), new valueRange.ptr(422, 162, 168), new valueRange.ptr(1119, 169, 169), new valueRange.ptr(443, 170, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33074, 128, 134), new valueRange.ptr(33074, 136, 152), new valueRange.ptr(33074, 155, 161), new valueRange.ptr(33074, 163, 164), new valueRange.ptr(33074, 166, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33069, 144, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33074, 132, 137), new valueRange.ptr(33026, 138, 138), new valueRange.ptr(2, 9, 0), new valueRange.ptr(99, 128, 137), new valueRange.ptr(6481, 138, 138), new valueRange.ptr(6529, 139, 139), new valueRange.ptr(6556, 140, 140), new valueRange.ptr(6562, 141, 141), new valueRange.ptr(7104, 142, 142), new valueRange.ptr(6574, 143, 143), new valueRange.ptr(6523, 170, 170), new valueRange.ptr(6526, 171, 171), new valueRange.ptr(0, 1, 0), new valueRange.ptr(6463, 144, 144), new valueRange.ptr(40, 9, 0), new valueRange.ptr(10338, 128, 128), new valueRange.ptr(10278, 129, 129), new valueRange.ptr(10288, 130, 130), new valueRange.ptr(10308, 131, 132), new valueRange.ptr(10318, 133, 134), new valueRange.ptr(10298, 135, 135), new valueRange.ptr(10328, 136, 136), new valueRange.ptr(2927, 144, 144), new valueRange.ptr(2279, 145, 145)]); + recompMap = $makeMap($Uint32.keyFor, [{ k: 4260608, v: 192 }, { k: 4260609, v: 193 }, { k: 4260610, v: 194 }, { k: 4260611, v: 195 }, { k: 4260616, v: 196 }, { k: 4260618, v: 197 }, { k: 4391719, v: 199 }, { k: 4522752, v: 200 }, { k: 4522753, v: 201 }, { k: 4522754, v: 202 }, { k: 4522760, v: 203 }, { k: 4784896, v: 204 }, { k: 4784897, v: 205 }, { k: 4784898, v: 206 }, { k: 4784904, v: 207 }, { k: 5112579, v: 209 }, { k: 5178112, v: 210 }, { k: 5178113, v: 211 }, { k: 5178114, v: 212 }, { k: 5178115, v: 213 }, { k: 5178120, v: 214 }, { k: 5571328, v: 217 }, { k: 5571329, v: 218 }, { k: 5571330, v: 219 }, { k: 5571336, v: 220 }, { k: 5833473, v: 221 }, { k: 6357760, v: 224 }, { k: 6357761, v: 225 }, { k: 6357762, v: 226 }, { k: 6357763, v: 227 }, { k: 6357768, v: 228 }, { k: 6357770, v: 229 }, { k: 6488871, v: 231 }, { k: 6619904, v: 232 }, { k: 6619905, v: 233 }, { k: 6619906, v: 234 }, { k: 6619912, v: 235 }, { k: 6882048, v: 236 }, { k: 6882049, v: 237 }, { k: 6882050, v: 238 }, { k: 6882056, v: 239 }, { k: 7209731, v: 241 }, { k: 7275264, v: 242 }, { k: 7275265, v: 243 }, { k: 7275266, v: 244 }, { k: 7275267, v: 245 }, { k: 7275272, v: 246 }, { k: 7668480, v: 249 }, { k: 7668481, v: 250 }, { k: 7668482, v: 251 }, { k: 7668488, v: 252 }, { k: 7930625, v: 253 }, { k: 7930632, v: 255 }, { k: 4260612, v: 256 }, { k: 6357764, v: 257 }, { k: 4260614, v: 258 }, { k: 6357766, v: 259 }, { k: 4260648, v: 260 }, { k: 6357800, v: 261 }, { k: 4391681, v: 262 }, { k: 6488833, v: 263 }, { k: 4391682, v: 264 }, { k: 6488834, v: 265 }, { k: 4391687, v: 266 }, { k: 6488839, v: 267 }, { k: 4391692, v: 268 }, { k: 6488844, v: 269 }, { k: 4457228, v: 270 }, { k: 6554380, v: 271 }, { k: 4522756, v: 274 }, { k: 6619908, v: 275 }, { k: 4522758, v: 276 }, { k: 6619910, v: 277 }, { k: 4522759, v: 278 }, { k: 6619911, v: 279 }, { k: 4522792, v: 280 }, { k: 6619944, v: 281 }, { k: 4522764, v: 282 }, { k: 6619916, v: 283 }, { k: 4653826, v: 284 }, { k: 6750978, v: 285 }, { k: 4653830, v: 286 }, { k: 6750982, v: 287 }, { k: 4653831, v: 288 }, { k: 6750983, v: 289 }, { k: 4653863, v: 290 }, { k: 6751015, v: 291 }, { k: 4719362, v: 292 }, { k: 6816514, v: 293 }, { k: 4784899, v: 296 }, { k: 6882051, v: 297 }, { k: 4784900, v: 298 }, { k: 6882052, v: 299 }, { k: 4784902, v: 300 }, { k: 6882054, v: 301 }, { k: 4784936, v: 302 }, { k: 6882088, v: 303 }, { k: 4784903, v: 304 }, { k: 4850434, v: 308 }, { k: 6947586, v: 309 }, { k: 4916007, v: 310 }, { k: 7013159, v: 311 }, { k: 4981505, v: 313 }, { k: 7078657, v: 314 }, { k: 4981543, v: 315 }, { k: 7078695, v: 316 }, { k: 4981516, v: 317 }, { k: 7078668, v: 318 }, { k: 5112577, v: 323 }, { k: 7209729, v: 324 }, { k: 5112615, v: 325 }, { k: 7209767, v: 326 }, { k: 5112588, v: 327 }, { k: 7209740, v: 328 }, { k: 5178116, v: 332 }, { k: 7275268, v: 333 }, { k: 5178118, v: 334 }, { k: 7275270, v: 335 }, { k: 5178123, v: 336 }, { k: 7275275, v: 337 }, { k: 5374721, v: 340 }, { k: 7471873, v: 341 }, { k: 5374759, v: 342 }, { k: 7471911, v: 343 }, { k: 5374732, v: 344 }, { k: 7471884, v: 345 }, { k: 5440257, v: 346 }, { k: 7537409, v: 347 }, { k: 5440258, v: 348 }, { k: 7537410, v: 349 }, { k: 5440295, v: 350 }, { k: 7537447, v: 351 }, { k: 5440268, v: 352 }, { k: 7537420, v: 353 }, { k: 5505831, v: 354 }, { k: 7602983, v: 355 }, { k: 5505804, v: 356 }, { k: 7602956, v: 357 }, { k: 5571331, v: 360 }, { k: 7668483, v: 361 }, { k: 5571332, v: 362 }, { k: 7668484, v: 363 }, { k: 5571334, v: 364 }, { k: 7668486, v: 365 }, { k: 5571338, v: 366 }, { k: 7668490, v: 367 }, { k: 5571339, v: 368 }, { k: 7668491, v: 369 }, { k: 5571368, v: 370 }, { k: 7668520, v: 371 }, { k: 5702402, v: 372 }, { k: 7799554, v: 373 }, { k: 5833474, v: 374 }, { k: 7930626, v: 375 }, { k: 5833480, v: 376 }, { k: 5899009, v: 377 }, { k: 7996161, v: 378 }, { k: 5899015, v: 379 }, { k: 7996167, v: 380 }, { k: 5899020, v: 381 }, { k: 7996172, v: 382 }, { k: 5178139, v: 416 }, { k: 7275291, v: 417 }, { k: 5571355, v: 431 }, { k: 7668507, v: 432 }, { k: 4260620, v: 461 }, { k: 6357772, v: 462 }, { k: 4784908, v: 463 }, { k: 6882060, v: 464 }, { k: 5178124, v: 465 }, { k: 7275276, v: 466 }, { k: 5571340, v: 467 }, { k: 7668492, v: 468 }, { k: 14418692, v: 469 }, { k: 16515844, v: 470 }, { k: 14418689, v: 471 }, { k: 16515841, v: 472 }, { k: 14418700, v: 473 }, { k: 16515852, v: 474 }, { k: 14418688, v: 475 }, { k: 16515840, v: 476 }, { k: 12845828, v: 478 }, { k: 14942980, v: 479 }, { k: 36045572, v: 480 }, { k: 36111108, v: 481 }, { k: 12976900, v: 482 }, { k: 15074052, v: 483 }, { k: 4653836, v: 486 }, { k: 6750988, v: 487 }, { k: 4915980, v: 488 }, { k: 7013132, v: 489 }, { k: 5178152, v: 490 }, { k: 7275304, v: 491 }, { k: 32113412, v: 492 }, { k: 32178948, v: 493 }, { k: 28771084, v: 494 }, { k: 43123468, v: 495 }, { k: 6947596, v: 496 }, { k: 4653825, v: 500 }, { k: 6750977, v: 501 }, { k: 5112576, v: 504 }, { k: 7209728, v: 505 }, { k: 12911361, v: 506 }, { k: 15008513, v: 507 }, { k: 12976897, v: 508 }, { k: 15074049, v: 509 }, { k: 14156545, v: 510 }, { k: 16253697, v: 511 }, { k: 4260623, v: 512 }, { k: 6357775, v: 513 }, { k: 4260625, v: 514 }, { k: 6357777, v: 515 }, { k: 4522767, v: 516 }, { k: 6619919, v: 517 }, { k: 4522769, v: 518 }, { k: 6619921, v: 519 }, { k: 4784911, v: 520 }, { k: 6882063, v: 521 }, { k: 4784913, v: 522 }, { k: 6882065, v: 523 }, { k: 5178127, v: 524 }, { k: 7275279, v: 525 }, { k: 5178129, v: 526 }, { k: 7275281, v: 527 }, { k: 5374735, v: 528 }, { k: 7471887, v: 529 }, { k: 5374737, v: 530 }, { k: 7471889, v: 531 }, { k: 5571343, v: 532 }, { k: 7668495, v: 533 }, { k: 5571345, v: 534 }, { k: 7668497, v: 535 }, { k: 5440294, v: 536 }, { k: 7537446, v: 537 }, { k: 5505830, v: 538 }, { k: 7602982, v: 539 }, { k: 4719372, v: 542 }, { k: 6816524, v: 543 }, { k: 4260615, v: 550 }, { k: 6357767, v: 551 }, { k: 4522791, v: 552 }, { k: 6619943, v: 553 }, { k: 14025476, v: 554 }, { k: 16122628, v: 555 }, { k: 13959940, v: 556 }, { k: 16057092, v: 557 }, { k: 5178119, v: 558 }, { k: 7275271, v: 559 }, { k: 36569860, v: 560 }, { k: 36635396, v: 561 }, { k: 5833476, v: 562 }, { k: 7930628, v: 563 }, { k: 11010817, v: 901 }, { k: 59835137, v: 902 }, { k: 60097281, v: 904 }, { k: 60228353, v: 905 }, { k: 60359425, v: 906 }, { k: 60752641, v: 908 }, { k: 61145857, v: 910 }, { k: 61408001, v: 911 }, { k: 63570689, v: 912 }, { k: 60359432, v: 938 }, { k: 61145864, v: 939 }, { k: 61932289, v: 940 }, { k: 62194433, v: 941 }, { k: 62325505, v: 942 }, { k: 62456577, v: 943 }, { k: 63636225, v: 944 }, { k: 62456584, v: 970 }, { k: 63243016, v: 971 }, { k: 62849793, v: 972 }, { k: 63243009, v: 973 }, { k: 63505153, v: 974 }, { k: 64094977, v: 979 }, { k: 64094984, v: 980 }, { k: 68485888, v: 1024 }, { k: 68485896, v: 1025 }, { k: 68354817, v: 1027 }, { k: 67502856, v: 1031 }, { k: 68813569, v: 1036 }, { k: 68682496, v: 1037 }, { k: 69403398, v: 1038 }, { k: 68682502, v: 1049 }, { k: 70779654, v: 1081 }, { k: 70583040, v: 1104 }, { k: 70583048, v: 1105 }, { k: 70451969, v: 1107 }, { k: 72745736, v: 1111 }, { k: 70910721, v: 1116 }, { k: 70779648, v: 1117 }, { k: 71500550, v: 1118 }, { k: 74711823, v: 1142 }, { k: 74777359, v: 1143 }, { k: 68551430, v: 1217 }, { k: 70648582, v: 1218 }, { k: 68158214, v: 1232 }, { k: 70255366, v: 1233 }, { k: 68158216, v: 1234 }, { k: 70255368, v: 1235 }, { k: 68485894, v: 1238 }, { k: 70583046, v: 1239 }, { k: 81265416, v: 1242 }, { k: 81330952, v: 1243 }, { k: 68551432, v: 1244 }, { k: 70648584, v: 1245 }, { k: 68616968, v: 1246 }, { k: 70714120, v: 1247 }, { k: 68682500, v: 1250 }, { k: 70779652, v: 1251 }, { k: 68682504, v: 1252 }, { k: 70779656, v: 1253 }, { k: 69075720, v: 1254 }, { k: 71172872, v: 1255 }, { k: 82313992, v: 1258 }, { k: 82379528, v: 1259 }, { k: 70058760, v: 1260 }, { k: 72155912, v: 1261 }, { k: 69403396, v: 1262 }, { k: 71500548, v: 1263 }, { k: 69403400, v: 1264 }, { k: 71500552, v: 1265 }, { k: 69403403, v: 1266 }, { k: 71500555, v: 1267 }, { k: 69665544, v: 1268 }, { k: 71762696, v: 1269 }, { k: 69927688, v: 1272 }, { k: 72024840, v: 1273 }, { k: 103220819, v: 1570 }, { k: 103220820, v: 1571 }, { k: 105383508, v: 1572 }, { k: 103220821, v: 1573 }, { k: 105514580, v: 1574 }, { k: 114624084, v: 1728 }, { k: 113313364, v: 1730 }, { k: 114427476, v: 1747 }, { k: 153618748, v: 2345 }, { k: 154143036, v: 2353 }, { k: 154339644, v: 2356 }, { k: 164039102, v: 2507 }, { k: 164039127, v: 2508 }, { k: 189205334, v: 2888 }, { k: 189205310, v: 2891 }, { k: 189205335, v: 2892 }, { k: 194120663, v: 2964 }, { k: 197528510, v: 3018 }, { k: 197594046, v: 3019 }, { k: 197528535, v: 3020 }, { k: 205917270, v: 3144 }, { k: 213847253, v: 3264 }, { k: 214306005, v: 3271 }, { k: 214306006, v: 3272 }, { k: 214305986, v: 3274 }, { k: 214568149, v: 3275 }, { k: 222694718, v: 3402 }, { k: 222760254, v: 3403 }, { k: 222694743, v: 3404 }, { k: 232328650, v: 3546 }, { k: 232328655, v: 3548 }, { k: 232525258, v: 3549 }, { k: 232328671, v: 3550 }, { k: 270864430, v: 4134 }, { k: 453319477, v: 6918 }, { k: 453450549, v: 6920 }, { k: 453581621, v: 6922 }, { k: 453712693, v: 6924 }, { k: 453843765, v: 6926 }, { k: 454105909, v: 6930 }, { k: 456792885, v: 6971 }, { k: 456923957, v: 6973 }, { k: 457055029, v: 6976 }, { k: 457120565, v: 6977 }, { k: 457317173, v: 6979 }, { k: 4260645, v: 7680 }, { k: 6357797, v: 7681 }, { k: 4326151, v: 7682 }, { k: 6423303, v: 7683 }, { k: 4326179, v: 7684 }, { k: 6423331, v: 7685 }, { k: 4326193, v: 7686 }, { k: 6423345, v: 7687 }, { k: 13042433, v: 7688 }, { k: 15139585, v: 7689 }, { k: 4457223, v: 7690 }, { k: 6554375, v: 7691 }, { k: 4457251, v: 7692 }, { k: 6554403, v: 7693 }, { k: 4457265, v: 7694 }, { k: 6554417, v: 7695 }, { k: 4457255, v: 7696 }, { k: 6554407, v: 7697 }, { k: 4457261, v: 7698 }, { k: 6554413, v: 7699 }, { k: 17957632, v: 7700 }, { k: 18023168, v: 7701 }, { k: 17957633, v: 7702 }, { k: 18023169, v: 7703 }, { k: 4522797, v: 7704 }, { k: 6619949, v: 7705 }, { k: 4522800, v: 7706 }, { k: 6619952, v: 7707 }, { k: 36176646, v: 7708 }, { k: 36242182, v: 7709 }, { k: 4588295, v: 7710 }, { k: 6685447, v: 7711 }, { k: 4653828, v: 7712 }, { k: 6750980, v: 7713 }, { k: 4719367, v: 7714 }, { k: 6816519, v: 7715 }, { k: 4719395, v: 7716 }, { k: 6816547, v: 7717 }, { k: 4719368, v: 7718 }, { k: 6816520, v: 7719 }, { k: 4719399, v: 7720 }, { k: 6816551, v: 7721 }, { k: 4719406, v: 7722 }, { k: 6816558, v: 7723 }, { k: 4784944, v: 7724 }, { k: 6882096, v: 7725 }, { k: 13566721, v: 7726 }, { k: 15663873, v: 7727 }, { k: 4915969, v: 7728 }, { k: 7013121, v: 7729 }, { k: 4916003, v: 7730 }, { k: 7013155, v: 7731 }, { k: 4916017, v: 7732 }, { k: 7013169, v: 7733 }, { k: 4981539, v: 7734 }, { k: 7078691, v: 7735 }, { k: 506856196, v: 7736 }, { k: 506921732, v: 7737 }, { k: 4981553, v: 7738 }, { k: 7078705, v: 7739 }, { k: 4981549, v: 7740 }, { k: 7078701, v: 7741 }, { k: 5047041, v: 7742 }, { k: 7144193, v: 7743 }, { k: 5047047, v: 7744 }, { k: 7144199, v: 7745 }, { k: 5047075, v: 7746 }, { k: 7144227, v: 7747 }, { k: 5112583, v: 7748 }, { k: 7209735, v: 7749 }, { k: 5112611, v: 7750 }, { k: 7209763, v: 7751 }, { k: 5112625, v: 7752 }, { k: 7209777, v: 7753 }, { k: 5112621, v: 7754 }, { k: 7209773, v: 7755 }, { k: 13959937, v: 7756 }, { k: 16057089, v: 7757 }, { k: 13959944, v: 7758 }, { k: 16057096, v: 7759 }, { k: 21758720, v: 7760 }, { k: 21824256, v: 7761 }, { k: 21758721, v: 7762 }, { k: 21824257, v: 7763 }, { k: 5243649, v: 7764 }, { k: 7340801, v: 7765 }, { k: 5243655, v: 7766 }, { k: 7340807, v: 7767 }, { k: 5374727, v: 7768 }, { k: 7471879, v: 7769 }, { k: 5374755, v: 7770 }, { k: 7471907, v: 7771 }, { k: 509215492, v: 7772 }, { k: 509281028, v: 7773 }, { k: 5374769, v: 7774 }, { k: 7471921, v: 7775 }, { k: 5440263, v: 7776 }, { k: 7537415, v: 7777 }, { k: 5440291, v: 7778 }, { k: 7537443, v: 7779 }, { k: 22676231, v: 7780 }, { k: 22741767, v: 7781 }, { k: 23069447, v: 7782 }, { k: 23134983, v: 7783 }, { k: 509739783, v: 7784 }, { k: 509805319, v: 7785 }, { k: 5505799, v: 7786 }, { k: 7602951, v: 7787 }, { k: 5505827, v: 7788 }, { k: 7602979, v: 7789 }, { k: 5505841, v: 7790 }, { k: 7602993, v: 7791 }, { k: 5505837, v: 7792 }, { k: 7602989, v: 7793 }, { k: 5571364, v: 7794 }, { k: 7668516, v: 7795 }, { k: 5571376, v: 7796 }, { k: 7668528, v: 7797 }, { k: 5571373, v: 7798 }, { k: 7668525, v: 7799 }, { k: 23593729, v: 7800 }, { k: 23659265, v: 7801 }, { k: 23724808, v: 7802 }, { k: 23790344, v: 7803 }, { k: 5636867, v: 7804 }, { k: 7734019, v: 7805 }, { k: 5636899, v: 7806 }, { k: 7734051, v: 7807 }, { k: 5702400, v: 7808 }, { k: 7799552, v: 7809 }, { k: 5702401, v: 7810 }, { k: 7799553, v: 7811 }, { k: 5702408, v: 7812 }, { k: 7799560, v: 7813 }, { k: 5702407, v: 7814 }, { k: 7799559, v: 7815 }, { k: 5702435, v: 7816 }, { k: 7799587, v: 7817 }, { k: 5767943, v: 7818 }, { k: 7865095, v: 7819 }, { k: 5767944, v: 7820 }, { k: 7865096, v: 7821 }, { k: 5833479, v: 7822 }, { k: 7930631, v: 7823 }, { k: 5899010, v: 7824 }, { k: 7996162, v: 7825 }, { k: 5899043, v: 7826 }, { k: 7996195, v: 7827 }, { k: 5899057, v: 7828 }, { k: 7996209, v: 7829 }, { k: 6816561, v: 7830 }, { k: 7602952, v: 7831 }, { k: 7799562, v: 7832 }, { k: 7930634, v: 7833 }, { k: 25101063, v: 7835 }, { k: 4260643, v: 7840 }, { k: 6357795, v: 7841 }, { k: 4260617, v: 7842 }, { k: 6357769, v: 7843 }, { k: 12714753, v: 7844 }, { k: 14811905, v: 7845 }, { k: 12714752, v: 7846 }, { k: 14811904, v: 7847 }, { k: 12714761, v: 7848 }, { k: 14811913, v: 7849 }, { k: 12714755, v: 7850 }, { k: 14811907, v: 7851 }, { k: 513803010, v: 7852 }, { k: 513868546, v: 7853 }, { k: 16909057, v: 7854 }, { k: 16974593, v: 7855 }, { k: 16909056, v: 7856 }, { k: 16974592, v: 7857 }, { k: 16909065, v: 7858 }, { k: 16974601, v: 7859 }, { k: 16909059, v: 7860 }, { k: 16974595, v: 7861 }, { k: 513803014, v: 7862 }, { k: 513868550, v: 7863 }, { k: 4522787, v: 7864 }, { k: 6619939, v: 7865 }, { k: 4522761, v: 7866 }, { k: 6619913, v: 7867 }, { k: 4522755, v: 7868 }, { k: 6619907, v: 7869 }, { k: 13239041, v: 7870 }, { k: 15336193, v: 7871 }, { k: 13239040, v: 7872 }, { k: 15336192, v: 7873 }, { k: 13239049, v: 7874 }, { k: 15336201, v: 7875 }, { k: 13239043, v: 7876 }, { k: 15336195, v: 7877 }, { k: 515375874, v: 7878 }, { k: 515441410, v: 7879 }, { k: 4784905, v: 7880 }, { k: 6882057, v: 7881 }, { k: 4784931, v: 7882 }, { k: 6882083, v: 7883 }, { k: 5178147, v: 7884 }, { k: 7275299, v: 7885 }, { k: 5178121, v: 7886 }, { k: 7275273, v: 7887 }, { k: 13894401, v: 7888 }, { k: 15991553, v: 7889 }, { k: 13894400, v: 7890 }, { k: 15991552, v: 7891 }, { k: 13894409, v: 7892 }, { k: 15991561, v: 7893 }, { k: 13894403, v: 7894 }, { k: 15991555, v: 7895 }, { k: 516686594, v: 7896 }, { k: 516752130, v: 7897 }, { k: 27263745, v: 7898 }, { k: 27329281, v: 7899 }, { k: 27263744, v: 7900 }, { k: 27329280, v: 7901 }, { k: 27263753, v: 7902 }, { k: 27329289, v: 7903 }, { k: 27263747, v: 7904 }, { k: 27329283, v: 7905 }, { k: 27263779, v: 7906 }, { k: 27329315, v: 7907 }, { k: 5571363, v: 7908 }, { k: 7668515, v: 7909 }, { k: 5571337, v: 7910 }, { k: 7668489, v: 7911 }, { k: 28246785, v: 7912 }, { k: 28312321, v: 7913 }, { k: 28246784, v: 7914 }, { k: 28312320, v: 7915 }, { k: 28246793, v: 7916 }, { k: 28312329, v: 7917 }, { k: 28246787, v: 7918 }, { k: 28312323, v: 7919 }, { k: 28246819, v: 7920 }, { k: 28312355, v: 7921 }, { k: 5833472, v: 7922 }, { k: 7930624, v: 7923 }, { k: 5833507, v: 7924 }, { k: 7930659, v: 7925 }, { k: 5833481, v: 7926 }, { k: 7930633, v: 7927 }, { k: 5833475, v: 7928 }, { k: 7930627, v: 7929 }, { k: 61932307, v: 7936 }, { k: 61932308, v: 7937 }, { k: 520094464, v: 7938 }, { k: 520160000, v: 7939 }, { k: 520094465, v: 7940 }, { k: 520160001, v: 7941 }, { k: 520094530, v: 7942 }, { k: 520160066, v: 7943 }, { k: 59835155, v: 7944 }, { k: 59835156, v: 7945 }, { k: 520618752, v: 7946 }, { k: 520684288, v: 7947 }, { k: 520618753, v: 7948 }, { k: 520684289, v: 7949 }, { k: 520618818, v: 7950 }, { k: 520684354, v: 7951 }, { k: 62194451, v: 7952 }, { k: 62194452, v: 7953 }, { k: 521143040, v: 7954 }, { k: 521208576, v: 7955 }, { k: 521143041, v: 7956 }, { k: 521208577, v: 7957 }, { k: 60097299, v: 7960 }, { k: 60097300, v: 7961 }, { k: 521667328, v: 7962 }, { k: 521732864, v: 7963 }, { k: 521667329, v: 7964 }, { k: 521732865, v: 7965 }, { k: 62325523, v: 7968 }, { k: 62325524, v: 7969 }, { k: 522191616, v: 7970 }, { k: 522257152, v: 7971 }, { k: 522191617, v: 7972 }, { k: 522257153, v: 7973 }, { k: 522191682, v: 7974 }, { k: 522257218, v: 7975 }, { k: 60228371, v: 7976 }, { k: 60228372, v: 7977 }, { k: 522715904, v: 7978 }, { k: 522781440, v: 7979 }, { k: 522715905, v: 7980 }, { k: 522781441, v: 7981 }, { k: 522715970, v: 7982 }, { k: 522781506, v: 7983 }, { k: 62456595, v: 7984 }, { k: 62456596, v: 7985 }, { k: 523240192, v: 7986 }, { k: 523305728, v: 7987 }, { k: 523240193, v: 7988 }, { k: 523305729, v: 7989 }, { k: 523240258, v: 7990 }, { k: 523305794, v: 7991 }, { k: 60359443, v: 7992 }, { k: 60359444, v: 7993 }, { k: 523764480, v: 7994 }, { k: 523830016, v: 7995 }, { k: 523764481, v: 7996 }, { k: 523830017, v: 7997 }, { k: 523764546, v: 7998 }, { k: 523830082, v: 7999 }, { k: 62849811, v: 8000 }, { k: 62849812, v: 8001 }, { k: 524288768, v: 8002 }, { k: 524354304, v: 8003 }, { k: 524288769, v: 8004 }, { k: 524354305, v: 8005 }, { k: 60752659, v: 8008 }, { k: 60752660, v: 8009 }, { k: 524813056, v: 8010 }, { k: 524878592, v: 8011 }, { k: 524813057, v: 8012 }, { k: 524878593, v: 8013 }, { k: 63243027, v: 8016 }, { k: 63243028, v: 8017 }, { k: 525337344, v: 8018 }, { k: 525402880, v: 8019 }, { k: 525337345, v: 8020 }, { k: 525402881, v: 8021 }, { k: 525337410, v: 8022 }, { k: 525402946, v: 8023 }, { k: 61145876, v: 8025 }, { k: 525927168, v: 8027 }, { k: 525927169, v: 8029 }, { k: 525927234, v: 8031 }, { k: 63505171, v: 8032 }, { k: 63505172, v: 8033 }, { k: 526385920, v: 8034 }, { k: 526451456, v: 8035 }, { k: 526385921, v: 8036 }, { k: 526451457, v: 8037 }, { k: 526385986, v: 8038 }, { k: 526451522, v: 8039 }, { k: 61408019, v: 8040 }, { k: 61408020, v: 8041 }, { k: 526910208, v: 8042 }, { k: 526975744, v: 8043 }, { k: 526910209, v: 8044 }, { k: 526975745, v: 8045 }, { k: 526910274, v: 8046 }, { k: 526975810, v: 8047 }, { k: 61932288, v: 8048 }, { k: 62194432, v: 8050 }, { k: 62325504, v: 8052 }, { k: 62456576, v: 8054 }, { k: 62849792, v: 8056 }, { k: 63243008, v: 8058 }, { k: 63505152, v: 8060 }, { k: 520094533, v: 8064 }, { k: 520160069, v: 8065 }, { k: 520225605, v: 8066 }, { k: 520291141, v: 8067 }, { k: 520356677, v: 8068 }, { k: 520422213, v: 8069 }, { k: 520487749, v: 8070 }, { k: 520553285, v: 8071 }, { k: 520618821, v: 8072 }, { k: 520684357, v: 8073 }, { k: 520749893, v: 8074 }, { k: 520815429, v: 8075 }, { k: 520880965, v: 8076 }, { k: 520946501, v: 8077 }, { k: 521012037, v: 8078 }, { k: 521077573, v: 8079 }, { k: 522191685, v: 8080 }, { k: 522257221, v: 8081 }, { k: 522322757, v: 8082 }, { k: 522388293, v: 8083 }, { k: 522453829, v: 8084 }, { k: 522519365, v: 8085 }, { k: 522584901, v: 8086 }, { k: 522650437, v: 8087 }, { k: 522715973, v: 8088 }, { k: 522781509, v: 8089 }, { k: 522847045, v: 8090 }, { k: 522912581, v: 8091 }, { k: 522978117, v: 8092 }, { k: 523043653, v: 8093 }, { k: 523109189, v: 8094 }, { k: 523174725, v: 8095 }, { k: 526385989, v: 8096 }, { k: 526451525, v: 8097 }, { k: 526517061, v: 8098 }, { k: 526582597, v: 8099 }, { k: 526648133, v: 8100 }, { k: 526713669, v: 8101 }, { k: 526779205, v: 8102 }, { k: 526844741, v: 8103 }, { k: 526910277, v: 8104 }, { k: 526975813, v: 8105 }, { k: 527041349, v: 8106 }, { k: 527106885, v: 8107 }, { k: 527172421, v: 8108 }, { k: 527237957, v: 8109 }, { k: 527303493, v: 8110 }, { k: 527369029, v: 8111 }, { k: 61932294, v: 8112 }, { k: 61932292, v: 8113 }, { k: 527434565, v: 8114 }, { k: 61932357, v: 8115 }, { k: 61604677, v: 8116 }, { k: 61932354, v: 8118 }, { k: 532022085, v: 8119 }, { k: 59835142, v: 8120 }, { k: 59835140, v: 8121 }, { k: 59835136, v: 8122 }, { k: 59835205, v: 8124 }, { k: 11010882, v: 8129 }, { k: 527696709, v: 8130 }, { k: 62325573, v: 8131 }, { k: 61735749, v: 8132 }, { k: 62325570, v: 8134 }, { k: 533070661, v: 8135 }, { k: 60097280, v: 8136 }, { k: 60228352, v: 8138 }, { k: 60228421, v: 8140 }, { k: 532611840, v: 8141 }, { k: 532611841, v: 8142 }, { k: 532611906, v: 8143 }, { k: 62456582, v: 8144 }, { k: 62456580, v: 8145 }, { k: 63570688, v: 8146 }, { k: 62456642, v: 8150 }, { k: 63570754, v: 8151 }, { k: 60359430, v: 8152 }, { k: 60359428, v: 8153 }, { k: 60359424, v: 8154 }, { k: 536740608, v: 8157 }, { k: 536740609, v: 8158 }, { k: 536740674, v: 8159 }, { k: 63243014, v: 8160 }, { k: 63243012, v: 8161 }, { k: 63636224, v: 8162 }, { k: 62980883, v: 8164 }, { k: 62980884, v: 8165 }, { k: 63243074, v: 8166 }, { k: 63636290, v: 8167 }, { k: 61145862, v: 8168 }, { k: 61145860, v: 8169 }, { k: 61145856, v: 8170 }, { k: 60883732, v: 8172 }, { k: 11010816, v: 8173 }, { k: 528220997, v: 8178 }, { k: 63505221, v: 8179 }, { k: 63832901, v: 8180 }, { k: 63505218, v: 8182 }, { k: 536216389, v: 8183 }, { k: 60752640, v: 8184 }, { k: 61408000, v: 8186 }, { k: 61408069, v: 8188 }, { k: 563086136, v: 8602 }, { k: 563217208, v: 8603 }, { k: 563348280, v: 8622 }, { k: 567280440, v: 8653 }, { k: 567542584, v: 8654 }, { k: 567411512, v: 8655 }, { k: 570622776, v: 8708 }, { k: 570950456, v: 8713 }, { k: 571147064, v: 8716 }, { k: 572719928, v: 8740 }, { k: 572851000, v: 8742 }, { k: 574358328, v: 8769 }, { k: 574817080, v: 8772 }, { k: 574948152, v: 8775 }, { k: 575144760, v: 8777 }, { k: 3998520, v: 8800 }, { k: 576783160, v: 8802 }, { k: 575472440, v: 8813 }, { k: 3932984, v: 8814 }, { k: 4064056, v: 8815 }, { k: 576979768, v: 8816 }, { k: 577045304, v: 8817 }, { k: 577897272, v: 8820 }, { k: 577962808, v: 8821 }, { k: 578159416, v: 8824 }, { k: 578224952, v: 8825 }, { k: 578421560, v: 8832 }, { k: 578487096, v: 8833 }, { k: 578945848, v: 8836 }, { k: 579011384, v: 8837 }, { k: 579207992, v: 8840 }, { k: 579273528, v: 8841 }, { k: 581043000, v: 8876 }, { k: 581436216, v: 8877 }, { k: 581501752, v: 8878 }, { k: 581632824, v: 8879 }, { k: 578552632, v: 8928 }, { k: 578618168, v: 8929 }, { k: 579928888, v: 8930 }, { k: 579994424, v: 8931 }, { k: 582091576, v: 8938 }, { k: 582157112, v: 8939 }, { k: 582222648, v: 8940 }, { k: 582288184, v: 8941 }, { k: 810234009, v: 12364 }, { k: 810365081, v: 12366 }, { k: 810496153, v: 12368 }, { k: 810627225, v: 12370 }, { k: 810758297, v: 12372 }, { k: 810889369, v: 12374 }, { k: 811020441, v: 12376 }, { k: 811151513, v: 12378 }, { k: 811282585, v: 12380 }, { k: 811413657, v: 12382 }, { k: 811544729, v: 12384 }, { k: 811675801, v: 12386 }, { k: 811872409, v: 12389 }, { k: 812003481, v: 12391 }, { k: 812134553, v: 12393 }, { k: 812593305, v: 12400 }, { k: 812593306, v: 12401 }, { k: 812789913, v: 12403 }, { k: 812789914, v: 12404 }, { k: 812986521, v: 12406 }, { k: 812986522, v: 12407 }, { k: 813183129, v: 12409 }, { k: 813183130, v: 12410 }, { k: 813379737, v: 12412 }, { k: 813379738, v: 12413 }, { k: 809906329, v: 12436 }, { k: 815607961, v: 12446 }, { k: 816525465, v: 12460 }, { k: 816656537, v: 12462 }, { k: 816787609, v: 12464 }, { k: 816918681, v: 12466 }, { k: 817049753, v: 12468 }, { k: 817180825, v: 12470 }, { k: 817311897, v: 12472 }, { k: 817442969, v: 12474 }, { k: 817574041, v: 12476 }, { k: 817705113, v: 12478 }, { k: 817836185, v: 12480 }, { k: 817967257, v: 12482 }, { k: 818163865, v: 12485 }, { k: 818294937, v: 12487 }, { k: 818426009, v: 12489 }, { k: 818884761, v: 12496 }, { k: 818884762, v: 12497 }, { k: 819081369, v: 12499 }, { k: 819081370, v: 12500 }, { k: 819277977, v: 12502 }, { k: 819277978, v: 12503 }, { k: 819474585, v: 12505 }, { k: 819474586, v: 12506 }, { k: 819671193, v: 12508 }, { k: 819671194, v: 12509 }, { k: 816197785, v: 12532 }, { k: 820981913, v: 12535 }, { k: 821047449, v: 12536 }, { k: 821112985, v: 12537 }, { k: 821178521, v: 12538 }, { k: 821899417, v: 12542 }, { k: 278466746, v: 69786 }, { k: 278597818, v: 69788 }, { k: 279253178, v: 69803 }, { k: 288428327, v: 69934 }, { k: 288493863, v: 69935 }, { k: 323425086, v: 70475 }, { k: 323425111, v: 70476 }, { k: 347673786, v: 70843 }, { k: 347673776, v: 70844 }, { k: 347673789, v: 70846 }, { k: 364385711, v: 71098 }, { k: 364451247, v: 71099 }]); + errs = new sliceType$1([$ifaceNil, transform.ErrShortDst, transform.ErrShortSrc]); + nfcSparse = new sparseBlocks.ptr(new sliceType$2(nfcSparseValues), nfcSparseOffset); + nfkcSparse = new sparseBlocks.ptr(new sliceType$2(nfkcSparseValues), nfkcSparseOffset); + nfcData = newNfcTrie(0); + nfkcData = newNfkcTrie(0); + formTable = new sliceType$3([new formInfo.ptr(0, true, false, lookupInfoNFC, nextComposed), new formInfo.ptr(1, false, false, lookupInfoNFC, nextDecomposed), new formInfo.ptr(2, true, true, lookupInfoNFKC, nextComposed), new formInfo.ptr(3, false, true, lookupInfoNFKC, nextDecomposed)]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/idna"] = (function() { + var $pkg = {}, $init, fmt, math, strings, utf8, bidirule, bidi, norm, options, Profile, labelError, runeError, labelIter, joinState, idnaTrie, valueRange, sparseBlocks, info, category, ptrType, sliceType, sliceType$1, arrayType, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, ptrType$2, funcType, funcType$1, funcType$2, ptrType$3, ptrType$4, punycode, lookup, joinStates, mappings, xorData, idnaValues, idnaIndex, idnaSparseOffset, idnaSparseValues, idnaSparse, trie, ToASCII, validateAndMap, validateFromPunycode, ascii, punyError, decode, encode, decodeDigit, encodeDigit, adapt; + fmt = $packages["fmt"]; + math = $packages["math"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + bidirule = $packages["vendor/golang_org/x/text/secure/bidirule"]; + bidi = $packages["vendor/golang_org/x/text/unicode/bidi"]; + norm = $packages["vendor/golang_org/x/text/unicode/norm"]; + options = $pkg.options = $newType(0, $kindStruct, "idna.options", true, "vendor/golang_org/x/net/idna", false, function(transitional_, useSTD3Rules_, validateLabels_, verifyDNSLength_, removeLeadingDots_, trie_, fromPuny_, mapping_, bidirule_) { + this.$val = this; + if (arguments.length === 0) { + this.transitional = false; + this.useSTD3Rules = false; + this.validateLabels = false; + this.verifyDNSLength = false; + this.removeLeadingDots = false; + this.trie = ptrType.nil; + this.fromPuny = $throwNilPointerError; + this.mapping = $throwNilPointerError; + this.bidirule = $throwNilPointerError; + return; + } + this.transitional = transitional_; + this.useSTD3Rules = useSTD3Rules_; + this.validateLabels = validateLabels_; + this.verifyDNSLength = verifyDNSLength_; + this.removeLeadingDots = removeLeadingDots_; + this.trie = trie_; + this.fromPuny = fromPuny_; + this.mapping = mapping_; + this.bidirule = bidirule_; + }); + Profile = $pkg.Profile = $newType(0, $kindStruct, "idna.Profile", true, "vendor/golang_org/x/net/idna", true, function(options_) { + this.$val = this; + if (arguments.length === 0) { + this.options = new options.ptr(false, false, false, false, false, ptrType.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); + return; + } + this.options = options_; + }); + labelError = $pkg.labelError = $newType(0, $kindStruct, "idna.labelError", true, "vendor/golang_org/x/net/idna", false, function(label_, code__) { + this.$val = this; + if (arguments.length === 0) { + this.label = ""; + this.code_ = ""; + return; + } + this.label = label_; + this.code_ = code__; + }); + runeError = $pkg.runeError = $newType(4, $kindInt32, "idna.runeError", true, "vendor/golang_org/x/net/idna", false, null); + labelIter = $pkg.labelIter = $newType(0, $kindStruct, "idna.labelIter", true, "vendor/golang_org/x/net/idna", false, function(orig_, slice_, curStart_, curEnd_, i_) { + this.$val = this; + if (arguments.length === 0) { + this.orig = ""; + this.slice = sliceType$4.nil; + this.curStart = 0; + this.curEnd = 0; + this.i = 0; + return; + } + this.orig = orig_; + this.slice = slice_; + this.curStart = curStart_; + this.curEnd = curEnd_; + this.i = i_; + }); + joinState = $pkg.joinState = $newType(1, $kindInt8, "idna.joinState", true, "vendor/golang_org/x/net/idna", false, null); + idnaTrie = $pkg.idnaTrie = $newType(0, $kindStruct, "idna.idnaTrie", true, "vendor/golang_org/x/net/idna", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + valueRange = $pkg.valueRange = $newType(0, $kindStruct, "idna.valueRange", true, "vendor/golang_org/x/net/idna", false, function(value_, lo_, hi_) { + this.$val = this; + if (arguments.length === 0) { + this.value = 0; + this.lo = 0; + this.hi = 0; + return; + } + this.value = value_; + this.lo = lo_; + this.hi = hi_; + }); + sparseBlocks = $pkg.sparseBlocks = $newType(0, $kindStruct, "idna.sparseBlocks", true, "vendor/golang_org/x/net/idna", false, function(values_, offset_) { + this.$val = this; + if (arguments.length === 0) { + this.values = sliceType$1.nil; + this.offset = sliceType.nil; + return; + } + this.values = values_; + this.offset = offset_; + }); + info = $pkg.info = $newType(2, $kindUint16, "idna.info", true, "vendor/golang_org/x/net/idna", false, null); + category = $pkg.category = $newType(2, $kindUint16, "idna.category", true, "vendor/golang_org/x/net/idna", false, null); + ptrType = $ptrType(idnaTrie); + sliceType = $sliceType($Uint16); + sliceType$1 = $sliceType(valueRange); + arrayType = $arrayType(joinState, 8); + sliceType$2 = $sliceType(arrayType); + sliceType$3 = $sliceType($emptyInterface); + sliceType$4 = $sliceType($String); + sliceType$5 = $sliceType($Uint8); + sliceType$6 = $sliceType($Int32); + ptrType$2 = $ptrType(Profile); + funcType = $funcType([ptrType$2, $String], [$error], false); + funcType$1 = $funcType([ptrType$2, $String], [$String, $Bool, $error], false); + funcType$2 = $funcType([$String], [$Bool], false); + ptrType$3 = $ptrType(labelIter); + ptrType$4 = $ptrType(sparseBlocks); + ToASCII = function(s) { + var _r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = $pkg.Punycode.process(s, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: ToASCII }; } $f._r = _r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ToASCII = ToASCII; + Profile.ptr.prototype.ToASCII = function(s) { + var _r, p, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r = p.process(s, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Profile.ptr.prototype.ToASCII }; } $f._r = _r; $f.p = p; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Profile.prototype.ToASCII = function(s) { return this.$val.ToASCII(s); }; + Profile.ptr.prototype.ToUnicode = function(s) { + var _r, p, pp, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; p = $f.p; pp = $f.pp; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + pp = $clone(p, Profile); + pp.options.transitional = false; + _r = pp.process(s, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Profile.ptr.prototype.ToUnicode }; } $f._r = _r; $f.p = p; $f.pp = pp; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Profile.prototype.ToUnicode = function(s) { return this.$val.ToUnicode(s); }; + Profile.ptr.prototype.String = function() { + var p, s; + p = this; + s = ""; + if (p.options.transitional) { + s = "Transitional"; + } else { + s = "NonTransitional"; + } + if (p.options.useSTD3Rules) { + s = s + (":UseSTD3Rules"); + } + if (p.options.validateLabels) { + s = s + (":ValidateLabels"); + } + if (p.options.verifyDNSLength) { + s = s + (":VerifyDNSLength"); + } + return s; + }; + Profile.prototype.String = function() { return this.$val.String(); }; + labelError.ptr.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r = fmt.Sprintf("idna: invalid label %q", new sliceType$3([new $String(e.label)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: labelError.ptr.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + labelError.prototype.Error = function() { return this.$val.Error(); }; + runeError.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r = fmt.Sprintf("idna: disallowed rune %U", new sliceType$3([new runeError(e)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: runeError.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(runeError).prototype.Error = function() { return new runeError(this.$get()).Error(); }; + Profile.ptr.prototype.process = function(s, toASCII) { + var _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, a, err, err2, err2$1, isBidi, label, label$1, labels, n, n$1, p, s, toASCII, u, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; a = $f.a; err = $f.err; err2 = $f.err2; err2$1 = $f.err2$1; isBidi = $f.isBidi; label = $f.label; label$1 = $f.label$1; labels = $f.labels; n = $f.n; n$1 = $f.n$1; p = $f.p; s = $f.s; toASCII = $f.toASCII; u = $f.u; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + err = $ifaceNil; + isBidi = false; + /* */ if (!(p.options.mapping === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(p.options.mapping === $throwNilPointerError)) { */ case 1: + _r = p.options.mapping(p, s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + s = _tuple[0]; + isBidi = _tuple[1]; + err = _tuple[2]; + /* } */ case 2: + if (p.options.removeLeadingDots) { + while (true) { + if (!(s.length > 0 && (s.charCodeAt(0) === 46))) { break; } + s = $substring(s, 1); + } + } + if ($interfaceIsEqual(err, $ifaceNil) && p.options.verifyDNSLength && s === "") { + err = new labelError.ptr(s, "A4"); + } + labels = new labelIter.ptr(s, sliceType$4.nil, 0, 0, 0); + /* while (true) { */ case 4: + /* if (!(!labels.done())) { break; } */ if(!(!labels.done())) { $s = 5; continue; } + label = labels.label(); + /* */ if (label === "") { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (label === "") { */ case 6: + if ($interfaceIsEqual(err, $ifaceNil) && p.options.verifyDNSLength) { + err = new labelError.ptr(s, "A4"); + } + labels.next(); + /* continue; */ $s = 4; continue; + /* } */ case 7: + /* */ if (strings.HasPrefix(label, "xn--")) { $s = 8; continue; } + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (strings.HasPrefix(label, "xn--")) { */ case 8: + _tuple$1 = decode($substring(label, 4)); + u = _tuple$1[0]; + err2 = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err2, $ifaceNil))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!($interfaceIsEqual(err2, $ifaceNil))) { */ case 11: + if ($interfaceIsEqual(err, $ifaceNil)) { + err = err2; + } + labels.next(); + /* continue; */ $s = 4; continue; + /* } */ case 12: + isBidi = isBidi || !((bidirule.DirectionString(u) === 0)); + labels.set(u); + /* */ if ($interfaceIsEqual(err, $ifaceNil) && p.options.validateLabels) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if ($interfaceIsEqual(err, $ifaceNil) && p.options.validateLabels) { */ case 13: + _r$1 = p.options.fromPuny(p, u); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + /* } */ case 14: + if ($interfaceIsEqual(err, $ifaceNil)) { + err = p.validateLabel(u); + } + $s = 10; continue; + /* } else if ($interfaceIsEqual(err, $ifaceNil)) { */ case 9: + err = p.validateLabel(label); + /* } */ case 10: + labels.next(); + /* } */ $s = 4; continue; case 5: + /* */ if (isBidi && !(p.options.bidirule === $throwNilPointerError) && $interfaceIsEqual(err, $ifaceNil)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (isBidi && !(p.options.bidirule === $throwNilPointerError) && $interfaceIsEqual(err, $ifaceNil)) { */ case 16: + labels.reset(); + /* while (true) { */ case 18: + /* if (!(!labels.done())) { break; } */ if(!(!labels.done())) { $s = 19; continue; } + _r$2 = p.options.bidirule(labels.label()); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!_r$2) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!_r$2) { */ case 20: + err = new labelError.ptr(s, "B"); + /* break; */ $s = 19; continue; + /* } */ case 21: + labels.next(); + /* } */ $s = 18; continue; case 19: + /* } */ case 17: + if (toASCII) { + labels.reset(); + while (true) { + if (!(!labels.done())) { break; } + label$1 = labels.label(); + if (!ascii(label$1)) { + _tuple$2 = encode("xn--", label$1); + a = _tuple$2[0]; + err2$1 = _tuple$2[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = err2$1; + } + label$1 = a; + labels.set(a); + } + n = label$1.length; + if (p.options.verifyDNSLength && $interfaceIsEqual(err, $ifaceNil) && ((n === 0) || n > 63)) { + err = new labelError.ptr(label$1, "A4"); + } + labels.next(); + } + } + s = labels.result(); + if (toASCII && p.options.verifyDNSLength && $interfaceIsEqual(err, $ifaceNil)) { + n$1 = s.length; + if (n$1 > 0 && (s.charCodeAt((n$1 - 1 >> 0)) === 46)) { + n$1 = n$1 - (1) >> 0; + } + if (s.length < 1 || n$1 > 253) { + err = new labelError.ptr(s, "A4"); + } + } + $s = -1; return [s, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Profile.ptr.prototype.process }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.a = a; $f.err = err; $f.err2 = err2; $f.err2$1 = err2$1; $f.isBidi = isBidi; $f.label = label; $f.label$1 = label$1; $f.labels = labels; $f.n = n; $f.n$1 = n$1; $f.p = p; $f.s = s; $f.toASCII = toASCII; $f.u = u; $f.$s = $s; $f.$r = $r; return $f; + }; + Profile.prototype.process = function(s, toASCII) { return this.$val.process(s, toASCII); }; + info.prototype.isBidi = function(s) { + var _1, _tuple, c, p, s; + c = this.$val; + if (!new info(c).isMapped()) { + return ((c & 6144) >>> 0) === 2048; + } + _tuple = bidi.LookupString(s); + p = $clone(_tuple[0], bidi.Properties); + _1 = $clone(p, bidi.Properties).Class(); + if ((_1 === (1)) || (_1 === (13)) || (_1 === (5))) { + return true; + } + return false; + }; + $ptrType(info).prototype.isBidi = function(s) { return new info(this.$get()).isBidi(s); }; + validateAndMap = function(p, s) { + var _1, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, b, bidi$1, combinedInfoBits, err, i, k, p, r, s, start, sz, v, vm, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; bidi$1 = $f.bidi$1; combinedInfoBits = $f.combinedInfoBits; err = $f.err; i = $f.i; k = $f.k; p = $f.p; r = $f.r; s = $f.s; start = $f.start; sz = $f.sz; v = $f.v; vm = $f.vm; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + vm = ""; + bidi$1 = false; + err = $ifaceNil; + b = sliceType$5.nil; + k = 0; + combinedInfoBits = 0; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } + _tuple = trie.lookupString($substring(s, i)); + v = _tuple[0]; + sz = _tuple[1]; + if (sz === 0) { + b = $appendSlice(b, $substring(s, k, i)); + b = $appendSlice(b, "\xEF\xBF\xBD"); + k = s.length; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = new runeError(65533); + } + /* break; */ $s = 2; continue; + } + combinedInfoBits = (combinedInfoBits | (((v << 16 >>> 16)))) >>> 0; + bidi$1 = bidi$1 || new info(((v << 16 >>> 16))).isBidi($substring(s, i)); + start = i; + i = i + (sz) >> 0; + _1 = p.simplify(new info(((v << 16 >>> 16))).category()); + if (_1 === (8)) { + /* continue; */ $s = 1; continue; + } else if (_1 === (64)) { + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$1 = utf8.DecodeRuneInString($substring(s, start)); + r = _tuple$1[0]; + err = new runeError(((r >> 0))); + } + /* continue; */ $s = 1; continue; + } else if ((_1 === (1)) || (_1 === (3))) { + b = $appendSlice(b, $substring(s, k, start)); + b = new info(((v << 16 >>> 16))).appendMapping(b, $substring(s, start, i)); + } else if (_1 === (192)) { + b = $appendSlice(b, $substring(s, k, start)); + } else if (_1 === (0)) { + b = $appendSlice(b, $substring(s, k, start)); + b = $appendSlice(b, "\xEF\xBF\xBD"); + } + k = i; + /* } */ $s = 1; continue; case 2: + /* */ if (k === 0) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (k === 0) { */ case 3: + /* */ if (!((((combinedInfoBits & 8192) >>> 0) === 0))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((((combinedInfoBits & 8192) >>> 0) === 0))) { */ case 6: + _r = new norm.Form(0).String(s); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + s = _r; + /* } */ case 7: + $s = 5; continue; + /* } else { */ case 4: + b = $appendSlice(b, $substring(s, k)); + _r$1 = new norm.Form(0).QuickSpan(b); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((_r$1 === b.$length))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!((_r$1 === b.$length))) { */ case 9: + _r$2 = new norm.Form(0).Bytes(b); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + b = _r$2; + /* } */ case 10: + s = ($bytesToString(b)); + /* } */ case 5: + _tmp = s; + _tmp$1 = bidi$1; + _tmp$2 = err; + vm = _tmp; + bidi$1 = _tmp$1; + err = _tmp$2; + $s = -1; return [vm, bidi$1, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: validateAndMap }; } $f._1 = _1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.bidi$1 = bidi$1; $f.combinedInfoBits = combinedInfoBits; $f.err = err; $f.i = i; $f.k = k; $f.p = p; $f.r = r; $f.s = s; $f.start = start; $f.sz = sz; $f.v = v; $f.vm = vm; $f.$s = $s; $f.$r = $r; return $f; + }; + labelIter.ptr.prototype.reset = function() { + var l; + l = this; + l.curStart = 0; + l.curEnd = 0; + l.i = 0; + }; + labelIter.prototype.reset = function() { return this.$val.reset(); }; + labelIter.ptr.prototype.done = function() { + var l; + l = this; + return l.curStart >= l.orig.length; + }; + labelIter.prototype.done = function() { return this.$val.done(); }; + labelIter.ptr.prototype.result = function() { + var l; + l = this; + if (!(l.slice === sliceType$4.nil)) { + return strings.Join(l.slice, "."); + } + return l.orig; + }; + labelIter.prototype.result = function() { return this.$val.result(); }; + labelIter.ptr.prototype.label = function() { + var l, p, x, x$1; + l = this; + if (!(l.slice === sliceType$4.nil)) { + return (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + } + p = strings.IndexByte($substring(l.orig, l.curStart), 46); + l.curEnd = l.curStart + p >> 0; + if (p === -1) { + l.curEnd = l.orig.length; + } + return $substring(l.orig, l.curStart, l.curEnd); + }; + labelIter.prototype.label = function() { return this.$val.label(); }; + labelIter.ptr.prototype.next = function() { + var l, x, x$1; + l = this; + l.i = l.i + (1) >> 0; + if (!(l.slice === sliceType$4.nil)) { + if (l.i >= l.slice.$length || (l.i === (l.slice.$length - 1 >> 0)) && (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) === "") { + l.curStart = l.orig.length; + } + } else { + l.curStart = l.curEnd + 1 >> 0; + if ((l.curStart === (l.orig.length - 1 >> 0)) && (l.orig.charCodeAt(l.curStart) === 46)) { + l.curStart = l.orig.length; + } + } + }; + labelIter.prototype.next = function() { return this.$val.next(); }; + labelIter.ptr.prototype.set = function(s) { + var l, s, x, x$1; + l = this; + if (l.slice === sliceType$4.nil) { + l.slice = strings.Split(l.orig, "."); + } + (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = s)); + }; + labelIter.prototype.set = function(s) { return this.$val.set(s); }; + Profile.ptr.prototype.simplify = function(cat) { + var _1, cat, p; + p = this; + _1 = cat; + if (_1 === (2)) { + if (p.options.useSTD3Rules) { + cat = 64; + } else { + cat = 1; + } + } else if (_1 === (128)) { + if (p.options.useSTD3Rules) { + cat = 64; + } else { + cat = 8; + } + } else if (_1 === (3)) { + if (!p.options.transitional) { + cat = 8; + } + } else if ((_1 === (24)) || (_1 === (40))) { + cat = 8; + } + return cat; + }; + Profile.prototype.simplify = function(cat) { return this.$val.simplify(cat); }; + validateFromPunycode = function(p, s) { + var _r, _tuple, c, i, p, s, sz, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; c = $f.c; i = $f.i; p = $f.p; s = $f.s; sz = $f.sz; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = new norm.Form(0).IsNormalString(s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + /* */ if (!_r) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!_r) { */ case 1: + $s = -1; return new labelError.ptr(s, "V1"); + /* } */ case 2: + i = 0; + while (true) { + if (!(i < s.length)) { break; } + _tuple = trie.lookupString($substring(s, i)); + v = _tuple[0]; + sz = _tuple[1]; + if (sz === 0) { + $s = -1; return new runeError(65533); + } + c = p.simplify(new info(((v << 16 >>> 16))).category()); + if (!((c === 8)) && !((c === 3))) { + $s = -1; return new labelError.ptr(s, "V6"); + } + i = i + (sz) >> 0; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: validateFromPunycode }; } $f._r = _r; $f._tuple = _tuple; $f.c = c; $f.i = i; $f.p = p; $f.s = s; $f.sz = sz; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Profile.ptr.prototype.validateLabel = function(s) { + var _tuple, _tuple$1, err, i, jt, p, s, st, sz, trie$1, v, x, x$1; + err = $ifaceNil; + p = this; + if (s === "") { + if (p.options.verifyDNSLength) { + err = new labelError.ptr(s, "A4"); + return err; + } + err = $ifaceNil; + return err; + } + if (!p.options.validateLabels) { + err = $ifaceNil; + return err; + } + trie$1 = p.options.trie; + if (s.length > 4 && (s.charCodeAt(2) === 45) && (s.charCodeAt(3) === 45)) { + err = new labelError.ptr(s, "V2"); + return err; + } + if ((s.charCodeAt(0) === 45) || (s.charCodeAt((s.length - 1 >> 0)) === 45)) { + err = new labelError.ptr(s, "V3"); + return err; + } + _tuple = trie$1.lookupString(s); + v = _tuple[0]; + sz = _tuple[1]; + x = ((v << 16 >>> 16)); + if (new info(x).isModifier()) { + err = new labelError.ptr(s, "V5"); + return err; + } + if ((strings.Index(s, "\xE2\x80\x8D") === -1) && (strings.Index(s, "\xE2\x80\x8C") === -1)) { + err = $ifaceNil; + return err; + } + st = 0; + i = 0; + while (true) { + jt = new info(x).joinType(); + if ($substring(s, i, (i + sz >> 0)) === "\xE2\x80\x8D") { + jt = 5; + } else if ($substring(s, i, (i + sz >> 0)) === "\xE2\x80\x8C") { + jt = 6; + } + st = (x$1 = ((st < 0 || st >= joinStates.$length) ? ($throwRuntimeError("index out of range"), undefined) : joinStates.$array[joinStates.$offset + st]), ((jt < 0 || jt >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[jt])); + if (new info(x).isViramaModifier()) { + st = ((st < 0 || st >= joinStates.$length) ? ($throwRuntimeError("index out of range"), undefined) : joinStates.$array[joinStates.$offset + st])[7]; + } + i = i + (sz) >> 0; + if (i === s.length) { + break; + } + _tuple$1 = trie$1.lookupString($substring(s, i)); + v = _tuple$1[0]; + sz = _tuple$1[1]; + x = ((v << 16 >>> 16)); + } + if ((st === 5) || (st === 4)) { + err = new labelError.ptr(s, "C"); + return err; + } + err = $ifaceNil; + return err; + }; + Profile.prototype.validateLabel = function(s) { return this.$val.validateLabel(s); }; + ascii = function(s) { + var i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) >= 128) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + punyError = function(s) { + var s; + return new labelError.ptr(s, "A3"); + }; + decode = function(encoded) { + var _i, _q, _r, _ref, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, bias, digit, encoded, i, k, n, ok, oldI, output, pos, r, t, w, x; + if (encoded === "") { + return ["", $ifaceNil]; + } + pos = 1 + strings.LastIndex(encoded, "-") >> 0; + if (pos === 1) { + return ["", punyError(encoded)]; + } + if (pos === encoded.length) { + return [$substring(encoded, 0, (encoded.length - 1 >> 0)), $ifaceNil]; + } + output = $makeSlice(sliceType$6, 0, encoded.length); + if (!((pos === 0))) { + _ref = $substring(encoded, 0, (pos - 1 >> 0)); + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + output = $append(output, r); + _i += _rune[1]; + } + } + _tmp = 0; + _tmp$1 = 128; + _tmp$2 = 72; + i = _tmp; + n = _tmp$1; + bias = _tmp$2; + while (true) { + if (!(pos < encoded.length)) { break; } + _tmp$3 = i; + _tmp$4 = 1; + oldI = _tmp$3; + w = _tmp$4; + k = 36; + while (true) { + if (pos === encoded.length) { + return ["", punyError(encoded)]; + } + _tuple = decodeDigit(encoded.charCodeAt(pos)); + digit = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + return ["", punyError(encoded)]; + } + pos = pos + (1) >> 0; + i = i + (($imul(digit, w))) >> 0; + if (i < 0) { + return ["", punyError(encoded)]; + } + t = k - bias >> 0; + if (t < 1) { + t = 1; + } else if (t > 26) { + t = 26; + } + if (digit < t) { + break; + } + w = $imul(w, ((36 - t >> 0))); + if (w >= 59652323) { + return ["", punyError(encoded)]; + } + k = k + (36) >> 0; + } + x = (((output.$length + 1 >> 0) >> 0)); + bias = adapt(i - oldI >> 0, x, oldI === 0); + n = n + ((_q = i / x, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; + i = (_r = i % (x), _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + if (n > 1114111 || output.$length >= 1024) { + return ["", punyError(encoded)]; + } + output = $append(output, 0); + $copySlice($subslice(output, (i + 1 >> 0)), $subslice(output, i)); + ((i < 0 || i >= output.$length) ? ($throwRuntimeError("index out of range"), undefined) : output.$array[output.$offset + i] = n); + i = i + (1) >> 0; + } + return [($runesToString(output)), $ifaceNil]; + }; + encode = function(prefix, s) { + var _i, _i$1, _i$2, _q, _r, _ref, _ref$1, _ref$2, _rune, _rune$1, _rune$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, b, bias, delta, h, k, m, n, output, prefix, q, r, r$1, r$2, remaining, s, t; + output = $makeSlice(sliceType$5, prefix.length, ((prefix.length + 1 >> 0) + ($imul(2, s.length)) >> 0)); + $copyString(output, prefix); + _tmp = 0; + _tmp$1 = 128; + _tmp$2 = 72; + delta = _tmp; + n = _tmp$1; + bias = _tmp$2; + _tmp$3 = 0; + _tmp$4 = 0; + b = _tmp$3; + remaining = _tmp$4; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + if (r < 128) { + b = b + (1) >> 0; + output = $append(output, ((r << 24 >>> 24))); + } else { + remaining = remaining + (1) >> 0; + } + _i += _rune[1]; + } + h = b; + if (b > 0) { + output = $append(output, 45); + } + while (true) { + if (!(!((remaining === 0)))) { break; } + m = 2147483647; + _ref$1 = s; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + r$1 = _rune$1[0]; + if (m > r$1 && r$1 >= n) { + m = r$1; + } + _i$1 += _rune$1[1]; + } + delta = delta + (($imul(((m - n >> 0)), ((h + 1 >> 0))))) >> 0; + if (delta < 0) { + return ["", punyError(s)]; + } + n = m; + _ref$2 = s; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.length)) { break; } + _rune$2 = $decodeRune(_ref$2, _i$2); + r$2 = _rune$2[0]; + if (r$2 < n) { + delta = delta + (1) >> 0; + if (delta < 0) { + return ["", punyError(s)]; + } + _i$2 += _rune$2[1]; + continue; + } + if (r$2 > n) { + _i$2 += _rune$2[1]; + continue; + } + q = delta; + k = 36; + while (true) { + t = k - bias >> 0; + if (t < 1) { + t = 1; + } else if (t > 26) { + t = 26; + } + if (q < t) { + break; + } + output = $append(output, encodeDigit(t + (_r = ((q - t >> 0)) % ((36 - t >> 0)), _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0)); + q = (_q = ((q - t >> 0)) / ((36 - t >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + k = k + (36) >> 0; + } + output = $append(output, encodeDigit(q)); + bias = adapt(delta, h + 1 >> 0, h === b); + delta = 0; + h = h + (1) >> 0; + remaining = remaining - (1) >> 0; + _i$2 += _rune$2[1]; + } + delta = delta + (1) >> 0; + n = n + (1) >> 0; + } + return [($bytesToString(output)), $ifaceNil]; + }; + decodeDigit = function(x) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, digit, ok, x; + digit = 0; + ok = false; + if (48 <= x && x <= 57) { + _tmp = (((x - 22 << 24 >>> 24) >> 0)); + _tmp$1 = true; + digit = _tmp; + ok = _tmp$1; + return [digit, ok]; + } else if (65 <= x && x <= 90) { + _tmp$2 = (((x - 65 << 24 >>> 24) >> 0)); + _tmp$3 = true; + digit = _tmp$2; + ok = _tmp$3; + return [digit, ok]; + } else if (97 <= x && x <= 122) { + _tmp$4 = (((x - 97 << 24 >>> 24) >> 0)); + _tmp$5 = true; + digit = _tmp$4; + ok = _tmp$5; + return [digit, ok]; + } + _tmp$6 = 0; + _tmp$7 = false; + digit = _tmp$6; + ok = _tmp$7; + return [digit, ok]; + }; + encodeDigit = function(digit) { + var digit; + if (0 <= digit && digit < 26) { + return (((digit + 97 >> 0) << 24 >>> 24)); + } else if (26 <= digit && digit < 36) { + return (((digit + 22 >> 0) << 24 >>> 24)); + } + $panic(new $String("idna: internal error in punycode encoding")); + }; + adapt = function(delta, numPoints, firstTime) { + var _q, _q$1, _q$2, _q$3, _q$4, delta, firstTime, k, numPoints; + if (firstTime) { + delta = (_q = delta / (700), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } else { + delta = (_q$1 = delta / (2), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + } + delta = delta + ((_q$2 = delta / numPoints, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; + k = 0; + while (true) { + if (!(delta > 455)) { break; } + delta = (_q$3 = delta / (35), (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")); + k = k + (36) >> 0; + } + return k + (_q$4 = ($imul(36, delta)) / ((delta + 38 >> 0)), (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + }; + idnaTrie.ptr.prototype.lookup = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.$length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.$length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o]); + c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.$length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); + c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); + c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + idnaTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; + idnaTrie.ptr.prototype.lookupString = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; + v = 0; + sz = 0; + t = this; + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp = ((c0 < 0 || c0 >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[c0]); + _tmp$1 = 1; + v = _tmp; + sz = _tmp$1; + return [v, sz]; + } else if (c0 < 194) { + _tmp$2 = 0; + _tmp$3 = 1; + v = _tmp$2; + sz = _tmp$3; + return [v, sz]; + } else if (c0 < 224) { + if (s.length < 2) { + _tmp$4 = 0; + _tmp$5 = 0; + v = _tmp$4; + sz = _tmp$5; + return [v, sz]; + } + i = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$6 = 0; + _tmp$7 = 1; + v = _tmp$6; + sz = _tmp$7; + return [v, sz]; + } + _tmp$8 = t.lookupValue(((i >>> 0)), c1); + _tmp$9 = 2; + v = _tmp$8; + sz = _tmp$9; + return [v, sz]; + } else if (c0 < 240) { + if (s.length < 3) { + _tmp$10 = 0; + _tmp$11 = 0; + v = _tmp$10; + sz = _tmp$11; + return [v, sz]; + } + i$1 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1$1 = s.charCodeAt(1); + if (c1$1 < 128 || 192 <= c1$1) { + _tmp$12 = 0; + _tmp$13 = 1; + v = _tmp$12; + sz = _tmp$13; + return [v, sz]; + } + o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; + i$1 = ((o < 0 || o >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o]); + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$14 = 0; + _tmp$15 = 2; + v = _tmp$14; + sz = _tmp$15; + return [v, sz]; + } + _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); + _tmp$17 = 3; + v = _tmp$16; + sz = _tmp$17; + return [v, sz]; + } else if (c0 < 248) { + if (s.length < 4) { + _tmp$18 = 0; + _tmp$19 = 0; + v = _tmp$18; + sz = _tmp$19; + return [v, sz]; + } + i$2 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); + c1$2 = s.charCodeAt(1); + if (c1$2 < 128 || 192 <= c1$2) { + _tmp$20 = 0; + _tmp$21 = 1; + v = _tmp$20; + sz = _tmp$21; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); + c2$1 = s.charCodeAt(2); + if (c2$1 < 128 || 192 <= c2$1) { + _tmp$22 = 0; + _tmp$23 = 2; + v = _tmp$22; + sz = _tmp$23; + return [v, sz]; + } + o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; + i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$24 = 0; + _tmp$25 = 3; + v = _tmp$24; + sz = _tmp$25; + return [v, sz]; + } + _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); + _tmp$27 = 4; + v = _tmp$26; + sz = _tmp$27; + return [v, sz]; + } + _tmp$28 = 0; + _tmp$29 = 1; + v = _tmp$28; + sz = _tmp$29; + return [v, sz]; + }; + idnaTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; + idnaTrie.ptr.prototype.lookupValue = function(n, b) { + var b, n, t, x; + t = this; + if (n < 125) { + return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[x]))); + } else { + n = n - (125) >>> 0; + return (idnaSparse.lookup(n, b)); + } + }; + idnaTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; + info.prototype.appendMapping = function(b, s) { + var _index, b, c, index, p, s, s$1; + c = this.$val; + index = (((c >>> 3 << 16 >>> 16) >> 0)); + if (((c & 4) >>> 0) === 0) { + s$1 = $substring(mappings, index); + return $appendSlice(b, $substring(s$1, 1, (s$1.charCodeAt(0) + 1 << 24 >>> 24))); + } + b = $appendSlice(b, s); + if (((c & 57344) >>> 0) === 57344) { + _index = b.$length - 1 >> 0; + ((_index < 0 || _index >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + _index] = ((((_index < 0 || _index >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + _index]) ^ (((index << 24 >>> 24)))) << 24 >>> 24)); + } else { + p = b.$length - ((xorData.charCodeAt(index) >> 0)) >> 0; + while (true) { + if (!(p < b.$length)) { break; } + index = index + (1) >> 0; + ((p < 0 || p >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + p] = ((((p < 0 || p >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + p]) ^ (xorData.charCodeAt(index))) << 24 >>> 24)); + p = p + (1) >> 0; + } + } + return b; + }; + $ptrType(info).prototype.appendMapping = function(b, s) { return new info(this.$get()).appendMapping(b, s); }; + sparseBlocks.ptr.prototype.lookup = function(n, b) { + var _q, b, header, hi, lo, m, n, offset, r, t, x, x$1, x$2; + t = this; + offset = (x = t.offset, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])); + header = $clone((x$1 = t.values, ((offset < 0 || offset >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + offset])), valueRange); + lo = offset + 1 << 16 >>> 16; + hi = lo + ((header.lo << 16 >>> 16)) << 16 >>> 16; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo << 16 >>> 16)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) << 16 >>> 16; + r = $clone((x$2 = t.values, ((m < 0 || m >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + m])), valueRange); + if (r.lo <= b && b <= r.hi) { + return r.value + ((((b - r.lo << 24 >>> 24) << 16 >>> 16)) * header.value << 16 >>> 16) << 16 >>> 16; + } + if (b < r.lo) { + hi = m; + } else { + lo = m + 1 << 16 >>> 16; + } + } + return 0; + }; + sparseBlocks.prototype.lookup = function(n, b) { return this.$val.lookup(n, b); }; + info.prototype.isMapped = function() { + var c; + c = this.$val; + return !((((c & 3) >>> 0) === 0)); + }; + $ptrType(info).prototype.isMapped = function() { return new info(this.$get()).isMapped(); }; + info.prototype.category = function() { + var c, small; + c = this.$val; + small = (c & 3) >>> 0; + if (!((small === 0))) { + return ((small << 16 >>> 16)); + } + return ((((c & 248) >>> 0) << 16 >>> 16)); + }; + $ptrType(info).prototype.category = function() { return new info(this.$get()).category(); }; + info.prototype.joinType = function() { + var c; + c = this.$val; + if (new info(c).isMapped()) { + return 0; + } + return (((c >>> 8 << 16 >>> 16)) & 7) >>> 0; + }; + $ptrType(info).prototype.joinType = function() { return new info(this.$get()).joinType(); }; + info.prototype.isModifier = function() { + var c; + c = this.$val; + return ((c & 4099) >>> 0) === 4096; + }; + $ptrType(info).prototype.isModifier = function() { return new info(this.$get()).isModifier(); }; + info.prototype.isViramaModifier = function() { + var c; + c = this.$val; + return ((c & 6147) >>> 0) === 6144; + }; + $ptrType(info).prototype.isViramaModifier = function() { return new info(this.$get()).isViramaModifier(); }; + ptrType$2.methods = [{prop: "ToASCII", name: "ToASCII", pkg: "", typ: $funcType([$String], [$String, $error], false)}, {prop: "ToUnicode", name: "ToUnicode", pkg: "", typ: $funcType([$String], [$String, $error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "process", name: "process", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String, $Bool], [$String, $error], false)}, {prop: "simplify", name: "simplify", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([category], [category], false)}, {prop: "validateLabel", name: "validateLabel", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String], [$error], false)}]; + labelError.methods = [{prop: "code", name: "code", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + runeError.methods = [{prop: "code", name: "code", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$3.methods = [{prop: "reset", name: "reset", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [], false)}, {prop: "done", name: "done", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "result", name: "result", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "label", name: "label", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "next", name: "next", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [], false)}, {prop: "set", name: "set", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String], [], false)}]; + ptrType.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([sliceType$5], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([sliceType$5], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; + ptrType$4.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; + info.methods = [{prop: "isBidi", name: "isBidi", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([$String], [$Bool], false)}, {prop: "appendMapping", name: "appendMapping", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([sliceType$5, $String], [sliceType$5], false)}, {prop: "isMapped", name: "isMapped", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "category", name: "category", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [category], false)}, {prop: "joinType", name: "joinType", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [info], false)}, {prop: "isModifier", name: "isModifier", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "isViramaModifier", name: "isViramaModifier", pkg: "vendor/golang_org/x/net/idna", typ: $funcType([], [$Bool], false)}]; + options.init("vendor/golang_org/x/net/idna", [{prop: "transitional", name: "transitional", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "useSTD3Rules", name: "useSTD3Rules", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "validateLabels", name: "validateLabels", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "verifyDNSLength", name: "verifyDNSLength", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "removeLeadingDots", name: "removeLeadingDots", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trie", name: "trie", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "fromPuny", name: "fromPuny", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "mapping", name: "mapping", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "bidirule", name: "bidirule", embedded: false, exported: false, typ: funcType$2, tag: ""}]); + Profile.init("vendor/golang_org/x/net/idna", [{prop: "options", name: "options", embedded: true, exported: false, typ: options, tag: ""}]); + labelError.init("vendor/golang_org/x/net/idna", [{prop: "label", name: "label", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "code_", name: "code_", embedded: false, exported: false, typ: $String, tag: ""}]); + labelIter.init("vendor/golang_org/x/net/idna", [{prop: "orig", name: "orig", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "curStart", name: "curStart", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "curEnd", name: "curEnd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}]); + idnaTrie.init("", []); + valueRange.init("vendor/golang_org/x/net/idna", [{prop: "value", name: "value", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + sparseBlocks.init("vendor/golang_org/x/net/idna", [{prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: sliceType, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bidirule.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bidi.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = norm.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + punycode = new Profile.ptr(new options.ptr(false, false, false, false, false, ptrType.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError)); + $pkg.Punycode = punycode; + mappings = "\x00\x01 \x03 \xCC\x88\x01a\x03 \xCC\x84\x012\x013\x03 \xCC\x81\x03 \xCC\xA7\x011\x01o\x051\xE2\x81\x844\x051\xE2\x81\x842\x053\xE2\x81\x844\x03i\xCC\x87\x03l\xC2\xB7\x03\xCA\xBCn\x01s\x03d\xC5\xBE\x03\xE2\xB1\xA5\x03\xE2\xB1\xA6\x01h\x01j\x01r\x01w\x01y\x03 \xCC\x86\x03 \xCC\x87\x03 \xCC\x8A\x03 \xCC\xA8\x03 \xCC\x83\x03 \xCC\x8B\x01l\x01x\x04\xCC\x88\xCC\x81\x03 \xCE\xB9\x01;\x05 \xCC\x88\xCC\x81\x04\xD5\xA5\xD6\x82\x04\xD8\xA7\xD9\xB4\x04\xD9\x88\xD9\xB4\x04\xDB\x87\xD9\xB4\x04\xD9\x8A\xD9\xB4\x06\xE0\xA4\x95\xE0\xA4\xBC\x06\xE0\xA4\x96\xE0\xA4\xBC\x06\xE0\xA4\x97\xE0\xA4\xBC\x06\xE0\xA4\x9C\xE0\xA4\xBC\x06\xE0\xA4\xA1\xE0\xA4\xBC\x06\xE0\xA4\xA2\xE0\xA4\xBC\x06\xE0\xA4\xAB\xE0\xA4\xBC\x06\xE0\xA4\xAF\xE0\xA4\xBC\x06\xE0\xA6\xA1\xE0\xA6\xBC\x06\xE0\xA6\xA2\xE0\xA6\xBC\x06\xE0\xA6\xAF\xE0\xA6\xBC\x06\xE0\xA8\xB2\xE0\xA8\xBC\x06\xE0\xA8\xB8\xE0\xA8\xBC\x06\xE0\xA8\x96\xE0\xA8\xBC\x06\xE0\xA8\x97\xE0\xA8\xBC\x06\xE0\xA8\x9C\xE0\xA8\xBC\x06\xE0\xA8\xAB\xE0\xA8\xBC\x06\xE0\xAC\xA1\xE0\xAC\xBC\x06\xE0\xAC\xA2\xE0\xAC\xBC\x06\xE0\xB9\x8D\xE0\xB8\xB2\x06\xE0\xBB\x8D\xE0\xBA\xB2\x06\xE0\xBA\xAB\xE0\xBA\x99\x06\xE0\xBA\xAB\xE0\xBA\xA1\x06\xE0\xBD\x82\xE0\xBE\xB7\x06\xE0\xBD\x8C\xE0\xBE\xB7\x06\xE0\xBD\x91\xE0\xBE\xB7\x06\xE0\xBD\x96\xE0\xBE\xB7\x06\xE0\xBD\x9B\xE0\xBE\xB7\x06\xE0\xBD\x80\xE0\xBE\xB5\x06\xE0\xBD\xB1\xE0\xBD\xB2\x06\xE0\xBD\xB1\xE0\xBD\xB4\x06\xE0\xBE\xB2\xE0\xBE\x80\t\xE0\xBE\xB2\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBE\xB3\xE0\xBE\x80\t\xE0\xBE\xB3\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBE\x92\xE0\xBE\xB7\x06\xE0\xBE\x9C\xE0\xBE\xB7\x06\xE0\xBE\xA1\xE0\xBE\xB7\x06\xE0\xBE\xA6\xE0\xBE\xB7\x06\xE0\xBE\xAB\xE0\xBE\xB7\x06\xE0\xBE\x90\xE0\xBE\xB5\x02\xD0\xB2\x02\xD0\xB4\x02\xD0\xBE\x02\xD1\x81\x02\xD1\x82\x02\xD1\x8A\x02\xD1\xA3\x02\xC3\xA6\x01b\x01d\x01e\x02\xC7\x9D\x01g\x01i\x01k\x01m\x01n\x02\xC8\xA3\x01p\x01t\x01u\x02\xC9\x90\x02\xC9\x91\x02\xC9\x99\x02\xC9\x9B\x02\xC9\x9C\x02\xC5\x8B\x02\xC9\x94\x02\xC9\xAF\x01v\x02\xCE\xB2\x02\xCE\xB3\x02\xCE\xB4\x02\xCF\x86\x02\xCF\x87\x02\xCF\x81\x02\xD0\xBD\x02\xC9\x92\x01c\x02\xC9\x95\x02\xC3\xB0\x01f\x02\xC9\x9F\x02\xC9\xA1\x02\xC9\xA5\x02\xC9\xA8\x02\xC9\xA9\x02\xC9\xAA\x02\xCA\x9D\x02\xC9\xAD\x02\xCA\x9F\x02\xC9\xB1\x02\xC9\xB0\x02\xC9\xB2\x02\xC9\xB3\x02\xC9\xB4\x02\xC9\xB5\x02\xC9\xB8\x02\xCA\x82\x02\xCA\x83\x02\xC6\xAB\x02\xCA\x89\x02\xCA\x8A\x02\xCA\x8B\x02\xCA\x8C\x01z\x02\xCA\x90\x02\xCA\x91\x02\xCA\x92\x02\xCE\xB8\x02ss\x02\xCE\xAC\x02\xCE\xAD\x02\xCE\xAE\x02\xCE\xAF\x02\xCF\x8C\x02\xCF\x8D\x02\xCF\x8E\x05\xE1\xBC\x80\xCE\xB9\x05\xE1\xBC\x81\xCE\xB9\x05\xE1\xBC\x82\xCE\xB9\x05\xE1\xBC\x83\xCE\xB9\x05\xE1\xBC\x84\xCE\xB9\x05\xE1\xBC\x85\xCE\xB9\x05\xE1\xBC\x86\xCE\xB9\x05\xE1\xBC\x87\xCE\xB9\x05\xE1\xBC\xA0\xCE\xB9\x05\xE1\xBC\xA1\xCE\xB9\x05\xE1\xBC\xA2\xCE\xB9\x05\xE1\xBC\xA3\xCE\xB9\x05\xE1\xBC\xA4\xCE\xB9\x05\xE1\xBC\xA5\xCE\xB9\x05\xE1\xBC\xA6\xCE\xB9\x05\xE1\xBC\xA7\xCE\xB9\x05\xE1\xBD\xA0\xCE\xB9\x05\xE1\xBD\xA1\xCE\xB9\x05\xE1\xBD\xA2\xCE\xB9\x05\xE1\xBD\xA3\xCE\xB9\x05\xE1\xBD\xA4\xCE\xB9\x05\xE1\xBD\xA5\xCE\xB9\x05\xE1\xBD\xA6\xCE\xB9\x05\xE1\xBD\xA7\xCE\xB9\x05\xE1\xBD\xB0\xCE\xB9\x04\xCE\xB1\xCE\xB9\x04\xCE\xAC\xCE\xB9\x05\xE1\xBE\xB6\xCE\xB9\x02\xCE\xB9\x05 \xCC\x88\xCD\x82\x05\xE1\xBD\xB4\xCE\xB9\x04\xCE\xB7\xCE\xB9\x04\xCE\xAE\xCE\xB9\x05\xE1\xBF\x86\xCE\xB9\x05 \xCC\x93\xCC\x80\x05 \xCC\x93\xCC\x81\x05 \xCC\x93\xCD\x82\x02\xCE\x90\x05 \xCC\x94\xCC\x80\x05 \xCC\x94\xCC\x81\x05 \xCC\x94\xCD\x82\x02\xCE\xB0\x05 \xCC\x88\xCC\x80\x01`\x05\xE1\xBD\xBC\xCE\xB9\x04\xCF\x89\xCE\xB9\x04\xCF\x8E\xCE\xB9\x05\xE1\xBF\xB6\xCE\xB9\x06\xE2\x80\xB2\xE2\x80\xB2\t\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\x06\xE2\x80\xB5\xE2\x80\xB5\t\xE2\x80\xB5\xE2\x80\xB5\xE2\x80\xB5\x02!!\x02??\x02?!\x02!?\f\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\x010\x014\x015\x016\x017\x018\x019\x01+\x01=\x01(\x01)\x02rs\x02\xC4\xA7\x02no\x01q\x02sm\x02tm\x02\xCF\x89\x02\xC3\xA5\x02\xD7\x90\x02\xD7\x91\x02\xD7\x92\x02\xD7\x93\x02\xCF\x80\x051\xE2\x81\x847\x051\xE2\x81\x849\x061\xE2\x81\x8410\x051\xE2\x81\x843\x052\xE2\x81\x843\x051\xE2\x81\x845\x052\xE2\x81\x845\x053\xE2\x81\x845\x054\xE2\x81\x845\x051\xE2\x81\x846\x055\xE2\x81\x846\x051\xE2\x81\x848\x053\xE2\x81\x848\x055\xE2\x81\x848\x057\xE2\x81\x848\x041\xE2\x81\x84\x02ii\x02iv\x02vi\x04viii\x02ix\x02xi\x050\xE2\x81\x843\x06\xE2\x88\xAB\xE2\x88\xAB\t\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\x06\xE2\x88\xAE\xE2\x88\xAE\t\xE2\x88\xAE\xE2\x88\xAE\xE2\x88\xAE\x0210\x0211\x0212\x0213\x0214\x0215\x0216\x0217\x0218\x0219\x0220\x04(10)\x04(11)\x04(12)\x04(13)\x04(14)\x04(15)\x04(16)\x04(17)\x04(18)\x04(19)\x04(20)\f\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\x02==\x05\xE2\xAB\x9D\xCC\xB8\x02\xC9\xAB\x02\xC9\xBD\x02\xC8\xBF\x02\xC9\x80\x01.\x04 \xE3\x82\x99\x04 \xE3\x82\x9A\x06\xE3\x82\x88\xE3\x82\x8A\x06\xE3\x82\xB3\xE3\x83\x88\x05(\xE1\x84\x80)\x05(\xE1\x84\x82)\x05(\xE1\x84\x83)\x05(\xE1\x84\x85)\x05(\xE1\x84\x86)\x05(\xE1\x84\x87)\x05(\xE1\x84\x89)\x05(\xE1\x84\x8B)\x05(\xE1\x84\x8C)\x05(\xE1\x84\x8E)\x05(\xE1\x84\x8F)\x05(\xE1\x84\x90)\x05(\xE1\x84\x91)\x05(\xE1\x84\x92)\x05(\xEA\xB0\x80)\x05(\xEB\x82\x98)\x05(\xEB\x8B\xA4)\x05(\xEB\x9D\xBC)\x05(\xEB\xA7\x88)\x05(\xEB\xB0\x94)\x05(\xEC\x82\xAC)\x05(\xEC\x95\x84)\x05(\xEC\x9E\x90)\x05(\xEC\xB0\xA8)\x05(\xEC\xB9\xB4)\x05(\xED\x83\x80)\x05(\xED\x8C\x8C)\x05(\xED\x95\x98)\x05(\xEC\xA3\xBC)\b(\xEC\x98\xA4\xEC\xA0\x84)\b(\xEC\x98\xA4\xED\x9B\x84)\x05(\xE4\xB8\x80)\x05(\xE4\xBA\x8C)\x05(\xE4\xB8\x89)\x05(\xE5\x9B\x9B)\x05(\xE4\xBA\x94)\x05(\xE5\x85\xAD)\x05(\xE4\xB8\x83)\x05(\xE5\x85\xAB)\x05(\xE4\xB9\x9D)\x05(\xE5\x8D\x81)\x05(\xE6\x9C\x88)\x05(\xE7\x81\xAB)\x05(\xE6\xB0\xB4)\x05(\xE6\x9C\xA8)\x05(\xE9\x87\x91)\x05(\xE5\x9C\x9F)\x05(\xE6\x97\xA5)\x05(\xE6\xA0\xAA)\x05(\xE6\x9C\x89)\x05(\xE7\xA4\xBE)\x05(\xE5\x90\x8D)\x05(\xE7\x89\xB9)\x05(\xE8\xB2\xA1)\x05(\xE7\xA5\x9D)\x05(\xE5\x8A\xB4)\x05(\xE4\xBB\xA3)\x05(\xE5\x91\xBC)\x05(\xE5\xAD\xA6)\x05(\xE7\x9B\xA3)\x05(\xE4\xBC\x81)\x05(\xE8\xB3\x87)\x05(\xE5\x8D\x94)\x05(\xE7\xA5\xAD)\x05(\xE4\xBC\x91)\x05(\xE8\x87\xAA)\x05(\xE8\x87\xB3)\x0221\x0222\x0223\x0224\x0225\x0226\x0227\x0228\x0229\x0230\x0231\x0232\x0233\x0234\x0235\x06\xEC\xB0\xB8\xEA\xB3\xA0\x06\xEC\xA3\xBC\xEC\x9D\x98\x0236\x0237\x0238\x0239\x0240\x0241\x0242\x0243\x0244\x0245\x0246\x0247\x0248\x0249\x0250\x041\xE6\x9C\x88\x042\xE6\x9C\x88\x043\xE6\x9C\x88\x044\xE6\x9C\x88\x045\xE6\x9C\x88\x046\xE6\x9C\x88\x047\xE6\x9C\x88\x048\xE6\x9C\x88\x049\xE6\x9C\x88\x0510\xE6\x9C\x88\x0511\xE6\x9C\x88\x0512\xE6\x9C\x88\x02hg\x02ev\f\xE3\x82\xA2\xE3\x83\x91\xE3\x83\xBC\xE3\x83\x88\f\xE3\x82\xA2\xE3\x83\xAB\xE3\x83\x95\xE3\x82\xA1\f\xE3\x82\xA2\xE3\x83\xB3\xE3\x83\x9A\xE3\x82\xA2\t\xE3\x82\xA2\xE3\x83\xBC\xE3\x83\xAB\f\xE3\x82\xA4\xE3\x83\x8B\xE3\x83\xB3\xE3\x82\xB0\t\xE3\x82\xA4\xE3\x83\xB3\xE3\x83\x81\t\xE3\x82\xA6\xE3\x82\xA9\xE3\x83\xB3\x0F\xE3\x82\xA8\xE3\x82\xB9\xE3\x82\xAF\xE3\x83\xBC\xE3\x83\x89\f\xE3\x82\xA8\xE3\x83\xBC\xE3\x82\xAB\xE3\x83\xBC\t\xE3\x82\xAA\xE3\x83\xB3\xE3\x82\xB9\t\xE3\x82\xAA\xE3\x83\xBC\xE3\x83\xA0\t\xE3\x82\xAB\xE3\x82\xA4\xE3\x83\xAA\f\xE3\x82\xAB\xE3\x83\xA9\xE3\x83\x83\xE3\x83\x88\f\xE3\x82\xAB\xE3\x83\xAD\xE3\x83\xAA\xE3\x83\xBC\t\xE3\x82\xAC\xE3\x83\xAD\xE3\x83\xB3\t\xE3\x82\xAC\xE3\x83\xB3\xE3\x83\x9E\x06\xE3\x82\xAE\xE3\x82\xAC\t\xE3\x82\xAE\xE3\x83\x8B\xE3\x83\xBC\f\xE3\x82\xAD\xE3\x83\xA5\xE3\x83\xAA\xE3\x83\xBC\f\xE3\x82\xAE\xE3\x83\xAB\xE3\x83\x80\xE3\x83\xBC\x06\xE3\x82\xAD\xE3\x83\xAD\x0F\xE3\x82\xAD\xE3\x83\xAD\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\x12\xE3\x82\xAD\xE3\x83\xAD\xE3\x83\xA1\xE3\x83\xBC\xE3\x83\x88\xE3\x83\xAB\x0F\xE3\x82\xAD\xE3\x83\xAD\xE3\x83\xAF\xE3\x83\x83\xE3\x83\x88\t\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\x0F\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\xE3\x83\x88\xE3\x83\xB3\x0F\xE3\x82\xAF\xE3\x83\xAB\xE3\x82\xBC\xE3\x82\xA4\xE3\x83\xAD\f\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x8D\t\xE3\x82\xB1\xE3\x83\xBC\xE3\x82\xB9\t\xE3\x82\xB3\xE3\x83\xAB\xE3\x83\x8A\t\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x9D\f\xE3\x82\xB5\xE3\x82\xA4\xE3\x82\xAF\xE3\x83\xAB\x0F\xE3\x82\xB5\xE3\x83\xB3\xE3\x83\x81\xE3\x83\xBC\xE3\x83\xA0\f\xE3\x82\xB7\xE3\x83\xAA\xE3\x83\xB3\xE3\x82\xB0\t\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x81\t\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x80\xE3\x83\xBC\xE3\x82\xB9\x06\xE3\x83\x87\xE3\x82\xB7\x06\xE3\x83\x89\xE3\x83\xAB\x06\xE3\x83\x88\xE3\x83\xB3\x06\xE3\x83\x8A\xE3\x83\x8E\t\xE3\x83\x8E\xE3\x83\x83\xE3\x83\x88\t\xE3\x83\x8F\xE3\x82\xA4\xE3\x83\x84\x0F\xE3\x83\x91\xE3\x83\xBC\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x91\xE3\x83\xBC\xE3\x83\x84\f\xE3\x83\x90\xE3\x83\xBC\xE3\x83\xAC\xE3\x83\xAB\x0F\xE3\x83\x94\xE3\x82\xA2\xE3\x82\xB9\xE3\x83\x88\xE3\x83\xAB\t\xE3\x83\x94\xE3\x82\xAF\xE3\x83\xAB\x06\xE3\x83\x94\xE3\x82\xB3\x06\xE3\x83\x93\xE3\x83\xAB\x0F\xE3\x83\x95\xE3\x82\xA1\xE3\x83\xA9\xE3\x83\x83\xE3\x83\x89\f\xE3\x83\x95\xE3\x82\xA3\xE3\x83\xBC\xE3\x83\x88\x0F\xE3\x83\x96\xE3\x83\x83\xE3\x82\xB7\xE3\x82\xA7\xE3\x83\xAB\t\xE3\x83\x95\xE3\x83\xA9\xE3\x83\xB3\x0F\xE3\x83\x98\xE3\x82\xAF\xE3\x82\xBF\xE3\x83\xBC\xE3\x83\xAB\x06\xE3\x83\x9A\xE3\x82\xBD\t\xE3\x83\x9A\xE3\x83\x8B\xE3\x83\x92\t\xE3\x83\x98\xE3\x83\xAB\xE3\x83\x84\t\xE3\x83\x9A\xE3\x83\xB3\xE3\x82\xB9\t\xE3\x83\x9A\xE3\x83\xBC\xE3\x82\xB8\t\xE3\x83\x99\xE3\x83\xBC\xE3\x82\xBF\f\xE3\x83\x9D\xE3\x82\xA4\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x9C\xE3\x83\xAB\xE3\x83\x88\x06\xE3\x83\x9B\xE3\x83\xB3\t\xE3\x83\x9D\xE3\x83\xB3\xE3\x83\x89\t\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xAB\t\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xB3\f\xE3\x83\x9E\xE3\x82\xA4\xE3\x82\xAF\xE3\x83\xAD\t\xE3\x83\x9E\xE3\x82\xA4\xE3\x83\xAB\t\xE3\x83\x9E\xE3\x83\x83\xE3\x83\x8F\t\xE3\x83\x9E\xE3\x83\xAB\xE3\x82\xAF\x0F\xE3\x83\x9E\xE3\x83\xB3\xE3\x82\xB7\xE3\x83\xA7\xE3\x83\xB3\f\xE3\x83\x9F\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xB3\x06\xE3\x83\x9F\xE3\x83\xAA\x0F\xE3\x83\x9F\xE3\x83\xAA\xE3\x83\x90\xE3\x83\xBC\xE3\x83\xAB\x06\xE3\x83\xA1\xE3\x82\xAC\f\xE3\x83\xA1\xE3\x82\xAC\xE3\x83\x88\xE3\x83\xB3\f\xE3\x83\xA1\xE3\x83\xBC\xE3\x83\x88\xE3\x83\xAB\t\xE3\x83\xA4\xE3\x83\xBC\xE3\x83\x89\t\xE3\x83\xA4\xE3\x83\xBC\xE3\x83\xAB\t\xE3\x83\xA6\xE3\x82\xA2\xE3\x83\xB3\f\xE3\x83\xAA\xE3\x83\x83\xE3\x83\x88\xE3\x83\xAB\x06\xE3\x83\xAA\xE3\x83\xA9\t\xE3\x83\xAB\xE3\x83\x94\xE3\x83\xBC\f\xE3\x83\xAB\xE3\x83\xBC\xE3\x83\x96\xE3\x83\xAB\x06\xE3\x83\xAC\xE3\x83\xA0\x0F\xE3\x83\xAC\xE3\x83\xB3\xE3\x83\x88\xE3\x82\xB2\xE3\x83\xB3\t\xE3\x83\xAF\xE3\x83\x83\xE3\x83\x88\x040\xE7\x82\xB9\x041\xE7\x82\xB9\x042\xE7\x82\xB9\x043\xE7\x82\xB9\x044\xE7\x82\xB9\x045\xE7\x82\xB9\x046\xE7\x82\xB9\x047\xE7\x82\xB9\x048\xE7\x82\xB9\x049\xE7\x82\xB9\x0510\xE7\x82\xB9\x0511\xE7\x82\xB9\x0512\xE7\x82\xB9\x0513\xE7\x82\xB9\x0514\xE7\x82\xB9\x0515\xE7\x82\xB9\x0516\xE7\x82\xB9\x0517\xE7\x82\xB9\x0518\xE7\x82\xB9\x0519\xE7\x82\xB9\x0520\xE7\x82\xB9\x0521\xE7\x82\xB9\x0522\xE7\x82\xB9\x0523\xE7\x82\xB9\x0524\xE7\x82\xB9\x02da\x02au\x02ov\x02pc\x02dm\x02iu\x06\xE5\xB9\xB3\xE6\x88\x90\x06\xE6\x98\xAD\xE5\x92\x8C\x06\xE5\xA4\xA7\xE6\xAD\xA3\x06\xE6\x98\x8E\xE6\xB2\xBB\f\xE6\xA0\xAA\xE5\xBC\x8F\xE4\xBC\x9A\xE7\xA4\xBE\x02pa\x02na\x02ma\x02ka\x02kb\x02mb\x02gb\x04kcal\x02pf\x02nf\x02mg\x02kg\x02hz\x02ml\x02dl\x02kl\x02fm\x02nm\x02mm\x02cm\x02km\x02m2\x02m3\x05m\xE2\x88\x95s\x06m\xE2\x88\x95s2\x07rad\xE2\x88\x95s\brad\xE2\x88\x95s2\x02ps\x02ns\x02ms\x02pv\x02nv\x02mv\x02kv\x02pw\x02nw\x02mw\x02kw\x02bq\x02cc\x02cd\x06c\xE2\x88\x95kg\x02db\x02gy\x02ha\x02hp\x02in\x02kk\x02kt\x02lm\x02ln\x02lx\x02ph\x02pr\x02sr\x02sv\x02wb\x05v\xE2\x88\x95m\x05a\xE2\x88\x95m\x041\xE6\x97\xA5\x042\xE6\x97\xA5\x043\xE6\x97\xA5\x044\xE6\x97\xA5\x045\xE6\x97\xA5\x046\xE6\x97\xA5\x047\xE6\x97\xA5\x048\xE6\x97\xA5\x049\xE6\x97\xA5\x0510\xE6\x97\xA5\x0511\xE6\x97\xA5\x0512\xE6\x97\xA5\x0513\xE6\x97\xA5\x0514\xE6\x97\xA5\x0515\xE6\x97\xA5\x0516\xE6\x97\xA5\x0517\xE6\x97\xA5\x0518\xE6\x97\xA5\x0519\xE6\x97\xA5\x0520\xE6\x97\xA5\x0521\xE6\x97\xA5\x0522\xE6\x97\xA5\x0523\xE6\x97\xA5\x0524\xE6\x97\xA5\x0525\xE6\x97\xA5\x0526\xE6\x97\xA5\x0527\xE6\x97\xA5\x0528\xE6\x97\xA5\x0529\xE6\x97\xA5\x0530\xE6\x97\xA5\x0531\xE6\x97\xA5\x02\xD1\x8C\x02\xC9\xA6\x02\xC9\xAC\x02\xCA\x9E\x02\xCA\x87\x02\xC5\x93\x04\xF0\xA4\x8B\xAE\x04\xF0\xA2\xA1\x8A\x04\xF0\xA2\xA1\x84\x04\xF0\xA3\x8F\x95\x04\xF0\xA5\x89\x89\x04\xF0\xA5\xB3\x90\x04\xF0\xA7\xBB\x93\x02ff\x02fi\x02fl\x02st\x04\xD5\xB4\xD5\xB6\x04\xD5\xB4\xD5\xA5\x04\xD5\xB4\xD5\xAB\x04\xD5\xBE\xD5\xB6\x04\xD5\xB4\xD5\xAD\x04\xD7\x99\xD6\xB4\x04\xD7\xB2\xD6\xB7\x02\xD7\xA2\x02\xD7\x94\x02\xD7\x9B\x02\xD7\x9C\x02\xD7\x9D\x02\xD7\xA8\x02\xD7\xAA\x04\xD7\xA9\xD7\x81\x04\xD7\xA9\xD7\x82\x06\xD7\xA9\xD6\xBC\xD7\x81\x06\xD7\xA9\xD6\xBC\xD7\x82\x04\xD7\x90\xD6\xB7\x04\xD7\x90\xD6\xB8\x04\xD7\x90\xD6\xBC\x04\xD7\x91\xD6\xBC\x04\xD7\x92\xD6\xBC\x04\xD7\x93\xD6\xBC\x04\xD7\x94\xD6\xBC\x04\xD7\x95\xD6\xBC\x04\xD7\x96\xD6\xBC\x04\xD7\x98\xD6\xBC\x04\xD7\x99\xD6\xBC\x04\xD7\x9A\xD6\xBC\x04\xD7\x9B\xD6\xBC\x04\xD7\x9C\xD6\xBC\x04\xD7\x9E\xD6\xBC\x04\xD7\xA0\xD6\xBC\x04\xD7\xA1\xD6\xBC\x04\xD7\xA3\xD6\xBC\x04\xD7\xA4\xD6\xBC\x04\xD7\xA6\xD6\xBC\x04\xD7\xA7\xD6\xBC\x04\xD7\xA8\xD6\xBC\x04\xD7\xA9\xD6\xBC\x04\xD7\xAA\xD6\xBC\x04\xD7\x95\xD6\xB9\x04\xD7\x91\xD6\xBF\x04\xD7\x9B\xD6\xBF\x04\xD7\xA4\xD6\xBF\x04\xD7\x90\xD7\x9C\x02\xD9\xB1\x02\xD9\xBB\x02\xD9\xBE\x02\xDA\x80\x02\xD9\xBA\x02\xD9\xBF\x02\xD9\xB9\x02\xDA\xA4\x02\xDA\xA6\x02\xDA\x84\x02\xDA\x83\x02\xDA\x86\x02\xDA\x87\x02\xDA\x8D\x02\xDA\x8C\x02\xDA\x8E\x02\xDA\x88\x02\xDA\x98\x02\xDA\x91\x02\xDA\xA9\x02\xDA\xAF\x02\xDA\xB3\x02\xDA\xB1\x02\xDA\xBA\x02\xDA\xBB\x02\xDB\x80\x02\xDB\x81\x02\xDA\xBE\x02\xDB\x92\x02\xDB\x93\x02\xDA\xAD\x02\xDB\x87\x02\xDB\x86\x02\xDB\x88\x02\xDB\x8B\x02\xDB\x85\x02\xDB\x89\x02\xDB\x90\x02\xD9\x89\x04\xD8\xA6\xD8\xA7\x04\xD8\xA6\xDB\x95\x04\xD8\xA6\xD9\x88\x04\xD8\xA6\xDB\x87\x04\xD8\xA6\xDB\x86\x04\xD8\xA6\xDB\x88\x04\xD8\xA6\xDB\x90\x04\xD8\xA6\xD9\x89\x02\xDB\x8C\x04\xD8\xA6\xD8\xAC\x04\xD8\xA6\xD8\xAD\x04\xD8\xA6\xD9\x85\x04\xD8\xA6\xD9\x8A\x04\xD8\xA8\xD8\xAC\x04\xD8\xA8\xD8\xAD\x04\xD8\xA8\xD8\xAE\x04\xD8\xA8\xD9\x85\x04\xD8\xA8\xD9\x89\x04\xD8\xA8\xD9\x8A\x04\xD8\xAA\xD8\xAC\x04\xD8\xAA\xD8\xAD\x04\xD8\xAA\xD8\xAE\x04\xD8\xAA\xD9\x85\x04\xD8\xAA\xD9\x89\x04\xD8\xAA\xD9\x8A\x04\xD8\xAB\xD8\xAC\x04\xD8\xAB\xD9\x85\x04\xD8\xAB\xD9\x89\x04\xD8\xAB\xD9\x8A\x04\xD8\xAC\xD8\xAD\x04\xD8\xAC\xD9\x85\x04\xD8\xAD\xD8\xAC\x04\xD8\xAD\xD9\x85\x04\xD8\xAE\xD8\xAC\x04\xD8\xAE\xD8\xAD\x04\xD8\xAE\xD9\x85\x04\xD8\xB3\xD8\xAC\x04\xD8\xB3\xD8\xAD\x04\xD8\xB3\xD8\xAE\x04\xD8\xB3\xD9\x85\x04\xD8\xB5\xD8\xAD\x04\xD8\xB5\xD9\x85\x04\xD8\xB6\xD8\xAC\x04\xD8\xB6\xD8\xAD\x04\xD8\xB6\xD8\xAE\x04\xD8\xB6\xD9\x85\x04\xD8\xB7\xD8\xAD\x04\xD8\xB7\xD9\x85\x04\xD8\xB8\xD9\x85\x04\xD8\xB9\xD8\xAC\x04\xD8\xB9\xD9\x85\x04\xD8\xBA\xD8\xAC\x04\xD8\xBA\xD9\x85\x04\xD9\x81\xD8\xAC\x04\xD9\x81\xD8\xAD\x04\xD9\x81\xD8\xAE\x04\xD9\x81\xD9\x85\x04\xD9\x81\xD9\x89\x04\xD9\x81\xD9\x8A\x04\xD9\x82\xD8\xAD\x04\xD9\x82\xD9\x85\x04\xD9\x82\xD9\x89\x04\xD9\x82\xD9\x8A\x04\xD9\x83\xD8\xA7\x04\xD9\x83\xD8\xAC\x04\xD9\x83\xD8\xAD\x04\xD9\x83\xD8\xAE\x04\xD9\x83\xD9\x84\x04\xD9\x83\xD9\x85\x04\xD9\x83\xD9\x89\x04\xD9\x83\xD9\x8A\x04\xD9\x84\xD8\xAC\x04\xD9\x84\xD8\xAD\x04\xD9\x84\xD8\xAE\x04\xD9\x84\xD9\x85\x04\xD9\x84\xD9\x89\x04\xD9\x84\xD9\x8A\x04\xD9\x85\xD8\xAC\x04\xD9\x85\xD8\xAD\x04\xD9\x85\xD8\xAE\x04\xD9\x85\xD9\x85\x04\xD9\x85\xD9\x89\x04\xD9\x85\xD9\x8A\x04\xD9\x86\xD8\xAC\x04\xD9\x86\xD8\xAD\x04\xD9\x86\xD8\xAE\x04\xD9\x86\xD9\x85\x04\xD9\x86\xD9\x89\x04\xD9\x86\xD9\x8A\x04\xD9\x87\xD8\xAC\x04\xD9\x87\xD9\x85\x04\xD9\x87\xD9\x89\x04\xD9\x87\xD9\x8A\x04\xD9\x8A\xD8\xAC\x04\xD9\x8A\xD8\xAD\x04\xD9\x8A\xD8\xAE\x04\xD9\x8A\xD9\x85\x04\xD9\x8A\xD9\x89\x04\xD9\x8A\xD9\x8A\x04\xD8\xB0\xD9\xB0\x04\xD8\xB1\xD9\xB0\x04\xD9\x89\xD9\xB0\x05 \xD9\x8C\xD9\x91\x05 \xD9\x8D\xD9\x91\x05 \xD9\x8E\xD9\x91\x05 \xD9\x8F\xD9\x91\x05 \xD9\x90\xD9\x91\x05 \xD9\x91\xD9\xB0\x04\xD8\xA6\xD8\xB1\x04\xD8\xA6\xD8\xB2\x04\xD8\xA6\xD9\x86\x04\xD8\xA8\xD8\xB1\x04\xD8\xA8\xD8\xB2\x04\xD8\xA8\xD9\x86\x04\xD8\xAA\xD8\xB1\x04\xD8\xAA\xD8\xB2\x04\xD8\xAA\xD9\x86\x04\xD8\xAB\xD8\xB1\x04\xD8\xAB\xD8\xB2\x04\xD8\xAB\xD9\x86\x04\xD9\x85\xD8\xA7\x04\xD9\x86\xD8\xB1\x04\xD9\x86\xD8\xB2\x04\xD9\x86\xD9\x86\x04\xD9\x8A\xD8\xB1\x04\xD9\x8A\xD8\xB2\x04\xD9\x8A\xD9\x86\x04\xD8\xA6\xD8\xAE\x04\xD8\xA6\xD9\x87\x04\xD8\xA8\xD9\x87\x04\xD8\xAA\xD9\x87\x04\xD8\xB5\xD8\xAE\x04\xD9\x84\xD9\x87\x04\xD9\x86\xD9\x87\x04\xD9\x87\xD9\xB0\x04\xD9\x8A\xD9\x87\x04\xD8\xAB\xD9\x87\x04\xD8\xB3\xD9\x87\x04\xD8\xB4\xD9\x85\x04\xD8\xB4\xD9\x87\x06\xD9\x80\xD9\x8E\xD9\x91\x06\xD9\x80\xD9\x8F\xD9\x91\x06\xD9\x80\xD9\x90\xD9\x91\x04\xD8\xB7\xD9\x89\x04\xD8\xB7\xD9\x8A\x04\xD8\xB9\xD9\x89\x04\xD8\xB9\xD9\x8A\x04\xD8\xBA\xD9\x89\x04\xD8\xBA\xD9\x8A\x04\xD8\xB3\xD9\x89\x04\xD8\xB3\xD9\x8A\x04\xD8\xB4\xD9\x89\x04\xD8\xB4\xD9\x8A\x04\xD8\xAD\xD9\x89\x04\xD8\xAD\xD9\x8A\x04\xD8\xAC\xD9\x89\x04\xD8\xAC\xD9\x8A\x04\xD8\xAE\xD9\x89\x04\xD8\xAE\xD9\x8A\x04\xD8\xB5\xD9\x89\x04\xD8\xB5\xD9\x8A\x04\xD8\xB6\xD9\x89\x04\xD8\xB6\xD9\x8A\x04\xD8\xB4\xD8\xAC\x04\xD8\xB4\xD8\xAD\x04\xD8\xB4\xD8\xAE\x04\xD8\xB4\xD8\xB1\x04\xD8\xB3\xD8\xB1\x04\xD8\xB5\xD8\xB1\x04\xD8\xB6\xD8\xB1\x04\xD8\xA7\xD9\x8B\x06\xD8\xAA\xD8\xAC\xD9\x85\x06\xD8\xAA\xD8\xAD\xD8\xAC\x06\xD8\xAA\xD8\xAD\xD9\x85\x06\xD8\xAA\xD8\xAE\xD9\x85\x06\xD8\xAA\xD9\x85\xD8\xAC\x06\xD8\xAA\xD9\x85\xD8\xAD\x06\xD8\xAA\xD9\x85\xD8\xAE\x06\xD8\xAC\xD9\x85\xD8\xAD\x06\xD8\xAD\xD9\x85\xD9\x8A\x06\xD8\xAD\xD9\x85\xD9\x89\x06\xD8\xB3\xD8\xAD\xD8\xAC\x06\xD8\xB3\xD8\xAC\xD8\xAD\x06\xD8\xB3\xD8\xAC\xD9\x89\x06\xD8\xB3\xD9\x85\xD8\xAD\x06\xD8\xB3\xD9\x85\xD8\xAC\x06\xD8\xB3\xD9\x85\xD9\x85\x06\xD8\xB5\xD8\xAD\xD8\xAD\x06\xD8\xB5\xD9\x85\xD9\x85\x06\xD8\xB4\xD8\xAD\xD9\x85\x06\xD8\xB4\xD8\xAC\xD9\x8A\x06\xD8\xB4\xD9\x85\xD8\xAE\x06\xD8\xB4\xD9\x85\xD9\x85\x06\xD8\xB6\xD8\xAD\xD9\x89\x06\xD8\xB6\xD8\xAE\xD9\x85\x06\xD8\xB7\xD9\x85\xD8\xAD\x06\xD8\xB7\xD9\x85\xD9\x85\x06\xD8\xB7\xD9\x85\xD9\x8A\x06\xD8\xB9\xD8\xAC\xD9\x85\x06\xD8\xB9\xD9\x85\xD9\x85\x06\xD8\xB9\xD9\x85\xD9\x89\x06\xD8\xBA\xD9\x85\xD9\x85\x06\xD8\xBA\xD9\x85\xD9\x8A\x06\xD8\xBA\xD9\x85\xD9\x89\x06\xD9\x81\xD8\xAE\xD9\x85\x06\xD9\x82\xD9\x85\xD8\xAD\x06\xD9\x82\xD9\x85\xD9\x85\x06\xD9\x84\xD8\xAD\xD9\x85\x06\xD9\x84\xD8\xAD\xD9\x8A\x06\xD9\x84\xD8\xAD\xD9\x89\x06\xD9\x84\xD8\xAC\xD8\xAC\x06\xD9\x84\xD8\xAE\xD9\x85\x06\xD9\x84\xD9\x85\xD8\xAD\x06\xD9\x85\xD8\xAD\xD8\xAC\x06\xD9\x85\xD8\xAD\xD9\x85\x06\xD9\x85\xD8\xAD\xD9\x8A\x06\xD9\x85\xD8\xAC\xD8\xAD\x06\xD9\x85\xD8\xAC\xD9\x85\x06\xD9\x85\xD8\xAE\xD8\xAC\x06\xD9\x85\xD8\xAE\xD9\x85\x06\xD9\x85\xD8\xAC\xD8\xAE\x06\xD9\x87\xD9\x85\xD8\xAC\x06\xD9\x87\xD9\x85\xD9\x85\x06\xD9\x86\xD8\xAD\xD9\x85\x06\xD9\x86\xD8\xAD\xD9\x89\x06\xD9\x86\xD8\xAC\xD9\x85\x06\xD9\x86\xD8\xAC\xD9\x89\x06\xD9\x86\xD9\x85\xD9\x8A\x06\xD9\x86\xD9\x85\xD9\x89\x06\xD9\x8A\xD9\x85\xD9\x85\x06\xD8\xA8\xD8\xAE\xD9\x8A\x06\xD8\xAA\xD8\xAC\xD9\x8A\x06\xD8\xAA\xD8\xAC\xD9\x89\x06\xD8\xAA\xD8\xAE\xD9\x8A\x06\xD8\xAA\xD8\xAE\xD9\x89\x06\xD8\xAA\xD9\x85\xD9\x8A\x06\xD8\xAA\xD9\x85\xD9\x89\x06\xD8\xAC\xD9\x85\xD9\x8A\x06\xD8\xAC\xD8\xAD\xD9\x89\x06\xD8\xAC\xD9\x85\xD9\x89\x06\xD8\xB3\xD8\xAE\xD9\x89\x06\xD8\xB5\xD8\xAD\xD9\x8A\x06\xD8\xB4\xD8\xAD\xD9\x8A\x06\xD8\xB6\xD8\xAD\xD9\x8A\x06\xD9\x84\xD8\xAC\xD9\x8A\x06\xD9\x84\xD9\x85\xD9\x8A\x06\xD9\x8A\xD8\xAD\xD9\x8A\x06\xD9\x8A\xD8\xAC\xD9\x8A\x06\xD9\x8A\xD9\x85\xD9\x8A\x06\xD9\x85\xD9\x85\xD9\x8A\x06\xD9\x82\xD9\x85\xD9\x8A\x06\xD9\x86\xD8\xAD\xD9\x8A\x06\xD8\xB9\xD9\x85\xD9\x8A\x06\xD9\x83\xD9\x85\xD9\x8A\x06\xD9\x86\xD8\xAC\xD8\xAD\x06\xD9\x85\xD8\xAE\xD9\x8A\x06\xD9\x84\xD8\xAC\xD9\x85\x06\xD9\x83\xD9\x85\xD9\x85\x06\xD8\xAC\xD8\xAD\xD9\x8A\x06\xD8\xAD\xD8\xAC\xD9\x8A\x06\xD9\x85\xD8\xAC\xD9\x8A\x06\xD9\x81\xD9\x85\xD9\x8A\x06\xD8\xA8\xD8\xAD\xD9\x8A\x06\xD8\xB3\xD8\xAE\xD9\x8A\x06\xD9\x86\xD8\xAC\xD9\x8A\x06\xD8\xB5\xD9\x84\xDB\x92\x06\xD9\x82\xD9\x84\xDB\x92\b\xD8\xA7\xD9\x84\xD9\x84\xD9\x87\b\xD8\xA7\xD9\x83\xD8\xA8\xD8\xB1\b\xD9\x85\xD8\xAD\xD9\x85\xD8\xAF\b\xD8\xB5\xD9\x84\xD8\xB9\xD9\x85\b\xD8\xB1\xD8\xB3\xD9\x88\xD9\x84\b\xD8\xB9\xD9\x84\xD9\x8A\xD9\x87\b\xD9\x88\xD8\xB3\xD9\x84\xD9\x85\x06\xD8\xB5\xD9\x84\xD9\x89!\xD8\xB5\xD9\x84\xD9\x89 \xD8\xA7\xD9\x84\xD9\x84\xD9\x87 \xD8\xB9\xD9\x84\xD9\x8A\xD9\x87 \xD9\x88\xD8\xB3\xD9\x84\xD9\x85\x0F\xD8\xAC\xD9\x84 \xD8\xAC\xD9\x84\xD8\xA7\xD9\x84\xD9\x87\b\xD8\xB1\xDB\x8C\xD8\xA7\xD9\x84\x01,\x01:\x01!\x01?\x01_\x01{\x01}\x01[\x01]\x01#\x01&\x01*\x01-\x01<\x01>\x01\\\x01$\x01%\x01@\x04\xD9\x80\xD9\x8B\x04\xD9\x80\xD9\x8E\x04\xD9\x80\xD9\x8F\x04\xD9\x80\xD9\x90\x04\xD9\x80\xD9\x91\x04\xD9\x80\xD9\x92\x02\xD8\xA1\x02\xD8\xA2\x02\xD8\xA3\x02\xD8\xA4\x02\xD8\xA5\x02\xD8\xA6\x02\xD8\xA7\x02\xD8\xA8\x02\xD8\xA9\x02\xD8\xAA\x02\xD8\xAB\x02\xD8\xAC\x02\xD8\xAD\x02\xD8\xAE\x02\xD8\xAF\x02\xD8\xB0\x02\xD8\xB1\x02\xD8\xB2\x02\xD8\xB3\x02\xD8\xB4\x02\xD8\xB5\x02\xD8\xB6\x02\xD8\xB7\x02\xD8\xB8\x02\xD8\xB9\x02\xD8\xBA\x02\xD9\x81\x02\xD9\x82\x02\xD9\x83\x02\xD9\x84\x02\xD9\x85\x02\xD9\x86\x02\xD9\x87\x02\xD9\x88\x02\xD9\x8A\x04\xD9\x84\xD8\xA2\x04\xD9\x84\xD8\xA3\x04\xD9\x84\xD8\xA5\x04\xD9\x84\xD8\xA7\x01\"\x01'\x01/\x01^\x01|\x01~\x02\xC2\xA2\x02\xC2\xA3\x02\xC2\xAC\x02\xC2\xA6\x02\xC2\xA5\b\xF0\x9D\x85\x97\xF0\x9D\x85\xA5\b\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB0\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB1\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB2\b\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\b\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\f\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\f\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\x02\xC4\xB1\x02\xC8\xB7\x02\xCE\xB1\x02\xCE\xB5\x02\xCE\xB6\x02\xCE\xB7\x02\xCE\xBA\x02\xCE\xBB\x02\xCE\xBC\x02\xCE\xBD\x02\xCE\xBE\x02\xCE\xBF\x02\xCF\x83\x02\xCF\x84\x02\xCF\x85\x02\xCF\x88\x03\xE2\x88\x87\x03\xE2\x88\x82\x02\xCF\x9D\x02\xD9\xAE\x02\xDA\xA1\x02\xD9\xAF\x020,\x021,\x022,\x023,\x024,\x025,\x026,\x027,\x028,\x029,\x03(a)\x03(b)\x03(c)\x03(d)\x03(e)\x03(f)\x03(g)\x03(h)\x03(i)\x03(j)\x03(k)\x03(l)\x03(m)\x03(n)\x03(o)\x03(p)\x03(q)\x03(r)\x03(s)\x03(t)\x03(u)\x03(v)\x03(w)\x03(x)\x03(y)\x03(z)\x07\xE3\x80\x94s\xE3\x80\x95\x02wz\x02hv\x02sd\x03ppv\x02wc\x02mc\x02md\x02dj\x06\xE3\x81\xBB\xE3\x81\x8B\x06\xE3\x82\xB3\xE3\x82\xB3\x03\xE3\x82\xB5\x03\xE6\x89\x8B\x03\xE5\xAD\x97\x03\xE5\x8F\x8C\x03\xE3\x83\x87\x03\xE4\xBA\x8C\x03\xE5\xA4\x9A\x03\xE8\xA7\xA3\x03\xE5\xA4\xA9\x03\xE4\xBA\xA4\x03\xE6\x98\xA0\x03\xE7\x84\xA1\x03\xE6\x96\x99\x03\xE5\x89\x8D\x03\xE5\xBE\x8C\x03\xE5\x86\x8D\x03\xE6\x96\xB0\x03\xE5\x88\x9D\x03\xE7\xB5\x82\x03\xE7\x94\x9F\x03\xE8\xB2\xA9\x03\xE5\xA3\xB0\x03\xE5\x90\xB9\x03\xE6\xBC\x94\x03\xE6\x8A\x95\x03\xE6\x8D\x95\x03\xE4\xB8\x80\x03\xE4\xB8\x89\x03\xE9\x81\x8A\x03\xE5\xB7\xA6\x03\xE4\xB8\xAD\x03\xE5\x8F\xB3\x03\xE6\x8C\x87\x03\xE8\xB5\xB0\x03\xE6\x89\x93\x03\xE7\xA6\x81\x03\xE7\xA9\xBA\x03\xE5\x90\x88\x03\xE6\xBA\x80\x03\xE6\x9C\x89\x03\xE6\x9C\x88\x03\xE7\x94\xB3\x03\xE5\x89\xB2\x03\xE5\x96\xB6\x03\xE9\x85\x8D\t\xE3\x80\x94\xE6\x9C\xAC\xE3\x80\x95\t\xE3\x80\x94\xE4\xB8\x89\xE3\x80\x95\t\xE3\x80\x94\xE4\xBA\x8C\xE3\x80\x95\t\xE3\x80\x94\xE5\xAE\x89\xE3\x80\x95\t\xE3\x80\x94\xE7\x82\xB9\xE3\x80\x95\t\xE3\x80\x94\xE6\x89\x93\xE3\x80\x95\t\xE3\x80\x94\xE7\x9B\x97\xE3\x80\x95\t\xE3\x80\x94\xE5\x8B\x9D\xE3\x80\x95\t\xE3\x80\x94\xE6\x95\x97\xE3\x80\x95\x03\xE5\xBE\x97\x03\xE5\x8F\xAF\x03\xE4\xB8\xBD\x03\xE4\xB8\xB8\x03\xE4\xB9\x81\x03\xE4\xBD\xA0\x03\xE4\xBE\xAE\x03\xE4\xBE\xBB\x03\xE5\x80\x82\x03\xE5\x81\xBA\x03\xE5\x82\x99\x03\xE5\x83\xA7\x03\xE5\x83\x8F\x03\xE3\x92\x9E\x03\xE5\x85\x8D\x03\xE5\x85\x94\x03\xE5\x85\xA4\x03\xE5\x85\xB7\x03\xE3\x92\xB9\x03\xE5\x85\xA7\x03\xE5\x86\x97\x03\xE5\x86\xA4\x03\xE4\xBB\x8C\x03\xE5\x86\xAC\x03\xE5\x86\xB5\x03\xE5\x87\xB5\x03\xE5\x88\x83\x03\xE3\x93\x9F\x03\xE5\x88\xBB\x03\xE5\x89\x86\x03\xE5\x89\xB7\x03\xE3\x94\x95\x03\xE5\x8B\x87\x03\xE5\x8B\x89\x03\xE5\x8B\xA4\x03\xE5\x8B\xBA\x03\xE5\x8C\x85\x03\xE5\x8C\x86\x03\xE5\x8C\x97\x03\xE5\x8D\x89\x03\xE5\x8D\x91\x03\xE5\x8D\x9A\x03\xE5\x8D\xB3\x03\xE5\x8D\xBD\x03\xE5\x8D\xBF\x03\xE7\x81\xB0\x03\xE5\x8F\x8A\x03\xE5\x8F\x9F\x03\xE5\x8F\xAB\x03\xE5\x8F\xB1\x03\xE5\x90\x86\x03\xE5\x92\x9E\x03\xE5\x90\xB8\x03\xE5\x91\x88\x03\xE5\x91\xA8\x03\xE5\x92\xA2\x03\xE5\x93\xB6\x03\xE5\x94\x90\x03\xE5\x95\x93\x03\xE5\x95\xA3\x03\xE5\x96\x84\x03\xE5\x96\x99\x03\xE5\x96\xAB\x03\xE5\x96\xB3\x03\xE5\x97\x82\x03\xE5\x9C\x96\x03\xE5\x98\x86\x03\xE5\x9C\x97\x03\xE5\x99\x91\x03\xE5\x99\xB4\x03\xE5\x88\x87\x03\xE5\xA3\xAE\x03\xE5\x9F\x8E\x03\xE5\x9F\xB4\x03\xE5\xA0\x8D\x03\xE5\x9E\x8B\x03\xE5\xA0\xB2\x03\xE5\xA0\xB1\x03\xE5\xA2\xAC\x03\xE5\xA3\xB2\x03\xE5\xA3\xB7\x03\xE5\xA4\x86\x03\xE5\xA4\xA2\x03\xE5\xA5\xA2\x03\xE5\xA7\xAC\x03\xE5\xA8\x9B\x03\xE5\xA8\xA7\x03\xE5\xA7\x98\x03\xE5\xA9\xA6\x03\xE3\x9B\xAE\x03\xE5\xAC\x88\x03\xE5\xAC\xBE\x03\xE5\xAF\x83\x03\xE5\xAF\x98\x03\xE5\xAF\xA7\x03\xE5\xAF\xB3\x03\xE5\xAF\xBF\x03\xE5\xB0\x86\x03\xE5\xB0\xA2\x03\xE3\x9E\x81\x03\xE5\xB1\xA0\x03\xE5\xB1\xAE\x03\xE5\xB3\x80\x03\xE5\xB2\x8D\x03\xE5\xB5\x83\x03\xE5\xB5\xAE\x03\xE5\xB5\xAB\x03\xE5\xB5\xBC\x03\xE5\xB7\xA1\x03\xE5\xB7\xA2\x03\xE3\xA0\xAF\x03\xE5\xB7\xBD\x03\xE5\xB8\xA8\x03\xE5\xB8\xBD\x03\xE5\xB9\xA9\x03\xE3\xA1\xA2\x03\xE3\xA1\xBC\x03\xE5\xBA\xB0\x03\xE5\xBA\xB3\x03\xE5\xBA\xB6\x03\xE5\xBB\x8A\x03\xE5\xBB\xBE\x03\xE8\x88\x81\x03\xE5\xBC\xA2\x03\xE3\xA3\x87\x03\xE5\xBD\xA2\x03\xE5\xBD\xAB\x03\xE3\xA3\xA3\x03\xE5\xBE\x9A\x03\xE5\xBF\x8D\x03\xE5\xBF\x97\x03\xE5\xBF\xB9\x03\xE6\x82\x81\x03\xE3\xA4\xBA\x03\xE3\xA4\x9C\x03\xE6\x82\x94\x03\xE6\x83\x87\x03\xE6\x85\x88\x03\xE6\x85\x8C\x03\xE6\x85\x8E\x03\xE6\x85\xBA\x03\xE6\x86\x8E\x03\xE6\x86\xB2\x03\xE6\x86\xA4\x03\xE6\x86\xAF\x03\xE6\x87\x9E\x03\xE6\x87\xB2\x03\xE6\x87\xB6\x03\xE6\x88\x90\x03\xE6\x88\x9B\x03\xE6\x89\x9D\x03\xE6\x8A\xB1\x03\xE6\x8B\x94\x03\xE6\x8D\x90\x03\xE6\x8C\xBD\x03\xE6\x8B\xBC\x03\xE6\x8D\xA8\x03\xE6\x8E\x83\x03\xE6\x8F\xA4\x03\xE6\x90\xA2\x03\xE6\x8F\x85\x03\xE6\x8E\xA9\x03\xE3\xA8\xAE\x03\xE6\x91\xA9\x03\xE6\x91\xBE\x03\xE6\x92\x9D\x03\xE6\x91\xB7\x03\xE3\xA9\xAC\x03\xE6\x95\x8F\x03\xE6\x95\xAC\x03\xE6\x97\xA3\x03\xE6\x9B\xB8\x03\xE6\x99\x89\x03\xE3\xAC\x99\x03\xE6\x9A\x91\x03\xE3\xAC\x88\x03\xE3\xAB\xA4\x03\xE5\x86\x92\x03\xE5\x86\x95\x03\xE6\x9C\x80\x03\xE6\x9A\x9C\x03\xE8\x82\xAD\x03\xE4\x8F\x99\x03\xE6\x9C\x97\x03\xE6\x9C\x9B\x03\xE6\x9C\xA1\x03\xE6\x9D\x9E\x03\xE6\x9D\x93\x03\xE3\xAD\x89\x03\xE6\x9F\xBA\x03\xE6\x9E\x85\x03\xE6\xA1\x92\x03\xE6\xA2\x85\x03\xE6\xA2\x8E\x03\xE6\xA0\x9F\x03\xE6\xA4\x94\x03\xE3\xAE\x9D\x03\xE6\xA5\x82\x03\xE6\xA6\xA3\x03\xE6\xA7\xAA\x03\xE6\xAA\xA8\x03\xE6\xAB\x9B\x03\xE3\xB0\x98\x03\xE6\xAC\xA1\x03\xE6\xAD\x94\x03\xE3\xB1\x8E\x03\xE6\xAD\xB2\x03\xE6\xAE\x9F\x03\xE6\xAE\xBA\x03\xE6\xAE\xBB\x03\xE6\xB1\x8E\x03\xE6\xB2\xBF\x03\xE6\xB3\x8D\x03\xE6\xB1\xA7\x03\xE6\xB4\x96\x03\xE6\xB4\xBE\x03\xE6\xB5\xB7\x03\xE6\xB5\x81\x03\xE6\xB5\xA9\x03\xE6\xB5\xB8\x03\xE6\xB6\x85\x03\xE6\xB4\xB4\x03\xE6\xB8\xAF\x03\xE6\xB9\xAE\x03\xE3\xB4\xB3\x03\xE6\xBB\x8B\x03\xE6\xBB\x87\x03\xE6\xB7\xB9\x03\xE6\xBD\xAE\x03\xE6\xBF\x86\x03\xE7\x80\xB9\x03\xE7\x80\x9E\x03\xE7\x80\x9B\x03\xE3\xB6\x96\x03\xE7\x81\x8A\x03\xE7\x81\xBD\x03\xE7\x81\xB7\x03\xE7\x82\xAD\x03\xE7\x85\x85\x03\xE7\x86\x9C\x03\xE7\x88\xA8\x03\xE7\x88\xB5\x03\xE7\x89\x90\x03\xE7\x8A\x80\x03\xE7\x8A\x95\x03\xE7\x8D\xBA\x03\xE7\x8E\x8B\x03\xE3\xBA\xAC\x03\xE7\x8E\xA5\x03\xE3\xBA\xB8\x03\xE7\x91\x87\x03\xE7\x91\x9C\x03\xE7\x91\xB1\x03\xE7\x92\x85\x03\xE7\x93\x8A\x03\xE3\xBC\x9B\x03\xE7\x94\xA4\x03\xE7\x94\xBE\x03\xE7\x95\xB0\x03\xE7\x98\x90\x03\xE3\xBF\xBC\x03\xE4\x80\x88\x03\xE7\x9B\xB4\x03\xE7\x9C\x9E\x03\xE7\x9C\x9F\x03\xE7\x9D\x8A\x03\xE4\x80\xB9\x03\xE7\x9E\x8B\x03\xE4\x81\x86\x03\xE4\x82\x96\x03\xE7\xA1\x8E\x03\xE7\xA2\x8C\x03\xE7\xA3\x8C\x03\xE4\x83\xA3\x03\xE7\xA5\x96\x03\xE7\xA6\x8F\x03\xE7\xA7\xAB\x03\xE4\x84\xAF\x03\xE7\xA9\x80\x03\xE7\xA9\x8A\x03\xE7\xA9\x8F\x03\xE4\x88\x82\x03\xE7\xAF\x86\x03\xE7\xAF\x89\x03\xE4\x88\xA7\x03\xE7\xB3\x92\x03\xE4\x8A\xA0\x03\xE7\xB3\xA8\x03\xE7\xB3\xA3\x03\xE7\xB4\x80\x03\xE7\xB5\xA3\x03\xE4\x8C\x81\x03\xE7\xB7\x87\x03\xE7\xB8\x82\x03\xE7\xB9\x85\x03\xE4\x8C\xB4\x03\xE4\x8D\x99\x03\xE7\xBD\xBA\x03\xE7\xBE\x95\x03\xE7\xBF\xBA\x03\xE8\x80\x85\x03\xE8\x81\xA0\x03\xE8\x81\xB0\x03\xE4\x8F\x95\x03\xE8\x82\xB2\x03\xE8\x84\x83\x03\xE4\x90\x8B\x03\xE8\x84\xBE\x03\xE5\xAA\xB5\x03\xE8\x88\x84\x03\xE8\xBE\x9E\x03\xE4\x91\xAB\x03\xE8\x8A\x91\x03\xE8\x8A\x8B\x03\xE8\x8A\x9D\x03\xE5\x8A\xB3\x03\xE8\x8A\xB1\x03\xE8\x8A\xB3\x03\xE8\x8A\xBD\x03\xE8\x8B\xA6\x03\xE8\x8B\xA5\x03\xE8\x8C\x9D\x03\xE8\x8D\xA3\x03\xE8\x8E\xAD\x03\xE8\x8C\xA3\x03\xE8\x8E\xBD\x03\xE8\x8F\xA7\x03\xE8\x91\x97\x03\xE8\x8D\x93\x03\xE8\x8F\x8A\x03\xE8\x8F\x8C\x03\xE8\x8F\x9C\x03\xE4\x94\xAB\x03\xE8\x93\xB1\x03\xE8\x93\xB3\x03\xE8\x94\x96\x03\xE8\x95\xA4\x03\xE4\x95\x9D\x03\xE4\x95\xA1\x03\xE4\x95\xAB\x03\xE8\x99\x90\x03\xE8\x99\x9C\x03\xE8\x99\xA7\x03\xE8\x99\xA9\x03\xE8\x9A\xA9\x03\xE8\x9A\x88\x03\xE8\x9C\x8E\x03\xE8\x9B\xA2\x03\xE8\x9D\xB9\x03\xE8\x9C\xA8\x03\xE8\x9D\xAB\x03\xE8\x9E\x86\x03\xE8\x9F\xA1\x03\xE8\xA0\x81\x03\xE4\x97\xB9\x03\xE8\xA1\xA0\x03\xE8\xA1\xA3\x03\xE8\xA3\x97\x03\xE8\xA3\x9E\x03\xE4\x98\xB5\x03\xE8\xA3\xBA\x03\xE3\x92\xBB\x03\xE4\x9A\xBE\x03\xE4\x9B\x87\x03\xE8\xAA\xA0\x03\xE8\xAB\xAD\x03\xE8\xAE\x8A\x03\xE8\xB1\x95\x03\xE8\xB2\xAB\x03\xE8\xB3\x81\x03\xE8\xB4\x9B\x03\xE8\xB5\xB7\x03\xE8\xB7\x8B\x03\xE8\xB6\xBC\x03\xE8\xB7\xB0\x03\xE8\xBB\x94\x03\xE8\xBC\xB8\x03\xE9\x82\x94\x03\xE9\x83\xB1\x03\xE9\x84\x91\x03\xE9\x84\x9B\x03\xE9\x88\xB8\x03\xE9\x8B\x97\x03\xE9\x8B\x98\x03\xE9\x89\xBC\x03\xE9\x8F\xB9\x03\xE9\x90\x95\x03\xE9\x96\x8B\x03\xE4\xA6\x95\x03\xE9\x96\xB7\x03\xE4\xA7\xA6\x03\xE9\x9B\x83\x03\xE5\xB6\xB2\x03\xE9\x9C\xA3\x03\xE4\xA9\xAE\x03\xE4\xA9\xB6\x03\xE9\x9F\xA0\x03\xE4\xAA\xB2\x03\xE9\xA0\x8B\x03\xE9\xA0\xA9\x03\xE9\xA3\xA2\x03\xE4\xAC\xB3\x03\xE9\xA4\xA9\x03\xE9\xA6\xA7\x03\xE9\xA7\x82\x03\xE9\xA7\xBE\x03\xE4\xAF\x8E\x03\xE9\xAC\x92\x03\xE9\xB1\x80\x03\xE9\xB3\xBD\x03\xE4\xB3\x8E\x03\xE4\xB3\xAD\x03\xE9\xB5\xA7\x03\xE4\xB3\xB8\x03\xE9\xBA\xBB\x03\xE4\xB5\x96\x03\xE9\xBB\xB9\x03\xE9\xBB\xBE\x03\xE9\xBC\x85\x03\xE9\xBC\x8F\x03\xE9\xBC\x96\x03\xE9\xBC\xBB"; + xorData = "\x02\f\t\x02\xB0\xEC\x02\xAD\xD8\x02\xAD\xD9\x02\x06\x07\x02\x0F\x12\x02\x0F\x1F\x02\x0F\x1D\x02\x01\x13\x02\x0F\x16\x02\x0F\v\x02\x0F3\x02\x0F7\x02\x0F?\x02\x0F/\x02\x0F*\x02\f&\x02\f*\x02\f;\x02\f9\x02\f%\x02\xAB\xED\x02\xAB\xE2\x02\xAB\xE3\x02\xA9\xE0\x02\xA9\xE1\x02\xA9\xE6\x02\xA3\xCB\x02\xA3\xC8\x02\xA3\xC9\x02\x01#\x02\x01\b\x02\x0E>\x02\x0E'\x02\x0F\x03\x02\x03\r\x02\x03\t\x02\x03\x17\x02\x03\x0E\x02\x02\x03\x02\x011\x02\x01\x00\x02\x01\x10\x02\x03<\x02\x07\r\x02\x02\f\x02\f0\x02\x01\x03\x02\x01\x01\x02\x01 \x02\x01\"\x02\x01)\x02\x01\n\x02\x01\f\x02\x02\x06\x02\x02\x02\x02\x03\x10\x03\x037 \x03\v+\x03\x02\x01\x04\x02\x01\x02\x02\x019\x02\x03\x1C\x02\x02$\x03\x80p$\x02\x03:\x02\x03\n\x03\xC1r.\x03\xC1r,\x03\xC1r\x02\x02\x02:\x02\x02>\x02\x02,\x02\x02\x10\x02\x02\x00\x03\xC1s<\x03\xC1s*\x03\xC2L$\x03\xC2L;\x02\t)\x02\n\x19\x03\x83\xAB\xE3\x03\x83\xAB\xF2\x03 4\xE0\x03\x81\xAB\xEA\x03\x81\xAB\xF3\x03 4\xEF\x03\x96\xE1\xCD\x03\x84\xE5\xC3\x02\r\x11\x03\x8B\xEC\xCB\x03\x94\xEC\xCF\x03\x9A\xEC\xC2\x03\x8B\xEC\xDB\x03\x94\xEC\xDF\x03\x9A\xEC\xD2\x03\x01\f!\x03\x01\f#\x03\xCA\xA0\x9D\x03\xCA\xA3\x9C\x03\xCA\xA2\x9F\x03\xCA\xA5\x9E\x03\xCA\xA4\x91\x03\xCA\xA7\x90\x03\xCA\xA6\x93\x03\xCA\xA9\x92\x03\xCA\xA8\x95\x03\xCA\xF3\xB5\x03\xCA\xF0\xB4\x03\xCA\xF1\xB7\x03\xCA\xF6\xB6\x03\xCA\xF7\x89\x03\xCA\xF4\x88\x03\xCA\xF5\x8B\x03\xCA\xFA\x8A\x03\xCA\xFB\x8D\x03\xCA\xF8\x8C\x03\xCA\xF9\x8F\x03\xCA\xFE\x8E\x03\xCA\xFF\x81\x03\xCA\xFC\x80\x03\xCA\xFD\x83\x03\xCA\xE2\x82\x03\xCA\xE3\x85\x03\xCA\xE0\x84\x03\xCA\xE1\x87\x03\xCA\xE6\x86\x03\xCA\xE7\x99\x03\xCA\xE4\x98\x03\xCA\xE5\x9B\x03\xCA\xEA\x9A\x03\xCA\xEB\x9D\x03\xCA\xE8\x9C\x03\xD8\x93\x89\x03\xDF\x94\x8B\x02\x010\x03\x03\x04\x1E\x03\x04\x15\x12\x03\v\x05,\x03\x06\x04\x00\x03\x06\x04)\x03\x06\x044\x03\x06\x04<\x03\x06\x05\x1D\x03\x06\x06\x00\x03\x06\x06\n\x03\x06\x06'\x03\x06\x062\x03\x0786\x03\x079/\x03\x079 \x03\x07:\x0E\x03\x07:\x1B\x03\x07:%\x03\x07;/\x03\x07;%\x03\x074\x11\x03\x076\t\x03\x077*\x03\x070\x01\x03\x070\x0F\x03\x070.\x03\x071\x16\x03\x071\x04\x03\x0710\x03\x072\x18\x03\x072-\x03\x073\x14\x03\x073>\x03\x07'\t\x03\x07 \x00\x03\x07\x1F\v\x03\x07\x18#\x03\x07\x18(\x03\x07\x186\x03\x07\x18\x03\x03\x07\x19\x16\x03\x07\x116\x03\x07\x12'\x03\x07\x13\x10\x03\x07\f&\x03\x07\f\b\x03\x07\f\x13\x03\x07\r\x02\x03\x07\r\x1C\x03\x07\v5\x03\x07\v\n\x03\x07\v\x01\x03\x07\v\x0F\x03\x07\x05\x00\x03\x07\x05\t\x03\x07\x05\v\x03\x07\x07\x01\x03\x07\x07\b\x03\x07\x00<\x03\x07\x00+\x03\x07\x01)\x03\x07\x01\x1B\x03\x07\x01\b\x03\x07\x03?\x03\x0445\x03\x044\b\x03\x0454\x03\x04)/\x03\x04)5\x03\x04+\x05\x03\x04+\x14\x03\x04+ \x03\x04+<\x03\x04*&\x03\x04*\"\x03\x04&8\x03\x04!\x01\x03\x04!\"\x03\x04\x11+\x03\x04\x10.\x03\x04\x104\x03\x04\x13=\x03\x04\x12\x04\x03\x04\x12\n\x03\x04\r\x1D\x03\x04\r\x07\x03\x04\r \x03\x05<>\x03\x055<\x03\x055!\x03\x055#\x03\x055&\x03\x054\x1D\x03\x054\x02\x03\x054\x07\x03\x0571\x03\x053\x1A\x03\x053\x16\x03\x05.<\x03\x05.\x07\x03\x05):\x03\x05)<\x03\x05)\f\x03\x05)\x15\x03\x05+-\x03\x05+5\x03\x05$\x1E\x03\x05$\x14\x03\x05'\x04\x03\x05'\x14\x03\x05&\x02\x03\x05\"6\x03\x05\"\f\x03\x05\"\x1C\x03\x05\x19\n\x03\x05\x1B\t\x03\x05\x1B\f\x03\x05\x14\x07\x03\x05\x16?\x03\x05\x16\f\x03\x05\f\x05\x03\x05\x0E\x0F\x03\x05\x01\x0E\x03\x05\x00(\x03\x05\x030\x03\x05\x03\x06\x03\n==\x03\n=1\x03\n=,\x03\n=\f\x03\n??\x03\n<\b\x03\n9!\x03\n9)\x03\n97\x03\n99\x03\n6\n\x03\n6\x1C\x03\n6\x17\x03\n7'\x03\n78\x03\n73\x03\n'\x01\x03\n'&\x03\n\x1F\x0E\x03\n\x1F\x03\x03\n\x1F3\x03\n\x1B/\x03\n\x18\x19\x03\n\x19\x01\x03\n\x16\x14\x03\n\x0E\"\x03\n\x0F\x10\x03\n\x0F\x02\x03\n\x0F \x03\n\f\x04\x03\n\v>\x03\n\v+\x03\n\b/\x03\n\x046\x03\n\x05\x14\x03\n\x00\x04\x03\n\x00\x10\x03\n\x00\x14\x03\v<3\x03\v;*\x03\v9\"\x03\v9)\x03\v97\x03\v+\x10\x03\v((\x03\v&5\x03\v$\x1C\x03\v$\x12\x03\v%\x04\x03\v#<\x03\v#0\x03\v#\r\x03\v#\x19\x03\v!:\x03\v!\x1F\x03\v!\x00\x03\v\x1E5\x03\v\x1C\x1D\x03\v\x1D-\x03\v\x1D(\x03\v\x18.\x03\v\x18 \x03\v\x18\x16\x03\v\x14\x13\x03\v\x15$\x03\v\x15\"\x03\v\x12\x1B\x03\v\x12\x10\x03\v\x132\x03\v\x13=\x03\v\x12\x18\x03\v\f&\x03\v\x061\x03\v\x06:\x03\v\x05#\x03\v\x05<\x03\v\x04\v\x03\v\x04\x04\x03\v\x04\x1B\x03\v\x042\x03\v\x041\x03\v\x03\x03\x03\v\x03\x1D\x03\v\x03/\x03\v\x03+\x03\v\x02\x1B\x03\v\x02\x00\x03\v\x01\x1E\x03\v\x01\b\x03\v\x015\x03\x06\r9\x03\x06\r=\x03\x06\r?\x03\x02\x001\x03\x02\x003\x03\x02\x02\x19\x03\x02\x006\x03\x02\x02\x1B\x03\x02\x004\x03\x02\x00<\x03\x02\x02\n\x03\x02\x02\x0E\x03\x02\x01\x1A\x03\x02\x01\x07\x03\x02\x01\x05\x03\x02\x01\v\x03\x02\x01%\x03\x02\x01\f\x03\x02\x01\x04\x03\x02\x01\x1C\x03\x02\x00.\x03\x02\x002\x03\x02\x00>\x03\x02\x00\x12\x03\x02\x00\x16\x03\x02\x011\x03\x02\x013\x03\x02\x02 \x03\x02\x02%\x03\x02\x02$\x03\x02\x028\x03\x02\x02;\x03\x02\x024\x03\x02\x012\x03\x02\x022\x03\x02\x02/\x03\x02\x01,\x03\x02\x01\x13\x03\x02\x01\x16\x03\x02\x01\x11\x03\x02\x01\x1E\x03\x02\x01\x15\x03\x02\x01\x17\x03\x02\x01\x0F\x03\x02\x01\b\x03\x02\x00?\x03\x02\x03\x07\x03\x02\x03\r\x03\x02\x03\x13\x03\x02\x03\x1D\x03\x02\x03\x1F\x03\x02\x00\x03\x03\x02\x00\r\x03\x02\x00\x01\x03\x02\x00\x1B\x03\x02\x00\x19\x03\x02\x00\x18\x03\x02\x00\x13\x03\x02\x00/\x03\x07>\x12\x03\x07<\x1F\x03\x07>\x1D\x03\x06\x1D\x0E\x03\x07>\x1C\x03\x07>:\x03\x07>\x13\x03\x04\x12+\x03\x07?\x03\x03\x07>\x02\x03\x06\"4\x03\x06\x1A.\x03\x07<%\x03\x06\x1C\v\x03\x0609\x03\x05\x1F\x01\x03\x04'\b\x03\x93\xFD\xF5\x03\x02\r \x03\x02\r#\x03\x02\r!\x03\x02\r&\x03\x02\r\"\x03\x02\r/\x03\x02\r,\x03\x02\r$\x03\x02\r'\x03\x02\r%\x03\x02\r;\x03\x02\r=\x03\x02\r?\x03\t9.\x03\b\v7\x03\b\x02\x14\x03\b\x14\r\x03\b.:\x03\b9'\x03\x0F\v\x18\x03\x0F\x1C1\x03\x0F\x17&\x03\x0F9\x1F\x03\x0F0\f\x03\x0E\n9\x03\x0E\x056\x03\x0E\x1C#\x03\x0F\x13\x0E\x03\x072\x00\x03\x070\r\x03\x072\v\x03\x06\x11\x18\x03\x070\x10\x03\x06\x0F(\x03\x072\x05\x03\x06\x0F,\x03\x073\x15\x03\x06\x07\b\x03\x05\x16\x02\x03\x04\v \x03\x05:8\x03\x05\x16%\x03\n\r\x1F\x03\x06\x16\x10\x03\x05\x1D5\x03\x05*;\x03\x05\x16\x1B\x03\x04.-\x03\x06\x1A\x19\x03\x04\x03,\x03\v87\x03\x04/\n\x03\x06\x00,\x03\x04-\x01\x03\x04\x1E-\x03\x06/(\x03\n\v5\x03\x06\x0E7\x03\x06\x07.\x03\x0597\x03\n*%\x03\x0760\x03\x06\f;\x03\x05'\x00\x03\x072.\x03\x072\b\x03\x06=\x01\x03\x06\x05\x1B\x03\x06\x06\x12\x03\x06$=\x03\x06'\r\x03\x04\x11\x0F\x03\x076,\x03\x06\x07;\x03\x06.,\x03\x86\xF9\xEA\x03\x8F\xFF\xEB\x02\t2\x02\t5\x02\t4\x02\t;\x02\t>\x02\t8\x02\t*\x02\t/\x02\t,\x02\t%\x02\t&\x02\t#\x02\t \x02\b!\x02\b%\x02\b$\x02\b+\x02\b.\x02\b*\x02\b&\x02\b8\x02\b>\x02\b4\x02\b6\x02\b0\x02\b\x10\x02\b\x17\x02\b\x12\x02\b\x1D\x02\b\x1F\x02\b\x13\x02\b\x15\x02\b\x14\x02\b\f\x03\x8B\xFD\xD0\x03\x81\xEC\xC6\x03\x87\xE0\x8A\x03-2\xE3\x03\x80\xEF\xE4\x03-2\xEA\x03\x88\xE6\xEB\x03\x8E\xE6\xE8\x03\x84\xE6\xE9\x03\x97\xE6\xEE\x03-2\xF9\x03-2\xF6\x03\x8E\xE3\xAD\x03\x80\xE3\x92\x03\x88\xE3\x90\x03\x8E\xE3\x90\x03\x80\xE3\x97\x03\x88\xE3\x95\x03\x88\xFE\xCB\x03\x8E\xFE\xCA\x03\x84\xFE\xCD\x03\x91\xEF\xC9\x03-2\xC1\x03-2\xC0\x03-2\xCB\x03\x88@\t\x03\x8E@\b\x03\x8F\xE0\xF5\x03\x8E\xE6\xF9\x03\x8E\xE0\xFA\x03\x93\xFF\xF4\x03\x84\xEE\xD3\x03\v(\x04\x023 \x021;\x02\x01*\x03\v#\x10\x03\v 0\x03\v!\x10\x03\v!0\x03\x07\x15\b\x03\t?5\x03\x07\x1F\b\x03\x07\x17\v\x03\t\x1F\x15\x03\v\x1C7\x03\n+#\x03\x06\x1A\x1B\x03\x06\x1A\x14\x03\n\x01\x18\x03\x06#\x1B\x03\n2\f\x03\n\x01\x04\x03\t#;\x03\b='\x03\b\x1A\n\x03\x07\x03\n\x111\x03\t\x1B\t\x03\x073.\x03\x07\x01\x00\x03\t/,\x03\x07#>\x03\x07\x048\x03\n\x1F\"\x03\t8>\x03\t\x11\x00\x03\b/\x17\x03\x06'\"\x03\v\x1A+\x03\n\"\x19\x03\n/1\x03\t74\x03\t\x0F\"\x03\b,\"\x03\b?\x14\x03\x07$5\x03\x07<3\x03\x07=*\x03\x07\x13\x18\x03\x068\n\x03\x06\t\x16\x03\x06\x13\x00\x03\b\x067\x03\b\x01\x03\x03\b\x12\x1D\x03\x07+7\x03\x06(;\x03\x06\x1C?\x03\x07\x0E\x17\x03\n\x06\x1D\x03\n\x19\x07\x03\b\x14$\x03\x07$;\x03\b,$\x03\b\x06\r\x03\x07\x16\n\x03\x06>>\x03\n\x06\x12\x03\n\x14)\x03\t\r\x1F\x03\t\x12\x17\x03\t\x19\x01\x03\b\x11 \x03\b\x1D'\x03\x06<\x1A\x03\n.\x00\x03\x07'\x18\x03\n\"\b\x03\b\r\n\x03\b\x13)\x03\x07*)\x03\x06<,\x03\x07\v\x1A\x03\t.\x14\x03\t\r\x1E\x03\x07\x0E#\x03\v\x1D'\x03\n\n8\x03\t%2\x03\b+&\x03\b0\x12\x03\n)4\x03\b\x06\x1F\x03\v\x1B\x1A\x03\n\x1B\x0F\x03\v\x1D*\x03\t\x16$\x03\t0\x11\x03\b\x11\b\x03\n*(\x03\n\x042\x03\b9,\x03\x074'\x03\x07\x0F\x05\x03\t\v\n\x03\x07\x1B\x01\x03\t\x17:\x03\t.\r\x03\x07.\x11\x03\t+\x15\x03\b0\x13\x03\v\x1F\x19\x03\n \x11\x03\n\"0\x03\t\x07;\x03\b\x16\x1C\x03\x07,\x13\x03\x07\x0E/\x03\x06\"1\x03\n.\n\x03\n7\x02\x03\n\x032\x03\n\x1D.\x03\t1\x06\x03\t\x19:\x03\b\x02/\x03\x060+\x03\x06\x0F-\x03\x06\x1C\x1F\x03\x06\x1D\x07\x03\n,\x11\x03\t=\r\x03\t\v;\x03\x07\x1B/\x03\n\x1F:\x03\t \x1F\x03\t.\x10\x03\t4\v\x03\t\x1A1\x03\b#\x1A\x03\b4\x1D\x03\b\x01\x1F\x03\b\x11\"\x03\x07'8\x03\x07\x1A>\x03\x0757\x03\x06&9\x03\x06+\x11\x03\n.\v\x03\n,>\x03\n4#\x03\b%\x17\x03\x07\x05\"\x03\x07\f\v\x03\n\x1D+\x03\n\x19\x16\x03\t+\x1F\x03\t\b\v\x03\b\x16\x18\x03\b+\x12\x03\v\x1D\f\x03\n=\x10\x03\n\t\r\x03\n\x10\x11\x03\t&0\x03\b(\x1F\x03\b7\x07\x03\b\x185\x03\x07'6\x03\x06.\x05\x03\x06=\x04\x03\x06;;\x03\x06\x06,\x03\v\x18>\x03\b\x00\x18\x03\x06 \x03\x03\x06<\x00\x03\t%\x18\x03\v\x1C<\x03\n%!\x03\n\t\x12\x03\n\x16\x02\x03\t0'\x03\t\x0E=\x03\b \x0E\x03\b>\x03\x03\x074>\x03\x06&?\x03\x06\x19\t\x03\x06?(\x03\n-\x0E\x03\t:3\x03\t8:\x03\t\x12\v\x03\t\x1D\x17\x03\b7\x05\x03\b2\x14\x03\b\x06%\x03\b\x13\x1F\x03\x06\x06\x0E\x03\n\"<\x03\t/<\x03\x06>+\x03\n'?\x03\n\x13\f\x03\t\x10<\x03\x07\x1B=\x03\n\x19\x13\x03\t\"\x1D\x03\t\x07\r\x03\b)\x1C\x03\x06=\x1A\x03\n/4\x03\n7\x11\x03\n\x16:\x03\t?3\x03\t:/\x03\t\x05\n\x03\t\x14\x06\x03\b7\"\x03\b0\x07\x03\b\x1A\x1F\x03\x07\x04(\x03\x07\x04\t\x03\x06 %\x03\x06<\b\x03\n+\x14\x03\t\x1D\x16\x03\n70\x03\b >\x03\b57\x03\x070\n\x03\x06=\x12\x03\x06\x16%\x03\x06\x1D,\x03\t9#\x03\t\x10>\x03\x07 \x1E\x03\b\f<\x03\b\v\x18\x03\b\x15+\x03\b,:\x03\b%\"\x03\x07\n$\x03\v\x1C=\x03\x07+\b\x03\n/\x05\x03\n \x07\x03\n\x12'\x03\t#\x11\x03\b\x1B\x15\x03\n\x06\x01\x03\t\x1C\x1B\x03\t22\x03\x07\x14<\x03\x07\t\x04\x03\x061\x04\x03\x07\x0E\x01\x03\n\x13\x18\x03\n-\f\x03\n?\r\x03\n\t\n\x03\t1&\x03\n/\v\x03\b$<\x03\b3\x1D\x03\b\f$\x03\b\r\x07\x03\b\r?\x03\b\x0E\x14\x03\x065\n\x03\b\x1A#\x03\b\x16#\x03\x0702\x03\x07\x03\x1A\x03\x06(\x1D\x03\x06+\x1B\x03\x06\v\x05\x03\x06\v\x17\x03\x06\f\x04\x03\x06\x1E\x19\x03\x06+0\x03\x062\x18\x03\v\x16\x1E\x03\n+\x16\x03\n-?\x03\n#:\x03\n#\x10\x03\n%$\x03\n>+\x03\n01\x03\n1\x10\x03\n\t9\x03\n\n\x12\x03\n\x19\x1F\x03\n\x19\x12\x03\t*)\x03\t-\x16\x03\t.1\x03\t.2\x03\t<\x0E\x03\t> \x03\t3\x12\x03\t\v\x01\x03\t\x1C2\x03\t\x11\x1C\x03\t\x15%\x03\b,&\x03\b!\"\x03\b9(\x03\b\v\x1A\x03\b\r2\x03\b\f\x04\x03\b\f\x06\x03\b\f\x1F\x03\b\f\f\x03\b\x0F\x1F\x03\b\x0F\x1D\x03\b\x00\x14\x03\b\x03\x14\x03\b\x06\x16\x03\b\x1E#\x03\b\x11\x11\x03\b\x10\x18\x03\b\x14(\x03\x07)\x1E\x03\x07.1\x03\x07 $\x03\x07 '\x03\x078\b\x03\x07\r0\x03\x07\x0F7\x03\x07\x05#\x03\x07\x05\x1A\x03\x07\x1A7\x03\x07\x1D-\x03\x07\x17\x10\x03\x06)\x1F\x03\x062\v\x03\x066\x16\x03\x06\t\x11\x03\t(\x1E\x03\x07!5\x03\v\x11\x16\x03\n/\x04\x03\n,\x1A\x03\v\x173\x03\n,1\x03\n/5\x03\n\"1\x03\n\"\r\x03\n?%\x03\n<,\x03\n?#\x03\n>\x19\x03\n\b&\x03\n\v\x0E\x03\n\f:\x03\n\f+\x03\n\x03\"\x03\n\x06)\x03\n\x11\x10\x03\n\x11\x1A\x03\n\x17-\x03\n\x14(\x03\t)\x1E\x03\t/\t\x03\t.\x00\x03\t,\x07\x03\t/*\x03\t-9\x03\t\"8\x03\t%\t\x03\t:\x12\x03\t;\x1D\x03\t?\x06\x03\t3%\x03\t6\x05\x03\t6\b\x03\t7\x02\x03\t\x07,\x03\t\x04,\x03\t\x1F\x16\x03\t\x11\x03\x03\t\x11\x12\x03\t\x168\x03\b*\x05\x03\b/2\x03\b4:\x03\b\"+\x03\b 0\x03\b&\n\x03\b;\x10\x03\b>$\x03\b>\x18\x03\b29\x03\b2:\x03\b1,\x03\b1<\x03\b1\x1C\x03\b7#\x03\b7*\x03\b\t'\x03\b\x00\x1D\x03\b\x05-\x03\b\x1F4\x03\b\x1D\x04\x03\b\x16\x0F\x03\x07*7\x03\x07'!\x03\x07%\x1B\x03\x077\f\x03\x07\f1\x03\x07\f.\x03\x07\x00\x06\x03\x07\x01\x02\x03\x07\x010\x03\x07\x06=\x03\x07\x01\x03\x03\x07\x01\x13\x03\x07\x06\x06\x03\x07\x05\n\x03\x07\x1F\t\x03\x07\x17:\x03\x06*1\x03\x06-\x1D\x03\x06\"3\x03\x062:\x03\x060$\x03\x066\x1E\x03\x064\x12\x03\x0645\x03\x06\v\x00\x03\x06\v7\x03\x06\x07\x1F\x03\x06\x15\x12\x03\f\x05\x0F\x03\v+\v\x03\v+-\x03\x06\x16\x1B\x03\x06\x15\x17\x03\x89\xCA\xEA\x03\x89\xCA\xE8\x03\f8\x10\x03\f8\x01\x03\f8\x0F\x03\r8%\x03\r8!\x03\f8-\x03\f8/\x03\f8+\x03\f87\x03\f85\x03\f9\t\x03\f9\r\x03\f9\x0F\x03\f9\v\x03\xCFu\f\x03\xCFu\x0F\x03\xCFu\x0E\x03\xCFu\t\x03\f9\x10\x03\r9\f\x03\xCF`;\x03\xCF`>\x03\xCF`9\x03\xCF`8\x03\xCF`7\x03\xCF`*\x03\xCF`-\x03\xCF`,\x03\r\x1B\x1A\x03\r\x1B&\x03\f=.\x03\f=%\x03\f>\x1E\x03\f>\x14\x03\f?\x06\x03\f?\v\x03\f?\f\x03\f?\r\x03\f?\x02\x03\f>\x0F\x03\f>\b\x03\f>\t\x03\f>,\x03\f>\f\x03\f?\x13\x03\f?\x16\x03\f?\x15\x03\f?\x1C\x03\f?\x1F\x03\f?\x1D\x03\f?\x1A\x03\f?\x17\x03\f?\b\x03\f?\t\x03\f?\x0E\x03\f?\x04\x03\f?\x05\x03\f\x03\f=2\x03\f=6\x03\f<\x07\x03\f<\x05\x03\x0E:!\x03\x0E:#\x03\x0E8\t\x03\x0E:&\x03\x0E8\v\x03\x0E:$\x03\x0E:,\x03\x0E8\x1A\x03\x0E8\x1E\x03\x0E:*\x03\x0E:7\x03\x0E:5\x03\x0E:;\x03\x0E:\x15\x03\x0E:<\x03\x0E:4\x03\x0E:'\x03\x0E:-\x03\x0E:%\x03\x0E:?\x03\x0E:=\x03\x0E:)\x03\x0E:/\x03\xCFs'\x03\r=\x0F\x03\r+*\x03\r99\x03\r9;\x03\r9?\x03\r)\r\x03\r(%\x02\x01\x18\x02\x01(\x02\x01\x1E\x03\x0F$!\x03\x0F87\x03\x0F4\x0E\x03\x0F5\x1D\x03\x06'\x03\x03\x0F\b\x18\x03\x0F\r\x1B\x03\x0E2=\x03\x0E;\b\x03\x0E:\v\x03\x0E\x06$\x03\x0E\r)\x03\x0E\x16\x1F\x03\x0E\x16\x1B\x03\r$\n\x03\x05,\x1D\x03\r. \x03\r.#\x03\f(/\x03\t%\x02\x03\r90\x03\r\x0E4\x03\r\r\x0F\x03\f#\x00\x03\f,\x1E\x03\f2\x0E\x03\f\x01\x17\x03\f\t:\x03\x0E\x173\x03\f\b\x03\x03\f\x11\x07\x03\f\x10\x18\x03\f\x1F\x1C\x03\f\x19\x0E\x03\f\x1A\x1F\x03\x0F0>\x03\v->\x03\v<+\x03\v8\x13\x03\v\x043\x03\v\x14\x03\x03\v\x16%\x03\r\"&\x03\v\x1A\x1A\x03\v\x1A\x04\x03\n%9\x03\n&2\x03\n&0\x03\n!\x1A\x03\n!7\x03\n5\x10\x03\n=4\x03\n?\x0E\x03\n>\x10\x03\n\x00 \x03\n\x0F:\x03\n\x0F9\x03\n\v\n\x03\n\x17%\x03\n\x1B-\x03\t-\x1A\x03\t,4\x03\t.,\x03\t)\t\x03\t6!\x03\t1\x1F\x03\t3\x16\x03\f+\x1F\x03\t8 \x03\t8=\x03\f(\x1A\x03\f(\x16\x03\t\n+\x03\t\x16\x12\x03\t\x13\x0E\x03\t\x153\x03\b)!\x03\t\x1A\x01\x03\t\x18\x01\x03\b%#\x03\b>\"\x03\b\x05%\x03\b\x02*\x03\b\x15;\x03\b\x1B7\x03\x0F\x07\x1D\x03\x0F\x04\x03\x03\x070\f\x03\x07;\v\x03\x07\b\x17\x03\x07\x12\x06\x03\x06/-\x03\x0671\x03\x065+\x03\x06>7\x03\x06\x049\x03\x05+\x1E\x03\x05,\x17\x03\x05 \x1D\x03\x05\"\x05\x03\x050\x1D"; + idnaValues = $toNativeArray($kindUint16, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 8, 8, 128, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 128, 128, 128, 128, 128, 128, 128, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 128, 128, 128, 128, 128, 128, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 10, 24, 24, 24, 24, 24, 24, 24, 26, 24, 57, 24, 24, 960, 24, 74, 24, 24, 105, 121, 138, 5, 24, 8, 170, 201, 217, 24, 233, 281, 329, 24, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 377, 8, 53, 77, 57357, 8, 57357, 8, 8, 57373, 8, 57405, 8, 57373, 8, 409, 409, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 441, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 101, 57373, 8, 57405, 8, 57373, 8, 473, 8, 125, 57357, 8, 57357, 8, 125, 57469, 8, 149, 173, 57405, 8, 8, 197, 221, 245, 57373, 8, 269, 293, 8, 317, 317, 57357, 8, 8, 8, 269, 341, 8, 365, 57357, 8, 57357, 8, 57357, 8, 389, 57469, 8, 413, 8, 8, 57357, 8, 389, 57597, 8, 437, 461, 57405, 8, 57373, 8, 485, 57357, 8, 8, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 489, 489, 489, 509, 533, 557, 581, 605, 629, 57373, 8, 57597, 8, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 57373, 8, 57405, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 653, 677, 701, 57357, 8, 725, 749, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 773, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 521, 57405, 8, 797, 553, 8, 8, 8, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 666, 698, 730, 762, 794, 826, 24, 24, 941, 857, 473, 873, 965, 24, 24, 24, 24, 24, 24, 24, 8, 24, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 989, 989, 13064, 1013, 889, 1037, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13248, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 57357, 8, 57357, 8, 1061, 8, 57357, 8, 64, 64, 930, 8, 8, 8, 962, 1085, 64, 64, 64, 64, 138, 978, 57685, 1109, 57645, 57661, 57645, 64, 989, 64, 1133, 1157, 8, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 1181, 1181, 64, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57359, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57541, 1205, 1229, 57533, 57589, 57597, 57501, 57525, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 1253, 57733, 57741, 8, 1277, 989, 24, 57469, 8, 57813, 57357, 8, 8, 1301, 1325, 1325, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 24, 13064, 13064, 13064, 13064, 13064, 13080, 13080, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 64, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 57373, 8, 57405, 8, 57373, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 64, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 2112, 2112, 2112, 2112, 2112, 2112, 24, 24, 2072, 24, 24, 2072, 24, 2072, 24, 24, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2072, 2880, 64, 2072, 2072, 2568, 2056, 3080, 3080, 3080, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2072, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 24, 2072, 2072, 2072, 2568, 2568, 13064, 3080, 3080, 3080, 2056, 1065, 1105, 1145, 1185, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 3080, 3080, 2072, 3080, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2112, 24, 13064, 13064, 13064, 13064, 13064, 13064, 2056, 2056, 13064, 13064, 24, 13064, 13064, 13064, 13064, 3080, 3080, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2568, 2568, 2568, 2056, 2056, 2568, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 2880, 3080, 13064, 2568, 2568, 2568, 3080, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 3080, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 3080, 2568, 2568, 2568, 2568, 2568, 3080, 3080, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2056, 2056, 2056, 13064, 13064, 13064, 64, 64, 2072, 64, 2568, 2056, 2568, 2568, 2568, 2568, 2056, 3080, 2568, 3080, 3080, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 12296, 12296, 12296, 12296, 15112, 12296, 12296, 8, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 1225, 1281, 1337, 1393, 1449, 1505, 1561, 1617, 8, 8, 13064, 13064, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 64, 64, 64, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 12296, 12296, 13064, 13064, 13064, 13064, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 15112, 8, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 64, 64, 64, 64, 1673, 1729, 64, 1785, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 24, 64, 64, 64, 13064, 13064, 12296, 64, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 1841, 64, 8, 1897, 64, 8, 8, 64, 64, 13064, 64, 12296, 12296, 12296, 13064, 13064, 64, 64, 64, 64, 13064, 13064, 64, 64, 13064, 13064, 15112, 64, 64, 64, 13064, 64, 64, 64, 64, 64, 64, 64, 1953, 2009, 2065, 8, 64, 2121, 64, 64, 64, 64, 64, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13064, 13064, 8, 8, 8, 13064, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 12296, 12296, 13064, 13064, 13064, 13064, 13064, 64, 13064, 13064, 12296, 64, 12296, 12296, 15112, 64, 64, 8, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 64, 64, 64, 64, 64, 64, 64, 8, 13064, 13064, 13064, 13064, 13064, 13064, 64, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 13064, 12296, 13064, 13064, 13064, 13064, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 15112, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 12296, 64, 64, 64, 64, 2177, 2233, 64, 8, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 8, 24, 24, 24, 24, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 8, 64, 8, 8, 8, 8, 8, 8, 64, 64, 64, 8, 8, 8, 64, 8, 8, 8, 8, 64, 64, 64, 8, 8, 64, 8, 64, 8, 8, 64, 64, 64, 8, 8, 64, 64, 64, 8, 8, 8, 64, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 12296, 12296, 13064, 12296, 12296, 12296, 12296, 64, 13064, 13064, 13064, 64, 13064, 13064, 13064, 15112, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 64, 8, 8, 8, 64, 64, 64, 64, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 64, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 24, 8, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 13064, 12296, 12296, 12296, 12296, 12296, 64, 13064, 12296, 12296, 64, 12296, 12296, 13064, 15112, 64, 64, 64, 64, 64, 64, 64, 12296, 12296, 64, 64, 64, 64, 64, 64, 64, 8, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 13064, 13064, 13064, 13064, 64, 12296, 12296, 12296, 64, 12296, 12296, 12296, 15112, 8, 24, 64, 64, 64, 64, 8, 8, 8, 12296, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 64, 64, 8, 8, 64, 8, 64, 64, 8, 64, 64, 64, 64, 64, 64, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 64, 8, 64, 8, 64, 64, 8, 8, 64, 8, 8, 8, 8, 13064, 8, 2345, 13064, 13064, 13064, 13064, 13064, 13064, 64, 13064, 13064, 8, 64, 64, 8, 8, 8, 2513, 8, 8, 8, 8, 64, 8, 8, 8, 8, 2569, 8, 8, 8, 8, 2625, 8, 8, 8, 8, 2681, 8, 8, 8, 8, 2737, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2793, 8, 8, 8, 64, 64, 64, 64, 13064, 13064, 2849, 13064, 2905, 2961, 3017, 3097, 3153, 13064, 13064, 13064, 13064, 13064, 12296, 13064, 3233, 13064, 13064, 15112, 24, 13064, 13064, 8, 8, 8, 8, 8, 13064, 13064, 13064, 13064, 13064, 13064, 3289, 13064, 13064, 13064, 13064, 64, 13064, 13064, 13064, 13064, 3345, 13064, 13064, 13064, 13064, 3401, 13064, 13064, 13064, 13064, 3457, 13064, 13064, 13064, 13064, 3513, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 3569, 13064, 13064, 13064, 64, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57, 3793, 3817, 8, 3833, 3849, 3865, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 8, 217, 3969, 3993, 617, 4009, 4025, 633, 57, 4041, 4065, 1437, 3817, 3833, 3849, 4089, 4113, 4137, 3889, 8, 3921, 3937, 4161, 217, 4185, 1461, 1461, 3993, 4009, 4025, 1437, 4209, 4233, 1485, 4249, 4273, 4297, 4321, 4345, 3905, 617, 4025, 4233, 4249, 4273, 4369, 4321, 4345, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4393, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4417, 4441, 4457, 4481, 4137, 4505, 4521, 4545, 4569, 4593, 4617, 4641, 1509, 4665, 4689, 57725, 4713, 4737, 4761, 4785, 4809, 4833, 4857, 4881, 4905, 4929, 4953, 4977, 5001, 1533, 5025, 5049, 5073, 5089, 5113, 5137, 5161, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 1557, 1589, 8, 8, 5185, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 64, 64, 57413, 57413, 57413, 57413, 57413, 57413, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 57413, 64, 57413, 64, 57413, 64, 57413, 8, 8, 8, 8, 8, 8, 8, 8, 57413, 57413, 57413, 57413, 57413, 57413, 57413, 57413, 8, 5209, 8, 5233, 8, 5257, 8, 5281, 8, 5305, 8, 5329, 8, 5353, 64, 64, 5377, 5425, 5473, 5521, 5569, 5617, 5665, 5713, 5377, 5425, 5473, 5521, 5569, 5617, 5665, 5713, 5761, 5809, 5857, 5905, 5953, 6001, 6049, 6097, 5761, 5809, 5857, 5905, 5953, 6001, 6049, 6097, 6145, 6193, 6241, 6289, 6337, 6385, 6433, 6481, 6145, 6193, 6241, 6289, 6337, 6385, 6433, 6481, 8, 8, 6529, 6577, 6617, 64, 8, 6657, 57413, 57413, 1613, 5209, 6577, 1638, 6705, 1670, 1702, 6730, 6777, 6825, 6865, 64, 8, 6905, 1733, 5233, 1757, 5257, 6825, 6954, 7002, 7050, 8, 8, 8, 7097, 64, 64, 8, 8, 57413, 57413, 1781, 5281, 64, 7122, 7170, 7218, 8, 8, 8, 7265, 8, 8, 8, 8, 57413, 57413, 1805, 5329, 57421, 7290, 978, 7338, 64, 64, 7353, 7401, 7441, 64, 8, 7481, 1829, 5305, 1301, 5353, 7401, 1854, 1886, 64, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 960, 3, 3, 832, 2880, 24, 57357, 24, 24, 24, 24, 24, 1918, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 64, 64, 64, 24, 64, 64, 832, 832, 832, 832, 832, 10, 24, 24, 24, 7529, 7585, 24, 7665, 7721, 24, 24, 24, 24, 7802, 24, 1950, 24, 24, 24, 24, 24, 24, 24, 24, 7826, 7850, 7874, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 7897, 24, 24, 24, 24, 24, 24, 24, 10, 960, 832, 832, 832, 960, 64, 64, 64, 64, 64, 832, 832, 832, 832, 832, 832, 8001, 3905, 64, 64, 8017, 8033, 8049, 8065, 8081, 8097, 8114, 1981, 8130, 8146, 8162, 3953, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8114, 2005, 8130, 8146, 8162, 64, 57, 3849, 217, 873, 4089, 585, 3921, 857, 3937, 3953, 3993, 473, 4009, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 24, 8177, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 2030, 2062, 4441, 2093, 24, 2126, 2158, 4113, 24, 2189, 3889, 585, 585, 585, 585, 8201, 3905, 3905, 857, 857, 24, 3953, 8225, 24, 24, 3993, 8249, 617, 617, 617, 24, 24, 8265, 2221, 8289, 24, 5073, 24, 8313, 24, 5073, 24, 3921, 8337, 3817, 4441, 24, 3849, 3849, 4505, 64, 3937, 217, 8361, 8385, 8409, 8433, 3905, 24, 2253, 8457, 4273, 4273, 8457, 2285, 24, 24, 24, 24, 3833, 3833, 3849, 3905, 601, 24, 24, 24, 24, 8, 24, 8481, 8529, 8577, 8633, 8681, 8729, 8777, 8825, 8873, 8921, 8969, 9017, 9065, 9113, 9161, 9209, 3905, 9249, 2309, 9273, 4233, 9297, 2341, 9321, 9361, 873, 9385, 2373, 857, 4441, 3833, 3937, 3905, 9249, 2405, 9273, 4233, 9297, 2437, 9321, 9361, 873, 9385, 2469, 857, 4441, 3833, 3937, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 9729, 9753, 9777, 9801, 9825, 9849, 9873, 9897, 9921, 9945, 9969, 2566, 2598, 2630, 2662, 2694, 2726, 2758, 2790, 2822, 9994, 10034, 10074, 10114, 10154, 10194, 10234, 10274, 10314, 10354, 10394, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 2854, 2886, 2918, 2950, 2982, 3014, 3046, 3078, 3110, 3142, 3174, 3206, 3238, 3270, 3302, 3334, 3366, 3398, 3430, 3462, 3494, 3526, 3558, 3590, 3622, 3654, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 8001, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 57357, 8, 10609, 3773, 10633, 8, 8, 57469, 8, 57373, 8, 57405, 8, 4065, 4737, 4041, 4417, 8, 57357, 8, 8, 57373, 8, 8, 8, 8, 8, 8, 601, 4233, 10657, 10681, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 24, 24, 24, 24, 24, 24, 57405, 8, 57373, 8, 13064, 13064, 13064, 57357, 8, 64, 64, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 9981, 10013, 10045, 10077, 10109, 10141, 10173, 10205, 10237, 10269, 10301, 10333, 10365, 10397, 10429, 10461, 10493, 10525, 10557, 10589, 10621, 10653, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 10, 24, 10705, 24, 24, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13064, 13064, 13064, 13064, 12312, 12312, 24, 24, 24, 24, 24, 24, 57637, 24, 10685, 10717, 10749, 24, 8, 24, 24, 24, 11069, 11101, 11133, 11165, 11197, 11229, 11229, 11229, 11261, 11261, 11261, 11261, 11293, 11293, 11293, 11325, 11357, 11357, 10877, 10877, 11357, 11357, 11389, 11389, 11357, 11357, 10877, 10877, 11357, 11357, 11325, 11325, 11421, 11421, 11453, 11453, 64, 11485, 11517, 11549, 11549, 11581, 11613, 11645, 11677, 11709, 11741, 11773, 11805, 11837, 11837, 11869, 11901, 11901, 11933, 11965, 11869, 11997, 12029, 11997, 11869, 12061, 12093, 12125, 12157, 12189, 11517, 11485, 12221, 12253, 12285, 12317, 12349, 12381, 12413, 12445, 12477, 12509, 12541, 64, 24, 24, 12573, 12605, 12637, 12669, 12701, 12733, 12765, 12797, 12829, 12861, 12637, 12893, 12925, 12957, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 64, 13986, 14034, 14082, 14130, 12989, 13021, 13053, 13085, 24, 24, 24, 24, 24, 24, 24, 24, 13117, 14177, 14201, 14225, 14249, 14273, 14297, 14321, 14345, 14369, 14393, 14417, 14441, 14465, 14489, 14513, 13149, 13181, 13213, 13245, 13277, 13277, 13309, 13341, 13373, 13405, 13437, 13469, 13501, 13533, 13565, 13597, 13629, 13661, 13693, 13725, 13757, 13789, 13821, 13853, 13885, 13917, 13949, 13981, 14537, 14593, 14013, 24, 14045, 14077, 14109, 14141, 14173, 14205, 14237, 14269, 14301, 14333, 14365, 14397, 14429, 14461, 14493, 14525, 14557, 14589, 14621, 14653, 14685, 14717, 14749, 14781, 14813, 14845, 14877, 14909, 14941, 14973, 15005, 15037, 15069, 15101, 15133, 15165, 15197, 15229, 4733, 15261, 15293, 15325, 15357, 15389, 15421, 15453, 9117, 15485, 15517, 14649, 14673, 14697, 14721, 14745, 14769, 14793, 14817, 14841, 14865, 14889, 14913, 14937, 14961, 14985, 15009, 15049, 15089, 15129, 15169, 15209, 15249, 15289, 15329, 15369, 15417, 15465, 15513, 15549, 15537, 15581, 15613, 15637, 15661, 15685, 15709, 15709, 15685, 15733, 1981, 15757, 15781, 15805, 15829, 15853, 15877, 15901, 15925, 15949, 15973, 15997, 16021, 16021, 16045, 16045, 16069, 16069, 16093, 16117, 16141, 16165, 16189, 16189, 16213, 16213, 16213, 16237, 16261, 16285, 16309, 16285, 16333, 16357, 16237, 16381, 16405, 16405, 16405, 64, 15561, 15665, 15769, 15873, 15953, 16057, 16137, 16217, 16345, 16449, 16529, 16609, 16689, 16793, 16897, 16977, 17057, 17113, 17193, 17297, 17401, 17457, 17585, 17737, 17865, 17945, 18073, 18201, 18305, 18385, 18465, 18545, 18649, 18777, 18881, 18961, 19041, 19121, 19177, 19233, 19289, 19345, 19425, 19505, 19633, 19713, 19817, 19945, 20025, 20081, 20137, 20265, 20369, 20497, 20577, 20705, 20761, 20841, 20921, 21001, 21081, 21161, 21265, 21345, 21401, 21481, 21561, 21641, 21745, 21825, 21905, 21985, 22113, 22217, 22273, 22401, 22457, 22561, 22665, 22745, 22825, 22905, 23009, 23065, 23145, 23249, 23305, 23433, 23513, 23553, 23593, 23633, 23673, 23713, 23753, 23793, 23833, 23873, 23913, 23961, 24009, 24057, 24105, 24153, 24201, 24249, 24297, 24345, 24393, 24441, 24489, 24537, 24585, 16429, 24633, 24657, 16461, 24681, 24705, 24729, 16493, 16493, 24753, 24777, 24833, 24889, 24945, 25001, 25105, 25129, 16525, 25153, 25177, 25201, 25225, 25249, 16557, 25273, 25313, 25337, 16589, 16589, 25361, 25385, 25409, 16621, 16653, 16685, 16717, 16749, 25433, 25457, 25481, 25505, 25529, 16781, 25553, 25577, 25601, 16813, 16845, 25625, 16877, 16909, 16941, 25649, 16973, 25673, 25721, 25105, 17005, 17037, 17069, 17101, 25777, 25841, 25913, 25937, 17133, 25961, 25985, 26009, 17165, 26033, 26057, 26033, 26081, 26105, 17197, 26129, 26153, 26129, 17229, 17261, 64, 26177, 26201, 26225, 26249, 64, 26305, 26329, 26353, 26377, 26401, 26425, 25601, 26449, 26473, 26497, 17293, 26521, 25225, 17325, 17357, 26545, 64, 17389, 26569, 26593, 26617, 26641, 26665, 26713, 26761, 26801, 26841, 26881, 26921, 26961, 27001, 27041, 27081, 27121, 27169, 27217, 27265, 27313, 27361, 27409, 27457, 27505, 27553, 27601, 27649, 27697, 27745, 27793, 27841, 27889, 27937, 27985, 28033, 28081, 28129, 17421, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 13064, 13080, 13080, 13080, 24, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 24, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 3745, 28177, 13064, 13064, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57597, 8, 8, 8, 8, 8, 8, 8, 8, 57373, 8, 57405, 8, 17453, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 24, 24, 57405, 8, 4569, 8, 8, 57357, 8, 57357, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 28201, 4137, 4545, 28225, 4641, 64, 28249, 28273, 4665, 17485, 57357, 8, 57357, 8, 64, 64, 64, 64, 64, 64, 64, 64, 25813, 25845, 25877, 25909, 25941, 25973, 26005, 26037, 26069, 26101, 26133, 26165, 26197, 26229, 8, 8, 26261, 8, 26293, 8, 8, 26325, 26357, 26389, 26421, 26453, 26485, 26517, 26549, 26581, 26613, 8, 26645, 8, 26677, 8, 8, 26709, 26741, 8, 8, 8, 26773, 26805, 26837, 26869, 26901, 26933, 26965, 26997, 27029, 27061, 27093, 27125, 27157, 27189, 27221, 27253, 27285, 27317, 27349, 27381, 27413, 27445, 31381, 31413, 31445, 31477, 31509, 31541, 31573, 31605, 31637, 31669, 31701, 31733, 31765, 31797, 31829, 28361, 28401, 28441, 31861, 31893, 31925, 28481, 28521, 28561, 31957, 31989, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 28601, 28625, 28649, 32021, 32053, 28673, 28673, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 28697, 28737, 28777, 28817, 28857, 64, 64, 64, 64, 64, 28897, 13064, 28937, 28977, 8361, 8433, 29001, 29025, 29049, 29073, 29097, 29121, 8114, 29145, 29185, 29225, 29281, 29337, 29377, 29417, 29457, 29497, 29537, 29577, 29617, 29657, 64, 29697, 29737, 29777, 29817, 29857, 64, 29897, 64, 29937, 29977, 64, 30017, 30057, 64, 30097, 30137, 30177, 30217, 30257, 30297, 30337, 30377, 30417, 30457, 30497, 30497, 30521, 30521, 30521, 30521, 30545, 30545, 30545, 30545, 30569, 30569, 30569, 30569, 30593, 30593, 30593, 30593, 30617, 30617, 30617, 30617, 30641, 30641, 30641, 30641, 30665, 30665, 30665, 30665, 30689, 30689, 30689, 30689, 30713, 30713, 30713, 30713, 30737, 30737, 30737, 30737, 30761, 30761, 30761, 30761, 30785, 30785, 30785, 30785, 30809, 30809, 30833, 30833, 30857, 30857, 30881, 30881, 30905, 30905, 30929, 30929, 30953, 30953, 30953, 30953, 30977, 30977, 30977, 30977, 31001, 31001, 31001, 31001, 31025, 31025, 31025, 31025, 31049, 31049, 31073, 31073, 31073, 31073, 31097, 31097, 31121, 31121, 31121, 31121, 31145, 31145, 31145, 31145, 31169, 31169, 31193, 31193, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 31217, 31217, 31217, 31217, 31241, 31241, 31265, 31265, 31289, 31289, 1145, 31313, 31313, 31337, 31337, 31361, 31361, 31385, 31385, 31385, 31385, 31409, 31409, 31433, 31433, 31473, 31473, 31513, 31513, 31553, 31553, 31593, 31593, 31633, 31633, 31673, 31673, 31673, 31713, 31713, 31713, 31753, 31753, 31753, 31753, 34297, 34337, 34377, 34417, 34457, 34497, 34537, 34577, 34617, 34657, 34697, 34737, 34777, 34817, 34857, 34897, 34937, 34977, 35017, 35057, 35097, 35137, 35177, 35217, 35257, 35297, 35337, 35377, 35417, 35457, 35498, 35546, 35594, 35642, 35690, 35738, 35785, 35825, 31857, 35865, 31713, 31897, 35905, 35945, 32057, 35985, 32097, 32137, 36025, 36065, 32297, 36105, 32337, 32377, 36145, 36185, 32457, 36225, 32497, 32537, 33697, 33737, 33857, 33897, 33937, 34097, 34137, 34177, 34217, 34377, 34417, 34457, 36265, 34617, 36305, 36345, 34857, 36385, 34897, 34937, 35457, 36425, 36465, 35257, 36505, 35297, 35337, 31777, 31817, 36545, 31857, 36585, 31937, 31977, 32017, 32057, 36625, 32177, 32217, 32257, 32297, 36665, 32457, 32577, 32617, 32657, 32697, 32737, 32817, 32857, 32897, 32937, 32977, 33017, 36705, 33057, 33097, 33137, 33177, 33217, 33257, 33337, 33377, 33417, 33457, 33497, 33537, 33577, 33617, 33657, 33777, 33817, 33977, 34017, 34057, 34097, 34137, 34257, 34297, 34337, 34377, 36745, 34497, 34537, 34577, 34617, 34737, 34777, 34817, 34857, 36785, 34977, 35017, 36825, 35137, 35177, 35217, 35257, 36865, 31857, 36585, 32057, 36625, 32297, 36665, 32457, 36905, 32977, 36945, 36985, 37025, 34097, 34137, 34377, 34857, 36785, 35257, 36865, 37065, 37121, 37177, 37233, 37273, 37313, 37353, 37393, 37433, 37473, 37513, 37553, 37593, 37633, 37673, 37713, 37753, 37793, 37833, 37873, 37913, 37953, 37993, 38033, 38073, 38113, 36985, 38153, 38193, 38233, 38273, 37233, 37273, 37313, 37353, 37393, 37433, 37473, 37513, 37553, 37593, 37633, 37673, 37713, 37753, 37793, 37833, 37873, 37913, 37953, 37993, 38033, 38073, 38113, 36985, 38153, 38193, 38233, 38273, 38033, 38073, 38113, 36985, 36945, 37025, 33297, 32857, 32897, 32937, 38033, 38073, 38113, 33297, 33337, 38313, 38313, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 38353, 38409, 38409, 38465, 38521, 38577, 38633, 38689, 38745, 38745, 38801, 38857, 38913, 38969, 39025, 39081, 39081, 39137, 39193, 39193, 39249, 39249, 39305, 39361, 39361, 39417, 39473, 39473, 39529, 39529, 39585, 39641, 39641, 39697, 39697, 39753, 39809, 39865, 39921, 39921, 39977, 40033, 40089, 40145, 40201, 40201, 40257, 40313, 43337, 43393, 43449, 43169, 39865, 39305, 43505, 43561, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 43617, 43673, 43729, 43801, 43873, 43945, 44017, 44089, 44161, 44233, 44290, 44562, 44689, 24, 64, 64, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 44762, 32085, 64, 44778, 962, 44794, 44810, 32117, 32149, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 64, 32181, 32213, 44826, 44826, 8146, 8162, 44842, 44858, 32245, 32277, 32309, 32245, 32341, 32373, 32341, 32405, 32437, 32469, 32437, 32501, 24, 24, 44874, 44890, 32534, 32566, 32598, 32630, 44826, 44826, 44826, 44762, 32661, 64, 64, 962, 44778, 44810, 44794, 32693, 8146, 8162, 44842, 44858, 32405, 32501, 44906, 44922, 44938, 8114, 44953, 44970, 44986, 8130, 64, 45002, 45018, 45034, 45050, 64, 64, 64, 64, 32726, 45065, 32758, 2056, 32790, 64, 32822, 45105, 32854, 45145, 32886, 45185, 32918, 45225, 32950, 45265, 45305, 45329, 45329, 45353, 45353, 45377, 45377, 45401, 45401, 45425, 45425, 45425, 45425, 45449, 45449, 45473, 45473, 45473, 45473, 45497, 45497, 45521, 45521, 45521, 45521, 45545, 45545, 45545, 45545, 45569, 45569, 45569, 45569, 45593, 45593, 45593, 45593, 45617, 45617, 45617, 45617, 45641, 45641, 45665, 45665, 45689, 45689, 45713, 45713, 45737, 45737, 45737, 45737, 45761, 45761, 45761, 45761, 45785, 45785, 45785, 45785, 45809, 45809, 45809, 45809, 45833, 45833, 45833, 45833, 45857, 45857, 45857, 45857, 45881, 45881, 45881, 45881, 45905, 45905, 45905, 45905, 45929, 45929, 45929, 45929, 45953, 45953, 45953, 45953, 45977, 45977, 45977, 45977, 46001, 46001, 46001, 46001, 46025, 46025, 46025, 46025, 46049, 46049, 46049, 46049, 46073, 46073, 46073, 46073, 46097, 46097, 31409, 31409, 46121, 46121, 46121, 46121, 46145, 46145, 46185, 46185, 46225, 46225, 46265, 46265, 64, 64, 960, 64, 44794, 46306, 44906, 45018, 45034, 44922, 46322, 8146, 8162, 44938, 8114, 44762, 44953, 10705, 46338, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 44778, 962, 44970, 8130, 44986, 44810, 45050, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 44874, 45002, 44890, 46354, 44826, 7338, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 44842, 46370, 44858, 46386, 32981, 33013, 10705, 33045, 33045, 33077, 33109, 33141, 33173, 33205, 33237, 33269, 33301, 33333, 33365, 33397, 33429, 33461, 33493, 33525, 33557, 33589, 33621, 33653, 33685, 33717, 33749, 33781, 33813, 33205, 33845, 33877, 33301, 33909, 33941, 33973, 34005, 34037, 34069, 34101, 34133, 34005, 34165, 34005, 34197, 34197, 34229, 34229, 34261, 34069, 34293, 34325, 34293, 34357, 34325, 34389, 34389, 34421, 34421, 34453, 34453, 34325, 33045, 34485, 34517, 64, 34549, 34581, 34613, 34645, 34613, 34677, 34709, 34741, 34741, 34773, 34773, 34805, 34805, 34773, 34773, 34837, 34869, 34901, 34933, 34965, 34997, 34997, 34997, 35029, 35029, 35029, 35029, 34741, 34741, 34741, 64, 64, 64, 34581, 34549, 35061, 34549, 34581, 34549, 64, 64, 35093, 34581, 35125, 35061, 35125, 34581, 64, 64, 35157, 35189, 34933, 35125, 35061, 35125, 64, 64, 35221, 35253, 35221, 64, 64, 64, 46401, 46425, 46449, 35286, 46473, 46497, 35317, 64, 35349, 35381, 35413, 35381, 35445, 35477, 35509, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 832, 832, 832, 64, 64, 64, 64, 2568, 2568, 2568, 2568, 2568, 3080, 2056, 3080, 2072, 3080, 3080, 2056, 2056, 2312, 3080, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 2312, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 2568, 3080, 2056, 2056, 3080, 13064, 13064, 64, 64, 64, 64, 2584, 2584, 2584, 2584, 3096, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 2568, 3080, 2568, 3080, 3080, 3080, 2568, 2568, 2568, 3080, 2568, 2568, 3080, 2568, 3080, 3080, 2568, 3080, 64, 64, 64, 64, 64, 64, 64, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 3096, 3096, 3096, 3096, 2584, 2584, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 12296, 13064, 12296, 12296, 12296, 12296, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 14344, 64, 64, 8, 64, 64, 64, 64, 64, 64, 12296, 64, 64, 64, 64, 64, 8, 8, 8, 8, 8, 12296, 12296, 64, 64, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 64, 64, 64, 13064, 13064, 13064, 13064, 13064, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 64, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 64, 4441, 3833, 64, 64, 3889, 64, 64, 601, 3921, 64, 64, 3953, 217, 3993, 8249, 64, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 64, 4505, 64, 585, 3905, 601, 3921, 857, 3937, 3953, 64, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 64, 3833, 3849, 4505, 3889, 64, 64, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 64, 473, 4009, 4025, 4233, 633, 873, 649, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 64, 3833, 3849, 4505, 3889, 64, 3905, 601, 3921, 857, 3937, 64, 217, 64, 64, 64, 473, 4009, 4025, 4233, 633, 873, 649, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 47745, 47769, 64, 64, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 5161, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48129, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 48033, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48161, 47817, 5161, 47889, 4321, 4369, 8457, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 5161, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48129, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 48033, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48161, 47817, 5161, 47889, 4321, 4369, 8457, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 5161, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48129, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 48033, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48161, 47817, 5161, 47889, 4321, 4369, 8457, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 5161, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48129, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 48033, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48161, 47817, 5161, 47889, 4321, 4369, 8457, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 5161, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48129, 47793, 4249, 4273, 4297, 47817, 47841, 47865, 5161, 6705, 47889, 47913, 47937, 47961, 47985, 48009, 8457, 4369, 48033, 48033, 48057, 48081, 4321, 4345, 48105, 8313, 48161, 47817, 5161, 47889, 4321, 4369, 8457, 48193, 48193, 64, 64, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 57621, 57621, 57653, 57653, 57621, 57621, 57717, 57717, 57621, 57621, 57653, 57653, 57621, 57621, 57845, 57845, 57621, 57621, 57653, 57653, 57621, 57621, 57717, 57717, 57621, 57621, 57653, 57653, 57621, 57621, 35589, 35589, 1205, 1205, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 45449, 45473, 45569, 45641, 64, 46097, 45713, 45593, 45833, 46121, 45977, 46001, 46025, 46049, 45737, 45881, 45929, 45785, 45953, 45689, 45761, 45521, 45545, 45617, 45665, 45809, 45857, 45905, 48217, 31049, 48241, 48265, 64, 45473, 45569, 64, 46073, 64, 64, 45593, 64, 46121, 45977, 46001, 46025, 46049, 45737, 45881, 45929, 45785, 45953, 64, 45761, 45521, 45545, 45617, 64, 45809, 64, 45905, 64, 64, 64, 64, 64, 64, 45569, 64, 64, 64, 64, 45593, 64, 46121, 64, 46001, 64, 46049, 45737, 45881, 64, 45785, 45953, 64, 45761, 64, 64, 45617, 64, 45809, 64, 45905, 64, 31049, 64, 48265, 64, 45473, 45569, 64, 46073, 64, 64, 45593, 45833, 46121, 45977, 64, 46025, 46049, 45737, 45881, 45929, 45785, 45953, 64, 45761, 45521, 45545, 45617, 64, 45809, 45857, 45905, 48217, 64, 48241, 64, 45449, 45473, 45569, 45641, 46073, 46097, 45713, 45593, 45833, 46121, 64, 46001, 46025, 46049, 45737, 45881, 45929, 45785, 45953, 45689, 45761, 45521, 45545, 45617, 45665, 45809, 45857, 45905, 64, 64, 64, 64, 64, 45473, 45569, 45641, 64, 46097, 45713, 45593, 45833, 46121, 64, 46001, 46025, 46049, 45737, 45881, 45929, 45785, 45953, 45689, 45761, 45521, 45545, 45617, 45665, 45809, 45857, 45905, 64, 64, 64, 64, 64, 48290, 48314, 48338, 48362, 48386, 48410, 48434, 48458, 48482, 48506, 24, 24, 64, 64, 64, 48530, 48562, 48594, 48626, 48658, 48690, 48722, 48754, 48786, 48818, 48850, 48882, 48914, 48946, 48978, 49010, 49042, 49074, 49106, 49138, 49170, 49202, 49234, 49266, 49298, 49330, 49361, 4441, 617, 26225, 49425, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 49449, 26033, 49473, 5185, 49497, 49529, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 49553, 49577, 64, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 49625, 49681, 49737, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 49769, 49801, 49833, 49865, 49897, 49929, 49961, 49993, 50025, 50057, 50089, 50121, 50153, 50185, 50217, 50249, 50281, 50313, 50345, 50377, 50409, 50441, 50473, 50505, 50537, 50569, 50601, 50633, 50665, 50697, 50729, 50761, 50793, 50825, 50857, 50889, 50921, 50953, 50985, 51017, 51049, 51081, 51113, 51145, 64, 64, 64, 64, 51961, 51993, 52025, 35613, 52057, 52089, 52121, 52153, 52185, 52217, 52249, 52281, 52313, 35645, 52345, 52377, 52409, 52441, 35677, 52473, 52505, 50217, 35709, 52537, 52569, 52601, 52633, 52665, 35741, 52697, 52729, 52761, 52793, 52825, 51081, 52857, 52889, 52921, 52953, 52985, 53017, 53049, 53081, 53113, 53145, 53177, 53209, 53241, 53273, 53305, 53305, 53305, 35773, 53337, 53369, 53401, 35805, 53433, 53465, 53497, 53529, 53561, 53593, 53625, 53657, 53689, 53721, 53753, 53785, 53817, 53817, 53849, 53881, 53913, 53945, 53977, 54009, 54041, 54073, 54105, 54137, 54169, 54201, 54233, 54265, 54297, 54329, 54361, 54393, 35837, 54425, 54457, 54489, 49929, 54521, 54553, 35869, 35901, 54585, 54617, 54649, 54681, 54713, 54745, 8256, 54777, 54809, 54809, 35933, 54841, 54873, 54905, 54937, 35965, 54969, 55001, 8256, 55033, 55065, 55097, 55129, 55161, 55193, 35997, 55225, 36029, 55257, 55289, 55321, 55353, 55385, 55417, 55449, 55481, 55513, 55545, 55577, 36061, 55609, 55641, 55673, 55705, 55737, 36093, 55769, 36125, 36157, 55801, 55833, 55833, 55865, 36189, 36221, 55897, 55929, 55961, 55993, 56025, 56057, 56089, 56121, 56153, 56185, 56217, 36253, 56249, 56281, 56313, 56345, 56313, 56377, 56409, 56441, 56473, 56505, 56537, 56569, 56601, 56633, 56665, 56697, 56729, 56761, 56793, 36285, 56825, 56857, 56889, 56921, 56953, 36317, 56985, 58777, 58809, 58841, 58873, 58905, 58937, 36605, 58969, 59001, 59033, 59065, 59097, 59129, 36637, 59161, 59193, 36669, 36701, 59225, 59257, 59289, 59321, 59353, 59385, 59417, 59449, 59481, 36733, 59513, 36765, 59545, 8256, 59577, 59609, 59641, 36797, 59673, 59705, 36829, 36861, 59737, 59769, 59801, 59833, 59865, 59865, 59897, 59929, 59961, 59993, 60025, 60057, 60089, 36893, 60121, 36925, 60153, 36957, 60185, 36989, 37021, 37053, 60217, 60249, 60281, 37085, 37117, 37149, 37181, 60313, 60345, 60345, 60377, 60409, 60441, 60473, 60505, 37213, 60537, 60569, 60601, 60633, 37245, 60665, 37277, 37309, 60697, 60729, 60761, 60793, 60825, 60857, 37341, 37373, 37405, 8256, 60889, 37437, 60921, 60953, 60985, 37469, 61017, 61049, 61081, 61113, 61145, 37501, 61177, 61209, 61241, 61273, 61305, 61337, 37533, 37565, 61369, 37597, 61401, 37629, 61433, 61465, 61497, 37661, 37693, 61529, 37725, 61561, 63161, 63193, 63225, 63257, 63289, 38173, 63321, 63353, 63385, 63417, 63449, 38205, 38237, 63481, 63513, 63545, 63577, 63609, 63641, 38269, 63673, 63705, 63737, 63769, 38301, 38333, 63801, 63833, 63865, 38365, 63897, 63929, 26645, 38397, 63961, 63993, 64025, 38429, 64057, 64089, 64121, 64153, 64185, 64217, 64249, 38461, 64281, 64313, 64345, 38493, 64377, 64409, 64441, 64473, 31541, 38525, 64505, 64537, 64569, 38557, 64601, 38589, 64633, 64633, 64665, 38621, 64697, 64729, 64761, 64793, 64825, 64857, 64889, 38653, 64921, 64953, 64985, 65017, 65049, 65081, 38685, 65113, 38717, 38749, 38781, 65145, 65177, 65209, 65241, 65273, 65305, 65337, 65369, 38813, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]); + idnaIndex = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 125, 2, 3, 4, 5, 6, 126, 127, 7, 128, 8, 9, 10, 129, 11, 12, 13, 14, 130, 131, 132, 15, 16, 133, 17, 18, 134, 135, 136, 2, 3, 4, 5, 6, 7, 7, 7, 7, 8, 9, 7, 7, 10, 11, 12, 29, 30, 30, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 19, 138, 139, 140, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 141, 142, 30, 31, 32, 143, 33, 144, 145, 146, 147, 34, 148, 149, 35, 36, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 159, 159, 159, 159, 159, 159, 159, 159, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 37, 38, 39, 195, 40, 40, 41, 40, 196, 42, 43, 44, 45, 46, 47, 197, 48, 49, 198, 155, 199, 200, 155, 155, 201, 155, 155, 155, 202, 50, 51, 52, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 203, 204, 155, 205, 155, 206, 207, 208, 209, 53, 40, 54, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 55, 56, 221, 222, 223, 224, 57, 58, 225, 226, 59, 60, 61, 62, 63, 64, 65, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 178, 155, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 227, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 228, 229, 159, 159, 159, 159, 230, 66, 67, 231, 68, 69, 70, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 249, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 251, 252, 253, 254, 71, 255, 256, 72, 73, 74, 75, 76, 257, 77, 78, 79, 80, 81, 258, 82, 83, 84, 85, 86, 87, 88, 89, 90, 259, 260, 159, 261, 262, 155, 263, 264, 186, 186, 265, 266, 267, 268, 269, 270, 271, 159, 272, 273, 274, 275, 186, 186, 159, 159, 159, 159, 276, 277, 186, 186, 278, 279, 280, 281, 282, 186, 283, 284, 285, 286, 287, 91, 288, 289, 92, 186, 290, 291, 292, 293, 186, 186, 186, 186, 186, 294, 186, 186, 186, 186, 186, 186, 295, 296, 297, 298, 299, 300, 301, 302, 303, 186, 304, 305, 93, 94, 186, 186, 306, 307, 308, 309, 186, 186, 310, 311, 312, 313, 314, 315, 316, 186, 186, 186, 186, 186, 317, 318, 186, 186, 186, 186, 319, 320, 321, 322, 186, 186, 186, 186, 323, 324, 325, 186, 326, 327, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 328, 186, 155, 329, 159, 159, 159, 330, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 331, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 159, 159, 159, 159, 159, 332, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 159, 159, 159, 159, 322, 333, 186, 334, 335, 336, 337, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 338, 339, 340, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 341, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 342, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 343, 344, 159, 159, 159, 159, 159, 345, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 346, 347, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 155, 155, 155, 348, 349, 350, 351, 352, 155, 353, 186, 186, 155, 354, 186, 186, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 155, 155, 155, 155, 155, 155, 155, 155, 355, 356, 357, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 358, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 290, 290, 290, 359, 111, 360, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 112, 113, 114, 361, 186, 186, 186, 186, 362, 155, 363, 364, 115, 116, 365, 366, 117, 367, 186, 186, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 368, 155, 369, 155, 370, 371, 372, 373, 186, 374, 375, 376, 377, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 378, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 379, 159, 159, 159, 380, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 381, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 382, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 118, 119, 120, 383, 121, 122, 384, 123, 124, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 11, 18, 7, 19, 11, 11, 20, 11, 21, 22, 23, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 24, 25, 26, 7, 27, 28, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 385, 386, 186, 186, 387, 387, 387, 388, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + idnaSparseOffset = new sliceType([0, 8, 25, 37, 39, 44, 52, 63, 75, 79, 94, 99, 107, 119, 133, 138, 147, 163, 177, 189, 201, 218, 228, 235, 248, 265, 272, 283, 298, 312, 322, 324, 329, 332, 335, 337, 349, 360, 368, 374, 380, 385, 390, 393, 397, 403, 408, 420, 430, 436, 453, 463, 466, 474, 477, 490, 498, 502, 509, 517, 533, 545, 547, 557, 569, 581, 593, 601, 606, 616, 633, 637, 648, 652, 661, 669, 675, 680, 683, 687, 693, 697, 701, 707, 714, 720, 728, 735, 746, 756, 760, 763, 769, 773, 775, 778, 780, 783, 793, 796, 811, 815, 820, 823, 827, 832, 837, 843, 849, 864, 870, 874, 889, 894, 902, 912, 923, 931, 948, 957, 973, 986, 996, 1001, 1014, 1018, 1023, 1025, 1029, 1031, 1035, 1044, 1050, 1054, 1070, 1080, 1085, 1088, 1094, 1101, 1106, 1110, 1116, 1121, 1130, 1135, 1141, 1148, 1155, 1162, 1166, 1171, 1174, 1179, 1191, 1197, 1202, 1209, 1217, 1222, 1226, 1242, 1249, 1253, 1257, 1264, 1266, 1269, 1272, 1276, 1280, 1286, 1295, 1307, 1314, 1323, 1331, 1338, 1352, 1365, 1378, 1387, 1391, 1405, 1413, 1424, 1433, 1439, 1447, 1456, 1466, 1469, 1481, 1484, 1489, 1502, 1511, 1523, 1526, 1536, 1545, 1557, 1570, 1578, 1581, 1586, 1589, 1592, 1595, 1602, 1609, 1613, 1624, 1627, 1633, 1638, 1642, 1645, 1648, 1651, 1654, 1657, 1662, 1672, 1675, 1679, 1694, 1706, 1710, 1715, 1720, 1724, 1729, 1738, 1749, 1755, 1763, 1767, 1771, 1777, 1783, 1788, 1791, 1807, 1814, 1817, 1820, 1824, 1830, 1835, 1840, 1845, 1848, 1853, 1856, 1859, 1863, 1867, 1870, 1886, 1903, 1908, 1910, 1912]); + idnaSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(0, 7, 0), new valueRange.ptr(57605, 128, 150), new valueRange.ptr(24, 151, 151), new valueRange.ptr(57605, 152, 158), new valueRange.ptr(31, 159, 159), new valueRange.ptr(8, 160, 182), new valueRange.ptr(24, 183, 183), new valueRange.ptr(8, 184, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(57373, 129, 129), new valueRange.ptr(8, 130, 130), new valueRange.ptr(821, 131, 131), new valueRange.ptr(845, 132, 132), new valueRange.ptr(869, 133, 133), new valueRange.ptr(57357, 134, 134), new valueRange.ptr(8, 135, 135), new valueRange.ptr(57357, 136, 136), new valueRange.ptr(8, 137, 137), new valueRange.ptr(57357, 138, 138), new valueRange.ptr(8, 139, 139), new valueRange.ptr(57357, 140, 140), new valueRange.ptr(8, 141, 141), new valueRange.ptr(57357, 142, 142), new valueRange.ptr(8, 143, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(585, 176, 176), new valueRange.ptr(893, 177, 177), new valueRange.ptr(601, 178, 178), new valueRange.ptr(617, 179, 179), new valueRange.ptr(845, 180, 180), new valueRange.ptr(917, 181, 181), new valueRange.ptr(57789, 182, 182), new valueRange.ptr(633, 183, 183), new valueRange.ptr(649, 184, 184), new valueRange.ptr(8, 185, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(13064, 128, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(1013, 128, 143), new valueRange.ptr(57605, 144, 159), new valueRange.ptr(1181, 160, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(57733, 128, 143), new valueRange.ptr(1349, 144, 150), new valueRange.ptr(64, 151, 152), new valueRange.ptr(8, 153, 153), new valueRange.ptr(24, 154, 159), new valueRange.ptr(64, 160, 160), new valueRange.ptr(8, 161, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(1025, 135, 135), new valueRange.ptr(64, 136, 136), new valueRange.ptr(24, 137, 138), new valueRange.ptr(64, 139, 140), new valueRange.ptr(24, 141, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(13064, 145, 189), new valueRange.ptr(2072, 190, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2072, 128, 128), new valueRange.ptr(13064, 129, 130), new valueRange.ptr(2072, 131, 131), new valueRange.ptr(13064, 132, 133), new valueRange.ptr(2072, 134, 134), new valueRange.ptr(13064, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(2056, 144, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(2056, 176, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2568, 128, 135), new valueRange.ptr(3080, 136, 153), new valueRange.ptr(2568, 154, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(13064, 128, 138), new valueRange.ptr(64, 139, 140), new valueRange.ptr(3080, 141, 141), new valueRange.ptr(2568, 142, 152), new valueRange.ptr(3080, 153, 155), new valueRange.ptr(2568, 156, 170), new valueRange.ptr(3080, 171, 172), new valueRange.ptr(2568, 173, 176), new valueRange.ptr(3080, 177, 177), new valueRange.ptr(2568, 178, 178), new valueRange.ptr(3080, 179, 180), new valueRange.ptr(2568, 181, 183), new valueRange.ptr(3080, 184, 185), new valueRange.ptr(2568, 186, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 165), new valueRange.ptr(13064, 166, 176), new valueRange.ptr(2056, 177, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2056, 128, 137), new valueRange.ptr(2568, 138, 170), new valueRange.ptr(13064, 171, 179), new valueRange.ptr(2056, 180, 181), new valueRange.ptr(24, 182, 185), new valueRange.ptr(2072, 186, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(13064, 150, 153), new valueRange.ptr(2056, 154, 154), new valueRange.ptr(13064, 155, 163), new valueRange.ptr(2056, 164, 164), new valueRange.ptr(13064, 165, 167), new valueRange.ptr(2056, 168, 168), new valueRange.ptr(13064, 169, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(2072, 176, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2568, 160, 169), new valueRange.ptr(3080, 170, 172), new valueRange.ptr(2056, 173, 173), new valueRange.ptr(3080, 174, 174), new valueRange.ptr(2568, 175, 176), new valueRange.ptr(3080, 177, 178), new valueRange.ptr(2568, 179, 180), new valueRange.ptr(64, 181, 181), new valueRange.ptr(2568, 182, 184), new valueRange.ptr(3080, 185, 185), new valueRange.ptr(2568, 186, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 147), new valueRange.ptr(13064, 148, 161), new valueRange.ptr(2112, 162, 162), new valueRange.ptr(13064, 163, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(8, 132, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 130), new valueRange.ptr(64, 131, 133), new valueRange.ptr(12296, 134, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(12296, 138, 140), new valueRange.ptr(15112, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(64, 145, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(64, 152, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(24, 176, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(8, 133, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 168), new valueRange.ptr(64, 169, 169), new valueRange.ptr(8, 170, 185), new valueRange.ptr(64, 186, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(13064, 190, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(8, 133, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 186), new valueRange.ptr(15112, 187, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(64, 128, 129), new valueRange.ptr(12296, 130, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(8, 133, 150), new valueRange.ptr(64, 151, 153), new valueRange.ptr(8, 154, 177), new valueRange.ptr(64, 178, 178), new valueRange.ptr(8, 179, 187), new valueRange.ptr(64, 188, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 137), new valueRange.ptr(15112, 138, 138), new valueRange.ptr(64, 139, 142), new valueRange.ptr(12296, 143, 145), new valueRange.ptr(13064, 146, 148), new valueRange.ptr(64, 149, 149), new valueRange.ptr(13064, 150, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(12296, 152, 159), new valueRange.ptr(64, 160, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(64, 176, 177), new valueRange.ptr(12296, 178, 179), new valueRange.ptr(24, 180, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 176), new valueRange.ptr(13064, 177, 177), new valueRange.ptr(8, 178, 178), new valueRange.ptr(2289, 179, 179), new valueRange.ptr(13064, 180, 185), new valueRange.ptr(15112, 186, 186), new valueRange.ptr(64, 187, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(13064, 135, 142), new valueRange.ptr(24, 143, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 155), new valueRange.ptr(64, 156, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 132), new valueRange.ptr(64, 133, 133), new valueRange.ptr(8, 134, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(13064, 136, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(2401, 156, 156), new valueRange.ptr(2457, 157, 157), new valueRange.ptr(8, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 138), new valueRange.ptr(8, 139, 139), new valueRange.ptr(57405, 140, 140), new valueRange.ptr(24, 141, 151), new valueRange.ptr(13064, 152, 153), new valueRange.ptr(24, 154, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(24, 170, 180), new valueRange.ptr(13064, 181, 181), new valueRange.ptr(24, 182, 182), new valueRange.ptr(13064, 183, 183), new valueRange.ptr(24, 184, 184), new valueRange.ptr(13064, 185, 185), new valueRange.ptr(24, 186, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(24, 135, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(24, 142, 154), new valueRange.ptr(64, 155, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(12296, 171, 172), new valueRange.ptr(13064, 173, 176), new valueRange.ptr(12296, 177, 177), new valueRange.ptr(13064, 178, 183), new valueRange.ptr(12296, 184, 184), new valueRange.ptr(15112, 185, 186), new valueRange.ptr(12296, 187, 188), new valueRange.ptr(13064, 189, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(24, 138, 143), new valueRange.ptr(8, 144, 149), new valueRange.ptr(12296, 150, 151), new valueRange.ptr(13064, 152, 153), new valueRange.ptr(8, 154, 157), new valueRange.ptr(13064, 158, 160), new valueRange.ptr(8, 161, 161), new valueRange.ptr(12296, 162, 164), new valueRange.ptr(8, 165, 166), new valueRange.ptr(12296, 167, 173), new valueRange.ptr(8, 174, 176), new valueRange.ptr(13064, 177, 180), new valueRange.ptr(8, 181, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(8, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(12296, 131, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(12296, 135, 140), new valueRange.ptr(13064, 141, 141), new valueRange.ptr(8, 142, 142), new valueRange.ptr(12296, 143, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(12296, 154, 156), new valueRange.ptr(13064, 157, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(64, 128, 134), new valueRange.ptr(1373, 135, 135), new valueRange.ptr(64, 136, 140), new valueRange.ptr(1373, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 186), new valueRange.ptr(24, 187, 187), new valueRange.ptr(57605, 188, 188), new valueRange.ptr(8, 189, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(24, 128, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 158), new valueRange.ptr(64, 159, 160), new valueRange.ptr(8216, 161, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 167), new valueRange.ptr(8216, 168, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8216, 128, 130), new valueRange.ptr(24, 131, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(8, 128, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 152), new valueRange.ptr(64, 153, 153), new valueRange.ptr(8, 154, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 176), new valueRange.ptr(64, 177, 177), new valueRange.ptr(8, 178, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(8, 184, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(64, 129, 129), new valueRange.ptr(8, 130, 133), new valueRange.ptr(64, 134, 135), new valueRange.ptr(8, 136, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(8, 152, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 154), new valueRange.ptr(64, 155, 156), new valueRange.ptr(13064, 157, 159), new valueRange.ptr(24, 160, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(24, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(57413, 184, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 128), new valueRange.ptr(8, 129, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 172), new valueRange.ptr(24, 173, 174), new valueRange.ptr(8, 175, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 154), new valueRange.ptr(24, 155, 156), new valueRange.ptr(64, 157, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(24, 171, 176), new valueRange.ptr(8, 177, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 145), new valueRange.ptr(13064, 146, 147), new valueRange.ptr(15112, 148, 148), new valueRange.ptr(64, 149, 159), new valueRange.ptr(8, 160, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(15112, 180, 180), new valueRange.ptr(24, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 145), new valueRange.ptr(13064, 146, 147), new valueRange.ptr(64, 148, 159), new valueRange.ptr(8, 160, 172), new valueRange.ptr(64, 173, 173), new valueRange.ptr(8, 174, 176), new valueRange.ptr(64, 177, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 179), new valueRange.ptr(13120, 180, 181), new valueRange.ptr(12296, 182, 182), new valueRange.ptr(13064, 183, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(12296, 128, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(12296, 135, 136), new valueRange.ptr(13064, 137, 145), new valueRange.ptr(15112, 146, 146), new valueRange.ptr(13064, 147, 147), new valueRange.ptr(24, 148, 150), new valueRange.ptr(8, 151, 151), new valueRange.ptr(24, 152, 155), new valueRange.ptr(8, 156, 156), new valueRange.ptr(13064, 157, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(24, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(24, 128, 133), new valueRange.ptr(64, 134, 134), new valueRange.ptr(536, 135, 135), new valueRange.ptr(24, 136, 138), new valueRange.ptr(13248, 139, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(520, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(520, 128, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(520, 135, 168), new valueRange.ptr(13064, 169, 169), new valueRange.ptr(520, 170, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(13064, 160, 162), new valueRange.ptr(12296, 163, 166), new valueRange.ptr(13064, 167, 168), new valueRange.ptr(12296, 169, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(12296, 176, 177), new valueRange.ptr(13064, 178, 178), new valueRange.ptr(12296, 179, 184), new valueRange.ptr(13064, 185, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(24, 128, 128), new valueRange.ptr(64, 129, 131), new valueRange.ptr(24, 132, 133), new valueRange.ptr(8, 134, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(40, 154, 154), new valueRange.ptr(64, 155, 157), new valueRange.ptr(24, 158, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(13064, 151, 152), new valueRange.ptr(12296, 153, 154), new valueRange.ptr(13064, 155, 155), new valueRange.ptr(64, 156, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(8, 128, 148), new valueRange.ptr(12296, 149, 149), new valueRange.ptr(13064, 150, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(13064, 152, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(15112, 160, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 172), new valueRange.ptr(12296, 173, 178), new valueRange.ptr(13064, 179, 188), new valueRange.ptr(64, 189, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 166), new valueRange.ptr(8, 167, 167), new valueRange.ptr(24, 168, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(13064, 176, 189), new valueRange.ptr(13080, 190, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(64, 128, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(13064, 128, 131), new valueRange.ptr(12296, 132, 132), new valueRange.ptr(8, 133, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(12296, 181, 181), new valueRange.ptr(13064, 182, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(12296, 189, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(14344, 132, 132), new valueRange.ptr(8, 133, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 170), new valueRange.ptr(13064, 171, 179), new valueRange.ptr(24, 180, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 165), new valueRange.ptr(12296, 166, 167), new valueRange.ptr(13064, 168, 169), new valueRange.ptr(14344, 170, 170), new valueRange.ptr(15112, 171, 171), new valueRange.ptr(13064, 172, 173), new valueRange.ptr(8, 174, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(13064, 166, 166), new valueRange.ptr(12296, 167, 167), new valueRange.ptr(13064, 168, 169), new valueRange.ptr(12296, 170, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(12296, 174, 174), new valueRange.ptr(13064, 175, 177), new valueRange.ptr(14344, 178, 179), new valueRange.ptr(64, 180, 187), new valueRange.ptr(24, 188, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(12296, 164, 171), new valueRange.ptr(13064, 172, 179), new valueRange.ptr(12296, 180, 181), new valueRange.ptr(13064, 182, 183), new valueRange.ptr(64, 184, 186), new valueRange.ptr(24, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 140), new valueRange.ptr(8, 141, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(3625, 128, 128), new valueRange.ptr(3649, 129, 129), new valueRange.ptr(3673, 130, 130), new valueRange.ptr(3697, 131, 131), new valueRange.ptr(3721, 132, 133), new valueRange.ptr(3745, 134, 134), new valueRange.ptr(3769, 135, 135), new valueRange.ptr(1405, 136, 136), new valueRange.ptr(64, 137, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(13064, 144, 146), new valueRange.ptr(24, 147, 147), new valueRange.ptr(13064, 148, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 168), new valueRange.ptr(8, 169, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(8, 174, 177), new valueRange.ptr(12296, 178, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(8, 181, 182), new valueRange.ptr(12296, 183, 183), new valueRange.ptr(13064, 184, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(13064, 128, 185), new valueRange.ptr(64, 186, 186), new valueRange.ptr(13064, 187, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 135), new valueRange.ptr(57413, 136, 143), new valueRange.ptr(8, 144, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(57413, 152, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 167), new valueRange.ptr(57413, 168, 175), new valueRange.ptr(8, 176, 183), new valueRange.ptr(57413, 184, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(13080, 144, 176), new valueRange.ptr(64, 177, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 130), new valueRange.ptr(64, 131, 131), new valueRange.ptr(8, 132, 132), new valueRange.ptr(24, 133, 136), new valueRange.ptr(9409, 137, 137), new valueRange.ptr(24, 138, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(24, 128, 171), new valueRange.ptr(9457, 172, 172), new valueRange.ptr(9513, 173, 173), new valueRange.ptr(24, 174, 174), new valueRange.ptr(9593, 175, 175), new valueRange.ptr(9649, 176, 176), new valueRange.ptr(24, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 159), new valueRange.ptr(128, 160, 160), new valueRange.ptr(24, 161, 173), new valueRange.ptr(128, 174, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 168), new valueRange.ptr(2501, 169, 169), new valueRange.ptr(2533, 170, 170), new valueRange.ptr(24, 171, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 166), new valueRange.ptr(64, 167, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(10433, 140, 140), new valueRange.ptr(24, 141, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(3686, 180, 180), new valueRange.ptr(10538, 181, 181), new valueRange.ptr(3718, 182, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 155), new valueRange.ptr(10561, 156, 156), new valueRange.ptr(24, 157, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(64, 180, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(24, 152, 185), new valueRange.ptr(64, 186, 188), new valueRange.ptr(24, 189, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(24, 138, 146), new valueRange.ptr(64, 147, 171), new valueRange.ptr(24, 172, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(57733, 128, 143), new valueRange.ptr(1013, 144, 159), new valueRange.ptr(3749, 160, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(64, 166, 166), new valueRange.ptr(8, 167, 167), new valueRange.ptr(64, 168, 172), new valueRange.ptr(8, 173, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 167), new valueRange.ptr(64, 168, 174), new valueRange.ptr(57461, 175, 175), new valueRange.ptr(24, 176, 176), new valueRange.ptr(64, 177, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(8, 160, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 182), new valueRange.ptr(64, 183, 183), new valueRange.ptr(8, 184, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 142), new valueRange.ptr(64, 143, 143), new valueRange.ptr(8, 144, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(13064, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 174), new valueRange.ptr(8, 175, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 137), new valueRange.ptr(64, 138, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 153), new valueRange.ptr(64, 154, 154), new valueRange.ptr(24, 155, 158), new valueRange.ptr(3805, 159, 159), new valueRange.ptr(24, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 178), new valueRange.ptr(3837, 179, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(3869, 128, 191), new valueRange.ptr(32, 2, 0), new valueRange.ptr(5917, 128, 143), new valueRange.ptr(6397, 144, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(7933, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(64, 151, 152), new valueRange.ptr(13064, 153, 154), new valueRange.ptr(10722, 155, 155), new valueRange.ptr(10762, 156, 156), new valueRange.ptr(8, 157, 158), new valueRange.ptr(10801, 159, 159), new valueRange.ptr(24, 160, 160), new valueRange.ptr(8, 161, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 190), new valueRange.ptr(10857, 191, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(64, 128, 132), new valueRange.ptr(8, 133, 174), new valueRange.ptr(64, 175, 176), new valueRange.ptr(10781, 177, 177), new valueRange.ptr(10813, 178, 178), new valueRange.ptr(10845, 179, 179), new valueRange.ptr(10877, 180, 180), new valueRange.ptr(10845, 181, 181), new valueRange.ptr(10909, 182, 182), new valueRange.ptr(10941, 183, 183), new valueRange.ptr(10973, 184, 185), new valueRange.ptr(11005, 186, 187), new valueRange.ptr(11037, 188, 189), new valueRange.ptr(11005, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 163), new valueRange.ptr(64, 164, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(48, 4, 0), new valueRange.ptr(10914, 128, 157), new valueRange.ptr(12378, 158, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(12450, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(64, 171, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(64, 141, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(64, 135, 143), new valueRange.ptr(8, 144, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(24, 141, 143), new valueRange.ptr(8, 144, 171), new valueRange.ptr(64, 172, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(24, 166, 175), new valueRange.ptr(13064, 176, 177), new valueRange.ptr(24, 178, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(64, 128, 182), new valueRange.ptr(8, 183, 183), new valueRange.ptr(8201, 184, 184), new valueRange.ptr(28297, 185, 185), new valueRange.ptr(8, 186, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(8, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(8, 131, 133), new valueRange.ptr(15112, 134, 134), new valueRange.ptr(8, 135, 138), new valueRange.ptr(13064, 139, 139), new valueRange.ptr(8, 140, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 166), new valueRange.ptr(12296, 167, 167), new valueRange.ptr(24, 168, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(24, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(520, 128, 177), new valueRange.ptr(264, 178, 178), new valueRange.ptr(8, 179, 179), new valueRange.ptr(24, 180, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(8, 130, 179), new valueRange.ptr(12296, 180, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(12296, 128, 131), new valueRange.ptr(15112, 132, 132), new valueRange.ptr(13064, 133, 133), new valueRange.ptr(64, 134, 141), new valueRange.ptr(24, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(13064, 160, 177), new valueRange.ptr(8, 178, 183), new valueRange.ptr(24, 184, 186), new valueRange.ptr(8, 187, 187), new valueRange.ptr(24, 188, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(13064, 166, 173), new valueRange.ptr(24, 174, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(13064, 135, 145), new valueRange.ptr(12296, 146, 146), new valueRange.ptr(14344, 147, 147), new valueRange.ptr(64, 148, 158), new valueRange.ptr(24, 159, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(8, 132, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(12296, 180, 181), new valueRange.ptr(13064, 182, 185), new valueRange.ptr(12296, 186, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(12296, 189, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(14344, 128, 128), new valueRange.ptr(24, 129, 141), new valueRange.ptr(64, 142, 142), new valueRange.ptr(8, 143, 153), new valueRange.ptr(64, 154, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 164), new valueRange.ptr(13064, 165, 165), new valueRange.ptr(8, 166, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 168), new valueRange.ptr(13064, 169, 174), new valueRange.ptr(12296, 175, 176), new valueRange.ptr(13064, 177, 178), new valueRange.ptr(12296, 179, 180), new valueRange.ptr(13064, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 130), new valueRange.ptr(13064, 131, 131), new valueRange.ptr(8, 132, 139), new valueRange.ptr(13064, 140, 140), new valueRange.ptr(12296, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(24, 156, 159), new valueRange.ptr(8, 160, 182), new valueRange.ptr(24, 183, 185), new valueRange.ptr(8, 186, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(12296, 189, 189), new valueRange.ptr(8, 190, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(13064, 176, 176), new valueRange.ptr(8, 177, 177), new valueRange.ptr(13064, 178, 180), new valueRange.ptr(8, 181, 182), new valueRange.ptr(13064, 183, 184), new valueRange.ptr(8, 185, 189), new valueRange.ptr(13064, 190, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(13064, 129, 129), new valueRange.ptr(8, 130, 130), new valueRange.ptr(64, 131, 154), new valueRange.ptr(8, 155, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 170), new valueRange.ptr(12296, 171, 171), new valueRange.ptr(13064, 172, 173), new valueRange.ptr(12296, 174, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(8, 178, 180), new valueRange.ptr(12296, 181, 181), new valueRange.ptr(15112, 182, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 134), new valueRange.ptr(64, 135, 136), new valueRange.ptr(8, 137, 142), new valueRange.ptr(64, 143, 144), new valueRange.ptr(8, 145, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(8, 160, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 154), new valueRange.ptr(24, 155, 155), new valueRange.ptr(17509, 156, 156), new valueRange.ptr(17533, 157, 157), new valueRange.ptr(10609, 158, 158), new valueRange.ptr(57453, 159, 159), new valueRange.ptr(8, 160, 165), new valueRange.ptr(64, 166, 175), new valueRange.ptr(17557, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(17589, 128, 143), new valueRange.ptr(17621, 144, 159), new valueRange.ptr(17653, 160, 175), new valueRange.ptr(17621, 176, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 165), new valueRange.ptr(12296, 166, 167), new valueRange.ptr(13064, 168, 168), new valueRange.ptr(12296, 169, 170), new valueRange.ptr(24, 171, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(15112, 173, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(64, 164, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(64, 135, 138), new valueRange.ptr(24, 139, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(17685, 128, 191), new valueRange.ptr(32, 3, 0), new valueRange.ptr(19733, 128, 148), new valueRange.ptr(19157, 149, 149), new valueRange.ptr(20405, 150, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(21749, 128, 191), new valueRange.ptr(32, 3, 0), new valueRange.ptr(23797, 128, 132), new valueRange.ptr(22101, 133, 133), new valueRange.ptr(23957, 134, 191), new valueRange.ptr(32, 8, 0), new valueRange.ptr(27477, 128, 143), new valueRange.ptr(27925, 144, 144), new valueRange.ptr(27989, 145, 171), new valueRange.ptr(28321, 172, 172), new valueRange.ptr(28853, 173, 173), new valueRange.ptr(64, 174, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(28885, 176, 191), new valueRange.ptr(32, 5, 0), new valueRange.ptr(29397, 128, 173), new valueRange.ptr(25909, 174, 174), new valueRange.ptr(30869, 175, 181), new valueRange.ptr(28501, 182, 182), new valueRange.ptr(31093, 183, 191), new valueRange.ptr(40, 3, 0), new valueRange.ptr(31777, 128, 130), new valueRange.ptr(31713, 131, 131), new valueRange.ptr(31897, 132, 191), new valueRange.ptr(56, 15, 0), new valueRange.ptr(40369, 128, 131), new valueRange.ptr(40537, 132, 133), new valueRange.ptr(40593, 134, 135), new valueRange.ptr(40649, 136, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(41097, 146, 151), new valueRange.ptr(41377, 152, 156), new valueRange.ptr(41601, 157, 179), new valueRange.ptr(40257, 180, 180), new valueRange.ptr(40369, 181, 181), new valueRange.ptr(42889, 182, 187), new valueRange.ptr(43113, 188, 188), new valueRange.ptr(43001, 189, 189), new valueRange.ptr(43225, 190, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 139), new valueRange.ptr(64, 140, 140), new valueRange.ptr(8, 141, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 186), new valueRange.ptr(64, 187, 187), new valueRange.ptr(8, 188, 189), new valueRange.ptr(64, 190, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 130), new valueRange.ptr(64, 131, 134), new valueRange.ptr(24, 135, 179), new valueRange.ptr(64, 180, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 142), new valueRange.ptr(64, 143, 143), new valueRange.ptr(24, 144, 155), new valueRange.ptr(64, 156, 159), new valueRange.ptr(24, 160, 160), new valueRange.ptr(64, 161, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(24, 144, 188), new valueRange.ptr(13064, 189, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 156), new valueRange.ptr(64, 157, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 144), new valueRange.ptr(64, 145, 159), new valueRange.ptr(13064, 160, 160), new valueRange.ptr(24, 161, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 159), new valueRange.ptr(24, 160, 163), new valueRange.ptr(64, 164, 172), new valueRange.ptr(8, 173, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 129), new valueRange.ptr(8, 130, 137), new valueRange.ptr(24, 138, 138), new valueRange.ptr(64, 139, 143), new valueRange.ptr(8, 144, 181), new valueRange.ptr(13064, 182, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(64, 132, 135), new valueRange.ptr(8, 136, 143), new valueRange.ptr(24, 144, 149), new valueRange.ptr(64, 150, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(57669, 128, 135), new valueRange.ptr(57797, 136, 143), new valueRange.ptr(57669, 144, 151), new valueRange.ptr(35541, 152, 159), new valueRange.ptr(35565, 160, 167), new valueRange.ptr(8, 168, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(35565, 176, 183), new valueRange.ptr(35541, 184, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(57669, 128, 135), new valueRange.ptr(57797, 136, 143), new valueRange.ptr(57669, 144, 147), new valueRange.ptr(64, 148, 151), new valueRange.ptr(8, 152, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 167), new valueRange.ptr(64, 168, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(64, 164, 174), new valueRange.ptr(24, 175, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 149), new valueRange.ptr(64, 150, 159), new valueRange.ptr(8, 160, 167), new valueRange.ptr(64, 168, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2056, 128, 133), new valueRange.ptr(64, 134, 135), new valueRange.ptr(2056, 136, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(2056, 138, 181), new valueRange.ptr(64, 182, 182), new valueRange.ptr(2056, 183, 184), new valueRange.ptr(64, 185, 187), new valueRange.ptr(2056, 188, 188), new valueRange.ptr(64, 189, 190), new valueRange.ptr(2056, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(64, 150, 150), new valueRange.ptr(2072, 151, 159), new valueRange.ptr(2056, 160, 182), new valueRange.ptr(2072, 183, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 158), new valueRange.ptr(64, 159, 166), new valueRange.ptr(2072, 167, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2056, 160, 178), new valueRange.ptr(64, 179, 179), new valueRange.ptr(2056, 180, 181), new valueRange.ptr(64, 182, 186), new valueRange.ptr(2072, 187, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(2072, 150, 155), new valueRange.ptr(64, 156, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(2056, 160, 185), new valueRange.ptr(64, 186, 190), new valueRange.ptr(2072, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 183), new valueRange.ptr(64, 184, 187), new valueRange.ptr(2072, 188, 189), new valueRange.ptr(2056, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2072, 128, 143), new valueRange.ptr(64, 144, 145), new valueRange.ptr(2072, 146, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(2056, 128, 128), new valueRange.ptr(13064, 129, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(64, 135, 139), new valueRange.ptr(13064, 140, 143), new valueRange.ptr(2056, 144, 147), new valueRange.ptr(64, 148, 148), new valueRange.ptr(2056, 149, 151), new valueRange.ptr(64, 152, 152), new valueRange.ptr(2056, 153, 179), new valueRange.ptr(64, 180, 183), new valueRange.ptr(13064, 184, 186), new valueRange.ptr(64, 187, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(2072, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(2072, 144, 152), new valueRange.ptr(64, 153, 159), new valueRange.ptr(2056, 160, 188), new valueRange.ptr(2072, 189, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 156), new valueRange.ptr(2072, 157, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 181), new valueRange.ptr(64, 182, 184), new valueRange.ptr(24, 185, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(2072, 152, 159), new valueRange.ptr(2056, 160, 178), new valueRange.ptr(64, 179, 183), new valueRange.ptr(2072, 184, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(2056, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(2056, 128, 136), new valueRange.ptr(64, 137, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(989, 128, 178), new valueRange.ptr(64, 179, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 178), new valueRange.ptr(64, 179, 185), new valueRange.ptr(2072, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2072, 160, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(12296, 128, 128), new valueRange.ptr(13064, 129, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 183), new valueRange.ptr(13064, 184, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 133), new valueRange.ptr(15112, 134, 134), new valueRange.ptr(24, 135, 141), new valueRange.ptr(64, 142, 145), new valueRange.ptr(24, 146, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(64, 176, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 182), new valueRange.ptr(12296, 183, 184), new valueRange.ptr(15112, 185, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(24, 187, 188), new valueRange.ptr(832, 189, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 129), new valueRange.ptr(64, 130, 143), new valueRange.ptr(8, 144, 168), new valueRange.ptr(64, 169, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(8, 131, 166), new valueRange.ptr(13064, 167, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(13064, 173, 178), new valueRange.ptr(15112, 179, 180), new valueRange.ptr(64, 181, 181), new valueRange.ptr(8, 182, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(24, 128, 131), new valueRange.ptr(64, 132, 143), new valueRange.ptr(8, 144, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(24, 180, 181), new valueRange.ptr(8, 182, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 178), new valueRange.ptr(12296, 179, 181), new valueRange.ptr(13064, 182, 190), new valueRange.ptr(12296, 191, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(14344, 128, 128), new valueRange.ptr(8, 129, 132), new valueRange.ptr(24, 133, 137), new valueRange.ptr(13064, 138, 140), new valueRange.ptr(24, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 154), new valueRange.ptr(24, 155, 155), new valueRange.ptr(8, 156, 156), new valueRange.ptr(24, 157, 159), new valueRange.ptr(64, 160, 160), new valueRange.ptr(24, 161, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 145), new valueRange.ptr(64, 146, 146), new valueRange.ptr(8, 147, 171), new valueRange.ptr(12296, 172, 174), new valueRange.ptr(13064, 175, 177), new valueRange.ptr(12296, 178, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(14344, 181, 181), new valueRange.ptr(13064, 182, 183), new valueRange.ptr(24, 184, 189), new valueRange.ptr(13064, 190, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 142), new valueRange.ptr(8, 143, 157), new valueRange.ptr(64, 158, 158), new valueRange.ptr(8, 159, 168), new valueRange.ptr(24, 169, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(13064, 159, 159), new valueRange.ptr(12296, 160, 162), new valueRange.ptr(13064, 163, 169), new valueRange.ptr(15112, 170, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 180), new valueRange.ptr(12296, 181, 183), new valueRange.ptr(13064, 184, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(15112, 130, 130), new valueRange.ptr(13064, 131, 132), new valueRange.ptr(12296, 133, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(8, 135, 138), new valueRange.ptr(24, 139, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 154), new valueRange.ptr(24, 155, 155), new valueRange.ptr(64, 156, 156), new valueRange.ptr(24, 157, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 184), new valueRange.ptr(12296, 185, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(12296, 187, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 129), new valueRange.ptr(15112, 130, 130), new valueRange.ptr(13064, 131, 131), new valueRange.ptr(8, 132, 133), new valueRange.ptr(24, 134, 134), new valueRange.ptr(8, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 174), new valueRange.ptr(12296, 175, 177), new valueRange.ptr(13064, 178, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(12296, 184, 187), new valueRange.ptr(13064, 188, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(24, 129, 151), new valueRange.ptr(8, 152, 155), new valueRange.ptr(13064, 156, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 186), new valueRange.ptr(12296, 187, 188), new valueRange.ptr(13064, 189, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(24, 129, 131), new valueRange.ptr(8, 132, 132), new valueRange.ptr(64, 133, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 172), new valueRange.ptr(64, 173, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(13064, 171, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(12296, 174, 175), new valueRange.ptr(13064, 176, 181), new valueRange.ptr(14344, 182, 182), new valueRange.ptr(13064, 183, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 153), new valueRange.ptr(64, 154, 156), new valueRange.ptr(13064, 157, 159), new valueRange.ptr(12296, 160, 161), new valueRange.ptr(13064, 162, 165), new valueRange.ptr(12296, 166, 166), new valueRange.ptr(13064, 167, 170), new valueRange.ptr(15112, 171, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(24, 186, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(1181, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 169), new valueRange.ptr(24, 170, 178), new valueRange.ptr(64, 179, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(13064, 129, 134), new valueRange.ptr(12296, 135, 136), new valueRange.ptr(13064, 137, 138), new valueRange.ptr(8, 139, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(15112, 180, 180), new valueRange.ptr(13064, 181, 184), new valueRange.ptr(12296, 185, 185), new valueRange.ptr(8, 186, 186), new valueRange.ptr(13064, 187, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(15112, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(13064, 145, 150), new valueRange.ptr(12296, 151, 152), new valueRange.ptr(13064, 153, 155), new valueRange.ptr(8, 156, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(64, 132, 133), new valueRange.ptr(8, 134, 137), new valueRange.ptr(13064, 138, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(13064, 152, 152), new valueRange.ptr(15112, 153, 153), new valueRange.ptr(24, 154, 156), new valueRange.ptr(64, 157, 157), new valueRange.ptr(24, 158, 162), new valueRange.ptr(64, 163, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 174), new valueRange.ptr(12296, 175, 175), new valueRange.ptr(13064, 176, 182), new valueRange.ptr(64, 183, 183), new valueRange.ptr(13064, 184, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 133), new valueRange.ptr(64, 134, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(8, 178, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(64, 144, 145), new valueRange.ptr(13064, 146, 167), new valueRange.ptr(64, 168, 168), new valueRange.ptr(12296, 169, 169), new valueRange.ptr(13064, 170, 176), new valueRange.ptr(12296, 177, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(12296, 180, 180), new valueRange.ptr(13064, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 137), new valueRange.ptr(64, 138, 138), new valueRange.ptr(8, 139, 176), new valueRange.ptr(13064, 177, 182), new valueRange.ptr(64, 183, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(64, 187, 187), new valueRange.ptr(13064, 188, 189), new valueRange.ptr(64, 190, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(13064, 128, 131), new valueRange.ptr(15112, 132, 133), new valueRange.ptr(8, 134, 134), new valueRange.ptr(13064, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(24, 176, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(64, 132, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 174), new valueRange.ptr(64, 175, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 173), new valueRange.ptr(24, 174, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(8, 144, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(13064, 176, 180), new valueRange.ptr(24, 181, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(13064, 176, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(24, 132, 133), new valueRange.ptr(64, 134, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 154), new valueRange.ptr(24, 155, 161), new valueRange.ptr(64, 162, 162), new valueRange.ptr(8, 163, 183), new valueRange.ptr(64, 184, 188), new valueRange.ptr(8, 189, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(64, 144, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 132), new valueRange.ptr(64, 133, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(12296, 145, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 142), new valueRange.ptr(13064, 143, 146), new valueRange.ptr(8, 147, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(8, 160, 161), new valueRange.ptr(64, 162, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 172), new valueRange.ptr(64, 173, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 178), new valueRange.ptr(64, 179, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(24, 156, 156), new valueRange.ptr(13064, 157, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(960, 160, 163), new valueRange.ptr(64, 164, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 166), new valueRange.ptr(64, 167, 168), new valueRange.ptr(24, 169, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(24, 128, 157), new valueRange.ptr(46521, 158, 158), new valueRange.ptr(46593, 159, 159), new valueRange.ptr(46665, 160, 160), new valueRange.ptr(46769, 161, 161), new valueRange.ptr(46873, 162, 162), new valueRange.ptr(46977, 163, 163), new valueRange.ptr(47081, 164, 164), new valueRange.ptr(12312, 165, 166), new valueRange.ptr(13080, 167, 169), new valueRange.ptr(24, 170, 172), new valueRange.ptr(12312, 173, 178), new valueRange.ptr(832, 179, 186), new valueRange.ptr(13080, 187, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13080, 128, 130), new valueRange.ptr(24, 131, 132), new valueRange.ptr(13080, 133, 139), new valueRange.ptr(24, 140, 169), new valueRange.ptr(13080, 170, 173), new valueRange.ptr(24, 174, 186), new valueRange.ptr(47185, 187, 187), new valueRange.ptr(47257, 188, 188), new valueRange.ptr(47329, 189, 189), new valueRange.ptr(47433, 190, 190), new valueRange.ptr(47537, 191, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(47641, 128, 128), new valueRange.ptr(24, 129, 168), new valueRange.ptr(64, 169, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 129), new valueRange.ptr(13080, 130, 132), new valueRange.ptr(24, 133, 133), new valueRange.ptr(64, 134, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(24, 160, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(13064, 128, 182), new valueRange.ptr(24, 183, 186), new valueRange.ptr(13064, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(13064, 128, 172), new valueRange.ptr(24, 173, 180), new valueRange.ptr(13064, 181, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 131), new valueRange.ptr(13064, 132, 132), new valueRange.ptr(24, 133, 139), new valueRange.ptr(64, 140, 154), new valueRange.ptr(13064, 155, 159), new valueRange.ptr(64, 160, 160), new valueRange.ptr(13064, 161, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(13064, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(13064, 136, 152), new valueRange.ptr(64, 153, 154), new valueRange.ptr(13064, 155, 161), new valueRange.ptr(64, 162, 162), new valueRange.ptr(13064, 163, 164), new valueRange.ptr(64, 165, 165), new valueRange.ptr(13064, 166, 170), new valueRange.ptr(64, 171, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(2056, 128, 132), new valueRange.ptr(64, 133, 134), new valueRange.ptr(2072, 135, 143), new valueRange.ptr(13064, 144, 150), new valueRange.ptr(64, 151, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2568, 128, 131), new valueRange.ptr(13064, 132, 138), new valueRange.ptr(64, 139, 143), new valueRange.ptr(2056, 144, 153), new valueRange.ptr(64, 154, 157), new valueRange.ptr(2072, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 147), new valueRange.ptr(64, 148, 159), new valueRange.ptr(24, 160, 174), new valueRange.ptr(64, 175, 176), new valueRange.ptr(24, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(24, 129, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(24, 145, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 143), new valueRange.ptr(49601, 144, 144), new valueRange.ptr(24, 145, 172), new valueRange.ptr(64, 173, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 165), new valueRange.ptr(24, 166, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(51177, 128, 128), new valueRange.ptr(51257, 129, 129), new valueRange.ptr(51337, 130, 130), new valueRange.ptr(51417, 131, 131), new valueRange.ptr(51497, 132, 132), new valueRange.ptr(51577, 133, 133), new valueRange.ptr(51657, 134, 134), new valueRange.ptr(51737, 135, 135), new valueRange.ptr(51817, 136, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(51897, 144, 144), new valueRange.ptr(51929, 145, 145), new valueRange.ptr(64, 146, 159), new valueRange.ptr(24, 160, 165), new valueRange.ptr(64, 166, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 148), new valueRange.ptr(64, 149, 159), new valueRange.ptr(24, 160, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(24, 176, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 148), new valueRange.ptr(64, 149, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(24, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(24, 144, 173), new valueRange.ptr(64, 174, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(24, 144, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 140), new valueRange.ptr(64, 141, 143), new valueRange.ptr(24, 144, 171), new valueRange.ptr(64, 172, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 151), new valueRange.ptr(64, 152, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 128), new valueRange.ptr(64, 129, 143), new valueRange.ptr(24, 144, 166), new valueRange.ptr(64, 167, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(64, 151, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 161), new valueRange.ptr(64, 162, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 160), new valueRange.ptr(64, 161, 191), new valueRange.ptr(32, 15, 0), new valueRange.ptr(57017, 128, 137), new valueRange.ptr(36349, 138, 138), new valueRange.ptr(57337, 139, 156), new valueRange.ptr(36381, 157, 157), new valueRange.ptr(57913, 158, 162), new valueRange.ptr(36413, 163, 163), new valueRange.ptr(58073, 164, 171), new valueRange.ptr(32469, 172, 172), new valueRange.ptr(58329, 173, 175), new valueRange.ptr(36445, 176, 176), new valueRange.ptr(58425, 177, 182), new valueRange.ptr(36477, 183, 185), new valueRange.ptr(58617, 186, 186), new valueRange.ptr(36573, 187, 187), new valueRange.ptr(58649, 188, 191), new valueRange.ptr(32, 16, 0), new valueRange.ptr(37757, 128, 128), new valueRange.ptr(61593, 129, 134), new valueRange.ptr(37789, 135, 138), new valueRange.ptr(55801, 139, 139), new valueRange.ptr(61785, 140, 150), new valueRange.ptr(37917, 151, 151), new valueRange.ptr(62137, 152, 163), new valueRange.ptr(37949, 164, 166), new valueRange.ptr(62521, 167, 170), new valueRange.ptr(38045, 171, 171), new valueRange.ptr(62649, 172, 172), new valueRange.ptr(38077, 173, 173), new valueRange.ptr(62681, 174, 175), new valueRange.ptr(38109, 176, 177), new valueRange.ptr(62745, 178, 190), new valueRange.ptr(8256, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(832, 129, 129), new valueRange.ptr(64, 130, 159), new valueRange.ptr(832, 160, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(832, 128, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(13248, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(13248, 128, 175), new valueRange.ptr(64, 176, 191)]); + idnaSparse = new sparseBlocks.ptr(new sliceType$1(idnaSparseValues), idnaSparseOffset); + trie = new idnaTrie.ptr(); + lookup = new Profile.ptr(new options.ptr(true, true, true, false, false, trie, validateFromPunycode, validateAndMap, bidirule.ValidString)); + $pkg.Lookup = lookup; + joinStates = new sliceType$2([$toNativeArray($kindInt8, [0, 2, 2, 0, 0, 5, 5, 1]), $toNativeArray($kindInt8, [0, 2, 2, 0, 0, 0, 0, 0]), $toNativeArray($kindInt8, [0, 2, 2, 2, 0, 5, 4, 3]), $toNativeArray($kindInt8, [0, 2, 2, 2, 0, 0, 0, 0]), $toNativeArray($kindInt8, [0, 5, 2, 4, 0, 5, 5, 4]), $toNativeArray($kindInt8, [5, 5, 5, 5, 5, 5, 5, 5])]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/http/httpguts"] = (function() { + var $pkg = {}, $init, net, textproto, strings, utf8, idna, badTrailer, isTokenTable, validHostByte, ValidTrailerHeader, IsTokenRune, HeaderValuesContainsToken, isOWS, trimOWS, headerValueContainsToken, lowerASCII, tokenEqual, isLWS, isCTL, ValidHeaderFieldName, ValidHostHeader, ValidHeaderFieldValue, isASCII, PunycodeHostPort; + net = $packages["net"]; + textproto = $packages["net/textproto"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + idna = $packages["vendor/golang_org/x/net/idna"]; + ValidTrailerHeader = function(name) { + var _entry, name; + name = textproto.CanonicalMIMEHeaderKey(name); + if (strings.HasPrefix(name, "If-") || (_entry = badTrailer[$String.keyFor(name)], _entry !== undefined ? _entry.v : false)) { + return false; + } + return true; + }; + $pkg.ValidTrailerHeader = ValidTrailerHeader; + IsTokenRune = function(r) { + var i, r; + i = ((r >> 0)); + return i < 127 && ((i < 0 || i >= isTokenTable.length) ? ($throwRuntimeError("index out of range"), undefined) : isTokenTable[i]); + }; + $pkg.IsTokenRune = IsTokenRune; + HeaderValuesContainsToken = function(values, token) { + var _i, _ref, token, v, values; + _ref = values; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (headerValueContainsToken(v, token)) { + return true; + } + _i++; + } + return false; + }; + $pkg.HeaderValuesContainsToken = HeaderValuesContainsToken; + isOWS = function(b) { + var b; + return (b === 32) || (b === 9); + }; + trimOWS = function(x) { + var x; + while (true) { + if (!(x.length > 0 && isOWS(x.charCodeAt(0)))) { break; } + x = $substring(x, 1); + } + while (true) { + if (!(x.length > 0 && isOWS(x.charCodeAt((x.length - 1 >> 0))))) { break; } + x = $substring(x, 0, (x.length - 1 >> 0)); + } + return x; + }; + headerValueContainsToken = function(v, token) { + var comma, token, v; + v = trimOWS(v); + comma = strings.IndexByte(v, 44); + if (!((comma === -1))) { + return tokenEqual(trimOWS($substring(v, 0, comma)), token) || headerValueContainsToken($substring(v, (comma + 1 >> 0)), token); + } + return tokenEqual(v, token); + }; + lowerASCII = function(b) { + var b; + if (65 <= b && b <= 90) { + return b + 32 << 24 >>> 24; + } + return b; + }; + tokenEqual = function(t1, t2) { + var _i, _ref, _rune, b, i, t1, t2; + if (!((t1.length === t2.length))) { + return false; + } + _ref = t1; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + b = _rune[0]; + if (b >= 128) { + return false; + } + if (!((lowerASCII(((b << 24 >>> 24))) === lowerASCII(t2.charCodeAt(i))))) { + return false; + } + _i += _rune[1]; + } + return true; + }; + isLWS = function(b) { + var b; + return (b === 32) || (b === 9); + }; + isCTL = function(b) { + var b; + return b < 32 || (b === 127); + }; + ValidHeaderFieldName = function(v) { + var _i, _ref, _rune, r, v; + if (v.length === 0) { + return false; + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + if (!IsTokenRune(r)) { + return false; + } + _i += _rune[1]; + } + return true; + }; + $pkg.ValidHeaderFieldName = ValidHeaderFieldName; + ValidHostHeader = function(h) { + var h, i, x; + i = 0; + while (true) { + if (!(i < h.length)) { break; } + if (!(x = h.charCodeAt(i), ((x < 0 || x >= validHostByte.length) ? ($throwRuntimeError("index out of range"), undefined) : validHostByte[x]))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + $pkg.ValidHostHeader = ValidHostHeader; + ValidHeaderFieldValue = function(v) { + var b, i, v; + i = 0; + while (true) { + if (!(i < v.length)) { break; } + b = v.charCodeAt(i); + if (isCTL(b) && !isLWS(b)) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + $pkg.ValidHeaderFieldValue = ValidHeaderFieldValue; + isASCII = function(s) { + var i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) >= 128) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + PunycodeHostPort = function(v) { + var _r, _r$1, _tuple, _tuple$1, err, host, port, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; host = $f.host; port = $f.port; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (isASCII(v)) { + $s = -1; return [v, $ifaceNil]; + } + _r = net.SplitHostPort(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + host = v; + port = ""; + } + _r$1 = idna.ToASCII(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + host = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", err]; + } + if (port === "") { + $s = -1; return [host, $ifaceNil]; + } + $s = -1; return [net.JoinHostPort(host, port), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: PunycodeHostPort }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.host = host; $f.port = port; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.PunycodeHostPort = PunycodeHostPort; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = net.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = textproto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = idna.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + badTrailer = $makeMap($String.keyFor, [{ k: "Authorization", v: true }, { k: "Cache-Control", v: true }, { k: "Connection", v: true }, { k: "Content-Encoding", v: true }, { k: "Content-Length", v: true }, { k: "Content-Range", v: true }, { k: "Content-Type", v: true }, { k: "Expect", v: true }, { k: "Host", v: true }, { k: "Keep-Alive", v: true }, { k: "Max-Forwards", v: true }, { k: "Pragma", v: true }, { k: "Proxy-Authenticate", v: true }, { k: "Proxy-Authorization", v: true }, { k: "Proxy-Connection", v: true }, { k: "Range", v: true }, { k: "Realm", v: true }, { k: "Te", v: true }, { k: "Trailer", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Www-Authenticate", v: true }]); + isTokenTable = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, true, true, true, true, false, false, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true]); + validHostByte = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/http/httpproxy"] = (function() { + var $pkg = {}, $init, errors, fmt, net, url, os, strings, utf8, idna; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + net = $packages["net"]; + url = $packages["net/url"]; + os = $packages["os"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + idna = $packages["vendor/golang_org/x/net/idna"]; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = url.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = idna.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["vendor/golang_org/x/net/http2/hpack"] = (function() { + var $pkg = {}, $init, bytes, errors, fmt, io, sync, Encoder, DecodingError, InvalidIndexError, HeaderField, Decoder, dynamicTable, indexType, node, headerFieldTable, pairNameValue, ptrType, sliceType, sliceType$1, arrayType, sliceType$2, ptrType$1, arrayType$1, ptrType$2, ptrType$3, funcType, ptrType$4, ptrType$5, ptrType$6, mapType, mapType$1, errNeedMore, errVarintOverflow, bufPool, buildRootOnce, lazyRootHuffmanNode, staticTable, staticTableEntries, huffmanCodes, huffmanCodeLen, NewEncoder, appendIndexed, appendNewName, appendIndexedName, appendTableSize, appendVarInt, appendHpackString, encodeTypeByte, NewDecoder, readVarInt, huffmanDecode, newInternalNode, getRootHuffmanNode, buildRootHuffmanNode, addDecoderNode, AppendHuffmanString, HuffmanEncodeLength, appendByteToHuffmanCode, newStaticTable; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + sync = $packages["sync"]; + Encoder = $pkg.Encoder = $newType(0, $kindStruct, "hpack.Encoder", true, "vendor/golang_org/x/net/http2/hpack", true, function(dynTab_, minSize_, maxSizeLimit_, tableSizeUpdate_, w_, buf_) { + this.$val = this; + if (arguments.length === 0) { + this.dynTab = new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0); + this.minSize = 0; + this.maxSizeLimit = 0; + this.tableSizeUpdate = false; + this.w = $ifaceNil; + this.buf = sliceType$1.nil; + return; + } + this.dynTab = dynTab_; + this.minSize = minSize_; + this.maxSizeLimit = maxSizeLimit_; + this.tableSizeUpdate = tableSizeUpdate_; + this.w = w_; + this.buf = buf_; + }); + DecodingError = $pkg.DecodingError = $newType(0, $kindStruct, "hpack.DecodingError", true, "vendor/golang_org/x/net/http2/hpack", true, function(Err_) { + this.$val = this; + if (arguments.length === 0) { + this.Err = $ifaceNil; + return; + } + this.Err = Err_; + }); + InvalidIndexError = $pkg.InvalidIndexError = $newType(4, $kindInt, "hpack.InvalidIndexError", true, "vendor/golang_org/x/net/http2/hpack", true, null); + HeaderField = $pkg.HeaderField = $newType(0, $kindStruct, "hpack.HeaderField", true, "vendor/golang_org/x/net/http2/hpack", true, function(Name_, Value_, Sensitive_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = ""; + this.Value = ""; + this.Sensitive = false; + return; + } + this.Name = Name_; + this.Value = Value_; + this.Sensitive = Sensitive_; + }); + Decoder = $pkg.Decoder = $newType(0, $kindStruct, "hpack.Decoder", true, "vendor/golang_org/x/net/http2/hpack", true, function(dynTab_, emit_, emitEnabled_, maxStrLen_, buf_, saveBuf_) { + this.$val = this; + if (arguments.length === 0) { + this.dynTab = new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0); + this.emit = $throwNilPointerError; + this.emitEnabled = false; + this.maxStrLen = 0; + this.buf = sliceType$1.nil; + this.saveBuf = new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + return; + } + this.dynTab = dynTab_; + this.emit = emit_; + this.emitEnabled = emitEnabled_; + this.maxStrLen = maxStrLen_; + this.buf = buf_; + this.saveBuf = saveBuf_; + }); + dynamicTable = $pkg.dynamicTable = $newType(0, $kindStruct, "hpack.dynamicTable", true, "vendor/golang_org/x/net/http2/hpack", false, function(table_, size_, maxSize_, allowedMaxSize_) { + this.$val = this; + if (arguments.length === 0) { + this.table = new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false); + this.size = 0; + this.maxSize = 0; + this.allowedMaxSize = 0; + return; + } + this.table = table_; + this.size = size_; + this.maxSize = maxSize_; + this.allowedMaxSize = allowedMaxSize_; + }); + indexType = $pkg.indexType = $newType(4, $kindInt, "hpack.indexType", true, "vendor/golang_org/x/net/http2/hpack", false, null); + node = $pkg.node = $newType(0, $kindStruct, "hpack.node", true, "vendor/golang_org/x/net/http2/hpack", false, function(children_, codeLen_, sym_) { + this.$val = this; + if (arguments.length === 0) { + this.children = ptrType$2.nil; + this.codeLen = 0; + this.sym = 0; + return; + } + this.children = children_; + this.codeLen = codeLen_; + this.sym = sym_; + }); + headerFieldTable = $pkg.headerFieldTable = $newType(0, $kindStruct, "hpack.headerFieldTable", true, "vendor/golang_org/x/net/http2/hpack", false, function(ents_, evictCount_, byName_, byNameValue_) { + this.$val = this; + if (arguments.length === 0) { + this.ents = sliceType$2.nil; + this.evictCount = new $Uint64(0, 0); + this.byName = false; + this.byNameValue = false; + return; + } + this.ents = ents_; + this.evictCount = evictCount_; + this.byName = byName_; + this.byNameValue = byNameValue_; + }); + pairNameValue = $pkg.pairNameValue = $newType(0, $kindStruct, "hpack.pairNameValue", true, "vendor/golang_org/x/net/http2/hpack", false, function(name_, value_) { + this.$val = this; + if (arguments.length === 0) { + this.name = ""; + this.value = ""; + return; + } + this.name = name_; + this.value = value_; + }); + ptrType = $ptrType(node); + sliceType = $sliceType($emptyInterface); + sliceType$1 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 64); + sliceType$2 = $sliceType(HeaderField); + ptrType$1 = $ptrType(bytes.Buffer); + arrayType$1 = $arrayType(ptrType, 256); + ptrType$2 = $ptrType(arrayType$1); + ptrType$3 = $ptrType(Encoder); + funcType = $funcType([HeaderField], [], false); + ptrType$4 = $ptrType(Decoder); + ptrType$5 = $ptrType(dynamicTable); + ptrType$6 = $ptrType(headerFieldTable); + mapType = $mapType($String, $Uint64); + mapType$1 = $mapType(pairNameValue, $Uint64); + NewEncoder = function(w) { + var e, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = new Encoder.ptr(new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0), 4294967295, 4096, false, w, sliceType$1.nil); + e.dynTab.table.init(); + $r = e.dynTab.setMaxSize(4096); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return e; + /* */ } return; } if ($f === undefined) { $f = { $blk: NewEncoder }; } $f.e = e; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewEncoder = NewEncoder; + Encoder.ptr.prototype.WriteField = function(f) { + var _r, _r$1, _tuple, _tuple$1, e, err, f, idx, indexing, n, nameValueMatch, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; err = $f.err; f = $f.f; idx = $f.idx; indexing = $f.indexing; n = $f.n; nameValueMatch = $f.nameValueMatch; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + e.buf = $subslice(e.buf, 0, 0); + if (e.tableSizeUpdate) { + e.tableSizeUpdate = false; + if (e.minSize < e.dynTab.maxSize) { + e.buf = appendTableSize(e.buf, e.minSize); + } + e.minSize = 4294967295; + e.buf = appendTableSize(e.buf, e.dynTab.maxSize); + } + _r = e.searchTable($clone(f, HeaderField)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + idx = _tuple[0]; + nameValueMatch = _tuple[1]; + /* */ if (nameValueMatch) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (nameValueMatch) { */ case 2: + e.buf = appendIndexed(e.buf, idx); + $s = 4; continue; + /* } else { */ case 3: + indexing = e.shouldIndex($clone(f, HeaderField)); + /* */ if (indexing) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (indexing) { */ case 5: + $r = e.dynTab.add($clone(f, HeaderField)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + if ((idx.$high === 0 && idx.$low === 0)) { + e.buf = appendNewName(e.buf, $clone(f, HeaderField), indexing); + } else { + e.buf = appendIndexedName(e.buf, $clone(f, HeaderField), idx, indexing); + } + /* } */ case 4: + _r$1 = e.w.Write(e.buf); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err = _tuple$1[1]; + if ($interfaceIsEqual(err, $ifaceNil) && !((n === e.buf.$length))) { + err = io.ErrShortWrite; + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Encoder.ptr.prototype.WriteField }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.err = err; $f.f = f; $f.idx = idx; $f.indexing = indexing; $f.n = n; $f.nameValueMatch = nameValueMatch; $f.$s = $s; $f.$r = $r; return $f; + }; + Encoder.prototype.WriteField = function(f) { return this.$val.WriteField(f); }; + Encoder.ptr.prototype.searchTable = function(f) { + var _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, f, i, j, nameValueMatch, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; f = $f.f; i = $f.i; j = $f.j; nameValueMatch = $f.nameValueMatch; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = new $Uint64(0, 0); + nameValueMatch = false; + e = this; + _r = staticTable.search($clone(f, HeaderField)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + i = _tuple[0]; + nameValueMatch = _tuple[1]; + if (nameValueMatch) { + _tmp = i; + _tmp$1 = true; + i = _tmp; + nameValueMatch = _tmp$1; + $s = -1; return [i, nameValueMatch]; + } + _r$1 = e.dynTab.table.search($clone(f, HeaderField)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + j = _tuple$1[0]; + nameValueMatch = _tuple$1[1]; + if (nameValueMatch || ((i.$high === 0 && i.$low === 0) && !((j.$high === 0 && j.$low === 0)))) { + _tmp$2 = (x = (new $Uint64(0, staticTable.len())), new $Uint64(j.$high + x.$high, j.$low + x.$low)); + _tmp$3 = nameValueMatch; + i = _tmp$2; + nameValueMatch = _tmp$3; + $s = -1; return [i, nameValueMatch]; + } + _tmp$4 = i; + _tmp$5 = false; + i = _tmp$4; + nameValueMatch = _tmp$5; + $s = -1; return [i, nameValueMatch]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Encoder.ptr.prototype.searchTable }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.f = f; $f.i = i; $f.j = j; $f.nameValueMatch = nameValueMatch; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Encoder.prototype.searchTable = function(f) { return this.$val.searchTable(f); }; + Encoder.ptr.prototype.SetMaxDynamicTableSize = function(v) { + var e, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + if (v > e.maxSizeLimit) { + v = e.maxSizeLimit; + } + if (v < e.minSize) { + e.minSize = v; + } + e.tableSizeUpdate = true; + $r = e.dynTab.setMaxSize(v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Encoder.ptr.prototype.SetMaxDynamicTableSize }; } $f.e = e; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Encoder.prototype.SetMaxDynamicTableSize = function(v) { return this.$val.SetMaxDynamicTableSize(v); }; + Encoder.ptr.prototype.SetMaxDynamicTableSizeLimit = function(v) { + var e, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + e.maxSizeLimit = v; + /* */ if (e.dynTab.maxSize > v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (e.dynTab.maxSize > v) { */ case 1: + e.tableSizeUpdate = true; + $r = e.dynTab.setMaxSize(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Encoder.ptr.prototype.SetMaxDynamicTableSizeLimit }; } $f.e = e; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Encoder.prototype.SetMaxDynamicTableSizeLimit = function(v) { return this.$val.SetMaxDynamicTableSizeLimit(v); }; + Encoder.ptr.prototype.shouldIndex = function(f) { + var e, f; + e = this; + return !f.Sensitive && $clone(f, HeaderField).Size() <= e.dynTab.maxSize; + }; + Encoder.prototype.shouldIndex = function(f) { return this.$val.shouldIndex(f); }; + appendIndexed = function(dst, i) { + var dst, first, i; + first = dst.$length; + dst = appendVarInt(dst, 7, i); + ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (128)) >>> 0)); + return dst; + }; + appendNewName = function(dst, f, indexing) { + var dst, f, indexing; + dst = $append(dst, encodeTypeByte(indexing, f.Sensitive)); + dst = appendHpackString(dst, f.Name); + return appendHpackString(dst, f.Value); + }; + appendIndexedName = function(dst, f, i, indexing) { + var dst, f, first, i, indexing, n; + first = dst.$length; + n = 0; + if (indexing) { + n = 6; + } else { + n = 4; + } + dst = appendVarInt(dst, n, i); + ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (encodeTypeByte(indexing, f.Sensitive))) >>> 0)); + return appendHpackString(dst, f.Value); + }; + appendTableSize = function(dst, v) { + var dst, first, v; + first = dst.$length; + dst = appendVarInt(dst, 5, (new $Uint64(0, v))); + ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (32)) >>> 0)); + return dst; + }; + appendVarInt = function(dst, n, i) { + var dst, i, k, n, x, x$1, x$2; + k = ((x = $shiftLeft64(new $Uint64(0, 1), n), new $Uint64(x.$high - 0, x.$low - 1))); + if ((i.$high < k.$high || (i.$high === k.$high && i.$low < k.$low))) { + return $append(dst, ((i.$low << 24 >>> 24))); + } + dst = $append(dst, ((k.$low << 24 >>> 24))); + i = (x$1 = k, new $Uint64(i.$high - x$1.$high, i.$low - x$1.$low)); + while (true) { + if (!((i.$high > 0 || (i.$high === 0 && i.$low >= 128)))) { break; } + dst = $append(dst, (((x$2 = new $Uint64(i.$high & 0, (i.$low & 127) >>> 0), new $Uint64(0 | x$2.$high, (128 | x$2.$low) >>> 0)).$low << 24 >>> 24))); + i = $shiftRightUint64(i, (7)); + } + return $append(dst, ((i.$low << 24 >>> 24))); + }; + appendHpackString = function(dst, s) { + var dst, first, huffmanLength, s, x; + huffmanLength = HuffmanEncodeLength(s); + if ((x = (new $Uint64(0, s.length)), (huffmanLength.$high < x.$high || (huffmanLength.$high === x.$high && huffmanLength.$low < x.$low)))) { + first = dst.$length; + dst = appendVarInt(dst, 7, huffmanLength); + dst = AppendHuffmanString(dst, s); + ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (128)) >>> 0)); + } else { + dst = appendVarInt(dst, 7, (new $Uint64(0, s.length))); + dst = $appendSlice(dst, s); + } + return dst; + }; + encodeTypeByte = function(indexing, sensitive) { + var indexing, sensitive; + if (sensitive) { + return 16; + } + if (indexing) { + return 64; + } + return 0; + }; + DecodingError.ptr.prototype.Error = function() { + var _r, de, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; de = $f.de; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + de = this; + _r = fmt.Sprintf("decoding error: %v", new sliceType([de.Err])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: DecodingError.ptr.prototype.Error }; } $f._r = _r; $f.de = de; $f.$s = $s; $f.$r = $r; return $f; + }; + DecodingError.prototype.Error = function() { return this.$val.Error(); }; + InvalidIndexError.prototype.Error = function() { + var _r, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r = fmt.Sprintf("invalid indexed representation index %d", new sliceType([new $Int(((e >> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: InvalidIndexError.prototype.Error }; } $f._r = _r; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(InvalidIndexError).prototype.Error = function() { return new InvalidIndexError(this.$get()).Error(); }; + HeaderField.ptr.prototype.IsPseudo = function() { + var hf; + hf = this; + return !((hf.Name.length === 0)) && (hf.Name.charCodeAt(0) === 58); + }; + HeaderField.prototype.IsPseudo = function() { return this.$val.IsPseudo(); }; + HeaderField.ptr.prototype.String = function() { + var _r, hf, suffix, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; hf = $f.hf; suffix = $f.suffix; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hf = this; + suffix = ""; + if (hf.Sensitive) { + suffix = " (sensitive)"; + } + _r = fmt.Sprintf("header field %q = %q%s", new sliceType([new $String(hf.Name), new $String(hf.Value), new $String(suffix)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: HeaderField.ptr.prototype.String }; } $f._r = _r; $f.hf = hf; $f.suffix = suffix; $f.$s = $s; $f.$r = $r; return $f; + }; + HeaderField.prototype.String = function() { return this.$val.String(); }; + HeaderField.ptr.prototype.Size = function() { + var hf; + hf = this; + return ((((hf.Name.length + hf.Value.length >> 0) + 32 >> 0) >>> 0)); + }; + HeaderField.prototype.Size = function() { return this.$val.Size(); }; + NewDecoder = function(maxDynamicTableSize, emitFunc) { + var d, emitFunc, maxDynamicTableSize, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; emitFunc = $f.emitFunc; maxDynamicTableSize = $f.maxDynamicTableSize; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = new Decoder.ptr(new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0), emitFunc, true, 0, sliceType$1.nil, new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0)); + d.dynTab.table.init(); + d.dynTab.allowedMaxSize = maxDynamicTableSize; + $r = d.dynTab.setMaxSize(maxDynamicTableSize); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return d; + /* */ } return; } if ($f === undefined) { $f = { $blk: NewDecoder }; } $f.d = d; $f.emitFunc = emitFunc; $f.maxDynamicTableSize = maxDynamicTableSize; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewDecoder = NewDecoder; + Decoder.ptr.prototype.SetMaxStringLength = function(n) { + var d, n; + d = this; + d.maxStrLen = n; + }; + Decoder.prototype.SetMaxStringLength = function(n) { return this.$val.SetMaxStringLength(n); }; + Decoder.ptr.prototype.SetEmitFunc = function(emitFunc) { + var d, emitFunc; + d = this; + d.emit = emitFunc; + }; + Decoder.prototype.SetEmitFunc = function(emitFunc) { return this.$val.SetEmitFunc(emitFunc); }; + Decoder.ptr.prototype.SetEmitEnabled = function(v) { + var d, v; + d = this; + d.emitEnabled = v; + }; + Decoder.prototype.SetEmitEnabled = function(v) { return this.$val.SetEmitEnabled(v); }; + Decoder.ptr.prototype.EmitEnabled = function() { + var d; + d = this; + return d.emitEnabled; + }; + Decoder.prototype.EmitEnabled = function() { return this.$val.EmitEnabled(); }; + Decoder.ptr.prototype.SetMaxDynamicTableSize = function(v) { + var d, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + $r = d.dynTab.setMaxSize(v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.SetMaxDynamicTableSize }; } $f.d = d; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.SetMaxDynamicTableSize = function(v) { return this.$val.SetMaxDynamicTableSize(v); }; + Decoder.ptr.prototype.SetAllowedMaxDynamicTableSize = function(v) { + var d, v; + d = this; + d.dynTab.allowedMaxSize = v; + }; + Decoder.prototype.SetAllowedMaxDynamicTableSize = function(v) { return this.$val.SetAllowedMaxDynamicTableSize(v); }; + dynamicTable.ptr.prototype.setMaxSize = function(v) { + var dt, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dt = $f.dt; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dt = this; + dt.maxSize = v; + $r = dt.evict(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: dynamicTable.ptr.prototype.setMaxSize }; } $f.dt = dt; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + dynamicTable.prototype.setMaxSize = function(v) { return this.$val.setMaxSize(v); }; + dynamicTable.ptr.prototype.add = function(f) { + var dt, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dt = $f.dt; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dt = this; + dt.table.addEntry($clone(f, HeaderField)); + dt.size = dt.size + ($clone(f, HeaderField).Size()) >>> 0; + $r = dt.evict(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: dynamicTable.ptr.prototype.add }; } $f.dt = dt; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + dynamicTable.prototype.add = function(f) { return this.$val.add(f); }; + dynamicTable.ptr.prototype.evict = function() { + var dt, n, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dt = $f.dt; n = $f.n; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + dt = this; + n = 0; + while (true) { + if (!(dt.size > dt.maxSize && n < dt.table.len())) { break; } + dt.size = dt.size - ($clone((x = dt.table.ents, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])), HeaderField).Size()) >>> 0; + n = n + (1) >> 0; + } + $r = dt.table.evictOldest(n); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: dynamicTable.ptr.prototype.evict }; } $f.dt = dt; $f.n = n; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + dynamicTable.prototype.evict = function() { return this.$val.evict(); }; + Decoder.ptr.prototype.maxTableIndex = function() { + var d; + d = this; + return d.dynTab.table.len() + staticTable.len() >> 0; + }; + Decoder.prototype.maxTableIndex = function() { return this.$val.maxTableIndex(); }; + Decoder.ptr.prototype.at = function(i) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, d, dt, hf, i, ok, x, x$1, x$2, x$3, x$4, x$5; + hf = new HeaderField.ptr("", "", false); + ok = false; + d = this; + if ((i.$high === 0 && i.$low === 0)) { + return [hf, ok]; + } + if ((x = (new $Uint64(0, staticTable.len())), (i.$high < x.$high || (i.$high === x.$high && i.$low <= x.$low)))) { + _tmp = $clone((x$1 = staticTable.ents, x$2 = new $Uint64(i.$high - 0, i.$low - 1), (($flatten64(x$2) < 0 || $flatten64(x$2) >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + $flatten64(x$2)])), HeaderField); + _tmp$1 = true; + HeaderField.copy(hf, _tmp); + ok = _tmp$1; + return [hf, ok]; + } + if ((x$3 = (new $Uint64(0, d.maxTableIndex())), (i.$high > x$3.$high || (i.$high === x$3.$high && i.$low > x$3.$low)))) { + return [hf, ok]; + } + dt = $clone(d.dynTab.table, headerFieldTable); + _tmp$2 = $clone((x$4 = dt.ents, x$5 = dt.len() - ((((i.$low >> 0)) - staticTable.len() >> 0)) >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])), HeaderField); + _tmp$3 = true; + HeaderField.copy(hf, _tmp$2); + ok = _tmp$3; + return [hf, ok]; + }; + Decoder.prototype.at = function(i) { return this.$val.at(i); }; + Decoder.ptr.prototype.DecodeFull = function(p) { + var _r, _tuple, d, err, err$1, hf, p, saveFunc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; d = $f.d; err = $f.err; err$1 = $f.err$1; hf = $f.hf; p = $f.p; saveFunc = $f.saveFunc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + d = [d]; + hf = [hf]; + saveFunc = [saveFunc]; + d[0] = this; + hf[0] = sliceType$2.nil; + saveFunc[0] = d[0].emit; + $deferred.push([(function(d, hf, saveFunc) { return function() { + d[0].emit = saveFunc[0]; + }; })(d, hf, saveFunc), []]); + d[0].emit = (function(d, hf, saveFunc) { return function(f) { + var f; + hf[0] = $append(hf[0], f); + }; })(d, hf, saveFunc); + _r = d[0].Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$2.nil, err]; + } + err$1 = d[0].Close(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [sliceType$2.nil, err$1]; + } + $s = -1; return [hf[0], $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType$2.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.DecodeFull }; } $f._r = _r; $f._tuple = _tuple; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.hf = hf; $f.p = p; $f.saveFunc = saveFunc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Decoder.prototype.DecodeFull = function(p) { return this.$val.DecodeFull(p); }; + Decoder.ptr.prototype.Close = function() { + var d, x; + d = this; + if (d.saveBuf.Len() > 0) { + d.saveBuf.Reset(); + return (x = new DecodingError.ptr(errors.New("truncated headers")), new x.constructor.elem(x)); + } + return $ifaceNil; + }; + Decoder.prototype.Close = function() { return this.$val.Close(); }; + Decoder.ptr.prototype.Write = function(p) { + var _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, err, n, p, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; d = $f.d; err = $f.err; n = $f.n; p = $f.p; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + d = this; + if (p.$length === 0) { + $s = -1; return [n, err]; + } + if (d.saveBuf.Len() === 0) { + d.buf = p; + } else { + d.saveBuf.Write(p); + d.buf = d.saveBuf.Bytes(); + d.saveBuf.Reset(); + } + /* while (true) { */ case 1: + /* if (!(d.buf.$length > 0)) { break; } */ if(!(d.buf.$length > 0)) { $s = 2; continue; } + _r = d.parseHeaderFieldRepr(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + if ($interfaceIsEqual(err, errNeedMore)) { + if (!((d.maxStrLen === 0)) && (x = (new $Int64(0, d.buf.$length)), x$1 = $mul64(new $Int64(0, 2), ((x$2 = (new $Int64(0, d.maxStrLen)), new $Int64(x$2.$high + 0, x$2.$low + 8)))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { + _tmp = 0; + _tmp$1 = $pkg.ErrStringLength; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + d.saveBuf.Write(d.buf); + _tmp$2 = p.$length; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 2; continue; + } + /* } */ $s = 1; continue; case 2: + _tmp$4 = p.$length; + _tmp$5 = err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.Write }; } $f._r = _r; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f.d = d; $f.err = err; $f.n = n; $f.p = p; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.Write = function(p) { return this.$val.Write(p); }; + indexType.prototype.indexed = function() { + var v; + v = this.$val; + return v === 0; + }; + $ptrType(indexType).prototype.indexed = function() { return new indexType(this.$get()).indexed(); }; + indexType.prototype.sensitive = function() { + var v; + v = this.$val; + return v === 2; + }; + $ptrType(indexType).prototype.sensitive = function() { return new indexType(this.$get()).sensitive(); }; + Decoder.ptr.prototype.parseHeaderFieldRepr = function() { + var _r, _r$1, _r$2, _r$3, _r$4, b, d, x, x$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; b = $f.b; d = $f.d; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + b = (x = d.buf, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + /* */ if (!((((b & 128) >>> 0) === 0))) { $s = 2; continue; } + /* */ if ((((b & 192) >>> 0) === 64)) { $s = 3; continue; } + /* */ if ((((b & 240) >>> 0) === 0)) { $s = 4; continue; } + /* */ if ((((b & 240) >>> 0) === 16)) { $s = 5; continue; } + /* */ if ((((b & 224) >>> 0) === 32)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((((b & 128) >>> 0) === 0))) { */ case 2: + _r = d.parseFieldIndexed(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* } else if ((((b & 192) >>> 0) === 64)) { */ case 3: + _r$1 = d.parseFieldLiteral(6, 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } else if ((((b & 240) >>> 0) === 0)) { */ case 4: + _r$2 = d.parseFieldLiteral(4, 1); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } else if ((((b & 240) >>> 0) === 16)) { */ case 5: + _r$3 = d.parseFieldLiteral(4, 2); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } else if ((((b & 224) >>> 0) === 32)) { */ case 6: + _r$4 = d.parseDynamicTableSizeUpdate(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 7: + case 1: + $s = -1; return (x$1 = new DecodingError.ptr(errors.New("invalid encoding")), new x$1.constructor.elem(x$1)); + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.parseHeaderFieldRepr }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.b = b; $f.d = d; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.parseHeaderFieldRepr = function() { return this.$val.parseHeaderFieldRepr(); }; + Decoder.ptr.prototype.parseFieldIndexed = function() { + var _r, _tuple, _tuple$1, buf, d, err, hf, idx, ok, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; buf = $f.buf; d = $f.d; err = $f.err; hf = $f.hf; idx = $f.idx; ok = $f.ok; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + buf = d.buf; + _tuple = readVarInt(7, buf); + idx = _tuple[0]; + buf = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _tuple$1 = d.at(idx); + hf = $clone(_tuple$1[0], HeaderField); + ok = _tuple$1[1]; + if (!ok) { + $s = -1; return (x = new DecodingError.ptr(new InvalidIndexError(((idx.$low >> 0)))), new x.constructor.elem(x)); + } + d.buf = buf; + _r = d.callEmit(new HeaderField.ptr(hf.Name, hf.Value, false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $s = -1; return _r; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.parseFieldIndexed }; } $f._r = _r; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.buf = buf; $f.d = d; $f.err = err; $f.hf = hf; $f.idx = idx; $f.ok = ok; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.parseFieldIndexed = function() { return this.$val.parseFieldIndexed(); }; + Decoder.ptr.prototype.parseFieldLiteral = function(n, it) { + var _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, d, err, hf, ihf, it, n, nameIdx, ok, wantStr, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; buf = $f.buf; d = $f.d; err = $f.err; hf = $f.hf; ihf = $f.ihf; it = $f.it; n = $f.n; nameIdx = $f.nameIdx; ok = $f.ok; wantStr = $f.wantStr; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + buf = d.buf; + _tuple = readVarInt(n, buf); + nameIdx = _tuple[0]; + buf = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + hf = new HeaderField.ptr("", "", false); + wantStr = d.emitEnabled || new indexType(it).indexed(); + /* */ if ((nameIdx.$high > 0 || (nameIdx.$high === 0 && nameIdx.$low > 0))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((nameIdx.$high > 0 || (nameIdx.$high === 0 && nameIdx.$low > 0))) { */ case 1: + _tuple$1 = d.at(nameIdx); + ihf = $clone(_tuple$1[0], HeaderField); + ok = _tuple$1[1]; + if (!ok) { + $s = -1; return (x = new DecodingError.ptr(new InvalidIndexError(((nameIdx.$low >> 0)))), new x.constructor.elem(x)); + } + hf.Name = ihf.Name; + $s = 3; continue; + /* } else { */ case 2: + _r = d.readString(buf, wantStr); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple$2 = _r; + hf.Name = _tuple$2[0]; + buf = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 3: + _r$1 = d.readString(buf, wantStr); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$3 = _r$1; + hf.Value = _tuple$3[0]; + buf = _tuple$3[1]; + err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + d.buf = buf; + /* */ if (new indexType(it).indexed()) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (new indexType(it).indexed()) { */ case 6: + $r = d.dynTab.add($clone(hf, HeaderField)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + hf.Sensitive = new indexType(it).sensitive(); + _r$2 = d.callEmit($clone(hf, HeaderField)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.parseFieldLiteral }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.buf = buf; $f.d = d; $f.err = err; $f.hf = hf; $f.ihf = ihf; $f.it = it; $f.n = n; $f.nameIdx = nameIdx; $f.ok = ok; $f.wantStr = wantStr; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.parseFieldLiteral = function(n, it) { return this.$val.parseFieldLiteral(n, it); }; + Decoder.ptr.prototype.callEmit = function(hf) { + var d, hf, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; hf = $f.hf; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + if (!((d.maxStrLen === 0))) { + if (hf.Name.length > d.maxStrLen || hf.Value.length > d.maxStrLen) { + $s = -1; return $pkg.ErrStringLength; + } + } + /* */ if (d.emitEnabled) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (d.emitEnabled) { */ case 1: + $r = d.emit($clone(hf, HeaderField)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.callEmit }; } $f.d = d; $f.hf = hf; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.callEmit = function(hf) { return this.$val.callEmit(hf); }; + Decoder.ptr.prototype.parseDynamicTableSizeUpdate = function() { + var _tuple, buf, d, err, size, x, x$1, x$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; buf = $f.buf; d = $f.d; err = $f.err; size = $f.size; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + if (d.dynTab.size > 0) { + $s = -1; return (x = new DecodingError.ptr(errors.New("dynamic table size update MUST occur at the beginning of a header block")), new x.constructor.elem(x)); + } + buf = d.buf; + _tuple = readVarInt(5, buf); + size = _tuple[0]; + buf = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + if ((x$1 = (new $Uint64(0, d.dynTab.allowedMaxSize)), (size.$high > x$1.$high || (size.$high === x$1.$high && size.$low > x$1.$low)))) { + $s = -1; return (x$2 = new DecodingError.ptr(errors.New("dynamic table size update too large")), new x$2.constructor.elem(x$2)); + } + $r = d.dynTab.setMaxSize(((size.$low >>> 0))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d.buf = buf; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.parseDynamicTableSizeUpdate }; } $f._tuple = _tuple; $f.buf = buf; $f.d = d; $f.err = err; $f.size = size; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.$s = $s; $f.$r = $r; return $f; + }; + Decoder.prototype.parseDynamicTableSizeUpdate = function() { return this.$val.parseDynamicTableSizeUpdate(); }; + readVarInt = function(n, p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, b, err, i, m, n, origP, p, remain, x, x$1, x$2, x$3, x$4, x$5; + i = new $Uint64(0, 0); + remain = sliceType$1.nil; + err = $ifaceNil; + if (n < 1 || n > 8) { + $panic(new $String("bad n")); + } + if (p.$length === 0) { + _tmp = new $Uint64(0, 0); + _tmp$1 = p; + _tmp$2 = errNeedMore; + i = _tmp; + remain = _tmp$1; + err = _tmp$2; + return [i, remain, err]; + } + i = (new $Uint64(0, (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]))); + if (n < 8) { + i = (x = (x$1 = $shiftLeft64(new $Uint64(0, 1), $flatten64((new $Uint64(0, n)))), new $Uint64(x$1.$high - 0, x$1.$low - 1)), new $Uint64(i.$high & x.$high, (i.$low & x.$low) >>> 0)); + } + if ((x$2 = (x$3 = $shiftLeft64(new $Uint64(0, 1), $flatten64((new $Uint64(0, n)))), new $Uint64(x$3.$high - 0, x$3.$low - 1)), (i.$high < x$2.$high || (i.$high === x$2.$high && i.$low < x$2.$low)))) { + _tmp$3 = i; + _tmp$4 = $subslice(p, 1); + _tmp$5 = $ifaceNil; + i = _tmp$3; + remain = _tmp$4; + err = _tmp$5; + return [i, remain, err]; + } + origP = p; + p = $subslice(p, 1); + m = new $Uint64(0, 0); + while (true) { + if (!(p.$length > 0)) { break; } + b = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]); + p = $subslice(p, 1); + i = (x$4 = $shiftLeft64((new $Uint64(0, ((b & 127) >>> 0))), $flatten64(m)), new $Uint64(i.$high + x$4.$high, i.$low + x$4.$low)); + if (((b & 128) >>> 0) === 0) { + _tmp$6 = i; + _tmp$7 = p; + _tmp$8 = $ifaceNil; + i = _tmp$6; + remain = _tmp$7; + err = _tmp$8; + return [i, remain, err]; + } + m = (x$5 = new $Uint64(0, 7), new $Uint64(m.$high + x$5.$high, m.$low + x$5.$low)); + if ((m.$high > 0 || (m.$high === 0 && m.$low >= 63))) { + _tmp$9 = new $Uint64(0, 0); + _tmp$10 = origP; + _tmp$11 = new errVarintOverflow.constructor.elem(errVarintOverflow); + i = _tmp$9; + remain = _tmp$10; + err = _tmp$11; + return [i, remain, err]; + } + } + _tmp$12 = new $Uint64(0, 0); + _tmp$13 = origP; + _tmp$14 = errNeedMore; + i = _tmp$12; + remain = _tmp$13; + err = _tmp$14; + return [i, remain, err]; + }; + Decoder.ptr.prototype.readString = function(p, wantStr) { + var _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, d, err, err$1, isHuff, p, remain, s, strLen, wantStr, x, x$1, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; buf = $f.buf; d = $f.d; err = $f.err; err$1 = $f.err$1; isHuff = $f.isHuff; p = $f.p; remain = $f.remain; s = $f.s; strLen = $f.strLen; wantStr = $f.wantStr; x = $f.x; x$1 = $f.x$1; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = ""; + remain = sliceType$1.nil; + err = $ifaceNil; + d = this; + if (p.$length === 0) { + _tmp = ""; + _tmp$1 = p; + _tmp$2 = errNeedMore; + s = _tmp; + remain = _tmp$1; + err = _tmp$2; + $s = -1; return [s, remain, err]; + } + isHuff = !(((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) & 128) >>> 0) === 0)); + _tuple = readVarInt(7, p); + strLen = _tuple[0]; + p = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$3 = ""; + _tmp$4 = p; + _tmp$5 = err; + s = _tmp$3; + remain = _tmp$4; + err = _tmp$5; + $s = -1; return [s, remain, err]; + } + if (!((d.maxStrLen === 0)) && (x = (new $Uint64(0, d.maxStrLen)), (strLen.$high > x.$high || (strLen.$high === x.$high && strLen.$low > x.$low)))) { + _tmp$6 = ""; + _tmp$7 = sliceType$1.nil; + _tmp$8 = $pkg.ErrStringLength; + s = _tmp$6; + remain = _tmp$7; + err = _tmp$8; + $s = -1; return [s, remain, err]; + } + if ((x$1 = (new $Uint64(0, p.$length)), (x$1.$high < strLen.$high || (x$1.$high === strLen.$high && x$1.$low < strLen.$low)))) { + _tmp$9 = ""; + _tmp$10 = p; + _tmp$11 = errNeedMore; + s = _tmp$9; + remain = _tmp$10; + err = _tmp$11; + $s = -1; return [s, remain, err]; + } + if (!isHuff) { + if (wantStr) { + s = ($bytesToString($subslice(p, 0, $flatten64(strLen)))); + } + _tmp$12 = s; + _tmp$13 = $subslice(p, $flatten64(strLen)); + _tmp$14 = $ifaceNil; + s = _tmp$12; + remain = _tmp$13; + err = _tmp$14; + $s = -1; return [s, remain, err]; + } + /* */ if (wantStr) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (wantStr) { */ case 1: + _r = bufPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + buf = $assertType(_r, ptrType$1); + buf.Reset(); + $deferred.push([$methodVal(bufPool, "Put"), [buf]]); + _r$1 = huffmanDecode(buf, d.maxStrLen, $subslice(p, 0, $flatten64(strLen))); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + buf.Reset(); + _tmp$15 = ""; + _tmp$16 = sliceType$1.nil; + _tmp$17 = err$1; + s = _tmp$15; + remain = _tmp$16; + err = _tmp$17; + $s = -1; return [s, remain, err]; + } + s = buf.String(); + buf.Reset(); + /* } */ case 2: + _tmp$18 = s; + _tmp$19 = $subslice(p, $flatten64(strLen)); + _tmp$20 = $ifaceNil; + s = _tmp$18; + remain = _tmp$19; + err = _tmp$20; + $s = -1; return [s, remain, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [s, remain, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.readString }; } $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f.buf = buf; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.isHuff = isHuff; $f.p = p; $f.remain = remain; $f.s = s; $f.strLen = strLen; $f.wantStr = wantStr; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Decoder.prototype.readString = function(p, wantStr) { return this.$val.readString(p, wantStr); }; + huffmanDecode = function(buf, maxLen, v) { + var _i, _r, _ref, _tmp, _tmp$1, _tmp$2, b, buf, cbits, cur, idx, mask, maxLen, n, rootHuffmanNode, sbits, v, x, x$1, x$2, y, y$1, y$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r = $f._r; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; b = $f.b; buf = $f.buf; cbits = $f.cbits; cur = $f.cur; idx = $f.idx; mask = $f.mask; maxLen = $f.maxLen; n = $f.n; rootHuffmanNode = $f.rootHuffmanNode; sbits = $f.sbits; v = $f.v; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r = getRootHuffmanNode(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + rootHuffmanNode = _r; + n = rootHuffmanNode; + _tmp = 0; + _tmp$1 = 0; + _tmp$2 = 0; + cur = _tmp; + cbits = _tmp$1; + sbits = _tmp$2; + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + cur = ((cur << 8 >>> 0) | ((b >>> 0))) >>> 0; + cbits = cbits + (8) << 24 >>> 24; + sbits = sbits + (8) << 24 >>> 24; + while (true) { + if (!(cbits >= 8)) { break; } + idx = ((((y = ((cbits - 8 << 24 >>> 24)), y < 32 ? (cur >>> y) : 0) >>> 0) << 24 >>> 24)); + n = (x = n.children, (x.nilCheck, ((idx < 0 || idx >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[idx]))); + if (n === ptrType.nil) { + $s = -1; return $pkg.ErrInvalidHuffman; + } + if ($equal(n.children, ptrType$2.nil, arrayType$1)) { + if (!((maxLen === 0)) && (buf.Len() === maxLen)) { + $s = -1; return $pkg.ErrStringLength; + } + buf.WriteByte(n.sym); + cbits = cbits - (n.codeLen) << 24 >>> 24; + n = rootHuffmanNode; + sbits = cbits; + } else { + cbits = cbits - (8) << 24 >>> 24; + } + } + _i++; + } + while (true) { + if (!(cbits > 0)) { break; } + n = (x$1 = n.children, x$2 = ((((y$1 = ((8 - cbits << 24 >>> 24)), y$1 < 32 ? (cur << y$1) : 0) >>> 0) << 24 >>> 24)), (x$1.nilCheck, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2]))); + if (n === ptrType.nil) { + $s = -1; return $pkg.ErrInvalidHuffman; + } + if (!($equal(n.children, ptrType$2.nil, arrayType$1)) || n.codeLen > cbits) { + break; + } + if (!((maxLen === 0)) && (buf.Len() === maxLen)) { + $s = -1; return $pkg.ErrStringLength; + } + buf.WriteByte(n.sym); + cbits = cbits - (n.codeLen) << 24 >>> 24; + n = rootHuffmanNode; + sbits = cbits; + } + if (sbits > 7) { + $s = -1; return $pkg.ErrInvalidHuffman; + } + mask = ((((y$2 = cbits, y$2 < 32 ? (1 << y$2) : 0) >>> 0) - 1 >>> 0)); + if (!((((cur & mask) >>> 0) === mask))) { + $s = -1; return $pkg.ErrInvalidHuffman; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: huffmanDecode }; } $f._i = _i; $f._r = _r; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f.b = b; $f.buf = buf; $f.cbits = cbits; $f.cur = cur; $f.idx = idx; $f.mask = mask; $f.maxLen = maxLen; $f.n = n; $f.rootHuffmanNode = rootHuffmanNode; $f.sbits = sbits; $f.v = v; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.$s = $s; $f.$r = $r; return $f; + }; + newInternalNode = function() { + return new node.ptr(arrayType$1.zero(), 0, 0); + }; + getRootHuffmanNode = function() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = buildRootOnce.Do(buildRootHuffmanNode); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return lazyRootHuffmanNode; + /* */ } return; } if ($f === undefined) { $f = { $blk: getRootHuffmanNode }; } $f.$s = $s; $f.$r = $r; return $f; + }; + buildRootHuffmanNode = function() { + var _i, _ref, code, i; + if (false) { + $panic(new $String("unexpected size")); + } + lazyRootHuffmanNode = newInternalNode(); + _ref = huffmanCodes; + _i = 0; + while (true) { + if (!(_i < 256)) { break; } + i = _i; + code = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); + addDecoderNode(((i << 24 >>> 24)), code, ((i < 0 || i >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[i])); + _i++; + } + }; + addDecoderNode = function(sym, code, codeLen) { + var _tmp, _tmp$1, code, codeLen, cur, end, i, i$1, shift, start, sym, x, x$1, x$2, x$3, y, y$1, y$2; + cur = lazyRootHuffmanNode; + while (true) { + if (!(codeLen > 8)) { break; } + codeLen = codeLen - (8) << 24 >>> 24; + i = ((((y = codeLen, y < 32 ? (code >>> y) : 0) >>> 0) << 24 >>> 24)); + if ((x = cur.children, (x.nilCheck, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i]))) === ptrType.nil) { + (x$1 = cur.children, x$1.nilCheck, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i] = newInternalNode())); + } + cur = (x$2 = cur.children, (x$2.nilCheck, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i]))); + } + shift = 8 - codeLen << 24 >>> 24; + _tmp = ((((((y$1 = shift, y$1 < 32 ? (code << y$1) : 0) >>> 0) << 24 >>> 24)) >> 0)); + _tmp$1 = (((y$2 = shift, y$2 < 32 ? (1 << y$2) : 0) >> 0)); + start = _tmp; + end = _tmp$1; + i$1 = start; + while (true) { + if (!(i$1 < (start + end >> 0))) { break; } + (x$3 = cur.children, x$3.nilCheck, ((i$1 < 0 || i$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i$1] = new node.ptr(ptrType$2.nil, codeLen, sym))); + i$1 = i$1 + (1) >> 0; + } + }; + AppendHuffmanString = function(dst, s) { + var _index, _tuple, code, dst, i, nbits, rembits, s, t, y; + rembits = 8; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (rembits === 8) { + dst = $append(dst, 0); + } + _tuple = appendByteToHuffmanCode(dst, rembits, s.charCodeAt(i)); + dst = _tuple[0]; + rembits = _tuple[1]; + i = i + (1) >> 0; + } + if (rembits < 8) { + code = 1073741823; + nbits = 30; + t = ((((y = ((nbits - rembits << 24 >>> 24)), y < 32 ? (code >>> y) : 0) >>> 0) << 24 >>> 24)); + _index = dst.$length - 1 >> 0; + ((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index] = ((((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index]) | (t)) >>> 0)); + } + return dst; + }; + $pkg.AppendHuffmanString = AppendHuffmanString; + HuffmanEncodeLength = function(s) { + var i, n, s, x, x$1; + n = new $Uint64(0, 0); + i = 0; + while (true) { + if (!(i < s.length)) { break; } + n = (x = (new $Uint64(0, (x$1 = s.charCodeAt(i), ((x$1 < 0 || x$1 >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[x$1])))), new $Uint64(n.$high + x.$high, n.$low + x.$low)); + i = i + (1) >> 0; + } + return $div64((new $Uint64(n.$high + 0, n.$low + 7)), new $Uint64(0, 8), false); + }; + $pkg.HuffmanEncodeLength = HuffmanEncodeLength; + appendByteToHuffmanCode = function(dst, rembits, c) { + var _index, _index$1, c, code, dst, nbits, rembits, t, t$1, y, y$1; + code = ((c < 0 || c >= huffmanCodes.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodes[c]); + nbits = ((c < 0 || c >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[c]); + while (true) { + if (rembits > nbits) { + t = ((((y = ((rembits - nbits << 24 >>> 24)), y < 32 ? (code << y) : 0) >>> 0) << 24 >>> 24)); + _index = dst.$length - 1 >> 0; + ((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index] = ((((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index]) | (t)) >>> 0)); + rembits = rembits - (nbits) << 24 >>> 24; + break; + } + t$1 = ((((y$1 = ((nbits - rembits << 24 >>> 24)), y$1 < 32 ? (code >>> y$1) : 0) >>> 0) << 24 >>> 24)); + _index$1 = dst.$length - 1 >> 0; + ((_index$1 < 0 || _index$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index$1] = ((((_index$1 < 0 || _index$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index$1]) | (t$1)) >>> 0)); + nbits = nbits - (rembits) << 24 >>> 24; + rembits = 8; + if (nbits === 0) { + break; + } + dst = $append(dst, 0); + } + return [dst, rembits]; + }; + headerFieldTable.ptr.prototype.init = function() { + var t; + t = this; + t.byName = {}; + t.byNameValue = {}; + }; + headerFieldTable.prototype.init = function() { return this.$val.init(); }; + headerFieldTable.ptr.prototype.len = function() { + var t; + t = this; + return t.ents.$length; + }; + headerFieldTable.prototype.len = function() { return this.$val.len(); }; + headerFieldTable.ptr.prototype.addEntry = function(f) { + var _key, _key$1, f, id, t, x, x$1, x$2; + t = this; + id = (x = (x$1 = (new $Uint64(0, t.len())), x$2 = t.evictCount, new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)), new $Uint64(x.$high + 0, x.$low + 1)); + _key = f.Name; (t.byName || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: id }; + _key$1 = new pairNameValue.ptr(f.Name, f.Value); (t.byNameValue || $throwRuntimeError("assignment to entry in nil map"))[pairNameValue.keyFor(_key$1)] = { k: _key$1, v: id }; + t.ents = $append(t.ents, f); + }; + headerFieldTable.prototype.addEntry = function(f) { return this.$val.addEntry(f); }; + headerFieldTable.ptr.prototype.evictOldest = function(n) { + var _entry, _entry$1, _r, f, id, k, k$1, n, p, t, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _r = $f._r; f = $f.f; id = $f.id; k = $f.k; k$1 = $f.k$1; n = $f.n; p = $f.p; t = $f.t; x = $f.x; x$1 = $f.x$1; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + /* */ if (n > t.len()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (n > t.len()) { */ case 1: + _r = fmt.Sprintf("evictOldest(%v) on table with %v entries", new sliceType([new $Int(n), new $Int(t.len())])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $panic(new $String(_r)); + /* } */ case 2: + k = 0; + while (true) { + if (!(k < n)) { break; } + f = $clone((x = t.ents, ((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k])), HeaderField); + id = (x$1 = (x$2 = t.evictCount, x$3 = (new $Uint64(0, k)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), new $Uint64(x$1.$high + 0, x$1.$low + 1)); + if ((x$4 = (_entry = t.byName[$String.keyFor(f.Name)], _entry !== undefined ? _entry.v : new $Uint64(0, 0)), (x$4.$high === id.$high && x$4.$low === id.$low))) { + delete t.byName[$String.keyFor(f.Name)]; + } + p = $clone(new pairNameValue.ptr(f.Name, f.Value), pairNameValue); + if ((x$5 = (_entry$1 = t.byNameValue[pairNameValue.keyFor(p)], _entry$1 !== undefined ? _entry$1.v : new $Uint64(0, 0)), (x$5.$high === id.$high && x$5.$low === id.$low))) { + delete t.byNameValue[pairNameValue.keyFor(p)]; + } + k = k + (1) >> 0; + } + $copySlice(t.ents, $subslice(t.ents, n)); + k$1 = t.len() - n >> 0; + while (true) { + if (!(k$1 < t.len())) { break; } + HeaderField.copy((x$6 = t.ents, ((k$1 < 0 || k$1 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + k$1])), new HeaderField.ptr("", "", false)); + k$1 = k$1 + (1) >> 0; + } + t.ents = $subslice(t.ents, 0, (t.len() - n >> 0)); + if ((x$7 = (x$8 = t.evictCount, x$9 = (new $Uint64(0, n)), new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)), x$10 = t.evictCount, (x$7.$high < x$10.$high || (x$7.$high === x$10.$high && x$7.$low < x$10.$low)))) { + $panic(new $String("evictCount overflow")); + } + t.evictCount = (x$11 = t.evictCount, x$12 = (new $Uint64(0, n)), new $Uint64(x$11.$high + x$12.$high, x$11.$low + x$12.$low)); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: headerFieldTable.ptr.prototype.evictOldest }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._r = _r; $f.f = f; $f.id = id; $f.k = k; $f.k$1 = k$1; $f.n = n; $f.p = p; $f.t = t; $f.x = x; $f.x$1 = x$1; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + headerFieldTable.prototype.evictOldest = function(n) { return this.$val.evictOldest(n); }; + headerFieldTable.ptr.prototype.search = function(f) { + var _entry, _entry$1, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, f, i, id, id$1, nameValueMatch, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _r = $f._r; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; f = $f.f; i = $f.i; id = $f.id; id$1 = $f.id$1; nameValueMatch = $f.nameValueMatch; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = new $Uint64(0, 0); + nameValueMatch = false; + t = this; + /* */ if (!f.Sensitive) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!f.Sensitive) { */ case 1: + id = (_entry = t.byNameValue[pairNameValue.keyFor(new pairNameValue.ptr(f.Name, f.Value))], _entry !== undefined ? _entry.v : new $Uint64(0, 0)); + /* */ if (!((id.$high === 0 && id.$low === 0))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((id.$high === 0 && id.$low === 0))) { */ case 3: + _r = t.idToIndex(id); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tmp = _r; + _tmp$1 = true; + i = _tmp; + nameValueMatch = _tmp$1; + $s = -1; return [i, nameValueMatch]; + /* } */ case 4: + /* } */ case 2: + id$1 = (_entry$1 = t.byName[$String.keyFor(f.Name)], _entry$1 !== undefined ? _entry$1.v : new $Uint64(0, 0)); + /* */ if (!((id$1.$high === 0 && id$1.$low === 0))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((id$1.$high === 0 && id$1.$low === 0))) { */ case 6: + _r$1 = t.idToIndex(id$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$2 = _r$1; + _tmp$3 = false; + i = _tmp$2; + nameValueMatch = _tmp$3; + $s = -1; return [i, nameValueMatch]; + /* } */ case 7: + _tmp$4 = new $Uint64(0, 0); + _tmp$5 = false; + i = _tmp$4; + nameValueMatch = _tmp$5; + $s = -1; return [i, nameValueMatch]; + /* */ } return; } if ($f === undefined) { $f = { $blk: headerFieldTable.ptr.prototype.search }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._r = _r; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f.f = f; $f.i = i; $f.id = id; $f.id$1 = id$1; $f.nameValueMatch = nameValueMatch; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + headerFieldTable.prototype.search = function(f) { return this.$val.search(f); }; + headerFieldTable.ptr.prototype.idToIndex = function(id) { + var _r, id, k, t, x, x$1, x$2, x$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; id = $f.id; k = $f.k; t = $f.t; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + /* */ if ((x = t.evictCount, (id.$high < x.$high || (id.$high === x.$high && id.$low <= x.$low)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x = t.evictCount, (id.$high < x.$high || (id.$high === x.$high && id.$low <= x.$low)))) { */ case 1: + _r = fmt.Sprintf("id (%v) <= evictCount (%v)", new sliceType([id, t.evictCount])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $panic(new $String(_r)); + /* } */ case 2: + k = (x$1 = (x$2 = t.evictCount, new $Uint64(id.$high - x$2.$high, id.$low - x$2.$low)), new $Uint64(x$1.$high - 0, x$1.$low - 1)); + if (!(t === staticTable)) { + $s = -1; return (x$3 = (new $Uint64(0, t.len())), new $Uint64(x$3.$high - k.$high, x$3.$low - k.$low)); + } + $s = -1; return new $Uint64(k.$high + 0, k.$low + 1); + /* */ } return; } if ($f === undefined) { $f = { $blk: headerFieldTable.ptr.prototype.idToIndex }; } $f._r = _r; $f.id = id; $f.k = k; $f.t = t; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.$s = $s; $f.$r = $r; return $f; + }; + headerFieldTable.prototype.idToIndex = function(id) { return this.$val.idToIndex(id); }; + newStaticTable = function() { + var _i, _ref, e, t; + t = new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false); + t.init(); + _ref = new sliceType$2(staticTableEntries); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), HeaderField); + t.addEntry($clone(e, HeaderField)); + _i++; + } + return t; + }; + ptrType$3.methods = [{prop: "WriteField", name: "WriteField", pkg: "", typ: $funcType([HeaderField], [$error], false)}, {prop: "searchTable", name: "searchTable", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Uint64, $Bool], false)}, {prop: "SetMaxDynamicTableSize", name: "SetMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "SetMaxDynamicTableSizeLimit", name: "SetMaxDynamicTableSizeLimit", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "shouldIndex", name: "shouldIndex", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Bool], false)}]; + DecodingError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + InvalidIndexError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + HeaderField.methods = [{prop: "IsPseudo", name: "IsPseudo", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uint32], false)}]; + ptrType$4.methods = [{prop: "SetMaxStringLength", name: "SetMaxStringLength", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetEmitFunc", name: "SetEmitFunc", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "SetEmitEnabled", name: "SetEmitEnabled", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "EmitEnabled", name: "EmitEnabled", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "SetMaxDynamicTableSize", name: "SetMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "SetAllowedMaxDynamicTableSize", name: "SetAllowedMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "maxTableIndex", name: "maxTableIndex", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$Int], false)}, {prop: "at", name: "at", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([$Uint64], [HeaderField, $Bool], false)}, {prop: "DecodeFull", name: "DecodeFull", pkg: "", typ: $funcType([sliceType$1], [sliceType$2, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "parseHeaderFieldRepr", name: "parseHeaderFieldRepr", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "parseFieldIndexed", name: "parseFieldIndexed", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "parseFieldLiteral", name: "parseFieldLiteral", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([$Uint8, indexType], [$error], false)}, {prop: "callEmit", name: "callEmit", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [$error], false)}, {prop: "parseDynamicTableSizeUpdate", name: "parseDynamicTableSizeUpdate", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "readString", name: "readString", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([sliceType$1, $Bool], [$String, sliceType$1, $error], false)}]; + ptrType$5.methods = [{prop: "setMaxSize", name: "setMaxSize", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([$Uint32], [], false)}, {prop: "add", name: "add", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [], false)}, {prop: "evict", name: "evict", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [], false)}]; + indexType.methods = [{prop: "indexed", name: "indexed", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$Bool], false)}, {prop: "sensitive", name: "sensitive", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$Bool], false)}]; + ptrType$6.methods = [{prop: "init", name: "init", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [], false)}, {prop: "len", name: "len", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([], [$Int], false)}, {prop: "addEntry", name: "addEntry", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [], false)}, {prop: "evictOldest", name: "evictOldest", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([$Int], [], false)}, {prop: "search", name: "search", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Uint64, $Bool], false)}, {prop: "idToIndex", name: "idToIndex", pkg: "vendor/golang_org/x/net/http2/hpack", typ: $funcType([$Uint64], [$Uint64], false)}]; + Encoder.init("vendor/golang_org/x/net/http2/hpack", [{prop: "dynTab", name: "dynTab", embedded: false, exported: false, typ: dynamicTable, tag: ""}, {prop: "minSize", name: "minSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxSizeLimit", name: "maxSizeLimit", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "tableSizeUpdate", name: "tableSizeUpdate", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + DecodingError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); + HeaderField.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Sensitive", name: "Sensitive", embedded: false, exported: true, typ: $Bool, tag: ""}]); + Decoder.init("vendor/golang_org/x/net/http2/hpack", [{prop: "dynTab", name: "dynTab", embedded: false, exported: false, typ: dynamicTable, tag: ""}, {prop: "emit", name: "emit", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "emitEnabled", name: "emitEnabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "maxStrLen", name: "maxStrLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "saveBuf", name: "saveBuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}]); + dynamicTable.init("vendor/golang_org/x/net/http2/hpack", [{prop: "table", name: "table", embedded: false, exported: false, typ: headerFieldTable, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxSize", name: "maxSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "allowedMaxSize", name: "allowedMaxSize", embedded: false, exported: false, typ: $Uint32, tag: ""}]); + node.init("vendor/golang_org/x/net/http2/hpack", [{prop: "children", name: "children", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "codeLen", name: "codeLen", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "sym", name: "sym", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + headerFieldTable.init("vendor/golang_org/x/net/http2/hpack", [{prop: "ents", name: "ents", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "evictCount", name: "evictCount", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "byNameValue", name: "byNameValue", embedded: false, exported: false, typ: mapType$1, tag: ""}]); + pairNameValue.init("vendor/golang_org/x/net/http2/hpack", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + buildRootOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + lazyRootHuffmanNode = ptrType.nil; + $pkg.ErrStringLength = errors.New("hpack: string too long"); + errNeedMore = errors.New("need more data"); + errVarintOverflow = new DecodingError.ptr(errors.New("varint integer overflow")); + bufPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return new bytes.Buffer.ptr(sliceType$1.nil, 0, arrayType.zero(), 0); + })); + $pkg.ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data"); + staticTableEntries = $toNativeArray($kindStruct, [new HeaderField.ptr(":authority", "", false), new HeaderField.ptr(":method", "GET", false), new HeaderField.ptr(":method", "POST", false), new HeaderField.ptr(":path", "/", false), new HeaderField.ptr(":path", "/index.html", false), new HeaderField.ptr(":scheme", "http", false), new HeaderField.ptr(":scheme", "https", false), new HeaderField.ptr(":status", "200", false), new HeaderField.ptr(":status", "204", false), new HeaderField.ptr(":status", "206", false), new HeaderField.ptr(":status", "304", false), new HeaderField.ptr(":status", "400", false), new HeaderField.ptr(":status", "404", false), new HeaderField.ptr(":status", "500", false), new HeaderField.ptr("accept-charset", "", false), new HeaderField.ptr("accept-encoding", "gzip, deflate", false), new HeaderField.ptr("accept-language", "", false), new HeaderField.ptr("accept-ranges", "", false), new HeaderField.ptr("accept", "", false), new HeaderField.ptr("access-control-allow-origin", "", false), new HeaderField.ptr("age", "", false), new HeaderField.ptr("allow", "", false), new HeaderField.ptr("authorization", "", false), new HeaderField.ptr("cache-control", "", false), new HeaderField.ptr("content-disposition", "", false), new HeaderField.ptr("content-encoding", "", false), new HeaderField.ptr("content-language", "", false), new HeaderField.ptr("content-length", "", false), new HeaderField.ptr("content-location", "", false), new HeaderField.ptr("content-range", "", false), new HeaderField.ptr("content-type", "", false), new HeaderField.ptr("cookie", "", false), new HeaderField.ptr("date", "", false), new HeaderField.ptr("etag", "", false), new HeaderField.ptr("expect", "", false), new HeaderField.ptr("expires", "", false), new HeaderField.ptr("from", "", false), new HeaderField.ptr("host", "", false), new HeaderField.ptr("if-match", "", false), new HeaderField.ptr("if-modified-since", "", false), new HeaderField.ptr("if-none-match", "", false), new HeaderField.ptr("if-range", "", false), new HeaderField.ptr("if-unmodified-since", "", false), new HeaderField.ptr("last-modified", "", false), new HeaderField.ptr("link", "", false), new HeaderField.ptr("location", "", false), new HeaderField.ptr("max-forwards", "", false), new HeaderField.ptr("proxy-authenticate", "", false), new HeaderField.ptr("proxy-authorization", "", false), new HeaderField.ptr("range", "", false), new HeaderField.ptr("referer", "", false), new HeaderField.ptr("refresh", "", false), new HeaderField.ptr("retry-after", "", false), new HeaderField.ptr("server", "", false), new HeaderField.ptr("set-cookie", "", false), new HeaderField.ptr("strict-transport-security", "", false), new HeaderField.ptr("transfer-encoding", "", false), new HeaderField.ptr("user-agent", "", false), new HeaderField.ptr("vary", "", false), new HeaderField.ptr("via", "", false), new HeaderField.ptr("www-authenticate", "", false)]); + staticTable = newStaticTable(); + huffmanCodes = $toNativeArray($kindUint32, [8184, 8388568, 268435426, 268435427, 268435428, 268435429, 268435430, 268435431, 268435432, 16777194, 1073741820, 268435433, 268435434, 1073741821, 268435435, 268435436, 268435437, 268435438, 268435439, 268435440, 268435441, 268435442, 1073741822, 268435443, 268435444, 268435445, 268435446, 268435447, 268435448, 268435449, 268435450, 268435451, 20, 1016, 1017, 4090, 8185, 21, 248, 2042, 1018, 1019, 249, 2043, 250, 22, 23, 24, 0, 1, 2, 25, 26, 27, 28, 29, 30, 31, 92, 251, 32764, 32, 4091, 1020, 8186, 33, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 252, 115, 253, 8187, 524272, 8188, 16380, 34, 32765, 3, 35, 4, 36, 5, 37, 38, 39, 6, 116, 117, 40, 41, 42, 7, 43, 118, 44, 8, 9, 45, 119, 120, 121, 122, 123, 32766, 2044, 16381, 8189, 268435452, 1048550, 4194258, 1048551, 1048552, 4194259, 4194260, 4194261, 8388569, 4194262, 8388570, 8388571, 8388572, 8388573, 8388574, 16777195, 8388575, 16777196, 16777197, 4194263, 8388576, 16777198, 8388577, 8388578, 8388579, 8388580, 2097116, 4194264, 8388581, 4194265, 8388582, 8388583, 16777199, 4194266, 2097117, 1048553, 4194267, 4194268, 8388584, 8388585, 2097118, 8388586, 4194269, 4194270, 16777200, 2097119, 4194271, 8388587, 8388588, 2097120, 2097121, 4194272, 2097122, 8388589, 4194273, 8388590, 8388591, 1048554, 4194274, 4194275, 4194276, 8388592, 4194277, 4194278, 8388593, 67108832, 67108833, 1048555, 524273, 4194279, 8388594, 4194280, 33554412, 67108834, 67108835, 67108836, 134217694, 134217695, 67108837, 16777201, 33554413, 524274, 2097123, 67108838, 134217696, 134217697, 67108839, 134217698, 16777202, 2097124, 2097125, 67108840, 67108841, 268435453, 134217699, 134217700, 134217701, 1048556, 16777203, 1048557, 2097126, 4194281, 2097127, 2097128, 8388595, 4194282, 4194283, 33554414, 33554415, 16777204, 16777205, 67108842, 8388596, 67108843, 134217702, 67108844, 67108845, 134217703, 134217704, 134217705, 134217706, 134217707, 268435454, 134217708, 134217709, 134217710, 134217711, 134217712, 67108846]); + huffmanCodeLen = $toNativeArray($kindUint8, [13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10, 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6, 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5, 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28, 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23, 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24, 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23, 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23, 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25, 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27, 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23, 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["net/http"] = (function() { + var $pkg = {}, $init, bufio, bytes, gzip, list, context, rand, tls, base64, binary, errors, fmt, js, io, ioutil, log, math, rand$1, mime, multipart, net, httptrace, internal, textproto, url, os, path, filepath, reflect, runtime, sort, strconv, strings, sync, atomic, time, utf8, httpguts, httpproxy, hpack, idna, streamReader, fetchTransport, noTransport, XHRTransport, Client, RoundTripper, cancelTimerBody, Cookie, SameSite, http2ClientConnPool, http2clientConnPoolIdleCloser, http2clientConnPool, http2dialCall, http2addConnCall, http2noDialClientConnPool, http2noDialH2RoundTripper, http2dataBuffer, http2ErrCode, http2ConnectionError, http2StreamError, http2goAwayFlowError, http2connError, http2pseudoHeaderError, http2duplicatePseudoHeaderError, http2headerFieldNameError, http2headerFieldValueError, http2flow, http2FrameType, http2Flags, http2FrameHeader, http2Frame, http2Framer, http2frameCache, http2DataFrame, http2SettingsFrame, http2PingFrame, http2GoAwayFrame, http2UnknownFrame, http2WindowUpdateFrame, http2HeadersFrame, http2HeadersFrameParam, http2PriorityFrame, http2PriorityParam, http2RSTStreamFrame, http2ContinuationFrame, http2PushPromiseFrame, http2PushPromiseParam, http2MetaHeadersFrame, http2contextContext, http2clientTrace, http2goroutineLock, http2streamState, http2Setting, http2SettingID, http2gate, http2closeWaiter, http2bufferedWriter, http2httpError, http2connectionStater, http2sorter, http2pipe, http2pipeBuffer, http2Server, http2serverInternalState, http2ServeConnOpts, http2serverConn, http2stream, http2readFrameResult, http2frameWriteResult, http2serverMessage, http2requestParam, http2bodyReadMsg, http2requestBody, http2responseWriter, http2responseWriterState, http2chunkWriter, http2pushOptions, http2startPushRequest, http2Transport, http2ClientConn, http2clientStream, http2stickyErrWriter, http2noCachedConnError, http2RoundTripOpt, http2clientConnIdleState, http2badStringError, http2resAndError, http2clientConnReadLoop, http2GoAwayError, http2transportResponseBody, http2erringRoundTripper, http2gzipReader, http2bodyWriterState, http2writeFramer, http2writeContext, http2flushFrameWriter, http2writeSettings, http2writeGoAway, http2writeData, http2handlerPanicRST, http2writePingAck, http2writeSettingsAck, http2writeResHeaders, http2writePushPromise, http2write100ContinueHeadersFrame, http2writeWindowUpdate, http2WriteScheduler, http2OpenStreamOptions, http2FrameWriteRequest, http2writeQueue, http2writeQueuePool, http2PriorityWriteSchedulerConfig, http2priorityNodeState, http2priorityNode, http2sortPriorityNodeSiblings, http2priorityWriteScheduler, http2randomWriteScheduler, Header, writeStringer, stringWriter, keyValues, headerSorter, contextKey, noBody, PushOptions, CookieJar, ProtocolError, badStringError, Request, requestBodyReadError, maxBytesReader, Response, Handler, ResponseWriter, conn, chunkWriter, response, atomicBool, writerOnly, readResult, connReader, expectContinueReader, extraHeader, closeWriter, badRequestError, HandlerFunc, redirectHandler, ServeMux, muxEntry, Server, ConnState, serverHandler, tcpKeepAliveListener, onceCloseListener, globalOptionsHandler, initNPNRequest, loggingConn, checkConnErrorWriter, sniffSig, exactSig, maskedSig, htmlSig, mp4Sig, textSig, socksCommand, socksAuthMethod, socksReply, socksAddr, socksConn, socksDialer, socksUsernamePassword, errorReader, byteReader, transferBodyReader, transferWriter, transferReader, body, bodyLocked, finishAsyncByteRead, Transport, h2Transport, transportRequest, transportReadFromServerError, connCloseListener, persistConnWriter, connectMethod, connectMethodKey, persistConn, nothingWrittenError, responseAndError, requestAndChan, writeRequest, httpError, tLogKey, bodyEOFSignal, gzipReader, tlsHandshakeTimeoutError, fakeLocker, connLRU, canceler, I, requestTooLarger, dialRes, ptrType, sliceType, ptrType$1, ptrType$2, sliceType$1, ptrType$3, sliceType$2, sliceType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, chanType, sliceType$4, sliceType$5, sliceType$6, structType, ptrType$13, ptrType$14, ptrType$15, funcType, ptrType$16, mapType, funcType$1, ptrType$17, funcType$2, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, sliceType$7, ptrType$24, ptrType$25, sliceType$8, ptrType$26, arrayType, ptrType$29, sliceType$10, ptrType$30, ptrType$31, sliceType$11, ptrType$32, sliceType$12, arrayType$2, sliceType$13, sliceType$14, ptrType$33, arrayType$3, ptrType$34, ptrType$35, arrayType$4, ptrType$36, ptrType$37, ptrType$38, arrayType$5, sliceType$15, ptrType$39, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, ptrType$53, ptrType$54, ptrType$55, sliceType$16, ptrType$56, ptrType$57, ptrType$58, ptrType$59, sliceType$17, sliceType$18, ptrType$60, ptrType$61, funcType$3, ptrType$62, ptrType$63, ptrType$64, ptrType$65, ptrType$66, ptrType$67, ptrType$68, ptrType$69, ptrType$70, ptrType$71, interfaceType, ptrType$72, ptrType$73, sliceType$19, ptrType$74, ptrType$75, ptrType$76, ptrType$77, sliceType$20, ptrType$78, ptrType$79, ptrType$80, sliceType$21, ptrType$81, ptrType$82, ptrType$83, ptrType$84, ptrType$85, ptrType$86, ptrType$87, ptrType$88, ptrType$89, sliceType$22, arrayType$6, sliceType$23, structType$1, ptrType$90, ptrType$91, ptrType$92, ptrType$93, ptrType$94, structType$2, ptrType$95, ptrType$96, ptrType$97, ptrType$98, arrayType$7, arrayType$8, ptrType$99, ptrType$100, ptrType$101, ptrType$102, ptrType$103, ptrType$104, ptrType$105, sliceType$24, ptrType$106, mapType$1, ptrType$107, sliceType$25, ptrType$108, ptrType$109, funcType$4, ptrType$110, ptrType$111, ptrType$112, mapType$2, funcType$5, funcType$6, ptrType$113, funcType$7, ptrType$114, mapType$3, mapType$4, mapType$5, mapType$6, chanType$2, ptrType$117, ptrType$118, funcType$8, funcType$9, ptrType$119, chanType$3, funcType$10, funcType$11, funcType$12, funcType$13, funcType$14, funcType$15, funcType$16, funcType$17, funcType$18, funcType$19, funcType$20, ptrType$120, funcType$21, mapType$7, funcType$22, chanType$4, chanType$5, chanType$6, chanType$7, chanType$8, mapType$8, mapType$9, chanType$9, chanType$10, funcType$23, mapType$10, mapType$11, chanType$11, ptrType$121, ptrType$122, ptrType$123, ptrType$124, funcType$24, ptrType$125, funcType$25, ptrType$126, mapType$12, ptrType$127, mapType$13, mapType$14, ptrType$128, ptrType$129, ptrType$130, funcType$26, ptrType$131, ptrType$132, ptrType$133, mapType$15, funcType$27, mapType$16, funcType$28, mapType$17, mapType$18, ptrType$136, ptrType$137, ptrType$138, ptrType$139, ptrType$140, funcType$29, funcType$30, ptrType$141, ptrType$142, chanType$12, ptrType$143, ptrType$144, chanType$13, mapType$19, mapType$20, mapType$21, mapType$22, mapType$23, funcType$31, funcType$32, funcType$33, mapType$24, ptrType$145, ptrType$146, chanType$14, chanType$15, funcType$34, chanType$16, chanType$17, chanType$18, ptrType$147, funcType$35, funcType$36, ptrType$148, ptrType$149, mapType$25, testHookClientDoResult, cookieNameSanitizer, errSeeker, errNoOverlap, unixEpochTime, http2dataChunkSizeClasses, http2dataChunkPools, http2errReadEmpty, http2errCodeName, http2errMixPseudoHeaderTypes, http2errPseudoAfterRegular, http2padZeros, http2frameName, http2flagName, http2frameParsers, http2fhBytes, http2ErrFrameTooLarge, http2errStreamID, http2errDepStreamID, http2errPadLength, http2errPadBytes, http2DebugGoroutines, http2goroutineSpace, http2littleBuf, http2commonLowerHeader, http2commonCanonHeader, http2VerboseLogs, http2logFrameWrites, http2logFrameReads, http2inTests, http2clientPreface, http2stateName, http2settingName, http2errInvalidHeaderFieldName, http2errInvalidHeaderFieldValue, http2httpCodeStringCommon, http2bufWriterPool, http2errTimeout, http2sorterPool, http2errClosedPipeWrite, http2errClientDisconnected, http2errClosedBody, http2errHandlerComplete, http2errStreamClosed, http2responseWriterStatePool, http2testHookOnConn, http2testHookGetServerConn, http2testHookOnPanicMu, http2testHookOnPanic, http2settingsTimerMsg, http2idleTimerMsg, http2shutdownTimerMsg, http2gracefulShutdownMsg, http2errPrefaceTimeout, http2errChanPool, http2writeDataPool, http2errHandlerPanicked, http2goAwayTimeout, http2ErrRecursivePush, http2ErrPushLimitReached, http2connHeaders, http2errTransportVersion, http2got1xxFuncForTests, http2ErrNoCachedConn, http2errClientConnClosed, http2errClientConnUnusable, http2errClientConnGotGoAway, http2shutdownEnterWaitStateHook, http2errRequestCanceled, http2errStopReqBodyWrite, http2errStopReqBodyWriteAndCancel, http2errClosedResponseBody, http2errInvalidTrailers, http2errResponseHeaderListSize, http2errRequestHeaderListSize, http2errPseudoTrailers, http2noBody, headerNewlineToSpace, headerSorterPool, aLongTimeAgo, reqWriteExcludeHeader, multipartByReader, errMissingHost, textprotoReaderPool, respExcludeHeader, crlf, colonSpace, bufioReaderPool, bufioWriter2kPool, bufioWriter2kPool$24ptr, bufioWriter4kPool, bufioWriter4kPool$24ptr, copyBufPool, errTooLarge, extraHeaderKeys, headerContentLength, headerDate, parseURL, htmlReplacer, defaultServeMux, defaultServeMux$24ptr, shutdownPollInterval, stateName, testHookServerServe, uniqNameMu, uniqNameNext, sniffSignatures, mp4ftype, mp4, socksnoDeadline, socksaLongTimeAgo, statusText, suppressedHeaders304, suppressedHeadersNoBody, singleCRLF, doubleCRLF, errTrailerEOF, nopCloserType, connsPerHostClosedCh, errKeepAlivesDisabled, errConnBroken, errWantIdle, errTooManyIdle, errTooManyIdleHost, errCloseIdleConns, errReadLoopExiting, errIdleConnTimeout, errNotCachingH2Conn, errServerClosedIdle, zeroDialer, errTimeout, errRequestCanceled, errRequestCanceledConn, testHookEnterRoundTrip, testHookWaitResLoop, testHookRoundTripRetried, testHookPrePendingDial, testHookPostPendingDial, testHookMu, testHookReadLoopBeforeNextRead, portMap, errReadOnClosedResBody, _r, x, x$1, x$2, x$3, refererForURL, send, setRequestCancel, basicAuth, alwaysFalse, redirectBehavior, urlErrorOp, defaultCheckRedirect, Post, shouldCopyHeaderOnRedirect, isDomainOrSubdomain, stripPassword, readSetCookies, readCookies, validCookieDomain, validCookieExpires, isCookieDomainName, sanitizeCookieName, sanitizeCookieValue, validCookieValueByte, sanitizeCookiePath, validCookiePathByte, sanitizeOrWarn, parseCookieValue, isCookieNameValid, http2isBadCipher, http2filterOutClientConn, http2configureTransport, http2registerHTTPSProtocol, http2getDataBufferChunk, http2putDataBufferChunk, http2streamError, http2typeFrameParser, http2readFrameHeader, http2NewFramer, http2terminalReadFrameError, http2parseDataFrame, http2validStreamIDOrZero, http2validStreamID, http2parseSettingsFrame, http2parsePingFrame, http2parseGoAwayFrame, http2parseUnknownFrame, http2parseWindowUpdateFrame, http2parseHeadersFrame, http2parsePriorityFrame, http2parseRSTStreamFrame, http2parseContinuationFrame, http2parsePushPromise, http2readByte, http2readUint32, http2summarizeFrame, http2traceHasWroteHeaderField, http2traceWroteHeaderField, http2traceGot1xxResponseFunc, http2transportExpectContinueTimeout, http2serverConnBaseContext, http2contextWithCancel, http2requestWithContext, http2reqContext, http2setResponseUncompressed, http2traceGetConn, http2traceGotConn, http2traceWroteHeaders, http2traceGot100Continue, http2traceWait100Continue, http2traceWroteRequest, http2traceFirstResponseByte, http2requestTrace, http2cloneTLSConfig, http2configureServer18, http2shouldLogPanic, http2reqGetBody, http2reqBodyIsNoBody, http2configureServer19, http2newGoroutineLock, http2curGoroutineID, http2parseUintBytes, http2cutoff64, init, http2lowerHeader, init$1, http2validWireHeaderFieldName, init$2, http2httpCodeString, http2newBufferedWriter, http2mustUint31, http2bodyAllowedForStatus, http2validPseudoPath, http2ConfigureServer, http2errno, http2isClosedConnError, http2checkPriority, http2handleHeaderListTooLong, http2checkWriteHeaderCode, http2cloneHeader, http2foreachHeaderElement, http2checkValidHTTP2RequestHeaders, http2new400Handler, http2h1ServerKeepAlivesDisabled, http2awaitRequestCancel, http2isNoCachedConnError, http2authorityAddr, http2shouldRetryRequest, http2canRetryError, http2commaSeparatedTrailers, http2checkConnHeaders, http2actualContentLength, http2shouldSendReqContentLength, http2isEOFOrNetReadError, http2strSliceContains, http2isConnectionCloseRequest, http2writeEndsStream, http2splitHeaderBlock, http2encKV, http2encodeHeaders, http2NewPriorityWriteScheduler, http2NewRandomWriteScheduler, CanonicalHeaderKey, hasToken, isTokenBoundary, cloneHeader, hasPort, removeEmptyPort, isNotToken, isASCII, hexEscapeNonASCII, valueOrDefault, idnaASCII, cleanHost, removeZone, ParseHTTPVersion, validMethod, NewRequest, parseBasicAuth, parseRequestLine, newTextprotoReader, putTextprotoReader, readRequest, MaxBytesReader, copyValues, parsePostForm, requestMethodUsuallyLacksBody, ReadResponse, fixPragmaCacheControl, srcIsRegularFile, bufioWriterPool, newBufioReader, putBufioReader, newBufioWriterSize, putBufioWriter, appendTime, http1ServerSupportsRequest, checkWriteHeaderCode, foreachHeaderElement, writeStatusLine, validNPN, isCommonNetReadError, registerOnHitEOF, requestBodyRemains, Error, NotFound, NotFoundHandler, Redirect, htmlEscape, RedirectHandler, pathMatch, cleanPath, stripHostPort, newLoggingConn, numLeadingCRorLF, strSliceContains, DetectContentType, isWS, sockssplitHostPort, socksNewDialer, StatusText, newTransferWriter, noResponseBodyExpected, bodyAllowedForStatus, suppressedHeaders, readTransfer, chunked, isIdentity, fixLength, shouldClose, fixTrailer, seeUpcomingDoubleCRLF, mergeSetHeader, parseContentLength, isKnownInMemoryReader, init$3, nop, canonicalAddr, cloneTLSConfig, validPort; + bufio = $packages["bufio"]; + bytes = $packages["bytes"]; + gzip = $packages["compress/gzip"]; + list = $packages["container/list"]; + context = $packages["context"]; + rand = $packages["crypto/rand"]; + tls = $packages["crypto/tls"]; + base64 = $packages["encoding/base64"]; + binary = $packages["encoding/binary"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + log = $packages["log"]; + math = $packages["math"]; + rand$1 = $packages["math/rand"]; + mime = $packages["mime"]; + multipart = $packages["mime/multipart"]; + net = $packages["net"]; + httptrace = $packages["net/http/httptrace"]; + internal = $packages["net/http/internal"]; + textproto = $packages["net/textproto"]; + url = $packages["net/url"]; + os = $packages["os"]; + path = $packages["path"]; + filepath = $packages["path/filepath"]; + reflect = $packages["reflect"]; + runtime = $packages["runtime"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + time = $packages["time"]; + utf8 = $packages["unicode/utf8"]; + httpguts = $packages["vendor/golang_org/x/net/http/httpguts"]; + httpproxy = $packages["vendor/golang_org/x/net/http/httpproxy"]; + hpack = $packages["vendor/golang_org/x/net/http2/hpack"]; + idna = $packages["vendor/golang_org/x/net/idna"]; + streamReader = $pkg.streamReader = $newType(0, $kindStruct, "http.streamReader", true, "net/http", false, function(pending_, stream_) { + this.$val = this; + if (arguments.length === 0) { + this.pending = sliceType$3.nil; + this.stream = null; + return; + } + this.pending = pending_; + this.stream = stream_; + }); + fetchTransport = $pkg.fetchTransport = $newType(0, $kindStruct, "http.fetchTransport", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + noTransport = $pkg.noTransport = $newType(0, $kindStruct, "http.noTransport", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + XHRTransport = $pkg.XHRTransport = $newType(0, $kindStruct, "http.XHRTransport", true, "net/http", true, function(inflight_) { + this.$val = this; + if (arguments.length === 0) { + this.inflight = false; + return; + } + this.inflight = inflight_; + }); + Client = $pkg.Client = $newType(0, $kindStruct, "http.Client", true, "net/http", true, function(Transport_, CheckRedirect_, Jar_, Timeout_) { + this.$val = this; + if (arguments.length === 0) { + this.Transport = $ifaceNil; + this.CheckRedirect = $throwNilPointerError; + this.Jar = $ifaceNil; + this.Timeout = new time.Duration(0, 0); + return; + } + this.Transport = Transport_; + this.CheckRedirect = CheckRedirect_; + this.Jar = Jar_; + this.Timeout = Timeout_; + }); + RoundTripper = $pkg.RoundTripper = $newType(8, $kindInterface, "http.RoundTripper", true, "net/http", true, null); + cancelTimerBody = $pkg.cancelTimerBody = $newType(0, $kindStruct, "http.cancelTimerBody", true, "net/http", false, function(stop_, rc_, reqDidTimeout_) { + this.$val = this; + if (arguments.length === 0) { + this.stop = $throwNilPointerError; + this.rc = $ifaceNil; + this.reqDidTimeout = $throwNilPointerError; + return; + } + this.stop = stop_; + this.rc = rc_; + this.reqDidTimeout = reqDidTimeout_; + }); + Cookie = $pkg.Cookie = $newType(0, $kindStruct, "http.Cookie", true, "net/http", true, function(Name_, Value_, Path_, Domain_, Expires_, RawExpires_, MaxAge_, Secure_, HttpOnly_, SameSite_, Raw_, Unparsed_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = ""; + this.Value = ""; + this.Path = ""; + this.Domain = ""; + this.Expires = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + this.RawExpires = ""; + this.MaxAge = 0; + this.Secure = false; + this.HttpOnly = false; + this.SameSite = 0; + this.Raw = ""; + this.Unparsed = sliceType$1.nil; + return; + } + this.Name = Name_; + this.Value = Value_; + this.Path = Path_; + this.Domain = Domain_; + this.Expires = Expires_; + this.RawExpires = RawExpires_; + this.MaxAge = MaxAge_; + this.Secure = Secure_; + this.HttpOnly = HttpOnly_; + this.SameSite = SameSite_; + this.Raw = Raw_; + this.Unparsed = Unparsed_; + }); + SameSite = $pkg.SameSite = $newType(4, $kindInt, "http.SameSite", true, "net/http", true, null); + http2ClientConnPool = $pkg.http2ClientConnPool = $newType(8, $kindInterface, "http.http2ClientConnPool", true, "net/http", false, null); + http2clientConnPoolIdleCloser = $pkg.http2clientConnPoolIdleCloser = $newType(8, $kindInterface, "http.http2clientConnPoolIdleCloser", true, "net/http", false, null); + http2clientConnPool = $pkg.http2clientConnPool = $newType(0, $kindStruct, "http.http2clientConnPool", true, "net/http", false, function(t_, mu_, conns_, dialing_, keys_, addConnCalls_) { + this.$val = this; + if (arguments.length === 0) { + this.t = ptrType$22.nil; + this.mu = new sync.Mutex.ptr(0, 0); + this.conns = false; + this.dialing = false; + this.keys = false; + this.addConnCalls = false; + return; + } + this.t = t_; + this.mu = mu_; + this.conns = conns_; + this.dialing = dialing_; + this.keys = keys_; + this.addConnCalls = addConnCalls_; + }); + http2dialCall = $pkg.http2dialCall = $newType(0, $kindStruct, "http.http2dialCall", true, "net/http", false, function(p_, done_, res_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.p = ptrType$3.nil; + this.done = $chanNil; + this.res = ptrType$29.nil; + this.err = $ifaceNil; + return; + } + this.p = p_; + this.done = done_; + this.res = res_; + this.err = err_; + }); + http2addConnCall = $pkg.http2addConnCall = $newType(0, $kindStruct, "http.http2addConnCall", true, "net/http", false, function(p_, done_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.p = ptrType$3.nil; + this.done = $chanNil; + this.err = $ifaceNil; + return; + } + this.p = p_; + this.done = done_; + this.err = err_; + }); + http2noDialClientConnPool = $pkg.http2noDialClientConnPool = $newType(0, $kindStruct, "http.http2noDialClientConnPool", true, "net/http", false, function(http2clientConnPool_) { + this.$val = this; + if (arguments.length === 0) { + this.http2clientConnPool = ptrType$3.nil; + return; + } + this.http2clientConnPool = http2clientConnPool_; + }); + http2noDialH2RoundTripper = $pkg.http2noDialH2RoundTripper = $newType(0, $kindStruct, "http.http2noDialH2RoundTripper", true, "net/http", false, function(http2Transport_) { + this.$val = this; + if (arguments.length === 0) { + this.http2Transport = ptrType$22.nil; + return; + } + this.http2Transport = http2Transport_; + }); + http2dataBuffer = $pkg.http2dataBuffer = $newType(0, $kindStruct, "http.http2dataBuffer", true, "net/http", false, function(chunks_, r_, w_, size_, expected_) { + this.$val = this; + if (arguments.length === 0) { + this.chunks = sliceType$5.nil; + this.r = 0; + this.w = 0; + this.size = 0; + this.expected = new $Int64(0, 0); + return; + } + this.chunks = chunks_; + this.r = r_; + this.w = w_; + this.size = size_; + this.expected = expected_; + }); + http2ErrCode = $pkg.http2ErrCode = $newType(4, $kindUint32, "http.http2ErrCode", true, "net/http", false, null); + http2ConnectionError = $pkg.http2ConnectionError = $newType(4, $kindUint32, "http.http2ConnectionError", true, "net/http", false, null); + http2StreamError = $pkg.http2StreamError = $newType(0, $kindStruct, "http.http2StreamError", true, "net/http", false, function(StreamID_, Code_, Cause_) { + this.$val = this; + if (arguments.length === 0) { + this.StreamID = 0; + this.Code = 0; + this.Cause = $ifaceNil; + return; + } + this.StreamID = StreamID_; + this.Code = Code_; + this.Cause = Cause_; + }); + http2goAwayFlowError = $pkg.http2goAwayFlowError = $newType(0, $kindStruct, "http.http2goAwayFlowError", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + http2connError = $pkg.http2connError = $newType(0, $kindStruct, "http.http2connError", true, "net/http", false, function(Code_, Reason_) { + this.$val = this; + if (arguments.length === 0) { + this.Code = 0; + this.Reason = ""; + return; + } + this.Code = Code_; + this.Reason = Reason_; + }); + http2pseudoHeaderError = $pkg.http2pseudoHeaderError = $newType(8, $kindString, "http.http2pseudoHeaderError", true, "net/http", false, null); + http2duplicatePseudoHeaderError = $pkg.http2duplicatePseudoHeaderError = $newType(8, $kindString, "http.http2duplicatePseudoHeaderError", true, "net/http", false, null); + http2headerFieldNameError = $pkg.http2headerFieldNameError = $newType(8, $kindString, "http.http2headerFieldNameError", true, "net/http", false, null); + http2headerFieldValueError = $pkg.http2headerFieldValueError = $newType(8, $kindString, "http.http2headerFieldValueError", true, "net/http", false, null); + http2flow = $pkg.http2flow = $newType(0, $kindStruct, "http.http2flow", true, "net/http", false, function(n_, conn_) { + this.$val = this; + if (arguments.length === 0) { + this.n = 0; + this.conn = ptrType$33.nil; + return; + } + this.n = n_; + this.conn = conn_; + }); + http2FrameType = $pkg.http2FrameType = $newType(1, $kindUint8, "http.http2FrameType", true, "net/http", false, null); + http2Flags = $pkg.http2Flags = $newType(1, $kindUint8, "http.http2Flags", true, "net/http", false, null); + http2FrameHeader = $pkg.http2FrameHeader = $newType(0, $kindStruct, "http.http2FrameHeader", true, "net/http", false, function(valid_, Type_, Flags_, Length_, StreamID_) { + this.$val = this; + if (arguments.length === 0) { + this.valid = false; + this.Type = 0; + this.Flags = 0; + this.Length = 0; + this.StreamID = 0; + return; + } + this.valid = valid_; + this.Type = Type_; + this.Flags = Flags_; + this.Length = Length_; + this.StreamID = StreamID_; + }); + http2Frame = $pkg.http2Frame = $newType(8, $kindInterface, "http.http2Frame", true, "net/http", false, null); + http2Framer = $pkg.http2Framer = $newType(0, $kindStruct, "http.http2Framer", true, "net/http", false, function(r_, lastFrame_, errDetail_, lastHeaderStream_, maxReadSize_, headerBuf_, getReadBuf_, readBuf_, maxWriteSize_, w_, wbuf_, AllowIllegalWrites_, AllowIllegalReads_, ReadMetaHeaders_, MaxHeaderListSize_, logReads_, logWrites_, debugFramer_, debugFramerBuf_, debugReadLoggerf_, debugWriteLoggerf_, frameCache_) { + this.$val = this; + if (arguments.length === 0) { + this.r = $ifaceNil; + this.lastFrame = $ifaceNil; + this.errDetail = $ifaceNil; + this.lastHeaderStream = 0; + this.maxReadSize = 0; + this.headerBuf = arrayType$4.zero(); + this.getReadBuf = $throwNilPointerError; + this.readBuf = sliceType$3.nil; + this.maxWriteSize = 0; + this.w = $ifaceNil; + this.wbuf = sliceType$3.nil; + this.AllowIllegalWrites = false; + this.AllowIllegalReads = false; + this.ReadMetaHeaders = ptrType$36.nil; + this.MaxHeaderListSize = 0; + this.logReads = false; + this.logWrites = false; + this.debugFramer = ptrType$34.nil; + this.debugFramerBuf = ptrType$37.nil; + this.debugReadLoggerf = $throwNilPointerError; + this.debugWriteLoggerf = $throwNilPointerError; + this.frameCache = ptrType$35.nil; + return; + } + this.r = r_; + this.lastFrame = lastFrame_; + this.errDetail = errDetail_; + this.lastHeaderStream = lastHeaderStream_; + this.maxReadSize = maxReadSize_; + this.headerBuf = headerBuf_; + this.getReadBuf = getReadBuf_; + this.readBuf = readBuf_; + this.maxWriteSize = maxWriteSize_; + this.w = w_; + this.wbuf = wbuf_; + this.AllowIllegalWrites = AllowIllegalWrites_; + this.AllowIllegalReads = AllowIllegalReads_; + this.ReadMetaHeaders = ReadMetaHeaders_; + this.MaxHeaderListSize = MaxHeaderListSize_; + this.logReads = logReads_; + this.logWrites = logWrites_; + this.debugFramer = debugFramer_; + this.debugFramerBuf = debugFramerBuf_; + this.debugReadLoggerf = debugReadLoggerf_; + this.debugWriteLoggerf = debugWriteLoggerf_; + this.frameCache = frameCache_; + }); + http2frameCache = $pkg.http2frameCache = $newType(0, $kindStruct, "http.http2frameCache", true, "net/http", false, function(dataFrame_) { + this.$val = this; + if (arguments.length === 0) { + this.dataFrame = new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil); + return; + } + this.dataFrame = dataFrame_; + }); + http2DataFrame = $pkg.http2DataFrame = $newType(0, $kindStruct, "http.http2DataFrame", true, "net/http", false, function(http2FrameHeader_, data_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.data = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.data = data_; + }); + http2SettingsFrame = $pkg.http2SettingsFrame = $newType(0, $kindStruct, "http.http2SettingsFrame", true, "net/http", false, function(http2FrameHeader_, p_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.p = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.p = p_; + }); + http2PingFrame = $pkg.http2PingFrame = $newType(0, $kindStruct, "http.http2PingFrame", true, "net/http", false, function(http2FrameHeader_, Data_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.Data = arrayType$5.zero(); + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.Data = Data_; + }); + http2GoAwayFrame = $pkg.http2GoAwayFrame = $newType(0, $kindStruct, "http.http2GoAwayFrame", true, "net/http", false, function(http2FrameHeader_, LastStreamID_, ErrCode_, debugData_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.LastStreamID = 0; + this.ErrCode = 0; + this.debugData = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.LastStreamID = LastStreamID_; + this.ErrCode = ErrCode_; + this.debugData = debugData_; + }); + http2UnknownFrame = $pkg.http2UnknownFrame = $newType(0, $kindStruct, "http.http2UnknownFrame", true, "net/http", false, function(http2FrameHeader_, p_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.p = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.p = p_; + }); + http2WindowUpdateFrame = $pkg.http2WindowUpdateFrame = $newType(0, $kindStruct, "http.http2WindowUpdateFrame", true, "net/http", false, function(http2FrameHeader_, Increment_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.Increment = 0; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.Increment = Increment_; + }); + http2HeadersFrame = $pkg.http2HeadersFrame = $newType(0, $kindStruct, "http.http2HeadersFrame", true, "net/http", false, function(http2FrameHeader_, Priority_, headerFragBuf_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.Priority = new http2PriorityParam.ptr(0, false, 0); + this.headerFragBuf = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.Priority = Priority_; + this.headerFragBuf = headerFragBuf_; + }); + http2HeadersFrameParam = $pkg.http2HeadersFrameParam = $newType(0, $kindStruct, "http.http2HeadersFrameParam", true, "net/http", false, function(StreamID_, BlockFragment_, EndStream_, EndHeaders_, PadLength_, Priority_) { + this.$val = this; + if (arguments.length === 0) { + this.StreamID = 0; + this.BlockFragment = sliceType$3.nil; + this.EndStream = false; + this.EndHeaders = false; + this.PadLength = 0; + this.Priority = new http2PriorityParam.ptr(0, false, 0); + return; + } + this.StreamID = StreamID_; + this.BlockFragment = BlockFragment_; + this.EndStream = EndStream_; + this.EndHeaders = EndHeaders_; + this.PadLength = PadLength_; + this.Priority = Priority_; + }); + http2PriorityFrame = $pkg.http2PriorityFrame = $newType(0, $kindStruct, "http.http2PriorityFrame", true, "net/http", false, function(http2FrameHeader_, http2PriorityParam_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.http2PriorityParam = new http2PriorityParam.ptr(0, false, 0); + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.http2PriorityParam = http2PriorityParam_; + }); + http2PriorityParam = $pkg.http2PriorityParam = $newType(0, $kindStruct, "http.http2PriorityParam", true, "net/http", false, function(StreamDep_, Exclusive_, Weight_) { + this.$val = this; + if (arguments.length === 0) { + this.StreamDep = 0; + this.Exclusive = false; + this.Weight = 0; + return; + } + this.StreamDep = StreamDep_; + this.Exclusive = Exclusive_; + this.Weight = Weight_; + }); + http2RSTStreamFrame = $pkg.http2RSTStreamFrame = $newType(0, $kindStruct, "http.http2RSTStreamFrame", true, "net/http", false, function(http2FrameHeader_, ErrCode_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.ErrCode = 0; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.ErrCode = ErrCode_; + }); + http2ContinuationFrame = $pkg.http2ContinuationFrame = $newType(0, $kindStruct, "http.http2ContinuationFrame", true, "net/http", false, function(http2FrameHeader_, headerFragBuf_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.headerFragBuf = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.headerFragBuf = headerFragBuf_; + }); + http2PushPromiseFrame = $pkg.http2PushPromiseFrame = $newType(0, $kindStruct, "http.http2PushPromiseFrame", true, "net/http", false, function(http2FrameHeader_, PromiseID_, headerFragBuf_) { + this.$val = this; + if (arguments.length === 0) { + this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); + this.PromiseID = 0; + this.headerFragBuf = sliceType$3.nil; + return; + } + this.http2FrameHeader = http2FrameHeader_; + this.PromiseID = PromiseID_; + this.headerFragBuf = headerFragBuf_; + }); + http2PushPromiseParam = $pkg.http2PushPromiseParam = $newType(0, $kindStruct, "http.http2PushPromiseParam", true, "net/http", false, function(StreamID_, PromiseID_, BlockFragment_, EndHeaders_, PadLength_) { + this.$val = this; + if (arguments.length === 0) { + this.StreamID = 0; + this.PromiseID = 0; + this.BlockFragment = sliceType$3.nil; + this.EndHeaders = false; + this.PadLength = 0; + return; + } + this.StreamID = StreamID_; + this.PromiseID = PromiseID_; + this.BlockFragment = BlockFragment_; + this.EndHeaders = EndHeaders_; + this.PadLength = PadLength_; + }); + http2MetaHeadersFrame = $pkg.http2MetaHeadersFrame = $newType(0, $kindStruct, "http.http2MetaHeadersFrame", true, "net/http", false, function(http2HeadersFrame_, Fields_, Truncated_) { + this.$val = this; + if (arguments.length === 0) { + this.http2HeadersFrame = ptrType$38.nil; + this.Fields = sliceType$15.nil; + this.Truncated = false; + return; + } + this.http2HeadersFrame = http2HeadersFrame_; + this.Fields = Fields_; + this.Truncated = Truncated_; + }); + http2contextContext = $pkg.http2contextContext = $newType(8, $kindInterface, "http.http2contextContext", true, "net/http", false, null); + http2clientTrace = $pkg.http2clientTrace = $newType(0, $kindStruct, "http.http2clientTrace", true, "net/http", false, function(GetConn_, GotConn_, PutIdleConn_, GotFirstResponseByte_, Got100Continue_, Got1xxResponse_, DNSStart_, DNSDone_, ConnectStart_, ConnectDone_, TLSHandshakeStart_, TLSHandshakeDone_, WroteHeaderField_, WroteHeaders_, Wait100Continue_, WroteRequest_) { + this.$val = this; + if (arguments.length === 0) { + this.GetConn = $throwNilPointerError; + this.GotConn = $throwNilPointerError; + this.PutIdleConn = $throwNilPointerError; + this.GotFirstResponseByte = $throwNilPointerError; + this.Got100Continue = $throwNilPointerError; + this.Got1xxResponse = $throwNilPointerError; + this.DNSStart = $throwNilPointerError; + this.DNSDone = $throwNilPointerError; + this.ConnectStart = $throwNilPointerError; + this.ConnectDone = $throwNilPointerError; + this.TLSHandshakeStart = $throwNilPointerError; + this.TLSHandshakeDone = $throwNilPointerError; + this.WroteHeaderField = $throwNilPointerError; + this.WroteHeaders = $throwNilPointerError; + this.Wait100Continue = $throwNilPointerError; + this.WroteRequest = $throwNilPointerError; + return; + } + this.GetConn = GetConn_; + this.GotConn = GotConn_; + this.PutIdleConn = PutIdleConn_; + this.GotFirstResponseByte = GotFirstResponseByte_; + this.Got100Continue = Got100Continue_; + this.Got1xxResponse = Got1xxResponse_; + this.DNSStart = DNSStart_; + this.DNSDone = DNSDone_; + this.ConnectStart = ConnectStart_; + this.ConnectDone = ConnectDone_; + this.TLSHandshakeStart = TLSHandshakeStart_; + this.TLSHandshakeDone = TLSHandshakeDone_; + this.WroteHeaderField = WroteHeaderField_; + this.WroteHeaders = WroteHeaders_; + this.Wait100Continue = Wait100Continue_; + this.WroteRequest = WroteRequest_; + }); + http2goroutineLock = $pkg.http2goroutineLock = $newType(8, $kindUint64, "http.http2goroutineLock", true, "net/http", false, null); + http2streamState = $pkg.http2streamState = $newType(4, $kindInt, "http.http2streamState", true, "net/http", false, null); + http2Setting = $pkg.http2Setting = $newType(0, $kindStruct, "http.http2Setting", true, "net/http", false, function(ID_, Val_) { + this.$val = this; + if (arguments.length === 0) { + this.ID = 0; + this.Val = 0; + return; + } + this.ID = ID_; + this.Val = Val_; + }); + http2SettingID = $pkg.http2SettingID = $newType(2, $kindUint16, "http.http2SettingID", true, "net/http", false, null); + http2gate = $pkg.http2gate = $newType(4, $kindChan, "http.http2gate", true, "net/http", false, null); + http2closeWaiter = $pkg.http2closeWaiter = $newType(4, $kindChan, "http.http2closeWaiter", true, "net/http", false, null); + http2bufferedWriter = $pkg.http2bufferedWriter = $newType(0, $kindStruct, "http.http2bufferedWriter", true, "net/http", false, function(w_, bw_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + this.bw = ptrType$10.nil; + return; + } + this.w = w_; + this.bw = bw_; + }); + http2httpError = $pkg.http2httpError = $newType(0, $kindStruct, "http.http2httpError", true, "net/http", false, function(msg_, timeout_) { + this.$val = this; + if (arguments.length === 0) { + this.msg = ""; + this.timeout = false; + return; + } + this.msg = msg_; + this.timeout = timeout_; + }); + http2connectionStater = $pkg.http2connectionStater = $newType(8, $kindInterface, "http.http2connectionStater", true, "net/http", false, null); + http2sorter = $pkg.http2sorter = $newType(0, $kindStruct, "http.http2sorter", true, "net/http", false, function(v_) { + this.$val = this; + if (arguments.length === 0) { + this.v = sliceType$1.nil; + return; + } + this.v = v_; + }); + http2pipe = $pkg.http2pipe = $newType(0, $kindStruct, "http.http2pipe", true, "net/http", false, function(mu_, c_, b_, err_, breakErr_, donec_, readFn_) { + this.$val = this; + if (arguments.length === 0) { + this.mu = new sync.Mutex.ptr(0, 0); + this.c = new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); + this.b = $ifaceNil; + this.err = $ifaceNil; + this.breakErr = $ifaceNil; + this.donec = $chanNil; + this.readFn = $throwNilPointerError; + return; + } + this.mu = mu_; + this.c = c_; + this.b = b_; + this.err = err_; + this.breakErr = breakErr_; + this.donec = donec_; + this.readFn = readFn_; + }); + http2pipeBuffer = $pkg.http2pipeBuffer = $newType(8, $kindInterface, "http.http2pipeBuffer", true, "net/http", false, null); + http2Server = $pkg.http2Server = $newType(0, $kindStruct, "http.http2Server", true, "net/http", false, function(MaxHandlers_, MaxConcurrentStreams_, MaxReadFrameSize_, PermitProhibitedCipherSuites_, IdleTimeout_, MaxUploadBufferPerConnection_, MaxUploadBufferPerStream_, NewWriteScheduler_, state_) { + this.$val = this; + if (arguments.length === 0) { + this.MaxHandlers = 0; + this.MaxConcurrentStreams = 0; + this.MaxReadFrameSize = 0; + this.PermitProhibitedCipherSuites = false; + this.IdleTimeout = new time.Duration(0, 0); + this.MaxUploadBufferPerConnection = 0; + this.MaxUploadBufferPerStream = 0; + this.NewWriteScheduler = $throwNilPointerError; + this.state = ptrType$52.nil; + return; + } + this.MaxHandlers = MaxHandlers_; + this.MaxConcurrentStreams = MaxConcurrentStreams_; + this.MaxReadFrameSize = MaxReadFrameSize_; + this.PermitProhibitedCipherSuites = PermitProhibitedCipherSuites_; + this.IdleTimeout = IdleTimeout_; + this.MaxUploadBufferPerConnection = MaxUploadBufferPerConnection_; + this.MaxUploadBufferPerStream = MaxUploadBufferPerStream_; + this.NewWriteScheduler = NewWriteScheduler_; + this.state = state_; + }); + http2serverInternalState = $pkg.http2serverInternalState = $newType(0, $kindStruct, "http.http2serverInternalState", true, "net/http", false, function(mu_, activeConns_) { + this.$val = this; + if (arguments.length === 0) { + this.mu = new sync.Mutex.ptr(0, 0); + this.activeConns = false; + return; + } + this.mu = mu_; + this.activeConns = activeConns_; + }); + http2ServeConnOpts = $pkg.http2ServeConnOpts = $newType(0, $kindStruct, "http.http2ServeConnOpts", true, "net/http", false, function(BaseConfig_, Handler_) { + this.$val = this; + if (arguments.length === 0) { + this.BaseConfig = ptrType$48.nil; + this.Handler = $ifaceNil; + return; + } + this.BaseConfig = BaseConfig_; + this.Handler = Handler_; + }); + http2serverConn = $pkg.http2serverConn = $newType(0, $kindStruct, "http.http2serverConn", true, "net/http", false, function(srv_, hs_, conn_, bw_, handler_, baseCtx_, framer_, doneServing_, readFrameCh_, wantWriteFrameCh_, wroteFrameCh_, bodyReadCh_, serveMsgCh_, flow_, inflow_, tlsState_, remoteAddrStr_, writeSched_, serveG_, pushEnabled_, sawFirstSettings_, needToSendSettingsAck_, unackedSettings_, clientMaxStreams_, advMaxStreams_, curClientStreams_, curPushedStreams_, maxClientStreamID_, maxPushPromiseID_, streams_, initialStreamSendWindowSize_, maxFrameSize_, headerTableSize_, peerMaxHeaderListSize_, canonHeader_, writingFrame_, writingFrameAsync_, needsFrameFlush_, inGoAway_, inFrameScheduleLoop_, needToSendGoAway_, goAwayCode_, shutdownTimer_, idleTimer_, headerWriteBuf_, hpackEncoder_, shutdownOnce_) { + this.$val = this; + if (arguments.length === 0) { + this.srv = ptrType$53.nil; + this.hs = ptrType$48.nil; + this.conn = $ifaceNil; + this.bw = ptrType$56.nil; + this.handler = $ifaceNil; + this.baseCtx = $ifaceNil; + this.framer = ptrType$34.nil; + this.doneServing = $chanNil; + this.readFrameCh = $chanNil; + this.wantWriteFrameCh = $chanNil; + this.wroteFrameCh = $chanNil; + this.bodyReadCh = $chanNil; + this.serveMsgCh = $chanNil; + this.flow = new http2flow.ptr(0, ptrType$33.nil); + this.inflow = new http2flow.ptr(0, ptrType$33.nil); + this.tlsState = ptrType$17.nil; + this.remoteAddrStr = ""; + this.writeSched = $ifaceNil; + this.serveG = new http2goroutineLock(0, 0); + this.pushEnabled = false; + this.sawFirstSettings = false; + this.needToSendSettingsAck = false; + this.unackedSettings = 0; + this.clientMaxStreams = 0; + this.advMaxStreams = 0; + this.curClientStreams = 0; + this.curPushedStreams = 0; + this.maxClientStreamID = 0; + this.maxPushPromiseID = 0; + this.streams = false; + this.initialStreamSendWindowSize = 0; + this.maxFrameSize = 0; + this.headerTableSize = 0; + this.peerMaxHeaderListSize = 0; + this.canonHeader = false; + this.writingFrame = false; + this.writingFrameAsync = false; + this.needsFrameFlush = false; + this.inGoAway = false; + this.inFrameScheduleLoop = false; + this.needToSendGoAway = false; + this.goAwayCode = 0; + this.shutdownTimer = ptrType$57.nil; + this.idleTimer = ptrType$57.nil; + this.headerWriteBuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0); + this.hpackEncoder = ptrType$58.nil; + this.shutdownOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + return; + } + this.srv = srv_; + this.hs = hs_; + this.conn = conn_; + this.bw = bw_; + this.handler = handler_; + this.baseCtx = baseCtx_; + this.framer = framer_; + this.doneServing = doneServing_; + this.readFrameCh = readFrameCh_; + this.wantWriteFrameCh = wantWriteFrameCh_; + this.wroteFrameCh = wroteFrameCh_; + this.bodyReadCh = bodyReadCh_; + this.serveMsgCh = serveMsgCh_; + this.flow = flow_; + this.inflow = inflow_; + this.tlsState = tlsState_; + this.remoteAddrStr = remoteAddrStr_; + this.writeSched = writeSched_; + this.serveG = serveG_; + this.pushEnabled = pushEnabled_; + this.sawFirstSettings = sawFirstSettings_; + this.needToSendSettingsAck = needToSendSettingsAck_; + this.unackedSettings = unackedSettings_; + this.clientMaxStreams = clientMaxStreams_; + this.advMaxStreams = advMaxStreams_; + this.curClientStreams = curClientStreams_; + this.curPushedStreams = curPushedStreams_; + this.maxClientStreamID = maxClientStreamID_; + this.maxPushPromiseID = maxPushPromiseID_; + this.streams = streams_; + this.initialStreamSendWindowSize = initialStreamSendWindowSize_; + this.maxFrameSize = maxFrameSize_; + this.headerTableSize = headerTableSize_; + this.peerMaxHeaderListSize = peerMaxHeaderListSize_; + this.canonHeader = canonHeader_; + this.writingFrame = writingFrame_; + this.writingFrameAsync = writingFrameAsync_; + this.needsFrameFlush = needsFrameFlush_; + this.inGoAway = inGoAway_; + this.inFrameScheduleLoop = inFrameScheduleLoop_; + this.needToSendGoAway = needToSendGoAway_; + this.goAwayCode = goAwayCode_; + this.shutdownTimer = shutdownTimer_; + this.idleTimer = idleTimer_; + this.headerWriteBuf = headerWriteBuf_; + this.hpackEncoder = hpackEncoder_; + this.shutdownOnce = shutdownOnce_; + }); + http2stream = $pkg.http2stream = $newType(0, $kindStruct, "http.http2stream", true, "net/http", false, function(sc_, id_, body_, cw_, ctx_, cancelCtx_, bodyBytes_, declBodyBytes_, flow_, inflow_, parent_, numTrailerValues_, weight_, state_, resetQueued_, gotTrailerHeader_, wroteHeaders_, writeDeadline_, trailer_, reqTrailer_) { + this.$val = this; + if (arguments.length === 0) { + this.sc = ptrType$9.nil; + this.id = 0; + this.body = ptrType$68.nil; + this.cw = $chanNil; + this.ctx = $ifaceNil; + this.cancelCtx = $throwNilPointerError; + this.bodyBytes = new $Int64(0, 0); + this.declBodyBytes = new $Int64(0, 0); + this.flow = new http2flow.ptr(0, ptrType$33.nil); + this.inflow = new http2flow.ptr(0, ptrType$33.nil); + this.parent = ptrType$6.nil; + this.numTrailerValues = new $Int64(0, 0); + this.weight = 0; + this.state = 0; + this.resetQueued = false; + this.gotTrailerHeader = false; + this.wroteHeaders = false; + this.writeDeadline = ptrType$57.nil; + this.trailer = false; + this.reqTrailer = false; + return; + } + this.sc = sc_; + this.id = id_; + this.body = body_; + this.cw = cw_; + this.ctx = ctx_; + this.cancelCtx = cancelCtx_; + this.bodyBytes = bodyBytes_; + this.declBodyBytes = declBodyBytes_; + this.flow = flow_; + this.inflow = inflow_; + this.parent = parent_; + this.numTrailerValues = numTrailerValues_; + this.weight = weight_; + this.state = state_; + this.resetQueued = resetQueued_; + this.gotTrailerHeader = gotTrailerHeader_; + this.wroteHeaders = wroteHeaders_; + this.writeDeadline = writeDeadline_; + this.trailer = trailer_; + this.reqTrailer = reqTrailer_; + }); + http2readFrameResult = $pkg.http2readFrameResult = $newType(0, $kindStruct, "http.http2readFrameResult", true, "net/http", false, function(f_, err_, readMore_) { + this.$val = this; + if (arguments.length === 0) { + this.f = $ifaceNil; + this.err = $ifaceNil; + this.readMore = $throwNilPointerError; + return; + } + this.f = f_; + this.err = err_; + this.readMore = readMore_; + }); + http2frameWriteResult = $pkg.http2frameWriteResult = $newType(0, $kindStruct, "http.http2frameWriteResult", true, "net/http", false, function(wr_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.wr = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil); + this.err = $ifaceNil; + return; + } + this.wr = wr_; + this.err = err_; + }); + http2serverMessage = $pkg.http2serverMessage = $newType(4, $kindInt, "http.http2serverMessage", true, "net/http", false, null); + http2requestParam = $pkg.http2requestParam = $newType(0, $kindStruct, "http.http2requestParam", true, "net/http", false, function(method_, scheme_, authority_, path_, header_) { + this.$val = this; + if (arguments.length === 0) { + this.method = ""; + this.scheme = ""; + this.authority = ""; + this.path = ""; + this.header = false; + return; + } + this.method = method_; + this.scheme = scheme_; + this.authority = authority_; + this.path = path_; + this.header = header_; + }); + http2bodyReadMsg = $pkg.http2bodyReadMsg = $newType(0, $kindStruct, "http.http2bodyReadMsg", true, "net/http", false, function(st_, n_) { + this.$val = this; + if (arguments.length === 0) { + this.st = ptrType$6.nil; + this.n = 0; + return; + } + this.st = st_; + this.n = n_; + }); + http2requestBody = $pkg.http2requestBody = $newType(0, $kindStruct, "http.http2requestBody", true, "net/http", false, function(stream_, conn_, closed_, sawEOF_, pipe_, needsContinue_) { + this.$val = this; + if (arguments.length === 0) { + this.stream = ptrType$6.nil; + this.conn = ptrType$9.nil; + this.closed = false; + this.sawEOF = false; + this.pipe = ptrType$68.nil; + this.needsContinue = false; + return; + } + this.stream = stream_; + this.conn = conn_; + this.closed = closed_; + this.sawEOF = sawEOF_; + this.pipe = pipe_; + this.needsContinue = needsContinue_; + }); + http2responseWriter = $pkg.http2responseWriter = $newType(0, $kindStruct, "http.http2responseWriter", true, "net/http", false, function(rws_) { + this.$val = this; + if (arguments.length === 0) { + this.rws = ptrType$70.nil; + return; + } + this.rws = rws_; + }); + http2responseWriterState = $pkg.http2responseWriterState = $newType(0, $kindStruct, "http.http2responseWriterState", true, "net/http", false, function(stream_, req_, body_, conn_, bw_, handlerHeader_, snapHeader_, trailers_, status_, wroteHeader_, sentHeader_, handlerDone_, dirty_, sentContentLen_, wroteBytes_, closeNotifierMu_, closeNotifierCh_) { + this.$val = this; + if (arguments.length === 0) { + this.stream = ptrType$6.nil; + this.req = ptrType$7.nil; + this.body = ptrType$8.nil; + this.conn = ptrType$9.nil; + this.bw = ptrType$10.nil; + this.handlerHeader = false; + this.snapHeader = false; + this.trailers = sliceType$1.nil; + this.status = 0; + this.wroteHeader = false; + this.sentHeader = false; + this.handlerDone = false; + this.dirty = false; + this.sentContentLen = new $Int64(0, 0); + this.wroteBytes = new $Int64(0, 0); + this.closeNotifierMu = new sync.Mutex.ptr(0, 0); + this.closeNotifierCh = $chanNil; + return; + } + this.stream = stream_; + this.req = req_; + this.body = body_; + this.conn = conn_; + this.bw = bw_; + this.handlerHeader = handlerHeader_; + this.snapHeader = snapHeader_; + this.trailers = trailers_; + this.status = status_; + this.wroteHeader = wroteHeader_; + this.sentHeader = sentHeader_; + this.handlerDone = handlerDone_; + this.dirty = dirty_; + this.sentContentLen = sentContentLen_; + this.wroteBytes = wroteBytes_; + this.closeNotifierMu = closeNotifierMu_; + this.closeNotifierCh = closeNotifierCh_; + }); + http2chunkWriter = $pkg.http2chunkWriter = $newType(0, $kindStruct, "http.http2chunkWriter", true, "net/http", false, function(rws_) { + this.$val = this; + if (arguments.length === 0) { + this.rws = ptrType$70.nil; + return; + } + this.rws = rws_; + }); + http2pushOptions = $pkg.http2pushOptions = $newType(0, $kindStruct, "http.http2pushOptions", true, "net/http", false, function(Method_, Header_) { + this.$val = this; + if (arguments.length === 0) { + this.Method = ""; + this.Header = false; + return; + } + this.Method = Method_; + this.Header = Header_; + }); + http2startPushRequest = $pkg.http2startPushRequest = $newType(0, $kindStruct, "http.http2startPushRequest", true, "net/http", false, function(parent_, method_, url_, header_, done_) { + this.$val = this; + if (arguments.length === 0) { + this.parent = ptrType$6.nil; + this.method = ""; + this.url = ptrType$19.nil; + this.header = false; + this.done = $chanNil; + return; + } + this.parent = parent_; + this.method = method_; + this.url = url_; + this.header = header_; + this.done = done_; + }); + http2Transport = $pkg.http2Transport = $newType(0, $kindStruct, "http.http2Transport", true, "net/http", false, function(DialTLS_, TLSClientConfig_, ConnPool_, DisableCompression_, AllowHTTP_, MaxHeaderListSize_, t1_, connPoolOnce_, connPoolOrDef_) { + this.$val = this; + if (arguments.length === 0) { + this.DialTLS = $throwNilPointerError; + this.TLSClientConfig = ptrType$14.nil; + this.ConnPool = $ifaceNil; + this.DisableCompression = false; + this.AllowHTTP = false; + this.MaxHeaderListSize = 0; + this.t1 = ptrType$21.nil; + this.connPoolOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.connPoolOrDef = $ifaceNil; + return; + } + this.DialTLS = DialTLS_; + this.TLSClientConfig = TLSClientConfig_; + this.ConnPool = ConnPool_; + this.DisableCompression = DisableCompression_; + this.AllowHTTP = AllowHTTP_; + this.MaxHeaderListSize = MaxHeaderListSize_; + this.t1 = t1_; + this.connPoolOnce = connPoolOnce_; + this.connPoolOrDef = connPoolOrDef_; + }); + http2ClientConn = $pkg.http2ClientConn = $newType(0, $kindStruct, "http.http2ClientConn", true, "net/http", false, function(t_, tconn_, tlsState_, singleUse_, readerDone_, readerErr_, idleTimeout_, idleTimer_, mu_, cond_, flow_, inflow_, closing_, closed_, wantSettingsAck_, goAway_, goAwayDebug_, streams_, nextStreamID_, pendingRequests_, pings_, bw_, br_, fr_, lastActive_, maxFrameSize_, maxConcurrentStreams_, peerMaxHeaderListSize_, initialWindowSize_, hbuf_, henc_, freeBuf_, wmu_, werr_) { + this.$val = this; + if (arguments.length === 0) { + this.t = ptrType$22.nil; + this.tconn = $ifaceNil; + this.tlsState = ptrType$17.nil; + this.singleUse = false; + this.readerDone = $chanNil; + this.readerErr = $ifaceNil; + this.idleTimeout = new time.Duration(0, 0); + this.idleTimer = ptrType$57.nil; + this.mu = new sync.Mutex.ptr(0, 0); + this.cond = ptrType$72.nil; + this.flow = new http2flow.ptr(0, ptrType$33.nil); + this.inflow = new http2flow.ptr(0, ptrType$33.nil); + this.closing = false; + this.closed = false; + this.wantSettingsAck = false; + this.goAway = ptrType$45.nil; + this.goAwayDebug = ""; + this.streams = false; + this.nextStreamID = 0; + this.pendingRequests = 0; + this.pings = false; + this.bw = ptrType$10.nil; + this.br = ptrType$73.nil; + this.fr = ptrType$34.nil; + this.lastActive = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + this.maxFrameSize = 0; + this.maxConcurrentStreams = 0; + this.peerMaxHeaderListSize = new $Uint64(0, 0); + this.initialWindowSize = 0; + this.hbuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0); + this.henc = ptrType$58.nil; + this.freeBuf = sliceType$5.nil; + this.wmu = new sync.Mutex.ptr(0, 0); + this.werr = $ifaceNil; + return; + } + this.t = t_; + this.tconn = tconn_; + this.tlsState = tlsState_; + this.singleUse = singleUse_; + this.readerDone = readerDone_; + this.readerErr = readerErr_; + this.idleTimeout = idleTimeout_; + this.idleTimer = idleTimer_; + this.mu = mu_; + this.cond = cond_; + this.flow = flow_; + this.inflow = inflow_; + this.closing = closing_; + this.closed = closed_; + this.wantSettingsAck = wantSettingsAck_; + this.goAway = goAway_; + this.goAwayDebug = goAwayDebug_; + this.streams = streams_; + this.nextStreamID = nextStreamID_; + this.pendingRequests = pendingRequests_; + this.pings = pings_; + this.bw = bw_; + this.br = br_; + this.fr = fr_; + this.lastActive = lastActive_; + this.maxFrameSize = maxFrameSize_; + this.maxConcurrentStreams = maxConcurrentStreams_; + this.peerMaxHeaderListSize = peerMaxHeaderListSize_; + this.initialWindowSize = initialWindowSize_; + this.hbuf = hbuf_; + this.henc = henc_; + this.freeBuf = freeBuf_; + this.wmu = wmu_; + this.werr = werr_; + }); + http2clientStream = $pkg.http2clientStream = $newType(0, $kindStruct, "http.http2clientStream", true, "net/http", false, function(cc_, req_, trace_, ID_, resc_, bufPipe_, startedWrite_, requestedGzip_, on100_, flow_, inflow_, bytesRemain_, readErr_, stopReqBody_, didReset_, peerReset_, resetErr_, done_, firstByte_, pastHeaders_, pastTrailers_, num1xx_, trailer_, resTrailer_) { + this.$val = this; + if (arguments.length === 0) { + this.cc = ptrType$29.nil; + this.req = ptrType$7.nil; + this.trace = ptrType$47.nil; + this.ID = 0; + this.resc = $chanNil; + this.bufPipe = new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), $ifaceNil, $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError); + this.startedWrite = false; + this.requestedGzip = false; + this.on100 = $throwNilPointerError; + this.flow = new http2flow.ptr(0, ptrType$33.nil); + this.inflow = new http2flow.ptr(0, ptrType$33.nil); + this.bytesRemain = new $Int64(0, 0); + this.readErr = $ifaceNil; + this.stopReqBody = $ifaceNil; + this.didReset = false; + this.peerReset = $chanNil; + this.resetErr = $ifaceNil; + this.done = $chanNil; + this.firstByte = false; + this.pastHeaders = false; + this.pastTrailers = false; + this.num1xx = 0; + this.trailer = false; + this.resTrailer = ptrType$74.nil; + return; + } + this.cc = cc_; + this.req = req_; + this.trace = trace_; + this.ID = ID_; + this.resc = resc_; + this.bufPipe = bufPipe_; + this.startedWrite = startedWrite_; + this.requestedGzip = requestedGzip_; + this.on100 = on100_; + this.flow = flow_; + this.inflow = inflow_; + this.bytesRemain = bytesRemain_; + this.readErr = readErr_; + this.stopReqBody = stopReqBody_; + this.didReset = didReset_; + this.peerReset = peerReset_; + this.resetErr = resetErr_; + this.done = done_; + this.firstByte = firstByte_; + this.pastHeaders = pastHeaders_; + this.pastTrailers = pastTrailers_; + this.num1xx = num1xx_; + this.trailer = trailer_; + this.resTrailer = resTrailer_; + }); + http2stickyErrWriter = $pkg.http2stickyErrWriter = $newType(0, $kindStruct, "http.http2stickyErrWriter", true, "net/http", false, function(w_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + this.err = ptrType$51.nil; + return; + } + this.w = w_; + this.err = err_; + }); + http2noCachedConnError = $pkg.http2noCachedConnError = $newType(0, $kindStruct, "http.http2noCachedConnError", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + http2RoundTripOpt = $pkg.http2RoundTripOpt = $newType(0, $kindStruct, "http.http2RoundTripOpt", true, "net/http", false, function(OnlyCachedConn_) { + this.$val = this; + if (arguments.length === 0) { + this.OnlyCachedConn = false; + return; + } + this.OnlyCachedConn = OnlyCachedConn_; + }); + http2clientConnIdleState = $pkg.http2clientConnIdleState = $newType(0, $kindStruct, "http.http2clientConnIdleState", true, "net/http", false, function(canTakeNewRequest_, freshConn_) { + this.$val = this; + if (arguments.length === 0) { + this.canTakeNewRequest = false; + this.freshConn = false; + return; + } + this.canTakeNewRequest = canTakeNewRequest_; + this.freshConn = freshConn_; + }); + http2badStringError = $pkg.http2badStringError = $newType(0, $kindStruct, "http.http2badStringError", true, "net/http", false, function(what_, str_) { + this.$val = this; + if (arguments.length === 0) { + this.what = ""; + this.str = ""; + return; + } + this.what = what_; + this.str = str_; + }); + http2resAndError = $pkg.http2resAndError = $newType(0, $kindStruct, "http.http2resAndError", true, "net/http", false, function(res_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.res = ptrType$16.nil; + this.err = $ifaceNil; + return; + } + this.res = res_; + this.err = err_; + }); + http2clientConnReadLoop = $pkg.http2clientConnReadLoop = $newType(0, $kindStruct, "http.http2clientConnReadLoop", true, "net/http", false, function(cc_, closeWhenIdle_) { + this.$val = this; + if (arguments.length === 0) { + this.cc = ptrType$29.nil; + this.closeWhenIdle = false; + return; + } + this.cc = cc_; + this.closeWhenIdle = closeWhenIdle_; + }); + http2GoAwayError = $pkg.http2GoAwayError = $newType(0, $kindStruct, "http.http2GoAwayError", true, "net/http", false, function(LastStreamID_, ErrCode_, DebugData_) { + this.$val = this; + if (arguments.length === 0) { + this.LastStreamID = 0; + this.ErrCode = 0; + this.DebugData = ""; + return; + } + this.LastStreamID = LastStreamID_; + this.ErrCode = ErrCode_; + this.DebugData = DebugData_; + }); + http2transportResponseBody = $pkg.http2transportResponseBody = $newType(0, $kindStruct, "http.http2transportResponseBody", true, "net/http", false, function(cs_) { + this.$val = this; + if (arguments.length === 0) { + this.cs = ptrType$75.nil; + return; + } + this.cs = cs_; + }); + http2erringRoundTripper = $pkg.http2erringRoundTripper = $newType(0, $kindStruct, "http.http2erringRoundTripper", true, "net/http", false, function(err_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + return; + } + this.err = err_; + }); + http2gzipReader = $pkg.http2gzipReader = $newType(0, $kindStruct, "http.http2gzipReader", true, "net/http", false, function(body_, zr_, zerr_) { + this.$val = this; + if (arguments.length === 0) { + this.body = $ifaceNil; + this.zr = ptrType$76.nil; + this.zerr = $ifaceNil; + return; + } + this.body = body_; + this.zr = zr_; + this.zerr = zerr_; + }); + http2bodyWriterState = $pkg.http2bodyWriterState = $newType(0, $kindStruct, "http.http2bodyWriterState", true, "net/http", false, function(cs_, timer_, fnonce_, fn_, resc_, delay_) { + this.$val = this; + if (arguments.length === 0) { + this.cs = ptrType$75.nil; + this.timer = ptrType$57.nil; + this.fnonce = ptrType$77.nil; + this.fn = $throwNilPointerError; + this.resc = $chanNil; + this.delay = new time.Duration(0, 0); + return; + } + this.cs = cs_; + this.timer = timer_; + this.fnonce = fnonce_; + this.fn = fn_; + this.resc = resc_; + this.delay = delay_; + }); + http2writeFramer = $pkg.http2writeFramer = $newType(8, $kindInterface, "http.http2writeFramer", true, "net/http", false, null); + http2writeContext = $pkg.http2writeContext = $newType(8, $kindInterface, "http.http2writeContext", true, "net/http", false, null); + http2flushFrameWriter = $pkg.http2flushFrameWriter = $newType(0, $kindStruct, "http.http2flushFrameWriter", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + http2writeSettings = $pkg.http2writeSettings = $newType(12, $kindSlice, "http.http2writeSettings", true, "net/http", false, null); + http2writeGoAway = $pkg.http2writeGoAway = $newType(0, $kindStruct, "http.http2writeGoAway", true, "net/http", false, function(maxStreamID_, code_) { + this.$val = this; + if (arguments.length === 0) { + this.maxStreamID = 0; + this.code = 0; + return; + } + this.maxStreamID = maxStreamID_; + this.code = code_; + }); + http2writeData = $pkg.http2writeData = $newType(0, $kindStruct, "http.http2writeData", true, "net/http", false, function(streamID_, p_, endStream_) { + this.$val = this; + if (arguments.length === 0) { + this.streamID = 0; + this.p = sliceType$3.nil; + this.endStream = false; + return; + } + this.streamID = streamID_; + this.p = p_; + this.endStream = endStream_; + }); + http2handlerPanicRST = $pkg.http2handlerPanicRST = $newType(0, $kindStruct, "http.http2handlerPanicRST", true, "net/http", false, function(StreamID_) { + this.$val = this; + if (arguments.length === 0) { + this.StreamID = 0; + return; + } + this.StreamID = StreamID_; + }); + http2writePingAck = $pkg.http2writePingAck = $newType(0, $kindStruct, "http.http2writePingAck", true, "net/http", false, function(pf_) { + this.$val = this; + if (arguments.length === 0) { + this.pf = ptrType$44.nil; + return; + } + this.pf = pf_; + }); + http2writeSettingsAck = $pkg.http2writeSettingsAck = $newType(0, $kindStruct, "http.http2writeSettingsAck", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + http2writeResHeaders = $pkg.http2writeResHeaders = $newType(0, $kindStruct, "http.http2writeResHeaders", true, "net/http", false, function(streamID_, httpResCode_, h_, trailers_, endStream_, date_, contentType_, contentLength_) { + this.$val = this; + if (arguments.length === 0) { + this.streamID = 0; + this.httpResCode = 0; + this.h = false; + this.trailers = sliceType$1.nil; + this.endStream = false; + this.date = ""; + this.contentType = ""; + this.contentLength = ""; + return; + } + this.streamID = streamID_; + this.httpResCode = httpResCode_; + this.h = h_; + this.trailers = trailers_; + this.endStream = endStream_; + this.date = date_; + this.contentType = contentType_; + this.contentLength = contentLength_; + }); + http2writePushPromise = $pkg.http2writePushPromise = $newType(0, $kindStruct, "http.http2writePushPromise", true, "net/http", false, function(streamID_, method_, url_, h_, allocatePromisedID_, promisedID_) { + this.$val = this; + if (arguments.length === 0) { + this.streamID = 0; + this.method = ""; + this.url = ptrType$19.nil; + this.h = false; + this.allocatePromisedID = $throwNilPointerError; + this.promisedID = 0; + return; + } + this.streamID = streamID_; + this.method = method_; + this.url = url_; + this.h = h_; + this.allocatePromisedID = allocatePromisedID_; + this.promisedID = promisedID_; + }); + http2write100ContinueHeadersFrame = $pkg.http2write100ContinueHeadersFrame = $newType(0, $kindStruct, "http.http2write100ContinueHeadersFrame", true, "net/http", false, function(streamID_) { + this.$val = this; + if (arguments.length === 0) { + this.streamID = 0; + return; + } + this.streamID = streamID_; + }); + http2writeWindowUpdate = $pkg.http2writeWindowUpdate = $newType(0, $kindStruct, "http.http2writeWindowUpdate", true, "net/http", false, function(streamID_, n_) { + this.$val = this; + if (arguments.length === 0) { + this.streamID = 0; + this.n = 0; + return; + } + this.streamID = streamID_; + this.n = n_; + }); + http2WriteScheduler = $pkg.http2WriteScheduler = $newType(8, $kindInterface, "http.http2WriteScheduler", true, "net/http", false, null); + http2OpenStreamOptions = $pkg.http2OpenStreamOptions = $newType(0, $kindStruct, "http.http2OpenStreamOptions", true, "net/http", false, function(PusherID_) { + this.$val = this; + if (arguments.length === 0) { + this.PusherID = 0; + return; + } + this.PusherID = PusherID_; + }); + http2FrameWriteRequest = $pkg.http2FrameWriteRequest = $newType(0, $kindStruct, "http.http2FrameWriteRequest", true, "net/http", false, function(write_, stream_, done_) { + this.$val = this; + if (arguments.length === 0) { + this.write = $ifaceNil; + this.stream = ptrType$6.nil; + this.done = $chanNil; + return; + } + this.write = write_; + this.stream = stream_; + this.done = done_; + }); + http2writeQueue = $pkg.http2writeQueue = $newType(0, $kindStruct, "http.http2writeQueue", true, "net/http", false, function(s_) { + this.$val = this; + if (arguments.length === 0) { + this.s = sliceType$20.nil; + return; + } + this.s = s_; + }); + http2writeQueuePool = $pkg.http2writeQueuePool = $newType(12, $kindSlice, "http.http2writeQueuePool", true, "net/http", false, null); + http2PriorityWriteSchedulerConfig = $pkg.http2PriorityWriteSchedulerConfig = $newType(0, $kindStruct, "http.http2PriorityWriteSchedulerConfig", true, "net/http", false, function(MaxClosedNodesInTree_, MaxIdleNodesInTree_, ThrottleOutOfOrderWrites_) { + this.$val = this; + if (arguments.length === 0) { + this.MaxClosedNodesInTree = 0; + this.MaxIdleNodesInTree = 0; + this.ThrottleOutOfOrderWrites = false; + return; + } + this.MaxClosedNodesInTree = MaxClosedNodesInTree_; + this.MaxIdleNodesInTree = MaxIdleNodesInTree_; + this.ThrottleOutOfOrderWrites = ThrottleOutOfOrderWrites_; + }); + http2priorityNodeState = $pkg.http2priorityNodeState = $newType(4, $kindInt, "http.http2priorityNodeState", true, "net/http", false, null); + http2priorityNode = $pkg.http2priorityNode = $newType(0, $kindStruct, "http.http2priorityNode", true, "net/http", false, function(q_, id_, weight_, state_, bytes_, subtreeBytes_, parent_, kids_, prev_, next_) { + this.$val = this; + if (arguments.length === 0) { + this.q = new http2writeQueue.ptr(sliceType$20.nil); + this.id = 0; + this.weight = 0; + this.state = 0; + this.bytes = new $Int64(0, 0); + this.subtreeBytes = new $Int64(0, 0); + this.parent = ptrType$80.nil; + this.kids = ptrType$80.nil; + this.prev = ptrType$80.nil; + this.next = ptrType$80.nil; + return; + } + this.q = q_; + this.id = id_; + this.weight = weight_; + this.state = state_; + this.bytes = bytes_; + this.subtreeBytes = subtreeBytes_; + this.parent = parent_; + this.kids = kids_; + this.prev = prev_; + this.next = next_; + }); + http2sortPriorityNodeSiblings = $pkg.http2sortPriorityNodeSiblings = $newType(12, $kindSlice, "http.http2sortPriorityNodeSiblings", true, "net/http", false, null); + http2priorityWriteScheduler = $pkg.http2priorityWriteScheduler = $newType(0, $kindStruct, "http.http2priorityWriteScheduler", true, "net/http", false, function(root_, nodes_, maxID_, closedNodes_, idleNodes_, maxClosedNodesInTree_, maxIdleNodesInTree_, writeThrottleLimit_, enableWriteThrottle_, tmp_, queuePool_) { + this.$val = this; + if (arguments.length === 0) { + this.root = new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$20.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$80.nil, ptrType$80.nil, ptrType$80.nil, ptrType$80.nil); + this.nodes = false; + this.maxID = 0; + this.closedNodes = sliceType$21.nil; + this.idleNodes = sliceType$21.nil; + this.maxClosedNodesInTree = 0; + this.maxIdleNodesInTree = 0; + this.writeThrottleLimit = 0; + this.enableWriteThrottle = false; + this.tmp = sliceType$21.nil; + this.queuePool = http2writeQueuePool.nil; + return; + } + this.root = root_; + this.nodes = nodes_; + this.maxID = maxID_; + this.closedNodes = closedNodes_; + this.idleNodes = idleNodes_; + this.maxClosedNodesInTree = maxClosedNodesInTree_; + this.maxIdleNodesInTree = maxIdleNodesInTree_; + this.writeThrottleLimit = writeThrottleLimit_; + this.enableWriteThrottle = enableWriteThrottle_; + this.tmp = tmp_; + this.queuePool = queuePool_; + }); + http2randomWriteScheduler = $pkg.http2randomWriteScheduler = $newType(0, $kindStruct, "http.http2randomWriteScheduler", true, "net/http", false, function(zero_, sq_, queuePool_) { + this.$val = this; + if (arguments.length === 0) { + this.zero = new http2writeQueue.ptr(sliceType$20.nil); + this.sq = false; + this.queuePool = http2writeQueuePool.nil; + return; + } + this.zero = zero_; + this.sq = sq_; + this.queuePool = queuePool_; + }); + Header = $pkg.Header = $newType(4, $kindMap, "http.Header", true, "net/http", true, null); + writeStringer = $pkg.writeStringer = $newType(8, $kindInterface, "http.writeStringer", true, "net/http", false, null); + stringWriter = $pkg.stringWriter = $newType(0, $kindStruct, "http.stringWriter", true, "net/http", false, function(w_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + return; + } + this.w = w_; + }); + keyValues = $pkg.keyValues = $newType(0, $kindStruct, "http.keyValues", true, "net/http", false, function(key_, values_) { + this.$val = this; + if (arguments.length === 0) { + this.key = ""; + this.values = sliceType$1.nil; + return; + } + this.key = key_; + this.values = values_; + }); + headerSorter = $pkg.headerSorter = $newType(0, $kindStruct, "http.headerSorter", true, "net/http", false, function(kvs_) { + this.$val = this; + if (arguments.length === 0) { + this.kvs = sliceType$4.nil; + return; + } + this.kvs = kvs_; + }); + contextKey = $pkg.contextKey = $newType(0, $kindStruct, "http.contextKey", true, "net/http", false, function(name_) { + this.$val = this; + if (arguments.length === 0) { + this.name = ""; + return; + } + this.name = name_; + }); + noBody = $pkg.noBody = $newType(0, $kindStruct, "http.noBody", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + PushOptions = $pkg.PushOptions = $newType(0, $kindStruct, "http.PushOptions", true, "net/http", true, function(Method_, Header_) { + this.$val = this; + if (arguments.length === 0) { + this.Method = ""; + this.Header = false; + return; + } + this.Method = Method_; + this.Header = Header_; + }); + CookieJar = $pkg.CookieJar = $newType(8, $kindInterface, "http.CookieJar", true, "net/http", true, null); + ProtocolError = $pkg.ProtocolError = $newType(0, $kindStruct, "http.ProtocolError", true, "net/http", true, function(ErrorString_) { + this.$val = this; + if (arguments.length === 0) { + this.ErrorString = ""; + return; + } + this.ErrorString = ErrorString_; + }); + badStringError = $pkg.badStringError = $newType(0, $kindStruct, "http.badStringError", true, "net/http", false, function(what_, str_) { + this.$val = this; + if (arguments.length === 0) { + this.what = ""; + this.str = ""; + return; + } + this.what = what_; + this.str = str_; + }); + Request = $pkg.Request = $newType(0, $kindStruct, "http.Request", true, "net/http", true, function(Method_, URL_, Proto_, ProtoMajor_, ProtoMinor_, Header_, Body_, GetBody_, ContentLength_, TransferEncoding_, Close_, Host_, Form_, PostForm_, MultipartForm_, Trailer_, RemoteAddr_, RequestURI_, TLS_, Cancel_, Response_, ctx_) { + this.$val = this; + if (arguments.length === 0) { + this.Method = ""; + this.URL = ptrType$19.nil; + this.Proto = ""; + this.ProtoMajor = 0; + this.ProtoMinor = 0; + this.Header = false; + this.Body = $ifaceNil; + this.GetBody = $throwNilPointerError; + this.ContentLength = new $Int64(0, 0); + this.TransferEncoding = sliceType$1.nil; + this.Close = false; + this.Host = ""; + this.Form = false; + this.PostForm = false; + this.MultipartForm = ptrType$20.nil; + this.Trailer = false; + this.RemoteAddr = ""; + this.RequestURI = ""; + this.TLS = ptrType$17.nil; + this.Cancel = $chanNil; + this.Response = ptrType$16.nil; + this.ctx = $ifaceNil; + return; + } + this.Method = Method_; + this.URL = URL_; + this.Proto = Proto_; + this.ProtoMajor = ProtoMajor_; + this.ProtoMinor = ProtoMinor_; + this.Header = Header_; + this.Body = Body_; + this.GetBody = GetBody_; + this.ContentLength = ContentLength_; + this.TransferEncoding = TransferEncoding_; + this.Close = Close_; + this.Host = Host_; + this.Form = Form_; + this.PostForm = PostForm_; + this.MultipartForm = MultipartForm_; + this.Trailer = Trailer_; + this.RemoteAddr = RemoteAddr_; + this.RequestURI = RequestURI_; + this.TLS = TLS_; + this.Cancel = Cancel_; + this.Response = Response_; + this.ctx = ctx_; + }); + requestBodyReadError = $pkg.requestBodyReadError = $newType(0, $kindStruct, "http.requestBodyReadError", true, "net/http", false, function(error_) { + this.$val = this; + if (arguments.length === 0) { + this.error = $ifaceNil; + return; + } + this.error = error_; + }); + maxBytesReader = $pkg.maxBytesReader = $newType(0, $kindStruct, "http.maxBytesReader", true, "net/http", false, function(w_, r_, n_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.w = $ifaceNil; + this.r = $ifaceNil; + this.n = new $Int64(0, 0); + this.err = $ifaceNil; + return; + } + this.w = w_; + this.r = r_; + this.n = n_; + this.err = err_; + }); + Response = $pkg.Response = $newType(0, $kindStruct, "http.Response", true, "net/http", true, function(Status_, StatusCode_, Proto_, ProtoMajor_, ProtoMinor_, Header_, Body_, ContentLength_, TransferEncoding_, Close_, Uncompressed_, Trailer_, Request_, TLS_) { + this.$val = this; + if (arguments.length === 0) { + this.Status = ""; + this.StatusCode = 0; + this.Proto = ""; + this.ProtoMajor = 0; + this.ProtoMinor = 0; + this.Header = false; + this.Body = $ifaceNil; + this.ContentLength = new $Int64(0, 0); + this.TransferEncoding = sliceType$1.nil; + this.Close = false; + this.Uncompressed = false; + this.Trailer = false; + this.Request = ptrType$7.nil; + this.TLS = ptrType$17.nil; + return; + } + this.Status = Status_; + this.StatusCode = StatusCode_; + this.Proto = Proto_; + this.ProtoMajor = ProtoMajor_; + this.ProtoMinor = ProtoMinor_; + this.Header = Header_; + this.Body = Body_; + this.ContentLength = ContentLength_; + this.TransferEncoding = TransferEncoding_; + this.Close = Close_; + this.Uncompressed = Uncompressed_; + this.Trailer = Trailer_; + this.Request = Request_; + this.TLS = TLS_; + }); + Handler = $pkg.Handler = $newType(8, $kindInterface, "http.Handler", true, "net/http", true, null); + ResponseWriter = $pkg.ResponseWriter = $newType(8, $kindInterface, "http.ResponseWriter", true, "net/http", true, null); + conn = $pkg.conn = $newType(0, $kindStruct, "http.conn", true, "net/http", false, function(server_, cancelCtx_, rwc_, remoteAddr_, tlsState_, werr_, r_, bufr_, bufw_, lastMethod_, curReq_, curState_, mu_, hijackedv_) { + this.$val = this; + if (arguments.length === 0) { + this.server = ptrType$48.nil; + this.cancelCtx = $throwNilPointerError; + this.rwc = $ifaceNil; + this.remoteAddr = ""; + this.tlsState = ptrType$17.nil; + this.werr = $ifaceNil; + this.r = ptrType$94.nil; + this.bufr = ptrType$73.nil; + this.bufw = ptrType$10.nil; + this.lastMethod = ""; + this.curReq = new atomic.Value.ptr($ifaceNil); + this.curState = new structType$2.ptr(new $Uint64(0, 0)); + this.mu = new sync.Mutex.ptr(0, 0); + this.hijackedv = false; + return; + } + this.server = server_; + this.cancelCtx = cancelCtx_; + this.rwc = rwc_; + this.remoteAddr = remoteAddr_; + this.tlsState = tlsState_; + this.werr = werr_; + this.r = r_; + this.bufr = bufr_; + this.bufw = bufw_; + this.lastMethod = lastMethod_; + this.curReq = curReq_; + this.curState = curState_; + this.mu = mu_; + this.hijackedv = hijackedv_; + }); + chunkWriter = $pkg.chunkWriter = $newType(0, $kindStruct, "http.chunkWriter", true, "net/http", false, function(res_, header_, wroteHeader_, chunking_) { + this.$val = this; + if (arguments.length === 0) { + this.res = ptrType$95.nil; + this.header = false; + this.wroteHeader = false; + this.chunking = false; + return; + } + this.res = res_; + this.header = header_; + this.wroteHeader = wroteHeader_; + this.chunking = chunking_; + }); + response = $pkg.response = $newType(0, $kindStruct, "http.response", true, "net/http", false, function(conn_, req_, reqBody_, cancelCtx_, wroteHeader_, wroteContinue_, wants10KeepAlive_, wantsClose_, w_, cw_, handlerHeader_, calledHeader_, written_, contentLength_, status_, closeAfterReply_, requestBodyLimitHit_, trailers_, handlerDone_, dateBuf_, clenBuf_, statusBuf_, closeNotifyCh_, didCloseNotify_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = ptrType$98.nil; + this.req = ptrType$7.nil; + this.reqBody = $ifaceNil; + this.cancelCtx = $throwNilPointerError; + this.wroteHeader = false; + this.wroteContinue = false; + this.wants10KeepAlive = false; + this.wantsClose = false; + this.w = ptrType$10.nil; + this.cw = new chunkWriter.ptr(ptrType$95.nil, false, false, false); + this.handlerHeader = false; + this.calledHeader = false; + this.written = new $Int64(0, 0); + this.contentLength = new $Int64(0, 0); + this.status = 0; + this.closeAfterReply = false; + this.requestBodyLimitHit = false; + this.trailers = sliceType$1.nil; + this.handlerDone = 0; + this.dateBuf = arrayType.zero(); + this.clenBuf = arrayType$7.zero(); + this.statusBuf = arrayType$8.zero(); + this.closeNotifyCh = $chanNil; + this.didCloseNotify = 0; + return; + } + this.conn = conn_; + this.req = req_; + this.reqBody = reqBody_; + this.cancelCtx = cancelCtx_; + this.wroteHeader = wroteHeader_; + this.wroteContinue = wroteContinue_; + this.wants10KeepAlive = wants10KeepAlive_; + this.wantsClose = wantsClose_; + this.w = w_; + this.cw = cw_; + this.handlerHeader = handlerHeader_; + this.calledHeader = calledHeader_; + this.written = written_; + this.contentLength = contentLength_; + this.status = status_; + this.closeAfterReply = closeAfterReply_; + this.requestBodyLimitHit = requestBodyLimitHit_; + this.trailers = trailers_; + this.handlerDone = handlerDone_; + this.dateBuf = dateBuf_; + this.clenBuf = clenBuf_; + this.statusBuf = statusBuf_; + this.closeNotifyCh = closeNotifyCh_; + this.didCloseNotify = didCloseNotify_; + }); + atomicBool = $pkg.atomicBool = $newType(4, $kindInt32, "http.atomicBool", true, "net/http", false, null); + writerOnly = $pkg.writerOnly = $newType(0, $kindStruct, "http.writerOnly", true, "net/http", false, function(Writer_) { + this.$val = this; + if (arguments.length === 0) { + this.Writer = $ifaceNil; + return; + } + this.Writer = Writer_; + }); + readResult = $pkg.readResult = $newType(0, $kindStruct, "http.readResult", true, "net/http", false, function(n_, err_, b_) { + this.$val = this; + if (arguments.length === 0) { + this.n = 0; + this.err = $ifaceNil; + this.b = 0; + return; + } + this.n = n_; + this.err = err_; + this.b = b_; + }); + connReader = $pkg.connReader = $newType(0, $kindStruct, "http.connReader", true, "net/http", false, function(conn_, mu_, hasByte_, byteBuf_, cond_, inRead_, aborted_, remain_) { + this.$val = this; + if (arguments.length === 0) { + this.conn = ptrType$98.nil; + this.mu = new sync.Mutex.ptr(0, 0); + this.hasByte = false; + this.byteBuf = arrayType$6.zero(); + this.cond = ptrType$72.nil; + this.inRead = false; + this.aborted = false; + this.remain = new $Int64(0, 0); + return; + } + this.conn = conn_; + this.mu = mu_; + this.hasByte = hasByte_; + this.byteBuf = byteBuf_; + this.cond = cond_; + this.inRead = inRead_; + this.aborted = aborted_; + this.remain = remain_; + }); + expectContinueReader = $pkg.expectContinueReader = $newType(0, $kindStruct, "http.expectContinueReader", true, "net/http", false, function(resp_, readCloser_, closed_, sawEOF_) { + this.$val = this; + if (arguments.length === 0) { + this.resp = ptrType$95.nil; + this.readCloser = $ifaceNil; + this.closed = false; + this.sawEOF = false; + return; + } + this.resp = resp_; + this.readCloser = readCloser_; + this.closed = closed_; + this.sawEOF = sawEOF_; + }); + extraHeader = $pkg.extraHeader = $newType(0, $kindStruct, "http.extraHeader", true, "net/http", false, function(contentType_, connection_, transferEncoding_, date_, contentLength_) { + this.$val = this; + if (arguments.length === 0) { + this.contentType = ""; + this.connection = ""; + this.transferEncoding = ""; + this.date = sliceType$3.nil; + this.contentLength = sliceType$3.nil; + return; + } + this.contentType = contentType_; + this.connection = connection_; + this.transferEncoding = transferEncoding_; + this.date = date_; + this.contentLength = contentLength_; + }); + closeWriter = $pkg.closeWriter = $newType(8, $kindInterface, "http.closeWriter", true, "net/http", false, null); + badRequestError = $pkg.badRequestError = $newType(8, $kindString, "http.badRequestError", true, "net/http", false, null); + HandlerFunc = $pkg.HandlerFunc = $newType(4, $kindFunc, "http.HandlerFunc", true, "net/http", true, null); + redirectHandler = $pkg.redirectHandler = $newType(0, $kindStruct, "http.redirectHandler", true, "net/http", false, function(url_, code_) { + this.$val = this; + if (arguments.length === 0) { + this.url = ""; + this.code = 0; + return; + } + this.url = url_; + this.code = code_; + }); + ServeMux = $pkg.ServeMux = $newType(0, $kindStruct, "http.ServeMux", true, "net/http", true, function(mu_, m_, hosts_) { + this.$val = this; + if (arguments.length === 0) { + this.mu = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); + this.m = false; + this.hosts = false; + return; + } + this.mu = mu_; + this.m = m_; + this.hosts = hosts_; + }); + muxEntry = $pkg.muxEntry = $newType(0, $kindStruct, "http.muxEntry", true, "net/http", false, function(h_, pattern_) { + this.$val = this; + if (arguments.length === 0) { + this.h = $ifaceNil; + this.pattern = ""; + return; + } + this.h = h_; + this.pattern = pattern_; + }); + Server = $pkg.Server = $newType(0, $kindStruct, "http.Server", true, "net/http", true, function(Addr_, Handler_, TLSConfig_, ReadTimeout_, ReadHeaderTimeout_, WriteTimeout_, IdleTimeout_, MaxHeaderBytes_, TLSNextProto_, ConnState_, ErrorLog_, disableKeepAlives_, inShutdown_, nextProtoOnce_, nextProtoErr_, mu_, listeners_, activeConn_, doneChan_, onShutdown_) { + this.$val = this; + if (arguments.length === 0) { + this.Addr = ""; + this.Handler = $ifaceNil; + this.TLSConfig = ptrType$14.nil; + this.ReadTimeout = new time.Duration(0, 0); + this.ReadHeaderTimeout = new time.Duration(0, 0); + this.WriteTimeout = new time.Duration(0, 0); + this.IdleTimeout = new time.Duration(0, 0); + this.MaxHeaderBytes = 0; + this.TLSNextProto = false; + this.ConnState = $throwNilPointerError; + this.ErrorLog = ptrType$55.nil; + this.disableKeepAlives = 0; + this.inShutdown = 0; + this.nextProtoOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.nextProtoErr = $ifaceNil; + this.mu = new sync.Mutex.ptr(0, 0); + this.listeners = false; + this.activeConn = false; + this.doneChan = $chanNil; + this.onShutdown = sliceType$16.nil; + return; + } + this.Addr = Addr_; + this.Handler = Handler_; + this.TLSConfig = TLSConfig_; + this.ReadTimeout = ReadTimeout_; + this.ReadHeaderTimeout = ReadHeaderTimeout_; + this.WriteTimeout = WriteTimeout_; + this.IdleTimeout = IdleTimeout_; + this.MaxHeaderBytes = MaxHeaderBytes_; + this.TLSNextProto = TLSNextProto_; + this.ConnState = ConnState_; + this.ErrorLog = ErrorLog_; + this.disableKeepAlives = disableKeepAlives_; + this.inShutdown = inShutdown_; + this.nextProtoOnce = nextProtoOnce_; + this.nextProtoErr = nextProtoErr_; + this.mu = mu_; + this.listeners = listeners_; + this.activeConn = activeConn_; + this.doneChan = doneChan_; + this.onShutdown = onShutdown_; + }); + ConnState = $pkg.ConnState = $newType(4, $kindInt, "http.ConnState", true, "net/http", true, null); + serverHandler = $pkg.serverHandler = $newType(0, $kindStruct, "http.serverHandler", true, "net/http", false, function(srv_) { + this.$val = this; + if (arguments.length === 0) { + this.srv = ptrType$48.nil; + return; + } + this.srv = srv_; + }); + tcpKeepAliveListener = $pkg.tcpKeepAliveListener = $newType(0, $kindStruct, "http.tcpKeepAliveListener", true, "net/http", false, function(TCPListener_) { + this.$val = this; + if (arguments.length === 0) { + this.TCPListener = ptrType$103.nil; + return; + } + this.TCPListener = TCPListener_; + }); + onceCloseListener = $pkg.onceCloseListener = $newType(0, $kindStruct, "http.onceCloseListener", true, "net/http", false, function(Listener_, once_, closeErr_) { + this.$val = this; + if (arguments.length === 0) { + this.Listener = $ifaceNil; + this.once = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.closeErr = $ifaceNil; + return; + } + this.Listener = Listener_; + this.once = once_; + this.closeErr = closeErr_; + }); + globalOptionsHandler = $pkg.globalOptionsHandler = $newType(0, $kindStruct, "http.globalOptionsHandler", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + initNPNRequest = $pkg.initNPNRequest = $newType(0, $kindStruct, "http.initNPNRequest", true, "net/http", false, function(c_, h_) { + this.$val = this; + if (arguments.length === 0) { + this.c = ptrType$101.nil; + this.h = new serverHandler.ptr(ptrType$48.nil); + return; + } + this.c = c_; + this.h = h_; + }); + loggingConn = $pkg.loggingConn = $newType(0, $kindStruct, "http.loggingConn", true, "net/http", false, function(name_, Conn_) { + this.$val = this; + if (arguments.length === 0) { + this.name = ""; + this.Conn = $ifaceNil; + return; + } + this.name = name_; + this.Conn = Conn_; + }); + checkConnErrorWriter = $pkg.checkConnErrorWriter = $newType(0, $kindStruct, "http.checkConnErrorWriter", true, "net/http", false, function(c_) { + this.$val = this; + if (arguments.length === 0) { + this.c = ptrType$98.nil; + return; + } + this.c = c_; + }); + sniffSig = $pkg.sniffSig = $newType(8, $kindInterface, "http.sniffSig", true, "net/http", false, null); + exactSig = $pkg.exactSig = $newType(0, $kindStruct, "http.exactSig", true, "net/http", false, function(sig_, ct_) { + this.$val = this; + if (arguments.length === 0) { + this.sig = sliceType$3.nil; + this.ct = ""; + return; + } + this.sig = sig_; + this.ct = ct_; + }); + maskedSig = $pkg.maskedSig = $newType(0, $kindStruct, "http.maskedSig", true, "net/http", false, function(mask_, pat_, skipWS_, ct_) { + this.$val = this; + if (arguments.length === 0) { + this.mask = sliceType$3.nil; + this.pat = sliceType$3.nil; + this.skipWS = false; + this.ct = ""; + return; + } + this.mask = mask_; + this.pat = pat_; + this.skipWS = skipWS_; + this.ct = ct_; + }); + htmlSig = $pkg.htmlSig = $newType(12, $kindSlice, "http.htmlSig", true, "net/http", false, null); + mp4Sig = $pkg.mp4Sig = $newType(0, $kindStruct, "http.mp4Sig", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + textSig = $pkg.textSig = $newType(0, $kindStruct, "http.textSig", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + socksCommand = $pkg.socksCommand = $newType(4, $kindInt, "http.socksCommand", true, "net/http", false, null); + socksAuthMethod = $pkg.socksAuthMethod = $newType(4, $kindInt, "http.socksAuthMethod", true, "net/http", false, null); + socksReply = $pkg.socksReply = $newType(4, $kindInt, "http.socksReply", true, "net/http", false, null); + socksAddr = $pkg.socksAddr = $newType(0, $kindStruct, "http.socksAddr", true, "net/http", false, function(Name_, IP_, Port_) { + this.$val = this; + if (arguments.length === 0) { + this.Name = ""; + this.IP = net.IP.nil; + this.Port = 0; + return; + } + this.Name = Name_; + this.IP = IP_; + this.Port = Port_; + }); + socksConn = $pkg.socksConn = $newType(0, $kindStruct, "http.socksConn", true, "net/http", false, function(Conn_, boundAddr_) { + this.$val = this; + if (arguments.length === 0) { + this.Conn = $ifaceNil; + this.boundAddr = $ifaceNil; + return; + } + this.Conn = Conn_; + this.boundAddr = boundAddr_; + }); + socksDialer = $pkg.socksDialer = $newType(0, $kindStruct, "http.socksDialer", true, "net/http", false, function(cmd_, proxyNetwork_, proxyAddress_, ProxyDial_, AuthMethods_, Authenticate_) { + this.$val = this; + if (arguments.length === 0) { + this.cmd = 0; + this.proxyNetwork = ""; + this.proxyAddress = ""; + this.ProxyDial = $throwNilPointerError; + this.AuthMethods = sliceType$24.nil; + this.Authenticate = $throwNilPointerError; + return; + } + this.cmd = cmd_; + this.proxyNetwork = proxyNetwork_; + this.proxyAddress = proxyAddress_; + this.ProxyDial = ProxyDial_; + this.AuthMethods = AuthMethods_; + this.Authenticate = Authenticate_; + }); + socksUsernamePassword = $pkg.socksUsernamePassword = $newType(0, $kindStruct, "http.socksUsernamePassword", true, "net/http", false, function(Username_, Password_) { + this.$val = this; + if (arguments.length === 0) { + this.Username = ""; + this.Password = ""; + return; + } + this.Username = Username_; + this.Password = Password_; + }); + errorReader = $pkg.errorReader = $newType(0, $kindStruct, "http.errorReader", true, "net/http", false, function(err_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + return; + } + this.err = err_; + }); + byteReader = $pkg.byteReader = $newType(0, $kindStruct, "http.byteReader", true, "net/http", false, function(b_, done_) { + this.$val = this; + if (arguments.length === 0) { + this.b = 0; + this.done = false; + return; + } + this.b = b_; + this.done = done_; + }); + transferBodyReader = $pkg.transferBodyReader = $newType(0, $kindStruct, "http.transferBodyReader", true, "net/http", false, function(tw_) { + this.$val = this; + if (arguments.length === 0) { + this.tw = ptrType$106.nil; + return; + } + this.tw = tw_; + }); + transferWriter = $pkg.transferWriter = $newType(0, $kindStruct, "http.transferWriter", true, "net/http", false, function(Method_, Body_, BodyCloser_, ResponseToHEAD_, ContentLength_, Close_, TransferEncoding_, Header_, Trailer_, IsResponse_, bodyReadError_, FlushHeaders_, ByteReadCh_) { + this.$val = this; + if (arguments.length === 0) { + this.Method = ""; + this.Body = $ifaceNil; + this.BodyCloser = $ifaceNil; + this.ResponseToHEAD = false; + this.ContentLength = new $Int64(0, 0); + this.Close = false; + this.TransferEncoding = sliceType$1.nil; + this.Header = false; + this.Trailer = false; + this.IsResponse = false; + this.bodyReadError = $ifaceNil; + this.FlushHeaders = false; + this.ByteReadCh = $chanNil; + return; + } + this.Method = Method_; + this.Body = Body_; + this.BodyCloser = BodyCloser_; + this.ResponseToHEAD = ResponseToHEAD_; + this.ContentLength = ContentLength_; + this.Close = Close_; + this.TransferEncoding = TransferEncoding_; + this.Header = Header_; + this.Trailer = Trailer_; + this.IsResponse = IsResponse_; + this.bodyReadError = bodyReadError_; + this.FlushHeaders = FlushHeaders_; + this.ByteReadCh = ByteReadCh_; + }); + transferReader = $pkg.transferReader = $newType(0, $kindStruct, "http.transferReader", true, "net/http", false, function(Header_, StatusCode_, RequestMethod_, ProtoMajor_, ProtoMinor_, Body_, ContentLength_, TransferEncoding_, Close_, Trailer_) { + this.$val = this; + if (arguments.length === 0) { + this.Header = false; + this.StatusCode = 0; + this.RequestMethod = ""; + this.ProtoMajor = 0; + this.ProtoMinor = 0; + this.Body = $ifaceNil; + this.ContentLength = new $Int64(0, 0); + this.TransferEncoding = sliceType$1.nil; + this.Close = false; + this.Trailer = false; + return; + } + this.Header = Header_; + this.StatusCode = StatusCode_; + this.RequestMethod = RequestMethod_; + this.ProtoMajor = ProtoMajor_; + this.ProtoMinor = ProtoMinor_; + this.Body = Body_; + this.ContentLength = ContentLength_; + this.TransferEncoding = TransferEncoding_; + this.Close = Close_; + this.Trailer = Trailer_; + }); + body = $pkg.body = $newType(0, $kindStruct, "http.body", true, "net/http", false, function(src_, hdr_, r_, closing_, doEarlyClose_, mu_, sawEOF_, closed_, earlyClose_, onHitEOF_) { + this.$val = this; + if (arguments.length === 0) { + this.src = $ifaceNil; + this.hdr = $ifaceNil; + this.r = ptrType$73.nil; + this.closing = false; + this.doEarlyClose = false; + this.mu = new sync.Mutex.ptr(0, 0); + this.sawEOF = false; + this.closed = false; + this.earlyClose = false; + this.onHitEOF = $throwNilPointerError; + return; + } + this.src = src_; + this.hdr = hdr_; + this.r = r_; + this.closing = closing_; + this.doEarlyClose = doEarlyClose_; + this.mu = mu_; + this.sawEOF = sawEOF_; + this.closed = closed_; + this.earlyClose = earlyClose_; + this.onHitEOF = onHitEOF_; + }); + bodyLocked = $pkg.bodyLocked = $newType(0, $kindStruct, "http.bodyLocked", true, "net/http", false, function(b_) { + this.$val = this; + if (arguments.length === 0) { + this.b = ptrType$97.nil; + return; + } + this.b = b_; + }); + finishAsyncByteRead = $pkg.finishAsyncByteRead = $newType(0, $kindStruct, "http.finishAsyncByteRead", true, "net/http", false, function(tw_) { + this.$val = this; + if (arguments.length === 0) { + this.tw = ptrType$106.nil; + return; + } + this.tw = tw_; + }); + Transport = $pkg.Transport = $newType(0, $kindStruct, "http.Transport", true, "net/http", true, function(idleMu_, wantIdle_, idleConn_, idleConnCh_, idleLRU_, reqMu_, reqCanceler_, altMu_, altProto_, connCountMu_, connPerHostCount_, connPerHostAvailable_, Proxy_, DialContext_, Dial_, DialTLS_, TLSClientConfig_, TLSHandshakeTimeout_, DisableKeepAlives_, DisableCompression_, MaxIdleConns_, MaxIdleConnsPerHost_, MaxConnsPerHost_, IdleConnTimeout_, ResponseHeaderTimeout_, ExpectContinueTimeout_, TLSNextProto_, ProxyConnectHeader_, MaxResponseHeaderBytes_, nextProtoOnce_, h2transport_) { + this.$val = this; + if (arguments.length === 0) { + this.idleMu = new sync.Mutex.ptr(0, 0); + this.wantIdle = false; + this.idleConn = false; + this.idleConnCh = false; + this.idleLRU = new connLRU.ptr(ptrType$13.nil, false); + this.reqMu = new sync.Mutex.ptr(0, 0); + this.reqCanceler = false; + this.altMu = new sync.Mutex.ptr(0, 0); + this.altProto = new atomic.Value.ptr($ifaceNil); + this.connCountMu = new sync.Mutex.ptr(0, 0); + this.connPerHostCount = false; + this.connPerHostAvailable = false; + this.Proxy = $throwNilPointerError; + this.DialContext = $throwNilPointerError; + this.Dial = $throwNilPointerError; + this.DialTLS = $throwNilPointerError; + this.TLSClientConfig = ptrType$14.nil; + this.TLSHandshakeTimeout = new time.Duration(0, 0); + this.DisableKeepAlives = false; + this.DisableCompression = false; + this.MaxIdleConns = 0; + this.MaxIdleConnsPerHost = 0; + this.MaxConnsPerHost = 0; + this.IdleConnTimeout = new time.Duration(0, 0); + this.ResponseHeaderTimeout = new time.Duration(0, 0); + this.ExpectContinueTimeout = new time.Duration(0, 0); + this.TLSNextProto = false; + this.ProxyConnectHeader = false; + this.MaxResponseHeaderBytes = new $Int64(0, 0); + this.nextProtoOnce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + this.h2transport = $ifaceNil; + return; + } + this.idleMu = idleMu_; + this.wantIdle = wantIdle_; + this.idleConn = idleConn_; + this.idleConnCh = idleConnCh_; + this.idleLRU = idleLRU_; + this.reqMu = reqMu_; + this.reqCanceler = reqCanceler_; + this.altMu = altMu_; + this.altProto = altProto_; + this.connCountMu = connCountMu_; + this.connPerHostCount = connPerHostCount_; + this.connPerHostAvailable = connPerHostAvailable_; + this.Proxy = Proxy_; + this.DialContext = DialContext_; + this.Dial = Dial_; + this.DialTLS = DialTLS_; + this.TLSClientConfig = TLSClientConfig_; + this.TLSHandshakeTimeout = TLSHandshakeTimeout_; + this.DisableKeepAlives = DisableKeepAlives_; + this.DisableCompression = DisableCompression_; + this.MaxIdleConns = MaxIdleConns_; + this.MaxIdleConnsPerHost = MaxIdleConnsPerHost_; + this.MaxConnsPerHost = MaxConnsPerHost_; + this.IdleConnTimeout = IdleConnTimeout_; + this.ResponseHeaderTimeout = ResponseHeaderTimeout_; + this.ExpectContinueTimeout = ExpectContinueTimeout_; + this.TLSNextProto = TLSNextProto_; + this.ProxyConnectHeader = ProxyConnectHeader_; + this.MaxResponseHeaderBytes = MaxResponseHeaderBytes_; + this.nextProtoOnce = nextProtoOnce_; + this.h2transport = h2transport_; + }); + h2Transport = $pkg.h2Transport = $newType(8, $kindInterface, "http.h2Transport", true, "net/http", false, null); + transportRequest = $pkg.transportRequest = $newType(0, $kindStruct, "http.transportRequest", true, "net/http", false, function(Request_, extra_, trace_, mu_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.Request = ptrType$7.nil; + this.extra = false; + this.trace = ptrType$49.nil; + this.mu = new sync.Mutex.ptr(0, 0); + this.err = $ifaceNil; + return; + } + this.Request = Request_; + this.extra = extra_; + this.trace = trace_; + this.mu = mu_; + this.err = err_; + }); + transportReadFromServerError = $pkg.transportReadFromServerError = $newType(0, $kindStruct, "http.transportReadFromServerError", true, "net/http", false, function(err_) { + this.$val = this; + if (arguments.length === 0) { + this.err = $ifaceNil; + return; + } + this.err = err_; + }); + connCloseListener = $pkg.connCloseListener = $newType(0, $kindStruct, "http.connCloseListener", true, "net/http", false, function(Conn_, t_, cmKey_, didClose_) { + this.$val = this; + if (arguments.length === 0) { + this.Conn = $ifaceNil; + this.t = ptrType$21.nil; + this.cmKey = new connectMethodKey.ptr("", "", ""); + this.didClose = 0; + return; + } + this.Conn = Conn_; + this.t = t_; + this.cmKey = cmKey_; + this.didClose = didClose_; + }); + persistConnWriter = $pkg.persistConnWriter = $newType(0, $kindStruct, "http.persistConnWriter", true, "net/http", false, function(pc_) { + this.$val = this; + if (arguments.length === 0) { + this.pc = ptrType$107.nil; + return; + } + this.pc = pc_; + }); + connectMethod = $pkg.connectMethod = $newType(0, $kindStruct, "http.connectMethod", true, "net/http", false, function(proxyURL_, targetScheme_, targetAddr_) { + this.$val = this; + if (arguments.length === 0) { + this.proxyURL = ptrType$19.nil; + this.targetScheme = ""; + this.targetAddr = ""; + return; + } + this.proxyURL = proxyURL_; + this.targetScheme = targetScheme_; + this.targetAddr = targetAddr_; + }); + connectMethodKey = $pkg.connectMethodKey = $newType(0, $kindStruct, "http.connectMethodKey", true, "net/http", false, function(proxy_, scheme_, addr_) { + this.$val = this; + if (arguments.length === 0) { + this.proxy = ""; + this.scheme = ""; + this.addr = ""; + return; + } + this.proxy = proxy_; + this.scheme = scheme_; + this.addr = addr_; + }); + persistConn = $pkg.persistConn = $newType(0, $kindStruct, "http.persistConn", true, "net/http", false, function(alt_, t_, cacheKey_, conn_, tlsState_, br_, bw_, nwrite_, reqch_, writech_, closech_, isProxy_, sawEOF_, readLimit_, writeErrCh_, writeLoopDone_, idleAt_, idleTimer_, mu_, numExpectedResponses_, closed_, canceledErr_, broken_, reused_, mutateHeaderFunc_) { + this.$val = this; + if (arguments.length === 0) { + this.alt = $ifaceNil; + this.t = ptrType$21.nil; + this.cacheKey = new connectMethodKey.ptr("", "", ""); + this.conn = $ifaceNil; + this.tlsState = ptrType$17.nil; + this.br = ptrType$73.nil; + this.bw = ptrType$10.nil; + this.nwrite = new $Int64(0, 0); + this.reqch = $chanNil; + this.writech = $chanNil; + this.closech = $chanNil; + this.isProxy = false; + this.sawEOF = false; + this.readLimit = new $Int64(0, 0); + this.writeErrCh = $chanNil; + this.writeLoopDone = $chanNil; + this.idleAt = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + this.idleTimer = ptrType$57.nil; + this.mu = new sync.Mutex.ptr(0, 0); + this.numExpectedResponses = 0; + this.closed = $ifaceNil; + this.canceledErr = $ifaceNil; + this.broken = false; + this.reused = false; + this.mutateHeaderFunc = $throwNilPointerError; + return; + } + this.alt = alt_; + this.t = t_; + this.cacheKey = cacheKey_; + this.conn = conn_; + this.tlsState = tlsState_; + this.br = br_; + this.bw = bw_; + this.nwrite = nwrite_; + this.reqch = reqch_; + this.writech = writech_; + this.closech = closech_; + this.isProxy = isProxy_; + this.sawEOF = sawEOF_; + this.readLimit = readLimit_; + this.writeErrCh = writeErrCh_; + this.writeLoopDone = writeLoopDone_; + this.idleAt = idleAt_; + this.idleTimer = idleTimer_; + this.mu = mu_; + this.numExpectedResponses = numExpectedResponses_; + this.closed = closed_; + this.canceledErr = canceledErr_; + this.broken = broken_; + this.reused = reused_; + this.mutateHeaderFunc = mutateHeaderFunc_; + }); + nothingWrittenError = $pkg.nothingWrittenError = $newType(0, $kindStruct, "http.nothingWrittenError", true, "net/http", false, function(error_) { + this.$val = this; + if (arguments.length === 0) { + this.error = $ifaceNil; + return; + } + this.error = error_; + }); + responseAndError = $pkg.responseAndError = $newType(0, $kindStruct, "http.responseAndError", true, "net/http", false, function(res_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.res = ptrType$16.nil; + this.err = $ifaceNil; + return; + } + this.res = res_; + this.err = err_; + }); + requestAndChan = $pkg.requestAndChan = $newType(0, $kindStruct, "http.requestAndChan", true, "net/http", false, function(req_, ch_, addedGzip_, continueCh_, callerGone_) { + this.$val = this; + if (arguments.length === 0) { + this.req = ptrType$7.nil; + this.ch = $chanNil; + this.addedGzip = false; + this.continueCh = $chanNil; + this.callerGone = $chanNil; + return; + } + this.req = req_; + this.ch = ch_; + this.addedGzip = addedGzip_; + this.continueCh = continueCh_; + this.callerGone = callerGone_; + }); + writeRequest = $pkg.writeRequest = $newType(0, $kindStruct, "http.writeRequest", true, "net/http", false, function(req_, ch_, continueCh_) { + this.$val = this; + if (arguments.length === 0) { + this.req = ptrType$144.nil; + this.ch = $chanNil; + this.continueCh = $chanNil; + return; + } + this.req = req_; + this.ch = ch_; + this.continueCh = continueCh_; + }); + httpError = $pkg.httpError = $newType(0, $kindStruct, "http.httpError", true, "net/http", false, function(err_, timeout_) { + this.$val = this; + if (arguments.length === 0) { + this.err = ""; + this.timeout = false; + return; + } + this.err = err_; + this.timeout = timeout_; + }); + tLogKey = $pkg.tLogKey = $newType(0, $kindStruct, "http.tLogKey", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + bodyEOFSignal = $pkg.bodyEOFSignal = $newType(0, $kindStruct, "http.bodyEOFSignal", true, "net/http", false, function(body_, mu_, closed_, rerr_, fn_, earlyCloseFn_) { + this.$val = this; + if (arguments.length === 0) { + this.body = $ifaceNil; + this.mu = new sync.Mutex.ptr(0, 0); + this.closed = false; + this.rerr = $ifaceNil; + this.fn = $throwNilPointerError; + this.earlyCloseFn = $throwNilPointerError; + return; + } + this.body = body_; + this.mu = mu_; + this.closed = closed_; + this.rerr = rerr_; + this.fn = fn_; + this.earlyCloseFn = earlyCloseFn_; + }); + gzipReader = $pkg.gzipReader = $newType(0, $kindStruct, "http.gzipReader", true, "net/http", false, function(body_, zr_, zerr_) { + this.$val = this; + if (arguments.length === 0) { + this.body = ptrType$109.nil; + this.zr = ptrType$76.nil; + this.zerr = $ifaceNil; + return; + } + this.body = body_; + this.zr = zr_; + this.zerr = zerr_; + }); + tlsHandshakeTimeoutError = $pkg.tlsHandshakeTimeoutError = $newType(0, $kindStruct, "http.tlsHandshakeTimeoutError", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + fakeLocker = $pkg.fakeLocker = $newType(0, $kindStruct, "http.fakeLocker", true, "net/http", false, function() { + this.$val = this; + if (arguments.length === 0) { + return; + } + }); + connLRU = $pkg.connLRU = $newType(0, $kindStruct, "http.connLRU", true, "net/http", false, function(ll_, m_) { + this.$val = this; + if (arguments.length === 0) { + this.ll = ptrType$13.nil; + this.m = false; + return; + } + this.ll = ll_; + this.m = m_; + }); + canceler = $newType(8, $kindInterface, "http.canceler", true, "net/http", false, null); + I = $newType(8, $kindInterface, "http.I", true, "net/http", true, null); + requestTooLarger = $newType(8, $kindInterface, "http.requestTooLarger", true, "net/http", false, null); + dialRes = $newType(0, $kindStruct, "http.dialRes", true, "net/http", false, function(pc_, err_) { + this.$val = this; + if (arguments.length === 0) { + this.pc = ptrType$107.nil; + this.err = $ifaceNil; + return; + } + this.pc = pc_; + this.err = err_; + }); + ptrType = $ptrType(sync.Mutex); + sliceType = $sliceType($emptyInterface); + ptrType$1 = $ptrType(time.Location); + ptrType$2 = $ptrType(net.Resolver); + sliceType$1 = $sliceType($String); + ptrType$3 = $ptrType(http2clientConnPool); + sliceType$2 = $sliceType($Int); + sliceType$3 = $sliceType($Uint8); + ptrType$4 = $ptrType(sliceType$3); + ptrType$5 = $ptrType(http2responseWriter); + ptrType$6 = $ptrType(http2stream); + ptrType$7 = $ptrType(Request); + ptrType$8 = $ptrType(http2requestBody); + ptrType$9 = $ptrType(http2serverConn); + ptrType$10 = $ptrType(bufio.Writer); + ptrType$11 = $ptrType(http2serverMessage); + chanType = $chanType($error, false, false); + sliceType$4 = $sliceType(keyValues); + sliceType$5 = $sliceType(sliceType$3); + sliceType$6 = $sliceType(sniffSig); + structType = $structType("", []); + ptrType$13 = $ptrType(list.List); + ptrType$14 = $ptrType(tls.Config); + ptrType$15 = $ptrType(js.Object); + funcType = $funcType([ptrType$15], [], false); + ptrType$16 = $ptrType(Response); + mapType = $mapType($String, $emptyInterface); + funcType$1 = $funcType([ptrType$15, ptrType$15], [], false); + ptrType$17 = $ptrType(tls.ConnectionState); + funcType$2 = $funcType([], [], false); + ptrType$18 = $ptrType(url.Userinfo); + ptrType$19 = $ptrType(url.URL); + ptrType$20 = $ptrType(multipart.Form); + ptrType$21 = $ptrType(Transport); + ptrType$22 = $ptrType(http2Transport); + ptrType$23 = $ptrType(atomicBool); + sliceType$7 = $sliceType(ptrType$7); + ptrType$24 = $ptrType(url.Error); + ptrType$25 = $ptrType(Cookie); + sliceType$8 = $sliceType(ptrType$25); + ptrType$26 = $ptrType(strings.Builder); + arrayType = $arrayType($Uint8, 29); + ptrType$29 = $ptrType(http2ClientConn); + sliceType$10 = $sliceType(ptrType$29); + ptrType$30 = $ptrType(http2dialCall); + ptrType$31 = $ptrType(http2addConnCall); + sliceType$11 = $sliceType(tls.Certificate); + ptrType$32 = $ptrType($packages["crypto/x509"].CertPool); + sliceType$12 = $sliceType($Uint16); + arrayType$2 = $arrayType($Uint8, 32); + sliceType$13 = $sliceType(tls.CurveID); + sliceType$14 = $sliceType(tls.ticketKey); + ptrType$33 = $ptrType(http2flow); + arrayType$3 = $arrayType($Uint8, 64); + ptrType$34 = $ptrType(http2Framer); + ptrType$35 = $ptrType(http2frameCache); + arrayType$4 = $arrayType($Uint8, 9); + ptrType$36 = $ptrType(hpack.Decoder); + ptrType$37 = $ptrType(bytes.Buffer); + ptrType$38 = $ptrType(http2HeadersFrame); + arrayType$5 = $arrayType($Uint8, 8); + sliceType$15 = $sliceType(hpack.HeaderField); + ptrType$39 = $ptrType(http2MetaHeadersFrame); + ptrType$40 = $ptrType(http2ContinuationFrame); + ptrType$41 = $ptrType(http2SettingsFrame); + ptrType$42 = $ptrType(http2DataFrame); + ptrType$43 = $ptrType(http2WindowUpdateFrame); + ptrType$44 = $ptrType(http2PingFrame); + ptrType$45 = $ptrType(http2GoAwayFrame); + ptrType$46 = $ptrType(http2RSTStreamFrame); + ptrType$47 = $ptrType(http2clientTrace); + ptrType$48 = $ptrType(Server); + ptrType$49 = $ptrType(httptrace.ClientTrace); + ptrType$50 = $ptrType(PushOptions); + ptrType$51 = $ptrType($error); + ptrType$52 = $ptrType(http2serverInternalState); + ptrType$53 = $ptrType(http2Server); + ptrType$54 = $ptrType(http2ServeConnOpts); + ptrType$55 = $ptrType(log.Logger); + sliceType$16 = $sliceType(funcType$2); + ptrType$56 = $ptrType(http2bufferedWriter); + ptrType$57 = $ptrType(time.Timer); + ptrType$58 = $ptrType(hpack.Encoder); + ptrType$59 = $ptrType($packages["crypto/x509"].Certificate); + sliceType$17 = $sliceType(ptrType$59); + sliceType$18 = $sliceType(sliceType$17); + ptrType$60 = $ptrType(net.OpError); + ptrType$61 = $ptrType(os.SyscallError); + funcType$3 = $funcType([$Int], [], false); + ptrType$62 = $ptrType(http2startPushRequest); + ptrType$63 = $ptrType(http2writeData); + ptrType$64 = $ptrType(http2writeResHeaders); + ptrType$65 = $ptrType(http2writePushPromise); + ptrType$66 = $ptrType(http2PriorityFrame); + ptrType$67 = $ptrType(http2PushPromiseFrame); + ptrType$68 = $ptrType(http2pipe); + ptrType$69 = $ptrType(http2closeWaiter); + ptrType$70 = $ptrType(http2responseWriterState); + ptrType$71 = $ptrType(http2sorter); + interfaceType = $interfaceType([{prop: "IsHTTP2NoCachedConnError", name: "IsHTTP2NoCachedConnError", pkg: "", typ: $funcType([], [], false)}]); + ptrType$72 = $ptrType(sync.Cond); + ptrType$73 = $ptrType(bufio.Reader); + sliceType$19 = $sliceType(http2Setting); + ptrType$74 = $ptrType(Header); + ptrType$75 = $ptrType(http2clientStream); + ptrType$76 = $ptrType(gzip.Reader); + ptrType$77 = $ptrType(sync.Once); + sliceType$20 = $sliceType(http2FrameWriteRequest); + ptrType$78 = $ptrType(http2writeQueue); + ptrType$79 = $ptrType(http2PriorityWriteSchedulerConfig); + ptrType$80 = $ptrType(http2priorityNode); + sliceType$21 = $sliceType(ptrType$80); + ptrType$81 = $ptrType(http2writeQueuePool); + ptrType$82 = $ptrType(sliceType$21); + ptrType$83 = $ptrType(headerSorter); + ptrType$84 = $ptrType(multipart.Reader); + ptrType$85 = $ptrType(bytes.Reader); + ptrType$86 = $ptrType(strings.Reader); + ptrType$87 = $ptrType(textproto.Reader); + ptrType$88 = $ptrType(maxBytesReader); + ptrType$89 = $ptrType(multipart.FileHeader); + sliceType$22 = $sliceType(ptrType$89); + arrayType$6 = $arrayType($Uint8, 1); + sliceType$23 = $sliceType(io.Reader); + structType$1 = $structType("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}, {prop: "Closer", name: "Closer", embedded: true, exported: true, typ: io.Closer, tag: ""}]); + ptrType$90 = $ptrType(bufio.ReadWriter); + ptrType$91 = $ptrType($Int32); + ptrType$92 = $ptrType(os.File); + ptrType$93 = $ptrType(io.LimitedReader); + ptrType$94 = $ptrType(connReader); + structType$2 = $structType("net/http", [{prop: "atomic", name: "atomic", embedded: false, exported: false, typ: $Uint64, tag: ""}]); + ptrType$95 = $ptrType(response); + ptrType$96 = $ptrType(sync.Pool); + ptrType$97 = $ptrType(body); + ptrType$98 = $ptrType(conn); + arrayType$7 = $arrayType($Uint8, 10); + arrayType$8 = $arrayType($Uint8, 3); + ptrType$99 = $ptrType(expectContinueReader); + ptrType$100 = $ptrType($Uint64); + ptrType$101 = $ptrType(tls.Conn); + ptrType$102 = $ptrType(net.Listener); + ptrType$103 = $ptrType(net.TCPListener); + ptrType$104 = $ptrType(socksAddr); + ptrType$105 = $ptrType(socksConn); + sliceType$24 = $sliceType(socksAuthMethod); + ptrType$106 = $ptrType(transferWriter); + mapType$1 = $mapType($String, RoundTripper); + ptrType$107 = $ptrType(persistConn); + sliceType$25 = $sliceType(ptrType$107); + ptrType$108 = $ptrType(list.Element); + ptrType$109 = $ptrType(bodyEOFSignal); + funcType$4 = $funcType([$String, sliceType], [], true); + ptrType$110 = $ptrType(streamReader); + ptrType$111 = $ptrType(fetchTransport); + ptrType$112 = $ptrType(XHRTransport); + mapType$2 = $mapType(ptrType$7, ptrType$15); + funcType$5 = $funcType([], [$Bool], false); + funcType$6 = $funcType([ptrType$7], [], false); + ptrType$113 = $ptrType(Client); + funcType$7 = $funcType([ptrType$7, sliceType$7], [$error], false); + ptrType$114 = $ptrType(cancelTimerBody); + mapType$3 = $mapType($String, sliceType$10); + mapType$4 = $mapType($String, ptrType$30); + mapType$5 = $mapType(ptrType$29, sliceType$1); + mapType$6 = $mapType($String, ptrType$31); + chanType$2 = $chanType(structType, false, false); + ptrType$117 = $ptrType(http2dataBuffer); + ptrType$118 = $ptrType(http2FrameHeader); + funcType$8 = $funcType([$Uint32], [sliceType$3], false); + funcType$9 = $funcType([http2Setting], [$error], false); + ptrType$119 = $ptrType(http2UnknownFrame); + chanType$3 = $chanType(structType, false, true); + funcType$10 = $funcType([$String], [], false); + funcType$11 = $funcType([httptrace.GotConnInfo], [], false); + funcType$12 = $funcType([$error], [], false); + funcType$13 = $funcType([$Int, textproto.MIMEHeader], [$error], false); + funcType$14 = $funcType([httptrace.DNSStartInfo], [], false); + funcType$15 = $funcType([httptrace.DNSDoneInfo], [], false); + funcType$16 = $funcType([$String, $String], [], false); + funcType$17 = $funcType([$String, $String, $error], [], false); + funcType$18 = $funcType([tls.ConnectionState, $error], [], false); + funcType$19 = $funcType([$String, sliceType$1], [], false); + funcType$20 = $funcType([httptrace.WroteRequestInfo], [], false); + ptrType$120 = $ptrType(http2httpError); + funcType$21 = $funcType([], [http2WriteScheduler], false); + mapType$7 = $mapType(ptrType$9, structType); + funcType$22 = $funcType([ResponseWriter, ptrType$7], [], false); + chanType$4 = $chanType(http2readFrameResult, false, false); + chanType$5 = $chanType(http2FrameWriteRequest, false, false); + chanType$6 = $chanType(http2frameWriteResult, false, false); + chanType$7 = $chanType(http2bodyReadMsg, false, false); + chanType$8 = $chanType($emptyInterface, false, false); + mapType$8 = $mapType($Uint32, ptrType$6); + mapType$9 = $mapType($String, $String); + chanType$9 = $chanType($Bool, false, true); + chanType$10 = $chanType($Bool, false, false); + funcType$23 = $funcType([$String, $String, ptrType$14], [net.Conn, $error], false); + mapType$10 = $mapType($Uint32, ptrType$75); + mapType$11 = $mapType(arrayType$5, chanType$2); + chanType$11 = $chanType(http2resAndError, false, false); + ptrType$121 = $ptrType(http2badStringError); + ptrType$122 = $ptrType(http2clientConnReadLoop); + ptrType$123 = $ptrType(http2gzipReader); + ptrType$124 = $ptrType(http2writeGoAway); + funcType$24 = $funcType([], [$Uint32, $error], false); + ptrType$125 = $ptrType(http2FrameWriteRequest); + funcType$25 = $funcType([ptrType$80, $Bool], [$Bool], false); + ptrType$126 = $ptrType(http2priorityWriteScheduler); + mapType$12 = $mapType($Uint32, ptrType$80); + ptrType$127 = $ptrType(http2randomWriteScheduler); + mapType$13 = $mapType($Uint32, ptrType$78); + mapType$14 = $mapType($String, $Bool); + ptrType$128 = $ptrType(contextKey); + ptrType$129 = $ptrType(ProtocolError); + ptrType$130 = $ptrType(badStringError); + funcType$26 = $funcType([], [io.ReadCloser, $error], false); + ptrType$131 = $ptrType(chunkWriter); + ptrType$132 = $ptrType(redirectHandler); + ptrType$133 = $ptrType(ServeMux); + mapType$15 = $mapType($String, muxEntry); + funcType$27 = $funcType([ptrType$48, ptrType$101, Handler], [], false); + mapType$16 = $mapType($String, funcType$27); + funcType$28 = $funcType([net.Conn, ConnState], [], false); + mapType$17 = $mapType(ptrType$102, structType); + mapType$18 = $mapType(ptrType$98, structType); + ptrType$136 = $ptrType(onceCloseListener); + ptrType$137 = $ptrType(loggingConn); + ptrType$138 = $ptrType(exactSig); + ptrType$139 = $ptrType(maskedSig); + ptrType$140 = $ptrType(socksDialer); + funcType$29 = $funcType([context.Context, $String, $String], [net.Conn, $error], false); + funcType$30 = $funcType([context.Context, io.ReadWriter, socksAuthMethod], [$error], false); + ptrType$141 = $ptrType(socksUsernamePassword); + ptrType$142 = $ptrType(byteReader); + chanType$12 = $chanType(readResult, false, false); + ptrType$143 = $ptrType(transferReader); + ptrType$144 = $ptrType(transportRequest); + chanType$13 = $chanType(ptrType$107, false, false); + mapType$19 = $mapType(connectMethodKey, sliceType$25); + mapType$20 = $mapType(connectMethodKey, chanType$13); + mapType$21 = $mapType(ptrType$7, funcType$12); + mapType$22 = $mapType(connectMethodKey, $Int); + mapType$23 = $mapType(connectMethodKey, chanType$2); + funcType$31 = $funcType([ptrType$7], [ptrType$19, $error], false); + funcType$32 = $funcType([$String, $String], [net.Conn, $error], false); + funcType$33 = $funcType([$String, ptrType$101], [RoundTripper], false); + mapType$24 = $mapType($String, funcType$33); + ptrType$145 = $ptrType(connCloseListener); + ptrType$146 = $ptrType(connectMethod); + chanType$14 = $chanType(requestAndChan, false, false); + chanType$15 = $chanType(writeRequest, false, false); + funcType$34 = $funcType([Header], [], false); + chanType$16 = $chanType(responseAndError, false, false); + chanType$17 = $chanType(structType, true, false); + chanType$18 = $chanType($error, true, false); + ptrType$147 = $ptrType(httpError); + funcType$35 = $funcType([$error], [$error], false); + funcType$36 = $funcType([], [$error], false); + ptrType$148 = $ptrType(gzipReader); + ptrType$149 = $ptrType(connLRU); + mapType$25 = $mapType(ptrType$107, ptrType$108); + streamReader.ptr.prototype.Read = function(p) { + var _r$1, _selection, _tmp, _tmp$1, _tmp$2, _tmp$3, b, bCh, err, err$1, errCh, n, p, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; b = $f.b; bCh = $f.bCh; err = $f.err; err$1 = $f.err$1; errCh = $f.errCh; n = $f.n; p = $f.p; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + bCh = [bCh]; + errCh = [errCh]; + n = 0; + err = $ifaceNil; + r = this; + /* */ if (r.pending.$length === 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.pending.$length === 0) { */ case 1: + bCh[0] = new $Chan(sliceType$3, 0); + errCh[0] = new $Chan($error, 0); + r.stream.read().then($externalize((function(bCh, errCh) { return function $b(result) { + var result, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; result = $f.result; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!!(result.done)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!!(result.done)) { */ case 1: + $r = $send(errCh[0], io.EOF); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + $r = $send(bCh[0], $assertType($internalize(result.value, $emptyInterface), sliceType$3)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.result = result; $f.$s = $s; $f.$r = $r; return $f; + }; })(bCh, errCh), funcType), $externalize((function(bCh, errCh) { return function $b(reason) { + var reason, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; reason = $f.reason; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(errCh[0], errors.New($internalize(reason.message, $String))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.reason = reason; $f.$s = $s; $f.$r = $r; return $f; + }; })(bCh, errCh), funcType)); + _r$1 = $select([[bCh[0]], [errCh[0]]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + b = _selection[1][0]; + r.pending = b; + } else if (_selection[0] === 1) { + err$1 = _selection[1][0]; + _tmp = 0; + _tmp$1 = err$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* } */ case 2: + n = $copySlice(p, r.pending); + r.pending = $subslice(r.pending, n); + _tmp$2 = n; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: streamReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._selection = _selection; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f.b = b; $f.bCh = bCh; $f.err = err; $f.err$1 = err$1; $f.errCh = errCh; $f.n = n; $f.p = p; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + streamReader.prototype.Read = function(p) { return this.$val.Read(p); }; + streamReader.ptr.prototype.Close = function() { + var r; + r = this; + r.stream.cancel(); + return $ifaceNil; + }; + streamReader.prototype.Close = function() { return this.$val.Close(); }; + fetchTransport.ptr.prototype.RoundTrip = function(req) { + var _entry, _i, _i$1, _key, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _selection, _tuple, body$1, err, err$1, errCh, headers, key, opt, req, resp, respCh, respPromise, t, value, values, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _key = $f._key; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _ref$1 = $f._ref$1; _selection = $f._selection; _tuple = $f._tuple; body$1 = $f.body$1; err = $f.err; err$1 = $f.err$1; errCh = $f.errCh; headers = $f.headers; key = $f.key; opt = $f.opt; req = $f.req; resp = $f.resp; respCh = $f.respCh; respPromise = $f.respPromise; t = $f.t; value = $f.value; values = $f.values; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + errCh = [errCh]; + req = [req]; + respCh = [respCh]; + t = this; + headers = new ($global.Headers)(); + _ref = req[0].Header; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + key = _entry.k; + values = _entry.v; + _ref$1 = values; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + value = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + headers.append($externalize(key, $String), $externalize(value, $String)); + _i$1++; + } + _i++; + } + opt = $makeMap($String.keyFor, [{ k: "method", v: new $String(req[0].Method) }, { k: "headers", v: new $jsObjectPtr(headers) }, { k: "credentials", v: new $String("same-origin") }]); + /* */ if (!($interfaceIsEqual(req[0].Body, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(req[0].Body, $ifaceNil))) { */ case 1: + _r$1 = ioutil.ReadAll(req[0].Body); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + body$1 = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + _r$2 = req[0].Body.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return [ptrType$16.nil, err]; + /* } */ case 5: + _r$3 = req[0].Body.Close(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _key = "body"; (opt || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: body$1 }; + /* } */ case 2: + respPromise = $global.fetch($externalize(req[0].URL.String(), $String), $externalize(opt, mapType)); + respCh[0] = new $Chan(ptrType$16, 0); + errCh[0] = new $Chan($error, 0); + respPromise.then($externalize((function(errCh, req, respCh) { return function $b(result) { + var _r$4, _r$5, _selection, _tuple$1, cl, contentLength, err$1, header, result, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _selection = $f._selection; _tuple$1 = $f._tuple$1; cl = $f.cl; contentLength = $f.contentLength; err$1 = $f.err$1; header = $f.header; result = $f.result; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + header = [header]; + header[0] = $makeMap($String.keyFor, []); + result.headers.forEach($externalize((function(errCh, header, req, respCh) { return function(value$1, key$1) { + var _entry$1, _key$1, ck, key$1, value$1; + ck = CanonicalHeaderKey($internalize(key$1, $String)); + _key$1 = ck; (header[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = header[0][$String.keyFor(ck)], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil), $internalize(value$1, $String)) }; + }; })(errCh, header, req, respCh), funcType$1)); + contentLength = new $Int64(-1, 4294967295); + _tuple$1 = strconv.ParseInt(new Header(header[0]).Get("Content-Length"), 10, 64); + cl = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + contentLength = cl; + } + _r$4 = req[0].Context().Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = $select([[respCh[0], new Response.ptr($internalize(result.status, $String) + " " + StatusText($parseInt(result.status) >> 0), $parseInt(result.status) >> 0, "", 0, 0, header[0], new streamReader.ptr(sliceType$3.nil, result.body.getReader()), contentLength, sliceType$1.nil, false, false, false, req[0], ptrType$17.nil)], [_r$4]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _selection = _r$5; + /* */ if (_selection[0] === 0) { $s = 3; continue; } + /* */ if (_selection[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 3: + $s = 5; continue; + /* } else if (_selection[0] === 1) { */ case 4: + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._selection = _selection; $f._tuple$1 = _tuple$1; $f.cl = cl; $f.contentLength = contentLength; $f.err$1 = err$1; $f.header = header; $f.result = result; $f.$s = $s; $f.$r = $r; return $f; + }; })(errCh, req, respCh), funcType), $externalize((function(errCh, req, respCh) { return function $b(reason) { + var _r$4, _r$5, _r$6, _selection, reason, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _selection = $f._selection; reason = $f.reason; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$4 = fmt.Errorf("net/http: fetch() failed: %s", new sliceType([new $String($internalize(reason, $String))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = req[0].Context().Done(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = $select([[errCh[0], _r$4], [_r$5]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _selection = _r$6; + /* */ if (_selection[0] === 0) { $s = 4; continue; } + /* */ if (_selection[0] === 1) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_selection[0] === 0) { */ case 4: + $s = 6; continue; + /* } else if (_selection[0] === 1) { */ case 5: + /* } */ case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._selection = _selection; $f.reason = reason; $f.$s = $s; $f.$r = $r; return $f; + }; })(errCh, req, respCh), funcType)); + _r$4 = req[0].Context().Done(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = $select([[_r$4], [respCh[0]], [errCh[0]]]); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _selection = _r$5; + /* */ if (_selection[0] === 0) { $s = 10; continue; } + /* */ if (_selection[0] === 1) { $s = 11; continue; } + /* */ if (_selection[0] === 2) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_selection[0] === 0) { */ case 10: + $s = -1; return [ptrType$16.nil, errors.New("net/http: request canceled")]; + /* } else if (_selection[0] === 1) { */ case 11: + resp = _selection[1][0]; + $s = -1; return [resp, $ifaceNil]; + /* } else if (_selection[0] === 2) { */ case 12: + err$1 = _selection[1][0]; + $s = -1; return [ptrType$16.nil, err$1]; + /* } */ case 13: + $s = -1; return [ptrType$16.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: fetchTransport.ptr.prototype.RoundTrip }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._key = _key; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._ref$1 = _ref$1; $f._selection = _selection; $f._tuple = _tuple; $f.body$1 = body$1; $f.err = err; $f.err$1 = err$1; $f.errCh = errCh; $f.headers = headers; $f.key = key; $f.opt = opt; $f.req = req; $f.resp = resp; $f.respCh = respCh; $f.respPromise = respPromise; $f.t = t; $f.value = value; $f.values = values; $f.$s = $s; $f.$r = $r; return $f; + }; + fetchTransport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + noTransport.ptr.prototype.RoundTrip = function(req) { + var req; + return [ptrType$16.nil, errors.New("net/http: neither of Fetch nor XMLHttpRequest APIs is available")]; + }; + noTransport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + XHRTransport.ptr.prototype.RoundTrip = function(req) { + var _arg, _arg$1, _entry, _i, _i$1, _key, _keys, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _selection, _tuple, body$1, err, err$1, errCh, key, req, resp, respCh, t, value, values, xhr, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _key = $f._key; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; _selection = $f._selection; _tuple = $f._tuple; body$1 = $f.body$1; err = $f.err; err$1 = $f.err$1; errCh = $f.errCh; key = $f.key; req = $f.req; resp = $f.resp; respCh = $f.respCh; t = $f.t; value = $f.value; values = $f.values; xhr = $f.xhr; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + errCh = [errCh]; + req = [req]; + respCh = [respCh]; + xhr = [xhr]; + t = this; + xhr[0] = new ($global.XMLHttpRequest)(); + if (t.inflight === false) { + t.inflight = $makeMap(ptrType$7.keyFor, []); + } + _key = req[0]; (t.inflight || $throwRuntimeError("assignment to entry in nil map"))[ptrType$7.keyFor(_key)] = { k: _key, v: xhr[0] }; + $deferred.push([function(_arg, _arg$1) { delete _arg[ptrType$7.keyFor(_arg$1)]; }, [t.inflight, req[0]]]); + respCh[0] = new $Chan(ptrType$16, 0); + errCh[0] = new $Chan($error, 0); + xhr[0].onload = $externalize((function(errCh, req, respCh, xhr) { return function $b() { + var _1, _r$1, _tuple, _tuple$1, body$1, contentLength, err, header, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; body$1 = $f.body$1; contentLength = $f.contentLength; err = $f.err; header = $f.header; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = textproto.NewReader(bufio.NewReader(bytes.NewReader((new sliceType$3($stringToBytes($internalize(xhr[0].getAllResponseHeaders(), $String) + "\n")))))).ReadMIMEHeader(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + header = _tuple[0]; + body$1 = $assertType($internalize(new ($global.Uint8Array)(xhr[0].response), $emptyInterface), sliceType$3); + contentLength = new $Int64(-1, 4294967295); + _1 = req[0].Method; + if (_1 === ("HEAD")) { + _tuple$1 = strconv.ParseInt(new textproto.MIMEHeader(header).Get("Content-Length"), 10, 64); + l = _tuple$1[0]; + err = _tuple$1[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + contentLength = l; + } + } else { + contentLength = (new $Int64(0, body$1.$length)); + } + $r = $send(respCh[0], new Response.ptr($internalize(xhr[0].status, $String) + " " + $internalize(xhr[0].statusText, $String), $parseInt(xhr[0].status) >> 0, "", 0, 0, (header), ioutil.NopCloser(bytes.NewReader(body$1)), contentLength, sliceType$1.nil, false, false, false, req[0], ptrType$17.nil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.body$1 = body$1; $f.contentLength = contentLength; $f.err = err; $f.header = header; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; })(errCh, req, respCh, xhr), funcType$2); + xhr[0].onerror = $externalize((function(errCh, req, respCh, xhr) { return function $b(e) { + var e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(errCh[0], errors.New("net/http: XMLHttpRequest failed")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; })(errCh, req, respCh, xhr), funcType); + xhr[0].onabort = $externalize((function(errCh, req, respCh, xhr) { return function $b(e) { + var e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(errCh[0], errors.New("net/http: request canceled")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; })(errCh, req, respCh, xhr), funcType); + xhr[0].open($externalize(req[0].Method, $String), $externalize(req[0].URL.String(), $String)); + xhr[0].responseType = $externalize("arraybuffer", $String); + _ref = req[0].Header; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + key = _entry.k; + values = _entry.v; + _ref$1 = values; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + value = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + xhr[0].setRequestHeader($externalize(key, $String), $externalize(value, $String)); + _i$1++; + } + _i++; + } + /* */ if ($interfaceIsEqual(req[0].Body, $ifaceNil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(req[0].Body, $ifaceNil)) { */ case 1: + xhr[0].send(); + $s = 3; continue; + /* } else { */ case 2: + _r$1 = ioutil.ReadAll(req[0].Body); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + body$1 = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: + _r$2 = req[0].Body.Close(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return [ptrType$16.nil, err]; + /* } */ case 6: + _r$3 = req[0].Body.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + xhr[0].send($externalize(body$1, sliceType$3)); + /* } */ case 3: + _r$4 = $select([[respCh[0]], [errCh[0]]]); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _selection = _r$4; + if (_selection[0] === 0) { + resp = _selection[1][0]; + $s = -1; return [resp, $ifaceNil]; + } else if (_selection[0] === 1) { + err$1 = _selection[1][0]; + $s = -1; return [ptrType$16.nil, err$1]; + } + $s = -1; return [ptrType$16.nil, $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType$16.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: XHRTransport.ptr.prototype.RoundTrip }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._key = _key; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f._selection = _selection; $f._tuple = _tuple; $f.body$1 = body$1; $f.err = err; $f.err$1 = err$1; $f.errCh = errCh; $f.key = key; $f.req = req; $f.resp = resp; $f.respCh = respCh; $f.t = t; $f.value = value; $f.values = values; $f.xhr = xhr; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + XHRTransport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + XHRTransport.ptr.prototype.CancelRequest = function(req) { + var _entry, _tuple, ok, req, t, xhr; + t = this; + _tuple = (_entry = t.inflight[ptrType$7.keyFor(req)], _entry !== undefined ? [_entry.v, true] : [null, false]); + xhr = _tuple[0]; + ok = _tuple[1]; + if (ok) { + xhr.abort(); + } + }; + XHRTransport.prototype.CancelRequest = function(req) { return this.$val.CancelRequest(req); }; + refererForURL = function(lastReq, newReq) { + var auth, lastReq, newReq, referer; + if (lastReq.Scheme === "https" && newReq.Scheme === "http") { + return ""; + } + referer = lastReq.String(); + if (!(lastReq.User === ptrType$18.nil)) { + auth = lastReq.User.String() + "@"; + referer = strings.Replace(referer, auth, "", 1); + } + return referer; + }; + Client.ptr.prototype.send = function(req, deadline) { + var _i, _r$1, _r$2, _r$3, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, cookie, deadline, didTimeout, err, rc, req, resp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; c = $f.c; cookie = $f.cookie; deadline = $f.deadline; didTimeout = $f.didTimeout; err = $f.err; rc = $f.rc; req = $f.req; resp = $f.resp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + didTimeout = $throwNilPointerError; + err = $ifaceNil; + c = this; + /* */ if (!($interfaceIsEqual(c.Jar, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(c.Jar, $ifaceNil))) { */ case 1: + _r$1 = c.Jar.Cookies(req.URL); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _ref = _r$1; + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + cookie = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = req.AddCookie(cookie); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 4; continue; case 5: + /* } */ case 2: + _r$2 = send(req, c.transport(), $clone(deadline, time.Time)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + resp = _tuple[0]; + didTimeout = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = didTimeout; + _tmp$2 = err; + resp = _tmp; + didTimeout = _tmp$1; + err = _tmp$2; + $s = -1; return [resp, didTimeout, err]; + } + /* */ if (!($interfaceIsEqual(c.Jar, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(c.Jar, $ifaceNil))) { */ case 8: + _r$3 = resp.Cookies(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + rc = _r$3; + /* */ if (rc.$length > 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (rc.$length > 0) { */ case 11: + $r = c.Jar.SetCookies(req.URL, rc); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + /* } */ case 9: + _tmp$3 = resp; + _tmp$4 = $throwNilPointerError; + _tmp$5 = $ifaceNil; + resp = _tmp$3; + didTimeout = _tmp$4; + err = _tmp$5; + $s = -1; return [resp, didTimeout, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.send }; } $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.c = c; $f.cookie = cookie; $f.deadline = deadline; $f.didTimeout = didTimeout; $f.err = err; $f.rc = rc; $f.req = req; $f.resp = resp; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.send = function(req, deadline) { return this.$val.send(req, deadline); }; + Client.ptr.prototype.deadline = function() { + var c, x$4; + c = this; + if ((x$4 = c.Timeout, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 0)))) { + return $clone(time.Now(), time.Time).Add(c.Timeout); + } + return new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + }; + Client.prototype.deadline = function() { return this.$val.deadline(); }; + Client.ptr.prototype.transport = function() { + var c; + c = this; + if (!($interfaceIsEqual(c.Transport, $ifaceNil))) { + return c.Transport; + } + return $pkg.DefaultTransport; + }; + Client.prototype.transport = function() { return this.$val.transport(); }; + send = function(ireq, rt, deadline) { + var _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, deadline, didTimeout, err, forkReq, ireq, ok, password, req, resp, rt, stopTimer, tlsErr, u, username, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; deadline = $f.deadline; didTimeout = $f.didTimeout; err = $f.err; forkReq = $f.forkReq; ireq = $f.ireq; ok = $f.ok; password = $f.password; req = $f.req; resp = $f.resp; rt = $f.rt; stopTimer = $f.stopTimer; tlsErr = $f.tlsErr; u = $f.u; username = $f.username; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ireq = [ireq]; + req = [req]; + resp = ptrType$16.nil; + didTimeout = $throwNilPointerError; + err = $ifaceNil; + req[0] = ireq[0]; + /* */ if ($interfaceIsEqual(rt, $ifaceNil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(rt, $ifaceNil)) { */ case 1: + $r = req[0].closeBody(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = ptrType$16.nil; + _tmp$1 = alwaysFalse; + _tmp$2 = errors.New("http: no Client.Transport or DefaultTransport"); + resp = _tmp; + didTimeout = _tmp$1; + err = _tmp$2; + $s = -1; return [resp, didTimeout, err]; + /* } */ case 2: + /* */ if (req[0].URL === ptrType$19.nil) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (req[0].URL === ptrType$19.nil) { */ case 4: + $r = req[0].closeBody(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$3 = ptrType$16.nil; + _tmp$4 = alwaysFalse; + _tmp$5 = errors.New("http: nil Request.URL"); + resp = _tmp$3; + didTimeout = _tmp$4; + err = _tmp$5; + $s = -1; return [resp, didTimeout, err]; + /* } */ case 5: + /* */ if (!(req[0].RequestURI === "")) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(req[0].RequestURI === "")) { */ case 7: + $r = req[0].closeBody(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = ptrType$16.nil; + _tmp$7 = alwaysFalse; + _tmp$8 = errors.New("http: Request.RequestURI can't be set in client requests."); + resp = _tmp$6; + didTimeout = _tmp$7; + err = _tmp$8; + $s = -1; return [resp, didTimeout, err]; + /* } */ case 8: + forkReq = (function(ireq, req) { return function() { + if (ireq[0] === req[0]) { + req[0] = new Request.ptr("", ptrType$19.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, "", false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, $chanNil, ptrType$16.nil, $ifaceNil); + Request.copy(req[0], ireq[0]); + } + }; })(ireq, req); + /* */ if (req[0].Header === false) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (req[0].Header === false) { */ case 10: + $r = forkReq(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + req[0].Header = {}; + /* } */ case 11: + u = req[0].URL.User; + /* */ if (!(u === ptrType$18.nil) && new Header(req[0].Header).Get("Authorization") === "") { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!(u === ptrType$18.nil) && new Header(req[0].Header).Get("Authorization") === "") { */ case 13: + username = u.Username(); + _tuple = u.Password(); + password = _tuple[0]; + $r = forkReq(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + req[0].Header = cloneHeader(ireq[0].Header); + new Header(req[0].Header).Set("Authorization", "Basic " + basicAuth(username, password)); + /* } */ case 14: + /* */ if (!$clone(deadline, time.Time).IsZero()) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!$clone(deadline, time.Time).IsZero()) { */ case 16: + $r = forkReq(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + _tuple$1 = setRequestCancel(req[0], rt, $clone(deadline, time.Time)); + stopTimer = _tuple$1[0]; + didTimeout = _tuple$1[1]; + _r$1 = rt.RoundTrip(req[0]); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + resp = _tuple$2[0]; + err = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 20: + $r = stopTimer(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(resp === ptrType$16.nil)) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!(resp === ptrType$16.nil)) { */ case 23: + $r = log.Printf("RoundTripper returned a response & error; ignoring response", new sliceType([])); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 24: + _tuple$3 = $assertType(err, tls.RecordHeaderError, true); + tlsErr = $clone(_tuple$3[0], tls.RecordHeaderError); + ok = _tuple$3[1]; + if (ok) { + if (($bytesToString(new sliceType$3(tlsErr.RecordHeader))) === "HTTP/") { + err = errors.New("http: server gave HTTP response to HTTPS client"); + } + } + _tmp$9 = ptrType$16.nil; + _tmp$10 = didTimeout; + _tmp$11 = err; + resp = _tmp$9; + didTimeout = _tmp$10; + err = _tmp$11; + $s = -1; return [resp, didTimeout, err]; + /* } */ case 21: + if (!$clone(deadline, time.Time).IsZero()) { + resp.Body = new cancelTimerBody.ptr(stopTimer, resp.Body, didTimeout); + } + _tmp$12 = resp; + _tmp$13 = $throwNilPointerError; + _tmp$14 = $ifaceNil; + resp = _tmp$12; + didTimeout = _tmp$13; + err = _tmp$14; + $s = -1; return [resp, didTimeout, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: send }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.deadline = deadline; $f.didTimeout = didTimeout; $f.err = err; $f.forkReq = forkReq; $f.ireq = ireq; $f.ok = ok; $f.password = password; $f.req = req; $f.resp = resp; $f.rt = rt; $f.stopTimer = stopTimer; $f.tlsErr = tlsErr; $f.u = u; $f.username = username; $f.$s = $s; $f.$r = $r; return $f; + }; + setRequestCancel = function(req, rt, deadline) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, cancel, deadline, didTimeout, doCancel, initialReqCancel, once, req, rt, stopTimer, stopTimerCh, timedOut, timer; + stopTimer = $throwNilPointerError; + didTimeout = $throwNilPointerError; + if ($clone(deadline, time.Time).IsZero()) { + _tmp = nop; + _tmp$1 = alwaysFalse; + stopTimer = _tmp; + didTimeout = _tmp$1; + return [stopTimer, didTimeout]; + } + initialReqCancel = req.Cancel; + cancel = new $Chan(structType, 0); + req.Cancel = cancel; + doCancel = (function $b() { + var _ref, v, v$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ref = $f._ref; v = $f.v; v$1 = $f.v$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $close(cancel); + _ref = rt; + /* */ if ($assertType(_ref, ptrType$21, true)[1] || $assertType(_ref, ptrType$22, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, canceler, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$21, true)[1] || $assertType(_ref, ptrType$22, true)[1]) { */ case 1: + v = _ref; + $s = 3; continue; + /* } else if ($assertType(_ref, canceler, true)[1]) { */ case 2: + v$1 = _ref; + $r = v$1.CancelRequest(req); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._ref = _ref; $f.v = v; $f.v$1 = v$1; $f.$s = $s; $f.$r = $r; return $f; + }); + stopTimerCh = new $Chan(structType, 0); + once = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + stopTimer = (function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = once.Do((function() { + $close(stopTimerCh); + })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }); + timer = time.NewTimer(time.Until($clone(deadline, time.Time))); + timedOut = 0; + $go((function $b() { + var _r$1, _selection, timedOut$24ptr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; timedOut$24ptr = $f.timedOut$24ptr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = $select([[initialReqCancel], [timer.C], [stopTimerCh]]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + /* */ if (_selection[0] === 0) { $s = 2; continue; } + /* */ if (_selection[0] === 1) { $s = 3; continue; } + /* */ if (_selection[0] === 2) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 2: + $r = doCancel(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + timer.Stop(); + $s = 5; continue; + /* } else if (_selection[0] === 1) { */ case 3: + (timedOut$24ptr || (timedOut$24ptr = new ptrType$23(function() { return timedOut; }, function($v) { timedOut = $v; }))).setTrue(); + $r = doCancel(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else if (_selection[0] === 2) { */ case 4: + timer.Stop(); + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._selection = _selection; $f.timedOut$24ptr = timedOut$24ptr; $f.$s = $s; $f.$r = $r; return $f; + }), []); + _tmp$2 = stopTimer; + _tmp$3 = $methodVal((timedOut$24ptr || (timedOut$24ptr = new ptrType$23(function() { return timedOut; }, function($v) { timedOut = $v; }))), "isSet"); + stopTimer = _tmp$2; + didTimeout = _tmp$3; + return [stopTimer, didTimeout]; + }; + basicAuth = function(username, password) { + var auth, password, username; + auth = username + ":" + password; + return base64.StdEncoding.EncodeToString((new sliceType$3($stringToBytes(auth)))); + }; + Client.ptr.prototype.Get = function(url$1) { + var _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, c, err, req, resp, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; req = $f.req; resp = $f.resp; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + c = this; + _r$1 = NewRequest("GET", url$1, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + req = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = err; + resp = _tmp; + err = _tmp$1; + $s = -1; return [resp, err]; + } + _r$2 = c.Do(req); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + resp = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.Get }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.req = req; $f.resp = resp; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.Get = function(url$1) { return this.$val.Get(url$1); }; + alwaysFalse = function() { + return false; + }; + Client.ptr.prototype.checkRedirect = function(req, via) { + var _r$1, c, fn, req, via, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; fn = $f.fn; req = $f.req; via = $f.via; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + fn = c.CheckRedirect; + if (fn === $throwNilPointerError) { + fn = defaultCheckRedirect; + } + _r$1 = fn(req, via); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.checkRedirect }; } $f._r$1 = _r$1; $f.c = c; $f.fn = fn; $f.req = req; $f.via = via; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.checkRedirect = function(req, via) { return this.$val.checkRedirect(req, via); }; + redirectBehavior = function(reqMethod, resp, ireq) { + var _1, _tmp, _tmp$1, _tmp$2, includeBody, ireq, redirectMethod, reqMethod, resp, shouldRedirect, x$4; + redirectMethod = ""; + shouldRedirect = false; + includeBody = false; + switch (0) { default: + _1 = resp.StatusCode; + if ((_1 === (301)) || (_1 === (302)) || (_1 === (303))) { + redirectMethod = reqMethod; + shouldRedirect = true; + includeBody = false; + if (!(reqMethod === "GET") && !(reqMethod === "HEAD")) { + redirectMethod = "GET"; + } + } else if ((_1 === (307)) || (_1 === (308))) { + redirectMethod = reqMethod; + shouldRedirect = true; + includeBody = true; + if (new Header(resp.Header).Get("Location") === "") { + shouldRedirect = false; + break; + } + if (ireq.GetBody === $throwNilPointerError && !((x$4 = ireq.outgoingLength(), (x$4.$high === 0 && x$4.$low === 0)))) { + shouldRedirect = false; + } + } + } + _tmp = redirectMethod; + _tmp$1 = shouldRedirect; + _tmp$2 = includeBody; + redirectMethod = _tmp; + shouldRedirect = _tmp$1; + includeBody = _tmp$2; + return [redirectMethod, shouldRedirect, includeBody]; + }; + urlErrorOp = function(method) { + var _r$1, method, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; method = $f.method; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (method === "") { + $s = -1; return "Get"; + } + _r$1 = strings.ToLower($substring(method, 1)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return $substring(method, 0, 1) + _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: urlErrorOp }; } $f._r$1 = _r$1; $f.method = method; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.ptr.prototype.Do = function(req) { + var _r$1, c, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$1 = c.do$(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.Do }; } $f._r$1 = _r$1; $f.c = c; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.Do = function(req) { return this.$val.Do(req); }; + Client.ptr.prototype.do$ = function(req) { + var _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, c, copyHeaders, deadline, didTimeout, err, err$1, host, includeBody, ireq, loc, redirectMethod, ref, req, reqBodyClosed, reqs, resp, reterr, retres, shouldRedirect, u, u$1, ue, uerr, x$4, x$5, x$6, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _v = $f._v; c = $f.c; copyHeaders = $f.copyHeaders; deadline = $f.deadline; didTimeout = $f.didTimeout; err = $f.err; err$1 = $f.err$1; host = $f.host; includeBody = $f.includeBody; ireq = $f.ireq; loc = $f.loc; redirectMethod = $f.redirectMethod; ref = $f.ref; req = $f.req; reqBodyClosed = $f.reqBodyClosed; reqs = $f.reqs; resp = $f.resp; reterr = $f.reterr; retres = $f.retres; shouldRedirect = $f.shouldRedirect; u = $f.u; u$1 = $f.u$1; ue = $f.ue; uerr = $f.uerr; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + req = [req]; + reqBodyClosed = [reqBodyClosed]; + reqs = [reqs]; + resp = [resp]; + reterr = [reterr]; + retres = [retres]; + retres[0] = ptrType$16.nil; + reterr[0] = $ifaceNil; + c = this; + /* */ if (!(testHookClientDoResult === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(testHookClientDoResult === $throwNilPointerError)) { */ case 1: + $deferred.push([(function(req, reqBodyClosed, reqs, resp, reterr, retres) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = testHookClientDoResult(retres[0], reterr[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(req, reqBodyClosed, reqs, resp, reterr, retres), []]); + /* } */ case 2: + /* */ if (req[0].URL === ptrType$19.nil) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (req[0].URL === ptrType$19.nil) { */ case 3: + $r = req[0].closeBody(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = ptrType$16.nil; + _r$1 = urlErrorOp(req[0].Method); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$1 = new url.Error.ptr(_r$1, "", errors.New("http: nil Request.URL")); + retres[0] = _tmp; + reterr[0] = _tmp$1; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 4: + deadline = $clone(c.deadline(), time.Time); + reqs[0] = sliceType$7.nil; + resp[0] = ptrType$16.nil; + _r$2 = c.makeHeadersCopier(req[0]); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + copyHeaders = _r$2; + reqBodyClosed[0] = false; + redirectMethod = ""; + includeBody = false; + uerr = (function(req, reqBodyClosed, reqs, resp, reterr, retres) { return function $b(err) { + var _r$3, err, urlStr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; err = $f.err; urlStr = $f.urlStr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!reqBodyClosed[0]) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!reqBodyClosed[0]) { */ case 1: + $r = req[0].closeBody(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + urlStr = ""; + if (!(resp[0] === ptrType$16.nil) && !(resp[0].Request === ptrType$7.nil)) { + urlStr = stripPassword(resp[0].Request.URL); + } else { + urlStr = stripPassword(req[0].URL); + } + _r$3 = urlErrorOp((0 >= reqs[0].$length ? ($throwRuntimeError("index out of range"), undefined) : reqs[0].$array[reqs[0].$offset + 0]).Method); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return new url.Error.ptr(_r$3, urlStr, err); + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$3 = _r$3; $f.err = err; $f.urlStr = urlStr; $f.$s = $s; $f.$r = $r; return $f; + }; })(req, reqBodyClosed, reqs, resp, reterr, retres); + /* while (true) { */ case 8: + /* */ if (reqs[0].$length > 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (reqs[0].$length > 0) { */ case 10: + loc = new Header(resp[0].Header).Get("Location"); + /* */ if (loc === "") { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (loc === "") { */ case 12: + $r = resp[0].closeBody(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$2 = ptrType$16.nil; + _r$3 = fmt.Errorf("%d response missing Location header", new sliceType([new $Int(resp[0].StatusCode)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = uerr(_r$3); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp$3 = _r$4; + retres[0] = _tmp$2; + reterr[0] = _tmp$3; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 13: + _r$5 = req[0].URL.Parse(loc); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple = _r$5; + u = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 18: + $r = resp[0].closeBody(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$4 = ptrType$16.nil; + _r$6 = fmt.Errorf("failed to parse Location header %q: %v", new sliceType([new $String(loc), err])); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = uerr(_r$6); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tmp$5 = _r$7; + retres[0] = _tmp$4; + reterr[0] = _tmp$5; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 19: + host = ""; + /* */ if (!(req[0].Host === "") && !(req[0].Host === req[0].URL.Host)) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!(req[0].Host === "") && !(req[0].Host === req[0].URL.Host)) { */ case 23: + _r$8 = url.Parse(loc); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$1 = _r$8; + u$1 = _tuple$1[0]; + if (!(u$1 === ptrType$19.nil) && !u$1.IsAbs()) { + host = req[0].Host; + } + /* } */ case 24: + ireq = (0 >= reqs[0].$length ? ($throwRuntimeError("index out of range"), undefined) : reqs[0].$array[reqs[0].$offset + 0]); + req[0] = new Request.ptr(redirectMethod, u, "", 0, 0, {}, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, host, false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, ireq.Cancel, resp[0], ireq.ctx); + /* */ if (includeBody && !(ireq.GetBody === $throwNilPointerError)) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (includeBody && !(ireq.GetBody === $throwNilPointerError)) { */ case 26: + _r$9 = ireq.GetBody(); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$2 = _r$9; + req[0].Body = _tuple$2[0]; + err = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 29; continue; } + /* */ $s = 30; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 29: + $r = resp[0].closeBody(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = ptrType$16.nil; + _r$10 = uerr(err); /* */ $s = 32; case 32: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tmp$7 = _r$10; + retres[0] = _tmp$6; + reterr[0] = _tmp$7; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 30: + req[0].ContentLength = ireq.ContentLength; + /* } */ case 27: + $r = copyHeaders(req[0]); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ref = refererForURL((x$4 = reqs[0].$length - 1 >> 0, ((x$4 < 0 || x$4 >= reqs[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : reqs[0].$array[reqs[0].$offset + x$4])).URL, req[0].URL); + if (!(ref === "")) { + new Header(req[0].Header).Set("Referer", ref); + } + _r$11 = c.checkRedirect(req[0], reqs[0]); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + err = _r$11; + if ($interfaceIsEqual(err, $pkg.ErrUseLastResponse)) { + _tmp$8 = resp[0]; + _tmp$9 = $ifaceNil; + retres[0] = _tmp$8; + reterr[0] = _tmp$9; + $s = -1; return [retres[0], reterr[0]]; + } + /* */ if ((x$5 = resp[0].ContentLength, (x$5.$high === -1 && x$5.$low === 4294967295)) || (x$6 = resp[0].ContentLength, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low <= 2048)))) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if ((x$5 = resp[0].ContentLength, (x$5.$high === -1 && x$5.$low === 4294967295)) || (x$6 = resp[0].ContentLength, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low <= 2048)))) { */ case 35: + _r$12 = io.CopyN(ioutil.Discard, resp[0].Body, new $Int64(0, 2048)); /* */ $s = 37; case 37: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _r$12; + /* } */ case 36: + _r$13 = resp[0].Body.Close(); /* */ $s = 38; case 38: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _r$13; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 39; continue; } + /* */ $s = 40; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 39: + _r$14 = uerr(err); /* */ $s = 41; case 41: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + ue = _r$14; + $assertType(ue, ptrType$24).URL = loc; + _tmp$10 = resp[0]; + _tmp$11 = ue; + retres[0] = _tmp$10; + reterr[0] = _tmp$11; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 40: + /* } */ case 11: + reqs[0] = $append(reqs[0], req[0]); + err$1 = $ifaceNil; + didTimeout = $throwNilPointerError; + _r$15 = c.send(req[0], $clone(deadline, time.Time)); /* */ $s = 42; case 42: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tuple$3 = _r$15; + resp[0] = _tuple$3[0]; + didTimeout = _tuple$3[1]; + err$1 = _tuple$3[2]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 43; continue; } + /* */ $s = 44; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 43: + reqBodyClosed[0] = true; + if (!(!$clone(deadline, time.Time).IsZero())) { _v = false; $s = 47; continue s; } + _r$16 = didTimeout(); /* */ $s = 48; case 48: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _v = _r$16; case 47: + /* */ if (_v) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (_v) { */ case 45: + _r$17 = err$1.Error(); /* */ $s = 49; case 49: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + err$1 = new httpError.ptr(_r$17 + " (Client.Timeout exceeded while awaiting headers)", true); + /* } */ case 46: + _tmp$12 = ptrType$16.nil; + _r$18 = uerr(err$1); /* */ $s = 50; case 50: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + _tmp$13 = _r$18; + retres[0] = _tmp$12; + reterr[0] = _tmp$13; + $s = -1; return [retres[0], reterr[0]]; + /* } */ case 44: + shouldRedirect = false; + _tuple$4 = redirectBehavior(req[0].Method, resp[0], (0 >= reqs[0].$length ? ($throwRuntimeError("index out of range"), undefined) : reqs[0].$array[reqs[0].$offset + 0])); + redirectMethod = _tuple$4[0]; + shouldRedirect = _tuple$4[1]; + includeBody = _tuple$4[2]; + if (!shouldRedirect) { + _tmp$14 = resp[0]; + _tmp$15 = $ifaceNil; + retres[0] = _tmp$14; + reterr[0] = _tmp$15; + $s = -1; return [retres[0], reterr[0]]; + } + $r = req[0].closeBody(); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 8; continue; case 9: + $s = -1; return [retres[0], reterr[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [retres[0], reterr[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Client.ptr.prototype.do$ }; } $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._v = _v; $f.c = c; $f.copyHeaders = copyHeaders; $f.deadline = deadline; $f.didTimeout = didTimeout; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.includeBody = includeBody; $f.ireq = ireq; $f.loc = loc; $f.redirectMethod = redirectMethod; $f.ref = ref; $f.req = req; $f.reqBodyClosed = reqBodyClosed; $f.reqs = reqs; $f.resp = resp; $f.reterr = reterr; $f.retres = retres; $f.shouldRedirect = shouldRedirect; $f.u = u; $f.u$1 = u$1; $f.ue = ue; $f.uerr = uerr; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Client.prototype.do$ = function(req) { return this.$val.do$(req); }; + Client.ptr.prototype.makeHeadersCopier = function(ireq) { + var _entry, _i, _key, _r$1, _ref, c, c$1, icookies, ireq, ireqhdr, preq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _r$1 = $f._r$1; _ref = $f._ref; c = $f.c; c$1 = $f.c$1; icookies = $f.icookies; ireq = $f.ireq; ireqhdr = $f.ireqhdr; preq = $f.preq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = [c]; + icookies = [icookies]; + ireqhdr = [ireqhdr]; + preq = [preq]; + c[0] = this; + ireqhdr[0] = new Header(ireq.Header).clone(); + icookies[0] = false; + /* */ if (!($interfaceIsEqual(c[0].Jar, $ifaceNil)) && !(new Header(ireq.Header).Get("Cookie") === "")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(c[0].Jar, $ifaceNil)) && !(new Header(ireq.Header).Get("Cookie") === "")) { */ case 1: + icookies[0] = {}; + _r$1 = ireq.Cookies(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _ref = _r$1; + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + c$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _key = c$1.Name; (icookies[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = icookies[0][$String.keyFor(c$1.Name)], _entry !== undefined ? _entry.v : sliceType$8.nil), c$1) }; + _i++; + /* } */ $s = 4; continue; case 5: + /* } */ case 2: + preq[0] = ireq; + $s = -1; return (function(c, icookies, ireqhdr, preq) { return function $b(req) { + var _entry$1, _entry$2, _entry$3, _i$1, _i$2, _i$3, _i$4, _key$1, _keys, _keys$1, _r$2, _r$3, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, c$2, c$3, changed, cs, k, ok, req, resp, ss, vv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _entry$3 = $f._entry$3; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _i$4 = $f._i$4; _key$1 = $f._key$1; _keys = $f._keys; _keys$1 = $f._keys$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _ref$4 = $f._ref$4; _tuple = $f._tuple; c$2 = $f.c$2; c$3 = $f.c$3; changed = $f.changed; cs = $f.cs; k = $f.k; ok = $f.ok; req = $f.req; resp = $f.resp; ss = $f.ss; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!($interfaceIsEqual(c[0].Jar, $ifaceNil)) && !(icookies[0] === false)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(c[0].Jar, $ifaceNil)) && !(icookies[0] === false)) { */ case 1: + changed = false; + resp = req.Response; + _r$2 = resp.Cookies(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _ref$1 = _r$2; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + c$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _tuple = (_entry$1 = icookies[0][$String.keyFor(c$2.Name)], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$8.nil, false]); + ok = _tuple[1]; + if (ok) { + delete icookies[0][$String.keyFor(c$2.Name)]; + changed = true; + } + _i$1++; + /* } */ $s = 4; continue; case 5: + /* */ if (changed) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (changed) { */ case 6: + new Header(ireqhdr[0]).Del("Cookie"); + ss = sliceType$1.nil; + _ref$2 = icookies[0]; + _i$2 = 0; + _keys = $keys(_ref$2); + while (true) { + if (!(_i$2 < _keys.length)) { break; } + _entry$2 = _ref$2[_keys[_i$2]]; + if (_entry$2 === undefined) { + _i$2++; + continue; + } + cs = _entry$2.v; + _ref$3 = cs; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + c$3 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + ss = $append(ss, c$3.Name + "=" + c$3.Value); + _i$3++; + } + _i$2++; + } + $r = sort.Strings(ss); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + new Header(ireqhdr[0]).Set("Cookie", strings.Join(ss, "; ")); + /* } */ case 7: + /* } */ case 2: + _ref$4 = ireqhdr[0]; + _i$4 = 0; + _keys$1 = $keys(_ref$4); + /* while (true) { */ case 9: + /* if (!(_i$4 < _keys$1.length)) { break; } */ if(!(_i$4 < _keys$1.length)) { $s = 10; continue; } + _entry$3 = _ref$4[_keys$1[_i$4]]; + if (_entry$3 === undefined) { + _i$4++; + /* continue; */ $s = 9; continue; + } + k = _entry$3.k; + vv = _entry$3.v; + _r$3 = shouldCopyHeaderOnRedirect(k, preq[0].URL, req.URL); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (_r$3) { */ case 11: + _key$1 = k; (req.Header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: vv }; + /* } */ case 12: + _i$4++; + /* } */ $s = 9; continue; case 10: + preq[0] = req; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._entry$3 = _entry$3; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._i$4 = _i$4; $f._key$1 = _key$1; $f._keys = _keys; $f._keys$1 = _keys$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._ref$4 = _ref$4; $f._tuple = _tuple; $f.c$2 = c$2; $f.c$3 = c$3; $f.changed = changed; $f.cs = cs; $f.k = k; $f.ok = ok; $f.req = req; $f.resp = resp; $f.ss = ss; $f.vv = vv; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, icookies, ireqhdr, preq); + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.makeHeadersCopier }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._r$1 = _r$1; $f._ref = _ref; $f.c = c; $f.c$1 = c$1; $f.icookies = icookies; $f.ireq = ireq; $f.ireqhdr = ireqhdr; $f.preq = preq; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.makeHeadersCopier = function(ireq) { return this.$val.makeHeadersCopier(ireq); }; + defaultCheckRedirect = function(req, via) { + var req, via; + if (via.$length >= 10) { + return errors.New("stopped after 10 redirects"); + } + return $ifaceNil; + }; + Post = function(url$1, contentType, body$1) { + var _r$1, _tuple, body$1, contentType, err, resp, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; body$1 = $f.body$1; contentType = $f.contentType; err = $f.err; resp = $f.resp; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + _r$1 = $pkg.DefaultClient.Post(url$1, contentType, body$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + resp = _tuple[0]; + err = _tuple[1]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Post }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.body$1 = body$1; $f.contentType = contentType; $f.err = err; $f.resp = resp; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Post = Post; + Client.ptr.prototype.Post = function(url$1, contentType, body$1) { + var _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, body$1, c, contentType, err, req, resp, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; body$1 = $f.body$1; c = $f.c; contentType = $f.contentType; err = $f.err; req = $f.req; resp = $f.resp; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + c = this; + _r$1 = NewRequest("POST", url$1, body$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + req = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = err; + resp = _tmp; + err = _tmp$1; + $s = -1; return [resp, err]; + } + new Header(req.Header).Set("Content-Type", contentType); + _r$2 = c.Do(req); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + resp = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.Post }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.body$1 = body$1; $f.c = c; $f.contentType = contentType; $f.err = err; $f.req = req; $f.resp = resp; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.Post = function(url$1, contentType, body$1) { return this.$val.Post(url$1, contentType, body$1); }; + Client.ptr.prototype.PostForm = function(url$1, data) { + var _arg, _arg$1, _r$1, _r$2, _r$3, _tuple, c, data, err, resp, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; c = $f.c; data = $f.data; err = $f.err; resp = $f.resp; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + c = this; + _arg = url$1; + _r$1 = new url.Values(data).Encode(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.NewReader(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$1 = _r$2; + _r$3 = c.Post(_arg, "application/x-www-form-urlencoded", _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + resp = _tuple[0]; + err = _tuple[1]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.PostForm }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.c = c; $f.data = data; $f.err = err; $f.resp = resp; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.PostForm = function(url$1, data) { return this.$val.PostForm(url$1, data); }; + Client.ptr.prototype.Head = function(url$1) { + var _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, c, err, req, resp, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; err = $f.err; req = $f.req; resp = $f.resp; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + c = this; + _r$1 = NewRequest("HEAD", url$1, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + req = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = err; + resp = _tmp; + err = _tmp$1; + $s = -1; return [resp, err]; + } + _r$2 = c.Do(req); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + resp = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Client.ptr.prototype.Head }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.err = err; $f.req = req; $f.resp = resp; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Client.prototype.Head = function(url$1) { return this.$val.Head(url$1); }; + cancelTimerBody.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + b = this; + _r$1 = b.rc.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + _tmp = n; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + $r = b.stop(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ($interfaceIsEqual(err, io.EOF)) { + _tmp$2 = n; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + _r$2 = b.reqDidTimeout(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r$2) { */ case 3: + _r$3 = err.Error(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = new httpError.ptr(_r$3 + " (Client.Timeout exceeded while reading body)", true); + /* } */ case 4: + _tmp$4 = n; + _tmp$5 = err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelTimerBody.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelTimerBody.prototype.Read = function(p) { return this.$val.Read(p); }; + cancelTimerBody.ptr.prototype.Close = function() { + var _r$1, b, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; b = $f.b; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + _r$1 = b.rc.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + $r = b.stop(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: cancelTimerBody.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.b = b; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + cancelTimerBody.prototype.Close = function() { return this.$val.Close(); }; + shouldCopyHeaderOnRedirect = function(headerKey, initial, dest) { + var _1, _r$1, _r$2, dest, dhost, headerKey, ihost, initial, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$2 = $f._r$2; dest = $f.dest; dhost = $f.dhost; headerKey = $f.headerKey; ihost = $f.ihost; initial = $f.initial; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = CanonicalHeaderKey(headerKey); + /* */ if (_1 === ("Authorization") || _1 === ("Www-Authenticate") || _1 === ("Cookie") || _1 === ("Cookie2")) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (_1 === ("Authorization") || _1 === ("Www-Authenticate") || _1 === ("Cookie") || _1 === ("Cookie2")) { */ case 2: + _r$1 = canonicalAddr(initial); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ihost = _r$1; + _r$2 = canonicalAddr(dest); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + dhost = _r$2; + $s = -1; return isDomainOrSubdomain(dhost, ihost); + /* } */ case 3: + case 1: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: shouldCopyHeaderOnRedirect }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.dest = dest; $f.dhost = dhost; $f.headerKey = headerKey; $f.ihost = ihost; $f.initial = initial; $f.$s = $s; $f.$r = $r; return $f; + }; + isDomainOrSubdomain = function(sub, parent) { + var parent, sub; + if (sub === parent) { + return true; + } + if (!strings.HasSuffix(sub, parent)) { + return false; + } + return sub.charCodeAt(((sub.length - parent.length >> 0) - 1 >> 0)) === 46; + }; + stripPassword = function(u) { + var _tuple, pass, passSet, u; + _tuple = u.User.Password(); + pass = _tuple[0]; + passSet = _tuple[1]; + if (passSet) { + return strings.Replace(u.String(), pass + "@", "***@", 1); + } + return u.String(); + }; + readSetCookies = function(h) { + var _1, _2, _entry, _entry$1, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, attr, c, cookieCount, cookies, err, err$1, exptime, h, i, j, j$1, line, lowerAttr, lowerVal, name, ok, parts, secs, val, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; attr = $f.attr; c = $f.c; cookieCount = $f.cookieCount; cookies = $f.cookies; err = $f.err; err$1 = $f.err$1; exptime = $f.exptime; h = $f.h; i = $f.i; j = $f.j; j$1 = $f.j$1; line = $f.line; lowerAttr = $f.lowerAttr; lowerVal = $f.lowerVal; name = $f.name; ok = $f.ok; parts = $f.parts; secs = $f.secs; val = $f.val; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cookieCount = (_entry = h[$String.keyFor("Set-Cookie")], _entry !== undefined ? _entry.v : sliceType$1.nil).$length; + if (cookieCount === 0) { + $s = -1; return new sliceType$8([]); + } + cookies = $makeSlice(sliceType$8, 0, cookieCount); + _ref = (_entry$1 = h[$String.keyFor("Set-Cookie")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = strings.TrimSpace(line); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.Split(_r$1, ";"); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + parts = _r$2; + /* */ if ((parts.$length === 1) && (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]) === "") { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((parts.$length === 1) && (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]) === "") { */ case 5: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 6: + _r$3 = strings.TrimSpace((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0] = _r$3); + j = strings.Index((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]), "="); + /* */ if (j < 0) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (j < 0) { */ case 8: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 9: + _tmp = $substring((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]), 0, j); + _tmp$1 = $substring((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]), (j + 1 >> 0)); + name = _tmp; + value = _tmp$1; + _r$4 = isCookieNameValid(name); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (!_r$4) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!_r$4) { */ case 10: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 11: + _tuple = parseCookieValue(value, true); + value = _tuple[0]; + ok = _tuple[1]; + /* */ if (!ok) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!ok) { */ case 13: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 14: + c = new Cookie.ptr(name, value, "", "", new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0, false, false, 0, line, sliceType$1.nil); + i = 1; + /* while (true) { */ case 15: + /* if (!(i < parts.$length)) { break; } */ if(!(i < parts.$length)) { $s = 16; continue; } + _r$5 = strings.TrimSpace(((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i] = _r$5); + /* */ if (((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]).length === 0) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]).length === 0) { */ case 18: + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + /* } */ case 19: + _tmp$2 = ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]); + _tmp$3 = ""; + attr = _tmp$2; + val = _tmp$3; + j$1 = strings.Index(attr, "="); + if (j$1 >= 0) { + _tmp$4 = $substring(attr, 0, j$1); + _tmp$5 = $substring(attr, (j$1 + 1 >> 0)); + attr = _tmp$4; + val = _tmp$5; + } + _r$6 = strings.ToLower(attr); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + lowerAttr = _r$6; + _tuple$1 = parseCookieValue(val, false); + val = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (!ok) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!ok) { */ case 21: + c.Unparsed = $append(c.Unparsed, ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + /* } */ case 22: + _1 = lowerAttr; + /* */ if (_1 === ("samesite")) { $s = 24; continue; } + /* */ if (_1 === ("secure")) { $s = 25; continue; } + /* */ if (_1 === ("httponly")) { $s = 26; continue; } + /* */ if (_1 === ("domain")) { $s = 27; continue; } + /* */ if (_1 === ("max-age")) { $s = 28; continue; } + /* */ if (_1 === ("expires")) { $s = 29; continue; } + /* */ if (_1 === ("path")) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (_1 === ("samesite")) { */ case 24: + _r$7 = strings.ToLower(val); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + lowerVal = _r$7; + _2 = lowerVal; + if (_2 === ("lax")) { + c.SameSite = 2; + } else if (_2 === ("strict")) { + c.SameSite = 3; + } else { + c.SameSite = 1; + } + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("secure")) { */ case 25: + c.Secure = true; + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("httponly")) { */ case 26: + c.HttpOnly = true; + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("domain")) { */ case 27: + c.Domain = val; + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("max-age")) { */ case 28: + _tuple$2 = strconv.Atoi(val); + secs = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || !((secs === 0)) && (val.charCodeAt(0) === 48)) { + /* break; */ $s = 23; continue; + } + if (secs <= 0) { + secs = -1; + } + c.MaxAge = secs; + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("expires")) { */ case 29: + c.RawExpires = val; + _r$8 = time.Parse("Mon, 02 Jan 2006 15:04:05 MST", val); /* */ $s = 33; case 33: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$3 = _r$8; + exptime = $clone(_tuple$3[0], time.Time); + err$1 = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 34; continue; } + /* */ $s = 35; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 34: + _r$9 = time.Parse("Mon, 02-Jan-2006 15:04:05 MST", val); /* */ $s = 36; case 36: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$4 = _r$9; + time.Time.copy(exptime, _tuple$4[0]); + err$1 = _tuple$4[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + time.Time.copy(c.Expires, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); + /* break; */ $s = 23; continue; + } + /* } */ case 35: + time.Time.copy(c.Expires, $clone(exptime, time.Time).UTC()); + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + $s = 31; continue; + /* } else if (_1 === ("path")) { */ case 30: + c.Path = val; + i = i + (1) >> 0; + /* continue; */ $s = 15; continue; + /* } */ case 31: + case 23: + c.Unparsed = $append(c.Unparsed, ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); + i = i + (1) >> 0; + /* } */ $s = 15; continue; case 16: + cookies = $append(cookies, c); + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return cookies; + /* */ } return; } if ($f === undefined) { $f = { $blk: readSetCookies }; } $f._1 = _1; $f._2 = _2; $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.attr = attr; $f.c = c; $f.cookieCount = cookieCount; $f.cookies = cookies; $f.err = err; $f.err$1 = err$1; $f.exptime = exptime; $f.h = h; $f.i = i; $f.j = j; $f.j$1 = j$1; $f.line = line; $f.lowerAttr = lowerAttr; $f.lowerVal = lowerVal; $f.name = name; $f.ok = ok; $f.parts = parts; $f.secs = secs; $f.val = val; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + Cookie.ptr.prototype.String = function() { + var _1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, b, buf, c, d, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _v = $f._v; b = $f.b; buf = $f.buf; c = $f.c; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (c === ptrType$25.nil) { _v = true; $s = 3; continue s; } + _r$1 = isCookieNameValid(c.Name); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = !_r$1; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return ""; + /* } */ case 2: + b = new strings.Builder.ptr(ptrType$26.nil, sliceType$3.nil); + _r$2 = sanitizeCookieName(c.Name); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = b.WriteString(_r$2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + b.WriteRune(61); + _r$4 = sanitizeCookieValue(c.Value); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = b.WriteString(_r$4); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* */ if (c.Path.length > 0) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (c.Path.length > 0) { */ case 9: + b.WriteString("; Path="); + _r$6 = sanitizeCookiePath(c.Path); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = b.WriteString(_r$6); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + /* } */ case 10: + /* */ if (c.Domain.length > 0) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (c.Domain.length > 0) { */ case 13: + /* */ if (validCookieDomain(c.Domain)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (validCookieDomain(c.Domain)) { */ case 15: + d = c.Domain; + if (d.charCodeAt(0) === 46) { + d = $substring(d, 1); + } + b.WriteString("; Domain="); + b.WriteString(d); + $s = 17; continue; + /* } else { */ case 16: + $r = log.Printf("net/http: invalid Cookie.Domain %q; dropping domain attribute", new sliceType([new $String(c.Domain)])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + /* } */ case 14: + buf = arrayType.zero(); + _r$8 = validCookieExpires($clone(c.Expires, time.Time)); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + /* */ if (_r$8) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (_r$8) { */ case 19: + b.WriteString("; Expires="); + _r$9 = $clone($clone(c.Expires, time.Time).UTC(), time.Time).AppendFormat($subslice(new sliceType$3(buf), 0, 0), "Mon, 02 Jan 2006 15:04:05 GMT"); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$10 = b.Write(_r$9); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + /* } */ case 20: + if (c.MaxAge > 0) { + b.WriteString("; Max-Age="); + b.Write(strconv.AppendInt($subslice(new sliceType$3(buf), 0, 0), (new $Int64(0, c.MaxAge)), 10)); + } else if (c.MaxAge < 0) { + b.WriteString("; Max-Age=0"); + } + if (c.HttpOnly) { + b.WriteString("; HttpOnly"); + } + if (c.Secure) { + b.WriteString("; Secure"); + } + _1 = c.SameSite; + if (_1 === (1)) { + b.WriteString("; SameSite"); + } else if (_1 === (2)) { + b.WriteString("; SameSite=Lax"); + } else if (_1 === (3)) { + b.WriteString("; SameSite=Strict"); + } + $s = -1; return b.String(); + /* */ } return; } if ($f === undefined) { $f = { $blk: Cookie.ptr.prototype.String }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._v = _v; $f.b = b; $f.buf = buf; $f.c = c; $f.d = d; $f.$s = $s; $f.$r = $r; return $f; + }; + Cookie.prototype.String = function() { return this.$val.String(); }; + readCookies = function(h, filter) { + var _entry, _i, _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, cookies, filter, h, i, j, line, lines, name, ok, ok$1, parts, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cookies = $f.cookies; filter = $f.filter; h = $f.h; i = $f.i; j = $f.j; line = $f.line; lines = $f.lines; name = $f.name; ok = $f.ok; ok$1 = $f.ok$1; parts = $f.parts; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = (_entry = h[$String.keyFor("Cookie")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + lines = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return new sliceType$8([]); + } + cookies = new sliceType$8([]); + _ref = lines; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = strings.TrimSpace(line); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.Split(_r$1, ";"); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + parts = _r$2; + /* */ if ((parts.$length === 1) && (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]) === "") { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ((parts.$length === 1) && (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]) === "") { */ case 5: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 6: + i = 0; + /* while (true) { */ case 7: + /* if (!(i < parts.$length)) { break; } */ if(!(i < parts.$length)) { $s = 8; continue; } + _r$3 = strings.TrimSpace(((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i] = _r$3); + /* */ if (((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]).length === 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]).length === 0) { */ case 10: + i = i + (1) >> 0; + /* continue; */ $s = 7; continue; + /* } */ case 11: + _tmp = ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]); + _tmp$1 = ""; + name = _tmp; + val = _tmp$1; + j = strings.Index(name, "="); + if (j >= 0) { + _tmp$2 = $substring(name, 0, j); + _tmp$3 = $substring(name, (j + 1 >> 0)); + name = _tmp$2; + val = _tmp$3; + } + _r$4 = isCookieNameValid(name); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (!_r$4) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!_r$4) { */ case 12: + i = i + (1) >> 0; + /* continue; */ $s = 7; continue; + /* } */ case 13: + if (!(filter === "") && !(filter === name)) { + i = i + (1) >> 0; + /* continue; */ $s = 7; continue; + } + _tuple$1 = parseCookieValue(val, true); + val = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (!ok$1) { + i = i + (1) >> 0; + /* continue; */ $s = 7; continue; + } + cookies = $append(cookies, new Cookie.ptr(name, val, "", "", new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0, false, false, 0, "", sliceType$1.nil)); + i = i + (1) >> 0; + /* } */ $s = 7; continue; case 8: + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return cookies; + /* */ } return; } if ($f === undefined) { $f = { $blk: readCookies }; } $f._entry = _entry; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cookies = cookies; $f.filter = filter; $f.h = h; $f.i = i; $f.j = j; $f.line = line; $f.lines = lines; $f.name = name; $f.ok = ok; $f.ok$1 = ok$1; $f.parts = parts; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + validCookieDomain = function(v) { + var v; + if (isCookieDomainName(v)) { + return true; + } + if (!(net.ParseIP(v) === net.IP.nil) && !strings.Contains(v, ":")) { + return true; + } + return false; + }; + validCookieExpires = function(t) { + var _r$1, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1 >= 1601; + /* */ } return; } if ($f === undefined) { $f = { $blk: validCookieExpires }; } $f._r$1 = _r$1; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + isCookieDomainName = function(s) { + var c, i, last, ok, partlen, s; + if (s.length === 0) { + return false; + } + if (s.length > 255) { + return false; + } + if (s.charCodeAt(0) === 46) { + s = $substring(s, 1); + } + last = 46; + ok = false; + partlen = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (97 <= c && c <= 122 || 65 <= c && c <= 90) { + ok = true; + partlen = partlen + (1) >> 0; + } else if (48 <= c && c <= 57) { + partlen = partlen + (1) >> 0; + } else if ((c === 45)) { + if (last === 46) { + return false; + } + partlen = partlen + (1) >> 0; + } else if ((c === 46)) { + if ((last === 46) || (last === 45)) { + return false; + } + if (partlen > 63 || (partlen === 0)) { + return false; + } + partlen = 0; + } else { + return false; + } + last = c; + i = i + (1) >> 0; + } + if ((last === 45) || partlen > 63) { + return false; + } + return ok; + }; + sanitizeCookieName = function(n) { + var _r$1, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = cookieNameSanitizer.Replace(n); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: sanitizeCookieName }; } $f._r$1 = _r$1; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + sanitizeCookieValue = function(v) { + var _r$1, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = sanitizeOrWarn("Cookie.Value", validCookieValueByte, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + if (v.length === 0) { + $s = -1; return v; + } + if (strings.IndexByte(v, 32) >= 0 || strings.IndexByte(v, 44) >= 0) { + $s = -1; return "\"" + v + "\""; + } + $s = -1; return v; + /* */ } return; } if ($f === undefined) { $f = { $blk: sanitizeCookieValue }; } $f._r$1 = _r$1; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + validCookieValueByte = function(b) { + var b; + return 32 <= b && b < 127 && !((b === 34)) && !((b === 59)) && !((b === 92)); + }; + sanitizeCookiePath = function(v) { + var _r$1, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = sanitizeOrWarn("Cookie.Path", validCookiePathByte, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: sanitizeCookiePath }; } $f._r$1 = _r$1; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + validCookiePathByte = function(b) { + var b; + return 32 <= b && b < 127 && !((b === 59)); + }; + sanitizeOrWarn = function(fieldName, valid, v) { + var _r$1, _r$2, b, buf, fieldName, i, i$1, ok, v, valid, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; b = $f.b; buf = $f.buf; fieldName = $f.fieldName; i = $f.i; i$1 = $f.i$1; ok = $f.ok; v = $f.v; valid = $f.valid; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ok = true; + i = 0; + /* while (true) { */ case 1: + /* if (!(i < v.length)) { break; } */ if(!(i < v.length)) { $s = 2; continue; } + _r$1 = valid(v.charCodeAt(i)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_r$1) { */ case 3: + i = i + (1) >> 0; + /* continue; */ $s = 1; continue; + /* } */ case 4: + $r = log.Printf("net/http: invalid byte %q in %s; dropping invalid bytes", new sliceType([new $Uint8(v.charCodeAt(i)), new $String(fieldName)])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ok = false; + /* break; */ $s = 2; continue; + /* } */ $s = 1; continue; case 2: + if (ok) { + $s = -1; return v; + } + buf = $makeSlice(sliceType$3, 0, v.length); + i$1 = 0; + /* while (true) { */ case 7: + /* if (!(i$1 < v.length)) { break; } */ if(!(i$1 < v.length)) { $s = 8; continue; } + b = v.charCodeAt(i$1); + _r$2 = valid(b); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_r$2) { */ case 9: + buf = $append(buf, b); + /* } */ case 10: + i$1 = i$1 + (1) >> 0; + /* } */ $s = 7; continue; case 8: + $s = -1; return ($bytesToString(buf)); + /* */ } return; } if ($f === undefined) { $f = { $blk: sanitizeOrWarn }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.b = b; $f.buf = buf; $f.fieldName = fieldName; $f.i = i; $f.i$1 = i$1; $f.ok = ok; $f.v = v; $f.valid = valid; $f.$s = $s; $f.$r = $r; return $f; + }; + parseCookieValue = function(raw, allowDoubleQuote) { + var allowDoubleQuote, i, raw; + if (allowDoubleQuote && raw.length > 1 && (raw.charCodeAt(0) === 34) && (raw.charCodeAt((raw.length - 1 >> 0)) === 34)) { + raw = $substring(raw, 1, (raw.length - 1 >> 0)); + } + i = 0; + while (true) { + if (!(i < raw.length)) { break; } + if (!validCookieValueByte(raw.charCodeAt(i))) { + return ["", false]; + } + i = i + (1) >> 0; + } + return [raw, true]; + }; + isCookieNameValid = function(raw) { + var _r$1, raw, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; raw = $f.raw; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (raw === "") { + $s = -1; return false; + } + _r$1 = strings.IndexFunc(raw, isNotToken); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1 < 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: isCookieNameValid }; } $f._r$1 = _r$1; $f.raw = raw; $f.$s = $s; $f.$r = $r; return $f; + }; + http2isBadCipher = function(cipher) { + var _1, cipher; + _1 = cipher; + if ((_1 === (0)) || (_1 === (1)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (14)) || (_1 === (15)) || (_1 === (16)) || (_1 === (17)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (24)) || (_1 === (25)) || (_1 === (26)) || (_1 === (27)) || (_1 === (30)) || (_1 === (31)) || (_1 === (32)) || (_1 === (33)) || (_1 === (34)) || (_1 === (35)) || (_1 === (36)) || (_1 === (37)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (45)) || (_1 === (46)) || (_1 === (47)) || (_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55)) || (_1 === (56)) || (_1 === (57)) || (_1 === (58)) || (_1 === (59)) || (_1 === (60)) || (_1 === (61)) || (_1 === (62)) || (_1 === (63)) || (_1 === (64)) || (_1 === (65)) || (_1 === (66)) || (_1 === (67)) || (_1 === (68)) || (_1 === (69)) || (_1 === (70)) || (_1 === (103)) || (_1 === (104)) || (_1 === (105)) || (_1 === (106)) || (_1 === (107)) || (_1 === (108)) || (_1 === (109)) || (_1 === (132)) || (_1 === (133)) || (_1 === (134)) || (_1 === (135)) || (_1 === (136)) || (_1 === (137)) || (_1 === (138)) || (_1 === (139)) || (_1 === (140)) || (_1 === (141)) || (_1 === (142)) || (_1 === (143)) || (_1 === (144)) || (_1 === (145)) || (_1 === (146)) || (_1 === (147)) || (_1 === (148)) || (_1 === (149)) || (_1 === (150)) || (_1 === (151)) || (_1 === (152)) || (_1 === (153)) || (_1 === (154)) || (_1 === (155)) || (_1 === (156)) || (_1 === (157)) || (_1 === (160)) || (_1 === (161)) || (_1 === (164)) || (_1 === (165)) || (_1 === (166)) || (_1 === (167)) || (_1 === (168)) || (_1 === (169)) || (_1 === (172)) || (_1 === (173)) || (_1 === (174)) || (_1 === (175)) || (_1 === (176)) || (_1 === (177)) || (_1 === (178)) || (_1 === (179)) || (_1 === (180)) || (_1 === (181)) || (_1 === (182)) || (_1 === (183)) || (_1 === (184)) || (_1 === (185)) || (_1 === (186)) || (_1 === (187)) || (_1 === (188)) || (_1 === (189)) || (_1 === (190)) || (_1 === (191)) || (_1 === (192)) || (_1 === (193)) || (_1 === (194)) || (_1 === (195)) || (_1 === (196)) || (_1 === (197)) || (_1 === (255)) || (_1 === (49153)) || (_1 === (49154)) || (_1 === (49155)) || (_1 === (49156)) || (_1 === (49157)) || (_1 === (49158)) || (_1 === (49159)) || (_1 === (49160)) || (_1 === (49161)) || (_1 === (49162)) || (_1 === (49163)) || (_1 === (49164)) || (_1 === (49165)) || (_1 === (49166)) || (_1 === (49167)) || (_1 === (49168)) || (_1 === (49169)) || (_1 === (49170)) || (_1 === (49171)) || (_1 === (49172)) || (_1 === (49173)) || (_1 === (49174)) || (_1 === (49175)) || (_1 === (49176)) || (_1 === (49177)) || (_1 === (49178)) || (_1 === (49179)) || (_1 === (49180)) || (_1 === (49181)) || (_1 === (49182)) || (_1 === (49183)) || (_1 === (49184)) || (_1 === (49185)) || (_1 === (49186)) || (_1 === (49187)) || (_1 === (49188)) || (_1 === (49189)) || (_1 === (49190)) || (_1 === (49191)) || (_1 === (49192)) || (_1 === (49193)) || (_1 === (49194)) || (_1 === (49197)) || (_1 === (49198)) || (_1 === (49201)) || (_1 === (49202)) || (_1 === (49203)) || (_1 === (49204)) || (_1 === (49205)) || (_1 === (49206)) || (_1 === (49207)) || (_1 === (49208)) || (_1 === (49209)) || (_1 === (49210)) || (_1 === (49211)) || (_1 === (49212)) || (_1 === (49213)) || (_1 === (49214)) || (_1 === (49215)) || (_1 === (49216)) || (_1 === (49217)) || (_1 === (49218)) || (_1 === (49219)) || (_1 === (49220)) || (_1 === (49221)) || (_1 === (49222)) || (_1 === (49223)) || (_1 === (49224)) || (_1 === (49225)) || (_1 === (49226)) || (_1 === (49227)) || (_1 === (49228)) || (_1 === (49229)) || (_1 === (49230)) || (_1 === (49231)) || (_1 === (49232)) || (_1 === (49233)) || (_1 === (49236)) || (_1 === (49237)) || (_1 === (49240)) || (_1 === (49241)) || (_1 === (49242)) || (_1 === (49243)) || (_1 === (49246)) || (_1 === (49247)) || (_1 === (49250)) || (_1 === (49251)) || (_1 === (49252)) || (_1 === (49253)) || (_1 === (49254)) || (_1 === (49255)) || (_1 === (49256)) || (_1 === (49257)) || (_1 === (49258)) || (_1 === (49259)) || (_1 === (49262)) || (_1 === (49263)) || (_1 === (49264)) || (_1 === (49265)) || (_1 === (49266)) || (_1 === (49267)) || (_1 === (49268)) || (_1 === (49269)) || (_1 === (49270)) || (_1 === (49271)) || (_1 === (49272)) || (_1 === (49273)) || (_1 === (49274)) || (_1 === (49275)) || (_1 === (49278)) || (_1 === (49279)) || (_1 === (49282)) || (_1 === (49283)) || (_1 === (49284)) || (_1 === (49285)) || (_1 === (49288)) || (_1 === (49289)) || (_1 === (49292)) || (_1 === (49293)) || (_1 === (49294)) || (_1 === (49295)) || (_1 === (49298)) || (_1 === (49299)) || (_1 === (49300)) || (_1 === (49301)) || (_1 === (49302)) || (_1 === (49303)) || (_1 === (49304)) || (_1 === (49305)) || (_1 === (49306)) || (_1 === (49307)) || (_1 === (49308)) || (_1 === (49309)) || (_1 === (49312)) || (_1 === (49313)) || (_1 === (49316)) || (_1 === (49317)) || (_1 === (49320)) || (_1 === (49321))) { + return true; + } else { + return false; + } + }; + http2clientConnPool.ptr.prototype.GetClientConn = function(req, addr) { + var _r$1, addr, p, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; addr = $f.addr; p = $f.p; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r$1 = p.getClientConn(req, addr, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnPool.ptr.prototype.GetClientConn }; } $f._r$1 = _r$1; $f.addr = addr; $f.p = p; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnPool.prototype.GetClientConn = function(req, addr) { return this.$val.GetClientConn(req, addr); }; + http2clientConnPool.ptr.prototype.shouldTraceGetConn = function(st) { + var _tuple, ok, p, st; + p = this; + _tuple = $assertType(p.t.ConnPool, http2noDialClientConnPool, true); + ok = _tuple[1]; + if (!ok) { + return true; + } + return !st.freshConn; + }; + http2clientConnPool.prototype.shouldTraceGetConn = function(st) { return this.$val.shouldTraceGetConn(st); }; + http2clientConnPool.ptr.prototype.getClientConn = function(req, addr, dialOnMiss) { + var _entry, _i, _r$1, _r$2, _r$3, _ref, _tuple, addr, call, cc, cc$1, dialOnMiss, err, p, req, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; addr = $f.addr; call = $f.call; cc = $f.cc; cc$1 = $f.cc$1; dialOnMiss = $f.dialOnMiss; err = $f.err; p = $f.p; req = $f.req; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + /* */ if (http2isConnectionCloseRequest(req) && dialOnMiss) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2isConnectionCloseRequest(req) && dialOnMiss) { */ case 1: + $r = http2traceGetConn(req, addr); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = p.t.dialClientConn(addr, true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + cc = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$29.nil, err]; + } + $s = -1; return [cc, $ifaceNil]; + /* } */ case 2: + $r = p.mu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = (_entry = p.conns[$String.keyFor(addr)], _entry !== undefined ? _entry.v : sliceType$10.nil); + _i = 0; + /* while (true) { */ case 6: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 7; continue; } + cc$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$2 = cc$1.idleState(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + st = $clone(_r$2, http2clientConnIdleState); + /* */ if (st.canTakeNewRequest) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (st.canTakeNewRequest) { */ case 9: + /* */ if (p.shouldTraceGetConn($clone(st, http2clientConnIdleState))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (p.shouldTraceGetConn($clone(st, http2clientConnIdleState))) { */ case 11: + $r = http2traceGetConn(req, addr); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + $r = p.mu.Unlock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [cc$1, $ifaceNil]; + /* } */ case 10: + _i++; + /* } */ $s = 6; continue; case 7: + /* */ if (!dialOnMiss) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!dialOnMiss) { */ case 15: + $r = p.mu.Unlock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$29.nil, http2ErrNoCachedConn]; + /* } */ case 16: + $r = http2traceGetConn(req, addr); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + call = p.getStartDialLocked(addr); + $r = p.mu.Unlock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = $recv(call.done); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3[0]; + $s = -1; return [call.res, call.err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnPool.ptr.prototype.getClientConn }; } $f._entry = _entry; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f.addr = addr; $f.call = call; $f.cc = cc; $f.cc$1 = cc$1; $f.dialOnMiss = dialOnMiss; $f.err = err; $f.p = p; $f.req = req; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnPool.prototype.getClientConn = function(req, addr, dialOnMiss) { return this.$val.getClientConn(req, addr, dialOnMiss); }; + http2clientConnPool.ptr.prototype.getStartDialLocked = function(addr) { + var _entry, _key, _tuple, addr, call, call$1, ok, p; + p = this; + _tuple = (_entry = p.dialing[$String.keyFor(addr)], _entry !== undefined ? [_entry.v, true] : [ptrType$30.nil, false]); + call = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return call; + } + call$1 = new http2dialCall.ptr(p, new $Chan(structType, 0), ptrType$29.nil, $ifaceNil); + if (p.dialing === false) { + p.dialing = {}; + } + _key = addr; (p.dialing || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: call$1 }; + $go($methodVal(call$1, "dial"), [addr]); + return call$1; + }; + http2clientConnPool.prototype.getStartDialLocked = function(addr) { return this.$val.getStartDialLocked(addr); }; + http2dialCall.ptr.prototype.dial = function(addr) { + var _r$1, _tuple, addr, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; addr = $f.addr; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$1 = c.p.t.dialClientConn(addr, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + c.res = _tuple[0]; + c.err = _tuple[1]; + $close(c.done); + $r = c.p.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + delete c.p.dialing[$String.keyFor(addr)]; + if ($interfaceIsEqual(c.err, $ifaceNil)) { + c.p.addConnLocked(addr, c.res); + } + $r = c.p.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2dialCall.ptr.prototype.dial }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.addr = addr; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + http2dialCall.prototype.dial = function(addr) { return this.$val.dial(addr); }; + http2clientConnPool.ptr.prototype.addConnIfNeeded = function(key, t, c) { + var _entry, _entry$1, _i, _key, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, call, cc, dup, err, key, p, t, used, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; c = $f.c; call = $f.call; cc = $f.cc; dup = $f.dup; err = $f.err; key = $f.key; p = $f.p; t = $f.t; used = $f.used; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + used = false; + err = $ifaceNil; + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = (_entry = p.conns[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$10.nil); + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + cc = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = cc.CanTakeNewRequest(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$1) { */ case 4: + $r = p.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = false; + _tmp$1 = $ifaceNil; + used = _tmp; + err = _tmp$1; + $s = -1; return [used, err]; + /* } */ case 5: + _i++; + /* } */ $s = 2; continue; case 3: + _tuple = (_entry$1 = p.addConnCalls[$String.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$31.nil, false]); + call = _tuple[0]; + dup = _tuple[1]; + /* */ if (!dup) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!dup) { */ case 8: + if (p.addConnCalls === false) { + p.addConnCalls = {}; + } + call = new http2addConnCall.ptr(p, new $Chan(structType, 0), $ifaceNil); + _key = key; (p.addConnCalls || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: call }; + $go($methodVal(call, "run"), [t, key, c]); + /* } */ case 9: + $r = p.mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = $recv(call.done); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2[0]; + if (!($interfaceIsEqual(call.err, $ifaceNil))) { + _tmp$2 = false; + _tmp$3 = call.err; + used = _tmp$2; + err = _tmp$3; + $s = -1; return [used, err]; + } + _tmp$4 = !dup; + _tmp$5 = $ifaceNil; + used = _tmp$4; + err = _tmp$5; + $s = -1; return [used, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnPool.ptr.prototype.addConnIfNeeded }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.c = c; $f.call = call; $f.cc = cc; $f.dup = dup; $f.err = err; $f.key = key; $f.p = p; $f.t = t; $f.used = used; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnPool.prototype.addConnIfNeeded = function(key, t, c) { return this.$val.addConnIfNeeded(key, t, c); }; + http2addConnCall.ptr.prototype.run = function(t, key, tc) { + var _r$1, _tuple, c, cc, err, key, p, t, tc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; cc = $f.cc; err = $f.err; key = $f.key; p = $f.p; t = $f.t; tc = $f.tc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + _r$1 = t.NewClientConn(tc); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + cc = _tuple[0]; + err = _tuple[1]; + p = c.p; + $r = p.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!($interfaceIsEqual(err, $ifaceNil))) { + c.err = err; + } else { + p.addConnLocked(key, cc); + } + delete p.addConnCalls[$String.keyFor(key)]; + $r = p.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $close(c.done); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2addConnCall.ptr.prototype.run }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.cc = cc; $f.err = err; $f.key = key; $f.p = p; $f.t = t; $f.tc = tc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2addConnCall.prototype.run = function(t, key, tc) { return this.$val.run(t, key, tc); }; + http2clientConnPool.ptr.prototype.addConnLocked = function(key, cc) { + var _entry, _entry$1, _entry$2, _i, _key, _key$1, _ref, cc, key, p, v; + p = this; + _ref = (_entry = p.conns[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$10.nil); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (v === cc) { + return; + } + _i++; + } + if (p.conns === false) { + p.conns = {}; + } + if (p.keys === false) { + p.keys = {}; + } + _key = key; (p.conns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry$1 = p.conns[$String.keyFor(key)], _entry$1 !== undefined ? _entry$1.v : sliceType$10.nil), cc) }; + _key$1 = cc; (p.keys || $throwRuntimeError("assignment to entry in nil map"))[ptrType$29.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$2 = p.keys[ptrType$29.keyFor(cc)], _entry$2 !== undefined ? _entry$2.v : sliceType$1.nil), key) }; + }; + http2clientConnPool.prototype.addConnLocked = function(key, cc) { return this.$val.addConnLocked(key, cc); }; + http2clientConnPool.ptr.prototype.MarkDead = function(cc) { + var _entry, _entry$1, _i, _key, _ref, _tuple, cc, key, newList, ok, p, vv, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _ref = $f._ref; _tuple = $f._tuple; cc = $f.cc; key = $f.key; newList = $f.newList; ok = $f.ok; p = $f.p; vv = $f.vv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + _ref = (_entry = p.keys[ptrType$29.keyFor(cc)], _entry !== undefined ? _entry.v : sliceType$1.nil); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + key = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tuple = (_entry$1 = p.conns[$String.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$10.nil, false]); + vv = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _i++; + continue; + } + newList = http2filterOutClientConn(vv, cc); + if (newList.$length > 0) { + _key = key; (p.conns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: newList }; + } else { + delete p.conns[$String.keyFor(key)]; + } + _i++; + } + delete p.keys[ptrType$29.keyFor(cc)]; + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnPool.ptr.prototype.MarkDead }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._ref = _ref; $f._tuple = _tuple; $f.cc = cc; $f.key = key; $f.newList = newList; $f.ok = ok; $f.p = p; $f.vv = vv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnPool.prototype.MarkDead = function(cc) { return this.$val.MarkDead(cc); }; + http2clientConnPool.ptr.prototype.closeIdleConnections = function() { + var _entry, _i, _i$1, _keys, _ref, _ref$1, cc, p, vv, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _ref = $f._ref; _ref$1 = $f._ref$1; cc = $f.cc; p = $f.p; vv = $f.vv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + _ref = p.conns; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 2: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 2; continue; + } + vv = _entry.v; + _ref$1 = vv; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + cc = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + $r = cc.closeIfIdle(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$1++; + /* } */ $s = 4; continue; case 5: + _i++; + /* } */ $s = 2; continue; case 3: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnPool.ptr.prototype.closeIdleConnections }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._keys = _keys; $f._ref = _ref; $f._ref$1 = _ref$1; $f.cc = cc; $f.p = p; $f.vv = vv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnPool.prototype.closeIdleConnections = function() { return this.$val.closeIdleConnections(); }; + http2filterOutClientConn = function(in$1, exclude) { + var _i, _ref, exclude, in$1, out, v, x$4; + out = $subslice(in$1, 0, 0); + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!(v === exclude)) { + out = $append(out, v); + } + _i++; + } + if (!((in$1.$length === out.$length))) { + (x$4 = in$1.$length - 1 >> 0, ((x$4 < 0 || x$4 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x$4] = ptrType$29.nil)); + } + return out; + }; + http2noDialClientConnPool.ptr.prototype.GetClientConn = function(req, addr) { + var _r$1, addr, p, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; addr = $f.addr; p = $f.p; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r$1 = p.http2clientConnPool.getClientConn(req, addr, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2noDialClientConnPool.ptr.prototype.GetClientConn }; } $f._r$1 = _r$1; $f.addr = addr; $f.p = p; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2noDialClientConnPool.prototype.GetClientConn = function(req, addr) { return this.$val.GetClientConn(req, addr); }; + http2configureTransport = function(t1) { + var _key, _r$1, connPool, err, m, t1, t2, upgradeFn, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; _r$1 = $f._r$1; connPool = $f.connPool; err = $f.err; m = $f.m; t1 = $f.t1; t2 = $f.t2; upgradeFn = $f.upgradeFn; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + connPool = [connPool]; + t2 = [t2]; + connPool[0] = new http2clientConnPool.ptr(ptrType$22.nil, new sync.Mutex.ptr(0, 0), false, false, false, false); + t2[0] = new http2Transport.ptr($throwNilPointerError, ptrType$14.nil, (x$4 = new http2noDialClientConnPool.ptr(connPool[0]), new x$4.constructor.elem(x$4)), false, false, 0, t1, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), $ifaceNil); + connPool[0].t = t2[0]; + _r$1 = http2registerHTTPSProtocol(t1, new http2noDialH2RoundTripper.ptr(t2[0])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$22.nil, err]; + } + if (t1.TLSClientConfig === ptrType$14.nil) { + t1.TLSClientConfig = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$11.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$32.nil, sliceType$1.nil, "", 0, ptrType$32.nil, false, sliceType$12.nil, false, false, arrayType$2.zero(), $ifaceNil, 0, 0, sliceType$13.nil, false, 0, $ifaceNil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$14.nil); + } + if (!http2strSliceContains(t1.TLSClientConfig.NextProtos, "h2")) { + t1.TLSClientConfig.NextProtos = $appendSlice(new sliceType$1(["h2"]), t1.TLSClientConfig.NextProtos); + } + if (!http2strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1")) { + t1.TLSClientConfig.NextProtos = $append(t1.TLSClientConfig.NextProtos, "http/1.1"); + } + upgradeFn = (function(connPool, t2) { return function $b(authority, c) { + var _r$2, _r$3, _tuple, addr, authority, c, err$1, used, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; addr = $f.addr; authority = $f.authority; c = $f.c; err$1 = $f.err$1; used = $f.used; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$2 = http2authorityAddr("https", authority); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + addr = _r$2; + _r$3 = connPool[0].addConnIfNeeded(addr, t2[0], c); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + used = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $go($methodVal(c, "Close"), []); + $s = -1; return (x$5 = new http2erringRoundTripper.ptr(err$1), new x$5.constructor.elem(x$5)); + } else if (!used) { + $go($methodVal(c, "Close"), []); + } + $s = -1; return t2[0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.addr = addr; $f.authority = authority; $f.c = c; $f.err$1 = err$1; $f.used = used; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; })(connPool, t2); + m = t1.TLSNextProto; + if ($keys(m).length === 0) { + t1.TLSNextProto = $makeMap($String.keyFor, [{ k: "h2", v: upgradeFn }]); + } else { + _key = "h2"; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: upgradeFn }; + } + $s = -1; return [t2[0], $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2configureTransport }; } $f._key = _key; $f._r$1 = _r$1; $f.connPool = connPool; $f.err = err; $f.m = m; $f.t1 = t1; $f.t2 = t2; $f.upgradeFn = upgradeFn; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2registerHTTPSProtocol = function(t, rt) { + var err, rt, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; rt = $f.rt; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + err[0] = $ifaceNil; + $deferred.push([(function(err) { return function $b() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = $recover(); + /* */ if (!($interfaceIsEqual(e, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(e, $ifaceNil))) { */ case 1: + _r$1 = fmt.Errorf("%v", new sliceType([e])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err[0] = _r$1; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; })(err), []]); + $r = t.RegisterProtocol("https", new rt.constructor.elem(rt)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err[0] = $ifaceNil; + $s = -1; return err[0]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2registerHTTPSProtocol }; } $f.err = err; $f.rt = rt; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2noDialH2RoundTripper.ptr.prototype.RoundTrip = function(req) { + var _r$1, _tuple, err, req, res, rt, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; req = $f.req; res = $f.res; rt = $f.rt; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rt = this; + _r$1 = rt.http2Transport.RoundTrip(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + res = _tuple[0]; + err = _tuple[1]; + if (http2isNoCachedConnError(err)) { + $s = -1; return [ptrType$16.nil, $pkg.ErrSkipAltProtocol]; + } + $s = -1; return [res, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2noDialH2RoundTripper.ptr.prototype.RoundTrip }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.req = req; $f.res = res; $f.rt = rt; $f.$s = $s; $f.$r = $r; return $f; + }; + http2noDialH2RoundTripper.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + http2getDataBufferChunk = function(size) { + var _r$1, i, size, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; i = $f.i; size = $f.size; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = 0; + while (true) { + if (!(i < (http2dataChunkSizeClasses.$length - 1 >> 0))) { break; } + if ((x$4 = (new $Int64(0, ((i < 0 || i >= http2dataChunkSizeClasses.$length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkSizeClasses.$array[http2dataChunkSizeClasses.$offset + i]))), (size.$high < x$4.$high || (size.$high === x$4.$high && size.$low <= x$4.$low)))) { + break; + } + i = i + (1) >> 0; + } + _r$1 = ((i < 0 || i >= http2dataChunkPools.length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkPools[i]).Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return $assertType(_r$1, sliceType$3); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2getDataBufferChunk }; } $f._r$1 = _r$1; $f.i = i; $f.size = size; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2putDataBufferChunk = function(p) { + var _i, _r$1, _ref, i, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; i = $f.i; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = http2dataChunkSizeClasses; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (p.$length === n) { + ((i < 0 || i >= http2dataChunkPools.length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkPools[i]).Put(p); + $s = -1; return; + } + _i++; + } + _r$1 = fmt.Sprintf("unexpected buffer len=%v", new sliceType([new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2putDataBufferChunk }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.i = i; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2dataBuffer.ptr.prototype.Read = function(p) { + var b, end, n, ntotal, p, readFrom, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; end = $f.end; n = $f.n; ntotal = $f.ntotal; p = $f.p; readFrom = $f.readFrom; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + if (b.size === 0) { + $s = -1; return [0, http2errReadEmpty]; + } + ntotal = 0; + /* while (true) { */ case 1: + /* if (!(p.$length > 0 && b.size > 0)) { break; } */ if(!(p.$length > 0 && b.size > 0)) { $s = 2; continue; } + readFrom = b.bytesFromFirstChunk(); + n = $copySlice(p, readFrom); + p = $subslice(p, n); + ntotal = ntotal + (n) >> 0; + b.r = b.r + (n) >> 0; + b.size = b.size - (n) >> 0; + /* */ if (b.r === (x$4 = b.chunks, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])).$length) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (b.r === (x$4 = b.chunks, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])).$length) { */ case 3: + $r = http2putDataBufferChunk((x$5 = b.chunks, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0]))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + end = b.chunks.$length - 1 >> 0; + $copySlice($subslice(b.chunks, 0, end), $subslice(b.chunks, 1)); + (x$6 = b.chunks, ((end < 0 || end >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + end] = sliceType$3.nil)); + b.chunks = $subslice(b.chunks, 0, end); + b.r = 0; + /* } */ case 4: + /* } */ $s = 1; continue; case 2: + $s = -1; return [ntotal, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2dataBuffer.ptr.prototype.Read }; } $f.b = b; $f.end = end; $f.n = n; $f.ntotal = ntotal; $f.p = p; $f.readFrom = readFrom; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2dataBuffer.prototype.Read = function(p) { return this.$val.Read(p); }; + http2dataBuffer.ptr.prototype.bytesFromFirstChunk = function() { + var b, x$4, x$5; + b = this; + if (b.chunks.$length === 1) { + return $subslice((x$4 = b.chunks, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), b.r, b.w); + } + return $subslice((x$5 = b.chunks, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), b.r); + }; + http2dataBuffer.prototype.bytesFromFirstChunk = function() { return this.$val.bytesFromFirstChunk(); }; + http2dataBuffer.ptr.prototype.Len = function() { + var b; + b = this; + return b.size; + }; + http2dataBuffer.prototype.Len = function() { return this.$val.Len(); }; + http2dataBuffer.ptr.prototype.Write = function(p) { + var _r$1, b, chunk, n, ntotal, p, want, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; b = $f.b; chunk = $f.chunk; n = $f.n; ntotal = $f.ntotal; p = $f.p; want = $f.want; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + ntotal = p.$length; + /* while (true) { */ case 1: + /* if (!(p.$length > 0)) { break; } */ if(!(p.$length > 0)) { $s = 2; continue; } + want = (new $Int64(0, p.$length)); + if ((x$4 = b.expected, (x$4.$high > want.$high || (x$4.$high === want.$high && x$4.$low > want.$low)))) { + want = b.expected; + } + _r$1 = b.lastChunkOrAlloc(want); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + chunk = _r$1; + n = $copySlice($subslice(chunk, b.w), p); + p = $subslice(p, n); + b.w = b.w + (n) >> 0; + b.size = b.size + (n) >> 0; + b.expected = (x$5 = b.expected, x$6 = (new $Int64(0, n)), new $Int64(x$5.$high - x$6.$high, x$5.$low - x$6.$low)); + /* } */ $s = 1; continue; case 2: + $s = -1; return [ntotal, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2dataBuffer.ptr.prototype.Write }; } $f._r$1 = _r$1; $f.b = b; $f.chunk = chunk; $f.n = n; $f.ntotal = ntotal; $f.p = p; $f.want = want; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2dataBuffer.prototype.Write = function(p) { return this.$val.Write(p); }; + http2dataBuffer.ptr.prototype.lastChunkOrAlloc = function(want) { + var _r$1, b, chunk, last, want, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; b = $f.b; chunk = $f.chunk; last = $f.last; want = $f.want; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + if (!((b.chunks.$length === 0))) { + last = (x$4 = b.chunks, x$5 = b.chunks.$length - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])); + if (b.w < last.$length) { + $s = -1; return last; + } + } + _r$1 = http2getDataBufferChunk(want); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + chunk = _r$1; + b.chunks = $append(b.chunks, chunk); + b.w = 0; + $s = -1; return chunk; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2dataBuffer.ptr.prototype.lastChunkOrAlloc }; } $f._r$1 = _r$1; $f.b = b; $f.chunk = chunk; $f.last = last; $f.want = want; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2dataBuffer.prototype.lastChunkOrAlloc = function(want) { return this.$val.lastChunkOrAlloc(want); }; + http2ErrCode.prototype.String = function() { + var _entry, _r$1, _tuple, e, ok, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; e = $f.e; ok = $f.ok; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _tuple = (_entry = http2errCodeName[http2ErrCode.keyFor(e)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return s; + } + _r$1 = fmt.Sprintf("unknown error code 0x%x", new sliceType([new $Uint32(((e >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ErrCode.prototype.String }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.e = e; $f.ok = ok; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2ErrCode).prototype.String = function() { return new http2ErrCode(this.$get()).String(); }; + http2ConnectionError.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$1 = fmt.Sprintf("connection error: %s", new sliceType([new http2ErrCode(((e >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ConnectionError.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2ConnectionError).prototype.Error = function() { return new http2ConnectionError(this.$get()).Error(); }; + http2streamError = function(id, code) { + var code, id; + return new http2StreamError.ptr(id, code, $ifaceNil); + }; + http2StreamError.ptr.prototype.Error = function() { + var _r$1, _r$2, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + /* */ if (!($interfaceIsEqual(e.Cause, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(e.Cause, $ifaceNil))) { */ case 1: + _r$1 = fmt.Sprintf("stream error: stream ID %d; %v; %v", new sliceType([new $Uint32(e.StreamID), new http2ErrCode(e.Code), e.Cause])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + _r$2 = fmt.Sprintf("stream error: stream ID %d; %v", new sliceType([new $Uint32(e.StreamID), new http2ErrCode(e.Code)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2StreamError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + http2StreamError.prototype.Error = function() { return this.$val.Error(); }; + http2goAwayFlowError.ptr.prototype.Error = function() { + return "connection exceeded flow control window size"; + }; + http2goAwayFlowError.prototype.Error = function() { return this.$val.Error(); }; + http2connError.ptr.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$1 = fmt.Sprintf("http2: connection error: %v: %v", new sliceType([new http2ErrCode(e.Code), new $String(e.Reason)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2connError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + http2connError.prototype.Error = function() { return this.$val.Error(); }; + http2pseudoHeaderError.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$1 = fmt.Sprintf("invalid pseudo-header %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2pseudoHeaderError.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2pseudoHeaderError).prototype.Error = function() { return new http2pseudoHeaderError(this.$get()).Error(); }; + http2duplicatePseudoHeaderError.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$1 = fmt.Sprintf("duplicate pseudo-header %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2duplicatePseudoHeaderError.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2duplicatePseudoHeaderError).prototype.Error = function() { return new http2duplicatePseudoHeaderError(this.$get()).Error(); }; + http2headerFieldNameError.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$1 = fmt.Sprintf("invalid header field name %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2headerFieldNameError.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2headerFieldNameError).prototype.Error = function() { return new http2headerFieldNameError(this.$get()).Error(); }; + http2headerFieldValueError.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this.$val; + _r$1 = fmt.Sprintf("invalid header field value %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2headerFieldValueError.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2headerFieldValueError).prototype.Error = function() { return new http2headerFieldValueError(this.$get()).Error(); }; + http2flow.ptr.prototype.setConnFlow = function(cf) { + var cf, f; + f = this; + f.conn = cf; + }; + http2flow.prototype.setConnFlow = function(cf) { return this.$val.setConnFlow(cf); }; + http2flow.ptr.prototype.available = function() { + var f, n; + f = this; + n = f.n; + if (!(f.conn === ptrType$33.nil) && f.conn.n < n) { + n = f.conn.n; + } + return n; + }; + http2flow.prototype.available = function() { return this.$val.available(); }; + http2flow.ptr.prototype.take = function(n) { + var f, n; + f = this; + if (n > f.available()) { + $panic(new $String("internal error: took too much")); + } + f.n = f.n - (n) >> 0; + if (!(f.conn === ptrType$33.nil)) { + f.conn.n = f.conn.n - (n) >> 0; + } + }; + http2flow.prototype.take = function(n) { return this.$val.take(n); }; + http2flow.ptr.prototype.add = function(n) { + var f, n, sum; + f = this; + sum = f.n + n >> 0; + if ((sum > n) === (f.n > 0)) { + f.n = sum; + return true; + } + return false; + }; + http2flow.prototype.add = function(n) { return this.$val.add(n); }; + http2FrameType.prototype.String = function() { + var _entry, _r$1, _tuple, ok, s, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; ok = $f.ok; s = $f.s; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this.$val; + _tuple = (_entry = http2frameName[http2FrameType.keyFor(t)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return s; + } + _r$1 = fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", new sliceType([new $Uint8(((t << 24 >>> 24)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2FrameType.prototype.String }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.ok = ok; $f.s = s; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2FrameType).prototype.String = function() { return new http2FrameType(this.$get()).String(); }; + http2Flags.prototype.Has = function(v) { + var f, v; + f = this.$val; + return (((f & v) >>> 0)) === v; + }; + $ptrType(http2Flags).prototype.Has = function(v) { return new http2Flags(this.$get()).Has(v); }; + http2typeFrameParser = function(t) { + var _entry, f, t; + f = (_entry = http2frameParsers[http2FrameType.keyFor(t)], _entry !== undefined ? _entry.v : $throwNilPointerError); + if (!(f === $throwNilPointerError)) { + return f; + } + return http2parseUnknownFrame; + }; + http2FrameHeader.ptr.prototype.Header = function() { + var h; + h = this; + return h; + }; + http2FrameHeader.prototype.Header = function() { return this.$val.Header(); }; + http2FrameHeader.ptr.prototype.String = function() { + var buf, h, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; buf = $f.buf; h = $f.h; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = [buf]; + h = this; + buf[0] = new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0); + buf[0].WriteString("[FrameHeader "); + $r = $clone(h, http2FrameHeader).writeDebug(buf[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + buf[0].WriteByte(93); + $s = -1; return buf[0].String(); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2FrameHeader.ptr.prototype.String }; } $f.buf = buf; $f.h = h; $f.$s = $s; $f.$r = $r; return $f; + }; + http2FrameHeader.prototype.String = function() { return this.$val.String(); }; + http2FrameHeader.ptr.prototype.writeDebug = function(buf) { + var _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _r$5, buf, h, i, name, set, y, y$1, y$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; buf = $f.buf; h = $f.h; i = $f.i; name = $f.name; set = $f.set; y = $f.y; y$1 = $f.y$1; y$2 = $f.y$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + _r$1 = new http2FrameType(h.Type).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = buf.WriteString(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* */ if (!((h.Flags === 0))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((h.Flags === 0))) { */ case 3: + buf.WriteString(" flags="); + set = 0; + i = 0; + /* while (true) { */ case 5: + /* if (!(i < 8)) { break; } */ if(!(i < 8)) { $s = 6; continue; } + /* */ if (((h.Flags & (((y = i, y < 32 ? (1 << y) : 0) << 24 >>> 24))) >>> 0) === 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (((h.Flags & (((y = i, y < 32 ? (1 << y) : 0) << 24 >>> 24))) >>> 0) === 0) { */ case 7: + i = i + (1) << 24 >>> 24; + /* continue; */ $s = 5; continue; + /* } */ case 8: + set = set + (1) >> 0; + if (set > 1) { + buf.WriteByte(124); + } + name = (_entry = (_entry$1 = http2flagName[http2FrameType.keyFor(h.Type)], _entry$1 !== undefined ? _entry$1.v : false)[http2Flags.keyFor((((y$1 = i, y$1 < 32 ? (1 << y$1) : 0) << 24 >>> 24)))], _entry !== undefined ? _entry.v : ""); + /* */ if (!(name === "")) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(name === "")) { */ case 9: + buf.WriteString(name); + $s = 11; continue; + /* } else { */ case 10: + _r$3 = fmt.Fprintf(buf, "0x%x", new sliceType([new $Int(((y$2 = i, y$2 < 32 ? (1 << y$2) : 0) >> 0))])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 11: + i = i + (1) << 24 >>> 24; + /* } */ $s = 5; continue; case 6: + /* } */ case 4: + /* */ if (!((h.StreamID === 0))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!((h.StreamID === 0))) { */ case 13: + _r$4 = fmt.Fprintf(buf, " stream=%d", new sliceType([new $Uint32(h.StreamID)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 14: + _r$5 = fmt.Fprintf(buf, " len=%d", new sliceType([new $Uint32(h.Length)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2FrameHeader.ptr.prototype.writeDebug }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.buf = buf; $f.h = h; $f.i = i; $f.name = name; $f.set = set; $f.y = y; $f.y$1 = y$1; $f.y$2 = y$2; $f.$s = $s; $f.$r = $r; return $f; + }; + http2FrameHeader.prototype.writeDebug = function(buf) { return this.$val.writeDebug(buf); }; + http2FrameHeader.ptr.prototype.checkValid = function() { + var h; + h = this; + if (!h.valid) { + $panic(new $String("Frame accessor called on non-owned Frame")); + } + }; + http2FrameHeader.prototype.checkValid = function() { return this.$val.checkValid(); }; + http2FrameHeader.ptr.prototype.invalidate = function() { + var h; + h = this; + h.valid = false; + }; + http2FrameHeader.prototype.invalidate = function() { return this.$val.invalidate(); }; + http2readFrameHeader = function(buf, r) { + var _r$1, _tuple, buf, err, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; buf = $f.buf; err = $f.err; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = io.ReadFull(r, $subslice(buf, 0, 9)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new http2FrameHeader.ptr(false, 0, 0, 0, 0), err]; + } + $s = -1; return [new http2FrameHeader.ptr(true, (((3 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 3]) << 24 >>> 24)), (((4 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 4]) << 24 >>> 24)), ((((((((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 2]) >>> 0))) >>> 0), ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, 5)) & 2147483647) >>> 0), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2readFrameHeader }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.ptr.prototype.maxHeaderListSize = function() { + var fr; + fr = this; + if (fr.MaxHeaderListSize === 0) { + return 16777216; + } + return fr.MaxHeaderListSize; + }; + http2Framer.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; + http2Framer.ptr.prototype.startWrite = function(ftype, flags, streamID) { + var f, flags, ftype, streamID; + f = this; + f.wbuf = $append($subslice(f.wbuf, 0, 0), 0, 0, 0, ((ftype << 24 >>> 24)), ((flags << 24 >>> 24)), (((streamID >>> 24 >>> 0) << 24 >>> 24)), (((streamID >>> 16 >>> 0) << 24 >>> 24)), (((streamID >>> 8 >>> 0) << 24 >>> 24)), ((streamID << 24 >>> 24))); + }; + http2Framer.prototype.startWrite = function(ftype, flags, streamID) { return this.$val.startWrite(ftype, flags, streamID); }; + http2Framer.ptr.prototype.endWrite = function() { + var _r$1, _tuple, err, f, length, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; f = $f.f; length = $f.length; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + length = f.wbuf.$length - 9 >> 0; + if (length >= 16777216) { + $s = -1; return http2ErrFrameTooLarge; + } + $unused($append($subslice(f.wbuf, 0, 0), (((length >> 16 >> 0) << 24 >>> 24)), (((length >> 8 >> 0) << 24 >>> 24)), ((length << 24 >>> 24)))); + /* */ if (f.logWrites) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (f.logWrites) { */ case 1: + $r = f.logWrite(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = f.w.Write(f.wbuf); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil) && !((n === f.wbuf.$length))) { + err = io.ErrShortWrite; + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.endWrite }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.length = length; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.endWrite = function() { return this.$val.endWrite(); }; + http2Framer.ptr.prototype.logWrite = function() { + var _arg, _arg$1, _r$1, _r$2, _tuple, err, f, fr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; err = $f.err; f = $f.f; fr = $f.fr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (f.debugFramer === ptrType$34.nil) { + f.debugFramerBuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0); + f.debugFramer = http2NewFramer($ifaceNil, f.debugFramerBuf); + f.debugFramer.logReads = false; + f.debugFramer.AllowIllegalReads = true; + } + f.debugFramerBuf.Write(f.wbuf); + _r$1 = f.debugFramer.ReadFrame(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + fr = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + $r = f.debugWriteLoggerf("http2: Framer %p: failed to decode just-written frame", new sliceType([f])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 3: + _arg = f; + _r$2 = http2summarizeFrame(fr); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$1 = new $String(_r$2); + $r = f.debugWriteLoggerf("http2: Framer %p: wrote %v", new sliceType([_arg, _arg$1])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.logWrite }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.fr = fr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.logWrite = function() { return this.$val.logWrite(); }; + http2Framer.ptr.prototype.writeByte = function(v) { + var f, v; + f = this; + f.wbuf = $append(f.wbuf, v); + }; + http2Framer.prototype.writeByte = function(v) { return this.$val.writeByte(v); }; + http2Framer.ptr.prototype.writeBytes = function(v) { + var f, v; + f = this; + f.wbuf = $appendSlice(f.wbuf, v); + }; + http2Framer.prototype.writeBytes = function(v) { return this.$val.writeBytes(v); }; + http2Framer.ptr.prototype.writeUint16 = function(v) { + var f, v; + f = this; + f.wbuf = $append(f.wbuf, (((v >>> 8 << 16 >>> 16) << 24 >>> 24)), ((v << 24 >>> 24))); + }; + http2Framer.prototype.writeUint16 = function(v) { return this.$val.writeUint16(v); }; + http2Framer.ptr.prototype.writeUint32 = function(v) { + var f, v; + f = this; + f.wbuf = $append(f.wbuf, (((v >>> 24 >>> 0) << 24 >>> 24)), (((v >>> 16 >>> 0) << 24 >>> 24)), (((v >>> 8 >>> 0) << 24 >>> 24)), ((v << 24 >>> 24))); + }; + http2Framer.prototype.writeUint32 = function(v) { return this.$val.writeUint32(v); }; + http2Framer.ptr.prototype.SetReuseFrames = function() { + var fr; + fr = this; + if (!(fr.frameCache === ptrType$35.nil)) { + return; + } + fr.frameCache = new http2frameCache.ptr(new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil)); + }; + http2Framer.prototype.SetReuseFrames = function() { return this.$val.SetReuseFrames(); }; + http2frameCache.ptr.prototype.getDataFrame = function() { + var fc; + fc = this; + if (fc === ptrType$35.nil) { + return new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil); + } + return fc.dataFrame; + }; + http2frameCache.prototype.getDataFrame = function() { return this.$val.getDataFrame(); }; + http2NewFramer = function(w, r) { + var fr, r, w; + fr = new http2Framer.ptr(r, $ifaceNil, $ifaceNil, 0, 0, arrayType$4.zero(), $throwNilPointerError, sliceType$3.nil, 0, w, sliceType$3.nil, false, false, ptrType$36.nil, 0, http2logFrameReads, http2logFrameWrites, ptrType$34.nil, ptrType$37.nil, log.Printf, log.Printf, ptrType$35.nil); + fr.getReadBuf = (function(size) { + var size; + if (fr.readBuf.$capacity >= ((size >> 0))) { + return $subslice(fr.readBuf, 0, size); + } + fr.readBuf = $makeSlice(sliceType$3, size); + return fr.readBuf; + }); + fr.SetMaxReadFrameSize(16777215); + return fr; + }; + http2Framer.ptr.prototype.SetMaxReadFrameSize = function(v) { + var fr, v; + fr = this; + if (v > 16777215) { + v = 16777215; + } + fr.maxReadSize = v; + }; + http2Framer.prototype.SetMaxReadFrameSize = function(v) { return this.$val.SetMaxReadFrameSize(v); }; + http2Framer.ptr.prototype.ErrorDetail = function() { + var fr; + fr = this; + return fr.errDetail; + }; + http2Framer.prototype.ErrorDetail = function() { return this.$val.ErrorDetail(); }; + http2terminalReadFrameError = function(err) { + var _tuple, err, ok; + _tuple = $assertType(err, http2StreamError, true); + ok = _tuple[1]; + if (ok) { + return false; + } + return !($interfaceIsEqual(err, $ifaceNil)); + }; + http2Framer.ptr.prototype.ReadFrame = function() { + var _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _returncast, _tuple, _tuple$1, _tuple$2, _tuple$3, ce, err, err$1, err$2, f, fh, fr, ok, payload, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _returncast = $f._returncast; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; ce = $f.ce; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; f = $f.f; fh = $f.fh; fr = $f.fr; ok = $f.ok; payload = $f.payload; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fr = this; + fr.errDetail = $ifaceNil; + /* */ if (!($interfaceIsEqual(fr.lastFrame, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(fr.lastFrame, $ifaceNil))) { */ case 1: + $r = fr.lastFrame.invalidate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = http2readFrameHeader(new sliceType$3(fr.headerBuf), fr.r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + fh = $clone(_tuple[0], http2FrameHeader); + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + if (fh.Length > fr.maxReadSize) { + $s = -1; return [$ifaceNil, http2ErrFrameTooLarge]; + } + _r$2 = fr.getReadBuf(fh.Length); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + payload = _r$2; + _r$3 = io.ReadFull(fr.r, payload); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$1]; + } + _r$4 = http2typeFrameParser(fh.Type)(fr.frameCache, $clone(fh, http2FrameHeader), payload); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + f = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tuple$3 = $assertType(err, http2connError, true); + ce = $clone(_tuple$3[0], http2connError); + ok = _tuple$3[1]; + if (ok) { + $s = -1; return [$ifaceNil, fr.connError(ce.Code, ce.Reason)]; + } + $s = -1; return [$ifaceNil, err]; + } + _r$5 = fr.checkFrameOrder(f); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$2 = _r$5; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$2]; + } + /* */ if (fr.logReads) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (fr.logReads) { */ case 9: + _arg = fr; + _r$6 = http2summarizeFrame(f); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _arg$1 = new $String(_r$6); + $r = fr.debugReadLoggerf("http2: Framer %p: read %v", new sliceType([_arg, _arg$1])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + /* */ if ((fh.Type === 1) && !(fr.ReadMetaHeaders === ptrType$36.nil)) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if ((fh.Type === 1) && !(fr.ReadMetaHeaders === ptrType$36.nil)) { */ case 13: + _r$7 = fr.readMetaFrame($assertType(f, ptrType$38)); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _returncast = _r$7; + $s = -1; return [_returncast[0], _returncast[1]]; + /* } */ case 14: + $s = -1; return [f, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.ReadFrame }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._returncast = _returncast; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.ce = ce; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.f = f; $f.fh = fh; $f.fr = fr; $f.ok = ok; $f.payload = payload; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.ReadFrame = function() { return this.$val.ReadFrame(); }; + http2Framer.ptr.prototype.connError = function(code, reason) { + var code, fr, reason; + fr = this; + fr.errDetail = errors.New(reason); + return new http2ConnectionError(((code >>> 0))); + }; + http2Framer.prototype.connError = function(code, reason) { return this.$val.connError(code, reason); }; + http2Framer.ptr.prototype.checkFrameOrder = function(f) { + var _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, f, fh, fr, last, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _arg$5 = $f._arg$5; _arg$6 = $f._arg$6; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; f = $f.f; fh = $f.fh; fr = $f.fr; last = $f.last; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + fr = this; + last = fr.lastFrame; + fr.lastFrame = f; + if (fr.AllowIllegalReads) { + $s = -1; return $ifaceNil; + } + _r$1 = f.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + fh = $clone(_r$1, http2FrameHeader); + /* */ if (!((fr.lastHeaderStream === 0))) { $s = 2; continue; } + /* */ if (fh.Type === 9) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((fr.lastHeaderStream === 0))) { */ case 2: + /* */ if (!((fh.Type === 9))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!((fh.Type === 9))) { */ case 5: + _arg = new http2FrameType(fh.Type); + _arg$1 = new $Uint32(fh.StreamID); + _r$2 = last.Header(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$2 = new http2FrameType(_r$2.Type); + _arg$3 = new $Uint32(fr.lastHeaderStream); + _r$3 = fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d", new sliceType([_arg, _arg$1, _arg$2, _arg$3])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$4 = _r$3; + _r$4 = fr.connError(1, _arg$4); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 6: + /* */ if (!((fh.StreamID === fr.lastHeaderStream))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!((fh.StreamID === fr.lastHeaderStream))) { */ case 10: + _r$5 = fmt.Sprintf("got CONTINUATION for stream %d; expected stream %d", new sliceType([new $Uint32(fh.StreamID), new $Uint32(fr.lastHeaderStream)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _arg$5 = _r$5; + _r$6 = fr.connError(1, _arg$5); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 11: + $s = 4; continue; + /* } else if (fh.Type === 9) { */ case 3: + _r$7 = fmt.Sprintf("unexpected CONTINUATION for stream %d", new sliceType([new $Uint32(fh.StreamID)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _arg$6 = _r$7; + _r$8 = fr.connError(1, _arg$6); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return _r$8; + /* } */ case 4: + _1 = fh.Type; + if ((_1 === (1)) || (_1 === (9))) { + if (new http2Flags(fh.Flags).Has(4)) { + fr.lastHeaderStream = 0; + } else { + fr.lastHeaderStream = fh.StreamID; + } + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.checkFrameOrder }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._arg$5 = _arg$5; $f._arg$6 = _arg$6; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f.f = f; $f.fh = fh; $f.fr = fr; $f.last = last; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.checkFrameOrder = function(f) { return this.$val.checkFrameOrder(f); }; + http2DataFrame.ptr.prototype.StreamEnded = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(1); + }; + http2DataFrame.prototype.StreamEnded = function() { return this.$val.StreamEnded(); }; + http2DataFrame.ptr.prototype.Data = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.data; + }; + http2DataFrame.prototype.Data = function() { return this.$val.Data(); }; + http2parseDataFrame = function(fc, fh, payload) { + var _tuple, err, f, fc, fh, padSize, payload, x$4, x$5; + if (fh.StreamID === 0) { + return [$ifaceNil, (x$4 = new http2connError.ptr(1, "DATA frame with stream ID 0"), new x$4.constructor.elem(x$4))]; + } + f = fc.getDataFrame(); + http2FrameHeader.copy(f.http2FrameHeader, fh); + padSize = 0; + if (new http2Flags(fh.Flags).Has(8)) { + err = $ifaceNil; + _tuple = http2readByte(payload); + payload = _tuple[0]; + padSize = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [$ifaceNil, err]; + } + } + if (((padSize >> 0)) > payload.$length) { + return [$ifaceNil, (x$5 = new http2connError.ptr(1, "pad size larger than data payload"), new x$5.constructor.elem(x$5))]; + } + f.data = $subslice(payload, 0, (payload.$length - ((padSize >> 0)) >> 0)); + return [f, $ifaceNil]; + }; + http2validStreamIDOrZero = function(streamID) { + var streamID; + return ((streamID & 2147483648) >>> 0) === 0; + }; + http2validStreamID = function(streamID) { + var streamID; + return !((streamID === 0)) && (((streamID & 2147483648) >>> 0) === 0); + }; + http2Framer.ptr.prototype.WriteData = function(streamID, endStream, data) { + var _r$1, data, endStream, f, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; data = $f.data; endStream = $f.endStream; f = $f.f; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + _r$1 = f.WriteDataPadded(streamID, endStream, data, sliceType$3.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteData }; } $f._r$1 = _r$1; $f.data = data; $f.endStream = endStream; $f.f = f; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteData = function(streamID, endStream, data) { return this.$val.WriteData(streamID, endStream, data); }; + http2Framer.ptr.prototype.WriteDataPadded = function(streamID, endStream, data, pad) { + var _i, _r$1, _ref, b, data, endStream, f, flags, pad, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; b = $f.b; data = $f.data; endStream = $f.endStream; f = $f.f; flags = $f.flags; pad = $f.pad; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + if (pad.$length > 0) { + if (pad.$length > 255) { + $s = -1; return http2errPadLength; + } + if (!f.AllowIllegalWrites) { + _ref = pad; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!((b === 0))) { + $s = -1; return http2errPadBytes; + } + _i++; + } + } + } + flags = 0; + if (endStream) { + flags = (flags | (1)) >>> 0; + } + if (!(pad === sliceType$3.nil)) { + flags = (flags | (8)) >>> 0; + } + f.startWrite(0, flags, streamID); + if (!(pad === sliceType$3.nil)) { + f.wbuf = $append(f.wbuf, ((pad.$length << 24 >>> 24))); + } + f.wbuf = $appendSlice(f.wbuf, data); + f.wbuf = $appendSlice(f.wbuf, pad); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteDataPadded }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.b = b; $f.data = data; $f.endStream = endStream; $f.f = f; $f.flags = flags; $f.pad = pad; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteDataPadded = function(streamID, endStream, data, pad) { return this.$val.WriteDataPadded(streamID, endStream, data, pad); }; + http2parseSettingsFrame = function(param, fh, p) { + var _r$1, _tuple, f, fh, ok, p, param, v; + if (new http2Flags(fh.Flags).Has(1) && fh.Length > 0) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + if (!((fh.StreamID === 0))) { + return [$ifaceNil, new http2ConnectionError(1)]; + } + if (!(((_r$1 = p.$length % 6, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + f = new http2SettingsFrame.ptr($clone(fh, http2FrameHeader), p); + _tuple = f.Value(4); + v = _tuple[0]; + ok = _tuple[1]; + if (ok && v > 2147483647) { + return [$ifaceNil, new http2ConnectionError(3)]; + } + return [f, $ifaceNil]; + }; + http2SettingsFrame.ptr.prototype.IsAck = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(1); + }; + http2SettingsFrame.prototype.IsAck = function() { return this.$val.IsAck(); }; + http2SettingsFrame.ptr.prototype.Value = function(id) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, f, i, id, ok, s, v; + v = 0; + ok = false; + f = this; + f.http2FrameHeader.checkValid(); + i = 0; + while (true) { + if (!(i < f.NumSettings())) { break; } + s = $clone(f.Setting(i), http2Setting); + if (s.ID === id) { + _tmp = s.Val; + _tmp$1 = true; + v = _tmp; + ok = _tmp$1; + return [v, ok]; + } + i = i + (1) >> 0; + } + _tmp$2 = 0; + _tmp$3 = false; + v = _tmp$2; + ok = _tmp$3; + return [v, ok]; + }; + http2SettingsFrame.prototype.Value = function(id) { return this.$val.Value(id); }; + http2SettingsFrame.ptr.prototype.Setting = function(i) { + var buf, f, i; + f = this; + buf = f.p; + return new http2Setting.ptr((($clone(binary.BigEndian, binary.bigEndian).Uint16($subslice(buf, ($imul(i, 6)), (($imul(i, 6)) + 2 >> 0))) << 16 >>> 16)), $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, (($imul(i, 6)) + 2 >> 0), (($imul(i, 6)) + 6 >> 0)))); + }; + http2SettingsFrame.prototype.Setting = function(i) { return this.$val.Setting(i); }; + http2SettingsFrame.ptr.prototype.NumSettings = function() { + var _q, f; + f = this; + return (_q = f.p.$length / 6, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + http2SettingsFrame.prototype.NumSettings = function() { return this.$val.NumSettings(); }; + http2SettingsFrame.ptr.prototype.HasDuplicates = function() { + var _entry, _key, f, i, i$1, id, idi, idj, j, num, seen; + f = this; + num = f.NumSettings(); + if (num === 0) { + return false; + } + if (num < 10) { + i = 0; + while (true) { + if (!(i < num)) { break; } + idi = f.Setting(i).ID; + j = i + 1 >> 0; + while (true) { + if (!(j < num)) { break; } + idj = f.Setting(j).ID; + if (idi === idj) { + return true; + } + j = j + (1) >> 0; + } + i = i + (1) >> 0; + } + return false; + } + seen = $makeMap(http2SettingID.keyFor, []); + i$1 = 0; + while (true) { + if (!(i$1 < num)) { break; } + id = f.Setting(i$1).ID; + if ((_entry = seen[http2SettingID.keyFor(id)], _entry !== undefined ? _entry.v : false)) { + return true; + } + _key = id; (seen || $throwRuntimeError("assignment to entry in nil map"))[http2SettingID.keyFor(_key)] = { k: _key, v: true }; + i$1 = i$1 + (1) >> 0; + } + return false; + }; + http2SettingsFrame.prototype.HasDuplicates = function() { return this.$val.HasDuplicates(); }; + http2SettingsFrame.ptr.prototype.ForeachSetting = function(fn) { + var _r$1, err, f, fn, i, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; f = $f.f; fn = $f.fn; i = $f.i; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + f.http2FrameHeader.checkValid(); + i = 0; + /* while (true) { */ case 1: + /* if (!(i < f.NumSettings())) { break; } */ if(!(i < f.NumSettings())) { $s = 2; continue; } + _r$1 = fn($clone(f.Setting(i), http2Setting)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2SettingsFrame.ptr.prototype.ForeachSetting }; } $f._r$1 = _r$1; $f.err = err; $f.f = f; $f.fn = fn; $f.i = i; $f.$s = $s; $f.$r = $r; return $f; + }; + http2SettingsFrame.prototype.ForeachSetting = function(fn) { return this.$val.ForeachSetting(fn); }; + http2Framer.ptr.prototype.WriteSettings = function(settings) { + var _i, _r$1, _ref, f, s, settings, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; f = $f.f; s = $f.s; settings = $f.settings; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + f.startWrite(4, 0, 0); + _ref = settings; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), http2Setting); + f.writeUint16(((s.ID << 16 >>> 16))); + f.writeUint32(s.Val); + _i++; + } + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteSettings }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.f = f; $f.s = s; $f.settings = settings; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteSettings = function(settings) { return this.$val.WriteSettings(settings); }; + http2Framer.ptr.prototype.WriteSettingsAck = function() { + var _r$1, f, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + f.startWrite(4, 1, 0); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteSettingsAck }; } $f._r$1 = _r$1; $f.f = f; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteSettingsAck = function() { return this.$val.WriteSettingsAck(); }; + http2PingFrame.ptr.prototype.IsAck = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(1); + }; + http2PingFrame.prototype.IsAck = function() { return this.$val.IsAck(); }; + http2parsePingFrame = function(param, fh, payload) { + var f, fh, param, payload; + if (!((payload.$length === 8))) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + if (!((fh.StreamID === 0))) { + return [$ifaceNil, new http2ConnectionError(1)]; + } + f = new http2PingFrame.ptr($clone(fh, http2FrameHeader), arrayType$5.zero()); + $copySlice(new sliceType$3(f.Data), payload); + return [f, $ifaceNil]; + }; + http2Framer.ptr.prototype.WritePing = function(ack, data) { + var _r$1, ack, data, f, flags, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; ack = $f.ack; data = $f.data; f = $f.f; flags = $f.flags; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + flags = 0; + if (ack) { + flags = 1; + } + f.startWrite(6, flags, 0); + f.writeBytes(new sliceType$3(data)); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WritePing }; } $f._r$1 = _r$1; $f.ack = ack; $f.data = data; $f.f = f; $f.flags = flags; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WritePing = function(ack, data) { return this.$val.WritePing(ack, data); }; + http2GoAwayFrame.ptr.prototype.DebugData = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.debugData; + }; + http2GoAwayFrame.prototype.DebugData = function() { return this.$val.DebugData(); }; + http2parseGoAwayFrame = function(param, fh, p) { + var fh, p, param; + if (!((fh.StreamID === 0))) { + return [$ifaceNil, new http2ConnectionError(1)]; + } + if (p.$length < 8) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + return [new http2GoAwayFrame.ptr($clone(fh, http2FrameHeader), ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) & 2147483647) >>> 0, (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 4, 8)) >>> 0)), $subslice(p, 8)), $ifaceNil]; + }; + http2Framer.ptr.prototype.WriteGoAway = function(maxStreamID, code, debugData) { + var _r$1, code, debugData, f, maxStreamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; code = $f.code; debugData = $f.debugData; f = $f.f; maxStreamID = $f.maxStreamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + f.startWrite(7, 0, 0); + f.writeUint32((maxStreamID & 2147483647) >>> 0); + f.writeUint32(((code >>> 0))); + f.writeBytes(debugData); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteGoAway }; } $f._r$1 = _r$1; $f.code = code; $f.debugData = debugData; $f.f = f; $f.maxStreamID = maxStreamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteGoAway = function(maxStreamID, code, debugData) { return this.$val.WriteGoAway(maxStreamID, code, debugData); }; + http2UnknownFrame.ptr.prototype.Payload = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.p; + }; + http2UnknownFrame.prototype.Payload = function() { return this.$val.Payload(); }; + http2parseUnknownFrame = function(param, fh, p) { + var fh, p, param; + return [new http2UnknownFrame.ptr($clone(fh, http2FrameHeader), p), $ifaceNil]; + }; + http2parseWindowUpdateFrame = function(param, fh, p) { + var fh, inc, p, param, x$4; + if (!((p.$length === 4))) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + inc = ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) & 2147483647) >>> 0; + if (inc === 0) { + if (fh.StreamID === 0) { + return [$ifaceNil, new http2ConnectionError(1)]; + } + return [$ifaceNil, (x$4 = http2streamError(fh.StreamID, 1), new x$4.constructor.elem(x$4))]; + } + return [new http2WindowUpdateFrame.ptr($clone(fh, http2FrameHeader), inc), $ifaceNil]; + }; + http2Framer.ptr.prototype.WriteWindowUpdate = function(streamID, incr) { + var _r$1, f, incr, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; incr = $f.incr; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if ((incr < 1 || incr > 2147483647) && !f.AllowIllegalWrites) { + $s = -1; return errors.New("illegal window increment value"); + } + f.startWrite(8, 0, streamID); + f.writeUint32(incr); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteWindowUpdate }; } $f._r$1 = _r$1; $f.f = f; $f.incr = incr; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteWindowUpdate = function(streamID, incr) { return this.$val.WriteWindowUpdate(streamID, incr); }; + http2HeadersFrame.ptr.prototype.HeaderBlockFragment = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.headerFragBuf; + }; + http2HeadersFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; + http2HeadersFrame.ptr.prototype.HeadersEnded = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(4); + }; + http2HeadersFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; + http2HeadersFrame.ptr.prototype.StreamEnded = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(1); + }; + http2HeadersFrame.prototype.StreamEnded = function() { return this.$val.StreamEnded(); }; + http2HeadersFrame.ptr.prototype.HasPriority = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(32); + }; + http2HeadersFrame.prototype.HasPriority = function() { return this.$val.HasPriority(); }; + http2parseHeadersFrame = function(param, fh, p) { + var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, err, fh, hf, p, padLength, param, v, x$4, x$5; + _ = $ifaceNil; + err = $ifaceNil; + hf = new http2HeadersFrame.ptr($clone(fh, http2FrameHeader), new http2PriorityParam.ptr(0, false, 0), sliceType$3.nil); + if (fh.StreamID === 0) { + _tmp = $ifaceNil; + _tmp$1 = (x$4 = new http2connError.ptr(1, "HEADERS frame with stream ID 0"), new x$4.constructor.elem(x$4)); + _ = _tmp; + err = _tmp$1; + return [_, err]; + } + padLength = 0; + if (new http2Flags(fh.Flags).Has(8)) { + _tuple = http2readByte(p); + p = _tuple[0]; + padLength = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [_, err]; + } + } + if (new http2Flags(fh.Flags).Has(32)) { + v = 0; + _tuple$1 = http2readUint32(p); + p = _tuple$1[0]; + v = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = $ifaceNil; + _tmp$3 = err; + _ = _tmp$2; + err = _tmp$3; + return [_, err]; + } + hf.Priority.StreamDep = (v & 2147483647) >>> 0; + hf.Priority.Exclusive = !((v === hf.Priority.StreamDep)); + _tuple$2 = http2readByte(p); + p = _tuple$2[0]; + hf.Priority.Weight = _tuple$2[1]; + err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$4 = $ifaceNil; + _tmp$5 = err; + _ = _tmp$4; + err = _tmp$5; + return [_, err]; + } + } + if ((p.$length - ((padLength >> 0)) >> 0) <= 0) { + _tmp$6 = $ifaceNil; + _tmp$7 = (x$5 = http2streamError(fh.StreamID, 1), new x$5.constructor.elem(x$5)); + _ = _tmp$6; + err = _tmp$7; + return [_, err]; + } + hf.headerFragBuf = $subslice(p, 0, (p.$length - ((padLength >> 0)) >> 0)); + _tmp$8 = hf; + _tmp$9 = $ifaceNil; + _ = _tmp$8; + err = _tmp$9; + return [_, err]; + }; + http2Framer.ptr.prototype.WriteHeaders = function(p) { + var _r$1, f, flags, p, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; flags = $f.flags; p = $f.p; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(p.StreamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + flags = 0; + if (!((p.PadLength === 0))) { + flags = (flags | (8)) >>> 0; + } + if (p.EndStream) { + flags = (flags | (1)) >>> 0; + } + if (p.EndHeaders) { + flags = (flags | (4)) >>> 0; + } + if (!$clone(p.Priority, http2PriorityParam).IsZero()) { + flags = (flags | (32)) >>> 0; + } + f.startWrite(1, flags, p.StreamID); + if (!((p.PadLength === 0))) { + f.writeByte(p.PadLength); + } + if (!$clone(p.Priority, http2PriorityParam).IsZero()) { + v = p.Priority.StreamDep; + if (!http2validStreamIDOrZero(v) && !f.AllowIllegalWrites) { + $s = -1; return http2errDepStreamID; + } + if (p.Priority.Exclusive) { + v = (v | (2147483648)) >>> 0; + } + f.writeUint32(v); + f.writeByte(p.Priority.Weight); + } + f.wbuf = $appendSlice(f.wbuf, p.BlockFragment); + f.wbuf = $appendSlice(f.wbuf, $subslice(http2padZeros, 0, p.PadLength)); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteHeaders }; } $f._r$1 = _r$1; $f.f = f; $f.flags = flags; $f.p = p; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteHeaders = function(p) { return this.$val.WriteHeaders(p); }; + http2PriorityParam.ptr.prototype.IsZero = function() { + var p; + p = this; + return $equal(p, new http2PriorityParam.ptr(0, false, 0), http2PriorityParam); + }; + http2PriorityParam.prototype.IsZero = function() { return this.$val.IsZero(); }; + http2parsePriorityFrame = function(param, fh, payload) { + var _r$1, fh, param, payload, streamID, v, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; fh = $f.fh; param = $f.param; payload = $f.payload; streamID = $f.streamID; v = $f.v; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (fh.StreamID === 0) { + $s = -1; return [$ifaceNil, (x$4 = new http2connError.ptr(1, "PRIORITY frame with stream ID 0"), new x$4.constructor.elem(x$4))]; + } + /* */ if (!((payload.$length === 5))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((payload.$length === 5))) { */ case 1: + _r$1 = fmt.Sprintf("PRIORITY frame payload size was %d; want 5", new sliceType([new $Int(payload.$length)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, (x$5 = new http2connError.ptr(6, _r$1), new x$5.constructor.elem(x$5))]; + /* } */ case 2: + v = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(payload, 0, 4)); + streamID = (v & 2147483647) >>> 0; + $s = -1; return [new http2PriorityFrame.ptr($clone(fh, http2FrameHeader), new http2PriorityParam.ptr(streamID, !((streamID === v)), (4 >= payload.$length ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + 4]))), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2parsePriorityFrame }; } $f._r$1 = _r$1; $f.fh = fh; $f.param = param; $f.payload = payload; $f.streamID = streamID; $f.v = v; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.ptr.prototype.WritePriority = function(streamID, p) { + var _r$1, f, p, streamID, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; p = $f.p; streamID = $f.streamID; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + if (!http2validStreamIDOrZero(p.StreamDep)) { + $s = -1; return http2errDepStreamID; + } + f.startWrite(2, 0, streamID); + v = p.StreamDep; + if (p.Exclusive) { + v = (v | (2147483648)) >>> 0; + } + f.writeUint32(v); + f.writeByte(p.Weight); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WritePriority }; } $f._r$1 = _r$1; $f.f = f; $f.p = p; $f.streamID = streamID; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WritePriority = function(streamID, p) { return this.$val.WritePriority(streamID, p); }; + http2parseRSTStreamFrame = function(param, fh, p) { + var fh, p, param; + if (!((p.$length === 4))) { + return [$ifaceNil, new http2ConnectionError(6)]; + } + if (fh.StreamID === 0) { + return [$ifaceNil, new http2ConnectionError(1)]; + } + return [new http2RSTStreamFrame.ptr($clone(fh, http2FrameHeader), (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) >>> 0))), $ifaceNil]; + }; + http2Framer.ptr.prototype.WriteRSTStream = function(streamID, code) { + var _r$1, code, f, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; code = $f.code; f = $f.f; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + f.startWrite(3, 0, streamID); + f.writeUint32(((code >>> 0))); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteRSTStream }; } $f._r$1 = _r$1; $f.code = code; $f.f = f; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteRSTStream = function(streamID, code) { return this.$val.WriteRSTStream(streamID, code); }; + http2parseContinuationFrame = function(param, fh, p) { + var fh, p, param, x$4; + if (fh.StreamID === 0) { + return [$ifaceNil, (x$4 = new http2connError.ptr(1, "CONTINUATION frame with stream ID 0"), new x$4.constructor.elem(x$4))]; + } + return [new http2ContinuationFrame.ptr($clone(fh, http2FrameHeader), p), $ifaceNil]; + }; + http2ContinuationFrame.ptr.prototype.HeaderBlockFragment = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.headerFragBuf; + }; + http2ContinuationFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; + http2ContinuationFrame.ptr.prototype.HeadersEnded = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(4); + }; + http2ContinuationFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; + http2Framer.ptr.prototype.WriteContinuation = function(streamID, endHeaders, headerBlockFragment) { + var _r$1, endHeaders, f, flags, headerBlockFragment, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; endHeaders = $f.endHeaders; f = $f.f; flags = $f.flags; headerBlockFragment = $f.headerBlockFragment; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + flags = 0; + if (endHeaders) { + flags = (flags | (4)) >>> 0; + } + f.startWrite(9, flags, streamID); + f.wbuf = $appendSlice(f.wbuf, headerBlockFragment); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteContinuation }; } $f._r$1 = _r$1; $f.endHeaders = endHeaders; $f.f = f; $f.flags = flags; $f.headerBlockFragment = headerBlockFragment; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteContinuation = function(streamID, endHeaders, headerBlockFragment) { return this.$val.WriteContinuation(streamID, endHeaders, headerBlockFragment); }; + http2PushPromiseFrame.ptr.prototype.HeaderBlockFragment = function() { + var f; + f = this; + f.http2FrameHeader.checkValid(); + return f.headerFragBuf; + }; + http2PushPromiseFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; + http2PushPromiseFrame.ptr.prototype.HeadersEnded = function() { + var f; + f = this; + return new http2Flags(f.http2FrameHeader.Flags).Has(4); + }; + http2PushPromiseFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; + http2parsePushPromise = function(param, fh, p) { + var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, err, fh, p, padLength, param, pp; + _ = $ifaceNil; + err = $ifaceNil; + pp = new http2PushPromiseFrame.ptr($clone(fh, http2FrameHeader), 0, sliceType$3.nil); + if (pp.http2FrameHeader.StreamID === 0) { + _tmp = $ifaceNil; + _tmp$1 = new http2ConnectionError(1); + _ = _tmp; + err = _tmp$1; + return [_, err]; + } + padLength = 0; + if (new http2Flags(fh.Flags).Has(8)) { + _tuple = http2readByte(p); + p = _tuple[0]; + padLength = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [_, err]; + } + } + _tuple$1 = http2readUint32(p); + p = _tuple$1[0]; + pp.PromiseID = _tuple$1[1]; + err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [_, err]; + } + pp.PromiseID = (pp.PromiseID & 2147483647) >>> 0; + if (((padLength >> 0)) > p.$length) { + _tmp$2 = $ifaceNil; + _tmp$3 = new http2ConnectionError(1); + _ = _tmp$2; + err = _tmp$3; + return [_, err]; + } + pp.headerFragBuf = $subslice(p, 0, (p.$length - ((padLength >> 0)) >> 0)); + _tmp$4 = pp; + _tmp$5 = $ifaceNil; + _ = _tmp$4; + err = _tmp$5; + return [_, err]; + }; + http2Framer.ptr.prototype.WritePushPromise = function(p) { + var _r$1, f, flags, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; flags = $f.flags; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + if (!http2validStreamID(p.StreamID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + flags = 0; + if (!((p.PadLength === 0))) { + flags = (flags | (8)) >>> 0; + } + if (p.EndHeaders) { + flags = (flags | (4)) >>> 0; + } + f.startWrite(5, flags, p.StreamID); + if (!((p.PadLength === 0))) { + f.writeByte(p.PadLength); + } + if (!http2validStreamID(p.PromiseID) && !f.AllowIllegalWrites) { + $s = -1; return http2errStreamID; + } + f.writeUint32(p.PromiseID); + f.wbuf = $appendSlice(f.wbuf, p.BlockFragment); + f.wbuf = $appendSlice(f.wbuf, $subslice(http2padZeros, 0, p.PadLength)); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WritePushPromise }; } $f._r$1 = _r$1; $f.f = f; $f.flags = flags; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WritePushPromise = function(p) { return this.$val.WritePushPromise(p); }; + http2Framer.ptr.prototype.WriteRawFrame = function(t, flags, streamID, payload) { + var _r$1, f, flags, payload, streamID, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; f = $f.f; flags = $f.flags; payload = $f.payload; streamID = $f.streamID; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this; + f.startWrite(t, flags, streamID); + f.writeBytes(payload); + _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.WriteRawFrame }; } $f._r$1 = _r$1; $f.f = f; $f.flags = flags; $f.payload = payload; $f.streamID = streamID; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Framer.prototype.WriteRawFrame = function(t, flags, streamID, payload) { return this.$val.WriteRawFrame(t, flags, streamID, payload); }; + http2readByte = function(p) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, err, p, remain; + remain = sliceType$3.nil; + b = 0; + err = $ifaceNil; + if (p.$length === 0) { + _tmp = sliceType$3.nil; + _tmp$1 = 0; + _tmp$2 = io.ErrUnexpectedEOF; + remain = _tmp; + b = _tmp$1; + err = _tmp$2; + return [remain, b, err]; + } + _tmp$3 = $subslice(p, 1); + _tmp$4 = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]); + _tmp$5 = $ifaceNil; + remain = _tmp$3; + b = _tmp$4; + err = _tmp$5; + return [remain, b, err]; + }; + http2readUint32 = function(p) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err, p, remain, v; + remain = sliceType$3.nil; + v = 0; + err = $ifaceNil; + if (p.$length < 4) { + _tmp = sliceType$3.nil; + _tmp$1 = 0; + _tmp$2 = io.ErrUnexpectedEOF; + remain = _tmp; + v = _tmp$1; + err = _tmp$2; + return [remain, v, err]; + } + _tmp$3 = $subslice(p, 4); + _tmp$4 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)); + _tmp$5 = $ifaceNil; + remain = _tmp$3; + v = _tmp$4; + err = _tmp$5; + return [remain, v, err]; + }; + http2MetaHeadersFrame.ptr.prototype.PseudoValue = function(pseudo) { + var _i, _ref, hf, mh, pseudo; + mh = this; + _ref = mh.Fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + if (!$clone(hf, hpack.HeaderField).IsPseudo()) { + return ""; + } + if ($substring(hf.Name, 1) === pseudo) { + return hf.Value; + } + _i++; + } + return ""; + }; + http2MetaHeadersFrame.prototype.PseudoValue = function(pseudo) { return this.$val.PseudoValue(pseudo); }; + http2MetaHeadersFrame.ptr.prototype.RegularFields = function() { + var _i, _ref, hf, i, mh; + mh = this; + _ref = mh.Fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + if (!$clone(hf, hpack.HeaderField).IsPseudo()) { + return $subslice(mh.Fields, i); + } + _i++; + } + return sliceType$15.nil; + }; + http2MetaHeadersFrame.prototype.RegularFields = function() { return this.$val.RegularFields(); }; + http2MetaHeadersFrame.ptr.prototype.PseudoFields = function() { + var _i, _ref, hf, i, mh; + mh = this; + _ref = mh.Fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + if (!$clone(hf, hpack.HeaderField).IsPseudo()) { + return $subslice(mh.Fields, 0, i); + } + _i++; + } + return mh.Fields; + }; + http2MetaHeadersFrame.prototype.PseudoFields = function() { return this.$val.PseudoFields(); }; + http2MetaHeadersFrame.ptr.prototype.checkPseudos = function() { + var _1, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, hf, hf2, i, isRequest, isResponse, mh, pf; + mh = this; + _tmp = false; + _tmp$1 = false; + isRequest = _tmp; + isResponse = _tmp$1; + pf = mh.PseudoFields(); + _ref = pf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + _1 = hf.Name; + if (_1 === (":method") || _1 === (":path") || _1 === (":scheme") || _1 === (":authority")) { + isRequest = true; + } else if (_1 === (":status")) { + isResponse = true; + } else { + return new http2pseudoHeaderError((hf.Name)); + } + _ref$1 = $subslice(pf, 0, i); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + hf2 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), hpack.HeaderField); + if (hf.Name === hf2.Name) { + return new http2duplicatePseudoHeaderError((hf.Name)); + } + _i$1++; + } + _i++; + } + if (isRequest && isResponse) { + return http2errMixPseudoHeaderTypes; + } + return $ifaceNil; + }; + http2MetaHeadersFrame.prototype.checkPseudos = function() { return this.$val.checkPseudos(); }; + http2Framer.ptr.prototype.maxHeaderStringLen = function() { + var fr, v; + fr = this; + v = fr.maxHeaderListSize(); + if (((((v >> 0)) >>> 0)) === v) { + return ((v >> 0)); + } + return 0; + }; + http2Framer.prototype.maxHeaderStringLen = function() { return this.$val.maxHeaderStringLen(); }; + http2Framer.ptr.prototype.readMetaFrame = function(hf) { + var _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, err, err$1, err$2, err$3, f, fr, frag, hc, hdec, hf, invalid, mh, remainSize, sawRegular, x$4, x$5, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; f = $f.f; fr = $f.fr; frag = $f.frag; hc = $f.hc; hdec = $f.hdec; hf = $f.hf; invalid = $f.invalid; mh = $f.mh; remainSize = $f.remainSize; sawRegular = $f.sawRegular; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + fr = [fr]; + hdec = [hdec]; + invalid = [invalid]; + mh = [mh]; + remainSize = [remainSize]; + sawRegular = [sawRegular]; + fr[0] = this; + if (fr[0].AllowIllegalReads) { + $s = -1; return [ptrType$39.nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")]; + } + mh[0] = new http2MetaHeadersFrame.ptr(hf, sliceType$15.nil, false); + remainSize[0] = fr[0].maxHeaderListSize(); + sawRegular[0] = false; + invalid[0] = $ifaceNil; + hdec[0] = fr[0].ReadMetaHeaders; + hdec[0].SetEmitEnabled(true); + hdec[0].SetMaxStringLength(fr[0].maxHeaderStringLen()); + hdec[0].SetEmitFunc((function(fr, hdec, invalid, mh, remainSize, sawRegular) { return function $b(hf$1) { + var hf$1, isPseudo, size, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; hf$1 = $f.hf$1; isPseudo = $f.isPseudo; size = $f.size; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (http2VerboseLogs && fr[0].logReads) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs && fr[0].logReads) { */ case 1: + $r = fr[0].debugReadLoggerf("http2: decoded hpack field %+v", new sliceType([new hf$1.constructor.elem(hf$1)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!httpguts.ValidHeaderFieldValue(hf$1.Value)) { + invalid[0] = new http2headerFieldValueError((hf$1.Value)); + } + isPseudo = strings.HasPrefix(hf$1.Name, ":"); + if (isPseudo) { + if (sawRegular[0]) { + invalid[0] = http2errPseudoAfterRegular; + } + } else { + sawRegular[0] = true; + if (!http2validWireHeaderFieldName(hf$1.Name)) { + invalid[0] = new http2headerFieldNameError((hf$1.Name)); + } + } + if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { + hdec[0].SetEmitEnabled(false); + $s = -1; return; + } + size = $clone(hf$1, hpack.HeaderField).Size(); + if (size > remainSize[0]) { + hdec[0].SetEmitEnabled(false); + mh[0].Truncated = true; + $s = -1; return; + } + remainSize[0] = remainSize[0] - (size) >>> 0; + mh[0].Fields = $append(mh[0].Fields, hf$1); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.hf$1 = hf$1; $f.isPseudo = isPseudo; $f.size = size; $f.$s = $s; $f.$r = $r; return $f; + }; })(fr, hdec, invalid, mh, remainSize, sawRegular)); + $deferred.push([$methodVal(hdec[0], "SetEmitFunc"), [(function(fr, hdec, invalid, mh, remainSize, sawRegular) { return function(hf$1) { + var hf$1; + }; })(fr, hdec, invalid, mh, remainSize, sawRegular)]]); + hc = hf; + /* while (true) { */ case 1: + _r$1 = hc.HeaderBlockFragment(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + frag = _r$1; + _r$2 = hdec[0].Write(frag); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$39.nil, new http2ConnectionError(9)]; + } + _r$3 = hc.HeadersEnded(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_r$3) { */ case 5: + /* break; */ $s = 2; continue; + /* } */ case 6: + _r$4 = fr[0].ReadFrame(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + f = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$39.nil, err$1]; + } else { + hc = $assertType(f, ptrType$40); + } + /* } */ $s = 1; continue; case 2: + mh[0].http2HeadersFrame.headerFragBuf = sliceType$3.nil; + mh[0].http2HeadersFrame.http2FrameHeader.invalidate(); + err$2 = hdec[0].Close(); + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [ptrType$39.nil, new http2ConnectionError(9)]; + } + /* */ if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { */ case 9: + fr[0].errDetail = invalid[0]; + /* */ if (http2VerboseLogs) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (http2VerboseLogs) { */ case 11: + $r = log.Printf("http2: invalid header: %v", new sliceType([invalid[0]])); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + $s = -1; return [ptrType$39.nil, (x$4 = new http2StreamError.ptr(mh[0].http2HeadersFrame.http2FrameHeader.StreamID, 1, invalid[0]), new x$4.constructor.elem(x$4))]; + /* } */ case 10: + err$3 = mh[0].checkPseudos(); + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 14: + fr[0].errDetail = err$3; + /* */ if (http2VerboseLogs) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (http2VerboseLogs) { */ case 16: + $r = log.Printf("http2: invalid pseudo headers: %v", new sliceType([err$3])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + $s = -1; return [ptrType$39.nil, (x$5 = new http2StreamError.ptr(mh[0].http2HeadersFrame.http2FrameHeader.StreamID, 1, err$3), new x$5.constructor.elem(x$5))]; + /* } */ case 15: + $s = -1; return [mh[0], $ifaceNil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType$39.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2Framer.ptr.prototype.readMetaFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.f = f; $f.fr = fr; $f.frag = frag; $f.hc = hc; $f.hdec = hdec; $f.hf = hf; $f.invalid = invalid; $f.mh = mh; $f.remainSize = remainSize; $f.sawRegular = sawRegular; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2Framer.prototype.readMetaFrame = function(hf) { return this.$val.readMetaFrame(hf); }; + http2summarizeFrame = function(f) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, buf, data, f, f$1, f$2, f$3, f$4, f$5, f$6, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _ref = $f._ref; buf = $f.buf; data = $f.data; f = $f.f; f$1 = $f.f$1; f$2 = $f.f$2; f$3 = $f.f$3; f$4 = $f.f$4; f$5 = $f.f$5; f$6 = $f.f$6; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = [buf]; + n = [n]; + buf[0] = new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0); + _r$1 = f.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = $clone(_r$1, http2FrameHeader).writeDebug(buf[0]); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = f; + /* */ if ($assertType(_ref, ptrType$41, true)[1]) { $s = 3; continue; } + /* */ if ($assertType(_ref, ptrType$42, true)[1]) { $s = 4; continue; } + /* */ if ($assertType(_ref, ptrType$43, true)[1]) { $s = 5; continue; } + /* */ if ($assertType(_ref, ptrType$44, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref, ptrType$45, true)[1]) { $s = 7; continue; } + /* */ if ($assertType(_ref, ptrType$46, true)[1]) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($assertType(_ref, ptrType$41, true)[1]) { */ case 3: + f$1 = _ref.$val; + n[0] = 0; + _r$2 = f$1.ForeachSetting((function(buf, n) { return function $b(s) { + var _r$2, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n[0] = n[0] + (1) >> 0; + if (n[0] === 1) { + buf[0].WriteString(", settings:"); + } + _r$2 = fmt.Fprintf(buf[0], " %v=%v,", new sliceType([new http2SettingID(s.ID), new $Uint32(s.Val)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; })(buf, n)); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + if (n[0] > 0) { + buf[0].Truncate(buf[0].Len() - 1 >> 0); + } + $s = 9; continue; + /* } else if ($assertType(_ref, ptrType$42, true)[1]) { */ case 4: + f$2 = _ref.$val; + data = f$2.Data(); + if (data.$length > 256) { + data = $subslice(data, 0, 256); + } + _r$3 = fmt.Fprintf(buf[0], " data=%q", new sliceType([data])); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* */ if (f$2.Data().$length > 256) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (f$2.Data().$length > 256) { */ case 12: + _r$4 = fmt.Fprintf(buf[0], " (%d bytes omitted)", new sliceType([new $Int((f$2.Data().$length - 256 >> 0))])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 13: + $s = 9; continue; + /* } else if ($assertType(_ref, ptrType$43, true)[1]) { */ case 5: + f$3 = _ref.$val; + if (f$3.http2FrameHeader.StreamID === 0) { + buf[0].WriteString(" (conn)"); + } + _r$5 = fmt.Fprintf(buf[0], " incr=%v", new sliceType([new $Uint32(f$3.Increment)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $s = 9; continue; + /* } else if ($assertType(_ref, ptrType$44, true)[1]) { */ case 6: + f$4 = _ref.$val; + _r$6 = fmt.Fprintf(buf[0], " ping=%q", new sliceType([new sliceType$3(f$4.Data)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = 9; continue; + /* } else if ($assertType(_ref, ptrType$45, true)[1]) { */ case 7: + f$5 = _ref.$val; + _r$7 = fmt.Fprintf(buf[0], " LastStreamID=%v ErrCode=%v Debug=%q", new sliceType([new $Uint32(f$5.LastStreamID), new http2ErrCode(f$5.ErrCode), f$5.debugData])); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + $s = 9; continue; + /* } else if ($assertType(_ref, ptrType$46, true)[1]) { */ case 8: + f$6 = _ref.$val; + _r$8 = fmt.Fprintf(buf[0], " ErrCode=%v", new sliceType([new http2ErrCode(f$6.ErrCode)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + /* } */ case 9: + $s = -1; return buf[0].String(); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2summarizeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._ref = _ref; $f.buf = buf; $f.data = data; $f.f = f; $f.f$1 = f$1; $f.f$2 = f$2; $f.f$3 = f$3; $f.f$4 = f$4; $f.f$5 = f$5; $f.f$6 = f$6; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceHasWroteHeaderField = function(trace) { + var trace; + return !(trace === ptrType$47.nil) && !(trace.WroteHeaderField === $throwNilPointerError); + }; + http2traceWroteHeaderField = function(trace, k, v) { + var k, trace, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; k = $f.k; trace = $f.trace; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 1: + $r = trace.WroteHeaderField(k, new sliceType$1([v])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceWroteHeaderField }; } $f.k = k; $f.trace = trace; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceGot1xxResponseFunc = function(trace) { + var trace; + if (!(trace === ptrType$47.nil)) { + return trace.Got1xxResponse; + } + return $throwNilPointerError; + }; + http2transportExpectContinueTimeout = function(t1) { + var t1; + return t1.ExpectContinueTimeout; + }; + http2serverConnBaseContext = function(c, opts) { + var _arg, _arg$1, _arg$2, _r$1, _r$2, _r$3, _r$4, _tuple, c, cancel, ctx, hs, opts, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; c = $f.c; cancel = $f.cancel; ctx = $f.ctx; hs = $f.hs; opts = $f.opts; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ctx = $ifaceNil; + cancel = $throwNilPointerError; + _r$1 = context.WithCancel(context.Background()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + ctx = _tuple[0]; + cancel = _tuple[1]; + _arg = ctx; + _arg$1 = $pkg.LocalAddrContextKey; + _r$2 = c.LocalAddr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$2 = _r$2; + _r$3 = context.WithValue(_arg, _arg$1, _arg$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + ctx = _r$3; + hs = opts.baseConfig(); + /* */ if (!(hs === ptrType$48.nil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(hs === ptrType$48.nil)) { */ case 4: + _r$4 = context.WithValue(ctx, $pkg.ServerContextKey, hs); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + ctx = _r$4; + /* } */ case 5: + $s = -1; return [ctx, cancel]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConnBaseContext }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.c = c; $f.cancel = cancel; $f.ctx = ctx; $f.hs = hs; $f.opts = opts; $f.$s = $s; $f.$r = $r; return $f; + }; + http2contextWithCancel = function(ctx) { + var _, _r$1, _tuple, cancel, ctx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ = $f._; _r$1 = $f._r$1; _tuple = $f._tuple; cancel = $f.cancel; ctx = $f.ctx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ = $ifaceNil; + cancel = $throwNilPointerError; + _r$1 = context.WithCancel(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + _ = _tuple[0]; + cancel = _tuple[1]; + $s = -1; return [_, cancel]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2contextWithCancel }; } $f._ = _; $f._r$1 = _r$1; $f._tuple = _tuple; $f.cancel = cancel; $f.ctx = ctx; $f.$s = $s; $f.$r = $r; return $f; + }; + http2requestWithContext = function(req, ctx) { + var ctx, req; + return req.WithContext(ctx); + }; + http2reqContext = function(r) { + var r; + return r.Context(); + }; + http2Transport.ptr.prototype.idleConnTimeout = function() { + var t; + t = this; + if (!(t.t1 === ptrType$21.nil)) { + return t.t1.IdleConnTimeout; + } + return new time.Duration(0, 0); + }; + http2Transport.prototype.idleConnTimeout = function() { return this.$val.idleConnTimeout(); }; + http2setResponseUncompressed = function(res) { + var res; + res.Uncompressed = true; + }; + http2traceGetConn = function(req, hostPort) { + var _r$1, hostPort, req, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; hostPort = $f.hostPort; req = $f.req; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = httptrace.ContextClientTrace(req.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace = _r$1; + if (trace === ptrType$49.nil || trace.GetConn === $throwNilPointerError) { + $s = -1; return; + } + $r = trace.GetConn(hostPort); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceGetConn }; } $f._r$1 = _r$1; $f.hostPort = hostPort; $f.req = req; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceGotConn = function(req, cc) { + var _r$1, cc, ci, req, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; ci = $f.ci; req = $f.req; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = httptrace.ContextClientTrace(req.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace = _r$1; + if (trace === ptrType$49.nil || trace.GotConn === $throwNilPointerError) { + $s = -1; return; + } + ci = new httptrace.GotConnInfo.ptr(cc.tconn, false, false, new time.Duration(0, 0)); + $r = cc.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ci.Reused = cc.nextStreamID > 1; + ci.WasIdle = ($keys(cc.streams).length === 0) && ci.Reused; + if (ci.WasIdle && !$clone(cc.lastActive, time.Time).IsZero()) { + ci.IdleTime = $clone(time.Now(), time.Time).Sub($clone(cc.lastActive, time.Time)); + } + $r = cc.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = trace.GotConn($clone(ci, httptrace.GotConnInfo)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceGotConn }; } $f._r$1 = _r$1; $f.cc = cc; $f.ci = ci; $f.req = req; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceWroteHeaders = function(trace) { + var trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.WroteHeaders === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.WroteHeaders === $throwNilPointerError)) { */ case 1: + $r = trace.WroteHeaders(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceWroteHeaders }; } $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceGot100Continue = function(trace) { + var trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.Got100Continue === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.Got100Continue === $throwNilPointerError)) { */ case 1: + $r = trace.Got100Continue(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceGot100Continue }; } $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceWait100Continue = function(trace) { + var trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.Wait100Continue === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.Wait100Continue === $throwNilPointerError)) { */ case 1: + $r = trace.Wait100Continue(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceWait100Continue }; } $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceWroteRequest = function(trace, err) { + var err, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.WroteRequest === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.WroteRequest === $throwNilPointerError)) { */ case 1: + $r = trace.WroteRequest(new httptrace.WroteRequestInfo.ptr(err)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceWroteRequest }; } $f.err = err; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2traceFirstResponseByte = function(trace) { + var trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace === ptrType$47.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$47.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { */ case 1: + $r = trace.GotFirstResponseByte(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2traceFirstResponseByte }; } $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2requestTrace = function(req) { + var _r$1, req, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; req = $f.req; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = httptrace.ContextClientTrace(req.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace = _r$1; + $s = -1; return ($pointerOfStructConversion(trace, ptrType$47)); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2requestTrace }; } $f._r$1 = _r$1; $f.req = req; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.ptr.prototype.Ping = function(ctx) { + var _r$1, cc, ctx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; ctx = $f.ctx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + _r$1 = cc.ping(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.Ping }; } $f._r$1 = _r$1; $f.cc = cc; $f.ctx = ctx; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.Ping = function(ctx) { return this.$val.Ping(ctx); }; + http2ClientConn.ptr.prototype.Shutdown = function(ctx) { + var _r$1, cc, ctx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; ctx = $f.ctx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + _r$1 = cc.shutdown(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.Shutdown }; } $f._r$1 = _r$1; $f.cc = cc; $f.ctx = ctx; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.Shutdown = function(ctx) { return this.$val.Shutdown(ctx); }; + http2cloneTLSConfig = function(c) { + var _r$1, c, c2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; c2 = $f.c2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = c.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + c2 = _r$1; + c2.GetClientCertificate = c.GetClientCertificate; + $s = -1; return c2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2cloneTLSConfig }; } $f._r$1 = _r$1; $f.c = c; $f.c2 = c2; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.ptr.prototype.Push = function(target, opts) { + var _r$1, internalOpts, opts, target, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; internalOpts = $f.internalOpts; opts = $f.opts; target = $f.target; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + internalOpts = new http2pushOptions.ptr("", false); + if (!(opts === ptrType$50.nil)) { + internalOpts.Method = opts.Method; + internalOpts.Header = opts.Header; + } + _r$1 = w.push(target, $clone(internalOpts, http2pushOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.Push }; } $f._r$1 = _r$1; $f.internalOpts = internalOpts; $f.opts = opts; $f.target = target; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.Push = function(target, opts) { return this.$val.Push(target, opts); }; + http2configureServer18 = function(h1, h2) { + var h1, h2, x$4, x$5; + if ((x$4 = h2.IdleTimeout, (x$4.$high === 0 && x$4.$low === 0))) { + if (!((x$5 = h1.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { + h2.IdleTimeout = h1.IdleTimeout; + } else { + h2.IdleTimeout = h1.ReadTimeout; + } + } + return $ifaceNil; + }; + http2shouldLogPanic = function(panicValue) { + var panicValue; + return !($interfaceIsEqual(panicValue, $ifaceNil)) && !($interfaceIsEqual(panicValue, $pkg.ErrAbortHandler)); + }; + http2reqGetBody = function(req) { + var req; + return req.GetBody; + }; + http2reqBodyIsNoBody = function(body$1) { + var body$1; + return $interfaceIsEqual(body$1, new $pkg.NoBody.constructor.elem($pkg.NoBody)); + }; + http2configureServer19 = function(s, conf) { + var conf, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; conf = $f.conf; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = s.RegisterOnShutdown($methodVal(conf.state, "startGracefulShutdown")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2configureServer19 }; } $f.conf = conf; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + http2newGoroutineLock = function() { + var _r$1, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (!http2DebugGoroutines) { + $s = -1; return new http2goroutineLock(0, 0); + } + _r$1 = http2curGoroutineID(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return ((x$4 = _r$1, new http2goroutineLock(x$4.$high, x$4.$low))); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2newGoroutineLock }; } $f._r$1 = _r$1; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2goroutineLock.prototype.check = function() { + var _r$1, g, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; g = $f.g; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + if (!http2DebugGoroutines) { + $s = -1; return; + } + _r$1 = http2curGoroutineID(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!((x$4 = _r$1, x$5 = (new $Uint64(g.$high, g.$low)), (x$4.$high === x$5.$high && x$4.$low === x$5.$low)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!((x$4 = _r$1, x$5 = (new $Uint64(g.$high, g.$low)), (x$4.$high === x$5.$high && x$4.$low === x$5.$low)))) { */ case 1: + $panic(new $String("running on the wrong goroutine")); + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2goroutineLock.prototype.check }; } $f._r$1 = _r$1; $f.g = g; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2goroutineLock).prototype.check = function() { return this.$get().check(); }; + http2goroutineLock.prototype.checkNotOn = function() { + var _r$1, g, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; g = $f.g; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this; + if (!http2DebugGoroutines) { + $s = -1; return; + } + _r$1 = http2curGoroutineID(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if ((x$4 = _r$1, x$5 = (new $Uint64(g.$high, g.$low)), (x$4.$high === x$5.$high && x$4.$low === x$5.$low))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x$4 = _r$1, x$5 = (new $Uint64(g.$high, g.$low)), (x$4.$high === x$5.$high && x$4.$low === x$5.$low))) { */ case 1: + $panic(new $String("running on the wrong goroutine")); + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2goroutineLock.prototype.checkNotOn }; } $f._r$1 = _r$1; $f.g = g; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2goroutineLock).prototype.checkNotOn = function() { return this.$get().checkNotOn(); }; + http2curGoroutineID = function() { + var _r$1, _r$2, _r$3, _tuple, b, bp, err, i, n, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; b = $f.b; bp = $f.bp; err = $f.err; i = $f.i; n = $f.n; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + _r$1 = http2littleBuf.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + bp = $assertType(_r$1, ptrType$4); + $deferred.push([$methodVal(http2littleBuf, "Put"), [bp]]); + b = bp.$get(); + b = $subslice(b, 0, runtime.Stack(b, false)); + b = bytes.TrimPrefix(b, http2goroutineSpace); + i = bytes.IndexByte(b, 32); + /* */ if (i < 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (i < 0) { */ case 2: + _r$2 = fmt.Sprintf("No space found in %q", new sliceType([b])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $panic(new $String(_r$2)); + /* } */ case 3: + b = $subslice(b, 0, i); + _tuple = http2parseUintBytes(b, 10, 64); + n = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: + _r$3 = fmt.Sprintf("Failed to parse goroutine ID out of %q: %v", new sliceType([b, err])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String(_r$3)); + /* } */ case 6: + $s = -1; return n; + /* */ } return; } } catch(err) { $err = err; $s = -1; return new $Uint64(0, 0); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2curGoroutineID }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.b = b; $f.bp = bp; $f.err = err; $f.i = i; $f.n = n; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2parseUintBytes = function(s, base, bitSize) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, base, bitSize, cutoff, d, err, i, maxVal, n, n1, s, s0, v, x$4, x$5, $s; + /* */ $s = 0; s: while (true) { switch ($s) { case 0: + n = new $Uint64(0, 0); + err = $ifaceNil; + _tmp = new $Uint64(0, 0); + _tmp$1 = new $Uint64(0, 0); + cutoff = _tmp; + maxVal = _tmp$1; + if (bitSize === 0) { + bitSize = 32; + } + s0 = s; + /* */ if (s.$length < 1) { $s = 2; continue; } + /* */ if (2 <= base && base <= 36) { $s = 3; continue; } + /* */ if ((base === 0)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (s.$length < 1) { */ case 2: + err = strconv.ErrSyntax; + /* goto Error */ $s = 7; continue; + $s = 6; continue; + /* } else if (2 <= base && base <= 36) { */ case 3: + $s = 6; continue; + /* } else if ((base === 0)) { */ case 4: + /* */ if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48) && s.$length > 1 && (((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 120) || ((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 88))) { $s = 9; continue; } + /* */ if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48) && s.$length > 1 && (((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 120) || ((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 88))) { */ case 9: + base = 16; + s = $subslice(s, 2); + /* */ if (s.$length < 1) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (s.$length < 1) { */ case 13: + err = strconv.ErrSyntax; + /* goto Error */ $s = 7; continue; + /* } */ case 14: + $s = 12; continue; + /* } else if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48)) { */ case 10: + base = 8; + $s = 12; continue; + /* } else { */ case 11: + base = 10; + /* } */ case 12: + case 8: + $s = 6; continue; + /* } else { */ case 5: + err = errors.New("invalid base " + strconv.Itoa(base)); + /* goto Error */ $s = 7; continue; + /* } */ case 6: + case 1: + n = new $Uint64(0, 0); + cutoff = http2cutoff64(base); + maxVal = (x$4 = $shiftLeft64(new $Uint64(0, 1), ((bitSize >>> 0))), new $Uint64(x$4.$high - 0, x$4.$low - 1)); + i = 0; + /* while (true) { */ case 15: + /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 16; continue; } + v = 0; + d = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); + /* */ if (48 <= d && d <= 57) { $s = 18; continue; } + /* */ if (97 <= d && d <= 122) { $s = 19; continue; } + /* */ if (65 <= d && d <= 90) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (48 <= d && d <= 57) { */ case 18: + v = d - 48 << 24 >>> 24; + $s = 22; continue; + /* } else if (97 <= d && d <= 122) { */ case 19: + v = (d - 97 << 24 >>> 24) + 10 << 24 >>> 24; + $s = 22; continue; + /* } else if (65 <= d && d <= 90) { */ case 20: + v = (d - 65 << 24 >>> 24) + 10 << 24 >>> 24; + $s = 22; continue; + /* } else { */ case 21: + n = new $Uint64(0, 0); + err = strconv.ErrSyntax; + /* goto Error */ $s = 7; continue; + /* } */ case 22: + case 17: + /* */ if (((v >> 0)) >= base) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (((v >> 0)) >= base) { */ case 23: + n = new $Uint64(0, 0); + err = strconv.ErrSyntax; + /* goto Error */ $s = 7; continue; + /* } */ case 24: + /* */ if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { */ case 25: + n = new $Uint64(4294967295, 4294967295); + err = strconv.ErrRange; + /* goto Error */ $s = 7; continue; + /* } */ case 26: + n = $mul64(n, ((new $Uint64(0, base)))); + n1 = (x$5 = (new $Uint64(0, v)), new $Uint64(n.$high + x$5.$high, n.$low + x$5.$low)); + /* */ if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { */ case 27: + n = new $Uint64(4294967295, 4294967295); + err = strconv.ErrRange; + /* goto Error */ $s = 7; continue; + /* } */ case 28: + n = n1; + i = i + (1) >> 0; + /* } */ $s = 15; continue; case 16: + _tmp$2 = n; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* Error: */ case 7: + _tmp$4 = n; + _tmp$5 = new strconv.NumError.ptr("ParseUint", ($bytesToString(s0)), err); + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + $s = -1; return [n, err]; + /* */ } return; } + }; + http2cutoff64 = function(base) { + var base, x$4; + if (base < 2) { + return new $Uint64(0, 0); + } + return (x$4 = $div64(new $Uint64(4294967295, 4294967295), (new $Uint64(0, base)), false), new $Uint64(x$4.$high + 0, x$4.$low + 1)); + }; + init = function() { + var _i, _key, _key$1, _ref, chk, v; + _ref = new sliceType$1(["accept", "accept-charset", "accept-encoding", "accept-language", "accept-ranges", "age", "access-control-allow-origin", "allow", "authorization", "cache-control", "content-disposition", "content-encoding", "content-language", "content-length", "content-location", "content-range", "content-type", "cookie", "date", "etag", "expect", "expires", "from", "host", "if-match", "if-modified-since", "if-none-match", "if-unmodified-since", "last-modified", "link", "location", "max-forwards", "proxy-authenticate", "proxy-authorization", "range", "referer", "refresh", "retry-after", "server", "set-cookie", "strict-transport-security", "trailer", "transfer-encoding", "user-agent", "vary", "via", "www-authenticate"]); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + chk = CanonicalHeaderKey(v); + _key = chk; (http2commonLowerHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; + _key$1 = v; (http2commonCanonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: chk }; + _i++; + } + }; + http2lowerHeader = function(v) { + var _entry, _r$1, _tuple, ok, s, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; ok = $f.ok; s = $f.s; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _tuple = (_entry = http2commonLowerHeader[$String.keyFor(v)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return s; + } + _r$1 = strings.ToLower(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2lowerHeader }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.ok = ok; $f.s = s; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + init$1 = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = os.Getenv("GODEBUG"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + e = _r$1; + if (strings.Contains(e, "http2debug=1")) { + http2VerboseLogs = true; + } + if (strings.Contains(e, "http2debug=2")) { + http2VerboseLogs = true; + http2logFrameWrites = true; + http2logFrameReads = true; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: init$1 }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + http2streamState.prototype.String = function() { + var st; + st = this.$val; + return ((st < 0 || st >= http2stateName.length) ? ($throwRuntimeError("index out of range"), undefined) : http2stateName[st]); + }; + $ptrType(http2streamState).prototype.String = function() { return new http2streamState(this.$get()).String(); }; + http2Setting.ptr.prototype.String = function() { + var _r$1, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + _r$1 = fmt.Sprintf("[%v = %d]", new sliceType([new http2SettingID(s.ID), new $Uint32(s.Val)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Setting.ptr.prototype.String }; } $f._r$1 = _r$1; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Setting.prototype.String = function() { return this.$val.String(); }; + http2Setting.ptr.prototype.Valid = function() { + var _1, s; + s = this; + _1 = s.ID; + if (_1 === (2)) { + if (!((s.Val === 1)) && !((s.Val === 0))) { + return new http2ConnectionError(1); + } + } else if (_1 === (4)) { + if (s.Val > 2147483647) { + return new http2ConnectionError(3); + } + } else if (_1 === (5)) { + if (s.Val < 16384 || s.Val > 16777215) { + return new http2ConnectionError(1); + } + } + return $ifaceNil; + }; + http2Setting.prototype.Valid = function() { return this.$val.Valid(); }; + http2SettingID.prototype.String = function() { + var _entry, _r$1, _tuple, ok, s, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; ok = $f.ok; s = $f.s; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this.$val; + _tuple = (_entry = http2settingName[http2SettingID.keyFor(s)], _entry !== undefined ? [_entry.v, true] : ["", false]); + v = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return v; + } + _r$1 = fmt.Sprintf("UNKNOWN_SETTING_%d", new sliceType([new $Uint16(((s << 16 >>> 16)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2SettingID.prototype.String }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.ok = ok; $f.s = s; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2SettingID).prototype.String = function() { return new http2SettingID(this.$get()).String(); }; + http2validWireHeaderFieldName = function(v) { + var _i, _ref, _rune, r, v; + if (v.length === 0) { + return false; + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + if (!httpguts.IsTokenRune(r)) { + return false; + } + if (65 <= r && r <= 90) { + return false; + } + _i += _rune[1]; + } + return true; + }; + init$2 = function() { + var _key, i, v; + i = 100; + while (true) { + if (!(i <= 999)) { break; } + v = StatusText(i); + if (!(v === "")) { + _key = i; (http2httpCodeStringCommon || $throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(_key)] = { k: _key, v: strconv.Itoa(i) }; + } + i = i + (1) >> 0; + } + }; + http2httpCodeString = function(code) { + var _entry, _tuple, code, ok, s; + _tuple = (_entry = http2httpCodeStringCommon[$Int.keyFor(code)], _entry !== undefined ? [_entry.v, true] : ["", false]); + s = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return s; + } + return strconv.Itoa(code); + }; + http2gate.prototype.Done = function() { + var g, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; g = $f.g; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this.$val; + $r = $send(g, $clone(new structType.ptr(), structType)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2gate.prototype.Done }; } $f.g = g; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2gate).prototype.Done = function() { return new http2gate(this.$get()).Done(); }; + http2gate.prototype.Wait = function() { + var _r$1, g, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; g = $f.g; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + g = this.$val; + _r$1 = $recv(g); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1[0]; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2gate.prototype.Wait }; } $f._r$1 = _r$1; $f.g = g; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2gate).prototype.Wait = function() { return new http2gate(this.$get()).Wait(); }; + $ptrType(http2closeWaiter).prototype.Init = function() { + var cw; + cw = this; + cw.$set(new $Chan(structType, 0)); + }; + http2closeWaiter.prototype.Close = function() { + var cw; + cw = this.$val; + $close(cw); + }; + $ptrType(http2closeWaiter).prototype.Close = function() { return new http2closeWaiter(this.$get()).Close(); }; + http2closeWaiter.prototype.Wait = function() { + var _r$1, cw, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cw = $f.cw; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cw = this.$val; + _r$1 = $recv(cw); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1[0]; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2closeWaiter.prototype.Wait }; } $f._r$1 = _r$1; $f.cw = cw; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2closeWaiter).prototype.Wait = function() { return new http2closeWaiter(this.$get()).Wait(); }; + http2newBufferedWriter = function(w) { + var w; + return new http2bufferedWriter.ptr(w, ptrType$10.nil); + }; + http2bufferedWriter.ptr.prototype.Available = function() { + var w; + w = this; + if (w.bw === ptrType$10.nil) { + return 4096; + } + return w.bw.Available(); + }; + http2bufferedWriter.prototype.Available = function() { return this.$val.Available(); }; + http2bufferedWriter.ptr.prototype.Write = function(p) { + var _r$1, _r$2, _tuple, bw, err, n, p, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; bw = $f.bw; err = $f.err; n = $f.n; p = $f.p; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + /* */ if (w.bw === ptrType$10.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (w.bw === ptrType$10.nil) { */ case 1: + _r$1 = http2bufWriterPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + bw = $assertType(_r$1, ptrType$10); + bw.Reset(w.w); + w.bw = bw; + /* } */ case 2: + _r$2 = w.bw.Write(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2bufferedWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.bw = bw; $f.err = err; $f.n = n; $f.p = p; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2bufferedWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + http2bufferedWriter.ptr.prototype.Flush = function() { + var _r$1, bw, err, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; bw = $f.bw; err = $f.err; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + bw = w.bw; + if (bw === ptrType$10.nil) { + $s = -1; return $ifaceNil; + } + _r$1 = bw.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + bw.Reset($ifaceNil); + http2bufWriterPool.Put(bw); + w.bw = ptrType$10.nil; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2bufferedWriter.ptr.prototype.Flush }; } $f._r$1 = _r$1; $f.bw = bw; $f.err = err; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2bufferedWriter.prototype.Flush = function() { return this.$val.Flush(); }; + http2mustUint31 = function(v) { + var v; + if (v < 0 || v > 2147483647) { + $panic(new $String("out of range")); + } + return ((v >>> 0)); + }; + http2bodyAllowedForStatus = function(status) { + var status; + if (status >= 100 && status <= 199) { + return false; + } else if ((status === 204)) { + return false; + } else if ((status === 304)) { + return false; + } + return true; + }; + http2httpError.ptr.prototype.Error = function() { + var e; + e = this; + return e.msg; + }; + http2httpError.prototype.Error = function() { return this.$val.Error(); }; + http2httpError.ptr.prototype.Timeout = function() { + var e; + e = this; + return e.timeout; + }; + http2httpError.prototype.Timeout = function() { return this.$val.Timeout(); }; + http2httpError.ptr.prototype.Temporary = function() { + var e; + e = this; + return true; + }; + http2httpError.prototype.Temporary = function() { return this.$val.Temporary(); }; + http2sorter.ptr.prototype.Len = function() { + var s; + s = this; + return s.v.$length; + }; + http2sorter.prototype.Len = function() { return this.$val.Len(); }; + http2sorter.ptr.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, s, x$4, x$5, x$6, x$7; + s = this; + _tmp = (x$4 = s.v, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j])); + _tmp$1 = (x$5 = s.v, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])); + (x$6 = s.v, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i] = _tmp)); + (x$7 = s.v, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j] = _tmp$1)); + }; + http2sorter.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; + http2sorter.ptr.prototype.Less = function(i, j) { + var i, j, s, x$4, x$5; + s = this; + return (x$4 = s.v, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])) < (x$5 = s.v, ((j < 0 || j >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + j])); + }; + http2sorter.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; + http2sorter.ptr.prototype.Keys = function(h) { + var _entry, _i, _keys, _ref, h, k, keys, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; h = $f.h; k = $f.k; keys = $f.keys; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + keys = $subslice(s.v, 0, 0); + _ref = h; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + keys = $append(keys, k); + _i++; + } + s.v = keys; + $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return keys; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2sorter.ptr.prototype.Keys }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.h = h; $f.k = k; $f.keys = keys; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + http2sorter.prototype.Keys = function(h) { return this.$val.Keys(h); }; + http2sorter.ptr.prototype.SortStrings = function(ss) { + var s, save, ss, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; s = $f.s; save = $f.save; ss = $f.ss; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + save = s.v; + s.v = ss; + $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + s.v = save; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2sorter.ptr.prototype.SortStrings }; } $f.s = s; $f.save = save; $f.ss = ss; $f.$s = $s; $f.$r = $r; return $f; + }; + http2sorter.prototype.SortStrings = function(ss) { return this.$val.SortStrings(ss); }; + http2validPseudoPath = function(v) { + var v; + return (v.length > 0 && (v.charCodeAt(0) === 47)) || v === "*"; + }; + http2pipe.ptr.prototype.Len = function() { + var _r$1, p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if ($interfaceIsEqual(p.b, $ifaceNil)) { + $s = -1; return 0; + } + _r$1 = p.b.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.Len }; } $f._r$1 = _r$1; $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.Len = function() { return this.$val.Len(); }; + http2pipe.ptr.prototype.Read = function(d) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _v, d, err, n, p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _v = $f._v; d = $f.d; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if ($interfaceIsEqual(p.c.L, $ifaceNil)) { + p.c.L = p.mu; + } + /* while (true) { */ case 2: + if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { + _tmp = 0; + _tmp$1 = p.breakErr; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + if (!(!($interfaceIsEqual(p.b, $ifaceNil)))) { _v = false; $s = 6; continue s; } + _r$1 = p.b.Len(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1 > 0; case 6: + /* */ if (_v) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_v) { */ case 4: + _r$2 = p.b.Read(d); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* } */ case 5: + /* */ if (!($interfaceIsEqual(p.err, $ifaceNil))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(p.err, $ifaceNil))) { */ case 9: + /* */ if (!(p.readFn === $throwNilPointerError)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!(p.readFn === $throwNilPointerError)) { */ case 11: + $r = p.readFn(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + p.readFn = $throwNilPointerError; + /* } */ case 12: + p.b = $ifaceNil; + _tmp$2 = 0; + _tmp$3 = p.err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* } */ case 10: + $r = p.c.Wait(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 2; continue; case 3: + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._v = _v; $f.d = d; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.Read = function(d) { return this.$val.Read(d); }; + http2pipe.ptr.prototype.Write = function(d) { + var _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, d, err, n, p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; d = $f.d; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if ($interfaceIsEqual(p.c.L, $ifaceNil)) { + p.c.L = p.mu; + } + $deferred.push([$methodVal(p.c, "Signal"), []]); + if (!($interfaceIsEqual(p.err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = http2errClosedPipeWrite; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { + _tmp$2 = d.$length; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + _r$1 = p.b.Write(d); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.d = d; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.Write = function(d) { return this.$val.Write(d); }; + http2pipe.ptr.prototype.CloseWithError = function(err) { + var err, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + $r = p.closeWithError((p.$ptr_err || (p.$ptr_err = new ptrType$51(function() { return this.$target.err; }, function($v) { this.$target.err = $v; }, p))), err, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.CloseWithError }; } $f.err = err; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2pipe.prototype.CloseWithError = function(err) { return this.$val.CloseWithError(err); }; + http2pipe.ptr.prototype.BreakWithError = function(err) { + var err, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + $r = p.closeWithError((p.$ptr_breakErr || (p.$ptr_breakErr = new ptrType$51(function() { return this.$target.breakErr; }, function($v) { this.$target.breakErr = $v; }, p))), err, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.BreakWithError }; } $f.err = err; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2pipe.prototype.BreakWithError = function(err) { return this.$val.BreakWithError(err); }; + http2pipe.ptr.prototype.closeWithErrorAndCode = function(err, fn) { + var err, fn, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; fn = $f.fn; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + $r = p.closeWithError((p.$ptr_err || (p.$ptr_err = new ptrType$51(function() { return this.$target.err; }, function($v) { this.$target.err = $v; }, p))), err, fn); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.closeWithErrorAndCode }; } $f.err = err; $f.fn = fn; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2pipe.prototype.closeWithErrorAndCode = function(err, fn) { return this.$val.closeWithErrorAndCode(err, fn); }; + http2pipe.ptr.prototype.closeWithError = function(dst, err, fn) { + var dst, err, fn, p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dst = $f.dst; err = $f.err; fn = $f.fn; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $panic(new $String("err must be non-nil")); + } + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if ($interfaceIsEqual(p.c.L, $ifaceNil)) { + p.c.L = p.mu; + } + $deferred.push([$methodVal(p.c, "Signal"), []]); + if (!($interfaceIsEqual(dst.$get(), $ifaceNil))) { + $s = -1; return; + } + p.readFn = fn; + if (dst === (p.$ptr_breakErr || (p.$ptr_breakErr = new ptrType$51(function() { return this.$target.breakErr; }, function($v) { this.$target.breakErr = $v; }, p)))) { + p.b = $ifaceNil; + } + dst.$set(err); + p.closeDoneLocked(); + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.closeWithError }; } $f.dst = dst; $f.err = err; $f.fn = fn; $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.closeWithError = function(dst, err, fn) { return this.$val.closeWithError(dst, err, fn); }; + http2pipe.ptr.prototype.closeDoneLocked = function() { + var _selection, p, $r; + /* */ var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; p = $f.p; $r = $f.$r; } + p = this; + if (p.donec === $chanNil) { + return; + } + _selection = $select([[p.donec], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + $close(p.donec); + } + /* */ if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.closeDoneLocked }; } $f._selection = _selection; $f.p = p; $f.$r = $r; return $f; + }; + http2pipe.prototype.closeDoneLocked = function() { return this.$val.closeDoneLocked(); }; + http2pipe.ptr.prototype.Err = function() { + var p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { + $s = -1; return p.breakErr; + } + $s = -1; return p.err; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.Err }; } $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.Err = function() { return this.$val.Err(); }; + http2pipe.ptr.prototype.Done = function() { + var p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + p = this; + $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(p.mu, "Unlock"), []]); + if (p.donec === $chanNil) { + p.donec = new $Chan(structType, 0); + if (!($interfaceIsEqual(p.err, $ifaceNil)) || !($interfaceIsEqual(p.breakErr, $ifaceNil))) { + p.closeDoneLocked(); + } + } + $s = -1; return p.donec; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2pipe.ptr.prototype.Done }; } $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2pipe.prototype.Done = function() { return this.$val.Done(); }; + http2Server.ptr.prototype.initialConnRecvWindowSize = function() { + var s; + s = this; + if (s.MaxUploadBufferPerConnection > 65535) { + return s.MaxUploadBufferPerConnection; + } + return 1048576; + }; + http2Server.prototype.initialConnRecvWindowSize = function() { return this.$val.initialConnRecvWindowSize(); }; + http2Server.ptr.prototype.initialStreamRecvWindowSize = function() { + var s; + s = this; + if (s.MaxUploadBufferPerStream > 0) { + return s.MaxUploadBufferPerStream; + } + return 1048576; + }; + http2Server.prototype.initialStreamRecvWindowSize = function() { return this.$val.initialStreamRecvWindowSize(); }; + http2Server.ptr.prototype.maxReadFrameSize = function() { + var s, v; + s = this; + v = s.MaxReadFrameSize; + if (v >= 16384 && v <= 16777215) { + return v; + } + return 1048576; + }; + http2Server.prototype.maxReadFrameSize = function() { return this.$val.maxReadFrameSize(); }; + http2Server.ptr.prototype.maxConcurrentStreams = function() { + var s, v; + s = this; + v = s.MaxConcurrentStreams; + if (v > 0) { + return v; + } + return 250; + }; + http2Server.prototype.maxConcurrentStreams = function() { return this.$val.maxConcurrentStreams(); }; + http2serverInternalState.ptr.prototype.registerConn = function(sc) { + var _key, s, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; s = $f.s; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + if (s === ptrType$52.nil) { + $s = -1; return; + } + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _key = sc; (s.activeConns || $throwRuntimeError("assignment to entry in nil map"))[ptrType$9.keyFor(_key)] = { k: _key, v: new structType.ptr() }; + $r = s.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverInternalState.ptr.prototype.registerConn }; } $f._key = _key; $f.s = s; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverInternalState.prototype.registerConn = function(sc) { return this.$val.registerConn(sc); }; + http2serverInternalState.ptr.prototype.unregisterConn = function(sc) { + var s, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; s = $f.s; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + if (s === ptrType$52.nil) { + $s = -1; return; + } + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + delete s.activeConns[ptrType$9.keyFor(sc)]; + $r = s.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverInternalState.ptr.prototype.unregisterConn }; } $f.s = s; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverInternalState.prototype.unregisterConn = function(sc) { return this.$val.unregisterConn(sc); }; + http2serverInternalState.ptr.prototype.startGracefulShutdown = function() { + var _entry, _i, _keys, _ref, s, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; s = $f.s; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + if (s === ptrType$52.nil) { + $s = -1; return; + } + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = s.activeConns; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 2: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 2; continue; + } + sc = _entry.k; + $r = sc.startGracefulShutdown(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 2; continue; case 3: + $r = s.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverInternalState.ptr.prototype.startGracefulShutdown }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.s = s; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverInternalState.prototype.startGracefulShutdown = function() { return this.$val.startGracefulShutdown(); }; + http2ConfigureServer = function(s, conf) { + var _1, _i, _i$1, _key, _r$1, _r$2, _r$3, _ref, _ref$1, conf, cs, err, err$1, haveNPN, haveRequired, i, p, protoHandler, s, sawBad, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _i = $f._i; _i$1 = $f._i$1; _key = $f._key; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _ref$1 = $f._ref$1; conf = $f.conf; cs = $f.cs; err = $f.err; err$1 = $f.err$1; haveNPN = $f.haveNPN; haveRequired = $f.haveRequired; i = $f.i; p = $f.p; protoHandler = $f.protoHandler; s = $f.s; sawBad = $f.sawBad; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + conf = [conf]; + if (s === ptrType$48.nil) { + $panic(new $String("nil *http.Server")); + } + if (conf[0] === ptrType$53.nil) { + conf[0] = new http2Server.ptr(0, 0, 0, false, new time.Duration(0, 0), 0, 0, $throwNilPointerError, ptrType$52.nil); + } + conf[0].state = new http2serverInternalState.ptr(new sync.Mutex.ptr(0, 0), {}); + err = http2configureServer18(s, conf[0]); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$1 = http2configureServer19(s, conf[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* */ if (s.TLSConfig === ptrType$14.nil) { $s = 2; continue; } + /* */ if (!(s.TLSConfig.CipherSuites === sliceType$12.nil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (s.TLSConfig === ptrType$14.nil) { */ case 2: + s.TLSConfig = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$11.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$32.nil, sliceType$1.nil, "", 0, ptrType$32.nil, false, sliceType$12.nil, false, false, arrayType$2.zero(), $ifaceNil, 0, 0, sliceType$13.nil, false, 0, $ifaceNil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$14.nil); + $s = 4; continue; + /* } else if (!(s.TLSConfig.CipherSuites === sliceType$12.nil)) { */ case 3: + haveRequired = false; + sawBad = false; + _ref = s.TLSConfig.CipherSuites; + _i = 0; + /* while (true) { */ case 5: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } + i = _i; + cs = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _1 = cs; + if ((_1 === (49199)) || (_1 === (49195))) { + haveRequired = true; + } + /* */ if (http2isBadCipher(cs)) { $s = 7; continue; } + /* */ if (sawBad) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (http2isBadCipher(cs)) { */ case 7: + sawBad = true; + $s = 9; continue; + /* } else if (sawBad) { */ case 8: + _r$2 = fmt.Errorf("http2: TLSConfig.CipherSuites index %d contains an HTTP/2-approved cipher suite (%#04x), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.", new sliceType([new $Int(i), new $Uint16(cs)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 9: + _i++; + /* } */ $s = 5; continue; case 6: + /* */ if (!haveRequired) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!haveRequired) { */ case 11: + _r$3 = fmt.Errorf("http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.", new sliceType([])); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 12: + /* } */ case 4: + s.TLSConfig.PreferServerCipherSuites = true; + haveNPN = false; + _ref$1 = s.TLSConfig.NextProtos; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + p = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (p === "h2") { + haveNPN = true; + break; + } + _i$1++; + } + if (!haveNPN) { + s.TLSConfig.NextProtos = $append(s.TLSConfig.NextProtos, "h2"); + } + if (s.TLSNextProto === false) { + s.TLSNextProto = $makeMap($String.keyFor, []); + } + protoHandler = (function(conf) { return function $b(hs, c, h) { + var c, h, hs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; h = $f.h; hs = $f.hs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(http2testHookOnConn === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(http2testHookOnConn === $throwNilPointerError)) { */ case 1: + $r = http2testHookOnConn(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $r = conf[0].ServeConn(c, new http2ServeConnOpts.ptr(hs, h)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.c = c; $f.h = h; $f.hs = hs; $f.$s = $s; $f.$r = $r; return $f; + }; })(conf); + _key = "h2"; (s.TLSNextProto || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: protoHandler }; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ConfigureServer }; } $f._1 = _1; $f._i = _i; $f._i$1 = _i$1; $f._key = _key; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._ref$1 = _ref$1; $f.conf = conf; $f.cs = cs; $f.err = err; $f.err$1 = err$1; $f.haveNPN = haveNPN; $f.haveRequired = haveRequired; $f.i = i; $f.p = p; $f.protoHandler = protoHandler; $f.s = s; $f.sawBad = sawBad; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ServeConnOpts.ptr.prototype.baseConfig = function() { + var o; + o = this; + if (!(o === ptrType$54.nil) && !(o.BaseConfig === ptrType$48.nil)) { + return o.BaseConfig; + } + return new Server.ptr("", $ifaceNil, ptrType$14.nil, new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), 0, false, $throwNilPointerError, ptrType$55.nil, 0, 0, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), $ifaceNil, new sync.Mutex.ptr(0, 0), false, false, $chanNil, sliceType$16.nil); + }; + http2ServeConnOpts.prototype.baseConfig = function() { return this.$val.baseConfig(); }; + http2ServeConnOpts.ptr.prototype.handler = function() { + var o; + o = this; + if (!(o === ptrType$54.nil)) { + if (!($interfaceIsEqual(o.Handler, $ifaceNil))) { + return o.Handler; + } + if (!(o.BaseConfig === ptrType$48.nil) && !($interfaceIsEqual(o.BaseConfig.Handler, $ifaceNil))) { + return o.BaseConfig.Handler; + } + } + return $pkg.DefaultServeMux; + }; + http2ServeConnOpts.prototype.handler = function() { return this.$val.handler(); }; + http2Server.ptr.prototype.ServeConn = function(c, opts) { + var _arg, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, baseCtx, c, cancel, fr, hook, ok, opts, s, sc, tc, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; baseCtx = $f.baseCtx; c = $f.c; cancel = $f.cancel; fr = $f.fr; hook = $f.hook; ok = $f.ok; opts = $f.opts; s = $f.s; sc = $f.sc; tc = $f.tc; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = this; + _r$1 = http2serverConnBaseContext(c, opts); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + baseCtx = _tuple[0]; + cancel = _tuple[1]; + $deferred.push([cancel, []]); + _r$2 = c.RemoteAddr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = _r$2.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = http2newGoroutineLock(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + sc = new http2serverConn.ptr(s, opts.baseConfig(), c, http2newBufferedWriter(c), opts.handler(), baseCtx, ptrType$34.nil, new $Chan(structType, 0), new $Chan(http2readFrameResult, 0), new $Chan(http2FrameWriteRequest, 8), new $Chan(http2frameWriteResult, 1), new $Chan(http2bodyReadMsg, 0), new $Chan($emptyInterface, 8), new http2flow.ptr(0, ptrType$33.nil), new http2flow.ptr(0, ptrType$33.nil), ptrType$17.nil, _r$3, $ifaceNil, _r$4, true, false, false, 0, 4294967295, s.maxConcurrentStreams(), 0, 0, 0, 0, {}, 65535, 16384, 4096, 0, false, false, false, false, false, false, false, 0, ptrType$57.nil, ptrType$57.nil, new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0), ptrType$58.nil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0)); + $r = s.state.registerConn(sc); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(s.state, "unregisterConn"), [sc]]); + /* */ if (!((x$4 = sc.hs.WriteTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((x$4 = sc.hs.WriteTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { */ case 6: + _r$5 = sc.conn.SetWriteDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 7: + /* */ if (!(s.NewWriteScheduler === $throwNilPointerError)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(s.NewWriteScheduler === $throwNilPointerError)) { */ case 9: + _r$6 = s.NewWriteScheduler(); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + sc.writeSched = _r$6; + $s = 11; continue; + /* } else { */ case 10: + sc.writeSched = http2NewRandomWriteScheduler(); + /* } */ case 11: + sc.flow.add(65535); + sc.inflow.add(65535); + _r$7 = hpack.NewEncoder(sc.headerWriteBuf); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + sc.hpackEncoder = _r$7; + fr = http2NewFramer(sc.bw, c); + _r$8 = hpack.NewDecoder(4096, $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + fr.ReadMetaHeaders = _r$8; + fr.MaxHeaderListSize = sc.maxHeaderListSize(); + fr.SetMaxReadFrameSize(s.maxReadFrameSize()); + sc.framer = fr; + _tuple$1 = $assertType(c, http2connectionStater, true); + tc = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (ok) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (ok) { */ case 15: + sc.tlsState = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$17.nil, sliceType$18.nil, sliceType$5.nil, sliceType$3.nil, $throwNilPointerError, sliceType$3.nil); + _r$9 = tc.ConnectionState(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + tls.ConnectionState.copy(sc.tlsState, _r$9); + /* */ if (sc.tlsState.Version < 771) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (sc.tlsState.Version < 771) { */ case 18: + $r = sc.rejectConn(12, "TLS version too low"); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 19: + if (sc.tlsState.ServerName === "") { + } + /* */ if (!s.PermitProhibitedCipherSuites && http2isBadCipher(sc.tlsState.CipherSuite)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!s.PermitProhibitedCipherSuites && http2isBadCipher(sc.tlsState.CipherSuite)) { */ case 21: + _r$10 = fmt.Sprintf("Prohibited TLS 1.2 Cipher Suite: %x", new sliceType([new $Uint16(sc.tlsState.CipherSuite)])); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _arg = _r$10; + $r = sc.rejectConn(12, _arg); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 22: + /* } */ case 16: + hook = http2testHookGetServerConn; + /* */ if (!(hook === $throwNilPointerError)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!(hook === $throwNilPointerError)) { */ case 25: + $r = hook(sc); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + $r = sc.serve(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2Server.ptr.prototype.ServeConn }; } $f._arg = _arg; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.baseCtx = baseCtx; $f.c = c; $f.cancel = cancel; $f.fr = fr; $f.hook = hook; $f.ok = ok; $f.opts = opts; $f.s = s; $f.sc = sc; $f.tc = tc; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2Server.prototype.ServeConn = function(c, opts) { return this.$val.ServeConn(c, opts); }; + http2serverConn.ptr.prototype.rejectConn = function(err, debug) { + var _r$1, _r$2, _r$3, debug, err, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; debug = $f.debug; err = $f.err; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.vlogf("http2: server rejecting conn: %v, %s", new sliceType([new http2ErrCode(err), new $String(debug)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = sc.framer.WriteGoAway(0, err, (new sliceType$3($stringToBytes(debug)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = sc.bw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = sc.conn.Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.rejectConn }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.debug = debug; $f.err = err; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.rejectConn = function(err, debug) { return this.$val.rejectConn(err, debug); }; + http2serverConn.ptr.prototype.maxHeaderListSize = function() { + var n, sc; + sc = this; + n = sc.hs.MaxHeaderBytes; + if (n <= 0) { + n = 1048576; + } + return (((n + 320 >> 0) >>> 0)); + }; + http2serverConn.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; + http2serverConn.ptr.prototype.curOpenStreams = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return sc.curClientStreams + sc.curPushedStreams >>> 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.curOpenStreams }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.curOpenStreams = function() { return this.$val.curOpenStreams(); }; + http2serverConn.ptr.prototype.Framer = function() { + var sc; + sc = this; + return sc.framer; + }; + http2serverConn.prototype.Framer = function() { return this.$val.Framer(); }; + http2serverConn.ptr.prototype.CloseConn = function() { + var _r$1, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + _r$1 = sc.conn.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.CloseConn }; } $f._r$1 = _r$1; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.CloseConn = function() { return this.$val.CloseConn(); }; + http2serverConn.ptr.prototype.Flush = function() { + var _r$1, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + _r$1 = sc.bw.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.Flush }; } $f._r$1 = _r$1; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.Flush = function() { return this.$val.Flush(); }; + http2serverConn.ptr.prototype.HeaderEncoder = function() { + var sc; + sc = this; + return [sc.hpackEncoder, sc.headerWriteBuf]; + }; + http2serverConn.prototype.HeaderEncoder = function() { return this.$val.HeaderEncoder(); }; + http2serverConn.ptr.prototype.state = function(streamID) { + var _entry, _r$1, _tuple, ok, sc, st, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; ok = $f.ok; sc = $f.sc; st = $f.st; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple = (_entry = sc.streams[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$6.nil, false]); + st = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return [st.state, st]; + } + if ((_r$1 = streamID % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1) { + if (streamID <= sc.maxClientStreamID) { + $s = -1; return [4, ptrType$6.nil]; + } + } else { + if (streamID <= sc.maxPushPromiseID) { + $s = -1; return [4, ptrType$6.nil]; + } + } + $s = -1; return [0, ptrType$6.nil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.state }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.ok = ok; $f.sc = sc; $f.st = st; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.state = function(streamID) { return this.$val.state(streamID); }; + http2serverConn.ptr.prototype.setConnState = function(state) { + var sc, state, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; state = $f.state; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + /* */ if (!(sc.hs.ConnState === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(sc.hs.ConnState === $throwNilPointerError)) { */ case 1: + $r = sc.hs.ConnState(sc.conn, state); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.setConnState }; } $f.sc = sc; $f.state = state; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.setConnState = function(state) { return this.$val.setConnState(state); }; + http2serverConn.ptr.prototype.vlogf = function(format, args) { + var args, format, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; format = $f.format; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + /* */ if (http2VerboseLogs) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs) { */ case 1: + $r = sc.logf(format, args); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.vlogf }; } $f.args = args; $f.format = format; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; + http2serverConn.ptr.prototype.logf = function(format, args) { + var args, format, lg, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; format = $f.format; lg = $f.lg; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + lg = sc.hs.ErrorLog; + /* */ if (!(lg === ptrType$55.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(lg === ptrType$55.nil)) { */ case 1: + $r = lg.Printf(format, args); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 3; continue; + /* } else { */ case 2: + $r = log.Printf(format, args); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.logf }; } $f.args = args; $f.format = format; $f.lg = lg; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; + http2errno = function(v) { + var _r$1, rv, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; rv = $f.rv; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + rv = _r$1; + if ($clone(rv, reflect.Value).Kind() === 12) { + $s = -1; return (($clone(rv, reflect.Value).Uint().$low >>> 0)); + } + $s = -1; return 0; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2errno }; } $f._r$1 = _r$1; $f.rv = rv; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2isClosedConnError = function(err) { + var _r$1, _r$2, _tuple, _tuple$1, err, n, oe, ok, ok$1, se, str, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; n = $f.n; oe = $f.oe; ok = $f.ok; ok$1 = $f.ok$1; se = $f.se; str = $f.str; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return false; + } + _r$1 = err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + str = _r$1; + if (strings.Contains(str, "use of closed network connection")) { + $s = -1; return true; + } + /* */ if (false) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (false) { */ case 2: + _tuple = $assertType(err, ptrType$60, true); + oe = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok && oe.Op === "read") { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ok && oe.Op === "read") { */ case 4: + _tuple$1 = $assertType(oe.Err, ptrType$61, true); + se = _tuple$1[0]; + ok$1 = _tuple$1[1]; + /* */ if (ok$1 && se.Syscall === "wsarecv") { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (ok$1 && se.Syscall === "wsarecv") { */ case 6: + _r$2 = http2errno(se.Err); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + n = _r$2; + if ((n === 10054) || (n === 10053)) { + $s = -1; return true; + } + /* } */ case 7: + /* } */ case 5: + /* } */ case 3: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2isClosedConnError }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.n = n; $f.oe = oe; $f.ok = ok; $f.ok$1 = ok$1; $f.se = se; $f.str = str; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.ptr.prototype.condlogf = function(err, format, args) { + var _r$1, _v, args, err, format, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _v = $f._v; args = $f.args; err = $f.err; format = $f.format; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return; + } + if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { _v = true; $s = 4; continue s; } + _r$1 = http2isClosedConnError(err); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 4: + /* */ if (_v || $interfaceIsEqual(err, http2errPrefaceTimeout)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v || $interfaceIsEqual(err, http2errPrefaceTimeout)) { */ case 1: + $r = sc.vlogf(format, args); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 3; continue; + /* } else { */ case 2: + $r = sc.logf(format, args); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.condlogf }; } $f._r$1 = _r$1; $f._v = _v; $f.args = args; $f.err = err; $f.format = format; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.condlogf = function(err, format, args) { return this.$val.condlogf(err, format, args); }; + http2serverConn.ptr.prototype.canonicalHeader = function(v) { + var _entry, _entry$1, _key, _tuple, _tuple$1, cv, ok, sc, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cv = $f.cv; ok = $f.ok; sc = $f.sc; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple = (_entry = http2commonCanonHeader[$String.keyFor(v)], _entry !== undefined ? [_entry.v, true] : ["", false]); + cv = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $s = -1; return cv; + } + _tuple$1 = (_entry$1 = sc.canonHeader[$String.keyFor(v)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); + cv = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + $s = -1; return cv; + } + if (sc.canonHeader === false) { + sc.canonHeader = {}; + } + cv = CanonicalHeaderKey(v); + _key = v; (sc.canonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: cv }; + $s = -1; return cv; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.canonicalHeader }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cv = cv; $f.ok = ok; $f.sc = sc; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.canonicalHeader = function(v) { return this.$val.canonicalHeader(v); }; + http2serverConn.ptr.prototype.readFrames = function() { + var _r$1, _r$2, _r$3, _selection, _selection$1, _tuple, err, f, gate, gateDone, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _selection = $f._selection; _selection$1 = $f._selection$1; _tuple = $f._tuple; err = $f.err; f = $f.f; gate = $f.gate; gateDone = $f.gateDone; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + gate = new $Chan(structType, 0); + gateDone = $methodVal(new http2gate(gate), "Done"); + /* while (true) { */ case 1: + _r$1 = sc.framer.ReadFrame(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + f = _tuple[0]; + err = _tuple[1]; + _r$2 = $select([[sc.readFrameCh, new http2readFrameResult.ptr(f, err, gateDone)], [sc.doneServing]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _selection = _r$2; + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + $s = -1; return; + } + _r$3 = $select([[gate], [sc.doneServing]]); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection$1 = _r$3; + if (_selection$1[0] === 0) { + } else if (_selection$1[0] === 1) { + $s = -1; return; + } + if (http2terminalReadFrameError(err)) { + $s = -1; return; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.readFrames }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._selection = _selection; $f._selection$1 = _selection$1; $f._tuple = _tuple; $f.err = err; $f.f = f; $f.gate = gate; $f.gateDone = gateDone; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.readFrames = function() { return this.$val.readFrames(); }; + http2serverConn.ptr.prototype.writeFrameAsync = function(wr) { + var _r$1, err, sc, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; sc = $f.sc; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + _r$1 = wr.write.writeFrame(sc); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + $r = $send(sc.wroteFrameCh, $clone(new http2frameWriteResult.ptr($clone(wr, http2FrameWriteRequest), err), http2frameWriteResult)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.writeFrameAsync }; } $f._r$1 = _r$1; $f.err = err; $f.sc = sc; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.writeFrameAsync = function(wr) { return this.$val.writeFrameAsync(wr); }; + http2serverConn.ptr.prototype.closeAllStreamsOnConnClose = function() { + var _entry, _i, _keys, _ref, sc, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; sc = $f.sc; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = sc.streams; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 2: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 2; continue; + } + st = _entry.v; + $r = sc.closeStream(st, http2errClientDisconnected); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 2; continue; case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.closeAllStreamsOnConnClose }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.sc = sc; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.closeAllStreamsOnConnClose = function() { return this.$val.closeAllStreamsOnConnClose(); }; + http2serverConn.ptr.prototype.stopShutdownTimer = function() { + var sc, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + t = sc.shutdownTimer; + if (!(t === ptrType$57.nil)) { + t.Stop(); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.stopShutdownTimer }; } $f.sc = sc; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.stopShutdownTimer = function() { return this.$val.stopShutdownTimer(); }; + http2serverConn.ptr.prototype.notePanic = function() { + var _r$1, e, sc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; sc = $f.sc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + sc = this; + /* */ if (!(http2testHookOnPanicMu === ptrType.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(http2testHookOnPanicMu === ptrType.nil)) { */ case 1: + $r = http2testHookOnPanicMu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(http2testHookOnPanicMu, "Unlock"), []]); + /* } */ case 2: + /* */ if (!(http2testHookOnPanic === $throwNilPointerError)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(http2testHookOnPanic === $throwNilPointerError)) { */ case 4: + e = $recover(); + /* */ if (!($interfaceIsEqual(e, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(e, $ifaceNil))) { */ case 6: + _r$1 = http2testHookOnPanic(sc, e); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (_r$1) { */ case 8: + $panic(e); + /* } */ case 9: + /* } */ case 7: + /* } */ case 5: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.notePanic }; } $f._r$1 = _r$1; $f.e = e; $f.sc = sc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2serverConn.prototype.notePanic = function() { return this.$val.notePanic(); }; + http2serverConn.ptr.prototype.serve = function() { + var _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _tuple, _v, diff, err, gracefulShutdownComplete, loopNum, m, msg, ok, res, res$1, sc, se, sentGoAway, settingsTimer, v, v$1, v$2, v$3, wr, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _arg$5 = $f._arg$5; _arg$6 = $f._arg$6; _arg$7 = $f._arg$7; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _selection = $f._selection; _tuple = $f._tuple; _v = $f._v; diff = $f.diff; err = $f.err; gracefulShutdownComplete = $f.gracefulShutdownComplete; loopNum = $f.loopNum; m = $f.m; msg = $f.msg; ok = $f.ok; res = $f.res; res$1 = $f.res$1; sc = $f.sc; se = $f.se; sentGoAway = $f.sentGoAway; settingsTimer = $f.settingsTimer; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; v$3 = $f.v$3; wr = $f.wr; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(sc, "notePanic"), []]); + $deferred.push([$methodVal(sc.conn, "Close"), []]); + $deferred.push([$methodVal(sc, "closeAllStreamsOnConnClose"), []]); + $deferred.push([$methodVal(sc, "stopShutdownTimer"), []]); + $deferred.push([function(_arg) { $close(_arg); }, [sc.doneServing]]); + /* */ if (http2VerboseLogs) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (http2VerboseLogs) { */ case 2: + _r$1 = sc.conn.RemoteAddr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = _r$1; + _arg$2 = sc.hs; + $r = sc.vlogf("http2: server connection from %v on %p", new sliceType([_arg$1, _arg$2])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $r = sc.writeFrame(new http2FrameWriteRequest.ptr(new http2writeSettings([new http2Setting.ptr(5, sc.srv.maxReadFrameSize()), new http2Setting.ptr(3, sc.advMaxStreams), new http2Setting.ptr(6, sc.maxHeaderListSize()), new http2Setting.ptr(4, ((sc.srv.initialStreamRecvWindowSize() >>> 0)))]), ptrType$6.nil, $chanNil)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sc.unackedSettings = sc.unackedSettings + (1) >> 0; + diff = sc.srv.initialConnRecvWindowSize() - 65535 >> 0; + /* */ if (diff > 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (diff > 0) { */ case 7: + $r = sc.sendWindowUpdate(ptrType$6.nil, ((diff >> 0))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + _r$2 = sc.readPreface(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: + _arg$3 = err; + _r$3 = sc.conn.RemoteAddr(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$4 = _r$3; + _arg$5 = err; + $r = sc.condlogf(_arg$3, "http2: server: error reading preface from client %v: %v", new sliceType([_arg$4, _arg$5])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 12: + $r = sc.setConnState(1); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.setConnState(2); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!((x$4 = sc.srv.IdleTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { + sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, $methodVal(sc, "onIdleTimer")); + $deferred.push([$methodVal(sc.idleTimer, "Stop"), []]); + } + $go($methodVal(sc, "readFrames"), []); + settingsTimer = time.AfterFunc(new time.Duration(0, 2000000000), $methodVal(sc, "onSettingsTimer")); + $deferred.push([$methodVal(settingsTimer, "Stop"), []]); + loopNum = 0; + /* while (true) { */ case 17: + loopNum = loopNum + (1) >> 0; + _r$4 = $select([[sc.wantWriteFrameCh], [sc.wroteFrameCh], [sc.readFrameCh], [sc.bodyReadCh], [sc.serveMsgCh]]); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _selection = _r$4; + /* */ if (_selection[0] === 0) { $s = 20; continue; } + /* */ if (_selection[0] === 1) { $s = 21; continue; } + /* */ if (_selection[0] === 2) { $s = 22; continue; } + /* */ if (_selection[0] === 3) { $s = 23; continue; } + /* */ if (_selection[0] === 4) { $s = 24; continue; } + /* */ $s = 25; continue; + /* switch (0) { default: if (_selection[0] === 0) { */ case 20: + wr = $clone(_selection[1][0], http2FrameWriteRequest); + _tuple = $assertType(wr.write, http2StreamError, true); + se = $clone(_tuple[0], http2StreamError); + ok = _tuple[1]; + /* */ if (ok) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (ok) { */ case 26: + $r = sc.resetStream($clone(se, http2StreamError)); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* break; */ $s = 25; continue; + /* } */ case 27: + $r = sc.writeFrame($clone(wr, http2FrameWriteRequest)); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 25; continue; + /* } else if (_selection[0] === 1) { */ case 21: + res = $clone(_selection[1][0], http2frameWriteResult); + $r = sc.wroteFrame($clone(res, http2frameWriteResult)); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 25; continue; + /* } else if (_selection[0] === 2) { */ case 22: + res$1 = $clone(_selection[1][0], http2readFrameResult); + _r$5 = sc.processFrameFromReader($clone(res$1, http2readFrameResult)); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + /* */ if (!_r$5) { $s = 31; continue; } + /* */ $s = 32; continue; + /* if (!_r$5) { */ case 31: + $s = -1; return; + /* } */ case 32: + $r = res$1.readMore(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(settingsTimer === ptrType$57.nil)) { + settingsTimer.Stop(); + settingsTimer = ptrType$57.nil; + } + $s = 25; continue; + /* } else if (_selection[0] === 3) { */ case 23: + m = $clone(_selection[1][0], http2bodyReadMsg); + $r = sc.noteBodyRead(m.st, m.n); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 25; continue; + /* } else if (_selection[0] === 4) { */ case 24: + msg = _selection[1][0]; + _ref = msg; + /* */ if ($assertType(_ref, funcType$3, true)[1]) { $s = 36; continue; } + /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 37; continue; } + /* */ if ($assertType(_ref, ptrType$62, true)[1]) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if ($assertType(_ref, funcType$3, true)[1]) { */ case 36: + v = _ref.$val; + $r = v(loopNum); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 40; continue; + /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 37: + v$1 = _ref.$val; + _1 = v$1; + /* */ if (_1 === (http2settingsTimerMsg)) { $s = 43; continue; } + /* */ if (_1 === (http2idleTimerMsg)) { $s = 44; continue; } + /* */ if (_1 === (http2shutdownTimerMsg)) { $s = 45; continue; } + /* */ if (_1 === (http2gracefulShutdownMsg)) { $s = 46; continue; } + /* */ $s = 47; continue; + /* if (_1 === (http2settingsTimerMsg)) { */ case 43: + _r$6 = sc.conn.RemoteAddr(); /* */ $s = 49; case 49: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _arg$6 = _r$6; + $r = sc.logf("timeout waiting for SETTINGS frames from %v", new sliceType([_arg$6])); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } else if (_1 === (http2idleTimerMsg)) { */ case 44: + $r = sc.vlogf("connection is idle", new sliceType([])); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.goAway(0); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 48; continue; + /* } else if (_1 === (http2shutdownTimerMsg)) { */ case 45: + _r$7 = sc.conn.RemoteAddr(); /* */ $s = 53; case 53: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _arg$7 = _r$7; + $r = sc.vlogf("GOAWAY close timer fired; closing conn from %v", new sliceType([_arg$7])); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } else if (_1 === (http2gracefulShutdownMsg)) { */ case 46: + $r = sc.startGracefulShutdownInternal(); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 48; continue; + /* } else { */ case 47: + $panic(new $String("unknown timer")); + /* } */ case 48: + case 42: + $s = 40; continue; + /* } else if ($assertType(_ref, ptrType$62, true)[1]) { */ case 38: + v$2 = _ref.$val; + $r = sc.startPush(v$2); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 40; continue; + /* } else { */ case 39: + v$3 = _ref; + _r$8 = fmt.Sprintf("unexpected type %T", new sliceType([v$3])); /* */ $s = 57; case 57: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $panic(new $String(_r$8)); + /* } */ case 40: + /* } } */ case 25: + sentGoAway = sc.inGoAway && !sc.needToSendGoAway && !sc.writingFrame; + if (!(sc.goAwayCode === 0)) { _v = false; $s = 58; continue s; } + _r$9 = sc.curOpenStreams(); /* */ $s = 59; case 59: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _v = _r$9 === 0; case 58: + gracefulShutdownComplete = _v; + /* */ if (sentGoAway && sc.shutdownTimer === ptrType$57.nil && (!((sc.goAwayCode === 0)) || gracefulShutdownComplete)) { $s = 60; continue; } + /* */ $s = 61; continue; + /* if (sentGoAway && sc.shutdownTimer === ptrType$57.nil && (!((sc.goAwayCode === 0)) || gracefulShutdownComplete)) { */ case 60: + $r = sc.shutDownIn(http2goAwayTimeout); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 61: + /* } */ $s = 17; continue; case 18: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.serve }; } $f._1 = _1; $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._arg$5 = _arg$5; $f._arg$6 = _arg$6; $f._arg$7 = _arg$7; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._selection = _selection; $f._tuple = _tuple; $f._v = _v; $f.diff = diff; $f.err = err; $f.gracefulShutdownComplete = gracefulShutdownComplete; $f.loopNum = loopNum; $f.m = m; $f.msg = msg; $f.ok = ok; $f.res = res; $f.res$1 = res$1; $f.sc = sc; $f.se = se; $f.sentGoAway = sentGoAway; $f.settingsTimer = settingsTimer; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.v$3 = v$3; $f.wr = wr; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2serverConn.prototype.serve = function() { return this.$val.serve(); }; + http2serverConn.ptr.prototype.onSettingsTimer = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.sendServeMsg(http2settingsTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.onSettingsTimer }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.onSettingsTimer = function() { return this.$val.onSettingsTimer(); }; + http2serverConn.ptr.prototype.onIdleTimer = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.sendServeMsg(http2idleTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.onIdleTimer }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.onIdleTimer = function() { return this.$val.onIdleTimer(); }; + http2serverConn.ptr.prototype.onShutdownTimer = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.sendServeMsg(http2shutdownTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.onShutdownTimer }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.onShutdownTimer = function() { return this.$val.onShutdownTimer(); }; + http2serverConn.ptr.prototype.sendServeMsg = function(msg) { + var _r$1, _selection, msg, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; msg = $f.msg; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = $select([[sc.serveMsgCh, msg], [sc.doneServing]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.sendServeMsg }; } $f._r$1 = _r$1; $f._selection = _selection; $f.msg = msg; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.sendServeMsg = function(msg) { return this.$val.sendServeMsg(msg); }; + http2serverConn.ptr.prototype.readPreface = function() { + var _arg, _r$1, _r$2, _selection, err, errc, sc, timer, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$1 = $f._r$1; _r$2 = $f._r$2; _selection = $f._selection; err = $f.err; errc = $f.errc; sc = $f.sc; timer = $f.timer; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + errc = [errc]; + sc = [sc]; + sc[0] = this; + errc[0] = new $Chan($error, 1); + $go((function(errc, sc) { return function $b() { + var _r$1, _r$2, _tuple, buf, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; buf = $f.buf; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = $makeSlice(sliceType$3, 24); + _r$1 = io.ReadFull(sc[0].conn, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ if (!bytes.Equal(buf, http2clientPreface)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + $r = $send(errc[0], err); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else if (!bytes.Equal(buf, http2clientPreface)) { */ case 3: + _r$2 = fmt.Errorf("bogus greeting %q", new sliceType([buf])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = $send(errc[0], _r$2); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else { */ case 4: + $r = $send(errc[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; })(errc, sc), []); + timer = time.NewTimer(new time.Duration(2, 1410065408)); + $deferred.push([$methodVal(timer, "Stop"), []]); + _r$1 = $select([[timer.C], [errc[0]]]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + /* */ if (_selection[0] === 0) { $s = 2; continue; } + /* */ if (_selection[0] === 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_selection[0] === 0) { */ case 2: + $s = -1; return http2errPrefaceTimeout; + /* } else if (_selection[0] === 1) { */ case 3: + err = _selection[1][0]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 5: + /* */ if (http2VerboseLogs) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (http2VerboseLogs) { */ case 7: + _r$2 = sc[0].conn.RemoteAddr(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg = _r$2; + $r = sc[0].vlogf("http2: server: client %v said hello", new sliceType([_arg])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + /* } */ case 6: + $s = -1; return err; + /* } */ case 4: + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.readPreface }; } $f._arg = _arg; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._selection = _selection; $f.err = err; $f.errc = errc; $f.sc = sc; $f.timer = timer; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2serverConn.prototype.readPreface = function() { return this.$val.readPreface(); }; + http2serverConn.ptr.prototype.writeDataFromHandler = function(stream, data, endStream) { + var _r$1, _r$2, _r$3, _r$4, _selection, _selection$1, ch, data, endStream, err, frameWriteDone, sc, stream, writeArg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _selection = $f._selection; _selection$1 = $f._selection$1; ch = $f.ch; data = $f.data; endStream = $f.endStream; err = $f.err; frameWriteDone = $f.frameWriteDone; sc = $f.sc; stream = $f.stream; writeArg = $f.writeArg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + _r$1 = http2errChanPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ch = $assertType(_r$1, chanType); + _r$2 = http2writeDataPool.Get(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + writeArg = $assertType(_r$2, ptrType$63); + http2writeData.copy(writeArg, new http2writeData.ptr(stream.id, data, endStream)); + _r$3 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr(writeArg, stream, ch)); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + frameWriteDone = false; + _r$4 = $select([[ch], [sc.doneServing], [stream.cw]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _selection = _r$4; + if (_selection[0] === 0) { + err = _selection[1][0]; + frameWriteDone = true; + } else if (_selection[0] === 1) { + $s = -1; return http2errClientDisconnected; + } else if (_selection[0] === 2) { + _selection$1 = $select([[ch], []]); + if (_selection$1[0] === 0) { + err = _selection$1[1][0]; + frameWriteDone = true; + } else if (_selection$1[0] === 1) { + $s = -1; return http2errStreamClosed; + } + } + http2errChanPool.Put(new chanType(ch)); + if (frameWriteDone) { + http2writeDataPool.Put(writeArg); + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.writeDataFromHandler }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._selection = _selection; $f._selection$1 = _selection$1; $f.ch = ch; $f.data = data; $f.endStream = endStream; $f.err = err; $f.frameWriteDone = frameWriteDone; $f.sc = sc; $f.stream = stream; $f.writeArg = writeArg; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.writeDataFromHandler = function(stream, data, endStream) { return this.$val.writeDataFromHandler(stream, data, endStream); }; + http2serverConn.ptr.prototype.writeFrameFromHandler = function(wr) { + var _r$1, _selection, sc, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; sc = $f.sc; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = $select([[sc.wantWriteFrameCh, $clone(wr, http2FrameWriteRequest)], [sc.doneServing]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + $s = -1; return $ifaceNil; + } else if (_selection[0] === 1) { + $s = -1; return http2errClientDisconnected; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.writeFrameFromHandler }; } $f._r$1 = _r$1; $f._selection = _selection; $f.sc = sc; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.writeFrameFromHandler = function(wr) { return this.$val.writeFrameFromHandler(wr); }; + http2serverConn.ptr.prototype.writeFrame = function(wr) { + var _r$1, _ref, _tuple, _tuple$1, ignoreWrite, isReset, sc, state, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; ignoreWrite = $f.ignoreWrite; isReset = $f.isReset; sc = $f.sc; state = $f.state; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ignoreWrite = false; + /* */ if (!(($clone(wr, http2FrameWriteRequest).StreamID() === 0))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(($clone(wr, http2FrameWriteRequest).StreamID() === 0))) { */ case 2: + _tuple = $assertType(wr.write, http2StreamError, true); + isReset = _tuple[1]; + _r$1 = sc.state($clone(wr, http2FrameWriteRequest).StreamID()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + state = _tuple$1[0]; + if ((state === 4) && !isReset) { + ignoreWrite = true; + } + /* } */ case 3: + _ref = wr.write; + if ($assertType(_ref, ptrType$64, true)[1]) { + wr.stream.wroteHeaders = true; + } else if ($assertType(_ref, http2write100ContinueHeadersFrame, true)[1]) { + if (wr.stream.wroteHeaders) { + if (!(wr.done === $chanNil)) { + $panic(new $String("wr.done != nil for write100ContinueHeadersFrame")); + } + ignoreWrite = true; + } + } + /* */ if (!ignoreWrite) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!ignoreWrite) { */ case 5: + $r = sc.writeSched.Push($clone(wr, http2FrameWriteRequest)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + $r = sc.scheduleFrameWrite(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.ignoreWrite = ignoreWrite; $f.isReset = isReset; $f.sc = sc; $f.state = state; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.writeFrame = function(wr) { return this.$val.writeFrame(wr); }; + http2serverConn.ptr.prototype.startFrameWrite = function(wr) { + var _1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, err, err$1, ok, sc, st, wpp, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; err$1 = $f.err$1; ok = $f.ok; sc = $f.sc; st = $f.st; wpp = $f.wpp; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (sc.writingFrame) { + $panic(new $String("internal error: can only be writing one frame at a time")); + } + st = wr.stream; + /* */ if (!(st === ptrType$6.nil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(st === ptrType$6.nil)) { */ case 2: + _1 = st.state; + /* */ if (_1 === (2)) { $s = 5; continue; } + /* */ if (_1 === (4)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (_1 === (2)) { */ case 5: + _ref = wr.write; + /* */ if ($assertType(_ref, http2StreamError, true)[1] || $assertType(_ref, http2handlerPanicRST, true)[1] || $assertType(_ref, http2writeWindowUpdate, true)[1]) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($assertType(_ref, http2StreamError, true)[1] || $assertType(_ref, http2handlerPanicRST, true)[1] || $assertType(_ref, http2writeWindowUpdate, true)[1]) { */ case 8: + $s = 10; continue; + /* } else { */ case 9: + _r$1 = fmt.Sprintf("internal error: attempt to send frame on a half-closed-local stream: %v", new sliceType([new wr.constructor.elem(wr)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 10: + $s = 7; continue; + /* } else if (_1 === (4)) { */ case 6: + _r$2 = fmt.Sprintf("internal error: attempt to send frame on a closed stream: %v", new sliceType([new wr.constructor.elem(wr)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $panic(new $String(_r$2)); + /* } */ case 7: + case 4: + /* } */ case 3: + _tuple = $assertType(wr.write, ptrType$65, true); + wpp = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (ok) { */ case 13: + err = $ifaceNil; + _r$3 = wpp.allocatePromisedID(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + wpp.promisedID = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: + sc.writingFrameAsync = false; + $r = wr.replyToWriter(err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 17: + /* } */ case 14: + sc.writingFrame = true; + sc.needsFrameFlush = true; + _r$4 = wr.write.staysWithinBuffer(sc.bw.Available()); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + /* */ if (_r$4) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (_r$4) { */ case 19: + sc.writingFrameAsync = false; + _r$5 = wr.write.writeFrame(sc); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$1 = _r$5; + $r = sc.wroteFrame(new http2frameWriteResult.ptr($clone(wr, http2FrameWriteRequest), err$1)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 21; continue; + /* } else { */ case 20: + sc.writingFrameAsync = true; + $go($methodVal(sc, "writeFrameAsync"), [$clone(wr, http2FrameWriteRequest)]); + /* } */ case 21: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.startFrameWrite }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.err$1 = err$1; $f.ok = ok; $f.sc = sc; $f.st = st; $f.wpp = wpp; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.startFrameWrite = function(wr) { return this.$val.startFrameWrite(wr); }; + http2serverConn.ptr.prototype.wroteFrame = function(res) { + var _1, _entry, _ref, _tuple, ok, res, sc, st, st$1, v, v$1, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _ref = $f._ref; _tuple = $f._tuple; ok = $f.ok; res = $f.res; sc = $f.sc; st = $f.st; st$1 = $f.st$1; v = $f.v; v$1 = $f.v$1; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!sc.writingFrame) { + $panic(new $String("internal error: expected to be already writing a frame")); + } + sc.writingFrame = false; + sc.writingFrameAsync = false; + wr = $clone(res.wr, http2FrameWriteRequest); + /* */ if (http2writeEndsStream(wr.write)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (http2writeEndsStream(wr.write)) { */ case 2: + st = wr.stream; + if (st === ptrType$6.nil) { + $panic(new $String("internal error: expecting non-nil stream")); + } + _1 = st.state; + /* */ if (_1 === (1)) { $s = 6; continue; } + /* */ if (_1 === (3)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_1 === (1)) { */ case 6: + st.state = 2; + $r = sc.resetStream($clone(http2streamError(st.id, 0), http2StreamError)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 8; continue; + /* } else if (_1 === (3)) { */ case 7: + $r = sc.closeStream(st, http2errHandlerComplete); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + case 5: + $s = 4; continue; + /* } else { */ case 3: + _ref = wr.write; + /* */ if ($assertType(_ref, http2StreamError, true)[1]) { $s = 11; continue; } + /* */ if ($assertType(_ref, http2handlerPanicRST, true)[1]) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if ($assertType(_ref, http2StreamError, true)[1]) { */ case 11: + v = $clone(_ref.$val, http2StreamError); + _tuple = (_entry = sc.streams[$Uint32.keyFor(v.StreamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$6.nil, false]); + st$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (ok) { */ case 14: + $r = sc.closeStream(st$1, new v.constructor.elem(v)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 15: + $s = 13; continue; + /* } else if ($assertType(_ref, http2handlerPanicRST, true)[1]) { */ case 12: + v$1 = $clone(_ref.$val, http2handlerPanicRST); + $r = sc.closeStream(wr.stream, http2errHandlerPanicked); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + /* } */ case 4: + $r = wr.replyToWriter(res.err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.scheduleFrameWrite(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.wroteFrame }; } $f._1 = _1; $f._entry = _entry; $f._ref = _ref; $f._tuple = _tuple; $f.ok = ok; $f.res = res; $f.sc = sc; $f.st = st; $f.st$1 = st$1; $f.v = v; $f.v$1 = v$1; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.wroteFrame = function(res) { return this.$val.wroteFrame(res); }; + http2serverConn.ptr.prototype.scheduleFrameWrite = function() { + var _r$1, _tuple, ok, sc, wr, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; ok = $f.ok; sc = $f.sc; wr = $f.wr; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (sc.writingFrame || sc.inFrameScheduleLoop) { + $s = -1; return; + } + sc.inFrameScheduleLoop = true; + /* while (true) { */ case 2: + /* if (!(!sc.writingFrameAsync)) { break; } */ if(!(!sc.writingFrameAsync)) { $s = 3; continue; } + /* */ if (sc.needToSendGoAway) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (sc.needToSendGoAway) { */ case 4: + sc.needToSendGoAway = false; + $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr(new http2writeGoAway.ptr(sc.maxClientStreamID, sc.goAwayCode), ptrType$6.nil, $chanNil)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 2; continue; + /* } */ case 5: + /* */ if (sc.needToSendSettingsAck) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (sc.needToSendSettingsAck) { */ case 7: + sc.needToSendSettingsAck = false; + $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr((x$4 = new http2writeSettingsAck.ptr(), new x$4.constructor.elem(x$4)), ptrType$6.nil, $chanNil)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 2; continue; + /* } */ case 8: + /* */ if (!sc.inGoAway || (sc.goAwayCode === 0)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!sc.inGoAway || (sc.goAwayCode === 0)) { */ case 10: + _r$1 = sc.writeSched.Pop(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + wr = $clone(_tuple[0], http2FrameWriteRequest); + ok = _tuple[1]; + /* */ if (ok) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (ok) { */ case 13: + $r = sc.startFrameWrite($clone(wr, http2FrameWriteRequest)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 2; continue; + /* } */ case 14: + /* } */ case 11: + /* */ if (sc.needsFrameFlush) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (sc.needsFrameFlush) { */ case 16: + $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr((x$5 = new http2flushFrameWriter.ptr(), new x$5.constructor.elem(x$5)), ptrType$6.nil, $chanNil)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sc.needsFrameFlush = false; + /* continue; */ $s = 2; continue; + /* } */ case 17: + /* break; */ $s = 3; continue; + /* } */ $s = 2; continue; case 3: + sc.inFrameScheduleLoop = false; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.scheduleFrameWrite }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.ok = ok; $f.sc = sc; $f.wr = wr; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.scheduleFrameWrite = function() { return this.$val.scheduleFrameWrite(); }; + http2serverConn.ptr.prototype.startGracefulShutdown = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = [sc]; + sc[0] = this; + $r = sc[0].serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc[0].shutdownOnce.Do((function(sc) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = sc[0].sendServeMsg(http2gracefulShutdownMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(sc)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.startGracefulShutdown }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.startGracefulShutdown = function() { return this.$val.startGracefulShutdown(); }; + http2serverConn.ptr.prototype.startGracefulShutdownInternal = function() { + var sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.goAway(0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.startGracefulShutdownInternal }; } $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.startGracefulShutdownInternal = function() { return this.$val.startGracefulShutdownInternal(); }; + http2serverConn.ptr.prototype.goAway = function(code) { + var code, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; code = $f.code; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (sc.inGoAway) { + $s = -1; return; + } + sc.inGoAway = true; + sc.needToSendGoAway = true; + sc.goAwayCode = code; + $r = sc.scheduleFrameWrite(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.goAway }; } $f.code = code; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.goAway = function(code) { return this.$val.goAway(code); }; + http2serverConn.ptr.prototype.shutDownIn = function(d) { + var d, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; d = $f.d; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sc.shutdownTimer = time.AfterFunc(d, $methodVal(sc, "onShutdownTimer")); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.shutDownIn }; } $f.d = d; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.shutDownIn = function(d) { return this.$val.shutDownIn(d); }; + http2serverConn.ptr.prototype.resetStream = function(se) { + var _entry, _tuple, ok, sc, se, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; ok = $f.ok; sc = $f.sc; se = $f.se; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.writeFrame(new http2FrameWriteRequest.ptr(new se.constructor.elem(se), ptrType$6.nil, $chanNil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple = (_entry = sc.streams[$Uint32.keyFor(se.StreamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$6.nil, false]); + st = _tuple[0]; + ok = _tuple[1]; + if (ok) { + st.resetQueued = true; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.resetStream }; } $f._entry = _entry; $f._tuple = _tuple; $f.ok = ok; $f.sc = sc; $f.se = se; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.resetStream = function(se) { return this.$val.resetStream(se); }; + http2serverConn.ptr.prototype.processFrameFromReader = function(res) { + var _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, clientGone, err, ev, ev$1, ev$2, ev$3, f, res, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _v = $f._v; clientGone = $f.clientGone; err = $f.err; ev = $f.ev; ev$1 = $f.ev$1; ev$2 = $f.ev$2; ev$3 = $f.ev$3; f = $f.f; res = $f.res; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err = res.err; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + /* */ if ($interfaceIsEqual(err, http2ErrFrameTooLarge)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($interfaceIsEqual(err, http2ErrFrameTooLarge)) { */ case 5: + $r = sc.goAway(6); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } */ case 6: + if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { _v = true; $s = 8; continue s; } + _r$1 = http2isClosedConnError(err); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 8: + clientGone = _v; + if (clientGone) { + $s = -1; return false; + } + $s = 4; continue; + /* } else { */ case 3: + f = res.f; + /* */ if (http2VerboseLogs) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (http2VerboseLogs) { */ case 10: + _r$2 = http2summarizeFrame(f); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg = new $String(_r$2); + $r = sc.vlogf("http2: server read frame %v", new sliceType([_arg])); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 11: + _r$3 = sc.processFrame(f); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return true; + } + /* } */ case 4: + _ref = err; + /* */ if ($assertType(_ref, http2StreamError, true)[1]) { $s = 15; continue; } + /* */ if ($assertType(_ref, http2goAwayFlowError, true)[1]) { $s = 16; continue; } + /* */ if ($assertType(_ref, http2ConnectionError, true)[1]) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if ($assertType(_ref, http2StreamError, true)[1]) { */ case 15: + ev = $clone(_ref.$val, http2StreamError); + $r = sc.resetStream($clone(ev, http2StreamError)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } else if ($assertType(_ref, http2goAwayFlowError, true)[1]) { */ case 16: + ev$1 = $clone(_ref.$val, http2goAwayFlowError); + $r = sc.goAway(3); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } else if ($assertType(_ref, http2ConnectionError, true)[1]) { */ case 17: + ev$2 = _ref.$val; + _r$4 = sc.conn.RemoteAddr(); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _arg$1 = _r$4; + _arg$2 = new http2ConnectionError(ev$2); + $r = sc.logf("http2: server connection error from %v: %v", new sliceType([_arg$1, _arg$2])); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.goAway(((ev$2 >>> 0))); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return true; + /* } else { */ case 18: + ev$3 = _ref; + /* */ if (!($interfaceIsEqual(res.err, $ifaceNil))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!($interfaceIsEqual(res.err, $ifaceNil))) { */ case 25: + _r$5 = sc.conn.RemoteAddr(); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _arg$3 = _r$5; + _arg$4 = err; + $r = sc.vlogf("http2: server closing client connection; error reading frame from client %s: %v", new sliceType([_arg$3, _arg$4])); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 27; continue; + /* } else { */ case 26: + $r = sc.logf("http2: server closing client connection: %v", new sliceType([err])); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 27: + $s = -1; return false; + /* } */ case 19: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processFrameFromReader }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._v = _v; $f.clientGone = clientGone; $f.err = err; $f.ev = ev; $f.ev$1 = ev$1; $f.ev$2 = ev$2; $f.ev$3 = ev$3; $f.f = f; $f.res = res; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processFrameFromReader = function(res) { return this.$val.processFrameFromReader(res); }; + http2serverConn.ptr.prototype.processFrame = function(f) { + var _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, f, f$1, f$10, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, ok, sc, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; f = $f.f; f$1 = $f.f$1; f$10 = $f.f$10; f$2 = $f.f$2; f$3 = $f.f$3; f$4 = $f.f$4; f$5 = $f.f$5; f$6 = $f.f$6; f$7 = $f.f$7; f$8 = $f.f$8; f$9 = $f.f$9; ok = $f.ok; sc = $f.sc; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!sc.sawFirstSettings) { + _tuple = $assertType(f, ptrType$41, true); + ok = _tuple[1]; + if (!ok) { + $s = -1; return new http2ConnectionError(1); + } + sc.sawFirstSettings = true; + } + _ref = f; + /* */ if ($assertType(_ref, ptrType$41, true)[1]) { $s = 2; continue; } + /* */ if ($assertType(_ref, ptrType$39, true)[1]) { $s = 3; continue; } + /* */ if ($assertType(_ref, ptrType$43, true)[1]) { $s = 4; continue; } + /* */ if ($assertType(_ref, ptrType$44, true)[1]) { $s = 5; continue; } + /* */ if ($assertType(_ref, ptrType$42, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref, ptrType$46, true)[1]) { $s = 7; continue; } + /* */ if ($assertType(_ref, ptrType$66, true)[1]) { $s = 8; continue; } + /* */ if ($assertType(_ref, ptrType$45, true)[1]) { $s = 9; continue; } + /* */ if ($assertType(_ref, ptrType$67, true)[1]) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ($assertType(_ref, ptrType$41, true)[1]) { */ case 2: + f$1 = _ref.$val; + _r$1 = sc.processSettings(f$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } else if ($assertType(_ref, ptrType$39, true)[1]) { */ case 3: + f$2 = _ref.$val; + _r$2 = sc.processHeaders(f$2); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } else if ($assertType(_ref, ptrType$43, true)[1]) { */ case 4: + f$3 = _ref.$val; + _r$3 = sc.processWindowUpdate(f$3); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } else if ($assertType(_ref, ptrType$44, true)[1]) { */ case 5: + f$4 = _ref.$val; + _r$4 = sc.processPing(f$4); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } else if ($assertType(_ref, ptrType$42, true)[1]) { */ case 6: + f$5 = _ref.$val; + _r$5 = sc.processData(f$5); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* } else if ($assertType(_ref, ptrType$46, true)[1]) { */ case 7: + f$6 = _ref.$val; + _r$6 = sc.processResetStream(f$6); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } else if ($assertType(_ref, ptrType$66, true)[1]) { */ case 8: + f$7 = _ref.$val; + _r$7 = sc.processPriority(f$7); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } else if ($assertType(_ref, ptrType$45, true)[1]) { */ case 9: + f$8 = _ref.$val; + _r$8 = sc.processGoAway(f$8); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return _r$8; + /* } else if ($assertType(_ref, ptrType$67, true)[1]) { */ case 10: + f$9 = _ref.$val; + $s = -1; return new http2ConnectionError(1); + /* } else { */ case 11: + f$10 = _ref; + _r$9 = f$10.Header(); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _arg = (x$4 = _r$9, new x$4.constructor.elem(x$4)); + $r = sc.vlogf("http2: server ignoring frame: %v", new sliceType([_arg])); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* } */ case 12: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processFrame }; } $f._arg = _arg; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f.f = f; $f.f$1 = f$1; $f.f$10 = f$10; $f.f$2 = f$2; $f.f$3 = f$3; $f.f$4 = f$4; $f.f$5 = f$5; $f.f$6 = f$6; $f.f$7 = f$7; $f.f$8 = f$8; $f.f$9 = f$9; $f.ok = ok; $f.sc = sc; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processFrame = function(f) { return this.$val.processFrame(f); }; + http2serverConn.ptr.prototype.processPing = function(f) { + var f, sc, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; sc = $f.sc; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (f.IsAck()) { + $s = -1; return $ifaceNil; + } + if (!((f.http2FrameHeader.StreamID === 0))) { + $s = -1; return new http2ConnectionError(1); + } + if (sc.inGoAway && !((sc.goAwayCode === 0))) { + $s = -1; return $ifaceNil; + } + $r = sc.writeFrame(new http2FrameWriteRequest.ptr((x$4 = new http2writePingAck.ptr(f), new x$4.constructor.elem(x$4)), ptrType$6.nil, $chanNil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processPing }; } $f.f = f; $f.sc = sc; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processPing = function(f) { return this.$val.processPing(f); }; + http2serverConn.ptr.prototype.processWindowUpdate = function(f) { + var _r$1, _tuple, f, sc, st, state, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; f = $f.f; sc = $f.sc; st = $f.st; state = $f.state; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((f.http2FrameHeader.StreamID === 0))) { $s = 3; continue; } + /* */ if (!sc.flow.add(((f.Increment >> 0)))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((f.http2FrameHeader.StreamID === 0))) { */ case 3: + _r$1 = sc.state(f.http2FrameHeader.StreamID); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + state = _tuple[0]; + st = _tuple[1]; + if (state === 0) { + $s = -1; return new http2ConnectionError(1); + } + if (st === ptrType$6.nil) { + $s = -1; return $ifaceNil; + } + if (!st.flow.add(((f.Increment >> 0)))) { + $s = -1; return (x$4 = http2streamError(f.http2FrameHeader.StreamID, 3), new x$4.constructor.elem(x$4)); + } + $s = 5; continue; + /* } else if (!sc.flow.add(((f.Increment >> 0)))) { */ case 4: + $s = -1; return (x$5 = new http2goAwayFlowError.ptr(), new x$5.constructor.elem(x$5)); + /* } */ case 5: + case 2: + $r = sc.scheduleFrameWrite(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processWindowUpdate }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.f = f; $f.sc = sc; $f.st = st; $f.state = state; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processWindowUpdate = function(f) { return this.$val.processWindowUpdate(f); }; + http2serverConn.ptr.prototype.processResetStream = function(f) { + var _r$1, _tuple, f, sc, st, state, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; f = $f.f; sc = $f.sc; st = $f.st; state = $f.state; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = sc.state(f.http2FrameHeader.StreamID); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + state = _tuple[0]; + st = _tuple[1]; + if (state === 0) { + $s = -1; return new http2ConnectionError(1); + } + /* */ if (!(st === ptrType$6.nil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(st === ptrType$6.nil)) { */ case 3: + $r = st.cancelCtx(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.closeStream(st, (x$4 = http2streamError(f.http2FrameHeader.StreamID, f.ErrCode), new x$4.constructor.elem(x$4))); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processResetStream }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.f = f; $f.sc = sc; $f.st = st; $f.state = state; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processResetStream = function(f) { return this.$val.processResetStream(f); }; + http2serverConn.ptr.prototype.closeStream = function(st, err) { + var _arg, _arg$1, _r$1, _r$2, _r$3, err, p, sc, st, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; err = $f.err; p = $f.p; sc = $f.sc; st = $f.st; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if ((st.state === 0) || (st.state === 4)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ((st.state === 0) || (st.state === 4)) { */ case 2: + _r$1 = fmt.Sprintf("invariant; can't close stream in state %v", new sliceType([new http2streamState(st.state)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 3: + st.state = 4; + if (!(st.writeDeadline === ptrType$57.nil)) { + st.writeDeadline.Stop(); + } + if (st.isPushed()) { + sc.curPushedStreams = sc.curPushedStreams - (1) >>> 0; + } else { + sc.curClientStreams = sc.curClientStreams - (1) >>> 0; + } + delete sc.streams[$Uint32.keyFor(st.id)]; + /* */ if ($keys(sc.streams).length === 0) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($keys(sc.streams).length === 0) { */ case 5: + $r = sc.setConnState(2); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!((x$4 = sc.srv.IdleTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { + sc.idleTimer.Reset(sc.srv.IdleTimeout); + } + _r$2 = http2h1ServerKeepAlivesDisabled(sc.hs); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (_r$2) { */ case 8: + $r = sc.startGracefulShutdownInternal(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + /* } */ case 6: + p = st.body; + /* */ if (!(p === ptrType$68.nil)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!(p === ptrType$68.nil)) { */ case 12: + _arg = ptrType$6.nil; + _r$3 = p.Len(); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$1 = _r$3; + $r = sc.sendWindowUpdate(_arg, _arg$1); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = p.CloseWithError(err); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + new http2closeWaiter(st.cw).Close(); + $r = sc.writeSched.CloseStream(st.id); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.closeStream }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.err = err; $f.p = p; $f.sc = sc; $f.st = st; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.closeStream = function(st, err) { return this.$val.closeStream(st, err); }; + http2serverConn.ptr.prototype.processSettings = function(f) { + var _r$1, err, f, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; f = $f.f; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (f.IsAck()) { + sc.unackedSettings = sc.unackedSettings - (1) >> 0; + if (sc.unackedSettings < 0) { + $s = -1; return new http2ConnectionError(1); + } + $s = -1; return $ifaceNil; + } + if (f.NumSettings() > 100 || f.HasDuplicates()) { + $s = -1; return new http2ConnectionError(1); + } + _r$1 = f.ForeachSetting($methodVal(sc, "processSetting")); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + sc.needToSendSettingsAck = true; + $r = sc.scheduleFrameWrite(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processSettings }; } $f._r$1 = _r$1; $f.err = err; $f.f = f; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processSettings = function(f) { return this.$val.processSettings(f); }; + http2serverConn.ptr.prototype.processSetting = function(s) { + var _1, _r$1, err, s, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; err = $f.err; s = $f.s; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err = $clone(s, http2Setting).Valid(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (http2VerboseLogs) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (http2VerboseLogs) { */ case 2: + $r = sc.vlogf("http2: server processing setting %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + _1 = s.ID; + /* */ if (_1 === (1)) { $s = 6; continue; } + /* */ if (_1 === (2)) { $s = 7; continue; } + /* */ if (_1 === (3)) { $s = 8; continue; } + /* */ if (_1 === (4)) { $s = 9; continue; } + /* */ if (_1 === (5)) { $s = 10; continue; } + /* */ if (_1 === (6)) { $s = 11; continue; } + /* */ if (http2VerboseLogs) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (_1 === (1)) { */ case 6: + sc.headerTableSize = s.Val; + $r = sc.hpackEncoder.SetMaxDynamicTableSize(s.Val); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 13; continue; + /* } else if (_1 === (2)) { */ case 7: + sc.pushEnabled = !((s.Val === 0)); + $s = 13; continue; + /* } else if (_1 === (3)) { */ case 8: + sc.clientMaxStreams = s.Val; + $s = 13; continue; + /* } else if (_1 === (4)) { */ case 9: + _r$1 = sc.processSettingInitialWindowSize(s.Val); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } else if (_1 === (5)) { */ case 10: + sc.maxFrameSize = ((s.Val >> 0)); + $s = 13; continue; + /* } else if (_1 === (6)) { */ case 11: + sc.peerMaxHeaderListSize = s.Val; + $s = 13; continue; + /* } else if (http2VerboseLogs) { */ case 12: + $r = sc.vlogf("http2: server ignoring unknown setting %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + case 5: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processSetting }; } $f._1 = _1; $f._r$1 = _r$1; $f.err = err; $f.s = s; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processSetting = function(s) { return this.$val.processSetting(s); }; + http2serverConn.ptr.prototype.processSettingInitialWindowSize = function(val) { + var _entry, _i, _keys, _ref, growth, old, sc, st, val, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; growth = $f.growth; old = $f.old; sc = $f.sc; st = $f.st; val = $f.val; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + old = sc.initialStreamSendWindowSize; + sc.initialStreamSendWindowSize = ((val >> 0)); + growth = ((val >> 0)) - old >> 0; + _ref = sc.streams; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + st = _entry.v; + if (!st.flow.add(growth)) { + $s = -1; return new http2ConnectionError(3); + } + _i++; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processSettingInitialWindowSize }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.growth = growth; $f.old = old; $f.sc = sc; $f.st = st; $f.val = val; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processSettingInitialWindowSize = function(val) { return this.$val.processSettingInitialWindowSize(val); }; + http2serverConn.ptr.prototype.processData = function(f) { + var _r$1, _r$2, _r$3, _tuple, _tuple$1, data, err, f, id, pad, sc, st, state, wrote, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; data = $f.data; err = $f.err; f = $f.f; id = $f.id; pad = $f.pad; sc = $f.sc; st = $f.st; state = $f.state; wrote = $f.wrote; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$13 = $f.x$13; x$14 = $f.x$14; x$15 = $f.x$15; x$16 = $f.x$16; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (sc.inGoAway && !((sc.goAwayCode === 0))) { + $s = -1; return $ifaceNil; + } + data = f.Data(); + id = $clone(f.http2FrameHeader, http2FrameHeader).Header().StreamID; + _r$1 = sc.state(id); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + state = _tuple[0]; + st = _tuple[1]; + if ((id === 0) || (state === 0)) { + $s = -1; return new http2ConnectionError(1); + } + if (state === 4) { + $s = -1; return (x$4 = http2streamError(id, 5), new x$4.constructor.elem(x$4)); + } + /* */ if (st === ptrType$6.nil || !((state === 1)) || st.gotTrailerHeader || st.resetQueued) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (st === ptrType$6.nil || !((state === 1)) || st.gotTrailerHeader || st.resetQueued) { */ case 3: + if (sc.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { + $s = -1; return (x$5 = http2streamError(id, 3), new x$5.constructor.elem(x$5)); + } + sc.inflow.take(((f.http2FrameHeader.Length >> 0))); + $r = sc.sendWindowUpdate(ptrType$6.nil, ((f.http2FrameHeader.Length >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(st === ptrType$6.nil) && st.resetQueued) { + $s = -1; return $ifaceNil; + } + $s = -1; return (x$6 = http2streamError(id, 5), new x$6.constructor.elem(x$6)); + /* } */ case 4: + if (st.body === ptrType$68.nil) { + $panic(new $String("internal error: should have a body in this state")); + } + /* */ if (!((x$7 = st.declBodyBytes, (x$7.$high === -1 && x$7.$low === 4294967295))) && (x$8 = (x$9 = st.bodyBytes, x$10 = (new $Int64(0, data.$length)), new $Int64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = st.declBodyBytes, (x$8.$high > x$11.$high || (x$8.$high === x$11.$high && x$8.$low > x$11.$low)))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!((x$7 = st.declBodyBytes, (x$7.$high === -1 && x$7.$low === 4294967295))) && (x$8 = (x$9 = st.bodyBytes, x$10 = (new $Int64(0, data.$length)), new $Int64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = st.declBodyBytes, (x$8.$high > x$11.$high || (x$8.$high === x$11.$high && x$8.$low > x$11.$low)))) { */ case 6: + _r$2 = fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", new sliceType([st.declBodyBytes])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = st.body.CloseWithError(_r$2); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return (x$12 = http2streamError(id, 1), new x$12.constructor.elem(x$12)); + /* } */ case 7: + /* */ if (f.http2FrameHeader.Length > 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (f.http2FrameHeader.Length > 0) { */ case 10: + if (st.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { + $s = -1; return (x$13 = http2streamError(id, 3), new x$13.constructor.elem(x$13)); + } + st.inflow.take(((f.http2FrameHeader.Length >> 0))); + /* */ if (data.$length > 0) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (data.$length > 0) { */ case 12: + _r$3 = st.body.Write(data); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + wrote = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return (x$14 = http2streamError(id, 5), new x$14.constructor.elem(x$14)); + } + if (!((wrote === data.$length))) { + $panic(new $String("internal error: bad Writer")); + } + st.bodyBytes = (x$15 = st.bodyBytes, x$16 = (new $Int64(0, data.$length)), new $Int64(x$15.$high + x$16.$high, x$15.$low + x$16.$low)); + /* } */ case 13: + pad = ((f.http2FrameHeader.Length >> 0)) - ((data.$length >> 0)) >> 0; + /* */ if (pad > 0) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (pad > 0) { */ case 15: + $r = sc.sendWindowUpdate32(ptrType$6.nil, pad); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.sendWindowUpdate32(st, pad); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 16: + /* } */ case 11: + /* */ if (f.StreamEnded()) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (f.StreamEnded()) { */ case 19: + $r = st.endStream(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 20: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processData }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.data = data; $f.err = err; $f.f = f; $f.id = id; $f.pad = pad; $f.sc = sc; $f.st = st; $f.state = state; $f.wrote = wrote; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$13 = x$13; $f.x$14 = x$14; $f.x$15 = x$15; $f.x$16 = x$16; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processData = function(f) { return this.$val.processData(f); }; + http2serverConn.ptr.prototype.processGoAway = function(f) { + var f, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((f.ErrCode === 0))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((f.ErrCode === 0))) { */ case 2: + $r = sc.logf("http2: received GOAWAY %+v, starting graceful shutdown", new sliceType([f])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else { */ case 3: + $r = sc.vlogf("http2: received GOAWAY %+v, starting graceful shutdown", new sliceType([f])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $r = sc.startGracefulShutdownInternal(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + sc.pushEnabled = false; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processGoAway }; } $f.f = f; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processGoAway = function(f) { return this.$val.processGoAway(f); }; + http2stream.ptr.prototype.isPushed = function() { + var _r$1, st; + st = this; + return (_r$1 = st.id % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0; + }; + http2stream.prototype.isPushed = function() { return this.$val.isPushed(); }; + http2stream.ptr.prototype.endStream = function() { + var _r$1, sc, st, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; sc = $f.sc; st = $f.st; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + st = this; + sc = st.sc; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((x$4 = st.declBodyBytes, (x$4.$high === -1 && x$4.$low === 4294967295))) && !((x$5 = st.declBodyBytes, x$6 = st.bodyBytes, (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((x$4 = st.declBodyBytes, (x$4.$high === -1 && x$4.$low === 4294967295))) && !((x$5 = st.declBodyBytes, x$6 = st.bodyBytes, (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { */ case 2: + _r$1 = fmt.Errorf("request declared a Content-Length of %d but only wrote %d bytes", new sliceType([st.declBodyBytes, st.bodyBytes])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = st.body.CloseWithError(_r$1); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else { */ case 3: + $r = st.body.closeWithErrorAndCode(io.EOF, $methodVal(st, "copyTrailersToHandlerRequest")); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = st.body.CloseWithError(io.EOF); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + st.state = 3; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2stream.ptr.prototype.endStream }; } $f._r$1 = _r$1; $f.sc = sc; $f.st = st; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2stream.prototype.endStream = function() { return this.$val.endStream(); }; + http2stream.ptr.prototype.copyTrailersToHandlerRequest = function() { + var _entry, _entry$1, _i, _key, _keys, _ref, _tuple, k, ok, st, vv; + st = this; + _ref = st.trailer; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + _tuple = (_entry$1 = st.reqTrailer[$String.keyFor(k)], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$1.nil, false]); + ok = _tuple[1]; + if (ok) { + _key = k; (st.reqTrailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + } + _i++; + } + }; + http2stream.prototype.copyTrailersToHandlerRequest = function() { return this.$val.copyTrailersToHandlerRequest(); }; + http2stream.ptr.prototype.onWriteTimeout = function() { + var _r$1, st, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; st = $f.st; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + st = this; + _r$1 = st.sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$4 = http2streamError(st.id, 2), new x$4.constructor.elem(x$4)), ptrType$6.nil, $chanNil)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2stream.ptr.prototype.onWriteTimeout }; } $f._r$1 = _r$1; $f.st = st; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2stream.prototype.onWriteTimeout = function() { return this.$val.onWriteTimeout(); }; + http2serverConn.ptr.prototype.processHeaders = function(f) { + var _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, err, err$1, err$2, f, handler, id, initialState, req, rw, sc, st, st$1, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; f = $f.f; handler = $f.handler; id = $f.id; initialState = $f.initialState; req = $f.req; rw = $f.rw; sc = $f.sc; st = $f.st; st$1 = $f.st$1; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + id = f.http2HeadersFrame.http2FrameHeader.StreamID; + if (sc.inGoAway) { + $s = -1; return $ifaceNil; + } + if (!(((_r$1 = id % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1))) { + $s = -1; return new http2ConnectionError(1); + } + st = (_entry = sc.streams[$Uint32.keyFor(f.http2HeadersFrame.http2FrameHeader.StreamID)], _entry !== undefined ? _entry.v : ptrType$6.nil); + /* */ if (!(st === ptrType$6.nil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(st === ptrType$6.nil)) { */ case 2: + if (st.resetQueued) { + $s = -1; return $ifaceNil; + } + if (st.state === 3) { + $s = -1; return (x$4 = http2streamError(id, 5), new x$4.constructor.elem(x$4)); + } + _r$2 = st.processTrailerHeaders(f); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 3: + if (id <= sc.maxClientStreamID) { + $s = -1; return new http2ConnectionError(1); + } + sc.maxClientStreamID = id; + if (!(sc.idleTimer === ptrType$57.nil)) { + sc.idleTimer.Stop(); + } + if ((sc.curClientStreams + 1 >>> 0) > sc.advMaxStreams) { + if (sc.unackedSettings === 0) { + $s = -1; return (x$5 = http2streamError(id, 1), new x$5.constructor.elem(x$5)); + } + $s = -1; return (x$6 = http2streamError(id, 7), new x$6.constructor.elem(x$6)); + } + initialState = 1; + if (f.http2HeadersFrame.StreamEnded()) { + initialState = 3; + } + _r$3 = sc.newStream(id, 0, initialState); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + st$1 = _r$3; + /* */ if (f.http2HeadersFrame.HasPriority()) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (f.http2HeadersFrame.HasPriority()) { */ case 6: + err = http2checkPriority(f.http2HeadersFrame.http2FrameHeader.StreamID, $clone(f.http2HeadersFrame.Priority, http2PriorityParam)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $r = sc.writeSched.AdjustStream(st$1.id, $clone(f.http2HeadersFrame.Priority, http2PriorityParam)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + _r$4 = sc.newWriterAndRequest(st$1, f); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rw = _tuple[0]; + req = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + st$1.reqTrailer = req.Trailer; + if (!(st$1.reqTrailer === false)) { + st$1.trailer = {}; + } + st$1.body = $assertType(req.Body, ptrType$8).pipe; + st$1.declBodyBytes = req.ContentLength; + handler = $methodVal(sc.handler, "ServeHTTP"); + /* */ if (f.Truncated) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (f.Truncated) { */ case 10: + handler = http2handleHeaderListTooLong; + $s = 12; continue; + /* } else { */ case 11: + _r$5 = http2checkValidHTTP2RequestHeaders(req.Header); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$2 = _r$5; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + handler = http2new400Handler(err$2); + } + /* } */ case 12: + /* */ if (!((x$7 = sc.hs.ReadTimeout, (x$7.$high === 0 && x$7.$low === 0)))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!((x$7 = sc.hs.ReadTimeout, (x$7.$high === 0 && x$7.$low === 0)))) { */ case 14: + _r$6 = sc.conn.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + /* } */ case 15: + $go($methodVal(sc, "runHandler"), [rw, req, handler]); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processHeaders }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.f = f; $f.handler = handler; $f.id = id; $f.initialState = initialState; $f.req = req; $f.rw = rw; $f.sc = sc; $f.st = st; $f.st$1 = st$1; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processHeaders = function(f) { return this.$val.processHeaders(f); }; + http2stream.ptr.prototype.processTrailerHeaders = function(f) { + var _entry, _i, _key, _r$1, _ref, f, hf, key, sc, st, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _r$1 = $f._r$1; _ref = $f._ref; f = $f.f; hf = $f.hf; key = $f.key; sc = $f.sc; st = $f.st; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + st = this; + sc = st.sc; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (st.gotTrailerHeader) { + $s = -1; return new http2ConnectionError(1); + } + st.gotTrailerHeader = true; + if (!f.http2HeadersFrame.StreamEnded()) { + $s = -1; return (x$4 = http2streamError(st.id, 1), new x$4.constructor.elem(x$4)); + } + if (f.PseudoFields().$length > 0) { + $s = -1; return (x$5 = http2streamError(st.id, 1), new x$5.constructor.elem(x$5)); + } + /* */ if (!(st.trailer === false)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(st.trailer === false)) { */ case 2: + _ref = f.RegularFields(); + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + _r$1 = sc.canonicalHeader(hf.Name); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + key = _r$1; + if (!httpguts.ValidTrailerHeader(key)) { + $s = -1; return (x$6 = http2streamError(st.id, 1), new x$6.constructor.elem(x$6)); + } + _key = key; (st.trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = st.trailer[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil), hf.Value) }; + _i++; + /* } */ $s = 4; continue; case 5: + /* } */ case 3: + $r = st.endStream(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2stream.ptr.prototype.processTrailerHeaders }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._r$1 = _r$1; $f._ref = _ref; $f.f = f; $f.hf = hf; $f.key = key; $f.sc = sc; $f.st = st; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2stream.prototype.processTrailerHeaders = function(f) { return this.$val.processTrailerHeaders(f); }; + http2checkPriority = function(streamID, p) { + var p, streamID, x$4; + if (streamID === p.StreamDep) { + return (x$4 = http2streamError(streamID, 1), new x$4.constructor.elem(x$4)); + } + return $ifaceNil; + }; + http2serverConn.ptr.prototype.processPriority = function(f) { + var err, f, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; f = $f.f; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + if (sc.inGoAway) { + $s = -1; return $ifaceNil; + } + err = http2checkPriority(f.http2FrameHeader.StreamID, $clone(f.http2PriorityParam, http2PriorityParam)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $r = sc.writeSched.AdjustStream(f.http2FrameHeader.StreamID, $clone(f.http2PriorityParam, http2PriorityParam)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.processPriority }; } $f.err = err; $f.f = f; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.processPriority = function(f) { return this.$val.processPriority(f); }; + http2serverConn.ptr.prototype.newStream = function(id, pusherID, state) { + var _key, _r$1, _r$2, _tuple, cancelCtx, ctx, id, pusherID, sc, st, state, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; cancelCtx = $f.cancelCtx; ctx = $f.ctx; id = $f.id; pusherID = $f.pusherID; sc = $f.sc; st = $f.st; state = $f.state; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (id === 0) { + $panic(new $String("internal error: cannot create stream with id 0")); + } + _r$1 = http2contextWithCancel(sc.baseCtx); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + ctx = _tuple[0]; + cancelCtx = _tuple[1]; + st = new http2stream.ptr(sc, id, ptrType$68.nil, $chanNil, ctx, cancelCtx, new $Int64(0, 0), new $Int64(0, 0), new http2flow.ptr(0, ptrType$33.nil), new http2flow.ptr(0, ptrType$33.nil), ptrType$6.nil, new $Int64(0, 0), 0, state, false, false, false, ptrType$57.nil, false, false); + (st.$ptr_cw || (st.$ptr_cw = new ptrType$69(function() { return this.$target.cw; }, function($v) { this.$target.cw = $v; }, st))).Init(); + st.flow.conn = sc.flow; + st.flow.add(sc.initialStreamSendWindowSize); + st.inflow.conn = sc.inflow; + st.inflow.add(sc.srv.initialStreamRecvWindowSize()); + if (!((x$4 = sc.hs.WriteTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { + st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, $methodVal(st, "onWriteTimeout")); + } + _key = id; (sc.streams || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: st }; + $r = sc.writeSched.OpenStream(st.id, new http2OpenStreamOptions.ptr(pusherID)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (st.isPushed()) { + sc.curPushedStreams = sc.curPushedStreams + (1) >>> 0; + } else { + sc.curClientStreams = sc.curClientStreams + (1) >>> 0; + } + _r$2 = sc.curOpenStreams(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2 === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$2 === 1) { */ case 4: + $r = sc.setConnState(1); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return st; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.newStream }; } $f._key = _key; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.cancelCtx = cancelCtx; $f.ctx = ctx; $f.id = id; $f.pusherID = pusherID; $f.sc = sc; $f.st = st; $f.state = state; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.newStream = function(id, pusherID, state) { return this.$val.newStream(id, pusherID, state); }; + http2serverConn.ptr.prototype.newWriterAndRequest = function(st, f) { + var _entry, _i, _r$1, _r$2, _ref, _tuple, _tuple$1, _tuple$2, bodyOpen, err, f, hf, isConnect, ok, req, rp, rw, sc, st, vv, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; bodyOpen = $f.bodyOpen; err = $f.err; f = $f.f; hf = $f.hf; isConnect = $f.isConnect; ok = $f.ok; req = $f.req; rp = $f.rp; rw = $f.rw; sc = $f.sc; st = $f.st; vv = $f.vv; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + rp = new http2requestParam.ptr(f.PseudoValue("method"), f.PseudoValue("scheme"), f.PseudoValue("authority"), f.PseudoValue("path"), false); + isConnect = rp.method === "CONNECT"; + if (isConnect) { + if (!(rp.path === "") || !(rp.scheme === "") || rp.authority === "") { + $s = -1; return [ptrType$5.nil, ptrType$7.nil, (x$4 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$4.constructor.elem(x$4))]; + } + } else if (rp.method === "" || rp.path === "" || (!(rp.scheme === "https") && !(rp.scheme === "http"))) { + $s = -1; return [ptrType$5.nil, ptrType$7.nil, (x$5 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$5.constructor.elem(x$5))]; + } + bodyOpen = !f.http2HeadersFrame.StreamEnded(); + if (rp.method === "HEAD" && bodyOpen) { + $s = -1; return [ptrType$5.nil, ptrType$7.nil, (x$6 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$6.constructor.elem(x$6))]; + } + rp.header = {}; + _ref = f.RegularFields(); + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + _r$1 = sc.canonicalHeader(hf.Name); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = new Header(rp.header).Add(_r$1, hf.Value); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 2; continue; case 3: + if (rp.authority === "") { + rp.authority = new Header(rp.header).Get("Host"); + } + _r$2 = sc.newWriterAndRequestNoBody(st, $clone(rp, http2requestParam)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + rw = _tuple[0]; + req = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$5.nil, ptrType$7.nil, err]; + } + if (bodyOpen) { + _tuple$1 = (_entry = rp.header[$String.keyFor("Content-Length")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + vv = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + _tuple$2 = strconv.ParseInt((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]), 10, 64); + req.ContentLength = _tuple$2[0]; + } else { + req.ContentLength = new $Int64(-1, 4294967295); + } + $assertType(req.Body, ptrType$8).pipe = new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), new http2dataBuffer.ptr(sliceType$5.nil, 0, 0, 0, req.ContentLength), $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError); + } + $s = -1; return [rw, req, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.newWriterAndRequest }; } $f._entry = _entry; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.bodyOpen = bodyOpen; $f.err = err; $f.f = f; $f.hf = hf; $f.isConnect = isConnect; $f.ok = ok; $f.req = req; $f.rp = rp; $f.rw = rw; $f.sc = sc; $f.st = st; $f.vv = vv; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.newWriterAndRequest = function(st, f) { return this.$val.newWriterAndRequest(st, f); }; + http2serverConn.ptr.prototype.newWriterAndRequestNoBody = function(st, rp) { + var _1, _entry, _entry$1, _i, _i$1, _key, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tuple, body$1, bwSave, cookies, err, key, needsContinue, req, requestURI, rp, rw, rws, sc, st, tlsState, trailer, url_, v, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _key = $f._key; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; body$1 = $f.body$1; bwSave = $f.bwSave; cookies = $f.cookies; err = $f.err; key = $f.key; needsContinue = $f.needsContinue; req = $f.req; requestURI = $f.requestURI; rp = $f.rp; rw = $f.rw; rws = $f.rws; sc = $f.sc; st = $f.st; tlsState = $f.tlsState; trailer = $f.trailer; url_ = $f.url_; v = $f.v; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + tlsState = ptrType$17.nil; + if (rp.scheme === "https") { + tlsState = sc.tlsState; + } + needsContinue = new Header(rp.header).Get("Expect") === "100-continue"; + if (needsContinue) { + new Header(rp.header).Del("Expect"); + } + cookies = (_entry = rp.header[$String.keyFor("Cookie")], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (cookies.$length > 1) { + new Header(rp.header).Set("Cookie", strings.Join(cookies, "; ")); + } + trailer = false; + _ref = (_entry$1 = rp.header[$String.keyFor("Trailer")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = strings.Split(v, ","); + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + key = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _r$1 = strings.TrimSpace(key); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = CanonicalHeaderKey(_r$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + key = _r$2; + _1 = key; + if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { + } else { + if (trailer === false) { + trailer = {}; + } + _key = key; (trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$1.nil }; + } + _i$1++; + /* } */ $s = 4; continue; case 5: + _i++; + /* } */ $s = 2; continue; case 3: + delete rp.header[$String.keyFor("Trailer")]; + url_ = ptrType$19.nil; + requestURI = ""; + /* */ if (rp.method === "CONNECT") { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (rp.method === "CONNECT") { */ case 8: + url_ = new url.URL.ptr("", "", ptrType$18.nil, rp.authority, "", "", false, "", ""); + requestURI = rp.authority; + $s = 10; continue; + /* } else { */ case 9: + err = $ifaceNil; + _r$3 = url.ParseRequestURI(rp.path); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + url_ = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$5.nil, ptrType$7.nil, (x$4 = http2streamError(st.id, 1), new x$4.constructor.elem(x$4))]; + } + requestURI = rp.path; + /* } */ case 10: + body$1 = new http2requestBody.ptr(st, sc, false, false, ptrType$68.nil, needsContinue); + req = new Request.ptr(rp.method, url_, "HTTP/2.0", 2, 0, rp.header, body$1, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, rp.authority, false, false, ptrType$20.nil, trailer, sc.remoteAddrStr, requestURI, tlsState, $chanNil, ptrType$16.nil, $ifaceNil); + req = http2requestWithContext(req, st.ctx); + _r$4 = http2responseWriterStatePool.Get(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + rws = $assertType(_r$4, ptrType$70); + bwSave = rws.bw; + http2responseWriterState.copy(rws, new http2responseWriterState.ptr(ptrType$6.nil, ptrType$7.nil, ptrType$8.nil, ptrType$9.nil, ptrType$10.nil, false, false, sliceType$1.nil, 0, false, false, false, false, new $Int64(0, 0), new $Int64(0, 0), new sync.Mutex.ptr(0, 0), $chanNil)); + rws.conn = sc; + rws.bw = bwSave; + rws.bw.Reset((x$5 = new http2chunkWriter.ptr(rws), new x$5.constructor.elem(x$5))); + rws.stream = st; + rws.req = req; + rws.body = body$1; + rw = new http2responseWriter.ptr(rws); + $s = -1; return [rw, req, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.newWriterAndRequestNoBody }; } $f._1 = _1; $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._key = _key; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.body$1 = body$1; $f.bwSave = bwSave; $f.cookies = cookies; $f.err = err; $f.key = key; $f.needsContinue = needsContinue; $f.req = req; $f.requestURI = requestURI; $f.rp = rp; $f.rw = rw; $f.rws = rws; $f.sc = sc; $f.st = st; $f.tlsState = tlsState; $f.trailer = trailer; $f.url_ = url_; $f.v = v; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.newWriterAndRequestNoBody = function(st, rp) { return this.$val.newWriterAndRequestNoBody(st, rp); }; + http2serverConn.ptr.prototype.runHandler = function(rw, req, handler) { + var didPanic, handler, req, rw, sc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; didPanic = $f.didPanic; handler = $f.handler; req = $f.req; rw = $f.rw; sc = $f.sc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + didPanic = [didPanic]; + rw = [rw]; + sc = [sc]; + sc[0] = this; + didPanic[0] = true; + $deferred.push([(function(didPanic, rw, sc) { return function $b() { + var _arg, _arg$1, _arg$2, _r$1, _r$2, buf, e, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$1 = $f._r$1; _r$2 = $f._r$2; buf = $f.buf; e = $f.e; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = rw[0].rws.stream.cancelCtx(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (didPanic[0]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (didPanic[0]) { */ case 2: + e = $recover(); + _r$1 = sc[0].writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$4 = new http2handlerPanicRST.ptr(rw[0].rws.stream.id), new x$4.constructor.elem(x$4)), rw[0].rws.stream, $chanNil)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* */ if (http2shouldLogPanic(e)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (http2shouldLogPanic(e)) { */ case 5: + buf = $makeSlice(sliceType$3, 65536); + buf = $subslice(buf, 0, runtime.Stack(buf, false)); + _r$2 = sc[0].conn.RemoteAddr(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg = _r$2; + _arg$1 = e; + _arg$2 = buf; + $r = sc[0].logf("http2: panic serving %v: %v\n%s", new sliceType([_arg, _arg$1, _arg$2])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + $s = -1; return; + /* } */ case 3: + $r = rw[0].handlerDone(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.buf = buf; $f.e = e; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; })(didPanic, rw, sc), []]); + $r = handler(rw[0], req); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + didPanic[0] = false; + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.runHandler }; } $f.didPanic = didPanic; $f.handler = handler; $f.req = req; $f.rw = rw; $f.sc = sc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2serverConn.prototype.runHandler = function(rw, req, handler) { return this.$val.runHandler(rw, req, handler); }; + http2handleHeaderListTooLong = function(w, r) { + var _r$1, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = w.WriteHeader(431); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = io.WriteString(w, "

HTTP Error 431

Request Header Field(s) Too Large

"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2handleHeaderListTooLong }; } $f._r$1 = _r$1; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.ptr.prototype.writeHeaders = function(st, headerData) { + var _r$1, _r$2, _r$3, _selection, err, err$1, errc, headerData, sc, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _selection = $f._selection; err = $f.err; err$1 = $f.err$1; errc = $f.errc; headerData = $f.headerData; sc = $f.sc; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + errc = $chanNil; + /* */ if (!(headerData.h === false)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(headerData.h === false)) { */ case 2: + _r$1 = http2errChanPool.Get(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + errc = $assertType(_r$1, chanType); + /* } */ case 3: + _r$2 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr(headerData, st, errc)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (!(errc === $chanNil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(errc === $chanNil)) { */ case 6: + _r$3 = $select([[errc], [sc.doneServing], [st.cw]]); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection = _r$3; + if (_selection[0] === 0) { + err$1 = _selection[1][0]; + http2errChanPool.Put(new chanType(errc)); + $s = -1; return err$1; + } else if (_selection[0] === 1) { + $s = -1; return http2errClientDisconnected; + } else if (_selection[0] === 2) { + $s = -1; return http2errStreamClosed; + } + /* } */ case 7: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.writeHeaders }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._selection = _selection; $f.err = err; $f.err$1 = err$1; $f.errc = errc; $f.headerData = headerData; $f.sc = sc; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.writeHeaders = function(st, headerData) { return this.$val.writeHeaders(st, headerData); }; + http2serverConn.ptr.prototype.write100ContinueHeaders = function(st) { + var _r$1, sc, st, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; sc = $f.sc; st = $f.st; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + _r$1 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$4 = new http2write100ContinueHeadersFrame.ptr(st.id), new x$4.constructor.elem(x$4)), st, $chanNil)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.write100ContinueHeaders }; } $f._r$1 = _r$1; $f.sc = sc; $f.st = st; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.write100ContinueHeaders = function(st) { return this.$val.write100ContinueHeaders(st); }; + http2serverConn.ptr.prototype.noteBodyReadFromHandler = function(st, n, err) { + var _r$1, _selection, err, n, sc, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; err = $f.err; n = $f.n; sc = $f.sc; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (n > 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (n > 0) { */ case 2: + _r$1 = $select([[sc.bodyReadCh, new http2bodyReadMsg.ptr(st, n)], [sc.doneServing]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.noteBodyReadFromHandler }; } $f._r$1 = _r$1; $f._selection = _selection; $f.err = err; $f.n = n; $f.sc = sc; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.noteBodyReadFromHandler = function(st, n, err) { return this.$val.noteBodyReadFromHandler(st, n, err); }; + http2serverConn.ptr.prototype.noteBodyRead = function(st, n) { + var n, sc, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; n = $f.n; sc = $f.sc; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sc.sendWindowUpdate(ptrType$6.nil, n); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((st.state === 3)) && !((st.state === 4))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((st.state === 3)) && !((st.state === 4))) { */ case 3: + $r = sc.sendWindowUpdate(st, n); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.noteBodyRead }; } $f.n = n; $f.sc = sc; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.noteBodyRead = function(st, n) { return this.$val.noteBodyRead(st, n); }; + http2serverConn.ptr.prototype.sendWindowUpdate = function(st, n) { + var n, sc, st, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; n = $f.n; sc = $f.sc; st = $f.st; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* while (true) { */ case 2: + /* if (!(n >= 2147483647)) { break; } */ if(!(n >= 2147483647)) { $s = 3; continue; } + $r = sc.sendWindowUpdate32(st, 2147483647); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + n = n - (2147483647) >> 0; + /* } */ $s = 2; continue; case 3: + $r = sc.sendWindowUpdate32(st, ((n >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.sendWindowUpdate }; } $f.n = n; $f.sc = sc; $f.st = st; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.sendWindowUpdate = function(st, n) { return this.$val.sendWindowUpdate(st, n); }; + http2serverConn.ptr.prototype.sendWindowUpdate32 = function(st, n) { + var n, ok, sc, st, streamID, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; n = $f.n; ok = $f.ok; sc = $f.sc; st = $f.st; streamID = $f.streamID; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sc = this; + $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (n === 0) { + $s = -1; return; + } + if (n < 0) { + $panic(new $String("negative update")); + } + streamID = 0; + if (!(st === ptrType$6.nil)) { + streamID = st.id; + } + $r = sc.writeFrame(new http2FrameWriteRequest.ptr((x$4 = new http2writeWindowUpdate.ptr(streamID, ((n >>> 0))), new x$4.constructor.elem(x$4)), st, $chanNil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ok = false; + if (st === ptrType$6.nil) { + ok = sc.inflow.add(n); + } else { + ok = st.inflow.add(n); + } + if (!ok) { + $panic(new $String("internal error; sent too many window updates without decrements?")); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.sendWindowUpdate32 }; } $f.n = n; $f.ok = ok; $f.sc = sc; $f.st = st; $f.streamID = streamID; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.sendWindowUpdate32 = function(st, n) { return this.$val.sendWindowUpdate32(st, n); }; + http2requestBody.ptr.prototype.Close = function() { + var b, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + /* */ if (!(b.pipe === ptrType$68.nil) && !b.closed) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(b.pipe === ptrType$68.nil) && !b.closed) { */ case 1: + $r = b.pipe.BreakWithError(http2errClosedBody); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + b.closed = true; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2requestBody.ptr.prototype.Close }; } $f.b = b; $f.$s = $s; $f.$r = $r; return $f; + }; + http2requestBody.prototype.Close = function() { return this.$val.Close(); }; + http2requestBody.ptr.prototype.Read = function(p) { + var _r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + b = this; + /* */ if (b.needsContinue) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (b.needsContinue) { */ case 1: + b.needsContinue = false; + $r = b.conn.write100ContinueHeaders(b.stream); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (b.pipe === ptrType$68.nil || b.sawEOF) { + _tmp = 0; + _tmp$1 = io.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = b.pipe.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, io.EOF)) { + b.sawEOF = true; + } + if (b.conn === ptrType$9.nil && http2inTests) { + $s = -1; return [n, err]; + } + $r = b.conn.noteBodyReadFromHandler(b.stream, n, err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2requestBody.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2requestBody.prototype.Read = function(p) { return this.$val.Read(p); }; + http2chunkWriter.ptr.prototype.Write = function(p) { + var _r$1, _tuple, cw, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; cw = $f.cw; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + cw = this; + _r$1 = cw.rws.writeChunk(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2chunkWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.cw = cw; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2chunkWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + http2responseWriterState.ptr.prototype.hasTrailers = function() { + var rws; + rws = this; + return !((rws.trailers.$length === 0)); + }; + http2responseWriterState.prototype.hasTrailers = function() { return this.$val.hasTrailers(); }; + http2responseWriterState.ptr.prototype.declareTrailer = function(k) { + var k, rws, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; k = $f.k; rws = $f.rws; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rws = this; + k = CanonicalHeaderKey(k); + /* */ if (!httpguts.ValidTrailerHeader(k)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!httpguts.ValidTrailerHeader(k)) { */ case 1: + $r = rws.conn.logf("ignoring invalid trailer %q", new sliceType([new $String(k)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + if (!http2strSliceContains(rws.trailers, k)) { + rws.trailers = $append(rws.trailers, k); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriterState.ptr.prototype.declareTrailer }; } $f.k = k; $f.rws = rws; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriterState.prototype.declareTrailer = function(k) { return this.$val.declareTrailer(k); }; + http2responseWriterState.ptr.prototype.writeChunk = function(p) { + var _entry, _entry$1, _entry$2, _entry$3, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, clen, clen64, ctype, date, endStream, endStream$1, err, err$1, err$2, hasContentType, isHeadResp, n, ok, ok$1, p, rws, v, v$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _entry$3 = $f._entry$3; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; clen = $f.clen; clen64 = $f.clen64; ctype = $f.ctype; date = $f.date; endStream = $f.endStream; endStream$1 = $f.endStream$1; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; hasContentType = $f.hasContentType; isHeadResp = $f.isHeadResp; n = $f.n; ok = $f.ok; ok$1 = $f.ok$1; p = $f.p; rws = $f.rws; v = $f.v; v$1 = $f.v$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + rws = this; + /* */ if (!rws.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!rws.wroteHeader) { */ case 1: + $r = rws.writeHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + isHeadResp = rws.req.Method === "HEAD"; + /* */ if (!rws.sentHeader) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!rws.sentHeader) { */ case 4: + rws.sentHeader = true; + _tmp = ""; + _tmp$1 = ""; + ctype = _tmp; + clen = _tmp$1; + clen = new Header(rws.snapHeader).Get("Content-Length"); + if (!(clen === "")) { + new Header(rws.snapHeader).Del("Content-Length"); + _tuple = strconv.ParseInt(clen, 10, 64); + clen64 = _tuple[0]; + err$1 = _tuple[1]; + if ($interfaceIsEqual(err$1, $ifaceNil) && (clen64.$high > 0 || (clen64.$high === 0 && clen64.$low >= 0))) { + rws.sentContentLen = clen64; + } else { + clen = ""; + } + } + if (clen === "" && rws.handlerDone && http2bodyAllowedForStatus(rws.status) && (p.$length > 0 || !isHeadResp)) { + clen = strconv.Itoa(p.$length); + } + _tuple$1 = (_entry = rws.snapHeader[$String.keyFor("Content-Type")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + hasContentType = _tuple$1[1]; + /* */ if (!hasContentType && http2bodyAllowedForStatus(rws.status) && p.$length > 0) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!hasContentType && http2bodyAllowedForStatus(rws.status) && p.$length > 0) { */ case 6: + _r$1 = DetectContentType(p); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ctype = _r$1; + /* } */ case 7: + date = ""; + _tuple$2 = (_entry$1 = rws.snapHeader[$String.keyFor("Date")], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$1.nil, false]); + ok = _tuple$2[1]; + /* */ if (!ok) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!ok) { */ case 9: + _r$2 = $clone($clone(time.Now(), time.Time).UTC(), time.Time).Format("Mon, 02 Jan 2006 15:04:05 GMT"); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + date = _r$2; + /* } */ case 10: + _ref = (_entry$2 = rws.snapHeader[$String.keyFor("Trailer")], _entry$2 !== undefined ? _entry$2.v : sliceType$1.nil); + _i = 0; + /* while (true) { */ case 12: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 13; continue; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = http2foreachHeaderElement(v, $methodVal(rws, "declareTrailer")); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 12; continue; case 13: + _tuple$3 = (_entry$3 = rws.snapHeader[$String.keyFor("Connection")], _entry$3 !== undefined ? [_entry$3.v, true] : [sliceType$1.nil, false]); + ok$1 = _tuple$3[1]; + /* */ if (ok$1) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (ok$1) { */ case 15: + v$1 = new Header(rws.snapHeader).Get("Connection"); + delete rws.snapHeader[$String.keyFor("Connection")]; + /* */ if (v$1 === "close") { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (v$1 === "close") { */ case 17: + $r = rws.conn.startGracefulShutdown(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 18: + /* } */ case 16: + endStream = (rws.handlerDone && !rws.hasTrailers() && (p.$length === 0)) || isHeadResp; + _r$3 = rws.conn.writeHeaders(rws.stream, new http2writeResHeaders.ptr(rws.stream.id, rws.status, rws.snapHeader, sliceType$1.nil, endStream, date, ctype, clen)); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + if (!($interfaceIsEqual(err, $ifaceNil))) { + rws.dirty = true; + _tmp$2 = 0; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + if (endStream) { + _tmp$4 = 0; + _tmp$5 = $ifaceNil; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + /* } */ case 5: + if (isHeadResp) { + _tmp$6 = p.$length; + _tmp$7 = $ifaceNil; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + } + if ((p.$length === 0) && !rws.handlerDone) { + _tmp$8 = 0; + _tmp$9 = $ifaceNil; + n = _tmp$8; + err = _tmp$9; + $s = -1; return [n, err]; + } + /* */ if (rws.handlerDone) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (rws.handlerDone) { */ case 21: + $r = rws.promoteUndeclaredTrailers(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 22: + endStream$1 = rws.handlerDone && !rws.hasTrailers(); + /* */ if (p.$length > 0 || endStream$1) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (p.$length > 0 || endStream$1) { */ case 24: + _r$4 = rws.conn.writeDataFromHandler(rws.stream, p, endStream$1); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$2 = _r$4; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + rws.dirty = true; + _tmp$10 = 0; + _tmp$11 = err$2; + n = _tmp$10; + err = _tmp$11; + $s = -1; return [n, err]; + } + /* } */ case 25: + /* */ if (rws.handlerDone && rws.hasTrailers()) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (rws.handlerDone && rws.hasTrailers()) { */ case 27: + _r$5 = rws.conn.writeHeaders(rws.stream, new http2writeResHeaders.ptr(rws.stream.id, 0, rws.handlerHeader, rws.trailers, true, "", "", "")); /* */ $s = 29; case 29: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + if (!($interfaceIsEqual(err, $ifaceNil))) { + rws.dirty = true; + } + _tmp$12 = p.$length; + _tmp$13 = err; + n = _tmp$12; + err = _tmp$13; + $s = -1; return [n, err]; + /* } */ case 28: + _tmp$14 = p.$length; + _tmp$15 = $ifaceNil; + n = _tmp$14; + err = _tmp$15; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriterState.ptr.prototype.writeChunk }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._entry$3 = _entry$3; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.clen = clen; $f.clen64 = clen64; $f.ctype = ctype; $f.date = date; $f.endStream = endStream; $f.endStream$1 = endStream$1; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.hasContentType = hasContentType; $f.isHeadResp = isHeadResp; $f.n = n; $f.ok = ok; $f.ok$1 = ok$1; $f.p = p; $f.rws = rws; $f.v = v; $f.v$1 = v$1; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriterState.prototype.writeChunk = function(p) { return this.$val.writeChunk(p); }; + http2responseWriterState.ptr.prototype.promoteUndeclaredTrailers = function() { + var _entry, _i, _key, _keys, _r$1, _ref, k, rws, sorter, trailerKey, vv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; k = $f.k; rws = $f.rws; sorter = $f.sorter; trailerKey = $f.trailerKey; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rws = this; + _ref = rws.handlerHeader; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 1: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 1; continue; + } + k = _entry.k; + vv = _entry.v; + /* */ if (!strings.HasPrefix(k, "Trailer:")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!strings.HasPrefix(k, "Trailer:")) { */ case 3: + _i++; + /* continue; */ $s = 1; continue; + /* } */ case 4: + trailerKey = strings.TrimPrefix(k, "Trailer:"); + $r = rws.declareTrailer(trailerKey); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _key = CanonicalHeaderKey(trailerKey); (rws.handlerHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + _i++; + /* } */ $s = 1; continue; case 2: + /* */ if (rws.trailers.$length > 1) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (rws.trailers.$length > 1) { */ case 6: + _r$1 = http2sorterPool.Get(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + sorter = $assertType(_r$1, ptrType$71); + $r = sorter.SortStrings(rws.trailers); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + http2sorterPool.Put(sorter); + /* } */ case 7: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriterState.ptr.prototype.promoteUndeclaredTrailers }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f.k = k; $f.rws = rws; $f.sorter = sorter; $f.trailerKey = trailerKey; $f.vv = vv; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriterState.prototype.promoteUndeclaredTrailers = function() { return this.$val.promoteUndeclaredTrailers(); }; + http2responseWriter.ptr.prototype.Flush = function() { + var _r$1, _r$2, err, rws, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; err = $f.err; rws = $f.rws; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + rws = w.rws; + if (rws === ptrType$70.nil) { + $panic(new $String("Header called after Handler finished")); + } + /* */ if (rws.bw.Buffered() > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (rws.bw.Buffered() > 0) { */ case 1: + _r$1 = rws.bw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return; + } + $s = 3; continue; + /* } else { */ case 2: + _r$2 = rws.writeChunk(sliceType$3.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.Flush }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.err = err; $f.rws = rws; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.Flush = function() { return this.$val.Flush(); }; + http2responseWriter.ptr.prototype.CloseNotify = function() { + var ch, cw, rws, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; ch = $f.ch; cw = $f.cw; rws = $f.rws; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ch = [ch]; + cw = [cw]; + w = this; + rws = w.rws; + if (rws === ptrType$70.nil) { + $panic(new $String("CloseNotify called after Handler finished")); + } + $r = rws.closeNotifierMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ch[0] = rws.closeNotifierCh; + /* */ if (ch[0] === $chanNil) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ch[0] === $chanNil) { */ case 2: + ch[0] = new $Chan($Bool, 1); + rws.closeNotifierCh = ch[0]; + cw[0] = rws.stream.cw; + $go((function(ch, cw) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = new http2closeWaiter(cw[0]).Wait(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = $send(ch[0], true); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(ch, cw), []); + /* } */ case 3: + $r = rws.closeNotifierMu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return ch[0]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.CloseNotify }; } $f.ch = ch; $f.cw = cw; $f.rws = rws; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.CloseNotify = function() { return this.$val.CloseNotify(); }; + http2responseWriter.ptr.prototype.Header = function() { + var rws, w; + w = this; + rws = w.rws; + if (rws === ptrType$70.nil) { + $panic(new $String("Header called after Handler finished")); + } + if (rws.handlerHeader === false) { + rws.handlerHeader = {}; + } + return rws.handlerHeader; + }; + http2responseWriter.prototype.Header = function() { return this.$val.Header(); }; + http2checkWriteHeaderCode = function(code) { + var _r$1, code, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; code = $f.code; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (code < 100 || code > 999) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (code < 100 || code > 999) { */ case 1: + _r$1 = fmt.Sprintf("invalid WriteHeader code %v", new sliceType([new $Int(code)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2checkWriteHeaderCode }; } $f._r$1 = _r$1; $f.code = code; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.ptr.prototype.WriteHeader = function(code) { + var code, rws, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; code = $f.code; rws = $f.rws; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + rws = w.rws; + if (rws === ptrType$70.nil) { + $panic(new $String("WriteHeader called after Handler finished")); + } + $r = rws.writeHeader(code); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.WriteHeader }; } $f.code = code; $f.rws = rws; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.WriteHeader = function(code) { return this.$val.WriteHeader(code); }; + http2responseWriterState.ptr.prototype.writeHeader = function(code) { + var code, rws, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; code = $f.code; rws = $f.rws; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rws = this; + /* */ if (!rws.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!rws.wroteHeader) { */ case 1: + $r = http2checkWriteHeaderCode(code); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + rws.wroteHeader = true; + rws.status = code; + if ($keys(rws.handlerHeader).length > 0) { + rws.snapHeader = http2cloneHeader(rws.handlerHeader); + } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriterState.ptr.prototype.writeHeader }; } $f.code = code; $f.rws = rws; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriterState.prototype.writeHeader = function(code) { return this.$val.writeHeader(code); }; + http2cloneHeader = function(h) { + var _entry, _i, _key, _keys, _ref, h, h2, k, vv, vv2, x$4; + h2 = (x$4 = $keys(h).length, ((x$4 < 0 || x$4 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + _ref = h; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + vv2 = $makeSlice(sliceType$1, vv.$length); + $copySlice(vv2, vv); + _key = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv2 }; + _i++; + } + return h2; + }; + http2responseWriter.ptr.prototype.Write = function(p) { + var _r$1, _tuple, err, n, p, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.write(p.$length, p, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + http2responseWriter.ptr.prototype.WriteString = function(s) { + var _r$1, _tuple, err, n, s, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; n = $f.n; s = $f.s; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.write(s.length, sliceType$3.nil, s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.WriteString }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.s = s; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + http2responseWriter.ptr.prototype.write = function(lenData, dataB, dataS) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dataB, dataS, err, lenData, n, rws, w, x$10, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; dataB = $f.dataB; dataS = $f.dataS; err = $f.err; lenData = $f.lenData; n = $f.n; rws = $f.rws; w = $f.w; x$10 = $f.x$10; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + rws = w.rws; + if (rws === ptrType$70.nil) { + $panic(new $String("Write called after Handler finished")); + } + /* */ if (!rws.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!rws.wroteHeader) { */ case 1: + $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (!http2bodyAllowedForStatus(rws.status)) { + _tmp = 0; + _tmp$1 = $pkg.ErrBodyNotAllowed; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + rws.wroteBytes = (x$4 = rws.wroteBytes, x$5 = (x$6 = (new $Int64(0, dataB.$length)), x$7 = (new $Int64(0, dataS.length)), new $Int64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + if (!((x$8 = rws.sentContentLen, (x$8.$high === 0 && x$8.$low === 0))) && (x$9 = rws.wroteBytes, x$10 = rws.sentContentLen, (x$9.$high > x$10.$high || (x$9.$high === x$10.$high && x$9.$low > x$10.$low)))) { + _tmp$2 = 0; + _tmp$3 = errors.New("http2: handler wrote more than declared Content-Length"); + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + /* */ if (!(dataB === sliceType$3.nil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(dataB === sliceType$3.nil)) { */ case 4: + _r$1 = rws.bw.Write(dataB); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* } else { */ case 5: + _r$2 = rws.bw.WriteString(dataS); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 6: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.write }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.dataB = dataB; $f.dataS = dataS; $f.err = err; $f.lenData = lenData; $f.n = n; $f.rws = rws; $f.w = w; $f.x$10 = x$10; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.write = function(lenData, dataB, dataS) { return this.$val.write(lenData, dataB, dataS); }; + http2responseWriter.ptr.prototype.handlerDone = function() { + var dirty, rws, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; dirty = $f.dirty; rws = $f.rws; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + rws = w.rws; + dirty = rws.dirty; + rws.handlerDone = true; + $r = w.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + w.rws = ptrType$70.nil; + if (!dirty) { + http2responseWriterStatePool.Put(rws); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.handlerDone }; } $f.dirty = dirty; $f.rws = rws; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.handlerDone = function() { return this.$val.handlerDone(); }; + http2responseWriter.ptr.prototype.push = function(target, opts) { + var _1, _entry, _i, _keys, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, err, err$1, err$2, k, msg, opts, sc, st, target, u, w, wantScheme, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _selection = $f._selection; _selection$1 = $f._selection$1; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; k = $f.k; msg = $f.msg; opts = $f.opts; sc = $f.sc; st = $f.st; target = $f.target; u = $f.u; w = $f.w; wantScheme = $f.wantScheme; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + st = w.rws.stream; + sc = st.sc; + $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (st.isPushed()) { + $s = -1; return http2ErrRecursivePush; + } + if (opts.Method === "") { + opts.Method = "GET"; + } + if (opts.Header === false) { + opts.Header = $makeMap($String.keyFor, []); + } + wantScheme = "http"; + if (!(w.rws.req.TLS === ptrType$17.nil)) { + wantScheme = "https"; + } + _r$1 = url.Parse(target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + u = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (u.Scheme === "") { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (u.Scheme === "") { */ case 3: + /* */ if (!strings.HasPrefix(target, "/")) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!strings.HasPrefix(target, "/")) { */ case 6: + _r$2 = fmt.Errorf("target must be an absolute URL or an absolute path: %q", new sliceType([new $String(target)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 7: + u.Scheme = wantScheme; + u.Host = w.rws.req.Host; + $s = 5; continue; + /* } else { */ case 4: + /* */ if (!(u.Scheme === wantScheme)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(u.Scheme === wantScheme)) { */ case 9: + _r$3 = fmt.Errorf("cannot push URL with scheme %q from request with scheme %q", new sliceType([new $String(u.Scheme), new $String(wantScheme)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 10: + if (u.Host === "") { + $s = -1; return errors.New("URL must have a host"); + } + /* } */ case 5: + _ref = opts.Header; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 12: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 13; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 12; continue; + } + k = _entry.k; + /* */ if (strings.HasPrefix(k, ":")) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (strings.HasPrefix(k, ":")) { */ case 14: + _r$4 = fmt.Errorf("promised request headers cannot include pseudo header %q", new sliceType([new $String(k)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 15: + _r$5 = strings.ToLower(k); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _1 = _r$5; + /* */ if (_1 === ("content-length") || _1 === ("content-encoding") || _1 === ("trailer") || _1 === ("te") || _1 === ("expect") || _1 === ("host")) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (_1 === ("content-length") || _1 === ("content-encoding") || _1 === ("trailer") || _1 === ("te") || _1 === ("expect") || _1 === ("host")) { */ case 19: + _r$6 = fmt.Errorf("promised request headers cannot include %q", new sliceType([new $String(k)])); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } */ case 20: + case 17: + _i++; + /* } */ $s = 12; continue; case 13: + _r$7 = http2checkValidHTTP2RequestHeaders(opts.Header); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err$1 = _r$7; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* */ if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { */ case 23: + _r$8 = fmt.Errorf("method %q must be GET or HEAD", new sliceType([new $String(opts.Method)])); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return _r$8; + /* } */ case 24: + _r$9 = http2errChanPool.Get(); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + msg = new http2startPushRequest.ptr(st, opts.Method, u, http2cloneHeader(opts.Header), $assertType(_r$9, chanType)); + _r$10 = $select([[sc.doneServing], [st.cw], [sc.serveMsgCh, msg]]); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _selection = _r$10; + /* */ if (_selection[0] === 0) { $s = 28; continue; } + /* */ if (_selection[0] === 1) { $s = 29; continue; } + /* */ if (_selection[0] === 2) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (_selection[0] === 0) { */ case 28: + $s = -1; return http2errClientDisconnected; + /* } else if (_selection[0] === 1) { */ case 29: + $s = -1; return http2errStreamClosed; + /* } else if (_selection[0] === 2) { */ case 30: + /* } */ case 31: + _r$11 = $select([[sc.doneServing], [st.cw], [msg.done]]); /* */ $s = 32; case 32: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _selection$1 = _r$11; + if (_selection$1[0] === 0) { + $s = -1; return http2errClientDisconnected; + } else if (_selection$1[0] === 1) { + $s = -1; return http2errStreamClosed; + } else if (_selection$1[0] === 2) { + err$2 = _selection$1[1][0]; + http2errChanPool.Put(new chanType(msg.done)); + $s = -1; return err$2; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2responseWriter.ptr.prototype.push }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._selection = _selection; $f._selection$1 = _selection$1; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.k = k; $f.msg = msg; $f.opts = opts; $f.sc = sc; $f.st = st; $f.target = target; $f.u = u; $f.w = w; $f.wantScheme = wantScheme; $f.$s = $s; $f.$r = $r; return $f; + }; + http2responseWriter.prototype.push = function(target, opts) { return this.$val.push(target, opts); }; + http2serverConn.ptr.prototype.startPush = function(msg) { + var allocatePromisedID, msg, sc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; allocatePromisedID = $f.allocatePromisedID; msg = $f.msg; sc = $f.sc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + msg = [msg]; + sc = [sc]; + sc[0] = this; + $r = sc[0].serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((msg[0].parent.state === 1)) && !((msg[0].parent.state === 3))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((msg[0].parent.state === 1)) && !((msg[0].parent.state === 3))) { */ case 2: + $r = $send(msg[0].done, http2errStreamClosed); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 3: + /* */ if (!sc[0].pushEnabled) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!sc[0].pushEnabled) { */ case 5: + $r = $send(msg[0].done, $pkg.ErrNotSupported); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 6: + allocatePromisedID = (function(msg, sc) { return function $b() { + var _r$1, _r$2, _r$3, _tuple, err, promised, promisedID, req, rw, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err; promised = $f.promised; promisedID = $f.promisedID; req = $f.req; rw = $f.rw; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = sc[0].serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!sc[0].pushEnabled) { + $s = -1; return [0, $pkg.ErrNotSupported]; + } + if ((sc[0].curPushedStreams + 1 >>> 0) > sc[0].clientMaxStreams) { + $s = -1; return [0, http2ErrPushLimitReached]; + } + /* */ if ((sc[0].maxPushPromiseID + 2 >>> 0) >= 2147483648) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ((sc[0].maxPushPromiseID + 2 >>> 0) >= 2147483648) { */ case 2: + $r = sc[0].startGracefulShutdownInternal(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [0, http2ErrPushLimitReached]; + /* } */ case 3: + sc[0].maxPushPromiseID = sc[0].maxPushPromiseID + (2) >>> 0; + promisedID = sc[0].maxPushPromiseID; + _r$1 = sc[0].newStream(promisedID, msg[0].parent.id, 3); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + promised = _r$1; + _r$2 = sc[0].newWriterAndRequestNoBody(promised, new http2requestParam.ptr(msg[0].method, msg[0].url.Scheme, msg[0].url.Host, msg[0].url.RequestURI(), http2cloneHeader(msg[0].header))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + rw = _tuple[0]; + req = _tuple[1]; + err = _tuple[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: + _r$3 = fmt.Sprintf("newWriterAndRequestNoBody(%+v): %v", new sliceType([msg[0].url, err])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String(_r$3)); + /* } */ case 8: + $go($methodVal(sc[0], "runHandler"), [rw, req, $methodVal(sc[0].handler, "ServeHTTP")]); + $s = -1; return [promisedID, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.promised = promised; $f.promisedID = promisedID; $f.req = req; $f.rw = rw; $f.$s = $s; $f.$r = $r; return $f; + }; })(msg, sc); + $r = sc[0].writeFrame(new http2FrameWriteRequest.ptr(new http2writePushPromise.ptr(msg[0].parent.id, msg[0].method, msg[0].url, msg[0].header, allocatePromisedID, 0), msg[0].parent, msg[0].done)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2serverConn.ptr.prototype.startPush }; } $f.allocatePromisedID = allocatePromisedID; $f.msg = msg; $f.sc = sc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2serverConn.prototype.startPush = function(msg) { return this.$val.startPush(msg); }; + http2foreachHeaderElement = function(v, fn) { + var _i, _ref, f, fn, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; f = $f.f; fn = $f.fn; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + v = textproto.TrimString(v); + if (v === "") { + $s = -1; return; + } + /* */ if (!strings.Contains(v, ",")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!strings.Contains(v, ",")) { */ case 1: + $r = fn(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + _ref = strings.Split(v, ","); + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + f = textproto.TrimString(f); + /* */ if (!(f === "")) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(f === "")) { */ case 6: + $r = fn(f); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + _i++; + /* } */ $s = 4; continue; case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2foreachHeaderElement }; } $f._i = _i; $f._ref = _ref; $f.f = f; $f.fn = fn; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2checkValidHTTP2RequestHeaders = function(h) { + var _entry, _entry$1, _i, _r$1, _ref, _tuple, h, k, ok, te, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; _tuple = $f._tuple; h = $f.h; k = $f.k; ok = $f.ok; te = $f.te; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = http2connHeaders; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + k = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tuple = (_entry = h[$String.keyFor(k)], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + ok = _tuple[1]; + /* */ if (ok) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (ok) { */ case 3: + _r$1 = fmt.Errorf("request header %q is not valid in HTTP/2", new sliceType([new $String(k)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 4: + _i++; + /* } */ $s = 1; continue; case 2: + te = (_entry$1 = h[$String.keyFor("Te")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + if (te.$length > 0 && (te.$length > 1 || (!((0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "trailers") && !((0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "")))) { + $s = -1; return errors.New("request header \"TE\" may only be \"trailers\" in HTTP/2"); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2checkValidHTTP2RequestHeaders }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f._tuple = _tuple; $f.h = h; $f.k = k; $f.ok = ok; $f.te = te; $f.$s = $s; $f.$r = $r; return $f; + }; + http2new400Handler = function(err) { + var err; + return (function $b(w, r) { + var _arg, _arg$1, _r$1, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _arg = w; + _r$1 = err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = _r$1; + $r = Error(_arg, _arg$1, 400); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }); + }; + http2h1ServerKeepAlivesDisabled = function(hs) { + var _r$1, _tuple, hs, hs$1, ok, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; hs = $f.hs; hs$1 = $f.hs$1; ok = $f.ok; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + x$4 = hs; + _tuple = $assertType(x$4, I, true); + hs$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r$1 = hs$1.doKeepAlives(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return !_r$1; + /* } */ case 2: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2h1ServerKeepAlivesDisabled }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.hs = hs; $f.hs$1 = hs$1; $f.ok = ok; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.ptr.prototype.maxHeaderListSize = function() { + var t; + t = this; + if (t.MaxHeaderListSize === 0) { + return 10485760; + } + if (t.MaxHeaderListSize === 4294967295) { + return 0; + } + return t.MaxHeaderListSize; + }; + http2Transport.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; + http2Transport.ptr.prototype.disableCompression = function() { + var t; + t = this; + return t.DisableCompression || (!(t.t1 === ptrType$21.nil) && t.t1.DisableCompression); + }; + http2Transport.prototype.disableCompression = function() { return this.$val.disableCompression(); }; + http2Transport.ptr.prototype.connPool = function() { + var t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.connPoolOnce.Do($methodVal(t, "initConnPool")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return t.connPoolOrDef; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.connPool }; } $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.connPool = function() { return this.$val.connPool(); }; + http2Transport.ptr.prototype.initConnPool = function() { + var t; + t = this; + if (!($interfaceIsEqual(t.ConnPool, $ifaceNil))) { + t.connPoolOrDef = t.ConnPool; + } else { + t.connPoolOrDef = new http2clientConnPool.ptr(t, new sync.Mutex.ptr(0, 0), false, false, false, false); + } + }; + http2Transport.prototype.initConnPool = function() { return this.$val.initConnPool(); }; + http2awaitRequestCancel = function(req, done) { + var _r$1, _r$2, _r$3, _r$4, _selection, _v, ctx, done, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _selection = $f._selection; _v = $f._v; ctx = $f.ctx; done = $f.done; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ctx = http2reqContext(req); + if (!(req.Cancel === $chanNil)) { _v = false; $s = 3; continue s; } + _r$1 = ctx.Done(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1 === $chanNil; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return $ifaceNil; + /* } */ case 2: + _r$2 = ctx.Done(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $select([[req.Cancel], [_r$2], [done]]); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection = _r$3; + /* */ if (_selection[0] === 0) { $s = 7; continue; } + /* */ if (_selection[0] === 1) { $s = 8; continue; } + /* */ if (_selection[0] === 2) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_selection[0] === 0) { */ case 7: + $s = -1; return http2errRequestCanceled; + /* } else if (_selection[0] === 1) { */ case 8: + _r$4 = ctx.Err(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } else if (_selection[0] === 2) { */ case 9: + $s = -1; return $ifaceNil; + /* } */ case 10: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2awaitRequestCancel }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._selection = _selection; $f._v = _v; $f.ctx = ctx; $f.done = done; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientStream.ptr.prototype.get1xxTraceFunc = function() { + var cs, fn; + cs = this; + fn = http2got1xxFuncForTests; + if (!(fn === $throwNilPointerError)) { + return fn; + } + return http2traceGot1xxResponseFunc(cs.trace); + }; + http2clientStream.prototype.get1xxTraceFunc = function() { return this.$val.get1xxTraceFunc(); }; + http2clientStream.ptr.prototype.awaitRequestCancel = function(req) { + var _r$1, cs, err, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cs = $f.cs; err = $f.err; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cs = this; + _r$1 = http2awaitRequestCancel(req, cs.done); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + $r = cs.cancelStream(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cs.bufPipe.CloseWithError(err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.awaitRequestCancel }; } $f._r$1 = _r$1; $f.cs = cs; $f.err = err; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientStream.prototype.awaitRequestCancel = function(req) { return this.$val.awaitRequestCancel(req); }; + http2clientStream.ptr.prototype.cancelStream = function() { + var cc, cs, didReset, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; cs = $f.cs; didReset = $f.didReset; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cs = this; + cc = cs.cc; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + didReset = cs.didReset; + cs.didReset = true; + $r = cc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!didReset) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!didReset) { */ case 3: + $r = cc.writeStreamReset(cs.ID, 8, $ifaceNil); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.forgetStreamID(cs.ID); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.cancelStream }; } $f.cc = cc; $f.cs = cs; $f.didReset = didReset; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientStream.prototype.cancelStream = function() { return this.$val.cancelStream(); }; + http2clientStream.ptr.prototype.checkResetOrDone = function() { + var _selection, cs, $r; + /* */ var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; cs = $f.cs; $r = $f.$r; } + cs = this; + _selection = $select([[cs.peerReset], [cs.done], []]); + if (_selection[0] === 0) { + return cs.resetErr; + } else if (_selection[0] === 1) { + return http2errStreamClosed; + } else if (_selection[0] === 2) { + return $ifaceNil; + } + /* */ if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.checkResetOrDone }; } $f._selection = _selection; $f.cs = cs; $f.$r = $r; return $f; + }; + http2clientStream.prototype.checkResetOrDone = function() { return this.$val.checkResetOrDone(); }; + http2clientStream.ptr.prototype.getStartedWrite = function() { + var cc, cs, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; cs = $f.cs; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cs = this; + cc = cs.cc; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + $s = -1; return cs.startedWrite; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.getStartedWrite }; } $f.cc = cc; $f.cs = cs; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientStream.prototype.getStartedWrite = function() { return this.$val.getStartedWrite(); }; + http2clientStream.ptr.prototype.abortRequestBodyWrite = function(err) { + var cc, cs, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; cs = $f.cs; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cs = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $panic(new $String("nil error")); + } + cc = cs.cc; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cs.stopReqBody = err; + $r = cc.cond.Broadcast(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.abortRequestBodyWrite }; } $f.cc = cc; $f.cs = cs; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientStream.prototype.abortRequestBodyWrite = function(err) { return this.$val.abortRequestBodyWrite(err); }; + http2stickyErrWriter.ptr.prototype.Write = function(p) { + var _r$1, _tmp, _tmp$1, _tuple, err, n, p, sew, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; sew = $f.sew; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + sew = this; + if (!($interfaceIsEqual(sew.err.$get(), $ifaceNil))) { + _tmp = 0; + _tmp$1 = sew.err.$get(); + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = sew.w.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + sew.err.$set(err); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2stickyErrWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.sew = sew; $f.$s = $s; $f.$r = $r; return $f; + }; + http2stickyErrWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + http2noCachedConnError.ptr.prototype.IsHTTP2NoCachedConnError = function() { + }; + http2noCachedConnError.prototype.IsHTTP2NoCachedConnError = function() { return this.$val.IsHTTP2NoCachedConnError(); }; + http2noCachedConnError.ptr.prototype.Error = function() { + return "http2: no cached connection was available"; + }; + http2noCachedConnError.prototype.Error = function() { return this.$val.Error(); }; + http2isNoCachedConnError = function(err) { + var _tuple, err, ok; + _tuple = $assertType(err, interfaceType, true); + ok = _tuple[1]; + return ok; + }; + http2Transport.ptr.prototype.RoundTrip = function(req) { + var _r$1, req, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; req = $f.req; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = t.RoundTripOpt(req, new http2RoundTripOpt.ptr(false)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.RoundTrip }; } $f._r$1 = _r$1; $f.req = req; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + http2authorityAddr = function(scheme, authority) { + var _r$1, _r$2, _tuple, _tuple$1, a, addr, authority, err, err$1, host, port, scheme, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; a = $f.a; addr = $f.addr; authority = $f.authority; err = $f.err; err$1 = $f.err$1; host = $f.host; port = $f.port; scheme = $f.scheme; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addr = ""; + _r$1 = net.SplitHostPort(authority); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + port = "443"; + if (scheme === "http") { + port = "80"; + } + host = authority; + } + _r$2 = idna.ToASCII(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + a = _tuple$1[0]; + err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + host = a; + } + if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]")) { + addr = host + ":" + port; + $s = -1; return addr; + } + addr = net.JoinHostPort(host, port); + $s = -1; return addr; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2authorityAddr }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.a = a; $f.addr = addr; $f.authority = authority; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.port = port; $f.scheme = scheme; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.ptr.prototype.RoundTripOpt = function(req, opt) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _tuple$2, addr, backoff, cc, err, gotErrAfterReqBodyWrite, opt, req, res, retry, t, y, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; addr = $f.addr; backoff = $f.backoff; cc = $f.cc; err = $f.err; gotErrAfterReqBodyWrite = $f.gotErrAfterReqBodyWrite; opt = $f.opt; req = $f.req; res = $f.res; retry = $f.retry; t = $f.t; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + if (!(req.URL.Scheme === "https" || (req.URL.Scheme === "http" && t.AllowHTTP))) { + $s = -1; return [ptrType$16.nil, errors.New("http2: unsupported scheme")]; + } + _r$1 = http2authorityAddr(req.URL.Scheme, req.URL.Host); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + addr = _r$1; + retry = 0; + /* while (true) { */ case 2: + _r$2 = t.connPool(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = _r$2.GetClientConn(req, addr); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + cc = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: + $r = t.vlogf("http2: Transport failed to get client conn for %s: %v", new sliceType([new $String(addr), err])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, err]; + /* } */ case 7: + $r = http2traceGotConn(req, cc); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = cc.roundTrip(req); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + res = _tuple$1[0]; + gotErrAfterReqBodyWrite = _tuple$1[1]; + err = _tuple$1[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && retry <= 6) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil)) && retry <= 6) { */ case 11: + _r$5 = http2shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + req = _tuple$2[0]; + err = _tuple$2[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 14: + /* */ if (retry === 0) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (retry === 0) { */ case 16: + retry = retry + (1) >> 0; + /* continue; */ $s = 2; continue; + /* } */ case 17: + backoff = (((y = ((((retry >>> 0)) - 1 >>> 0)), y < 32 ? (1 << y) : 0) >>> 0)); + _r$6 = rand$1.Float64(); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + backoff = backoff + (backoff * (0.1 * _r$6)); + _r$7 = http2reqContext(req).Done(); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$8 = $select([[time.After($mul64(new time.Duration(0, 1000000000), (new time.Duration(0, backoff))))], [_r$7]]); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _selection = _r$8; + /* */ if (_selection[0] === 0) { $s = 21; continue; } + /* */ if (_selection[0] === 1) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (_selection[0] === 0) { */ case 21: + retry = retry + (1) >> 0; + /* continue; */ $s = 2; continue; + $s = 23; continue; + /* } else if (_selection[0] === 1) { */ case 22: + _r$9 = http2reqContext(req).Err(); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$9]; + /* } */ case 23: + /* } */ case 15: + /* } */ case 12: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 25: + $r = t.vlogf("RoundTrip failure: %v", new sliceType([err])); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, err]; + /* } */ case 26: + $s = -1; return [res, $ifaceNil]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [ptrType$16.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.RoundTripOpt }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.addr = addr; $f.backoff = backoff; $f.cc = cc; $f.err = err; $f.gotErrAfterReqBodyWrite = gotErrAfterReqBodyWrite; $f.opt = opt; $f.req = req; $f.res = res; $f.retry = retry; $f.t = t; $f.y = y; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.RoundTripOpt = function(req, opt) { return this.$val.RoundTripOpt(req, opt); }; + http2Transport.ptr.prototype.CloseIdleConnections = function() { + var _r$1, _tuple, cp, ok, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; cp = $f.cp; ok = $f.ok; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = $assertType(_r$1, http2clientConnPoolIdleCloser, true); + cp = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + $r = cp.closeIdleConnections(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.CloseIdleConnections }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.cp = cp; $f.ok = ok; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.CloseIdleConnections = function() { return this.$val.CloseIdleConnections(); }; + http2shouldRetryRequest = function(req, err, afterBodyWrite) { + var _r$1, _r$2, _tuple, afterBodyWrite, body$1, err, err$1, getBody, newReq, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; afterBodyWrite = $f.afterBodyWrite; body$1 = $f.body$1; err = $f.err; err$1 = $f.err$1; getBody = $f.getBody; newReq = $f.newReq; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + newReq = [newReq]; + if (!http2canRetryError(err)) { + $s = -1; return [ptrType$7.nil, err]; + } + if ($interfaceIsEqual(req.Body, $ifaceNil) || http2reqBodyIsNoBody(req.Body)) { + $s = -1; return [req, $ifaceNil]; + } + getBody = http2reqGetBody(req); + /* */ if (!(getBody === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(getBody === $throwNilPointerError)) { */ case 1: + _r$1 = getBody(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + body$1 = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$7.nil, err$1]; + } + newReq[0] = $clone(req, Request); + newReq[0].Body = body$1; + $s = -1; return [newReq[0], $ifaceNil]; + /* } */ case 2: + if (!afterBodyWrite) { + $s = -1; return [req, $ifaceNil]; + } + _r$2 = fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", new sliceType([err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [ptrType$7.nil, _r$2]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2shouldRetryRequest }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.afterBodyWrite = afterBodyWrite; $f.body$1 = body$1; $f.err = err; $f.err$1 = err$1; $f.getBody = getBody; $f.newReq = newReq; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2canRetryError = function(err) { + var _tuple, err, ok, se; + if ($interfaceIsEqual(err, http2errClientConnUnusable) || $interfaceIsEqual(err, http2errClientConnGotGoAway)) { + return true; + } + _tuple = $assertType(err, http2StreamError, true); + se = $clone(_tuple[0], http2StreamError); + ok = _tuple[1]; + if (ok) { + return se.Code === 7; + } + return false; + }; + http2Transport.ptr.prototype.dialClientConn = function(addr, singleUse) { + var _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, addr, err, host, singleUse, t, tconn, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; addr = $f.addr; err = $f.err; host = $f.host; singleUse = $f.singleUse; t = $f.t; tconn = $f.tconn; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = net.SplitHostPort(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$29.nil, err]; + } + _arg = addr; + _r$2 = t.newTLSConfig(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$1 = _r$2; + _r$3 = t.dialTLS()("tcp", _arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + tconn = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$29.nil, err]; + } + _r$4 = t.newClientConn(tconn, singleUse); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.dialClientConn }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.addr = addr; $f.err = err; $f.host = host; $f.singleUse = singleUse; $f.t = t; $f.tconn = tconn; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.dialClientConn = function(addr, singleUse) { return this.$val.dialClientConn(addr, singleUse); }; + http2Transport.ptr.prototype.newTLSConfig = function(host) { + var _r$1, cfg, host, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cfg = $f.cfg; host = $f.host; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + cfg = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$11.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$32.nil, sliceType$1.nil, "", 0, ptrType$32.nil, false, sliceType$12.nil, false, false, arrayType$2.zero(), $ifaceNil, 0, 0, sliceType$13.nil, false, 0, $ifaceNil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$14.nil); + /* */ if (!(t.TLSClientConfig === ptrType$14.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(t.TLSClientConfig === ptrType$14.nil)) { */ case 1: + _r$1 = http2cloneTLSConfig(t.TLSClientConfig); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + tls.Config.copy(cfg, _r$1); + /* } */ case 2: + if (!http2strSliceContains(cfg.NextProtos, "h2")) { + cfg.NextProtos = $appendSlice(new sliceType$1(["h2"]), cfg.NextProtos); + } + if (cfg.ServerName === "") { + cfg.ServerName = host; + } + $s = -1; return cfg; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.newTLSConfig }; } $f._r$1 = _r$1; $f.cfg = cfg; $f.host = host; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.newTLSConfig = function(host) { return this.$val.newTLSConfig(host); }; + http2Transport.ptr.prototype.dialTLS = function() { + var t; + t = this; + if (!(t.DialTLS === $throwNilPointerError)) { + return t.DialTLS; + } + return $methodVal(t, "dialTLSDefault"); + }; + http2Transport.prototype.dialTLS = function() { return this.$val.dialTLS(); }; + http2Transport.ptr.prototype.dialTLSDefault = function(network, addr, cfg) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, addr, cfg, cn, err, err$1, err$2, network, p, state, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; addr = $f.addr; cfg = $f.cfg; cn = $f.cn; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; network = $f.network; p = $f.p; state = $f.state; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = tls.Dial(network, addr, cfg); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + cn = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + _r$2 = cn.Handshake(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$1 = _r$2; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$1]; + } + /* */ if (!cfg.InsecureSkipVerify) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!cfg.InsecureSkipVerify) { */ case 3: + _r$3 = cn.VerifyHostname(cfg.ServerName); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$2 = _r$3; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$2]; + } + /* } */ case 4: + _r$4 = cn.ConnectionState(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + state = $clone(_r$4, tls.ConnectionState); + p = state.NegotiatedProtocol; + /* */ if (!(p === "h2")) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(p === "h2")) { */ case 7: + _r$5 = fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", new sliceType([new $String(p), new $String("h2")])); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [$ifaceNil, _r$5]; + /* } */ case 8: + if (!state.NegotiatedProtocolIsMutual) { + $s = -1; return [$ifaceNil, errors.New("http2: could not negotiate protocol mutually")]; + } + $s = -1; return [cn, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.dialTLSDefault }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.addr = addr; $f.cfg = cfg; $f.cn = cn; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.network = network; $f.p = p; $f.state = state; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.dialTLSDefault = function(network, addr, cfg) { return this.$val.dialTLSDefault(network, addr, cfg); }; + http2Transport.ptr.prototype.disableKeepAlives = function() { + var t; + t = this; + return !(t.t1 === ptrType$21.nil) && t.t1.DisableKeepAlives; + }; + http2Transport.prototype.disableKeepAlives = function() { return this.$val.disableKeepAlives(); }; + http2Transport.ptr.prototype.expectContinueTimeout = function() { + var t; + t = this; + if (t.t1 === ptrType$21.nil) { + return new time.Duration(0, 0); + } + return http2transportExpectContinueTimeout(t.t1); + }; + http2Transport.prototype.expectContinueTimeout = function() { return this.$val.expectContinueTimeout(); }; + http2Transport.ptr.prototype.NewClientConn = function(c) { + var _r$1, c, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = t.newClientConn(c, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.NewClientConn }; } $f._r$1 = _r$1; $f.c = c; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.NewClientConn = function(c) { return this.$val.NewClientConn(c); }; + http2Transport.ptr.prototype.newClientConn = function(c, singleUse) { + var _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, c, cc, cs, d, initialSettings, max, ok, singleUse, state, t, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; c = $f.c; cc = $f.cc; cs = $f.cs; d = $f.d; initialSettings = $f.initialSettings; max = $f.max; ok = $f.ok; singleUse = $f.singleUse; state = $f.state; t = $f.t; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + state = [state]; + t = this; + cc = new http2ClientConn.ptr(t, c, ptrType$17.nil, singleUse, new $Chan(structType, 0), $ifaceNil, new time.Duration(0, 0), ptrType$57.nil, new sync.Mutex.ptr(0, 0), ptrType$72.nil, new http2flow.ptr(0, ptrType$33.nil), new http2flow.ptr(0, ptrType$33.nil), false, false, true, ptrType$45.nil, "", {}, 1, 0, {}, ptrType$10.nil, ptrType$73.nil, ptrType$34.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), 16384, 1000, new $Uint64(4294967295, 4294967295), 65535, new bytes.Buffer.ptr(sliceType$3.nil, 0, arrayType$3.zero(), 0), ptrType$58.nil, sliceType$5.nil, new sync.Mutex.ptr(0, 0), $ifaceNil); + d = t.idleConnTimeout(); + if (!((d.$high === 0 && d.$low === 0))) { + cc.idleTimeout = d; + cc.idleTimer = time.AfterFunc(d, $methodVal(cc, "onIdleTimeout")); + } + /* */ if (http2VerboseLogs) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs) { */ case 1: + _arg = cc; + _r$1 = c.RemoteAddr(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg$1 = _r$1; + $r = t.vlogf("http2: Transport creating client conn %p to %v", new sliceType([_arg, _arg$1])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + cc.cond = sync.NewCond(cc.mu); + cc.flow.add(65535); + cc.bw = bufio.NewWriter((x$4 = new http2stickyErrWriter.ptr(c, (cc.$ptr_werr || (cc.$ptr_werr = new ptrType$51(function() { return this.$target.werr; }, function($v) { this.$target.werr = $v; }, cc)))), new x$4.constructor.elem(x$4))); + cc.br = bufio.NewReader(c); + cc.fr = http2NewFramer(cc.bw, cc.br); + _r$2 = hpack.NewDecoder(4096, $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + cc.fr.ReadMetaHeaders = _r$2; + cc.fr.MaxHeaderListSize = t.maxHeaderListSize(); + _r$3 = hpack.NewEncoder(cc.hbuf); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + cc.henc = _r$3; + if (t.AllowHTTP) { + cc.nextStreamID = 3; + } + _tuple = $assertType(c, http2connectionStater, true); + cs = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (ok) { */ case 7: + _r$4 = cs.ConnectionState(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + state[0] = $clone(_r$4, tls.ConnectionState); + cc.tlsState = state[0]; + /* } */ case 8: + initialSettings = new sliceType$19([new http2Setting.ptr(2, 0), new http2Setting.ptr(4, 4194304)]); + max = t.maxHeaderListSize(); + if (!((max === 0))) { + initialSettings = $append(initialSettings, new http2Setting.ptr(6, max)); + } + _r$5 = cc.bw.Write(http2clientPreface); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = cc.fr.WriteSettings(initialSettings); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = cc.fr.WriteWindowUpdate(0, 1073741824); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + cc.inflow.add(1073807359); + _r$8 = cc.bw.Flush(); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + if (!($interfaceIsEqual(cc.werr, $ifaceNil))) { + $s = -1; return [ptrType$29.nil, cc.werr]; + } + $go($methodVal(cc, "readLoop"), []); + $s = -1; return [cc, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.newClientConn }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f.c = c; $f.cc = cc; $f.cs = cs; $f.d = d; $f.initialSettings = initialSettings; $f.max = max; $f.ok = ok; $f.singleUse = singleUse; $f.state = state; $f.t = t; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.newClientConn = function(c, singleUse) { return this.$val.newClientConn(c, singleUse); }; + http2ClientConn.ptr.prototype.setGoAway = function(f) { + var _entry, _i, _keys, _ref, _selection, cc, cs, f, last, old, streamID, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; _selection = $f._selection; cc = $f.cc; cs = $f.cs; f = $f.f; last = $f.last; old = $f.old; streamID = $f.streamID; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + old = cc.goAway; + cc.goAway = f; + if (cc.goAwayDebug === "") { + cc.goAwayDebug = ($bytesToString(f.DebugData())); + } + if (!(old === ptrType$45.nil) && !((old.ErrCode === 0))) { + cc.goAway.ErrCode = old.ErrCode; + } + last = f.LastStreamID; + _ref = cc.streams; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + streamID = _entry.k; + cs = _entry.v; + if (streamID > last) { + _selection = $select([[cs.resc, new http2resAndError.ptr(ptrType$16.nil, http2errClientConnGotGoAway)], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + } + _i++; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.setGoAway }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f._selection = _selection; $f.cc = cc; $f.cs = cs; $f.f = f; $f.last = last; $f.old = old; $f.streamID = streamID; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.setGoAway = function(f) { return this.$val.setGoAway(f); }; + http2ClientConn.ptr.prototype.CanTakeNewRequest = function() { + var cc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + $s = -1; return cc.canTakeNewRequestLocked(); + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.CanTakeNewRequest }; } $f.cc = cc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.CanTakeNewRequest = function() { return this.$val.CanTakeNewRequest(); }; + http2ClientConn.ptr.prototype.idleState = function() { + var cc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + $s = -1; return cc.idleStateLocked(); + /* */ } return; } } catch(err) { $err = err; $s = -1; return new http2clientConnIdleState.ptr(false, false); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.idleState }; } $f.cc = cc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.idleState = function() { return this.$val.idleState(); }; + http2ClientConn.ptr.prototype.idleStateLocked = function() { + var cc, st, x$4, x$5, x$6; + st = new http2clientConnIdleState.ptr(false, false); + cc = this; + if (cc.singleUse && cc.nextStreamID > 1) { + return st; + } + st.canTakeNewRequest = cc.goAway === ptrType$45.nil && !cc.closed && !cc.closing && (x$4 = (x$5 = (new $Int64(0, cc.nextStreamID)), x$6 = (new $Int64(0, cc.pendingRequests)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low < 2147483647))); + st.freshConn = (cc.nextStreamID === 1) && st.canTakeNewRequest; + return st; + }; + http2ClientConn.prototype.idleStateLocked = function() { return this.$val.idleStateLocked(); }; + http2ClientConn.ptr.prototype.canTakeNewRequestLocked = function() { + var cc, st; + cc = this; + st = $clone(cc.idleStateLocked(), http2clientConnIdleState); + return st.canTakeNewRequest; + }; + http2ClientConn.prototype.canTakeNewRequestLocked = function() { return this.$val.canTakeNewRequestLocked(); }; + http2ClientConn.ptr.prototype.onIdleTimeout = function() { + var cc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.closeIfIdle(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.onIdleTimeout }; } $f.cc = cc; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.onIdleTimeout = function() { return this.$val.onIdleTimeout(); }; + http2ClientConn.ptr.prototype.closeIfIdle = function() { + var _r$1, cc, nextID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; nextID = $f.nextID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if ($keys(cc.streams).length > 0) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($keys(cc.streams).length > 0) { */ case 2: + $r = cc.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 3: + cc.closed = true; + nextID = cc.nextStreamID; + $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (http2VerboseLogs) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (http2VerboseLogs) { */ case 6: + $r = cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", new sliceType([cc, new $Bool(cc.singleUse), new $Uint32((nextID - 2 >>> 0))])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + _r$1 = cc.tconn.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.closeIfIdle }; } $f._r$1 = _r$1; $f.cc = cc; $f.nextID = nextID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.closeIfIdle = function() { return this.$val.closeIfIdle(); }; + http2ClientConn.ptr.prototype.shutdown = function(ctx) { + var _r$1, _r$2, _r$3, _r$4, _selection, cancelled, cc, ctx, done, err, err$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _selection = $f._selection; cancelled = $f.cancelled; cc = $f.cc; ctx = $f.ctx; done = $f.done; err = $f.err; err$1 = $f.err$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cancelled = [cancelled]; + cc = [cc]; + done = [done]; + cc[0] = this; + _r$1 = cc[0].sendGoAway(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + done[0] = new $Chan($error, 1); + cancelled[0] = false; + $go((function(cancelled, cc, done) { return function $b() { + var _r$2, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + $r = cc[0].mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc[0].mu, "Unlock"), []]); + /* while (true) { */ case 2: + /* */ if (($keys(cc[0].streams).length === 0) || cc[0].closed) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (($keys(cc[0].streams).length === 0) || cc[0].closed) { */ case 4: + cc[0].closed = true; + _r$2 = cc[0].tconn.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = $send(done[0], _r$2); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* break; */ $s = 3; continue; + /* } */ case 5: + if (cancelled[0]) { + /* break; */ $s = 3; continue; + } + $r = cc[0].cond.Wait(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 2; continue; case 3: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; })(cancelled, cc, done), []); + $r = http2shutdownEnterWaitStateHook(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = ctx.Done(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $select([[done[0]], [_r$2]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection = _r$3; + /* */ if (_selection[0] === 0) { $s = 5; continue; } + /* */ if (_selection[0] === 1) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (_selection[0] === 0) { */ case 5: + err$1 = _selection[1][0]; + $s = -1; return err$1; + /* } else if (_selection[0] === 1) { */ case 6: + $r = cc[0].mu.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cancelled[0] = true; + $r = cc[0].cond.Broadcast(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc[0].mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = ctx.Err(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 7: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.shutdown }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._selection = _selection; $f.cancelled = cancelled; $f.cc = cc; $f.ctx = ctx; $f.done = done; $f.err = err; $f.err$1 = err$1; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.shutdown = function(ctx) { return this.$val.shutdown(ctx); }; + http2ClientConn.ptr.prototype.sendGoAway = function() { + var _r$1, _r$2, cc, err, err$1, maxStreamID, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; cc = $f.cc; err = $f.err; err$1 = $f.err$1; maxStreamID = $f.maxStreamID; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + $r = cc.wmu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); + if (cc.closing) { + $s = -1; return $ifaceNil; + } + maxStreamID = cc.nextStreamID; + _r$1 = cc.fr.WriteGoAway(maxStreamID, 0, sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$2 = cc.bw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$1 = _r$2; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + cc.closing = true; + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.sendGoAway }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.cc = cc; $f.err = err; $f.err$1 = err$1; $f.maxStreamID = maxStreamID; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.sendGoAway = function() { return this.$val.sendGoAway(); }; + http2ClientConn.ptr.prototype.Close = function() { + var _entry, _i, _keys, _r$1, _ref, _selection, cc, cs, err, id, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; _selection = $f._selection; cc = $f.cc; cs = $f.cs; err = $f.err; id = $f.id; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.cond, "Broadcast"), []]); + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + err = errors.New("http2: client connection force closed via ClientConn.Close"); + _ref = cc.streams; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 2: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 2; continue; + } + id = _entry.k; + cs = _entry.v; + _selection = $select([[cs.resc, new http2resAndError.ptr(ptrType$16.nil, err)], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + $r = cs.bufPipe.CloseWithError(err); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + delete cc.streams[$Uint32.keyFor(id)]; + _i++; + /* } */ $s = 2; continue; case 3: + cc.closed = true; + _r$1 = cc.tconn.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.Close }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f._selection = _selection; $f.cc = cc; $f.cs = cs; $f.err = err; $f.id = id; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.Close = function() { return this.$val.Close(); }; + http2ClientConn.ptr.prototype.frameScratchBuffer = function() { + var _i, _ref, buf, cc, i, size, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; buf = $f.buf; cc = $f.cc; i = $f.i; size = $f.size; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + size = cc.maxFrameSize; + if (size > 524288) { + size = 524288; + } + _ref = cc.freeBuf; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + i = _i; + buf = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + /* */ if (buf.$length >= ((size >> 0))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (buf.$length >= ((size >> 0))) { */ case 4: + (x$4 = cc.freeBuf, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i] = sliceType$3.nil)); + $r = cc.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $subslice(buf, 0, size); + /* } */ case 5: + _i++; + /* } */ $s = 2; continue; case 3: + $r = cc.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $makeSlice(sliceType$3, size); + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.frameScratchBuffer }; } $f._i = _i; $f._ref = _ref; $f.buf = buf; $f.cc = cc; $f.i = i; $f.size = size; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.frameScratchBuffer = function() { return this.$val.frameScratchBuffer(); }; + http2ClientConn.ptr.prototype.putFrameScratchBuffer = function(buf) { + var _i, _ref, buf, cc, i, old, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; buf = $f.buf; cc = $f.cc; i = $f.i; old = $f.old; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + if (cc.freeBuf.$length < 4) { + cc.freeBuf = $append(cc.freeBuf, buf); + $s = -1; return; + } + _ref = cc.freeBuf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + old = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (old === sliceType$3.nil) { + (x$4 = cc.freeBuf, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i] = buf)); + $s = -1; return; + } + _i++; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.putFrameScratchBuffer }; } $f._i = _i; $f._ref = _ref; $f.buf = buf; $f.cc = cc; $f.i = i; $f.old = old; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.putFrameScratchBuffer = function(buf) { return this.$val.putFrameScratchBuffer(buf); }; + http2commaSeparatedTrailers = function(req) { + var _1, _entry, _i, _keys, _ref, k, keys, req, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; k = $f.k; keys = $f.keys; req = $f.req; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + keys = $makeSlice(sliceType$1, 0, $keys(req.Trailer).length); + _ref = req.Trailer; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + k = CanonicalHeaderKey(k); + _1 = k; + if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { + $s = -1; return ["", new http2badStringError.ptr("invalid Trailer key", k)]; + } + keys = $append(keys, k); + _i++; + } + /* */ if (keys.$length > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (keys.$length > 0) { */ case 1: + $r = sort.Strings(keys); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [strings.Join(keys, ","), $ifaceNil]; + /* } */ case 2: + $s = -1; return ["", $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2commaSeparatedTrailers }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.k = k; $f.keys = keys; $f.req = req; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.ptr.prototype.responseHeaderTimeout = function() { + var cc; + cc = this; + if (!(cc.t.t1 === ptrType$21.nil)) { + return cc.t.t1.ResponseHeaderTimeout; + } + return new time.Duration(0, 0); + }; + http2ClientConn.prototype.responseHeaderTimeout = function() { return this.$val.responseHeaderTimeout(); }; + http2checkConnHeaders = function(req) { + var _entry, _entry$1, _entry$2, _r$1, _r$2, _r$3, req, v, vv, vv$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; req = $f.req; v = $f.v; vv = $f.vv; vv$1 = $f.vv$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + v = new Header(req.Header).Get("Upgrade"); + /* */ if (!(v === "")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(v === "")) { */ case 1: + _r$1 = fmt.Errorf("http2: invalid Upgrade request header: %q", new sliceType([(_entry = req.Header[$String.keyFor("Upgrade")], _entry !== undefined ? _entry.v : sliceType$1.nil)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + vv = (_entry$1 = req.Header[$String.keyFor("Transfer-Encoding")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + /* */ if (vv.$length > 0 && (vv.$length > 1 || !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "") && !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "chunked"))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (vv.$length > 0 && (vv.$length > 1 || !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "") && !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "chunked"))) { */ case 4: + _r$2 = fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", new sliceType([vv])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 5: + vv$1 = (_entry$2 = req.Header[$String.keyFor("Connection")], _entry$2 !== undefined ? _entry$2.v : sliceType$1.nil); + /* */ if (vv$1.$length > 0 && (vv$1.$length > 1 || !((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") && !strings.EqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "close") && !strings.EqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "keep-alive"))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (vv$1.$length > 0 && (vv$1.$length > 1 || !((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") && !strings.EqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "close") && !strings.EqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "keep-alive"))) { */ case 7: + _r$3 = fmt.Errorf("http2: invalid Connection request header: %q", new sliceType([vv$1])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* } */ case 8: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2checkConnHeaders }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.req = req; $f.v = v; $f.vv = vv; $f.vv$1 = vv$1; $f.$s = $s; $f.$r = $r; return $f; + }; + http2actualContentLength = function(req) { + var req, x$4; + if ($interfaceIsEqual(req.Body, $ifaceNil) || http2reqBodyIsNoBody(req.Body)) { + return new $Int64(0, 0); + } + if (!((x$4 = req.ContentLength, (x$4.$high === 0 && x$4.$low === 0)))) { + return req.ContentLength; + } + return new $Int64(-1, 4294967295); + }; + http2ClientConn.ptr.prototype.RoundTrip = function(req) { + var _r$1, _tuple, cc, err, req, resp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; cc = $f.cc; err = $f.err; req = $f.req; resp = $f.resp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + _r$1 = cc.roundTrip(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + resp = _tuple[0]; + err = _tuple[2]; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.RoundTrip }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.cc = cc; $f.err = err; $f.req = req; $f.resp = resp; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + http2ClientConn.ptr.prototype.roundTrip = function(req) { + var _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, body$1, bodyWriter, bodyWritten, cc, contentLen, cs, ctx, d, d$1, endStream, err, err$1, err$2, err$3, gotErrAfterReqBodyWrite, handleReadLoopResponse, hasBody, hasTrailers, hdrs, re, re$1, readLoopResCh, req, requestedGzip, res, respHeaderTimer, timer, timer$1, trailers, werr, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _selection = $f._selection; _selection$1 = $f._selection$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$24 = $f._tmp$24; _tmp$25 = $f._tmp$25; _tmp$26 = $f._tmp$26; _tmp$27 = $f._tmp$27; _tmp$28 = $f._tmp$28; _tmp$29 = $f._tmp$29; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; body$1 = $f.body$1; bodyWriter = $f.bodyWriter; bodyWritten = $f.bodyWritten; cc = $f.cc; contentLen = $f.contentLen; cs = $f.cs; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; endStream = $f.endStream; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; gotErrAfterReqBodyWrite = $f.gotErrAfterReqBodyWrite; handleReadLoopResponse = $f.handleReadLoopResponse; hasBody = $f.hasBody; hasTrailers = $f.hasTrailers; hdrs = $f.hdrs; re = $f.re; re$1 = $f.re$1; readLoopResCh = $f.readLoopResCh; req = $f.req; requestedGzip = $f.requestedGzip; res = $f.res; respHeaderTimer = $f.respHeaderTimer; timer = $f.timer; timer$1 = $f.timer$1; trailers = $f.trailers; werr = $f.werr; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + bodyWriter = [bodyWriter]; + cc = [cc]; + cs = [cs]; + req = [req]; + res = ptrType$16.nil; + gotErrAfterReqBodyWrite = false; + err = $ifaceNil; + cc[0] = this; + _r$1 = http2checkConnHeaders(req[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = ptrType$16.nil; + _tmp$1 = false; + _tmp$2 = err$1; + res = _tmp; + gotErrAfterReqBodyWrite = _tmp$1; + err = _tmp$2; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + } + if (!(cc[0].idleTimer === ptrType$57.nil)) { + cc[0].idleTimer.Stop(); + } + _r$2 = http2commaSeparatedTrailers(req[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + trailers = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$3 = ptrType$16.nil; + _tmp$4 = false; + _tmp$5 = err; + res = _tmp$3; + gotErrAfterReqBodyWrite = _tmp$4; + err = _tmp$5; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + } + hasTrailers = !(trailers === ""); + $r = cc[0].mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = cc[0].awaitOpenSlotForRequest(req[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$2 = _r$3; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 5: + $r = cc[0].mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = ptrType$16.nil; + _tmp$7 = false; + _tmp$8 = err$2; + res = _tmp$6; + gotErrAfterReqBodyWrite = _tmp$7; + err = _tmp$8; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } */ case 6: + body$1 = req[0].Body; + contentLen = http2actualContentLength(req[0]); + hasBody = !((contentLen.$high === 0 && contentLen.$low === 0)); + requestedGzip = false; + if (!cc[0].t.disableCompression() && new Header(req[0].Header).Get("Accept-Encoding") === "" && new Header(req[0].Header).Get("Range") === "" && !(req[0].Method === "HEAD")) { + requestedGzip = true; + } + _r$4 = cc[0].encodeHeaders(req[0], requestedGzip, trailers, contentLen); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + hdrs = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 9: + $r = cc[0].mu.Unlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$9 = ptrType$16.nil; + _tmp$10 = false; + _tmp$11 = err; + res = _tmp$9; + gotErrAfterReqBodyWrite = _tmp$10; + err = _tmp$11; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } */ case 10: + cs[0] = cc[0].newStream(); + cs[0].req = req[0]; + _r$5 = http2requestTrace(req[0]); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + cs[0].trace = _r$5; + cs[0].requestedGzip = requestedGzip; + bodyWriter[0] = $clone(cc[0].t.getBodyWriterState(cs[0], body$1), http2bodyWriterState); + cs[0].on100 = $methodVal($clone(bodyWriter[0], http2bodyWriterState), "on100"); + $r = cc[0].wmu.Lock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + endStream = !hasBody && !hasTrailers; + _r$6 = cc[0].writeHeaders(cs[0].ID, endStream, ((cc[0].maxFrameSize >> 0)), hdrs); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + werr = _r$6; + $r = cc[0].wmu.Unlock(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2traceWroteHeaders(cs[0].trace); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc[0].mu.Unlock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(werr, $ifaceNil))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!($interfaceIsEqual(werr, $ifaceNil))) { */ case 18: + /* */ if (hasBody) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (hasBody) { */ case 20: + _r$7 = req[0].Body.Close(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + $clone(bodyWriter[0], http2bodyWriterState).cancel(); + /* } */ case 21: + $r = cc[0].forgetStreamID(cs[0].ID); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2traceWroteRequest(cs[0].trace, werr); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$12 = ptrType$16.nil; + _tmp$13 = false; + _tmp$14 = werr; + res = _tmp$12; + gotErrAfterReqBodyWrite = _tmp$13; + err = _tmp$14; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } */ case 19: + respHeaderTimer = $chanNil; + /* */ if (hasBody) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (hasBody) { */ case 25: + $r = $clone(bodyWriter[0], http2bodyWriterState).scheduleBodyWrite(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 27; continue; + /* } else { */ case 26: + $r = http2traceWroteRequest(cs[0].trace, $ifaceNil); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + d = cc[0].responseHeaderTimeout(); + if (!((d.$high === 0 && d.$low === 0))) { + timer = time.NewTimer(d); + $deferred.push([$methodVal(timer, "Stop"), []]); + respHeaderTimer = timer.C; + } + /* } */ case 27: + readLoopResCh = cs[0].resc; + bodyWritten = false; + ctx = http2reqContext(req[0]); + handleReadLoopResponse = (function(bodyWriter, cc, cs, req) { return function $b(re) { + var _r$8, re, res$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$8 = $f._r$8; re = $f.re; res$1 = $f.res$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + res$1 = re.res; + /* */ if (!($interfaceIsEqual(re.err, $ifaceNil)) || res$1.StatusCode > 299) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(re.err, $ifaceNil)) || res$1.StatusCode > 299) { */ case 1: + $clone(bodyWriter[0], http2bodyWriterState).cancel(); + $r = cs[0].abortRequestBodyWrite(http2errStopReqBodyWrite); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + /* */ if (!($interfaceIsEqual(re.err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(re.err, $ifaceNil))) { */ case 4: + $r = cc[0].forgetStreamID(cs[0].ID); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$8 = cs[0].getStartedWrite(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$8, re.err]; + /* } */ case 5: + res$1.Request = req[0]; + res$1.TLS = cc[0].tlsState; + $s = -1; return [res$1, false, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$8 = _r$8; $f.re = re; $f.res$1 = res$1; $f.$s = $s; $f.$r = $r; return $f; + }; })(bodyWriter, cc, cs, req); + /* while (true) { */ case 30: + _r$8 = ctx.Done(); /* */ $s = 32; case 32: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$9 = $select([[readLoopResCh], [respHeaderTimer], [_r$8], [req[0].Cancel], [cs[0].peerReset], [bodyWriter[0].resc]]); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _selection = _r$9; + /* */ if (_selection[0] === 0) { $s = 34; continue; } + /* */ if (_selection[0] === 1) { $s = 35; continue; } + /* */ if (_selection[0] === 2) { $s = 36; continue; } + /* */ if (_selection[0] === 3) { $s = 37; continue; } + /* */ if (_selection[0] === 4) { $s = 38; continue; } + /* */ if (_selection[0] === 5) { $s = 39; continue; } + /* */ $s = 40; continue; + /* if (_selection[0] === 0) { */ case 34: + re = $clone(_selection[1][0], http2resAndError); + _r$10 = handleReadLoopResponse($clone(re, http2resAndError)); /* */ $s = 41; case 41: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$2 = _r$10; + res = _tuple$2[0]; + gotErrAfterReqBodyWrite = _tuple$2[1]; + err = _tuple$2[2]; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection[0] === 1) { */ case 35: + /* */ if (!hasBody || bodyWritten) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (!hasBody || bodyWritten) { */ case 42: + $r = cc[0].writeStreamReset(cs[0].ID, 8, $ifaceNil); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 44; continue; + /* } else { */ case 43: + $clone(bodyWriter[0], http2bodyWriterState).cancel(); + $r = cs[0].abortRequestBodyWrite(http2errStopReqBodyWriteAndCancel); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 44: + $r = cc[0].forgetStreamID(cs[0].ID); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$15 = ptrType$16.nil; + _r$11 = cs[0].getStartedWrite(); /* */ $s = 48; case 48: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tmp$16 = _r$11; + _tmp$17 = http2errTimeout; + res = _tmp$15; + gotErrAfterReqBodyWrite = _tmp$16; + err = _tmp$17; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection[0] === 2) { */ case 36: + /* */ if (!hasBody || bodyWritten) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (!hasBody || bodyWritten) { */ case 49: + $r = cc[0].writeStreamReset(cs[0].ID, 8, $ifaceNil); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 51; continue; + /* } else { */ case 50: + $clone(bodyWriter[0], http2bodyWriterState).cancel(); + $r = cs[0].abortRequestBodyWrite(http2errStopReqBodyWriteAndCancel); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 51: + $r = cc[0].forgetStreamID(cs[0].ID); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$18 = ptrType$16.nil; + _r$12 = cs[0].getStartedWrite(); /* */ $s = 55; case 55: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tmp$19 = _r$12; + _r$13 = ctx.Err(); /* */ $s = 56; case 56: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tmp$20 = _r$13; + res = _tmp$18; + gotErrAfterReqBodyWrite = _tmp$19; + err = _tmp$20; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection[0] === 3) { */ case 37: + /* */ if (!hasBody || bodyWritten) { $s = 57; continue; } + /* */ $s = 58; continue; + /* if (!hasBody || bodyWritten) { */ case 57: + $r = cc[0].writeStreamReset(cs[0].ID, 8, $ifaceNil); /* */ $s = 60; case 60: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 59; continue; + /* } else { */ case 58: + $clone(bodyWriter[0], http2bodyWriterState).cancel(); + $r = cs[0].abortRequestBodyWrite(http2errStopReqBodyWriteAndCancel); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 59: + $r = cc[0].forgetStreamID(cs[0].ID); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$21 = ptrType$16.nil; + _r$14 = cs[0].getStartedWrite(); /* */ $s = 63; case 63: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tmp$22 = _r$14; + _tmp$23 = http2errRequestCanceled; + res = _tmp$21; + gotErrAfterReqBodyWrite = _tmp$22; + err = _tmp$23; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection[0] === 4) { */ case 38: + _tmp$24 = ptrType$16.nil; + _r$15 = cs[0].getStartedWrite(); /* */ $s = 64; case 64: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _tmp$25 = _r$15; + _tmp$26 = cs[0].resetErr; + res = _tmp$24; + gotErrAfterReqBodyWrite = _tmp$25; + err = _tmp$26; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection[0] === 5) { */ case 39: + err$3 = _selection[1][0]; + _selection$1 = $select([[readLoopResCh], []]); + /* */ if (_selection$1[0] === 0) { $s = 65; continue; } + /* */ if (_selection$1[0] === 1) { $s = 66; continue; } + /* */ $s = 67; continue; + /* if (_selection$1[0] === 0) { */ case 65: + re$1 = $clone(_selection$1[1][0], http2resAndError); + _r$16 = handleReadLoopResponse($clone(re$1, http2resAndError)); /* */ $s = 68; case 68: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _tuple$3 = _r$16; + res = _tuple$3[0]; + gotErrAfterReqBodyWrite = _tuple$3[1]; + err = _tuple$3[2]; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } else if (_selection$1[0] === 1) { */ case 66: + /* } */ case 67: + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 69; continue; } + /* */ $s = 70; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 69: + _tmp$27 = ptrType$16.nil; + _r$17 = cs[0].getStartedWrite(); /* */ $s = 71; case 71: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _tmp$28 = _r$17; + _tmp$29 = err$3; + res = _tmp$27; + gotErrAfterReqBodyWrite = _tmp$28; + err = _tmp$29; + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* } */ case 70: + bodyWritten = true; + d$1 = cc[0].responseHeaderTimeout(); + if (!((d$1.$high === 0 && d$1.$low === 0))) { + timer$1 = time.NewTimer(d$1); + $deferred.push([$methodVal(timer$1, "Stop"), []]); + respHeaderTimer = timer$1.C; + } + /* } */ case 40: + /* } */ $s = 30; continue; case 31: + $s = -1; return [res, gotErrAfterReqBodyWrite, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [res, gotErrAfterReqBodyWrite, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.roundTrip }; } $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._selection = _selection; $f._selection$1 = _selection$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$24 = _tmp$24; $f._tmp$25 = _tmp$25; $f._tmp$26 = _tmp$26; $f._tmp$27 = _tmp$27; $f._tmp$28 = _tmp$28; $f._tmp$29 = _tmp$29; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.body$1 = body$1; $f.bodyWriter = bodyWriter; $f.bodyWritten = bodyWritten; $f.cc = cc; $f.contentLen = contentLen; $f.cs = cs; $f.ctx = ctx; $f.d = d; $f.d$1 = d$1; $f.endStream = endStream; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.gotErrAfterReqBodyWrite = gotErrAfterReqBodyWrite; $f.handleReadLoopResponse = handleReadLoopResponse; $f.hasBody = hasBody; $f.hasTrailers = hasTrailers; $f.hdrs = hdrs; $f.re = re; $f.re$1 = re$1; $f.readLoopResCh = readLoopResCh; $f.req = req; $f.requestedGzip = requestedGzip; $f.res = res; $f.respHeaderTimer = respHeaderTimer; $f.timer = timer; $f.timer$1 = timer$1; $f.trailers = trailers; $f.werr = werr; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.roundTrip = function(req) { return this.$val.roundTrip(req); }; + http2ClientConn.ptr.prototype.awaitOpenSlotForRequest = function(req) { + var cc, req, waitingForConn, waitingForConnErr, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cc = $f.cc; req = $f.req; waitingForConn = $f.waitingForConn; waitingForConnErr = $f.waitingForConnErr; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = [cc]; + req = [req]; + waitingForConn = [waitingForConn]; + waitingForConnErr = [waitingForConnErr]; + cc[0] = this; + waitingForConn[0] = $chanNil; + waitingForConnErr[0] = $ifaceNil; + /* while (true) { */ case 1: + time.Time.copy(cc[0].lastActive, time.Now()); + if (cc[0].closed || !cc[0].canTakeNewRequestLocked()) { + if (!(waitingForConn[0] === $chanNil)) { + $close(waitingForConn[0]); + } + $s = -1; return http2errClientConnUnusable; + } + if ((x$4 = (x$5 = (new $Int64(0, $keys(cc[0].streams).length)), new $Int64(x$5.$high + 0, x$5.$low + 1)), x$6 = (new $Int64(0, cc[0].maxConcurrentStreams)), (x$4.$high < x$6.$high || (x$4.$high === x$6.$high && x$4.$low <= x$6.$low)))) { + if (!(waitingForConn[0] === $chanNil)) { + $close(waitingForConn[0]); + } + $s = -1; return $ifaceNil; + } + /* */ if (waitingForConn[0] === $chanNil) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (waitingForConn[0] === $chanNil) { */ case 3: + waitingForConn[0] = new $Chan(structType, 0); + $go((function(cc, req, waitingForConn, waitingForConnErr) { return function $b() { + var _r$1, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = http2awaitRequestCancel(req[0], waitingForConn[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + $r = cc[0].mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + waitingForConnErr[0] = err; + $r = cc[0].cond.Broadcast(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc[0].mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; })(cc, req, waitingForConn, waitingForConnErr), []); + /* } */ case 4: + cc[0].pendingRequests = cc[0].pendingRequests + (1) >> 0; + $r = cc[0].cond.Wait(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cc[0].pendingRequests = cc[0].pendingRequests - (1) >> 0; + if (!($interfaceIsEqual(waitingForConnErr[0], $ifaceNil))) { + $s = -1; return waitingForConnErr[0]; + } + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.awaitOpenSlotForRequest }; } $f.cc = cc; $f.req = req; $f.waitingForConn = waitingForConn; $f.waitingForConnErr = waitingForConnErr; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.awaitOpenSlotForRequest = function(req) { return this.$val.awaitOpenSlotForRequest(req); }; + http2ClientConn.ptr.prototype.writeHeaders = function(streamID, endStream, maxFrameSize, hdrs) { + var _r$1, _r$2, _r$3, cc, chunk, endHeaders, endStream, first, hdrs, maxFrameSize, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; cc = $f.cc; chunk = $f.chunk; endHeaders = $f.endHeaders; endStream = $f.endStream; first = $f.first; hdrs = $f.hdrs; maxFrameSize = $f.maxFrameSize; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + first = true; + /* while (true) { */ case 1: + /* if (!(hdrs.$length > 0 && $interfaceIsEqual(cc.werr, $ifaceNil))) { break; } */ if(!(hdrs.$length > 0 && $interfaceIsEqual(cc.werr, $ifaceNil))) { $s = 2; continue; } + chunk = hdrs; + if (chunk.$length > maxFrameSize) { + chunk = $subslice(chunk, 0, maxFrameSize); + } + hdrs = $subslice(hdrs, chunk.$length); + endHeaders = hdrs.$length === 0; + /* */ if (first) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (first) { */ case 3: + _r$1 = cc.fr.WriteHeaders(new http2HeadersFrameParam.ptr(streamID, chunk, endStream, endHeaders, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + first = false; + $s = 5; continue; + /* } else { */ case 4: + _r$2 = cc.fr.WriteContinuation(streamID, endHeaders, chunk); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 5: + /* } */ $s = 1; continue; case 2: + _r$3 = cc.bw.Flush(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return cc.werr; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.writeHeaders }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.cc = cc; $f.chunk = chunk; $f.endHeaders = endHeaders; $f.endStream = endStream; $f.first = first; $f.hdrs = hdrs; $f.maxFrameSize = maxFrameSize; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.writeHeaders = function(streamID, endStream, maxFrameSize, hdrs) { return this.$val.writeHeaders(streamID, endStream, maxFrameSize, hdrs); }; + http2clientStream.ptr.prototype.writeRequestBody = function(body$1, bodyCloser) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, allowed, body$1, bodyCloser, buf, cc, cs, data, err, err$1, ferr, hasTrailers, maxFrameSize, n, remain, req, sawEOF, sentEnd, trls, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; allowed = $f.allowed; body$1 = $f.body$1; bodyCloser = $f.bodyCloser; buf = $f.buf; cc = $f.cc; cs = $f.cs; data = $f.data; err = $f.err; err$1 = $f.err$1; ferr = $f.ferr; hasTrailers = $f.hasTrailers; maxFrameSize = $f.maxFrameSize; n = $f.n; remain = $f.remain; req = $f.req; sawEOF = $f.sawEOF; sentEnd = $f.sentEnd; trls = $f.trls; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + bodyCloser = [bodyCloser]; + cs = [cs]; + err = [err]; + err[0] = $ifaceNil; + cs[0] = this; + cc = cs[0].cc; + sentEnd = false; + _r$1 = cc.frameScratchBuffer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + buf = _r$1; + $deferred.push([$methodVal(cc, "putFrameScratchBuffer"), [buf]]); + $deferred.push([(function(bodyCloser, cs, err) { return function $b() { + var _r$2, cerr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; cerr = $f.cerr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = http2traceWroteRequest(cs[0].trace, err[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = bodyCloser[0].Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + cerr = _r$2; + if ($interfaceIsEqual(err[0], $ifaceNil)) { + err[0] = cerr; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f.cerr = cerr; $f.$s = $s; $f.$r = $r; return $f; + }; })(bodyCloser, cs, err), []]); + req = cs[0].req; + hasTrailers = !(req.Trailer === false); + sawEOF = false; + /* while (true) { */ case 2: + /* if (!(!sawEOF)) { break; } */ if(!(!sawEOF)) { $s = 3; continue; } + _r$2 = body$1.Read(buf); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err$1 = _tuple[1]; + if ($interfaceIsEqual(err$1, io.EOF)) { + sawEOF = true; + err$1 = $ifaceNil; + } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { + err[0] = err$1; + $s = -1; return err[0]; + } + remain = $subslice(buf, 0, n); + /* while (true) { */ case 5: + /* if (!(remain.$length > 0 && $interfaceIsEqual(err$1, $ifaceNil))) { break; } */ if(!(remain.$length > 0 && $interfaceIsEqual(err$1, $ifaceNil))) { $s = 6; continue; } + allowed = 0; + _r$3 = cs[0].awaitFlowControl(remain.$length); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + allowed = _tuple$1[0]; + err$1 = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err$1, http2errStopReqBodyWrite)) { $s = 9; continue; } + /* */ if ($interfaceIsEqual(err$1, http2errStopReqBodyWriteAndCancel)) { $s = 10; continue; } + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if ($interfaceIsEqual(err$1, http2errStopReqBodyWrite)) { */ case 9: + err[0] = err$1; + $s = -1; return err[0]; + /* } else if ($interfaceIsEqual(err$1, http2errStopReqBodyWriteAndCancel)) { */ case 10: + $r = cc.writeStreamReset(cs[0].ID, 8, $ifaceNil); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err[0] = err$1; + $s = -1; return err[0]; + /* } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 11: + err[0] = err$1; + $s = -1; return err[0]; + /* } */ case 12: + case 8: + $r = cc.wmu.Lock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + data = $subslice(remain, 0, allowed); + remain = $subslice(remain, allowed); + sentEnd = sawEOF && (remain.$length === 0) && !hasTrailers; + _r$4 = cc.fr.WriteData(cs[0].ID, sentEnd, data); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$1 = _r$4; + /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 16: + _r$5 = cc.bw.Flush(); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$1 = _r$5; + /* } */ case 17: + $r = cc.wmu.Unlock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 5; continue; case 6: + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + err[0] = err$1; + $s = -1; return err[0]; + } + /* } */ $s = 2; continue; case 3: + if (sentEnd) { + err[0] = $ifaceNil; + $s = -1; return err[0]; + } + trls = sliceType$3.nil; + /* */ if (hasTrailers) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (hasTrailers) { */ case 20: + $r = cc.mu.Lock(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$6 = cc.encodeTrailers(req); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$2 = _r$6; + trls = _tuple$2[0]; + err[0] = _tuple$2[1]; + $r = cc.mu.Unlock(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 25: + $r = cc.writeStreamReset(cs[0].ID, 2, err[0]); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.forgetStreamID(cs[0].ID); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err[0] = err[0]; + $s = -1; return err[0]; + /* } */ case 26: + /* } */ case 21: + $r = cc.mu.Lock(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + maxFrameSize = ((cc.maxFrameSize >> 0)); + $r = cc.mu.Unlock(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.wmu.Lock(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); + /* */ if (trls.$length > 0) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (trls.$length > 0) { */ case 32: + _r$7 = cc.writeHeaders(cs[0].ID, true, maxFrameSize, trls); /* */ $s = 35; case 35: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err[0] = _r$7; + $s = 34; continue; + /* } else { */ case 33: + _r$8 = cc.fr.WriteData(cs[0].ID, true, sliceType$3.nil); /* */ $s = 36; case 36: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err[0] = _r$8; + /* } */ case 34: + _r$9 = cc.bw.Flush(); /* */ $s = 37; case 37: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + ferr = _r$9; + if (!($interfaceIsEqual(ferr, $ifaceNil)) && $interfaceIsEqual(err[0], $ifaceNil)) { + err[0] = ferr; + } + err[0] = err[0]; + $s = -1; return err[0]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.writeRequestBody }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.allowed = allowed; $f.body$1 = body$1; $f.bodyCloser = bodyCloser; $f.buf = buf; $f.cc = cc; $f.cs = cs; $f.data = data; $f.err = err; $f.err$1 = err$1; $f.ferr = ferr; $f.hasTrailers = hasTrailers; $f.maxFrameSize = maxFrameSize; $f.n = n; $f.remain = remain; $f.req = req; $f.sawEOF = sawEOF; $f.sentEnd = sentEnd; $f.trls = trls; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientStream.prototype.writeRequestBody = function(body$1, bodyCloser) { return this.$val.writeRequestBody(body$1, bodyCloser); }; + http2clientStream.ptr.prototype.awaitFlowControl = function(maxBytes) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, a, cc, cs, err, err$1, maxBytes, take, taken, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; a = $f.a; cc = $f.cc; cs = $f.cs; err = $f.err; err$1 = $f.err$1; maxBytes = $f.maxBytes; take = $f.take; taken = $f.taken; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + taken = 0; + err = $ifaceNil; + cs = this; + cc = cs.cc; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + /* while (true) { */ case 2: + if (cc.closed) { + _tmp = 0; + _tmp$1 = http2errClientConnClosed; + taken = _tmp; + err = _tmp$1; + $s = -1; return [taken, err]; + } + if (!($interfaceIsEqual(cs.stopReqBody, $ifaceNil))) { + _tmp$2 = 0; + _tmp$3 = cs.stopReqBody; + taken = _tmp$2; + err = _tmp$3; + $s = -1; return [taken, err]; + } + err$1 = cs.checkResetOrDone(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = err$1; + taken = _tmp$4; + err = _tmp$5; + $s = -1; return [taken, err]; + } + a = cs.flow.available(); + if (a > 0) { + take = a; + if (((take >> 0)) > maxBytes) { + take = ((maxBytes >> 0)); + } + if (take > ((cc.maxFrameSize >> 0))) { + take = ((cc.maxFrameSize >> 0)); + } + cs.flow.take(take); + _tmp$6 = take; + _tmp$7 = $ifaceNil; + taken = _tmp$6; + err = _tmp$7; + $s = -1; return [taken, err]; + } + $r = cc.cond.Wait(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 2; continue; case 3: + $s = -1; return [taken, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [taken, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientStream.ptr.prototype.awaitFlowControl }; } $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f.a = a; $f.cc = cc; $f.cs = cs; $f.err = err; $f.err$1 = err$1; $f.maxBytes = maxBytes; $f.take = take; $f.taken = taken; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientStream.prototype.awaitFlowControl = function(maxBytes) { return this.$val.awaitFlowControl(maxBytes); }; + http2badStringError.ptr.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$1 = fmt.Sprintf("%s %q", new sliceType([new $String(e.what), new $String(e.str)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2badStringError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + http2badStringError.prototype.Error = function() { return this.$val.Error(); }; + http2ClientConn.ptr.prototype.encodeHeaders = function(req, addGzipHeader, trailers, contentLength) { + var _entry, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _ref$1, _tuple, addGzipHeader, cc, contentLength, enumerateHeaders, err, hlSize, host, k, orig, path$1, req, trace, traceHeaders, trailers, v, vv, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _ref$1 = $f._ref$1; _tuple = $f._tuple; addGzipHeader = $f.addGzipHeader; cc = $f.cc; contentLength = $f.contentLength; enumerateHeaders = $f.enumerateHeaders; err = $f.err; hlSize = $f.hlSize; host = $f.host; k = $f.k; orig = $f.orig; path$1 = $f.path$1; req = $f.req; trace = $f.trace; traceHeaders = $f.traceHeaders; trailers = $f.trailers; v = $f.v; vv = $f.vv; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addGzipHeader = [addGzipHeader]; + cc = [cc]; + contentLength = [contentLength]; + hlSize = [hlSize]; + host = [host]; + path$1 = [path$1]; + req = [req]; + trace = [trace]; + traceHeaders = [traceHeaders]; + trailers = [trailers]; + cc[0] = this; + cc[0].hbuf.Reset(); + host[0] = req[0].Host; + if (host[0] === "") { + host[0] = req[0].URL.Host; + } + _r$1 = httpguts.PunycodeHostPort(host[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host[0] = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [sliceType$3.nil, err]; + } + path$1[0] = ""; + /* */ if (!(req[0].Method === "CONNECT")) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(req[0].Method === "CONNECT")) { */ case 2: + path$1[0] = req[0].URL.RequestURI(); + /* */ if (!http2validPseudoPath(path$1[0])) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!http2validPseudoPath(path$1[0])) { */ case 4: + orig = path$1[0]; + path$1[0] = strings.TrimPrefix(path$1[0], req[0].URL.Scheme + "://" + host[0]); + /* */ if (!http2validPseudoPath(path$1[0])) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!http2validPseudoPath(path$1[0])) { */ case 6: + /* */ if (!(req[0].URL.Opaque === "")) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!(req[0].URL.Opaque === "")) { */ case 8: + _r$2 = fmt.Errorf("invalid request :path %q from URL.Opaque = %q", new sliceType([new $String(orig), new $String(req[0].URL.Opaque)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [sliceType$3.nil, _r$2]; + /* } else { */ case 9: + _r$3 = fmt.Errorf("invalid request :path %q", new sliceType([new $String(orig)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [sliceType$3.nil, _r$3]; + /* } */ case 10: + /* } */ case 7: + /* } */ case 5: + /* } */ case 3: + _ref = req[0].Header; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 13: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 14; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 13; continue; + } + k = _entry.k; + vv = _entry.v; + /* */ if (!httpguts.ValidHeaderFieldName(k)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!httpguts.ValidHeaderFieldName(k)) { */ case 15: + _r$4 = fmt.Errorf("invalid HTTP header name %q", new sliceType([new $String(k)])); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [sliceType$3.nil, _r$4]; + /* } */ case 16: + _ref$1 = vv; + _i$1 = 0; + /* while (true) { */ case 18: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 19; continue; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 20: + _r$5 = fmt.Errorf("invalid HTTP header value %q for header %q", new sliceType([new $String(v), new $String(k)])); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [sliceType$3.nil, _r$5]; + /* } */ case 21: + _i$1++; + /* } */ $s = 18; continue; case 19: + _i++; + /* } */ $s = 13; continue; case 14: + enumerateHeaders = (function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function $b(f) { + var _entry$1, _i$2, _i$3, _keys$1, _ref$2, _ref$3, didUA, f, k$1, v$1, vv$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry$1 = $f._entry$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _keys$1 = $f._keys$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; didUA = $f.didUA; f = $f.f; k$1 = $f.k$1; v$1 = $f.v$1; vv$1 = $f.vv$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = f(":authority", host[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = f(":method", req[0].Method); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(req[0].Method === "CONNECT")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(req[0].Method === "CONNECT")) { */ case 3: + $r = f(":path", path$1[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = f(":scheme", req[0].URL.Scheme); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + /* */ if (!(trailers[0] === "")) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(trailers[0] === "")) { */ case 7: + $r = f("trailer", trailers[0]); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + didUA = false; + _ref$2 = req[0].Header; + _i$2 = 0; + _keys$1 = $keys(_ref$2); + /* while (true) { */ case 10: + /* if (!(_i$2 < _keys$1.length)) { break; } */ if(!(_i$2 < _keys$1.length)) { $s = 11; continue; } + _entry$1 = _ref$2[_keys$1[_i$2]]; + if (_entry$1 === undefined) { + _i$2++; + /* continue; */ $s = 10; continue; + } + k$1 = _entry$1.k; + vv$1 = _entry$1.v; + /* */ if (strings.EqualFold(k$1, "host") || strings.EqualFold(k$1, "content-length")) { $s = 12; continue; } + /* */ if (strings.EqualFold(k$1, "connection") || strings.EqualFold(k$1, "proxy-connection") || strings.EqualFold(k$1, "transfer-encoding") || strings.EqualFold(k$1, "upgrade") || strings.EqualFold(k$1, "keep-alive")) { $s = 13; continue; } + /* */ if (strings.EqualFold(k$1, "user-agent")) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (strings.EqualFold(k$1, "host") || strings.EqualFold(k$1, "content-length")) { */ case 12: + _i$2++; + /* continue; */ $s = 10; continue; + $s = 15; continue; + /* } else if (strings.EqualFold(k$1, "connection") || strings.EqualFold(k$1, "proxy-connection") || strings.EqualFold(k$1, "transfer-encoding") || strings.EqualFold(k$1, "upgrade") || strings.EqualFold(k$1, "keep-alive")) { */ case 13: + _i$2++; + /* continue; */ $s = 10; continue; + $s = 15; continue; + /* } else if (strings.EqualFold(k$1, "user-agent")) { */ case 14: + didUA = true; + if (vv$1.$length < 1) { + _i$2++; + /* continue; */ $s = 10; continue; + } + vv$1 = $subslice(vv$1, 0, 1); + if ((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") { + _i$2++; + /* continue; */ $s = 10; continue; + } + /* } */ case 15: + _ref$3 = vv$1; + _i$3 = 0; + /* while (true) { */ case 16: + /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 17; continue; } + v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + $r = f(k$1, v$1); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$3++; + /* } */ $s = 16; continue; case 17: + _i$2++; + /* } */ $s = 10; continue; case 11: + /* */ if (http2shouldSendReqContentLength(req[0].Method, contentLength[0])) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (http2shouldSendReqContentLength(req[0].Method, contentLength[0])) { */ case 19: + $r = f("content-length", strconv.FormatInt(contentLength[0], 10)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 20: + /* */ if (addGzipHeader[0]) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (addGzipHeader[0]) { */ case 22: + $r = f("accept-encoding", "gzip"); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 23: + /* */ if (!didUA) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!didUA) { */ case 25: + $r = f("user-agent", "Go-http-client/2.0"); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._entry$1 = _entry$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._keys$1 = _keys$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f.didUA = didUA; $f.f = f; $f.k$1 = k$1; $f.v$1 = v$1; $f.vv$1 = vv$1; $f.$s = $s; $f.$r = $r; return $f; + }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers); + hlSize[0] = new $Uint64(0, 0); + $r = enumerateHeaders((function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function(name, value) { + var hf, name, value, x$4; + hf = new hpack.HeaderField.ptr(name, value, false); + hlSize[0] = (x$4 = (new $Uint64(0, $clone(hf, hpack.HeaderField).Size())), new $Uint64(hlSize[0].$high + x$4.$high, hlSize[0].$low + x$4.$low)); + }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers)); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ((x$4 = cc[0].peerMaxHeaderListSize, (hlSize[0].$high > x$4.$high || (hlSize[0].$high === x$4.$high && hlSize[0].$low > x$4.$low)))) { + $s = -1; return [sliceType$3.nil, http2errRequestHeaderListSize]; + } + _r$6 = http2requestTrace(req[0]); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + trace[0] = _r$6; + traceHeaders[0] = http2traceHasWroteHeaderField(trace[0]); + $r = enumerateHeaders((function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function $b(name, value) { + var _r$7, name, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$7 = $f._r$7; name = $f.name; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$7 = strings.ToLower(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + name = _r$7; + $r = cc[0].writeHeader(name, value); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (traceHeaders[0]) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (traceHeaders[0]) { */ case 3: + $r = http2traceWroteHeaderField(trace[0], name, value); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$7 = _r$7; $f.name = name; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [cc[0].hbuf.Bytes(), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.encodeHeaders }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.addGzipHeader = addGzipHeader; $f.cc = cc; $f.contentLength = contentLength; $f.enumerateHeaders = enumerateHeaders; $f.err = err; $f.hlSize = hlSize; $f.host = host; $f.k = k; $f.orig = orig; $f.path$1 = path$1; $f.req = req; $f.trace = trace; $f.traceHeaders = traceHeaders; $f.trailers = trailers; $f.v = v; $f.vv = vv; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.encodeHeaders = function(req, addGzipHeader, trailers, contentLength) { return this.$val.encodeHeaders(req, addGzipHeader, trailers, contentLength); }; + http2shouldSendReqContentLength = function(method, contentLength) { + var _1, contentLength, method; + if ((contentLength.$high > 0 || (contentLength.$high === 0 && contentLength.$low > 0))) { + return true; + } + if ((contentLength.$high < 0 || (contentLength.$high === 0 && contentLength.$low < 0))) { + return false; + } + _1 = method; + if (_1 === ("POST") || _1 === ("PUT") || _1 === ("PATCH")) { + return true; + } else { + return false; + } + }; + http2ClientConn.ptr.prototype.encodeTrailers = function(req) { + var _entry, _entry$1, _i, _i$1, _i$2, _i$3, _keys, _keys$1, _r$1, _ref, _ref$1, _ref$2, _ref$3, cc, hf, hlSize, k, k$1, lowKey, req, v, v$1, vv, vv$1, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _i$3 = $f._i$3; _keys = $f._keys; _keys$1 = $f._keys$1; _r$1 = $f._r$1; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; cc = $f.cc; hf = $f.hf; hlSize = $f.hlSize; k = $f.k; k$1 = $f.k$1; lowKey = $f.lowKey; req = $f.req; v = $f.v; v$1 = $f.v$1; vv = $f.vv; vv$1 = $f.vv$1; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + cc.hbuf.Reset(); + hlSize = new $Uint64(0, 0); + _ref = req.Trailer; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + _ref$1 = vv; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + hf = new hpack.HeaderField.ptr(k, v, false); + hlSize = (x$4 = (new $Uint64(0, $clone(hf, hpack.HeaderField).Size())), new $Uint64(hlSize.$high + x$4.$high, hlSize.$low + x$4.$low)); + _i$1++; + } + _i++; + } + if ((x$5 = cc.peerMaxHeaderListSize, (hlSize.$high > x$5.$high || (hlSize.$high === x$5.$high && hlSize.$low > x$5.$low)))) { + $s = -1; return [sliceType$3.nil, http2errRequestHeaderListSize]; + } + _ref$2 = req.Trailer; + _i$2 = 0; + _keys$1 = $keys(_ref$2); + /* while (true) { */ case 1: + /* if (!(_i$2 < _keys$1.length)) { break; } */ if(!(_i$2 < _keys$1.length)) { $s = 2; continue; } + _entry$1 = _ref$2[_keys$1[_i$2]]; + if (_entry$1 === undefined) { + _i$2++; + /* continue; */ $s = 1; continue; + } + k$1 = _entry$1.k; + vv$1 = _entry$1.v; + _r$1 = strings.ToLower(k$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + lowKey = _r$1; + _ref$3 = vv$1; + _i$3 = 0; + /* while (true) { */ case 4: + /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 5; continue; } + v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + $r = cc.writeHeader(lowKey, v$1); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$3++; + /* } */ $s = 4; continue; case 5: + _i$2++; + /* } */ $s = 1; continue; case 2: + $s = -1; return [cc.hbuf.Bytes(), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.encodeTrailers }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._i$3 = _i$3; $f._keys = _keys; $f._keys$1 = _keys$1; $f._r$1 = _r$1; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f.cc = cc; $f.hf = hf; $f.hlSize = hlSize; $f.k = k; $f.k$1 = k$1; $f.lowKey = lowKey; $f.req = req; $f.v = v; $f.v$1 = v$1; $f.vv = vv; $f.vv$1 = vv$1; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.encodeTrailers = function(req) { return this.$val.encodeTrailers(req); }; + http2ClientConn.ptr.prototype.writeHeader = function(name, value) { + var _r$1, cc, name, value, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; name = $f.name; value = $f.value; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + /* */ if (http2VerboseLogs) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs) { */ case 1: + $r = log.Printf("http2: Transport encoding header %q = %q", new sliceType([new $String(name), new $String(value)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = cc.henc.WriteField(new hpack.HeaderField.ptr(name, value, false)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.writeHeader }; } $f._r$1 = _r$1; $f.cc = cc; $f.name = name; $f.value = value; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.writeHeader = function(name, value) { return this.$val.writeHeader(name, value); }; + http2ClientConn.ptr.prototype.newStream = function() { + var _key, cc, cs; + cc = this; + cs = new http2clientStream.ptr(cc, ptrType$7.nil, ptrType$47.nil, cc.nextStreamID, new $Chan(http2resAndError, 1), new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), $ifaceNil, $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError), false, false, $throwNilPointerError, new http2flow.ptr(0, ptrType$33.nil), new http2flow.ptr(0, ptrType$33.nil), new $Int64(0, 0), $ifaceNil, $ifaceNil, false, new $Chan(structType, 0), $ifaceNil, new $Chan(structType, 0), false, false, false, 0, false, ptrType$74.nil); + cs.flow.add(((cc.initialWindowSize >> 0))); + cs.flow.setConnFlow(cc.flow); + cs.inflow.add(4194304); + cs.inflow.setConnFlow(cc.inflow); + cc.nextStreamID = cc.nextStreamID + (2) >>> 0; + _key = cs.ID; (cc.streams || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: cs }; + return cs; + }; + http2ClientConn.prototype.newStream = function() { return this.$val.newStream(); }; + http2ClientConn.ptr.prototype.forgetStreamID = function(id) { + var _r$1, cc, id, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; id = $f.id; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + _r$1 = cc.streamByID(id, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.forgetStreamID }; } $f._r$1 = _r$1; $f.cc = cc; $f.id = id; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.forgetStreamID = function(id) { return this.$val.forgetStreamID(id); }; + http2ClientConn.ptr.prototype.streamByID = function(id, andRemove) { + var _entry, andRemove, cc, cs, id, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; andRemove = $f.andRemove; cc = $f.cc; cs = $f.cs; id = $f.id; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + cs = (_entry = cc.streams[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$75.nil); + /* */ if (andRemove && !(cs === ptrType$75.nil) && !cc.closed) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (andRemove && !(cs === ptrType$75.nil) && !cc.closed) { */ case 2: + time.Time.copy(cc.lastActive, time.Now()); + delete cc.streams[$Uint32.keyFor(id)]; + if (($keys(cc.streams).length === 0) && !(cc.idleTimer === ptrType$57.nil)) { + cc.idleTimer.Reset(cc.idleTimeout); + } + $close(cs.done); + $r = cc.cond.Broadcast(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return cs; + /* */ } return; } } catch(err) { $err = err; $s = -1; return ptrType$75.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.streamByID }; } $f._entry = _entry; $f.andRemove = andRemove; $f.cc = cc; $f.cs = cs; $f.id = id; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.streamByID = function(id, andRemove) { return this.$val.streamByID(id, andRemove); }; + http2ClientConn.ptr.prototype.readLoop = function() { + var _r$1, _r$2, _tuple, cc, ce, ok, rl, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; cc = $f.cc; ce = $f.ce; ok = $f.ok; rl = $f.rl; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = this; + rl = new http2clientConnReadLoop.ptr(cc, false); + $deferred.push([$methodVal(rl, "cleanup"), []]); + _r$1 = rl.run(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cc.readerErr = _r$1; + _tuple = $assertType(cc.readerErr, http2ConnectionError, true); + ce = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + $r = cc.wmu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = cc.fr.WriteGoAway(0, ((ce >>> 0)), sliceType$3.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $r = cc.wmu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.readLoop }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.cc = cc; $f.ce = ce; $f.ok = ok; $f.rl = rl; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2ClientConn.prototype.readLoop = function() { return this.$val.readLoop(); }; + http2GoAwayError.ptr.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$1 = fmt.Sprintf("http2: server sent GOAWAY and closed the connection; LastStreamID=%v, ErrCode=%v, debug=%q", new sliceType([new $Uint32(e.LastStreamID), new http2ErrCode(e.ErrCode), new $String(e.DebugData)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2GoAwayError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + http2GoAwayError.prototype.Error = function() { return this.$val.Error(); }; + http2isEOFOrNetReadError = function(err) { + var _tuple, err, ne, ok; + if ($interfaceIsEqual(err, io.EOF)) { + return true; + } + _tuple = $assertType(err, ptrType$60, true); + ne = _tuple[0]; + ok = _tuple[1]; + return ok && ne.Op === "read"; + }; + http2clientConnReadLoop.ptr.prototype.cleanup = function() { + var _arg, _entry, _i, _keys, _r$1, _ref, _selection, cc, cs, err, rl, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; _selection = $f._selection; cc = $f.cc; cs = $f.cs; err = $f.err; rl = $f.rl; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + rl = this; + cc = rl.cc; + $deferred.push([$methodVal(cc.tconn, "Close"), []]); + _r$1 = cc.t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $deferred.push([$methodVal(_r$1, "MarkDead"), [cc]]); + $deferred.push([function(_arg) { $close(_arg); }, [cc.readerDone]]); + if (!(cc.idleTimer === ptrType$57.nil)) { + cc.idleTimer.Stop(); + } + err = cc.readerErr; + $r = cc.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(cc.goAway === ptrType$45.nil) && http2isEOFOrNetReadError(err)) { + err = (x$4 = new http2GoAwayError.ptr(cc.goAway.LastStreamID, cc.goAway.ErrCode, cc.goAwayDebug), new x$4.constructor.elem(x$4)); + } else if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } + _ref = cc.streams; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 3: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 3; continue; + } + cs = _entry.v; + $r = cs.bufPipe.CloseWithError(err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _selection = $select([[cs.resc, new http2resAndError.ptr(ptrType$16.nil, err)], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + $close(cs.done); + _i++; + /* } */ $s = 3; continue; case 4: + cc.closed = true; + $r = cc.cond.Broadcast(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.cleanup }; } $f._arg = _arg; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f._selection = _selection; $f.cc = cc; $f.cs = cs; $f.err = err; $f.rl = rl; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnReadLoop.prototype.cleanup = function() { return this.$val.cleanup(); }; + http2clientConnReadLoop.ptr.prototype.run = function() { + var _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, cc, cs, err, f, f$1, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, gotReply, gotSettings, maybeIdle, ok, ok$1, rl, se, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; cc = $f.cc; cs = $f.cs; err = $f.err; f = $f.f; f$1 = $f.f$1; f$2 = $f.f$2; f$3 = $f.f$3; f$4 = $f.f$4; f$5 = $f.f$5; f$6 = $f.f$6; f$7 = $f.f$7; f$8 = $f.f$8; f$9 = $f.f$9; gotReply = $f.gotReply; gotSettings = $f.gotSettings; maybeIdle = $f.maybeIdle; ok = $f.ok; ok$1 = $f.ok$1; rl = $f.rl; se = $f.se; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + cc = rl.cc; + rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse; + gotReply = false; + gotSettings = false; + /* while (true) { */ case 1: + _r$1 = cc.fr.ReadFrame(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + f = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + $r = cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", new sliceType([cc, err, err])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + _tuple$1 = $assertType(err, http2StreamError, true); + se = $clone(_tuple$1[0], http2StreamError); + ok = _tuple$1[1]; + /* */ if (ok) { $s = 7; continue; } + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (ok) { */ case 7: + _r$2 = cc.streamByID(se.StreamID, false); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + cs = _r$2; + /* */ if (!(cs === ptrType$75.nil)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!(cs === ptrType$75.nil)) { */ case 11: + $r = cs.cc.writeStreamReset(cs.ID, se.Code, err); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cs.cc.forgetStreamID(cs.ID); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ($interfaceIsEqual(se.Cause, $ifaceNil)) { + se.Cause = cc.fr.errDetail; + } + $r = rl.endStreamError(cs, new se.constructor.elem(se)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 12: + /* continue; */ $s = 1; continue; + $s = 9; continue; + /* } else if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: + $s = -1; return err; + /* } */ case 9: + /* */ if (http2VerboseLogs) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (http2VerboseLogs) { */ case 16: + _r$3 = http2summarizeFrame(f); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg = new $String(_r$3); + $r = cc.vlogf("http2: Transport received %s", new sliceType([_arg])); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + /* */ if (!gotSettings) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!gotSettings) { */ case 20: + _tuple$2 = $assertType(f, ptrType$41, true); + ok$1 = _tuple$2[1]; + /* */ if (!ok$1) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (!ok$1) { */ case 22: + $r = cc.logf("protocol error: received %T before a SETTINGS frame", new sliceType([f])); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new http2ConnectionError(1); + /* } */ case 23: + gotSettings = true; + /* } */ case 21: + maybeIdle = false; + _ref = f; + /* */ if ($assertType(_ref, ptrType$39, true)[1]) { $s = 25; continue; } + /* */ if ($assertType(_ref, ptrType$42, true)[1]) { $s = 26; continue; } + /* */ if ($assertType(_ref, ptrType$45, true)[1]) { $s = 27; continue; } + /* */ if ($assertType(_ref, ptrType$46, true)[1]) { $s = 28; continue; } + /* */ if ($assertType(_ref, ptrType$41, true)[1]) { $s = 29; continue; } + /* */ if ($assertType(_ref, ptrType$67, true)[1]) { $s = 30; continue; } + /* */ if ($assertType(_ref, ptrType$43, true)[1]) { $s = 31; continue; } + /* */ if ($assertType(_ref, ptrType$44, true)[1]) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if ($assertType(_ref, ptrType$39, true)[1]) { */ case 25: + f$1 = _ref.$val; + _r$4 = rl.processHeaders(f$1); /* */ $s = 35; case 35: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + maybeIdle = true; + gotReply = true; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$42, true)[1]) { */ case 26: + f$2 = _ref.$val; + _r$5 = rl.processData(f$2); /* */ $s = 36; case 36: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + maybeIdle = true; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$45, true)[1]) { */ case 27: + f$3 = _ref.$val; + _r$6 = rl.processGoAway(f$3); /* */ $s = 37; case 37: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err = _r$6; + maybeIdle = true; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$46, true)[1]) { */ case 28: + f$4 = _ref.$val; + _r$7 = rl.processResetStream(f$4); /* */ $s = 38; case 38: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err = _r$7; + maybeIdle = true; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$41, true)[1]) { */ case 29: + f$5 = _ref.$val; + _r$8 = rl.processSettings(f$5); /* */ $s = 39; case 39: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err = _r$8; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$67, true)[1]) { */ case 30: + f$6 = _ref.$val; + err = rl.processPushPromise(f$6); + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$43, true)[1]) { */ case 31: + f$7 = _ref.$val; + _r$9 = rl.processWindowUpdate(f$7); /* */ $s = 40; case 40: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err = _r$9; + $s = 34; continue; + /* } else if ($assertType(_ref, ptrType$44, true)[1]) { */ case 32: + f$8 = _ref.$val; + _r$10 = rl.processPing(f$8); /* */ $s = 41; case 41: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err = _r$10; + $s = 34; continue; + /* } else { */ case 33: + f$9 = _ref; + $r = cc.logf("Transport: unhandled response frame type %T", new sliceType([f$9])); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 34: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 43; continue; } + /* */ $s = 44; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 43: + /* */ if (http2VerboseLogs) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (http2VerboseLogs) { */ case 45: + _arg$1 = cc; + _r$11 = http2summarizeFrame(f); /* */ $s = 47; case 47: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _arg$2 = new $String(_r$11); + _arg$3 = err; + $r = cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", new sliceType([_arg$1, _arg$2, _arg$3])); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 46: + $s = -1; return err; + /* } */ case 44: + /* */ if (rl.closeWhenIdle && gotReply && maybeIdle) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (rl.closeWhenIdle && gotReply && maybeIdle) { */ case 49: + $r = cc.closeIfIdle(); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 50: + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.run }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.cc = cc; $f.cs = cs; $f.err = err; $f.f = f; $f.f$1 = f$1; $f.f$2 = f$2; $f.f$3 = f$3; $f.f$4 = f$4; $f.f$5 = f$5; $f.f$6 = f$6; $f.f$7 = f$7; $f.f$8 = f$8; $f.f$9 = f$9; $f.gotReply = gotReply; $f.gotSettings = gotSettings; $f.maybeIdle = maybeIdle; $f.ok = ok; $f.ok$1 = ok$1; $f.rl = rl; $f.se = se; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.run = function() { return this.$val.run(); }; + http2clientConnReadLoop.ptr.prototype.processHeaders = function(f) { + var _r$1, _r$2, _r$3, _tuple, _tuple$1, cc, cs, err, f, ok, res, rl, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; cc = $f.cc; cs = $f.cs; err = $f.err; f = $f.f; ok = $f.ok; res = $f.res; rl = $f.rl; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + rl = this; + cc = rl.cc; + _r$1 = cc.streamByID(f.http2HeadersFrame.http2FrameHeader.StreamID, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cs = _r$1; + if (cs === ptrType$75.nil) { + $s = -1; return $ifaceNil; + } + /* */ if (f.http2HeadersFrame.StreamEnded()) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (f.http2HeadersFrame.StreamEnded()) { */ case 2: + /* */ if (!($interfaceIsEqual(cs.req.Body, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(cs.req.Body, $ifaceNil))) { */ case 4: + $deferred.push([$methodVal(cc, "forgetStreamID"), [f.http2HeadersFrame.http2FrameHeader.StreamID]]); + $s = 6; continue; + /* } else { */ case 5: + $r = cc.forgetStreamID(f.http2HeadersFrame.http2FrameHeader.StreamID); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 6: + /* } */ case 3: + /* */ if (!cs.firstByte) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!cs.firstByte) { */ case 8: + /* */ if (!(cs.trace === ptrType$47.nil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(cs.trace === ptrType$47.nil)) { */ case 10: + $r = http2traceFirstResponseByte(cs.trace); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 11: + cs.firstByte = true; + /* } */ case 9: + /* */ if (!cs.pastHeaders) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!cs.pastHeaders) { */ case 13: + cs.pastHeaders = true; + $s = 15; continue; + /* } else { */ case 14: + _r$2 = rl.processTrailers(cs, f); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } */ case 15: + _r$3 = rl.handleResponse(cs, f); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + res = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 18: + _tuple$1 = $assertType(err, http2ConnectionError, true); + ok = _tuple$1[1]; + if (ok) { + $s = -1; return err; + } + $r = cs.cc.writeStreamReset(f.http2HeadersFrame.http2FrameHeader.StreamID, 1, err); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.forgetStreamID(cs.ID); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = $send(cs.resc, $clone(new http2resAndError.ptr(ptrType$16.nil, err), http2resAndError)); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* } */ case 19: + if (res === ptrType$16.nil) { + $s = -1; return $ifaceNil; + } + cs.resTrailer = (res.$ptr_Trailer || (res.$ptr_Trailer = new ptrType$74(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, res))); + $r = $send(cs.resc, $clone(new http2resAndError.ptr(res, $ifaceNil), http2resAndError)); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processHeaders }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.cc = cc; $f.cs = cs; $f.err = err; $f.f = f; $f.ok = ok; $f.res = res; $f.rl = rl; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnReadLoop.prototype.processHeaders = function(f) { return this.$val.processHeaders(f); }; + http2clientConnReadLoop.ptr.prototype.handleResponse = function(cs, f) { + var _entry, _entry$1, _i, _key, _r$1, _ref, _tuple, _tuple$1, clen64, clens, cs, err, err$1, err$2, f, fn, header, hf, isHead, key, res, rl, status, statusCode, streamEnded, t, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _r$1 = $f._r$1; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; clen64 = $f.clen64; clens = $f.clens; cs = $f.cs; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; f = $f.f; fn = $f.fn; header = $f.header; hf = $f.hf; isHead = $f.isHead; key = $f.key; res = $f.res; rl = $f.rl; status = $f.status; statusCode = $f.statusCode; streamEnded = $f.streamEnded; t = $f.t; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + if (f.Truncated) { + $s = -1; return [ptrType$16.nil, http2errResponseHeaderListSize]; + } + status = f.PseudoValue("status"); + if (status === "") { + $s = -1; return [ptrType$16.nil, errors.New("malformed response from server: missing status pseudo header")]; + } + _tuple = strconv.Atoi(status); + statusCode = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, errors.New("malformed response from server: malformed non-numeric status pseudo header")]; + } + header = {}; + res = new Response.ptr(status + " " + StatusText(statusCode), statusCode, "HTTP/2.0", 2, 0, header, $ifaceNil, new $Int64(0, 0), sliceType$1.nil, false, false, false, ptrType$7.nil, ptrType$17.nil); + _ref = f.RegularFields(); + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + t = [t]; + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + key = CanonicalHeaderKey(hf.Name); + /* */ if (key === "Trailer") { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (key === "Trailer") { */ case 3: + t[0] = res.Trailer; + if (t[0] === false) { + t[0] = {}; + res.Trailer = t[0]; + } + $r = http2foreachHeaderElement(hf.Value, (function(t) { return function(v) { + var _key, v; + _key = CanonicalHeaderKey(v); (t[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$1.nil }; + }; })(t)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else { */ case 4: + _key = key; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = header[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil), hf.Value) }; + /* } */ case 5: + _i++; + /* } */ $s = 1; continue; case 2: + /* */ if (statusCode >= 100 && statusCode <= 199) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (statusCode >= 100 && statusCode <= 199) { */ case 7: + cs.num1xx = cs.num1xx + (1) << 24 >>> 24; + if (cs.num1xx > 5) { + $s = -1; return [ptrType$16.nil, errors.New("http2: too many 1xx informational responses")]; + } + fn = cs.get1xxTraceFunc(); + /* */ if (!(fn === $throwNilPointerError)) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(fn === $throwNilPointerError)) { */ case 9: + _r$1 = fn(statusCode, (header)); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err$1 = _r$1; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, err$1]; + } + /* } */ case 10: + /* */ if (statusCode === 100) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (statusCode === 100) { */ case 12: + $r = http2traceGot100Continue(cs.trace); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(cs.on100 === $throwNilPointerError)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!(cs.on100 === $throwNilPointerError)) { */ case 15: + $r = cs.on100(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 16: + /* } */ case 13: + cs.pastHeaders = false; + $s = -1; return [ptrType$16.nil, $ifaceNil]; + /* } */ case 8: + streamEnded = f.http2HeadersFrame.StreamEnded(); + isHead = cs.req.Method === "HEAD"; + if (!streamEnded || isHead) { + res.ContentLength = new $Int64(-1, 4294967295); + clens = (_entry$1 = res.Header[$String.keyFor("Content-Length")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + if (clens.$length === 1) { + _tuple$1 = strconv.ParseInt((0 >= clens.$length ? ($throwRuntimeError("index out of range"), undefined) : clens.$array[clens.$offset + 0]), 10, 64); + clen64 = _tuple$1[0]; + err$2 = _tuple$1[1]; + if ($interfaceIsEqual(err$2, $ifaceNil)) { + res.ContentLength = clen64; + } else { + } + } else if (clens.$length > 1) { + } + } + if (streamEnded || isHead) { + res.Body = http2noBody; + $s = -1; return [res, $ifaceNil]; + } + http2pipe.copy(cs.bufPipe, new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), new http2dataBuffer.ptr(sliceType$5.nil, 0, 0, 0, res.ContentLength), $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError)); + cs.bytesRemain = res.ContentLength; + res.Body = (x$4 = new http2transportResponseBody.ptr(cs), new x$4.constructor.elem(x$4)); + $go($methodVal(cs, "awaitRequestCancel"), [cs.req]); + if (cs.requestedGzip && new Header(res.Header).Get("Content-Encoding") === "gzip") { + new Header(res.Header).Del("Content-Encoding"); + new Header(res.Header).Del("Content-Length"); + res.ContentLength = new $Int64(-1, 4294967295); + res.Body = new http2gzipReader.ptr(res.Body, ptrType$76.nil, $ifaceNil); + http2setResponseUncompressed(res); + } + $s = -1; return [res, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.handleResponse }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._r$1 = _r$1; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.clen64 = clen64; $f.clens = clens; $f.cs = cs; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.f = f; $f.fn = fn; $f.header = header; $f.hf = hf; $f.isHead = isHead; $f.key = key; $f.res = res; $f.rl = rl; $f.status = status; $f.statusCode = statusCode; $f.streamEnded = streamEnded; $f.t = t; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.handleResponse = function(cs, f) { return this.$val.handleResponse(cs, f); }; + http2clientConnReadLoop.ptr.prototype.processTrailers = function(cs, f) { + var _entry, _i, _key, _ref, cs, f, hf, key, rl, trailer, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _key = $f._key; _ref = $f._ref; cs = $f.cs; f = $f.f; hf = $f.hf; key = $f.key; rl = $f.rl; trailer = $f.trailer; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + if (cs.pastTrailers) { + $s = -1; return new http2ConnectionError(1); + } + cs.pastTrailers = true; + if (!f.http2HeadersFrame.StreamEnded()) { + $s = -1; return new http2ConnectionError(1); + } + if (f.PseudoFields().$length > 0) { + $s = -1; return new http2ConnectionError(1); + } + trailer = {}; + _ref = f.RegularFields(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); + key = CanonicalHeaderKey(hf.Name); + _key = key; (trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = trailer[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil), hf.Value) }; + _i++; + } + cs.trailer = trailer; + $r = rl.endStream(cs); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processTrailers }; } $f._entry = _entry; $f._i = _i; $f._key = _key; $f._ref = _ref; $f.cs = cs; $f.f = f; $f.hf = hf; $f.key = key; $f.rl = rl; $f.trailer = trailer; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.processTrailers = function(cs, f) { return this.$val.processTrailers(cs, f); }; + http2transportResponseBody.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, cc, connAdd, cs, err, n, p, streamAdd, v, v$1, x$10, x$11, x$4, x$5, x$6, x$7, x$8, x$9, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; b = $f.b; cc = $f.cc; connAdd = $f.connAdd; cs = $f.cs; err = $f.err; n = $f.n; p = $f.p; streamAdd = $f.streamAdd; v = $f.v; v$1 = $f.v$1; x$10 = $f.x$10; x$11 = $f.x$11; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + b = this; + cs = b.cs; + cc = cs.cc; + if (!($interfaceIsEqual(cs.readErr, $ifaceNil))) { + _tmp = 0; + _tmp$1 = cs.readErr; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = b.cs.bufPipe.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + /* */ if (!((x$4 = cs.bytesRemain, (x$4.$high === -1 && x$4.$low === 4294967295)))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((x$4 = cs.bytesRemain, (x$4.$high === -1 && x$4.$low === 4294967295)))) { */ case 2: + /* */ if ((x$5 = (new $Int64(0, n)), x$6 = cs.bytesRemain, (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ((x$5 = (new $Int64(0, n)), x$6 = cs.bytesRemain, (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { */ case 4: + n = (((x$7 = cs.bytesRemain, x$7.$low + ((x$7.$high >> 31) * 4294967296)) >> 0)); + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 6: + err = errors.New("net/http: server replied with more than declared Content-Length; truncated"); + $r = cc.writeStreamReset(cs.ID, 1, err); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + cs.readErr = err; + _tmp$2 = (((x$8 = cs.bytesRemain, x$8.$low + ((x$8.$high >> 31) * 4294967296)) >> 0)); + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* } */ case 5: + cs.bytesRemain = (x$9 = cs.bytesRemain, x$10 = (new $Int64(0, n)), new $Int64(x$9.$high - x$10.$high, x$9.$low - x$10.$low)); + if ($interfaceIsEqual(err, io.EOF) && (x$11 = cs.bytesRemain, (x$11.$high > 0 || (x$11.$high === 0 && x$11.$low > 0)))) { + err = io.ErrUnexpectedEOF; + cs.readErr = err; + _tmp$4 = n; + _tmp$5 = err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + /* } */ case 3: + if (n === 0) { + $s = -1; return [n, err]; + } + $r = cc.mu.Lock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + _tmp$6 = 0; + _tmp$7 = 0; + connAdd = _tmp$6; + streamAdd = _tmp$7; + v = cc.inflow.available(); + if (v < 536870912) { + connAdd = 1073741824 - v >> 0; + cc.inflow.add(connAdd); + } + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 10: + _r$2 = cs.bufPipe.Len(); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + v$1 = ((cs.inflow.available() >> 0)) + _r$2 >> 0; + if (v$1 < 4190208) { + streamAdd = (((4194304 - v$1 >> 0) >> 0)); + cs.inflow.add(streamAdd); + } + /* } */ case 11: + /* */ if (!((connAdd === 0)) || !((streamAdd === 0))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!((connAdd === 0)) || !((streamAdd === 0))) { */ case 13: + $r = cc.wmu.Lock(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); + /* */ if (!((connAdd === 0))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!((connAdd === 0))) { */ case 16: + _r$3 = cc.fr.WriteWindowUpdate(0, http2mustUint31(connAdd)); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 17: + /* */ if (!((streamAdd === 0))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!((streamAdd === 0))) { */ case 19: + _r$4 = cc.fr.WriteWindowUpdate(cs.ID, http2mustUint31(streamAdd)); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 20: + _r$5 = cc.bw.Flush(); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 14: + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2transportResponseBody.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f.b = b; $f.cc = cc; $f.connAdd = connAdd; $f.cs = cs; $f.err = err; $f.n = n; $f.p = p; $f.streamAdd = streamAdd; $f.v = v; $f.v$1 = v$1; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2transportResponseBody.prototype.Read = function(p) { return this.$val.Read(p); }; + http2transportResponseBody.ptr.prototype.Close = function() { + var _r$1, _r$2, _r$3, _r$4, _r$5, b, cc, cs, serverSentStreamEnd, unread, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; b = $f.b; cc = $f.cc; cs = $f.cs; serverSentStreamEnd = $f.serverSentStreamEnd; unread = $f.unread; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + cs = b.cs; + cc = cs.cc; + _r$1 = cs.bufPipe.Err(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + serverSentStreamEnd = $interfaceIsEqual(_r$1, io.EOF); + _r$2 = cs.bufPipe.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + unread = _r$2; + /* */ if (unread > 0 || !serverSentStreamEnd) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (unread > 0 || !serverSentStreamEnd) { */ case 3: + $r = cc.mu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.wmu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!serverSentStreamEnd) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!serverSentStreamEnd) { */ case 7: + _r$3 = cc.fr.WriteRSTStream(cs.ID, 8); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + cs.didReset = true; + /* } */ case 8: + /* */ if (unread > 0) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (unread > 0) { */ case 10: + cc.inflow.add(((unread >> 0))); + _r$4 = cc.fr.WriteWindowUpdate(0, ((unread >>> 0))); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 11: + _r$5 = cc.bw.Flush(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $r = cc.wmu.Unlock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.mu.Unlock(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $r = cs.bufPipe.BreakWithError(http2errClosedResponseBody); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.forgetStreamID(cs.ID); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2transportResponseBody.ptr.prototype.Close }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.b = b; $f.cc = cc; $f.cs = cs; $f.serverSentStreamEnd = serverSentStreamEnd; $f.unread = unread; $f.$s = $s; $f.$r = $r; return $f; + }; + http2transportResponseBody.prototype.Close = function() { return this.$val.Close(); }; + http2clientConnReadLoop.ptr.prototype.processData = function(f) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, cc, cs, data, didReset, err, f, neverSent, pad, refund, rl, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; cc = $f.cc; cs = $f.cs; data = $f.data; didReset = $f.didReset; err = $f.err; f = $f.f; neverSent = $f.neverSent; pad = $f.pad; refund = $f.refund; rl = $f.rl; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + cc = rl.cc; + _r$1 = cc.streamByID(f.http2FrameHeader.StreamID, f.StreamEnded()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cs = _r$1; + data = f.Data(); + /* */ if (cs === ptrType$75.nil) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (cs === ptrType$75.nil) { */ case 2: + $r = cc.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + neverSent = cc.nextStreamID; + $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (f.http2FrameHeader.StreamID >= neverSent) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (f.http2FrameHeader.StreamID >= neverSent) { */ case 6: + $r = cc.logf("http2: Transport received unsolicited DATA frame; closing connection", new sliceType([])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new http2ConnectionError(1); + /* } */ case 7: + /* */ if (f.http2FrameHeader.Length > 0) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (f.http2FrameHeader.Length > 0) { */ case 9: + $r = cc.mu.Lock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cc.inflow.add(((f.http2FrameHeader.Length >> 0))); + $r = cc.mu.Unlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cc.wmu.Lock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = cc.fr.WriteWindowUpdate(0, (f.http2FrameHeader.Length)); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = cc.bw.Flush(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $r = cc.wmu.Unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + $s = -1; return $ifaceNil; + /* } */ case 3: + /* */ if (!cs.firstByte) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (!cs.firstByte) { */ case 17: + $r = cc.logf("protocol error: received DATA before a HEADERS frame", new sliceType([])); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rl.endStreamError(cs, (x$4 = new http2StreamError.ptr(f.http2FrameHeader.StreamID, 1, $ifaceNil), new x$4.constructor.elem(x$4))); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* } */ case 18: + /* */ if (f.http2FrameHeader.Length > 0) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (f.http2FrameHeader.Length > 0) { */ case 21: + /* */ if (cs.req.Method === "HEAD" && data.$length > 0) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (cs.req.Method === "HEAD" && data.$length > 0) { */ case 23: + $r = cc.logf("protocol error: received DATA on a HEAD request", new sliceType([])); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rl.endStreamError(cs, (x$5 = new http2StreamError.ptr(f.http2FrameHeader.StreamID, 1, $ifaceNil), new x$5.constructor.elem(x$5))); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* } */ case 24: + $r = cc.mu.Lock(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (cs.inflow.available() >= ((f.http2FrameHeader.Length >> 0))) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (cs.inflow.available() >= ((f.http2FrameHeader.Length >> 0))) { */ case 28: + cs.inflow.take(((f.http2FrameHeader.Length >> 0))); + $s = 30; continue; + /* } else { */ case 29: + $r = cc.mu.Unlock(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return new http2ConnectionError(3); + /* } */ case 30: + refund = 0; + pad = ((f.http2FrameHeader.Length >> 0)) - data.$length >> 0; + if (pad > 0) { + refund = refund + (pad) >> 0; + } + didReset = cs.didReset; + if (didReset) { + refund = refund + (data.$length) >> 0; + } + /* */ if (refund > 0) { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (refund > 0) { */ case 32: + cc.inflow.add(((refund >> 0))); + $r = cc.wmu.Lock(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = cc.fr.WriteWindowUpdate(0, ((refund >>> 0))); /* */ $s = 35; case 35: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* */ if (!didReset) { $s = 36; continue; } + /* */ $s = 37; continue; + /* if (!didReset) { */ case 36: + cs.inflow.add(((refund >> 0))); + _r$5 = cc.fr.WriteWindowUpdate(cs.ID, ((refund >>> 0))); /* */ $s = 38; case 38: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 37: + _r$6 = cc.bw.Flush(); /* */ $s = 39; case 39: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $r = cc.wmu.Unlock(); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 33: + $r = cc.mu.Unlock(); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (data.$length > 0 && !didReset) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (data.$length > 0 && !didReset) { */ case 42: + _r$7 = cs.bufPipe.Write(data); /* */ $s = 44; case 44: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple = _r$7; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 45: + $r = rl.endStreamError(cs, err); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* } */ case 46: + /* } */ case 43: + /* } */ case 22: + /* */ if (f.StreamEnded()) { $s = 48; continue; } + /* */ $s = 49; continue; + /* if (f.StreamEnded()) { */ case 48: + $r = rl.endStream(cs); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 49: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processData }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f.cc = cc; $f.cs = cs; $f.data = data; $f.didReset = didReset; $f.err = err; $f.f = f; $f.neverSent = neverSent; $f.pad = pad; $f.refund = refund; $f.rl = rl; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.processData = function(f) { return this.$val.processData(f); }; + http2clientConnReadLoop.ptr.prototype.endStream = function(cs) { + var cs, rl, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cs = $f.cs; rl = $f.rl; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + $r = rl.endStreamError(cs, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.endStream }; } $f.cs = cs; $f.rl = rl; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.endStream = function(cs) { return this.$val.endStream(cs); }; + http2clientConnReadLoop.ptr.prototype.endStreamError = function(cs, err) { + var _selection, code, cs, err, rl, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; code = $f.code; cs = $f.cs; err = $f.err; rl = $f.rl; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + code = $throwNilPointerError; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = io.EOF; + code = $methodVal(cs, "copyTrailers"); + } + if (http2isConnectionCloseRequest(cs.req)) { + rl.closeWhenIdle = true; + } + $r = cs.bufPipe.closeWithErrorAndCode(err, code); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _selection = $select([[cs.resc, new http2resAndError.ptr(ptrType$16.nil, err)], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.endStreamError }; } $f._selection = _selection; $f.code = code; $f.cs = cs; $f.err = err; $f.rl = rl; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.endStreamError = function(cs, err) { return this.$val.endStreamError(cs, err); }; + http2clientStream.ptr.prototype.copyTrailers = function() { + var _entry, _i, _key, _keys, _ref, cs, k, t, vv; + cs = this; + _ref = cs.trailer; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + t = cs.resTrailer; + if (t.$get() === false) { + t.$set({}); + } + _key = k; (t.$get() || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + _i++; + } + }; + http2clientStream.prototype.copyTrailers = function() { return this.$val.copyTrailers(); }; + http2clientConnReadLoop.ptr.prototype.processGoAway = function(f) { + var _r$1, cc, f, rl, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; f = $f.f; rl = $f.rl; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + cc = rl.cc; + _r$1 = cc.t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = _r$1.MarkDead(cc); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((f.ErrCode === 0))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((f.ErrCode === 0))) { */ case 3: + $r = cc.vlogf("transport got GOAWAY with error code = %v", new sliceType([new http2ErrCode(f.ErrCode)])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $r = cc.setGoAway(f); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processGoAway }; } $f._r$1 = _r$1; $f.cc = cc; $f.f = f; $f.rl = rl; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.processGoAway = function(f) { return this.$val.processGoAway(f); }; + http2clientConnReadLoop.ptr.prototype.processSettings = function(f) { + var _r$1, _r$2, _r$3, cc, err, f, rl, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; cc = $f.cc; err = $f.err; f = $f.f; rl = $f.rl; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cc = [cc]; + rl = this; + cc[0] = rl.cc; + $r = cc[0].mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc[0].mu, "Unlock"), []]); + if (f.IsAck()) { + if (cc[0].wantSettingsAck) { + cc[0].wantSettingsAck = false; + $s = -1; return $ifaceNil; + } + $s = -1; return new http2ConnectionError(1); + } + _r$1 = f.ForeachSetting((function(cc) { return function $b(s) { + var _1, _entry, _i, _keys, _ref, cs, delta, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _ref = $f._ref; cs = $f.cs; delta = $f.delta; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _1 = s.ID; + /* */ if (_1 === (5)) { $s = 2; continue; } + /* */ if (_1 === (3)) { $s = 3; continue; } + /* */ if (_1 === (6)) { $s = 4; continue; } + /* */ if (_1 === (4)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_1 === (5)) { */ case 2: + cc[0].maxFrameSize = s.Val; + $s = 7; continue; + /* } else if (_1 === (3)) { */ case 3: + cc[0].maxConcurrentStreams = s.Val; + $s = 7; continue; + /* } else if (_1 === (6)) { */ case 4: + cc[0].peerMaxHeaderListSize = (new $Uint64(0, s.Val)); + $s = 7; continue; + /* } else if (_1 === (4)) { */ case 5: + if (s.Val > 2147483647) { + $s = -1; return new http2ConnectionError(3); + } + delta = ((s.Val >> 0)) - ((cc[0].initialWindowSize >> 0)) >> 0; + _ref = cc[0].streams; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + cs = _entry.v; + cs.flow.add(delta); + _i++; + } + $r = cc[0].cond.Broadcast(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cc[0].initialWindowSize = s.Val; + $s = 7; continue; + /* } else { */ case 6: + $r = cc[0].vlogf("Unhandled Setting: %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + case 1: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._ref = _ref; $f.cs = cs; $f.delta = delta; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; })(cc)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $r = cc[0].wmu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc[0].wmu, "Unlock"), []]); + _r$2 = cc[0].fr.WriteSettingsAck(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = cc[0].bw.Flush(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return cc[0].werr; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processSettings }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.cc = cc; $f.err = err; $f.f = f; $f.rl = rl; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnReadLoop.prototype.processSettings = function(f) { return this.$val.processSettings(f); }; + http2clientConnReadLoop.ptr.prototype.processWindowUpdate = function(f) { + var _r$1, cc, cs, f, fl, rl, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cc = $f.cc; cs = $f.cs; f = $f.f; fl = $f.fl; rl = $f.rl; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + rl = this; + cc = rl.cc; + _r$1 = cc.streamByID(f.http2FrameHeader.StreamID, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cs = _r$1; + if (!((f.http2FrameHeader.StreamID === 0)) && cs === ptrType$75.nil) { + $s = -1; return $ifaceNil; + } + $r = cc.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + fl = cc.flow; + if (!(cs === ptrType$75.nil)) { + fl = cs.flow; + } + if (!fl.add(((f.Increment >> 0)))) { + $s = -1; return new http2ConnectionError(3); + } + $r = cc.cond.Broadcast(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processWindowUpdate }; } $f._r$1 = _r$1; $f.cc = cc; $f.cs = cs; $f.f = f; $f.fl = fl; $f.rl = rl; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnReadLoop.prototype.processWindowUpdate = function(f) { return this.$val.processWindowUpdate(f); }; + http2clientConnReadLoop.ptr.prototype.processResetStream = function(f) { + var _r$1, _selection, cs, err, f, rl, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; cs = $f.cs; err = $f.err; f = $f.f; rl = $f.rl; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rl = this; + _r$1 = rl.cc.streamByID(f.http2FrameHeader.StreamID, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cs = _r$1; + if (cs === ptrType$75.nil) { + $s = -1; return $ifaceNil; + } + _selection = $select([[cs.peerReset], []]); + /* */ if (_selection[0] === 0) { $s = 2; continue; } + /* */ if (_selection[0] === 1) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_selection[0] === 0) { */ case 2: + $s = 4; continue; + /* } else if (_selection[0] === 1) { */ case 3: + err = $clone(http2streamError(cs.ID, f.ErrCode), http2StreamError); + cs.resetErr = new err.constructor.elem(err); + $close(cs.peerReset); + $r = cs.bufPipe.CloseWithError(new err.constructor.elem(err)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cs.cc.cond.Broadcast(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processResetStream }; } $f._r$1 = _r$1; $f._selection = _selection; $f.cs = cs; $f.err = err; $f.f = f; $f.rl = rl; $f.$s = $s; $f.$r = $r; return $f; + }; + http2clientConnReadLoop.prototype.processResetStream = function(f) { return this.$val.processResetStream(f); }; + http2ClientConn.ptr.prototype.ping = function(ctx) { + var _entry, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _selection, _tuple, _tuple$1, c, cc, ctx, err, err$1, err$2, found, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; c = $f.c; cc = $f.cc; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; found = $f.found; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + c = new $Chan(structType, 0); + p = arrayType$5.zero(); + /* while (true) { */ case 1: + _r$1 = rand.Read(new sliceType$3(p)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $r = cc.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple$1 = (_entry = cc.pings[arrayType$5.keyFor(p)], _entry !== undefined ? [_entry.v, true] : [$chanNil, false]); + found = _tuple$1[1]; + /* */ if (!found) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!found) { */ case 5: + _key = $clone(p, arrayType$5); (cc.pings || $throwRuntimeError("assignment to entry in nil map"))[arrayType$5.keyFor(_key)] = { k: _key, v: c }; + $r = cc.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* break; */ $s = 2; continue; + /* } */ case 6: + $r = cc.mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 1; continue; case 2: + $r = cc.wmu.Lock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = cc.fr.WritePing(false, $clone(p, arrayType$5)); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err$1 = _r$2; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 11: + $r = cc.wmu.Unlock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err$1; + /* } */ case 12: + _r$3 = cc.bw.Flush(); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$2 = _r$3; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 15: + $r = cc.wmu.Unlock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err$2; + /* } */ case 16: + $r = cc.wmu.Unlock(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$4 = ctx.Done(); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = $select([[c], [_r$4], [cc.readerDone]]); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _selection = _r$5; + /* */ if (_selection[0] === 0) { $s = 21; continue; } + /* */ if (_selection[0] === 1) { $s = 22; continue; } + /* */ if (_selection[0] === 2) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (_selection[0] === 0) { */ case 21: + $s = -1; return $ifaceNil; + /* } else if (_selection[0] === 1) { */ case 22: + _r$6 = ctx.Err(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return _r$6; + /* } else if (_selection[0] === 2) { */ case 23: + $s = -1; return cc.readerErr; + /* } */ case 24: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.ping }; } $f._entry = _entry; $f._key = _key; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.c = c; $f.cc = cc; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.found = found; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.ping = function(ctx) { return this.$val.ping(ctx); }; + http2clientConnReadLoop.ptr.prototype.processPing = function(f) { + var _entry, _r$1, _r$2, _tuple, c, cc, cc$1, err, f, ok, rl, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; c = $f.c; cc = $f.cc; cc$1 = $f.cc$1; err = $f.err; f = $f.f; ok = $f.ok; rl = $f.rl; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + rl = this; + /* */ if (f.IsAck()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (f.IsAck()) { */ case 1: + cc = rl.cc; + $r = cc.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc.mu, "Unlock"), []]); + _tuple = (_entry = cc.pings[arrayType$5.keyFor(f.Data)], _entry !== undefined ? [_entry.v, true] : [$chanNil, false]); + c = _tuple[0]; + ok = _tuple[1]; + if (ok) { + $close(c); + delete cc.pings[arrayType$5.keyFor(f.Data)]; + } + $s = -1; return $ifaceNil; + /* } */ case 2: + cc$1 = rl.cc; + $r = cc$1.wmu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cc$1.wmu, "Unlock"), []]); + _r$1 = cc$1.fr.WritePing(true, $clone(f.Data, arrayType$5)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$2 = cc$1.bw.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2clientConnReadLoop.ptr.prototype.processPing }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.c = c; $f.cc = cc; $f.cc$1 = cc$1; $f.err = err; $f.f = f; $f.ok = ok; $f.rl = rl; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2clientConnReadLoop.prototype.processPing = function(f) { return this.$val.processPing(f); }; + http2clientConnReadLoop.ptr.prototype.processPushPromise = function(f) { + var f, rl; + rl = this; + return new http2ConnectionError(1); + }; + http2clientConnReadLoop.prototype.processPushPromise = function(f) { return this.$val.processPushPromise(f); }; + http2ClientConn.ptr.prototype.writeStreamReset = function(streamID, code, err) { + var _r$1, _r$2, cc, code, err, streamID, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; cc = $f.cc; code = $f.code; err = $f.err; streamID = $f.streamID; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = cc.fr.WriteRSTStream(streamID, code); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = cc.bw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $r = cc.wmu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.writeStreamReset }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.cc = cc; $f.code = code; $f.err = err; $f.streamID = streamID; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.writeStreamReset = function(streamID, code, err) { return this.$val.writeStreamReset(streamID, code, err); }; + http2ClientConn.ptr.prototype.logf = function(format, args) { + var args, cc, format, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; cc = $f.cc; format = $f.format; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.t.logf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.logf }; } $f.args = args; $f.cc = cc; $f.format = format; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; + http2ClientConn.ptr.prototype.vlogf = function(format, args) { + var args, cc, format, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; cc = $f.cc; format = $f.format; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cc = this; + $r = cc.t.vlogf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2ClientConn.ptr.prototype.vlogf }; } $f.args = args; $f.cc = cc; $f.format = format; $f.$s = $s; $f.$r = $r; return $f; + }; + http2ClientConn.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; + http2Transport.ptr.prototype.vlogf = function(format, args) { + var args, format, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; format = $f.format; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + /* */ if (http2VerboseLogs) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs) { */ case 1: + $r = t.logf(format, args); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.vlogf }; } $f.args = args; $f.format = format; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; + http2Transport.ptr.prototype.logf = function(format, args) { + var args, format, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; format = $f.format; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = log.Printf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2Transport.ptr.prototype.logf }; } $f.args = args; $f.format = format; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + http2Transport.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; + http2strSliceContains = function(ss, s) { + var _i, _ref, s, ss, v; + _ref = ss; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (v === s) { + return true; + } + _i++; + } + return false; + }; + http2erringRoundTripper.ptr.prototype.RoundTrip = function(param) { + var param, rt; + rt = this; + return [ptrType$16.nil, rt.err]; + }; + http2erringRoundTripper.prototype.RoundTrip = function(param) { return this.$val.RoundTrip(param); }; + http2gzipReader.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; gz = $f.gz; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + gz = this; + if (!($interfaceIsEqual(gz.zerr, $ifaceNil))) { + _tmp = 0; + _tmp$1 = gz.zerr; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* */ if (gz.zr === ptrType$76.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (gz.zr === ptrType$76.nil) { */ case 1: + _r$1 = gzip.NewReader(gz.body); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + gz.zr = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + gz.zerr = err; + _tmp$2 = 0; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + /* } */ case 2: + _r$2 = gz.zr.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2gzipReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.gz = gz; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2gzipReader.prototype.Read = function(p) { return this.$val.Read(p); }; + http2gzipReader.ptr.prototype.Close = function() { + var _r$1, gz, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; gz = $f.gz; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + gz = this; + _r$1 = gz.body.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2gzipReader.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.gz = gz; $f.$s = $s; $f.$r = $r; return $f; + }; + http2gzipReader.prototype.Close = function() { return this.$val.Close(); }; + http2Transport.ptr.prototype.getBodyWriterState = function(cs, body$1) { + var _entry, body$1, cs, resc, s, t, x$4; + s = new http2bodyWriterState.ptr(ptrType$75.nil, ptrType$57.nil, ptrType$77.nil, $throwNilPointerError, $chanNil, new time.Duration(0, 0)); + t = this; + s.cs = cs; + if ($interfaceIsEqual(body$1, $ifaceNil)) { + return s; + } + resc = new $Chan($error, 1); + s.resc = resc; + s.fn = (function $b() { + var _r$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = cs.cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cs.startedWrite = true; + $r = cs.cc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = cs.writeRequestBody(body$1, cs.req.Body); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = $send(resc, _r$1); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.$s = $s; $f.$r = $r; return $f; + }); + s.delay = t.expectContinueTimeout(); + if ((x$4 = s.delay, (x$4.$high === 0 && x$4.$low === 0)) || !httpguts.HeaderValuesContainsToken((_entry = cs.req.Header[$String.keyFor("Expect")], _entry !== undefined ? _entry.v : sliceType$1.nil), "100-continue")) { + return s; + } + s.fnonce = new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0); + s.timer = time.AfterFunc(new time.Duration(7342547, 765657088), (function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = s.fnonce.Do(s.fn); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + })); + return s; + }; + http2Transport.prototype.getBodyWriterState = function(cs, body$1) { return this.$val.getBodyWriterState(cs, body$1); }; + http2bodyWriterState.ptr.prototype.cancel = function() { + var s; + s = this; + if (!(s.timer === ptrType$57.nil)) { + s.timer.Stop(); + } + }; + http2bodyWriterState.prototype.cancel = function() { return this.$val.cancel(); }; + http2bodyWriterState.ptr.prototype.on100 = function() { + var s; + s = this; + if (s.timer === ptrType$57.nil) { + return; + } + s.timer.Stop(); + $go((function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = s.fnonce.Do(s.fn); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }), []); + }; + http2bodyWriterState.prototype.on100 = function() { return this.$val.on100(); }; + http2bodyWriterState.ptr.prototype.scheduleBodyWrite = function() { + var s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + /* */ if (s.timer === ptrType$57.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (s.timer === ptrType$57.nil) { */ case 1: + $go(s.fn, []); + $s = -1; return; + /* } */ case 2: + $r = http2traceWait100Continue(s.cs.trace); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (s.timer.Stop()) { + s.timer.Reset(s.delay); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2bodyWriterState.ptr.prototype.scheduleBodyWrite }; } $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + http2bodyWriterState.prototype.scheduleBodyWrite = function() { return this.$val.scheduleBodyWrite(); }; + http2isConnectionCloseRequest = function(req) { + var _entry, req; + return req.Close || httpguts.HeaderValuesContainsToken((_entry = req.Header[$String.keyFor("Connection")], _entry !== undefined ? _entry.v : sliceType$1.nil), "close"); + }; + http2writeEndsStream = function(w) { + var _ref, v, v$1, v$2, w; + _ref = w; + if ($assertType(_ref, ptrType$63, true)[1]) { + v = _ref.$val; + return v.endStream; + } else if ($assertType(_ref, ptrType$64, true)[1]) { + v$1 = _ref.$val; + return v$1.endStream; + } else if (_ref === $ifaceNil) { + v$2 = _ref; + $panic(new $String("writeEndsStream called on nil writeFramer")); + } + return false; + }; + http2flushFrameWriter.ptr.prototype.writeFrame = function(ctx) { + var _r$1, ctx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; ctx = $f.ctx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = ctx.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2flushFrameWriter.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f.ctx = ctx; $f.$s = $s; $f.$r = $r; return $f; + }; + http2flushFrameWriter.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2flushFrameWriter.ptr.prototype.staysWithinBuffer = function(max) { + var max; + return false; + }; + http2flushFrameWriter.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeSettings.prototype.staysWithinBuffer = function(max) { + var max, s; + s = this; + return (9 + ($imul(6, s.$length)) >> 0) <= max; + }; + $ptrType(http2writeSettings).prototype.staysWithinBuffer = function(max) { return this.$get().staysWithinBuffer(max); }; + http2writeSettings.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteSettings(($subslice(new sliceType$19(s.$array), s.$offset, s.$offset + s.$length))); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeSettings.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(http2writeSettings).prototype.writeFrame = function(ctx) { return this.$get().writeFrame(ctx); }; + http2writeGoAway.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, _r$3, ctx, err, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; ctx = $f.ctx; err = $f.err; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + p = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteGoAway(p.maxStreamID, p.code, sliceType$3.nil); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + _r$3 = ctx.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeGoAway.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.ctx = ctx; $f.err = err; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeGoAway.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writeGoAway.ptr.prototype.staysWithinBuffer = function(max) { + var max; + return false; + }; + http2writeGoAway.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeData.ptr.prototype.String = function() { + var _r$1, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = fmt.Sprintf("writeData(stream=%d, p=%d, endStream=%v)", new sliceType([new $Uint32(w.streamID), new $Int(w.p.$length), new $Bool(w.endStream)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeData.ptr.prototype.String }; } $f._r$1 = _r$1; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeData.prototype.String = function() { return this.$val.String(); }; + http2writeData.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteData(w.streamID, w.endStream, w.p); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeData.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeData.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writeData.ptr.prototype.staysWithinBuffer = function(max) { + var max, w; + w = this; + return (9 + w.p.$length >> 0) <= max; + }; + http2writeData.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2handlerPanicRST.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, hp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; hp = $f.hp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + hp = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteRSTStream(hp.StreamID, 2); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2handlerPanicRST.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.hp = hp; $f.$s = $s; $f.$r = $r; return $f; + }; + http2handlerPanicRST.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2handlerPanicRST.ptr.prototype.staysWithinBuffer = function(max) { + var hp, max; + hp = this; + return 13 <= max; + }; + http2handlerPanicRST.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2StreamError.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, se, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; se = $f.se; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + se = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteRSTStream(se.StreamID, se.Code); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2StreamError.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.se = se; $f.$s = $s; $f.$r = $r; return $f; + }; + http2StreamError.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2StreamError.ptr.prototype.staysWithinBuffer = function(max) { + var max, se; + se = this; + return 13 <= max; + }; + http2StreamError.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writePingAck.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WritePing(true, $clone(w.pf.Data, arrayType$5)); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writePingAck.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writePingAck.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writePingAck.ptr.prototype.staysWithinBuffer = function(max) { + var max, w; + w = this; + return 17 <= max; + }; + http2writePingAck.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeSettingsAck.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteSettingsAck(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeSettingsAck.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeSettingsAck.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writeSettingsAck.ptr.prototype.staysWithinBuffer = function(max) { + var max; + return 9 <= max; + }; + http2writeSettingsAck.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2splitHeaderBlock = function(ctx, headerBlock, fn) { + var _r$1, ctx, err, first, fn, frag, headerBlock, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; ctx = $f.ctx; err = $f.err; first = $f.first; fn = $f.fn; frag = $f.frag; headerBlock = $f.headerBlock; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + first = true; + /* while (true) { */ case 1: + /* if (!(headerBlock.$length > 0)) { break; } */ if(!(headerBlock.$length > 0)) { $s = 2; continue; } + frag = headerBlock; + if (frag.$length > 16384) { + frag = $subslice(frag, 0, 16384); + } + headerBlock = $subslice(headerBlock, frag.$length); + _r$1 = fn(ctx, frag, first, headerBlock.$length === 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + first = false; + /* } */ $s = 1; continue; case 2: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2splitHeaderBlock }; } $f._r$1 = _r$1; $f.ctx = ctx; $f.err = err; $f.first = first; $f.fn = fn; $f.frag = frag; $f.headerBlock = headerBlock; $f.$s = $s; $f.$r = $r; return $f; + }; + http2encKV = function(enc, k, v) { + var _r$1, enc, k, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; enc = $f.enc; k = $f.k; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (http2VerboseLogs) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (http2VerboseLogs) { */ case 1: + $r = log.Printf("http2: server encoding header %q = %q", new sliceType([new $String(k), new $String(v)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = enc.WriteField(new hpack.HeaderField.ptr(k, v, false)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2encKV }; } $f._r$1 = _r$1; $f.enc = enc; $f.k = k; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeResHeaders.ptr.prototype.staysWithinBuffer = function(max) { + var max, w; + w = this; + return false; + }; + http2writeResHeaders.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeResHeaders.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; buf = $f.buf; ctx = $f.ctx; enc = $f.enc; headerBlock = $f.headerBlock; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + enc = _tuple[0]; + buf = _tuple[1]; + buf.Reset(); + /* */ if (!((w.httpResCode === 0))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!((w.httpResCode === 0))) { */ case 2: + $r = http2encKV(enc, ":status", http2httpCodeString(w.httpResCode)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $r = http2encodeHeaders(enc, w.h, w.trailers); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(w.contentType === "")) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(w.contentType === "")) { */ case 6: + $r = http2encKV(enc, "content-type", w.contentType); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + /* */ if (!(w.contentLength === "")) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(w.contentLength === "")) { */ case 9: + $r = http2encKV(enc, "content-length", w.contentLength); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + /* */ if (!(w.date === "")) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!(w.date === "")) { */ case 12: + $r = http2encKV(enc, "date", w.date); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + headerBlock = buf.Bytes(); + if ((headerBlock.$length === 0) && w.trailers === sliceType$1.nil) { + $panic(new $String("unexpected empty hpack")); + } + _r$2 = http2splitHeaderBlock(ctx, headerBlock, $methodVal(w, "writeHeaderBlock")); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeResHeaders.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.buf = buf; $f.ctx = ctx; $f.enc = enc; $f.headerBlock = headerBlock; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeResHeaders.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writeResHeaders.ptr.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { + var _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; ctx = $f.ctx; firstFrag = $f.firstFrag; frag = $f.frag; lastFrag = $f.lastFrag; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + /* */ if (firstFrag) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (firstFrag) { */ case 1: + _r$1 = ctx.Framer(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteHeaders(new http2HeadersFrameParam.ptr(w.streamID, frag, w.endStream, lastFrag, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } else { */ case 2: + _r$3 = ctx.Framer(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = _r$3.WriteContinuation(w.streamID, lastFrag, frag); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeResHeaders.ptr.prototype.writeHeaderBlock }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.ctx = ctx; $f.firstFrag = firstFrag; $f.frag = frag; $f.lastFrag = lastFrag; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeResHeaders.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { return this.$val.writeHeaderBlock(ctx, frag, firstFrag, lastFrag); }; + http2writePushPromise.ptr.prototype.staysWithinBuffer = function(max) { + var max, w; + w = this; + return false; + }; + http2writePushPromise.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writePushPromise.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; buf = $f.buf; ctx = $f.ctx; enc = $f.enc; headerBlock = $f.headerBlock; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + enc = _tuple[0]; + buf = _tuple[1]; + buf.Reset(); + $r = http2encKV(enc, ":method", w.method); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2encKV(enc, ":scheme", w.url.Scheme); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2encKV(enc, ":authority", w.url.Host); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2encKV(enc, ":path", w.url.RequestURI()); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http2encodeHeaders(enc, w.h, sliceType$1.nil); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + headerBlock = buf.Bytes(); + if (headerBlock.$length === 0) { + $panic(new $String("unexpected empty hpack")); + } + _r$2 = http2splitHeaderBlock(ctx, headerBlock, $methodVal(w, "writeHeaderBlock")); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writePushPromise.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.buf = buf; $f.ctx = ctx; $f.enc = enc; $f.headerBlock = headerBlock; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writePushPromise.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2writePushPromise.ptr.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { + var _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; ctx = $f.ctx; firstFrag = $f.firstFrag; frag = $f.frag; lastFrag = $f.lastFrag; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + /* */ if (firstFrag) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (firstFrag) { */ case 1: + _r$1 = ctx.Framer(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WritePushPromise(new http2PushPromiseParam.ptr(w.streamID, w.promisedID, frag, lastFrag, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } else { */ case 2: + _r$3 = ctx.Framer(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = _r$3.WriteContinuation(w.streamID, lastFrag, frag); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 3: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writePushPromise.ptr.prototype.writeHeaderBlock }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.ctx = ctx; $f.firstFrag = firstFrag; $f.frag = frag; $f.lastFrag = lastFrag; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writePushPromise.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { return this.$val.writeHeaderBlock(ctx, frag, firstFrag, lastFrag); }; + http2write100ContinueHeadersFrame.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, _r$3, _tuple, buf, ctx, enc, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; buf = $f.buf; ctx = $f.ctx; enc = $f.enc; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + enc = _tuple[0]; + buf = _tuple[1]; + buf.Reset(); + $r = http2encKV(enc, ":status", "100"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = ctx.Framer(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = _r$2.WriteHeaders(new http2HeadersFrameParam.ptr(w.streamID, buf.Bytes(), false, true, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2write100ContinueHeadersFrame.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.buf = buf; $f.ctx = ctx; $f.enc = enc; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + http2write100ContinueHeadersFrame.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2write100ContinueHeadersFrame.ptr.prototype.staysWithinBuffer = function(max) { + var max, w; + w = this; + return 29 <= max; + }; + http2write100ContinueHeadersFrame.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeWindowUpdate.ptr.prototype.staysWithinBuffer = function(max) { + var max, wu; + wu = this; + return 13 <= max; + }; + http2writeWindowUpdate.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; + http2writeWindowUpdate.ptr.prototype.writeFrame = function(ctx) { + var _r$1, _r$2, ctx, wu, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; ctx = $f.ctx; wu = $f.wu; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + wu = this; + _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.WriteWindowUpdate(wu.streamID, wu.n); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2writeWindowUpdate.ptr.prototype.writeFrame }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.ctx = ctx; $f.wu = wu; $f.$s = $s; $f.$r = $r; return $f; + }; + http2writeWindowUpdate.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; + http2encodeHeaders = function(enc, h, keys) { + var _entry, _i, _i$1, _r$1, _r$2, _r$3, _ref, _ref$1, enc, h, isTE, k, keys, sorter, v, vv, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _ref$1 = $f._ref$1; enc = $f.enc; h = $f.h; isTE = $f.isTE; k = $f.k; keys = $f.keys; sorter = $f.sorter; v = $f.v; vv = $f.vv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + /* */ if (keys === sliceType$1.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (keys === sliceType$1.nil) { */ case 1: + _r$1 = http2sorterPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + sorter = $assertType(_r$1, ptrType$71); + $deferred.push([$methodVal(http2sorterPool, "Put"), [sorter]]); + _r$2 = sorter.Keys(h); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + keys = _r$2; + /* } */ case 2: + _ref = keys; + _i = 0; + /* while (true) { */ case 5: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } + k = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + vv = (_entry = h[$String.keyFor(k)], _entry !== undefined ? _entry.v : sliceType$1.nil); + _r$3 = http2lowerHeader(k); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + k = _r$3; + /* */ if (!http2validWireHeaderFieldName(k)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!http2validWireHeaderFieldName(k)) { */ case 8: + _i++; + /* continue; */ $s = 5; continue; + /* } */ case 9: + isTE = k === "transfer-encoding"; + _ref$1 = vv; + _i$1 = 0; + /* while (true) { */ case 10: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 11; continue; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 12: + _i$1++; + /* continue; */ $s = 10; continue; + /* } */ case 13: + /* */ if (isTE && !(v === "trailers")) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (isTE && !(v === "trailers")) { */ case 14: + _i$1++; + /* continue; */ $s = 10; continue; + /* } */ case 15: + $r = http2encKV(enc, k, v); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$1++; + /* } */ $s = 10; continue; case 11: + _i++; + /* } */ $s = 5; continue; case 6: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: http2encodeHeaders }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._ref$1 = _ref$1; $f.enc = enc; $f.h = h; $f.isTE = isTE; $f.k = k; $f.keys = keys; $f.sorter = sorter; $f.v = v; $f.vv = vv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + http2FrameWriteRequest.ptr.prototype.StreamID = function() { + var _tuple, ok, se, wr; + wr = this; + if (wr.stream === ptrType$6.nil) { + _tuple = $assertType(wr.write, http2StreamError, true); + se = $clone(_tuple[0], http2StreamError); + ok = _tuple[1]; + if (ok) { + return se.StreamID; + } + return 0; + } + return wr.stream.id; + }; + http2FrameWriteRequest.prototype.StreamID = function() { return this.$val.StreamID(); }; + http2FrameWriteRequest.ptr.prototype.DataSize = function() { + var _tuple, ok, wd, wr; + wr = this; + _tuple = $assertType(wr.write, ptrType$63, true); + wd = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return wd.p.$length; + } + return 0; + }; + http2FrameWriteRequest.prototype.DataSize = function() { return this.$val.DataSize(); }; + http2FrameWriteRequest.ptr.prototype.Consume = function(n) { + var _tuple, allowed, consumed, empty, n, ok, rest, wd, wr; + wr = this; + empty = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil); + _tuple = $assertType(wr.write, ptrType$63, true); + wd = _tuple[0]; + ok = _tuple[1]; + if (!ok || (wd.p.$length === 0)) { + return [wr, empty, 1]; + } + allowed = wr.stream.flow.available(); + if (n < allowed) { + allowed = n; + } + if (wr.stream.sc.maxFrameSize < allowed) { + allowed = wr.stream.sc.maxFrameSize; + } + if (allowed <= 0) { + return [empty, empty, 0]; + } + if (wd.p.$length > ((allowed >> 0))) { + wr.stream.flow.take(allowed); + consumed = new http2FrameWriteRequest.ptr(new http2writeData.ptr(wd.streamID, $subslice(wd.p, 0, allowed), false), wr.stream, $chanNil); + rest = new http2FrameWriteRequest.ptr(new http2writeData.ptr(wd.streamID, $subslice(wd.p, allowed), wd.endStream), wr.stream, wr.done); + return [consumed, rest, 2]; + } + wr.stream.flow.take(((wd.p.$length >> 0))); + return [wr, empty, 1]; + }; + http2FrameWriteRequest.prototype.Consume = function(n) { return this.$val.Consume(n); }; + http2FrameWriteRequest.ptr.prototype.String = function() { + var _r$1, _r$2, _r$3, _tuple, des, ok, s, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; des = $f.des; ok = $f.ok; s = $f.s; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + wr = this; + des = ""; + _tuple = $assertType(wr.write, fmt.Stringer, true); + s = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (ok) { */ case 1: + _r$1 = s.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + des = _r$1; + $s = 3; continue; + /* } else { */ case 2: + _r$2 = fmt.Sprintf("%T", new sliceType([wr.write])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + des = _r$2; + /* } */ case 3: + _r$3 = fmt.Sprintf("[FrameWriteRequest stream=%d, ch=%v, writer=%v]", new sliceType([new $Uint32($clone(wr, http2FrameWriteRequest).StreamID()), new $Bool(!(wr.done === $chanNil)), new $String(des)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2FrameWriteRequest.ptr.prototype.String }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.des = des; $f.ok = ok; $f.s = s; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2FrameWriteRequest.prototype.String = function() { return this.$val.String(); }; + http2FrameWriteRequest.ptr.prototype.replyToWriter = function(err) { + var _r$1, _selection, err, wr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; err = $f.err; wr = $f.wr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + wr = this; + if (wr.done === $chanNil) { + $s = -1; return; + } + _selection = $select([[wr.done, err], []]); + /* */ if (_selection[0] === 0) { $s = 1; continue; } + /* */ if (_selection[0] === 1) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (_selection[0] === 0) { */ case 1: + $s = 3; continue; + /* } else if (_selection[0] === 1) { */ case 2: + _r$1 = fmt.Sprintf("unbuffered done channel passed in for type %T", new sliceType([wr.write])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 3: + wr.write = $ifaceNil; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2FrameWriteRequest.ptr.prototype.replyToWriter }; } $f._r$1 = _r$1; $f._selection = _selection; $f.err = err; $f.wr = wr; $f.$s = $s; $f.$r = $r; return $f; + }; + http2FrameWriteRequest.prototype.replyToWriter = function(err) { return this.$val.replyToWriter(err); }; + http2writeQueue.ptr.prototype.empty = function() { + var q; + q = this; + return q.s.$length === 0; + }; + http2writeQueue.prototype.empty = function() { return this.$val.empty(); }; + http2writeQueue.ptr.prototype.push = function(wr) { + var q, wr; + q = this; + q.s = $append(q.s, wr); + }; + http2writeQueue.prototype.push = function(wr) { return this.$val.push(wr); }; + http2writeQueue.ptr.prototype.shift = function() { + var q, wr, x$4, x$5, x$6; + q = this; + if (q.s.$length === 0) { + $panic(new $String("invalid use of queue")); + } + wr = $clone((x$4 = q.s, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), http2FrameWriteRequest); + $copySlice(q.s, $subslice(q.s, 1)); + http2FrameWriteRequest.copy((x$5 = q.s, x$6 = q.s.$length - 1 >> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])), new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil)); + q.s = $subslice(q.s, 0, (q.s.$length - 1 >> 0)); + return wr; + }; + http2writeQueue.prototype.shift = function() { return this.$val.shift(); }; + http2writeQueue.ptr.prototype.consume = function(n) { + var _1, _tuple, consumed, n, numresult, q, rest, x$4, x$5; + q = this; + if (q.s.$length === 0) { + return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil), false]; + } + _tuple = $clone((x$4 = q.s, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), http2FrameWriteRequest).Consume(n); + consumed = $clone(_tuple[0], http2FrameWriteRequest); + rest = $clone(_tuple[1], http2FrameWriteRequest); + numresult = _tuple[2]; + _1 = numresult; + if (_1 === (0)) { + return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil), false]; + } else if (_1 === (1)) { + q.shift(); + } else if (_1 === (2)) { + http2FrameWriteRequest.copy((x$5 = q.s, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), rest); + } + return [consumed, true]; + }; + http2writeQueue.prototype.consume = function(n) { return this.$val.consume(n); }; + $ptrType(http2writeQueuePool).prototype.put = function(q) { + var _i, _ref, i, p, q, x$4; + p = this; + _ref = q.s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + http2FrameWriteRequest.copy((x$4 = q.s, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])), new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil)); + _i++; + } + q.s = $subslice(q.s, 0, 0); + p.$set($append(p.$get(), q)); + }; + $ptrType(http2writeQueuePool).prototype.get = function() { + var ln, p, q, x$4, x$5, x$6; + p = this; + ln = p.$get().$length; + if (ln === 0) { + return new http2writeQueue.ptr(sliceType$20.nil); + } + x$4 = ln - 1 >> 0; + q = (x$5 = p.$get(), ((x$4 < 0 || x$4 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$4])); + (x$6 = p.$get(), ((x$4 < 0 || x$4 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$4] = ptrType$78.nil)); + p.$set($subslice((p.$get()), 0, x$4)); + return q; + }; + http2NewPriorityWriteScheduler = function(cfg) { + var _key, cfg, ws; + if (cfg === ptrType$79.nil) { + cfg = new http2PriorityWriteSchedulerConfig.ptr(10, 10, false); + } + ws = new http2priorityWriteScheduler.ptr(new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$20.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$80.nil, ptrType$80.nil, ptrType$80.nil, ptrType$80.nil), {}, 0, sliceType$21.nil, sliceType$21.nil, cfg.MaxClosedNodesInTree, cfg.MaxIdleNodesInTree, 0, cfg.ThrottleOutOfOrderWrites, sliceType$21.nil, http2writeQueuePool.nil); + _key = 0; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: ws.root }; + if (cfg.ThrottleOutOfOrderWrites) { + ws.writeThrottleLimit = 1024; + } else { + ws.writeThrottleLimit = 2147483647; + } + return ws; + }; + http2priorityNode.ptr.prototype.setParent = function(parent) { + var n, parent, parent$1; + n = this; + if (n === parent) { + $panic(new $String("setParent to self")); + } + if (n.parent === parent) { + return; + } + parent$1 = n.parent; + if (!(parent$1 === ptrType$80.nil)) { + if (n.prev === ptrType$80.nil) { + parent$1.kids = n.next; + } else { + n.prev.next = n.next; + } + if (!(n.next === ptrType$80.nil)) { + n.next.prev = n.prev; + } + } + n.parent = parent; + if (parent === ptrType$80.nil) { + n.next = ptrType$80.nil; + n.prev = ptrType$80.nil; + } else { + n.next = parent.kids; + n.prev = ptrType$80.nil; + if (!(n.next === ptrType$80.nil)) { + n.next.prev = n; + } + parent.kids = n; + } + }; + http2priorityNode.prototype.setParent = function(parent) { return this.$val.setParent(parent); }; + http2priorityNode.ptr.prototype.addBytes = function(b) { + var b, n, x$4, x$5, x$6, x$7; + n = this; + n.bytes = (x$4 = n.bytes, x$5 = b, new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + while (true) { + if (!(!(n === ptrType$80.nil))) { break; } + n.subtreeBytes = (x$6 = n.subtreeBytes, x$7 = b, new $Int64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); + n = n.parent; + } + }; + http2priorityNode.prototype.addBytes = function(b) { return this.$val.addBytes(b); }; + http2priorityNode.ptr.prototype.walkReadyInOrder = function(openParent, tmp, f) { + var _r$1, _r$2, _r$3, _v, f, i, k, k$1, k$2, n, needSort, openParent, tmp, w, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _v = $f._v; f = $f.f; i = $f.i; k = $f.k; k$1 = $f.k$1; k$2 = $f.k$2; n = $f.n; needSort = $f.needSort; openParent = $f.openParent; tmp = $f.tmp; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = this; + if (!(!n.q.empty())) { _v = false; $s = 3; continue s; } + _r$1 = f(n, openParent); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return true; + /* } */ case 2: + if (n.kids === ptrType$80.nil) { + $s = -1; return false; + } + if (!((n.id === 0))) { + openParent = openParent || ((n.state === 0)); + } + w = n.kids.weight; + needSort = false; + k = n.kids.next; + while (true) { + if (!(!(k === ptrType$80.nil))) { break; } + if (!((k.weight === w))) { + needSort = true; + break; + } + k = k.next; + } + /* */ if (!needSort) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!needSort) { */ case 5: + k$1 = n.kids; + /* while (true) { */ case 7: + /* if (!(!(k$1 === ptrType$80.nil))) { break; } */ if(!(!(k$1 === ptrType$80.nil))) { $s = 8; continue; } + _r$2 = k$1.walkReadyInOrder(openParent, tmp, f); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (_r$2) { */ case 9: + $s = -1; return true; + /* } */ case 10: + k$1 = k$1.next; + /* } */ $s = 7; continue; case 8: + $s = -1; return false; + /* } */ case 6: + tmp.$set($subslice((tmp.$get()), 0, 0)); + while (true) { + if (!(!(n.kids === ptrType$80.nil))) { break; } + tmp.$set($append(tmp.$get(), n.kids)); + n.kids.setParent(ptrType$80.nil); + } + $r = sort.Sort(((x$4 = tmp.$get(), $subslice(new http2sortPriorityNodeSiblings(x$4.$array), x$4.$offset, x$4.$offset + x$4.$length)))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i = tmp.$get().$length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + (x$5 = tmp.$get(), ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])).setParent(n); + i = i - (1) >> 0; + } + k$2 = n.kids; + /* while (true) { */ case 13: + /* if (!(!(k$2 === ptrType$80.nil))) { break; } */ if(!(!(k$2 === ptrType$80.nil))) { $s = 14; continue; } + _r$3 = k$2.walkReadyInOrder(openParent, tmp, f); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (_r$3) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (_r$3) { */ case 15: + $s = -1; return true; + /* } */ case 16: + k$2 = k$2.next; + /* } */ $s = 13; continue; case 14: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2priorityNode.ptr.prototype.walkReadyInOrder }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._v = _v; $f.f = f; $f.i = i; $f.k = k; $f.k$1 = k$1; $f.k$2 = k$2; $f.n = n; $f.needSort = needSort; $f.openParent = openParent; $f.tmp = tmp; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + http2priorityNode.prototype.walkReadyInOrder = function(openParent, tmp, f) { return this.$val.walkReadyInOrder(openParent, tmp, f); }; + http2sortPriorityNodeSiblings.prototype.Len = function() { + var z; + z = this; + return z.$length; + }; + $ptrType(http2sortPriorityNodeSiblings).prototype.Len = function() { return this.$get().Len(); }; + http2sortPriorityNodeSiblings.prototype.Swap = function(i, k) { + var _tmp, _tmp$1, i, k, z; + z = this; + _tmp = ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]); + _tmp$1 = ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]); + ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tmp); + ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k] = _tmp$1); + }; + $ptrType(http2sortPriorityNodeSiblings).prototype.Swap = function(i, k) { return this.$get().Swap(i, k); }; + http2sortPriorityNodeSiblings.prototype.Less = function(i, k) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, bi, bk, i, k, wi, wk, z; + z = this; + _tmp = ((((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]).weight + 1 << 24 >>> 24)); + _tmp$1 = ($flatten64(((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]).subtreeBytes)); + wi = _tmp; + bi = _tmp$1; + _tmp$2 = ((((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]).weight + 1 << 24 >>> 24)); + _tmp$3 = ($flatten64(((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]).subtreeBytes)); + wk = _tmp$2; + bk = _tmp$3; + if ((bi === 0) && (bk === 0)) { + return wi >= wk; + } + if (bk === 0) { + return false; + } + return bi / bk <= wi / wk; + }; + $ptrType(http2sortPriorityNodeSiblings).prototype.Less = function(i, k) { return this.$get().Less(i, k); }; + http2priorityWriteScheduler.ptr.prototype.OpenStream = function(streamID, options) { + var _entry, _entry$1, _key, _r$1, curr, n, options, parent, streamID, ws, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _r$1 = $f._r$1; curr = $f.curr; n = $f.n; options = $f.options; parent = $f.parent; streamID = $f.streamID; ws = $f.ws; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ws = this; + curr = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$80.nil); + /* */ if (!(curr === ptrType$80.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(curr === ptrType$80.nil)) { */ case 1: + /* */ if (!((curr.state === 2))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((curr.state === 2))) { */ case 3: + _r$1 = fmt.Sprintf("stream %d already opened", new sliceType([new $Uint32(streamID)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 4: + curr.state = 0; + $s = -1; return; + /* } */ case 2: + parent = (_entry$1 = ws.nodes[$Uint32.keyFor(options.PusherID)], _entry$1 !== undefined ? _entry$1.v : ptrType$80.nil); + if (parent === ptrType$80.nil) { + parent = ws.root; + } + n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$81(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$80.nil, ptrType$80.nil, ptrType$80.nil, ptrType$80.nil); + n.setParent(parent); + _key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n }; + if (streamID > ws.maxID) { + ws.maxID = streamID; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2priorityWriteScheduler.ptr.prototype.OpenStream }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._r$1 = _r$1; $f.curr = curr; $f.n = n; $f.options = options; $f.parent = parent; $f.streamID = streamID; $f.ws = ws; $f.$s = $s; $f.$r = $r; return $f; + }; + http2priorityWriteScheduler.prototype.OpenStream = function(streamID, options) { return this.$val.OpenStream(streamID, options); }; + http2priorityWriteScheduler.ptr.prototype.CloseStream = function(streamID) { + var _entry, _entry$1, _entry$2, _r$1, _r$2, n, q, streamID, ws, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _r$1 = $f._r$1; _r$2 = $f._r$2; n = $f.n; q = $f.q; streamID = $f.streamID; ws = $f.ws; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + q = [q]; + ws = this; + if (streamID === 0) { + $panic(new $String("violation of WriteScheduler interface: cannot close stream 0")); + } + /* */ if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$80.nil) === ptrType$80.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$80.nil) === ptrType$80.nil) { */ case 1: + _r$1 = fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", new sliceType([new $Uint32(streamID)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 2: + /* */ if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$80.nil).state === 0))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$80.nil).state === 0))) { */ case 4: + _r$2 = fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", new sliceType([new $Uint32(streamID)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $panic(new $String(_r$2)); + /* } */ case 5: + n = (_entry$2 = ws.nodes[$Uint32.keyFor(streamID)], _entry$2 !== undefined ? _entry$2.v : ptrType$80.nil); + n.state = 1; + n.addBytes((x$4 = n.bytes, new $Int64(-x$4.$high, -x$4.$low))); + q[0] = $clone(n.q, http2writeQueue); + (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$81(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q[0]); + n.q.s = sliceType$20.nil; + if (ws.maxClosedNodesInTree > 0) { + ws.addClosedOrIdleNode((ws.$ptr_closedNodes || (ws.$ptr_closedNodes = new ptrType$82(function() { return this.$target.closedNodes; }, function($v) { this.$target.closedNodes = $v; }, ws))), ws.maxClosedNodesInTree, n); + } else { + ws.removeNode(n); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2priorityWriteScheduler.ptr.prototype.CloseStream }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f.n = n; $f.q = q; $f.streamID = streamID; $f.ws = ws; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + http2priorityWriteScheduler.prototype.CloseStream = function(streamID) { return this.$val.CloseStream(streamID); }; + http2priorityWriteScheduler.ptr.prototype.AdjustStream = function(streamID, priority) { + var _entry, _entry$1, _key, k, n, next, parent, priority, streamID, ws, x$4; + ws = this; + if (streamID === 0) { + $panic(new $String("adjustPriority on root")); + } + n = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$80.nil); + if (n === ptrType$80.nil) { + if (streamID <= ws.maxID || (ws.maxIdleNodesInTree === 0)) { + return; + } + ws.maxID = streamID; + n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$81(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 2, new $Int64(0, 0), new $Int64(0, 0), ptrType$80.nil, ptrType$80.nil, ptrType$80.nil, ptrType$80.nil); + n.setParent(ws.root); + _key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n }; + ws.addClosedOrIdleNode((ws.$ptr_idleNodes || (ws.$ptr_idleNodes = new ptrType$82(function() { return this.$target.idleNodes; }, function($v) { this.$target.idleNodes = $v; }, ws))), ws.maxIdleNodesInTree, n); + } + parent = (_entry$1 = ws.nodes[$Uint32.keyFor(priority.StreamDep)], _entry$1 !== undefined ? _entry$1.v : ptrType$80.nil); + if (parent === ptrType$80.nil) { + n.setParent(ws.root); + n.weight = 15; + return; + } + if (n === parent) { + return; + } + x$4 = parent.parent; + while (true) { + if (!(!(x$4 === ptrType$80.nil))) { break; } + if (x$4 === n) { + parent.setParent(n.parent); + break; + } + x$4 = x$4.parent; + } + if (priority.Exclusive) { + k = parent.kids; + while (true) { + if (!(!(k === ptrType$80.nil))) { break; } + next = k.next; + if (!(k === n)) { + k.setParent(n); + } + k = next; + } + } + n.setParent(parent); + n.weight = priority.Weight; + }; + http2priorityWriteScheduler.prototype.AdjustStream = function(streamID, priority) { return this.$val.AdjustStream(streamID, priority); }; + http2priorityWriteScheduler.ptr.prototype.Push = function(wr) { + var _entry, id, n, wr, ws; + ws = this; + n = ptrType$80.nil; + id = $clone(wr, http2FrameWriteRequest).StreamID(); + if (id === 0) { + n = ws.root; + } else { + n = (_entry = ws.nodes[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$80.nil); + if (n === ptrType$80.nil) { + if ($clone(wr, http2FrameWriteRequest).DataSize() > 0) { + $panic(new $String("add DATA on non-open stream")); + } + n = ws.root; + } + } + n.q.push($clone(wr, http2FrameWriteRequest)); + }; + http2priorityWriteScheduler.prototype.Push = function(wr) { return this.$val.Push(wr); }; + http2priorityWriteScheduler.ptr.prototype.Pop = function() { + var _r$1, _tmp, _tmp$1, ok, wr, ws, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; ok = $f.ok; wr = $f.wr; ws = $f.ws; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ok = [ok]; + wr = [wr]; + ws = [ws]; + wr[0] = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil); + ok[0] = false; + ws[0] = this; + _r$1 = ws[0].root.walkReadyInOrder(false, (ws[0].$ptr_tmp || (ws[0].$ptr_tmp = new ptrType$82(function() { return this.$target.tmp; }, function($v) { this.$target.tmp = $v; }, ws[0]))), (function(ok, wr, ws) { return function(n, openParent) { + var _tuple, limit, n, openParent; + limit = 2147483647; + if (openParent) { + limit = ws[0].writeThrottleLimit; + } + _tuple = n.q.consume(limit); + http2FrameWriteRequest.copy(wr[0], _tuple[0]); + ok[0] = _tuple[1]; + if (!ok[0]) { + return false; + } + n.addBytes((new $Int64(0, $clone(wr[0], http2FrameWriteRequest).DataSize()))); + if (openParent) { + ws[0].writeThrottleLimit = ws[0].writeThrottleLimit + (1024) >> 0; + if (ws[0].writeThrottleLimit < 0) { + ws[0].writeThrottleLimit = 2147483647; + } + } else if (ws[0].enableWriteThrottle) { + ws[0].writeThrottleLimit = 1024; + } + return true; + }; })(ok, wr, ws)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _tmp = $clone(wr[0], http2FrameWriteRequest); + _tmp$1 = ok[0]; + http2FrameWriteRequest.copy(wr[0], _tmp); + ok[0] = _tmp$1; + $s = -1; return [wr[0], ok[0]]; + /* */ } return; } if ($f === undefined) { $f = { $blk: http2priorityWriteScheduler.ptr.prototype.Pop }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.ok = ok; $f.wr = wr; $f.ws = ws; $f.$s = $s; $f.$r = $r; return $f; + }; + http2priorityWriteScheduler.prototype.Pop = function() { return this.$val.Pop(); }; + http2priorityWriteScheduler.ptr.prototype.addClosedOrIdleNode = function(list$1, maxSize, n) { + var list$1, maxSize, n, ws, x$4, x$5; + ws = this; + if (maxSize === 0) { + return; + } + if (list$1.$get().$length === maxSize) { + ws.removeNode((x$4 = list$1.$get(), (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0]))); + x$5 = $subslice((list$1.$get()), 1); + $copySlice(list$1.$get(), x$5); + list$1.$set($subslice((list$1.$get()), 0, x$5.$length)); + } + list$1.$set($append(list$1.$get(), n)); + }; + http2priorityWriteScheduler.prototype.addClosedOrIdleNode = function(list$1, maxSize, n) { return this.$val.addClosedOrIdleNode(list$1, maxSize, n); }; + http2priorityWriteScheduler.ptr.prototype.removeNode = function(n) { + var k, n, ws; + ws = this; + k = n.kids; + while (true) { + if (!(!(k === ptrType$80.nil))) { break; } + k.setParent(n.parent); + k = k.next; + } + n.setParent(ptrType$80.nil); + delete ws.nodes[$Uint32.keyFor(n.id)]; + }; + http2priorityWriteScheduler.prototype.removeNode = function(n) { return this.$val.removeNode(n); }; + http2NewRandomWriteScheduler = function() { + return new http2randomWriteScheduler.ptr(new http2writeQueue.ptr(sliceType$20.nil), {}, http2writeQueuePool.nil); + }; + http2randomWriteScheduler.ptr.prototype.OpenStream = function(streamID, options) { + var options, streamID, ws; + ws = this; + }; + http2randomWriteScheduler.prototype.OpenStream = function(streamID, options) { return this.$val.OpenStream(streamID, options); }; + http2randomWriteScheduler.ptr.prototype.CloseStream = function(streamID) { + var _entry, _tuple, ok, q, streamID, ws; + ws = this; + _tuple = (_entry = ws.sq[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$78.nil, false]); + q = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + return; + } + delete ws.sq[$Uint32.keyFor(streamID)]; + (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$81(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q); + }; + http2randomWriteScheduler.prototype.CloseStream = function(streamID) { return this.$val.CloseStream(streamID); }; + http2randomWriteScheduler.ptr.prototype.AdjustStream = function(streamID, priority) { + var priority, streamID, ws; + ws = this; + }; + http2randomWriteScheduler.prototype.AdjustStream = function(streamID, priority) { return this.$val.AdjustStream(streamID, priority); }; + http2randomWriteScheduler.ptr.prototype.Push = function(wr) { + var _entry, _key, _tuple, id, ok, q, wr, ws; + ws = this; + id = $clone(wr, http2FrameWriteRequest).StreamID(); + if (id === 0) { + ws.zero.push($clone(wr, http2FrameWriteRequest)); + return; + } + _tuple = (_entry = ws.sq[$Uint32.keyFor(id)], _entry !== undefined ? [_entry.v, true] : [ptrType$78.nil, false]); + q = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + q = (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$81(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(); + _key = id; (ws.sq || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: q }; + } + q.push($clone(wr, http2FrameWriteRequest)); + }; + http2randomWriteScheduler.prototype.Push = function(wr) { return this.$val.Push(wr); }; + http2randomWriteScheduler.ptr.prototype.Pop = function() { + var _entry, _i, _keys, _ref, _tuple, ok, q, wr, ws; + ws = this; + if (!ws.zero.empty()) { + return [ws.zero.shift(), true]; + } + _ref = ws.sq; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + q = _entry.v; + _tuple = q.consume(2147483647); + wr = $clone(_tuple[0], http2FrameWriteRequest); + ok = _tuple[1]; + if (ok) { + return [wr, true]; + } + _i++; + } + return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$6.nil, $chanNil), false]; + }; + http2randomWriteScheduler.prototype.Pop = function() { return this.$val.Pop(); }; + Header.prototype.Add = function(key, value) { + var h, key, value; + h = this.$val; + new textproto.MIMEHeader((h)).Add(key, value); + }; + $ptrType(Header).prototype.Add = function(key, value) { return new Header(this.$get()).Add(key, value); }; + Header.prototype.Set = function(key, value) { + var h, key, value; + h = this.$val; + new textproto.MIMEHeader((h)).Set(key, value); + }; + $ptrType(Header).prototype.Set = function(key, value) { return new Header(this.$get()).Set(key, value); }; + Header.prototype.Get = function(key) { + var h, key; + h = this.$val; + return new textproto.MIMEHeader((h)).Get(key); + }; + $ptrType(Header).prototype.Get = function(key) { return new Header(this.$get()).Get(key); }; + Header.prototype.get = function(key) { + var _entry, h, key, v; + h = this.$val; + v = (_entry = h[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (v.$length > 0) { + return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); + } + return ""; + }; + $ptrType(Header).prototype.get = function(key) { return new Header(this.$get()).get(key); }; + Header.prototype.Del = function(key) { + var h, key; + h = this.$val; + new textproto.MIMEHeader((h)).Del(key); + }; + $ptrType(Header).prototype.Del = function(key) { return new Header(this.$get()).Del(key); }; + Header.prototype.Write = function(w) { + var _r$1, h, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; h = $f.h; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this.$val; + _r$1 = new Header(h).write(w, ptrType$49.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Header.prototype.Write }; } $f._r$1 = _r$1; $f.h = h; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Header).prototype.Write = function(w) { return new Header(this.$get()).Write(w); }; + Header.prototype.write = function(w, trace) { + var _r$1, h, trace, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; h = $f.h; trace = $f.trace; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this.$val; + _r$1 = new Header(h).writeSubset(w, false, trace); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Header.prototype.write }; } $f._r$1 = _r$1; $f.h = h; $f.trace = trace; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Header).prototype.write = function(w, trace) { return new Header(this.$get()).write(w, trace); }; + Header.prototype.clone = function() { + var _entry, _i, _key, _keys, _ref, h, h2, k, vv, vv2, x$4; + h = this.$val; + h2 = (x$4 = $keys(h).length, ((x$4 < 0 || x$4 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + _ref = h; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + vv2 = $makeSlice(sliceType$1, vv.$length); + $copySlice(vv2, vv); + _key = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv2 }; + _i++; + } + return h2; + }; + $ptrType(Header).prototype.clone = function() { return new Header(this.$get()).clone(); }; + stringWriter.ptr.prototype.WriteString = function(s) { + var _r$1, _tuple, err, n, s, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; n = $f.n; s = $f.s; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.w.Write((new sliceType$3($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: stringWriter.ptr.prototype.WriteString }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.s = s; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + stringWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + headerSorter.ptr.prototype.Len = function() { + var s; + s = this; + return s.kvs.$length; + }; + headerSorter.prototype.Len = function() { return this.$val.Len(); }; + headerSorter.ptr.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, s, x$4, x$5, x$6, x$7; + s = this; + _tmp = $clone((x$4 = s.kvs, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j])), keyValues); + _tmp$1 = $clone((x$5 = s.kvs, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])), keyValues); + keyValues.copy((x$6 = s.kvs, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])), _tmp); + keyValues.copy((x$7 = s.kvs, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j])), _tmp$1); + }; + headerSorter.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; + headerSorter.ptr.prototype.Less = function(i, j) { + var i, j, s, x$4, x$5; + s = this; + return (x$4 = s.kvs, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])).key < (x$5 = s.kvs, ((j < 0 || j >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + j])).key; + }; + headerSorter.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; + Header.prototype.sortedKeyValues = function(exclude) { + var _entry, _entry$1, _i, _keys, _r$1, _ref, _tmp, _tmp$1, exclude, h, hs, k, kvs, vv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; exclude = $f.exclude; h = $f.h; hs = $f.hs; k = $f.k; kvs = $f.kvs; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + kvs = sliceType$4.nil; + hs = ptrType$83.nil; + h = this.$val; + _r$1 = headerSorterPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + hs = $assertType(_r$1, ptrType$83); + if (hs.kvs.$capacity < $keys(h).length) { + hs.kvs = $makeSlice(sliceType$4, 0, $keys(h).length); + } + kvs = $subslice(hs.kvs, 0, 0); + _ref = h; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + if (!(_entry$1 = exclude[$String.keyFor(k)], _entry$1 !== undefined ? _entry$1.v : false)) { + kvs = $append(kvs, new keyValues.ptr(k, vv)); + } + _i++; + } + hs.kvs = kvs; + $r = sort.Sort(hs); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = kvs; + _tmp$1 = hs; + kvs = _tmp; + hs = _tmp$1; + $s = -1; return [kvs, hs]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Header.prototype.sortedKeyValues }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.exclude = exclude; $f.h = h; $f.hs = hs; $f.k = k; $f.kvs = kvs; $f.vv = vv; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Header).prototype.sortedKeyValues = function(exclude) { return new Header(this.$get()).sortedKeyValues(exclude); }; + Header.prototype.WriteSubset = function(w, exclude) { + var _r$1, exclude, h, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; exclude = $f.exclude; h = $f.h; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this.$val; + _r$1 = new Header(h).writeSubset(w, exclude, ptrType$49.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Header.prototype.WriteSubset }; } $f._r$1 = _r$1; $f.exclude = exclude; $f.h = h; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Header).prototype.WriteSubset = function(w, exclude) { return new Header(this.$get()).WriteSubset(w, exclude); }; + Header.prototype.writeSubset = function(w, exclude, trace) { + var _i, _i$1, _i$2, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, err, exclude, formattedVals, h, kv, kvs, ok, s, sorter, trace, v, w, ws, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; exclude = $f.exclude; formattedVals = $f.formattedVals; h = $f.h; kv = $f.kv; kvs = $f.kvs; ok = $f.ok; s = $f.s; sorter = $f.sorter; trace = $f.trace; v = $f.v; w = $f.w; ws = $f.ws; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this.$val; + _tuple = $assertType(w, writeStringer, true); + ws = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + ws = (x$4 = new stringWriter.ptr(w), new x$4.constructor.elem(x$4)); + } + _r$1 = new Header(h).sortedKeyValues(exclude); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + kvs = _tuple$1[0]; + sorter = _tuple$1[1]; + formattedVals = sliceType$1.nil; + _ref = kvs; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + kv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), keyValues); + _ref$1 = kv.values; + _i$1 = 0; + /* while (true) { */ case 4: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _r$2 = headerNewlineToSpace.Replace(v); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + v = _r$2; + v = textproto.TrimString(v); + _ref$2 = new sliceType$1([kv.key, ": ", v, "\r\n"]); + _i$2 = 0; + /* while (true) { */ case 7: + /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 8; continue; } + s = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + _r$3 = ws.WriteString(s); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + headerSorterPool.Put(sorter); + $s = -1; return err; + } + _i$2++; + /* } */ $s = 7; continue; case 8: + if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { + formattedVals = $append(formattedVals, v); + } + _i$1++; + /* } */ $s = 4; continue; case 5: + /* */ if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 10: + $r = trace.WroteHeaderField(kv.key, formattedVals); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + formattedVals = sliceType$1.nil; + /* } */ case 11: + _i++; + /* } */ $s = 2; continue; case 3: + headerSorterPool.Put(sorter); + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Header.prototype.writeSubset }; } $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.exclude = exclude; $f.formattedVals = formattedVals; $f.h = h; $f.kv = kv; $f.kvs = kvs; $f.ok = ok; $f.s = s; $f.sorter = sorter; $f.trace = trace; $f.v = v; $f.w = w; $f.ws = ws; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(Header).prototype.writeSubset = function(w, exclude, trace) { return new Header(this.$get()).writeSubset(w, exclude, trace); }; + CanonicalHeaderKey = function(s) { + var s; + return textproto.CanonicalMIMEHeaderKey(s); + }; + $pkg.CanonicalHeaderKey = CanonicalHeaderKey; + hasToken = function(v, token) { + var b, endPos, sp, token, v; + if (token.length > v.length || token === "") { + return false; + } + if (v === token) { + return true; + } + sp = 0; + while (true) { + if (!(sp <= (v.length - token.length >> 0))) { break; } + b = v.charCodeAt(sp); + if (!((b === token.charCodeAt(0))) && !((((b | 32) >>> 0) === token.charCodeAt(0)))) { + sp = sp + (1) >> 0; + continue; + } + if (sp > 0 && !isTokenBoundary(v.charCodeAt((sp - 1 >> 0)))) { + sp = sp + (1) >> 0; + continue; + } + endPos = sp + token.length >> 0; + if (!((endPos === v.length)) && !isTokenBoundary(v.charCodeAt(endPos))) { + sp = sp + (1) >> 0; + continue; + } + if (strings.EqualFold($substring(v, sp, (sp + token.length >> 0)), token)) { + return true; + } + sp = sp + (1) >> 0; + } + return false; + }; + isTokenBoundary = function(b) { + var b; + return (b === 32) || (b === 44) || (b === 9); + }; + cloneHeader = function(h) { + var _entry, _i, _key, _keys, _ref, h, h2, k, vv, vv2, x$4; + h2 = (x$4 = $keys(h).length, ((x$4 < 0 || x$4 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); + _ref = h; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + vv2 = $makeSlice(sliceType$1, vv.$length); + $copySlice(vv2, vv); + _key = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv2 }; + _i++; + } + return h2; + }; + contextKey.ptr.prototype.String = function() { + var k; + k = this; + return "net/http context value " + k.name; + }; + contextKey.prototype.String = function() { return this.$val.String(); }; + hasPort = function(s) { + var s; + return strings.LastIndex(s, ":") > strings.LastIndex(s, "]"); + }; + removeEmptyPort = function(host) { + var host; + if (hasPort(host)) { + return strings.TrimSuffix(host, ":"); + } + return host; + }; + isNotToken = function(r) { + var r; + return !httpguts.IsTokenRune(r); + }; + isASCII = function(s) { + var i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) >= 128) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + hexEscapeNonASCII = function(s) { + var b, i, i$1, newLen, s; + newLen = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) >= 128) { + newLen = newLen + (3) >> 0; + } else { + newLen = newLen + (1) >> 0; + } + i = i + (1) >> 0; + } + if (newLen === s.length) { + return s; + } + b = $makeSlice(sliceType$3, 0, newLen); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + if (s.charCodeAt(i$1) >= 128) { + b = $append(b, 37); + b = strconv.AppendInt(b, (new $Int64(0, s.charCodeAt(i$1))), 16); + } else { + b = $append(b, s.charCodeAt(i$1)); + } + i$1 = i$1 + (1) >> 0; + } + return ($bytesToString(b)); + }; + noBody.ptr.prototype.Read = function(param) { + var param; + return [0, io.EOF]; + }; + noBody.prototype.Read = function(param) { return this.$val.Read(param); }; + noBody.ptr.prototype.Close = function() { + return $ifaceNil; + }; + noBody.prototype.Close = function() { return this.$val.Close(); }; + noBody.ptr.prototype.WriteTo = function(param) { + var param; + return [new $Int64(0, 0), $ifaceNil]; + }; + noBody.prototype.WriteTo = function(param) { return this.$val.WriteTo(param); }; + ProtocolError.ptr.prototype.Error = function() { + var pe; + pe = this; + return pe.ErrorString; + }; + ProtocolError.prototype.Error = function() { return this.$val.Error(); }; + badStringError.ptr.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$1 = fmt.Sprintf("%s %q", new sliceType([new $String(e.what), new $String(e.str)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: badStringError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + badStringError.prototype.Error = function() { return this.$val.Error(); }; + Request.ptr.prototype.Context = function() { + var r; + r = this; + if (!($interfaceIsEqual(r.ctx, $ifaceNil))) { + return r.ctx; + } + return context.Background(); + }; + Request.prototype.Context = function() { return this.$val.Context(); }; + Request.ptr.prototype.WithContext = function(ctx) { + var ctx, r, r2, r2URL; + r = this; + if ($interfaceIsEqual(ctx, $ifaceNil)) { + $panic(new $String("nil context")); + } + r2 = new Request.ptr("", ptrType$19.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, "", false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, $chanNil, ptrType$16.nil, $ifaceNil); + Request.copy(r2, r); + r2.ctx = ctx; + if (!(r.URL === ptrType$19.nil)) { + r2URL = new url.URL.ptr("", "", ptrType$18.nil, "", "", "", false, "", ""); + url.URL.copy(r2URL, r.URL); + r2.URL = r2URL; + } + return r2; + }; + Request.prototype.WithContext = function(ctx) { return this.$val.WithContext(ctx); }; + Request.ptr.prototype.ProtoAtLeast = function(major, minor) { + var major, minor, r; + r = this; + return r.ProtoMajor > major || (r.ProtoMajor === major) && r.ProtoMinor >= minor; + }; + Request.prototype.ProtoAtLeast = function(major, minor) { return this.$val.ProtoAtLeast(major, minor); }; + Request.ptr.prototype.UserAgent = function() { + var r; + r = this; + return new Header(r.Header).Get("User-Agent"); + }; + Request.prototype.UserAgent = function() { return this.$val.UserAgent(); }; + Request.ptr.prototype.Cookies = function() { + var _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = readCookies(r.Header, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.Cookies }; } $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.Cookies = function() { return this.$val.Cookies(); }; + Request.ptr.prototype.Cookie = function(name) { + var _i, _r$1, _ref, c, name, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; c = $f.c; name = $f.name; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = readCookies(r.Header, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _ref = _r$1; + _i = 0; + /* while (true) { */ case 2: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $s = -1; return [c, $ifaceNil]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [ptrType$25.nil, $pkg.ErrNoCookie]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.Cookie }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.c = c; $f.name = name; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.Cookie = function(name) { return this.$val.Cookie(name); }; + Request.ptr.prototype.AddCookie = function(c) { + var _arg, _arg$1, _r$1, _r$2, _r$3, c, c$1, r, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; c = $f.c; c$1 = $f.c$1; r = $f.r; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = sanitizeCookieName(c.Name); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _arg = new $String(_r$1); + _r$2 = sanitizeCookieValue(c.Value); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg$1 = new $String(_r$2); + _r$3 = fmt.Sprintf("%s=%s", new sliceType([_arg, _arg$1])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + s = _r$3; + c$1 = new Header(r.Header).Get("Cookie"); + if (!(c$1 === "")) { + new Header(r.Header).Set("Cookie", c$1 + "; " + s); + } else { + new Header(r.Header).Set("Cookie", s); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.AddCookie }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.c = c; $f.c$1 = c$1; $f.r = r; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.AddCookie = function(c) { return this.$val.AddCookie(c); }; + Request.ptr.prototype.Referer = function() { + var r; + r = this; + return new Header(r.Header).Get("Referer"); + }; + Request.prototype.Referer = function() { return this.$val.Referer(); }; + Request.ptr.prototype.MultipartReader = function() { + var _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (r.MultipartForm === multipartByReader) { + $s = -1; return [ptrType$84.nil, errors.New("http: MultipartReader called twice")]; + } + if (!(r.MultipartForm === ptrType$20.nil)) { + $s = -1; return [ptrType$84.nil, errors.New("http: multipart handled by ParseMultipartForm")]; + } + r.MultipartForm = multipartByReader; + _r$1 = r.multipartReader(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.MultipartReader }; } $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.MultipartReader = function() { return this.$val.MultipartReader(); }; + Request.ptr.prototype.multipartReader = function(allowMixed) { + var _entry, _r$1, _tuple, _tuple$1, allowMixed, boundary, d, err, ok, params, r, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; allowMixed = $f.allowMixed; boundary = $f.boundary; d = $f.d; err = $f.err; ok = $f.ok; params = $f.params; r = $f.r; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + v = new Header(r.Header).Get("Content-Type"); + if (v === "") { + $s = -1; return [ptrType$84.nil, $pkg.ErrNotMultipart]; + } + _r$1 = mime.ParseMediaType(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + d = _tuple[0]; + params = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil)) || !(d === "multipart/form-data" || allowMixed && d === "multipart/mixed")) { + $s = -1; return [ptrType$84.nil, $pkg.ErrNotMultipart]; + } + _tuple$1 = (_entry = params[$String.keyFor("boundary")], _entry !== undefined ? [_entry.v, true] : ["", false]); + boundary = _tuple$1[0]; + ok = _tuple$1[1]; + if (!ok) { + $s = -1; return [ptrType$84.nil, $pkg.ErrMissingBoundary]; + } + $s = -1; return [multipart.NewReader(r.Body, boundary), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.multipartReader }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.allowMixed = allowMixed; $f.boundary = boundary; $f.d = d; $f.err = err; $f.ok = ok; $f.params = params; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.multipartReader = function(allowMixed) { return this.$val.multipartReader(allowMixed); }; + Request.ptr.prototype.isH2Upgrade = function() { + var r; + r = this; + return r.Method === "PRI" && ($keys(r.Header).length === 0) && r.URL.Path === "*" && r.Proto === "HTTP/2.0"; + }; + Request.prototype.isH2Upgrade = function() { return this.$val.isH2Upgrade(); }; + valueOrDefault = function(value, def) { + var def, value; + if (!(value === "")) { + return value; + } + return def; + }; + Request.ptr.prototype.Write = function(w) { + var _r$1, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = r.write(w, false, false, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.Write }; } $f._r$1 = _r$1; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.Write = function(w) { return this.$val.Write(w); }; + Request.ptr.prototype.WriteProxy = function(w) { + var _r$1, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = r.write(w, true, false, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.WriteProxy }; } $f._r$1 = _r$1; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.WriteProxy = function(w) { return this.$val.WriteProxy(w); }; + Request.ptr.prototype.write = function(w, usingProxy, extraHeaders, waitForContinue) { + var _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, bw, bw$1, bw$2, err, err$1, extraHeaders, host, ok, ok$1, ok$2, ok$3, r, ruri, trace, tw, userAgent, usingProxy, w, waitForContinue, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _tuple$8 = $f._tuple$8; bw = $f.bw; bw$1 = $f.bw$1; bw$2 = $f.bw$2; err = $f.err; err$1 = $f.err$1; extraHeaders = $f.extraHeaders; host = $f.host; ok = $f.ok; ok$1 = $f.ok$1; ok$2 = $f.ok$2; ok$3 = $f.ok$3; r = $f.r; ruri = $f.ruri; trace = $f.trace; tw = $f.tw; userAgent = $f.userAgent; usingProxy = $f.usingProxy; w = $f.w; waitForContinue = $f.waitForContinue; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + trace = [trace]; + err[0] = $ifaceNil; + r = this; + _r$1 = httptrace.ContextClientTrace(r.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace[0] = _r$1; + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteRequest === $throwNilPointerError)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteRequest === $throwNilPointerError)) { */ case 2: + $deferred.push([(function(err, trace) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = trace[0].WroteRequest(new httptrace.WroteRequestInfo.ptr(err[0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(err, trace), []]); + /* } */ case 3: + _r$2 = cleanHost(r.Host); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + host = _r$2; + /* */ if (host === "") { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (host === "") { */ case 5: + if (r.URL === ptrType$19.nil) { + err[0] = errMissingHost; + $s = -1; return err[0]; + } + _r$3 = cleanHost(r.URL.Host); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + host = _r$3; + /* } */ case 6: + host = removeZone(host); + ruri = r.URL.RequestURI(); + if (usingProxy && !(r.URL.Scheme === "") && r.URL.Opaque === "") { + ruri = r.URL.Scheme + "://" + host + ruri; + } else if (r.Method === "CONNECT" && r.URL.Path === "") { + ruri = host; + } + bw = ptrType$10.nil; + _tuple = $assertType(w, io.ByteWriter, true); + ok = _tuple[1]; + if (!ok) { + bw = bufio.NewWriter(w); + w = bw; + } + _r$4 = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", new sliceType([new $String(valueOrDefault(r.Method, "GET")), new $String(ruri)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + err[0] = _tuple$1[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + _r$5 = fmt.Fprintf(w, "Host: %s\r\n", new sliceType([new $String(host)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$2 = _r$5; + err[0] = _tuple$2[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { */ case 10: + $r = trace[0].WroteHeaderField("Host", new sliceType$1([host])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 11: + userAgent = "Go-http-client/1.1"; + _tuple$3 = (_entry = r.Header[$String.keyFor("User-Agent")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + ok$1 = _tuple$3[1]; + if (ok$1) { + userAgent = new Header(r.Header).Get("User-Agent"); + } + /* */ if (!(userAgent === "")) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!(userAgent === "")) { */ case 13: + _r$6 = fmt.Fprintf(w, "User-Agent: %s\r\n", new sliceType([new $String(userAgent)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + err[0] = _tuple$4[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { */ case 16: + $r = trace[0].WroteHeaderField("User-Agent", new sliceType$1([userAgent])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + /* } */ case 14: + _r$7 = newTransferWriter(r); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$5 = _r$7; + tw = _tuple$5[0]; + err[0] = _tuple$5[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + _r$8 = tw.writeHeader(w, trace[0]); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err[0] = _r$8; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + _r$9 = new Header(r.Header).writeSubset(w, reqWriteExcludeHeader, trace[0]); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + err[0] = _r$9; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* */ if (!(extraHeaders === false)) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (!(extraHeaders === false)) { */ case 22: + _r$10 = new Header(extraHeaders).write(w, trace[0]); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + err[0] = _r$10; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* } */ case 23: + _r$11 = io.WriteString(w, "\r\n"); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$6 = _r$11; + err[0] = _tuple$6[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaders === $throwNilPointerError)) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].WroteHeaders === $throwNilPointerError)) { */ case 26: + $r = trace[0].WroteHeaders(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 27: + /* */ if (!(waitForContinue === $throwNilPointerError)) { $s = 29; continue; } + /* */ $s = 30; continue; + /* if (!(waitForContinue === $throwNilPointerError)) { */ case 29: + _tuple$7 = $assertType(w, ptrType$10, true); + bw$1 = _tuple$7[0]; + ok$2 = _tuple$7[1]; + /* */ if (ok$2) { $s = 31; continue; } + /* */ $s = 32; continue; + /* if (ok$2) { */ case 31: + _r$12 = bw$1.Flush(); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + err[0] = _r$12; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + err[0] = err[0]; + $s = -1; return err[0]; + } + /* } */ case 32: + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].Wait100Continue === $throwNilPointerError)) { $s = 34; continue; } + /* */ $s = 35; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].Wait100Continue === $throwNilPointerError)) { */ case 34: + $r = trace[0].Wait100Continue(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 35: + _r$13 = waitForContinue(); /* */ $s = 39; case 39: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + /* */ if (!_r$13) { $s = 37; continue; } + /* */ $s = 38; continue; + /* if (!_r$13) { */ case 37: + $r = r.closeBody(); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + err[0] = $ifaceNil; + $s = -1; return err[0]; + /* } */ case 38: + /* } */ case 30: + _tuple$8 = $assertType(w, ptrType$10, true); + bw$2 = _tuple$8[0]; + ok$3 = _tuple$8[1]; + /* */ if (ok$3 && tw.FlushHeaders) { $s = 41; continue; } + /* */ $s = 42; continue; + /* if (ok$3 && tw.FlushHeaders) { */ case 41: + _r$14 = bw$2.Flush(); /* */ $s = 43; case 43: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + err$1 = _r$14; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + err[0] = err$1; + $s = -1; return err[0]; + } + /* } */ case 42: + _r$15 = tw.writeBody(w); /* */ $s = 44; case 44: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + err[0] = _r$15; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + if ($interfaceIsEqual(tw.bodyReadError, err[0])) { + err[0] = (x$4 = new requestBodyReadError.ptr(err[0]), new x$4.constructor.elem(x$4)); + } + err[0] = err[0]; + $s = -1; return err[0]; + } + /* */ if (!(bw === ptrType$10.nil)) { $s = 45; continue; } + /* */ $s = 46; continue; + /* if (!(bw === ptrType$10.nil)) { */ case 45: + _r$16 = bw.Flush(); /* */ $s = 47; case 47: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + err[0] = _r$16; + $s = -1; return err[0]; + /* } */ case 46: + err[0] = $ifaceNil; + $s = -1; return err[0]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Request.ptr.prototype.write }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._tuple$8 = _tuple$8; $f.bw = bw; $f.bw$1 = bw$1; $f.bw$2 = bw$2; $f.err = err; $f.err$1 = err$1; $f.extraHeaders = extraHeaders; $f.host = host; $f.ok = ok; $f.ok$1 = ok$1; $f.ok$2 = ok$2; $f.ok$3 = ok$3; $f.r = r; $f.ruri = ruri; $f.trace = trace; $f.tw = tw; $f.userAgent = userAgent; $f.usingProxy = usingProxy; $f.w = w; $f.waitForContinue = waitForContinue; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Request.prototype.write = function(w, usingProxy, extraHeaders, waitForContinue) { return this.$val.write(w, usingProxy, extraHeaders, waitForContinue); }; + idnaASCII = function(v) { + var _r$1, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (isASCII(v)) { + $s = -1; return [v, $ifaceNil]; + } + _r$1 = idna.Lookup.ToASCII(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: idnaASCII }; } $f._r$1 = _r$1; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + cleanHost = function(in$1) { + var _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, a, a$1, err, err$1, host, i, in$1, port, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; a = $f.a; a$1 = $f.a$1; err = $f.err; err$1 = $f.err$1; host = $f.host; i = $f.i; in$1 = $f.in$1; port = $f.port; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + i = strings.IndexAny(in$1, " /"); + if (!((i === -1))) { + in$1 = $substring(in$1, 0, i); + } + _r$1 = net.SplitHostPort(in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + _r$2 = idnaASCII(in$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + a = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return in$1; + } + $s = -1; return a; + /* } */ case 3: + _r$3 = idnaASCII(host); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + a$1 = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return in$1; + } + $s = -1; return net.JoinHostPort(a$1, port); + /* */ } return; } if ($f === undefined) { $f = { $blk: cleanHost }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.a = a; $f.a$1 = a$1; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.i = i; $f.in$1 = in$1; $f.port = port; $f.$s = $s; $f.$r = $r; return $f; + }; + removeZone = function(host) { + var host, i, j; + if (!strings.HasPrefix(host, "[")) { + return host; + } + i = strings.LastIndex(host, "]"); + if (i < 0) { + return host; + } + j = strings.LastIndex($substring(host, 0, i), "%"); + if (j < 0) { + return host; + } + return $substring(host, 0, j) + $substring(host, i); + }; + ParseHTTPVersion = function(vers) { + var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, dot, err, major, minor, ok, vers; + major = 0; + minor = 0; + ok = false; + _1 = vers; + if (_1 === ("HTTP/1.1")) { + _tmp = 1; + _tmp$1 = 1; + _tmp$2 = true; + major = _tmp; + minor = _tmp$1; + ok = _tmp$2; + return [major, minor, ok]; + } else if (_1 === ("HTTP/1.0")) { + _tmp$3 = 1; + _tmp$4 = 0; + _tmp$5 = true; + major = _tmp$3; + minor = _tmp$4; + ok = _tmp$5; + return [major, minor, ok]; + } + if (!strings.HasPrefix(vers, "HTTP/")) { + _tmp$6 = 0; + _tmp$7 = 0; + _tmp$8 = false; + major = _tmp$6; + minor = _tmp$7; + ok = _tmp$8; + return [major, minor, ok]; + } + dot = strings.Index(vers, "."); + if (dot < 0) { + _tmp$9 = 0; + _tmp$10 = 0; + _tmp$11 = false; + major = _tmp$9; + minor = _tmp$10; + ok = _tmp$11; + return [major, minor, ok]; + } + _tuple = strconv.Atoi($substring(vers, 5, dot)); + major = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || major < 0 || major > 1000000) { + _tmp$12 = 0; + _tmp$13 = 0; + _tmp$14 = false; + major = _tmp$12; + minor = _tmp$13; + ok = _tmp$14; + return [major, minor, ok]; + } + _tuple$1 = strconv.Atoi($substring(vers, (dot + 1 >> 0))); + minor = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || minor < 0 || minor > 1000000) { + _tmp$15 = 0; + _tmp$16 = 0; + _tmp$17 = false; + major = _tmp$15; + minor = _tmp$16; + ok = _tmp$17; + return [major, minor, ok]; + } + _tmp$18 = major; + _tmp$19 = minor; + _tmp$20 = true; + major = _tmp$18; + minor = _tmp$19; + ok = _tmp$20; + return [major, minor, ok]; + }; + $pkg.ParseHTTPVersion = ParseHTTPVersion; + validMethod = function(method) { + var _r$1, _v, method, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _v = $f._v; method = $f.method; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (!(method.length > 0)) { _v = false; $s = 1; continue s; } + _r$1 = strings.IndexFunc(method, isNotToken); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1 === -1; case 1: + $s = -1; return _v; + /* */ } return; } if ($f === undefined) { $f = { $blk: validMethod }; } $f._r$1 = _r$1; $f._v = _v; $f.method = method; $f.$s = $s; $f.$r = $r; return $f; + }; + NewRequest = function(method, url$1, body$1) { + var _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, body$1, buf, err, method, ok, rc, req, snapshot, snapshot$1, u, url$1, v, v$1, v$2, v$3, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; body$1 = $f.body$1; buf = $f.buf; err = $f.err; method = $f.method; ok = $f.ok; rc = $f.rc; req = $f.req; snapshot = $f.snapshot; snapshot$1 = $f.snapshot$1; u = $f.u; url$1 = $f.url$1; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; v$3 = $f.v$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = [buf]; + snapshot = [snapshot]; + snapshot$1 = [snapshot$1]; + if (method === "") { + method = "GET"; + } + _r$1 = validMethod(method); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!_r$1) { */ case 1: + _r$2 = fmt.Errorf("net/http: invalid method %q", new sliceType([new $String(method)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [ptrType$7.nil, _r$2]; + /* } */ case 2: + _r$3 = parseURL(url$1); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + u = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$7.nil, err]; + } + _tuple$1 = $assertType(body$1, io.ReadCloser, true); + rc = _tuple$1[0]; + ok = _tuple$1[1]; + if (!ok && !($interfaceIsEqual(body$1, $ifaceNil))) { + rc = ioutil.NopCloser(body$1); + } + u.Host = removeEmptyPort(u.Host); + req = new Request.ptr(method, u, "HTTP/1.1", 1, 1, {}, rc, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, u.Host, false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, $chanNil, ptrType$16.nil, $ifaceNil); + if (!($interfaceIsEqual(body$1, $ifaceNil))) { + _ref = body$1; + if ($assertType(_ref, ptrType$37, true)[1]) { + v = _ref.$val; + req.ContentLength = (new $Int64(0, v.Len())); + buf[0] = v.Bytes(); + req.GetBody = (function(buf, snapshot, snapshot$1) { return function() { + var r; + r = bytes.NewReader(buf[0]); + return [ioutil.NopCloser(r), $ifaceNil]; + }; })(buf, snapshot, snapshot$1); + } else if ($assertType(_ref, ptrType$85, true)[1]) { + v$1 = _ref.$val; + req.ContentLength = (new $Int64(0, v$1.Len())); + snapshot[0] = $clone(v$1, bytes.Reader); + req.GetBody = (function(buf, snapshot, snapshot$1) { return function() { + var r; + r = $clone(snapshot[0], bytes.Reader); + return [ioutil.NopCloser(r), $ifaceNil]; + }; })(buf, snapshot, snapshot$1); + } else if ($assertType(_ref, ptrType$86, true)[1]) { + v$2 = _ref.$val; + req.ContentLength = (new $Int64(0, v$2.Len())); + snapshot$1[0] = $clone(v$2, strings.Reader); + req.GetBody = (function(buf, snapshot, snapshot$1) { return function() { + var r; + r = $clone(snapshot$1[0], strings.Reader); + return [ioutil.NopCloser(r), $ifaceNil]; + }; })(buf, snapshot, snapshot$1); + } else { + v$3 = _ref; + } + if (!(req.GetBody === $throwNilPointerError) && (x$4 = req.ContentLength, (x$4.$high === 0 && x$4.$low === 0))) { + req.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + req.GetBody = (function(buf, snapshot, snapshot$1) { return function() { + return [new $pkg.NoBody.constructor.elem($pkg.NoBody), $ifaceNil]; + }; })(buf, snapshot, snapshot$1); + } + } + $s = -1; return [req, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: NewRequest }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.body$1 = body$1; $f.buf = buf; $f.err = err; $f.method = method; $f.ok = ok; $f.rc = rc; $f.req = req; $f.snapshot = snapshot; $f.snapshot$1 = snapshot$1; $f.u = u; $f.url$1 = url$1; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.v$3 = v$3; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NewRequest = NewRequest; + Request.ptr.prototype.BasicAuth = function() { + var _tuple, auth, ok, password, r, username; + username = ""; + password = ""; + ok = false; + r = this; + auth = new Header(r.Header).Get("Authorization"); + if (auth === "") { + return [username, password, ok]; + } + _tuple = parseBasicAuth(auth); + username = _tuple[0]; + password = _tuple[1]; + ok = _tuple[2]; + return [username, password, ok]; + }; + Request.prototype.BasicAuth = function() { return this.$val.BasicAuth(); }; + parseBasicAuth = function(auth) { + var _tmp, _tmp$1, _tmp$2, _tuple, auth, c, cs, err, ok, password, s, username; + username = ""; + password = ""; + ok = false; + if (auth.length < 6 || !strings.EqualFold($substring(auth, 0, 6), "Basic ")) { + return [username, password, ok]; + } + _tuple = base64.StdEncoding.DecodeString($substring(auth, 6)); + c = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [username, password, ok]; + } + cs = ($bytesToString(c)); + s = strings.IndexByte(cs, 58); + if (s < 0) { + return [username, password, ok]; + } + _tmp = $substring(cs, 0, s); + _tmp$1 = $substring(cs, (s + 1 >> 0)); + _tmp$2 = true; + username = _tmp; + password = _tmp$1; + ok = _tmp$2; + return [username, password, ok]; + }; + Request.ptr.prototype.SetBasicAuth = function(username, password) { + var password, r, username; + r = this; + new Header(r.Header).Set("Authorization", "Basic " + basicAuth(username, password)); + }; + Request.prototype.SetBasicAuth = function(username, password) { return this.$val.SetBasicAuth(username, password); }; + parseRequestLine = function(line) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, line, method, ok, proto, requestURI, s1, s2; + method = ""; + requestURI = ""; + proto = ""; + ok = false; + s1 = strings.Index(line, " "); + s2 = strings.Index($substring(line, (s1 + 1 >> 0)), " "); + if (s1 < 0 || s2 < 0) { + return [method, requestURI, proto, ok]; + } + s2 = s2 + ((s1 + 1 >> 0)) >> 0; + _tmp = $substring(line, 0, s1); + _tmp$1 = $substring(line, (s1 + 1 >> 0), s2); + _tmp$2 = $substring(line, (s2 + 1 >> 0)); + _tmp$3 = true; + method = _tmp; + requestURI = _tmp$1; + proto = _tmp$2; + ok = _tmp$3; + return [method, requestURI, proto, ok]; + }; + newTextprotoReader = function(br) { + var _r$1, br, tr, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; br = $f.br; tr = $f.tr; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = textprotoReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + if (!($interfaceIsEqual(v, $ifaceNil))) { + tr = $assertType(v, ptrType$87); + tr.R = br; + $s = -1; return tr; + } + $s = -1; return textproto.NewReader(br); + /* */ } return; } if ($f === undefined) { $f = { $blk: newTextprotoReader }; } $f._r$1 = _r$1; $f.br = br; $f.tr = tr; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + putTextprotoReader = function(r) { + var r; + r.R = ptrType$73.nil; + textprotoReaderPool.Put(r); + }; + readRequest = function(b, deleteHostHeader) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, deleteHostHeader, err, justAuthority, mimeHeader, ok, rawurl, req, s, tp, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; b = $f.b; deleteHostHeader = $f.deleteHostHeader; err = $f.err; justAuthority = $f.justAuthority; mimeHeader = $f.mimeHeader; ok = $f.ok; rawurl = $f.rawurl; req = $f.req; s = $f.s; tp = $f.tp; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + tp = [tp]; + req = ptrType$7.nil; + err[0] = $ifaceNil; + _r$1 = newTextprotoReader(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + tp[0] = _r$1; + req = new Request.ptr("", ptrType$19.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, "", false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, $chanNil, ptrType$16.nil, $ifaceNil); + s = ""; + _r$2 = tp[0].ReadLine(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + s = _tuple[0]; + err[0] = _tuple[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + _tmp = ptrType$7.nil; + _tmp$1 = err[0]; + req = _tmp; + err[0] = _tmp$1; + $s = -1; return [req, err[0]]; + } + $deferred.push([(function(err, tp) { return function() { + putTextprotoReader(tp[0]); + if ($interfaceIsEqual(err[0], io.EOF)) { + err[0] = io.ErrUnexpectedEOF; + } + }; })(err, tp), []]); + ok = false; + _tuple$1 = parseRequestLine(s); + req.Method = _tuple$1[0]; + req.RequestURI = _tuple$1[1]; + req.Proto = _tuple$1[2]; + ok = _tuple$1[3]; + if (!ok) { + _tmp$2 = ptrType$7.nil; + _tmp$3 = new badStringError.ptr("malformed HTTP request", s); + req = _tmp$2; + err[0] = _tmp$3; + $s = -1; return [req, err[0]]; + } + _r$3 = validMethod(req.Method); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (!_r$3) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!_r$3) { */ case 3: + _tmp$4 = ptrType$7.nil; + _tmp$5 = new badStringError.ptr("invalid method", req.Method); + req = _tmp$4; + err[0] = _tmp$5; + $s = -1; return [req, err[0]]; + /* } */ case 4: + rawurl = req.RequestURI; + _tuple$2 = ParseHTTPVersion(req.Proto); + req.ProtoMajor = _tuple$2[0]; + req.ProtoMinor = _tuple$2[1]; + ok = _tuple$2[2]; + if (!ok) { + _tmp$6 = ptrType$7.nil; + _tmp$7 = new badStringError.ptr("malformed HTTP version", req.Proto); + req = _tmp$6; + err[0] = _tmp$7; + $s = -1; return [req, err[0]]; + } + justAuthority = req.Method === "CONNECT" && !strings.HasPrefix(rawurl, "/"); + if (justAuthority) { + rawurl = "http://" + rawurl; + } + _r$4 = url.ParseRequestURI(rawurl); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + req.URL = _tuple$3[0]; + err[0] = _tuple$3[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + _tmp$8 = ptrType$7.nil; + _tmp$9 = err[0]; + req = _tmp$8; + err[0] = _tmp$9; + $s = -1; return [req, err[0]]; + } + if (justAuthority) { + req.URL.Scheme = ""; + } + _r$5 = tp[0].ReadMIMEHeader(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + mimeHeader = _tuple$4[0]; + err[0] = _tuple$4[1]; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + _tmp$10 = ptrType$7.nil; + _tmp$11 = err[0]; + req = _tmp$10; + err[0] = _tmp$11; + $s = -1; return [req, err[0]]; + } + req.Header = (mimeHeader); + req.Host = req.URL.Host; + if (req.Host === "") { + req.Host = new Header(req.Header).get("Host"); + } + if (deleteHostHeader) { + delete req.Header[$String.keyFor("Host")]; + } + fixPragmaCacheControl(req.Header); + req.Close = shouldClose(req.ProtoMajor, req.ProtoMinor, req.Header, false); + _r$6 = readTransfer(req, b); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err[0] = _r$6; + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + _tmp$12 = ptrType$7.nil; + _tmp$13 = err[0]; + req = _tmp$12; + err[0] = _tmp$13; + $s = -1; return [req, err[0]]; + } + if (req.isH2Upgrade()) { + req.ContentLength = new $Int64(-1, 4294967295); + req.Close = true; + } + _tmp$14 = req; + _tmp$15 = $ifaceNil; + req = _tmp$14; + err[0] = _tmp$15; + $s = -1; return [req, err[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [req, err[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: readRequest }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.b = b; $f.deleteHostHeader = deleteHostHeader; $f.err = err; $f.justAuthority = justAuthority; $f.mimeHeader = mimeHeader; $f.ok = ok; $f.rawurl = rawurl; $f.req = req; $f.s = s; $f.tp = tp; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + MaxBytesReader = function(w, r, n) { + var n, r, w; + return new maxBytesReader.ptr(w, r, n, $ifaceNil); + }; + $pkg.MaxBytesReader = MaxBytesReader; + maxBytesReader.ptr.prototype.Read = function(p) { + var _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, err, l, n, ok, p, res, x$10, x$11, x$12, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; l = $f.l; n = $f.n; ok = $f.ok; p = $f.p; res = $f.res; x$10 = $f.x$10; x$11 = $f.x$11; x$12 = $f.x$12; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + l = this; + if (!($interfaceIsEqual(l.err, $ifaceNil))) { + _tmp = 0; + _tmp$1 = l.err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + if (p.$length === 0) { + _tmp$2 = 0; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + if ((x$4 = (new $Int64(0, p.$length)), x$5 = (x$6 = l.n, new $Int64(x$6.$high + 0, x$6.$low + 1)), (x$4.$high > x$5.$high || (x$4.$high === x$5.$high && x$4.$low > x$5.$low)))) { + p = $subslice(p, 0, $flatten64((x$7 = l.n, new $Int64(x$7.$high + 0, x$7.$low + 1)))); + } + _r$1 = l.r.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + if ((x$8 = (new $Int64(0, n)), x$9 = l.n, (x$8.$high < x$9.$high || (x$8.$high === x$9.$high && x$8.$low <= x$9.$low)))) { + l.n = (x$10 = l.n, x$11 = (new $Int64(0, n)), new $Int64(x$10.$high - x$11.$high, x$10.$low - x$11.$low)); + l.err = err; + _tmp$4 = n; + _tmp$5 = err; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + n = (((x$12 = l.n, x$12.$low + ((x$12.$high >> 31) * 4294967296)) >> 0)); + l.n = new $Int64(0, 0); + _tuple$1 = $assertType(l.w, requestTooLarger, true); + res = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + $r = res.requestTooLarge(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + l.err = errors.New("http: request body too large"); + _tmp$6 = n; + _tmp$7 = l.err; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: maxBytesReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.l = l; $f.n = n; $f.ok = ok; $f.p = p; $f.res = res; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$12 = x$12; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$r = $r; return $f; + }; + maxBytesReader.prototype.Read = function(p) { return this.$val.Read(p); }; + maxBytesReader.ptr.prototype.Close = function() { + var _r$1, l, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; l = $f.l; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + l = this; + _r$1 = l.r.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: maxBytesReader.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.l = l; $f.$s = $s; $f.$r = $r; return $f; + }; + maxBytesReader.prototype.Close = function() { return this.$val.Close(); }; + copyValues = function(dst, src) { + var _entry, _i, _i$1, _keys, _ref, _ref$1, dst, k, src, value, vs; + _ref = src; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vs = _entry.v; + _ref$1 = vs; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + value = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + new url.Values(dst).Add(k, value); + _i$1++; + } + _i++; + } + }; + parsePostForm = function(r) { + var _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, b, ct, e, err, maxFormSize, ok, r, reader, vs, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; b = $f.b; ct = $f.ct; e = $f.e; err = $f.err; maxFormSize = $f.maxFormSize; ok = $f.ok; r = $f.r; reader = $f.reader; vs = $f.vs; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + vs = false; + err = $ifaceNil; + if ($interfaceIsEqual(r.Body, $ifaceNil)) { + err = errors.New("missing form body"); + $s = -1; return [vs, err]; + } + ct = new Header(r.Header).Get("Content-Type"); + if (ct === "") { + ct = "application/octet-stream"; + } + _r$1 = mime.ParseMediaType(ct); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + ct = _tuple[0]; + err = _tuple[2]; + /* */ if (ct === "application/x-www-form-urlencoded") { $s = 3; continue; } + /* */ if (ct === "multipart/form-data") { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (ct === "application/x-www-form-urlencoded") { */ case 3: + reader = r.Body; + maxFormSize = new $Int64(2147483647, 4294967295); + _tuple$1 = $assertType(r.Body, ptrType$88, true); + ok = _tuple$1[1]; + if (!ok) { + maxFormSize = new $Int64(0, 10485760); + reader = io.LimitReader(r.Body, new $Int64(maxFormSize.$high + 0, maxFormSize.$low + 1)); + } + _r$2 = ioutil.ReadAll(reader); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + b = _tuple$2[0]; + e = _tuple$2[1]; + if (!($interfaceIsEqual(e, $ifaceNil))) { + if ($interfaceIsEqual(err, $ifaceNil)) { + err = e; + } + /* break; */ $s = 2; continue; + } + if ((x$4 = (new $Int64(0, b.$length)), (x$4.$high > maxFormSize.$high || (x$4.$high === maxFormSize.$high && x$4.$low > maxFormSize.$low)))) { + err = errors.New("http: POST too large"); + $s = -1; return [vs, err]; + } + _tuple$3 = url.ParseQuery(($bytesToString(b))); + vs = _tuple$3[0]; + e = _tuple$3[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = e; + } + $s = 5; continue; + /* } else if (ct === "multipart/form-data") { */ case 4: + /* } */ case 5: + case 2: + $s = -1; return [vs, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parsePostForm }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.b = b; $f.ct = ct; $f.e = e; $f.err = err; $f.maxFormSize = maxFormSize; $f.ok = ok; $f.r = r; $f.reader = reader; $f.vs = vs; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.ptr.prototype.ParseForm = function() { + var _r$1, _tuple, _tuple$1, e, err, newValues, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; e = $f.e; err = $f.err; newValues = $f.newValues; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + err = $ifaceNil; + /* */ if (r.PostForm === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.PostForm === false) { */ case 1: + /* */ if (r.Method === "POST" || r.Method === "PUT" || r.Method === "PATCH") { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (r.Method === "POST" || r.Method === "PUT" || r.Method === "PATCH") { */ case 3: + _r$1 = parsePostForm(r); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + r.PostForm = _tuple[0]; + err = _tuple[1]; + /* } */ case 4: + if (r.PostForm === false) { + r.PostForm = {}; + } + /* } */ case 2: + if (r.Form === false) { + if ($keys(r.PostForm).length > 0) { + r.Form = {}; + copyValues(r.Form, r.PostForm); + } + newValues = false; + if (!(r.URL === ptrType$19.nil)) { + e = $ifaceNil; + _tuple$1 = url.ParseQuery(r.URL.RawQuery); + newValues = _tuple$1[0]; + e = _tuple$1[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + err = e; + } + } + if (newValues === false) { + newValues = {}; + } + if (r.Form === false) { + r.Form = newValues; + } else { + copyValues(r.Form, newValues); + } + } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.ParseForm }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.e = e; $f.err = err; $f.newValues = newValues; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.ParseForm = function() { return this.$val.ParseForm(); }; + Request.ptr.prototype.ParseMultipartForm = function(maxMemory) { + var _entry, _entry$1, _entry$2, _i, _key, _key$1, _keys, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, err, err$1, f, k, maxMemory, mr, r, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _i = $f._i; _key = $f._key; _key$1 = $f._key$1; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; err$1 = $f.err$1; f = $f.f; k = $f.k; maxMemory = $f.maxMemory; mr = $f.mr; r = $f.r; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (r.MultipartForm === multipartByReader) { + $s = -1; return errors.New("http: multipart handled by MultipartReader"); + } + /* */ if (r.Form === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.Form === false) { */ case 1: + _r$1 = r.ParseForm(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 2: + if (!(r.MultipartForm === ptrType$20.nil)) { + $s = -1; return $ifaceNil; + } + _r$2 = r.multipartReader(false); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + mr = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$3 = mr.ReadForm(maxMemory); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + f = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + if (r.PostForm === false) { + r.PostForm = {}; + } + _ref = f.Value; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + v = _entry.v; + _key = k; (r.Form || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $appendSlice((_entry$1 = r.Form[$String.keyFor(k)], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil), v) }; + _key$1 = k; (r.PostForm || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $appendSlice((_entry$2 = r.PostForm[$String.keyFor(k)], _entry$2 !== undefined ? _entry$2.v : sliceType$1.nil), v) }; + _i++; + } + r.MultipartForm = f; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.ParseMultipartForm }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.err$1 = err$1; $f.f = f; $f.k = k; $f.maxMemory = maxMemory; $f.mr = mr; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.ParseMultipartForm = function(maxMemory) { return this.$val.ParseMultipartForm(maxMemory); }; + Request.ptr.prototype.FormValue = function(key) { + var _entry, _r$1, key, r, vs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; key = $f.key; r = $f.r; vs = $f.vs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (r.Form === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.Form === false) { */ case 1: + _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 2: + vs = (_entry = r.Form[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (vs.$length > 0) { + $s = -1; return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); + } + $s = -1; return ""; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.FormValue }; } $f._entry = _entry; $f._r$1 = _r$1; $f.key = key; $f.r = r; $f.vs = vs; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.FormValue = function(key) { return this.$val.FormValue(key); }; + Request.ptr.prototype.PostFormValue = function(key) { + var _entry, _r$1, key, r, vs, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; key = $f.key; r = $f.r; vs = $f.vs; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (r.PostForm === false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.PostForm === false) { */ case 1: + _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 2: + vs = (_entry = r.PostForm[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (vs.$length > 0) { + $s = -1; return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); + } + $s = -1; return ""; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.PostFormValue }; } $f._entry = _entry; $f._r$1 = _r$1; $f.key = key; $f.r = r; $f.vs = vs; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.PostFormValue = function(key) { return this.$val.PostFormValue(key); }; + Request.ptr.prototype.FormFile = function(key) { + var _entry, _r$1, _r$2, _tuple, err, err$1, f, fhs, key, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; err = $f.err; err$1 = $f.err$1; f = $f.f; fhs = $f.fhs; key = $f.key; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + if (r.MultipartForm === multipartByReader) { + $s = -1; return [$ifaceNil, ptrType$89.nil, errors.New("http: multipart handled by MultipartReader")]; + } + /* */ if (r.MultipartForm === ptrType$20.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.MultipartForm === ptrType$20.nil) { */ case 1: + _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, ptrType$89.nil, err]; + } + /* } */ case 2: + /* */ if (!(r.MultipartForm === ptrType$20.nil) && !(r.MultipartForm.File === false)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(r.MultipartForm === ptrType$20.nil) && !(r.MultipartForm.File === false)) { */ case 4: + fhs = (_entry = r.MultipartForm.File[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$22.nil); + /* */ if (fhs.$length > 0) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (fhs.$length > 0) { */ case 6: + _r$2 = (0 >= fhs.$length ? ($throwRuntimeError("index out of range"), undefined) : fhs.$array[fhs.$offset + 0]).Open(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + f = _tuple[0]; + err$1 = _tuple[1]; + $s = -1; return [f, (0 >= fhs.$length ? ($throwRuntimeError("index out of range"), undefined) : fhs.$array[fhs.$offset + 0]), err$1]; + /* } */ case 7: + /* } */ case 5: + $s = -1; return [$ifaceNil, ptrType$89.nil, $pkg.ErrMissingFile]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.FormFile }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.err = err; $f.err$1 = err$1; $f.f = f; $f.fhs = fhs; $f.key = key; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.FormFile = function(key) { return this.$val.FormFile(key); }; + Request.ptr.prototype.expectsContinue = function() { + var r; + r = this; + return hasToken(new Header(r.Header).get("Expect"), "100-continue"); + }; + Request.prototype.expectsContinue = function() { return this.$val.expectsContinue(); }; + Request.ptr.prototype.wantsHttp10KeepAlive = function() { + var r; + r = this; + if (!((r.ProtoMajor === 1)) || !((r.ProtoMinor === 0))) { + return false; + } + return hasToken(new Header(r.Header).get("Connection"), "keep-alive"); + }; + Request.prototype.wantsHttp10KeepAlive = function() { return this.$val.wantsHttp10KeepAlive(); }; + Request.ptr.prototype.wantsClose = function() { + var r; + r = this; + return hasToken(new Header(r.Header).get("Connection"), "close"); + }; + Request.prototype.wantsClose = function() { return this.$val.wantsClose(); }; + Request.ptr.prototype.closeBody = function() { + var _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (!($interfaceIsEqual(r.Body, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(r.Body, $ifaceNil))) { */ case 1: + _r$1 = r.Body.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Request.ptr.prototype.closeBody }; } $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Request.prototype.closeBody = function() { return this.$val.closeBody(); }; + Request.ptr.prototype.isReplayable = function() { + var _1, r; + r = this; + if ($interfaceIsEqual(r.Body, $ifaceNil) || $interfaceIsEqual(r.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody)) || !(r.GetBody === $throwNilPointerError)) { + _1 = valueOrDefault(r.Method, "GET"); + if (_1 === ("GET") || _1 === ("HEAD") || _1 === ("OPTIONS") || _1 === ("TRACE")) { + return true; + } + } + return false; + }; + Request.prototype.isReplayable = function() { return this.$val.isReplayable(); }; + Request.ptr.prototype.outgoingLength = function() { + var r, x$4; + r = this; + if ($interfaceIsEqual(r.Body, $ifaceNil) || $interfaceIsEqual(r.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { + return new $Int64(0, 0); + } + if (!((x$4 = r.ContentLength, (x$4.$high === 0 && x$4.$low === 0)))) { + return r.ContentLength; + } + return new $Int64(-1, 4294967295); + }; + Request.prototype.outgoingLength = function() { return this.$val.outgoingLength(); }; + requestMethodUsuallyLacksBody = function(method) { + var _1, method; + _1 = method; + if (_1 === ("GET") || _1 === ("HEAD") || _1 === ("DELETE") || _1 === ("OPTIONS") || _1 === ("PROPFIND") || _1 === ("SEARCH")) { + return true; + } + return false; + }; + Response.ptr.prototype.Cookies = function() { + var _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + _r$1 = readSetCookies(r.Header); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Response.ptr.prototype.Cookies }; } $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Response.prototype.Cookies = function() { return this.$val.Cookies(); }; + Response.ptr.prototype.Location = function() { + var _r$1, _r$2, lv, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; lv = $f.lv; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + lv = new Header(r.Header).Get("Location"); + if (lv === "") { + $s = -1; return [ptrType$19.nil, $pkg.ErrNoLocation]; + } + /* */ if (!(r.Request === ptrType$7.nil) && !(r.Request.URL === ptrType$19.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(r.Request === ptrType$7.nil) && !(r.Request.URL === ptrType$19.nil)) { */ case 1: + _r$1 = r.Request.URL.Parse(lv); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + _r$2 = url.Parse(lv); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* */ } return; } if ($f === undefined) { $f = { $blk: Response.ptr.prototype.Location }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.lv = lv; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Response.prototype.Location = function() { return this.$val.Location(); }; + ReadResponse = function(r, req) { + var _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, i$1, line, mimeHeader, ok, r, req, resp, statusCode, tp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; err = $f.err; i = $f.i; i$1 = $f.i$1; line = $f.line; mimeHeader = $f.mimeHeader; ok = $f.ok; r = $f.r; req = $f.req; resp = $f.resp; statusCode = $f.statusCode; tp = $f.tp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + tp = textproto.NewReader(r); + resp = new Response.ptr("", 0, "", 0, 0, false, $ifaceNil, new $Int64(0, 0), sliceType$1.nil, false, false, false, req, ptrType$17.nil); + _r$1 = tp.ReadLine(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + line = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } + $s = -1; return [ptrType$16.nil, err]; + } + i = strings.IndexByte(line, 32); + /* */ if (i === -1) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (i === -1) { */ case 2: + $s = -1; return [ptrType$16.nil, new badStringError.ptr("malformed HTTP response", line)]; + /* } else { */ case 3: + resp.Proto = $substring(line, 0, i); + _r$2 = strings.TrimLeft($substring(line, (i + 1 >> 0)), " "); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + resp.Status = _r$2; + /* } */ case 4: + statusCode = resp.Status; + i$1 = strings.IndexByte(resp.Status, 32); + if (!((i$1 === -1))) { + statusCode = $substring(resp.Status, 0, i$1); + } + if (!((statusCode.length === 3))) { + $s = -1; return [ptrType$16.nil, new badStringError.ptr("malformed HTTP status code", statusCode)]; + } + _tuple$1 = strconv.Atoi(statusCode); + resp.StatusCode = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || resp.StatusCode < 0) { + $s = -1; return [ptrType$16.nil, new badStringError.ptr("malformed HTTP status code", statusCode)]; + } + ok = false; + _tuple$2 = ParseHTTPVersion(resp.Proto); + resp.ProtoMajor = _tuple$2[0]; + resp.ProtoMinor = _tuple$2[1]; + ok = _tuple$2[2]; + if (!ok) { + $s = -1; return [ptrType$16.nil, new badStringError.ptr("malformed HTTP version", resp.Proto)]; + } + _r$3 = tp.ReadMIMEHeader(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + mimeHeader = _tuple$3[0]; + err = _tuple$3[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + err = io.ErrUnexpectedEOF; + } + $s = -1; return [ptrType$16.nil, err]; + } + resp.Header = (mimeHeader); + fixPragmaCacheControl(resp.Header); + _r$4 = readTransfer(resp, r); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err = _r$4; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, err]; + } + $s = -1; return [resp, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ReadResponse }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.err = err; $f.i = i; $f.i$1 = i$1; $f.line = line; $f.mimeHeader = mimeHeader; $f.ok = ok; $f.r = r; $f.req = req; $f.resp = resp; $f.statusCode = statusCode; $f.tp = tp; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.ReadResponse = ReadResponse; + fixPragmaCacheControl = function(header) { + var _entry, _entry$1, _key, _tuple, _tuple$1, header, hp, ok, presentcc; + _tuple = (_entry = header[$String.keyFor("Pragma")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + hp = _tuple[0]; + ok = _tuple[1]; + if (ok && hp.$length > 0 && (0 >= hp.$length ? ($throwRuntimeError("index out of range"), undefined) : hp.$array[hp.$offset + 0]) === "no-cache") { + _tuple$1 = (_entry$1 = header[$String.keyFor("Cache-Control")], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$1.nil, false]); + presentcc = _tuple$1[1]; + if (!presentcc) { + _key = "Cache-Control"; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$1(["no-cache"]) }; + } + } + }; + Response.ptr.prototype.ProtoAtLeast = function(major, minor) { + var major, minor, r; + r = this; + return r.ProtoMajor > major || (r.ProtoMajor === major) && r.ProtoMinor >= minor; + }; + Response.prototype.ProtoAtLeast = function(major, minor) { return this.$val.ProtoAtLeast(major, minor); }; + Response.ptr.prototype.Write = function(w) { + var _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, contentLengthAlreadySent, err, err$1, err$2, err$3, err$4, n, ok, r, r1, text, tw, w, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; buf = $f.buf; contentLengthAlreadySent = $f.contentLengthAlreadySent; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; n = $f.n; ok = $f.ok; r = $f.r; r1 = $f.r1; text = $f.text; tw = $f.tw; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + text = r.Status; + if (text === "") { + ok = false; + _tuple = (_entry = statusText[$Int.keyFor(r.StatusCode)], _entry !== undefined ? [_entry.v, true] : ["", false]); + text = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + text = "status code " + strconv.Itoa(r.StatusCode); + } + } else { + text = strings.TrimPrefix(text, strconv.Itoa(r.StatusCode) + " "); + } + _r$1 = fmt.Fprintf(w, "HTTP/%d.%d %03d %s\r\n", new sliceType([new $Int(r.ProtoMajor), new $Int(r.ProtoMinor), new $Int(r.StatusCode), new $String(text)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + r1 = new Response.ptr("", 0, "", 0, 0, false, $ifaceNil, new $Int64(0, 0), sliceType$1.nil, false, false, false, ptrType$7.nil, ptrType$17.nil); + Response.copy(r1, r); + /* */ if ((x$4 = r1.ContentLength, (x$4.$high === 0 && x$4.$low === 0)) && !($interfaceIsEqual(r1.Body, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ((x$4 = r1.ContentLength, (x$4.$high === 0 && x$4.$low === 0)) && !($interfaceIsEqual(r1.Body, $ifaceNil))) { */ case 2: + buf = arrayType$6.zero(); + _r$2 = r1.Body.Read(new sliceType$3(buf)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + n = _tuple$2[0]; + err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, io.EOF))) { + $s = -1; return err$1; + } + if (n === 0) { + r1.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + } else { + r1.ContentLength = new $Int64(-1, 4294967295); + r1.Body = (x$5 = new structType$1.ptr(io.MultiReader(new sliceType$23([bytes.NewReader($subslice(new sliceType$3(buf), 0, 1)), r.Body])), r.Body), new x$5.constructor.elem(x$5)); + } + /* } */ case 3: + if ((x$6 = r1.ContentLength, (x$6.$high === -1 && x$6.$low === 4294967295)) && !r1.Close && r1.ProtoAtLeast(1, 1) && !chunked(r1.TransferEncoding) && !r1.Uncompressed) { + r1.Close = true; + } + _r$3 = newTransferWriter(r1); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + tw = _tuple$3[0]; + err$2 = _tuple$3[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + _r$4 = tw.writeHeader(w, ptrType$49.nil); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + err$2 = _r$4; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + _r$5 = new Header(r.Header).WriteSubset(w, respExcludeHeader); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err$2 = _r$5; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + contentLengthAlreadySent = tw.shouldSendContentLength(); + /* */ if ((x$7 = r1.ContentLength, (x$7.$high === 0 && x$7.$low === 0)) && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ((x$7 = r1.ContentLength, (x$7.$high === 0 && x$7.$low === 0)) && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode)) { */ case 8: + _r$6 = io.WriteString(w, "Content-Length: 0\r\n"); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + err$3 = _tuple$4[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* } */ case 9: + _r$7 = io.WriteString(w, "\r\n"); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$5 = _r$7; + err$4 = _tuple$5[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + _r$8 = tw.writeBody(w); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err$2 = _r$8; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: Response.ptr.prototype.Write }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.buf = buf; $f.contentLengthAlreadySent = contentLengthAlreadySent; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.n = n; $f.ok = ok; $f.r = r; $f.r1 = r1; $f.text = text; $f.tw = tw; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + Response.prototype.Write = function(w) { return this.$val.Write(w); }; + Response.ptr.prototype.closeBody = function() { + var _r$1, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + r = this; + /* */ if (!($interfaceIsEqual(r.Body, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(r.Body, $ifaceNil))) { */ case 1: + _r$1 = r.Body.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Response.ptr.prototype.closeBody }; } $f._r$1 = _r$1; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + Response.prototype.closeBody = function() { return this.$val.closeBody(); }; + Transport.ptr.prototype.RoundTrip = function(req) { + var _r$1, req, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; req = $f.req; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = t.roundTrip(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.RoundTrip }; } $f._r$1 = _r$1; $f.req = req; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; + conn.ptr.prototype.hijacked = function() { + var c, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; c = $f.c; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = this; + $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.mu, "Unlock"), []]); + $s = -1; return c.hijackedv; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: conn.ptr.prototype.hijacked }; } $f.c = c; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + conn.prototype.hijacked = function() { return this.$val.hijacked(); }; + conn.ptr.prototype.hijackLocked = function() { + var _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, c, err, err$1, rwc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; buf = $f.buf; c = $f.c; err = $f.err; err$1 = $f.err$1; rwc = $f.rwc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rwc = $ifaceNil; + buf = ptrType$90.nil; + err = $ifaceNil; + c = this; + if (c.hijackedv) { + _tmp = $ifaceNil; + _tmp$1 = ptrType$90.nil; + _tmp$2 = $pkg.ErrHijacked; + rwc = _tmp; + buf = _tmp$1; + err = _tmp$2; + $s = -1; return [rwc, buf, err]; + } + $r = c.r.abortPendingRead(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + c.hijackedv = true; + rwc = c.rwc; + _r$1 = rwc.SetDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + buf = bufio.NewReadWriter(c.bufr, bufio.NewWriter(rwc)); + /* */ if (c.r.hasByte) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (c.r.hasByte) { */ case 3: + _r$2 = c.bufr.Peek(c.bufr.Buffered() + 1 >> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + err$1 = _tuple[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 6: + _tmp$3 = $ifaceNil; + _tmp$4 = ptrType$90.nil; + _r$3 = fmt.Errorf("unexpected Peek failure reading buffered byte: %v", new sliceType([err$1])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tmp$5 = _r$3; + rwc = _tmp$3; + buf = _tmp$4; + err = _tmp$5; + $s = -1; return [rwc, buf, err]; + /* } */ case 7: + /* } */ case 4: + $r = c.setState(rwc, 3); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [rwc, buf, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.hijackLocked }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.buf = buf; $f.c = c; $f.err = err; $f.err$1 = err$1; $f.rwc = rwc; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.hijackLocked = function() { return this.$val.hijackLocked(); }; + chunkWriter.ptr.prototype.Write = function(p) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, cw, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; cw = $f.cw; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + cw = this; + /* */ if (!cw.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!cw.wroteHeader) { */ case 1: + $r = cw.writeHeader(p); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + if (cw.res.req.Method === "HEAD") { + _tmp = p.$length; + _tmp$1 = $ifaceNil; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* */ if (cw.chunking) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (cw.chunking) { */ case 4: + _r$1 = fmt.Fprintf(cw.res.conn.bufw, "%x\r\n", new sliceType([new $Int(p.$length)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: + _r$2 = cw.res.conn.rwc.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return [n, err]; + /* } */ case 8: + /* } */ case 5: + _r$3 = cw.res.conn.bufw.Write(p); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + n = _tuple$1[0]; + err = _tuple$1[1]; + /* */ if (cw.chunking && $interfaceIsEqual(err, $ifaceNil)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (cw.chunking && $interfaceIsEqual(err, $ifaceNil)) { */ case 11: + _r$4 = cw.res.conn.bufw.Write(crlf); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + err = _tuple$2[1]; + /* } */ case 12: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: + _r$5 = cw.res.conn.rwc.Close(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 15: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.cw = cw; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + chunkWriter.ptr.prototype.flush = function() { + var _r$1, cw, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cw = $f.cw; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cw = this; + /* */ if (!cw.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!cw.wroteHeader) { */ case 1: + $r = cw.writeHeader(sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = cw.res.conn.bufw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkWriter.ptr.prototype.flush }; } $f._r$1 = _r$1; $f.cw = cw; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkWriter.prototype.flush = function() { return this.$val.flush(); }; + chunkWriter.ptr.prototype.close = function() { + var _r$1, _r$2, _r$3, bw, cw, trailers, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; bw = $f.bw; cw = $f.cw; trailers = $f.trailers; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cw = this; + /* */ if (!cw.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!cw.wroteHeader) { */ case 1: + $r = cw.writeHeader(sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + /* */ if (cw.chunking) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (cw.chunking) { */ case 4: + bw = cw.res.conn.bufw; + _r$1 = bw.WriteString("0\r\n"); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + trailers = cw.res.finalTrailers(); + /* */ if (!(trailers === false)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(trailers === false)) { */ case 7: + _r$2 = new Header(trailers).Write(bw); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 8: + _r$3 = bw.WriteString("\r\n"); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkWriter.ptr.prototype.close }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.bw = bw; $f.cw = cw; $f.trailers = trailers; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkWriter.prototype.close = function() { return this.$val.close(); }; + response.ptr.prototype.finalTrailers = function() { + var _entry, _entry$1, _i, _i$1, _i$2, _key, _keys, _ref, _ref$1, _ref$2, k, k$1, t, v, vv, w; + w = this; + t = false; + _ref = w.handlerHeader; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + if (strings.HasPrefix(k, "Trailer:")) { + if (t === false) { + t = {}; + } + _key = strings.TrimPrefix(k, "Trailer:"); (t || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + } + _i++; + } + _ref$1 = w.trailers; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + k$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (t === false) { + t = {}; + } + _ref$2 = (_entry$1 = w.handlerHeader[$String.keyFor(k$1)], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + v = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + new Header(t).Add(k$1, v); + _i$2++; + } + _i$1++; + } + return t; + }; + response.prototype.finalTrailers = function() { return this.$val.finalTrailers(); }; + $ptrType(atomicBool).prototype.isSet = function() { + var _ptr, b; + b = this; + return !((atomic.LoadInt32(((_ptr = b, new ptrType$91(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target)))) === 0)); + }; + $ptrType(atomicBool).prototype.setTrue = function() { + var _ptr, b; + b = this; + atomic.StoreInt32(((_ptr = b, new ptrType$91(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))), 1); + }; + response.ptr.prototype.declareTrailer = function(k) { + var k, w; + w = this; + k = CanonicalHeaderKey(k); + if (!httpguts.ValidTrailerHeader(k)) { + return; + } + w.trailers = $append(w.trailers, k); + }; + response.prototype.declareTrailer = function(k) { return this.$val.declareTrailer(k); }; + response.ptr.prototype.requestTooLarge = function() { + var w; + w = this; + w.closeAfterReply = true; + w.requestBodyLimitHit = true; + if (!w.wroteHeader) { + new Header(w.Header()).Set("Connection", "close"); + } + }; + response.prototype.requestTooLarge = function() { return this.$val.requestTooLarge(); }; + response.ptr.prototype.needsSniff = function() { + var _entry, _tuple, haveType, w, x$4; + w = this; + _tuple = (_entry = w.handlerHeader[$String.keyFor("Content-Type")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + haveType = _tuple[1]; + return !w.cw.wroteHeader && !haveType && (x$4 = w.written, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low < 512))); + }; + response.prototype.needsSniff = function() { return this.$val.needsSniff(); }; + srcIsRegularFile = function(src) { + var _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, err$1, fi, isRegular, src, v, v$1, v$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; err$1 = $f.err$1; fi = $f.fi; isRegular = $f.isRegular; src = $f.src; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + isRegular = false; + err = $ifaceNil; + _ref = src; + /* */ if ($assertType(_ref, ptrType$92, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$93, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$92, true)[1]) { */ case 1: + v = _ref.$val; + _r$1 = v.Stat(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + fi = _tuple[0]; + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = false; + _tmp$1 = err$1; + isRegular = _tmp; + err = _tmp$1; + $s = -1; return [isRegular, err]; + } + _r$2 = fi.Mode(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = new os.FileMode(_r$2).IsRegular(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tmp$2 = _r$3; + _tmp$3 = $ifaceNil; + isRegular = _tmp$2; + err = _tmp$3; + $s = -1; return [isRegular, err]; + /* } else if ($assertType(_ref, ptrType$93, true)[1]) { */ case 2: + v$1 = _ref.$val; + _r$4 = srcIsRegularFile(v$1.R); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + isRegular = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [isRegular, err]; + /* } else { */ case 3: + v$2 = _ref; + $s = -1; return [isRegular, err]; + /* } */ case 4: + $s = -1; return [isRegular, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: srcIsRegularFile }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.err$1 = err$1; $f.fi = fi; $f.isRegular = isRegular; $f.src = src; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.$s = $s; $f.$r = $r; return $f; + }; + response.ptr.prototype.ReadFrom = function(src) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, bufp, err, err$1, err$2, n, n0, n0$1, n0$2, ok, regFile, rf, src, w, x$10, x$11, x$4, x$5, x$6, x$7, x$8, x$9, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; bufp = $f.bufp; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; n = $f.n; n0 = $f.n0; n0$1 = $f.n0$1; n0$2 = $f.n0$2; ok = $f.ok; regFile = $f.regFile; rf = $f.rf; src = $f.src; w = $f.w; x$10 = $f.x$10; x$11 = $f.x$11; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; x$9 = $f.x$9; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = new $Int64(0, 0); + err = $ifaceNil; + w = this; + _tuple = $assertType(w.conn.rwc, io.ReaderFrom, true); + rf = _tuple[0]; + ok = _tuple[1]; + _r$1 = srcIsRegularFile(src); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + regFile = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = new $Int64(0, 0); + _tmp$1 = err; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* */ if (!ok || !regFile) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!ok || !regFile) { */ case 2: + _r$2 = copyBufPool.Get(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + bufp = $assertType(_r$2, ptrType$4); + $deferred.push([$methodVal(copyBufPool, "Put"), [bufp]]); + _r$3 = io.CopyBuffer((x$4 = new writerOnly.ptr(w), new x$4.constructor.elem(x$4)), src, bufp.$get()); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + n = _tuple$2[0]; + err = _tuple$2[1]; + $s = -1; return [n, err]; + /* } */ case 3: + /* */ if (!w.wroteHeader) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!w.wroteHeader) { */ case 6: + $r = w.WriteHeader(200); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + /* */ if (w.needsSniff()) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (w.needsSniff()) { */ case 9: + _r$4 = io.Copy((x$5 = new writerOnly.ptr(w), new x$5.constructor.elem(x$5)), io.LimitReader(src, new $Int64(0, 512))); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + n0 = _tuple$3[0]; + err$1 = _tuple$3[1]; + n = (x$6 = n0, new $Int64(n.$high + x$6.$high, n.$low + x$6.$low)); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$2 = n; + _tmp$3 = err$1; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + /* } */ case 10: + _r$5 = w.w.Flush(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $r = w.cw.flush(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!w.cw.chunking && w.bodyAllowed()) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!w.cw.chunking && w.bodyAllowed()) { */ case 14: + _r$6 = rf.ReadFrom(src); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + n0$1 = _tuple$4[0]; + err$2 = _tuple$4[1]; + n = (x$7 = n0$1, new $Int64(n.$high + x$7.$high, n.$low + x$7.$low)); + w.written = (x$8 = w.written, x$9 = n0$1, new $Int64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)); + _tmp$4 = n; + _tmp$5 = err$2; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* } */ case 15: + _r$7 = io.Copy((x$10 = new writerOnly.ptr(w), new x$10.constructor.elem(x$10)), src); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$5 = _r$7; + n0$2 = _tuple$5[0]; + err = _tuple$5[1]; + n = (x$11 = n0$2, new $Int64(n.$high + x$11.$high, n.$low + x$11.$low)); + _tmp$6 = n; + _tmp$7 = err; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: response.ptr.prototype.ReadFrom }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.bufp = bufp; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.n = n; $f.n0 = n0; $f.n0$1 = n0$1; $f.n0$2 = n0$2; $f.ok = ok; $f.regFile = regFile; $f.rf = rf; $f.src = src; $f.w = w; $f.x$10 = x$10; $f.x$11 = x$11; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.x$9 = x$9; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + response.prototype.ReadFrom = function(src) { return this.$val.ReadFrom(src); }; + Server.ptr.prototype.newConn = function(rwc) { + var _r$1, c, rwc, srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; rwc = $f.rwc; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + c = new conn.ptr(srv, $throwNilPointerError, rwc, "", ptrType$17.nil, $ifaceNil, ptrType$94.nil, ptrType$73.nil, ptrType$10.nil, "", new atomic.Value.ptr($ifaceNil), new structType$2.ptr(new $Uint64(0, 0)), new sync.Mutex.ptr(0, 0), false); + /* */ if (false) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (false) { */ case 1: + _r$1 = newLoggingConn("server", c.rwc); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + c.rwc = _r$1; + /* } */ case 2: + $s = -1; return c; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.newConn }; } $f._r$1 = _r$1; $f.c = c; $f.rwc = rwc; $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.newConn = function(rwc) { return this.$val.newConn(rwc); }; + connReader.ptr.prototype.lock = function() { + var cr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cr = $f.cr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + $r = cr.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (cr.cond === ptrType$72.nil) { + cr.cond = sync.NewCond(cr.mu); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.lock }; } $f.cr = cr; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.lock = function() { return this.$val.lock(); }; + connReader.ptr.prototype.unlock = function() { + var cr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cr = $f.cr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + $r = cr.mu.Unlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.unlock }; } $f.cr = cr; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.unlock = function() { return this.$val.unlock(); }; + connReader.ptr.prototype.startBackgroundRead = function() { + var _r$1, cr, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cr = $f.cr; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cr = this; + $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cr, "unlock"), []]); + if (cr.inRead) { + $panic(new $String("invalid concurrent Body.Read call")); + } + if (cr.hasByte) { + $s = -1; return; + } + cr.inRead = true; + _r$1 = cr.conn.rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $go($methodVal(cr, "backgroundRead"), []); + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.startBackgroundRead }; } $f._r$1 = _r$1; $f.cr = cr; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + connReader.prototype.startBackgroundRead = function() { return this.$val.startBackgroundRead(); }; + connReader.ptr.prototype.backgroundRead = function() { + var _r$1, _r$2, _tuple, _tuple$1, _v, cr, err, n, ne, ok, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; cr = $f.cr; err = $f.err; n = $f.n; ne = $f.ne; ok = $f.ok; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + _r$1 = cr.conn.rwc.Read(new sliceType$3(cr.byteBuf)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $r = cr.lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (n === 1) { + cr.hasByte = true; + } + _tuple$1 = $assertType(err, net.Error, true); + ne = _tuple$1[0]; + ok = _tuple$1[1]; + if (!(ok && cr.aborted)) { _v = false; $s = 6; continue s; } + _r$2 = ne.Timeout(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _v = _r$2; case 6: + /* */ if (_v) { $s = 3; continue; } + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_v) { */ case 3: + $s = 5; continue; + /* } else if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + $r = cr.handleReadError(err); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + cr.aborted = false; + cr.inRead = false; + $r = cr.unlock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cr.cond.Broadcast(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.backgroundRead }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.cr = cr; $f.err = err; $f.n = n; $f.ne = ne; $f.ok = ok; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.backgroundRead = function() { return this.$val.backgroundRead(); }; + connReader.ptr.prototype.abortPendingRead = function() { + var _r$1, _r$2, cr, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; cr = $f.cr; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + cr = this; + $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(cr, "unlock"), []]); + if (!cr.inRead) { + $s = -1; return; + } + cr.aborted = true; + _r$1 = cr.conn.rwc.SetReadDeadline($clone(aLongTimeAgo, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* while (true) { */ case 3: + /* if (!(cr.inRead)) { break; } */ if(!(cr.inRead)) { $s = 4; continue; } + $r = cr.cond.Wait(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 3; continue; case 4: + _r$2 = cr.conn.rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.abortPendingRead }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.cr = cr; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + connReader.prototype.abortPendingRead = function() { return this.$val.abortPendingRead(); }; + connReader.ptr.prototype.setReadLimit = function(remain) { + var cr, remain; + cr = this; + cr.remain = remain; + }; + connReader.prototype.setReadLimit = function(remain) { return this.$val.setReadLimit(remain); }; + connReader.ptr.prototype.setInfiniteReadLimit = function() { + var cr; + cr = this; + cr.remain = new $Int64(2147483647, 4294967295); + }; + connReader.prototype.setInfiniteReadLimit = function() { return this.$val.setInfiniteReadLimit(); }; + connReader.ptr.prototype.hitReadLimit = function() { + var cr, x$4; + cr = this; + return (x$4 = cr.remain, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low <= 0))); + }; + connReader.prototype.hitReadLimit = function() { return this.$val.hitReadLimit(); }; + connReader.ptr.prototype.handleReadError = function(param) { + var cr, param, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; cr = $f.cr; param = $f.param; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + $r = cr.conn.cancelCtx(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cr.closeNotify(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.handleReadError }; } $f.cr = cr; $f.param = param; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.handleReadError = function(param) { return this.$val.handleReadError(param); }; + connReader.ptr.prototype.closeNotify = function() { + var _tuple, cr, res, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; cr = $f.cr; res = $f.res; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cr = this; + _tuple = $assertType(cr.conn.curReq.Load(), ptrType$95, true); + res = _tuple[0]; + /* */ if (!(res === ptrType$95.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(res === ptrType$95.nil)) { */ case 1: + /* */ if (atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$91(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$91(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { */ case 3: + $r = $send(res.closeNotifyCh, true); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.closeNotify }; } $f._tuple = _tuple; $f.cr = cr; $f.res = res; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.closeNotify = function() { return this.$val.closeNotify(); }; + connReader.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, cr, err, n, p, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; cr = $f.cr; err = $f.err; n = $f.n; p = $f.p; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + cr = this; + $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (cr.inRead) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (cr.inRead) { */ case 2: + $r = cr.unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = cr.conn.hijacked(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_r$1) { */ case 5: + $panic(new $String("invalid Body.Read call. After hijacked, the original Request must not be used")); + /* } */ case 6: + $panic(new $String("invalid concurrent Body.Read call")); + /* } */ case 3: + /* */ if (cr.hitReadLimit()) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (cr.hitReadLimit()) { */ case 8: + $r = cr.unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = 0; + _tmp$1 = io.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* } */ case 9: + /* */ if (p.$length === 0) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (p.$length === 0) { */ case 11: + $r = cr.unlock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$2 = 0; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* } */ case 12: + if ((x$4 = (new $Int64(0, p.$length)), x$5 = cr.remain, (x$4.$high > x$5.$high || (x$4.$high === x$5.$high && x$4.$low > x$5.$low)))) { + p = $subslice(p, 0, $flatten64(cr.remain)); + } + /* */ if (cr.hasByte) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (cr.hasByte) { */ case 14: + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = cr.byteBuf[0]); + cr.hasByte = false; + $r = cr.unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$4 = 1; + _tmp$5 = $ifaceNil; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + /* } */ case 15: + cr.inRead = true; + $r = cr.unlock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = cr.conn.rwc.Read(p); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err = _tuple[1]; + $r = cr.lock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cr.inRead = false; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 20: + $r = cr.handleReadError(err); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 21: + cr.remain = (x$6 = cr.remain, x$7 = (new $Int64(0, n)), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)); + $r = cr.unlock(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = cr.cond.Broadcast(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = n; + _tmp$7 = err; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: connReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f.cr = cr; $f.err = err; $f.n = n; $f.p = p; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + connReader.prototype.Read = function(p) { return this.$val.Read(p); }; + bufioWriterPool = function(size) { + var _1, size; + _1 = size; + if (_1 === (2048)) { + return bufioWriter2kPool; + } else if (_1 === (4096)) { + return bufioWriter4kPool; + } + return ptrType$96.nil; + }; + newBufioReader = function(r) { + var _r$1, br, r, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; br = $f.br; r = $f.r; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = bufioReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + if (!($interfaceIsEqual(v, $ifaceNil))) { + br = $assertType(v, ptrType$73); + br.Reset(r); + $s = -1; return br; + } + $s = -1; return bufio.NewReader(r); + /* */ } return; } if ($f === undefined) { $f = { $blk: newBufioReader }; } $f._r$1 = _r$1; $f.br = br; $f.r = r; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + putBufioReader = function(br) { + var br; + br.Reset($ifaceNil); + bufioReaderPool.Put(br); + }; + newBufioWriterSize = function(w, size) { + var _r$1, bw, pool, size, v, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; bw = $f.bw; pool = $f.pool; size = $f.size; v = $f.v; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pool = bufioWriterPool(size); + /* */ if (!(pool === ptrType$96.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(pool === ptrType$96.nil)) { */ case 1: + _r$1 = pool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + v = _r$1; + if (!($interfaceIsEqual(v, $ifaceNil))) { + bw = $assertType(v, ptrType$10); + bw.Reset(w); + $s = -1; return bw; + } + /* } */ case 2: + $s = -1; return bufio.NewWriterSize(w, size); + /* */ } return; } if ($f === undefined) { $f = { $blk: newBufioWriterSize }; } $f._r$1 = _r$1; $f.bw = bw; $f.pool = pool; $f.size = size; $f.v = v; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + putBufioWriter = function(bw) { + var bw, pool; + bw.Reset($ifaceNil); + pool = bufioWriterPool(bw.Available()); + if (!(pool === ptrType$96.nil)) { + pool.Put(bw); + } + }; + Server.ptr.prototype.maxHeaderBytes = function() { + var srv; + srv = this; + if (srv.MaxHeaderBytes > 0) { + return srv.MaxHeaderBytes; + } + return 1048576; + }; + Server.prototype.maxHeaderBytes = function() { return this.$val.maxHeaderBytes(); }; + Server.ptr.prototype.initialReadLimitSize = function() { + var srv, x$4; + srv = this; + return (x$4 = (new $Int64(0, srv.maxHeaderBytes())), new $Int64(x$4.$high + 0, x$4.$low + 4096)); + }; + Server.prototype.initialReadLimitSize = function() { return this.$val.initialReadLimitSize(); }; + expectContinueReader.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _v, ecr, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _v = $f._v; ecr = $f.ecr; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + ecr = this; + if (ecr.closed) { + _tmp = 0; + _tmp$1 = $pkg.ErrBodyReadAfterClose; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + if (!(!ecr.resp.wroteContinue)) { _v = false; $s = 3; continue s; } + _r$1 = ecr.resp.conn.hijacked(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = !_r$1; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + ecr.resp.wroteContinue = true; + _r$2 = ecr.resp.conn.bufw.WriteString("HTTP/1.1 100 Continue\r\n\r\n"); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = ecr.resp.conn.bufw.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 2: + _r$4 = ecr.readCloser.Read(p); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, io.EOF)) { + ecr.sawEOF = true; + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: expectContinueReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._v = _v; $f.ecr = ecr; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + expectContinueReader.prototype.Read = function(p) { return this.$val.Read(p); }; + expectContinueReader.ptr.prototype.Close = function() { + var _r$1, ecr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; ecr = $f.ecr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ecr = this; + ecr.closed = true; + _r$1 = ecr.readCloser.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: expectContinueReader.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.ecr = ecr; $f.$s = $s; $f.$r = $r; return $f; + }; + expectContinueReader.prototype.Close = function() { return this.$val.Close(); }; + appendTime = function(b, t) { + var _q, _q$1, _q$2, _q$3, _q$4, _q$5, _q$6, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, day, dd, hh, mm, mn, mon, ss, t, yy, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; _q$4 = $f._q$4; _q$5 = $f._q$5; _q$6 = $f._q$6; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; day = $f.day; dd = $f.dd; hh = $f.hh; mm = $f.mm; mn = $f.mn; mon = $f.mon; ss = $f.ss; t = $f.t; yy = $f.yy; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + time.Time.copy(t, $clone(t, time.Time).UTC()); + _r$1 = $clone(t, time.Time).Date(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + yy = _tuple[0]; + mm = _tuple[1]; + dd = _tuple[2]; + _r$2 = $clone(t, time.Time).Clock(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + hh = _tuple$1[0]; + mn = _tuple$1[1]; + ss = _tuple$1[2]; + _r$3 = $clone(t, time.Time).Weekday(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + day = $substring("SunMonTueWedThuFriSat", ($imul(3, _r$3))); + mon = $substring("JanFebMarAprMayJunJulAugSepOctNovDec", ($imul(3, ((mm - 1 >> 0))))); + $s = -1; return $append(b, day.charCodeAt(0), day.charCodeAt(1), day.charCodeAt(2), 44, 32, (((48 + (_q = dd / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$4 = dd % 10, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, mon.charCodeAt(0), mon.charCodeAt(1), mon.charCodeAt(2), 32, (((48 + (_q$1 = yy / 1000, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$5 = ((_q$2 = yy / 100, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$6 = ((_q$3 = yy / 10, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$7 = yy % 10, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, (((48 + (_q$4 = hh / 10, (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$8 = hh % 10, _r$8 === _r$8 ? _r$8 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 58, (((48 + (_q$5 = mn / 10, (_q$5 === _q$5 && _q$5 !== 1/0 && _q$5 !== -1/0) ? _q$5 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$9 = mn % 10, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 58, (((48 + (_q$6 = ss / 10, (_q$6 === _q$6 && _q$6 !== 1/0 && _q$6 !== -1/0) ? _q$6 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$10 = ss % 10, _r$10 === _r$10 ? _r$10 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, 71, 77, 84); + /* */ } return; } if ($f === undefined) { $f = { $blk: appendTime }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f._q$4 = _q$4; $f._q$5 = _q$5; $f._q$6 = _q$6; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.day = day; $f.dd = dd; $f.hh = hh; $f.mm = mm; $f.mn = mn; $f.mon = mon; $f.ss = ss; $f.t = t; $f.yy = yy; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.ptr.prototype.readRequest = function(ctx) { + var _entry, _entry$1, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, body$1, c, cancelCtx, ctx, d, d$1, d$2, err, haveHost, hdrDeadline, hosts, isH2Upgrade, k, ok, peek, req, t0, v, vv, w, wholeReqDeadline, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _ref = $f._ref; _ref$1 = $f._ref$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; body$1 = $f.body$1; c = $f.c; cancelCtx = $f.cancelCtx; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; d$2 = $f.d$2; err = $f.err; haveHost = $f.haveHost; hdrDeadline = $f.hdrDeadline; hosts = $f.hosts; isH2Upgrade = $f.isH2Upgrade; k = $f.k; ok = $f.ok; peek = $f.peek; req = $f.req; t0 = $f.t0; v = $f.v; vv = $f.vv; w = $f.w; wholeReqDeadline = $f.wholeReqDeadline; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = [c]; + d = [d]; + w = ptrType$95.nil; + err = $ifaceNil; + c[0] = this; + _r$1 = c[0].hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$1) { */ case 1: + _tmp = ptrType$95.nil; + _tmp$1 = $pkg.ErrHijacked; + w = _tmp; + err = _tmp$1; + $s = -1; return [w, err]; + /* } */ case 2: + wholeReqDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + hdrDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + t0 = $clone(time.Now(), time.Time); + d$1 = c[0].server.readHeaderTimeout(); + if (!((d$1.$high === 0 && d$1.$low === 0))) { + time.Time.copy(hdrDeadline, $clone(t0, time.Time).Add(d$1)); + } + d$2 = c[0].server.ReadTimeout; + if (!((d$2.$high === 0 && d$2.$low === 0))) { + time.Time.copy(wholeReqDeadline, $clone(t0, time.Time).Add(d$2)); + } + _r$2 = c[0].rwc.SetReadDeadline($clone(hdrDeadline, time.Time)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + d[0] = c[0].server.WriteTimeout; + /* */ if (!((d[0].$high === 0 && d[0].$low === 0))) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!((d[0].$high === 0 && d[0].$low === 0))) { */ case 5: + $deferred.push([(function(c, d) { return function $b() { + var _r$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$3 = $f._r$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$3 = c[0].rwc.SetWriteDeadline($clone($clone(time.Now(), time.Time).Add(d[0]), time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$3 = _r$3; $f.$s = $s; $f.$r = $r; return $f; + }; })(c, d), []]); + /* } */ case 6: + c[0].r.setReadLimit(c[0].server.initialReadLimitSize()); + /* */ if (c[0].lastMethod === "POST") { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (c[0].lastMethod === "POST") { */ case 7: + _r$3 = c[0].bufr.Peek(4); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + peek = _tuple[0]; + _r$4 = c[0].bufr.Discard(numLeadingCRorLF(peek)); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 8: + _r$5 = readRequest(c[0].bufr, false); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$1 = _r$5; + req = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if (c[0].r.hitReadLimit()) { + _tmp$2 = ptrType$95.nil; + _tmp$3 = errTooLarge; + w = _tmp$2; + err = _tmp$3; + $s = -1; return [w, err]; + } + _tmp$4 = ptrType$95.nil; + _tmp$5 = err; + w = _tmp$4; + err = _tmp$5; + $s = -1; return [w, err]; + } + if (!http1ServerSupportsRequest(req)) { + _tmp$6 = ptrType$95.nil; + _tmp$7 = new badRequestError("unsupported protocol version"); + w = _tmp$6; + err = _tmp$7; + $s = -1; return [w, err]; + } + c[0].lastMethod = req.Method; + c[0].r.setInfiniteReadLimit(); + _tuple$2 = (_entry = req.Header[$String.keyFor("Host")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + hosts = _tuple$2[0]; + haveHost = _tuple$2[1]; + isH2Upgrade = req.isH2Upgrade(); + if (req.ProtoAtLeast(1, 1) && (!haveHost || (hosts.$length === 0)) && !isH2Upgrade && !(req.Method === "CONNECT")) { + _tmp$8 = ptrType$95.nil; + _tmp$9 = new badRequestError("missing required Host header"); + w = _tmp$8; + err = _tmp$9; + $s = -1; return [w, err]; + } + if (hosts.$length > 1) { + _tmp$10 = ptrType$95.nil; + _tmp$11 = new badRequestError("too many Host headers"); + w = _tmp$10; + err = _tmp$11; + $s = -1; return [w, err]; + } + if ((hosts.$length === 1) && !httpguts.ValidHostHeader((0 >= hosts.$length ? ($throwRuntimeError("index out of range"), undefined) : hosts.$array[hosts.$offset + 0]))) { + _tmp$12 = ptrType$95.nil; + _tmp$13 = new badRequestError("malformed Host header"); + w = _tmp$12; + err = _tmp$13; + $s = -1; return [w, err]; + } + _ref = req.Header; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry$1 = _ref[_keys[_i]]; + if (_entry$1 === undefined) { + _i++; + continue; + } + k = _entry$1.k; + vv = _entry$1.v; + if (!httpguts.ValidHeaderFieldName(k)) { + _tmp$14 = ptrType$95.nil; + _tmp$15 = new badRequestError("invalid header name"); + w = _tmp$14; + err = _tmp$15; + $s = -1; return [w, err]; + } + _ref$1 = vv; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (!httpguts.ValidHeaderFieldValue(v)) { + _tmp$16 = ptrType$95.nil; + _tmp$17 = new badRequestError("invalid header value"); + w = _tmp$16; + err = _tmp$17; + $s = -1; return [w, err]; + } + _i$1++; + } + _i++; + } + delete req.Header[$String.keyFor("Host")]; + _r$6 = context.WithCancel(ctx); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$3 = _r$6; + ctx = _tuple$3[0]; + cancelCtx = _tuple$3[1]; + req.ctx = ctx; + req.RemoteAddr = c[0].remoteAddr; + req.TLS = c[0].tlsState; + _tuple$4 = $assertType(req.Body, ptrType$97, true); + body$1 = _tuple$4[0]; + ok = _tuple$4[1]; + if (ok) { + body$1.doEarlyClose = true; + } + /* */ if (!$clone(hdrDeadline, time.Time).Equal($clone(wholeReqDeadline, time.Time))) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!$clone(hdrDeadline, time.Time).Equal($clone(wholeReqDeadline, time.Time))) { */ case 13: + _r$7 = c[0].rwc.SetReadDeadline($clone(wholeReqDeadline, time.Time)); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + /* } */ case 14: + w = new response.ptr(c[0], req, req.Body, cancelCtx, false, false, req.wantsHttp10KeepAlive(), req.wantsClose(), ptrType$10.nil, new chunkWriter.ptr(ptrType$95.nil, false, false, false), {}, false, new $Int64(0, 0), new $Int64(-1, 4294967295), 0, false, false, sliceType$1.nil, 0, arrayType.zero(), arrayType$7.zero(), arrayType$8.zero(), new $Chan($Bool, 1), 0); + if (isH2Upgrade) { + w.closeAfterReply = true; + } + w.cw.res = w; + _r$8 = newBufioWriterSize(w.cw, 2048); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + w.w = _r$8; + _tmp$18 = w; + _tmp$19 = $ifaceNil; + w = _tmp$18; + err = _tmp$19; + $s = -1; return [w, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [w, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: conn.ptr.prototype.readRequest }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.body$1 = body$1; $f.c = c; $f.cancelCtx = cancelCtx; $f.ctx = ctx; $f.d = d; $f.d$1 = d$1; $f.d$2 = d$2; $f.err = err; $f.haveHost = haveHost; $f.hdrDeadline = hdrDeadline; $f.hosts = hosts; $f.isH2Upgrade = isH2Upgrade; $f.k = k; $f.ok = ok; $f.peek = peek; $f.req = req; $f.t0 = t0; $f.v = v; $f.vv = vv; $f.w = w; $f.wholeReqDeadline = wholeReqDeadline; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + conn.prototype.readRequest = function(ctx) { return this.$val.readRequest(ctx); }; + http1ServerSupportsRequest = function(req) { + var req; + if (req.ProtoMajor === 1) { + return true; + } + if ((req.ProtoMajor === 2) && (req.ProtoMinor === 0) && req.Method === "PRI" && req.RequestURI === "*") { + return true; + } + return false; + }; + response.ptr.prototype.Header = function() { + var w; + w = this; + if (w.cw.header === false && w.wroteHeader && !w.cw.wroteHeader) { + w.cw.header = new Header(w.handlerHeader).clone(); + } + w.calledHeader = true; + return w.handlerHeader; + }; + response.prototype.Header = function() { return this.$val.Header(); }; + checkWriteHeaderCode = function(code) { + var _r$1, code, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; code = $f.code; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (code < 100 || code > 999) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (code < 100 || code > 999) { */ case 1: + _r$1 = fmt.Sprintf("invalid WriteHeader code %v", new sliceType([new $Int(code)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String(_r$1)); + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: checkWriteHeaderCode }; } $f._r$1 = _r$1; $f.code = code; $f.$s = $s; $f.$r = $r; return $f; + }; + response.ptr.prototype.WriteHeader = function(code) { + var _r$1, _tuple, cl, code, err, v, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; cl = $f.cl; code = $f.code; err = $f.err; v = $f.v; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _r$1 = w.conn.hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$1) { */ case 1: + $r = w.conn.server.logf("http: response.WriteHeader on hijacked connection", new sliceType([])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + /* */ if (w.wroteHeader) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (w.wroteHeader) { */ case 5: + $r = w.conn.server.logf("http: multiple response.WriteHeader calls", new sliceType([])); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 6: + $r = checkWriteHeaderCode(code); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + w.wroteHeader = true; + w.status = code; + if (w.calledHeader && w.cw.header === false) { + w.cw.header = new Header(w.handlerHeader).clone(); + } + cl = new Header(w.handlerHeader).get("Content-Length"); + /* */ if (!(cl === "")) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!(cl === "")) { */ case 9: + _tuple = strconv.ParseInt(cl, 10, 64); + v = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil) && (v.$high > 0 || (v.$high === 0 && v.$low >= 0))) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if ($interfaceIsEqual(err, $ifaceNil) && (v.$high > 0 || (v.$high === 0 && v.$low >= 0))) { */ case 11: + w.contentLength = v; + $s = 13; continue; + /* } else { */ case 12: + $r = w.conn.server.logf("http: invalid Content-Length of %q", new sliceType([new $String(cl)])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + new Header(w.handlerHeader).Del("Content-Length"); + /* } */ case 13: + /* } */ case 10: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.WriteHeader }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.cl = cl; $f.code = code; $f.err = err; $f.v = v; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.WriteHeader = function(code) { return this.$val.WriteHeader(code); }; + extraHeader.ptr.prototype.Write = function(w) { + var _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, h, i, v, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; h = $f.h; i = $f.i; v = $f.v; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + /* */ if (!(h.date === sliceType$3.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(h.date === sliceType$3.nil)) { */ case 1: + _r$1 = w.Write(headerDate); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + _r$2 = w.Write(h.date); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = w.Write(crlf); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* } */ case 2: + /* */ if (!(h.contentLength === sliceType$3.nil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(h.contentLength === sliceType$3.nil)) { */ case 6: + _r$4 = w.Write(headerContentLength); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = w.Write(h.contentLength); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = w.Write(crlf); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + /* } */ case 7: + _ref = new sliceType$1([h.contentType, h.connection, h.transferEncoding]); + _i = 0; + /* while (true) { */ case 11: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 12; continue; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + /* */ if (!(v === "")) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!(v === "")) { */ case 13: + _r$7 = w.Write(((i < 0 || i >= extraHeaderKeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : extraHeaderKeys.$array[extraHeaderKeys.$offset + i])); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + _r$8 = w.Write(colonSpace); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _r$8; + _r$9 = w.WriteString(v); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _r$9; + _r$10 = w.Write(crlf); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10; + /* } */ case 14: + _i++; + /* } */ $s = 11; continue; case 12: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: extraHeader.ptr.prototype.Write }; } $f._i = _i; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f.h = h; $f.i = i; $f.v = v; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + extraHeader.prototype.Write = function(w) { return this.$val.Write(w); }; + chunkWriter.ptr.prototype.writeHeader = function(p) { + var _1, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _i, _i$1, _i$2, _key, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, bdy, bdy$1, bdy$2, code, connectionHeaderSet, cw, delHeader, discard, ecr, err, excludeHeader, hasCL, hasTE, haveType, header, isHEAD, k, k$1, keepAlivesEnabled, ok, ok$1, owned, p, sentLength, setHeader, te, tooBig, trailers, v, w, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _entry$3 = $f._entry$3; _entry$4 = $f._entry$4; _i = $f._i; _i$1 = $f._i$1; _i$2 = $f._i$2; _key = $f._key; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _ref$3 = $f._ref$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; bdy = $f.bdy; bdy$1 = $f.bdy$1; bdy$2 = $f.bdy$2; code = $f.code; connectionHeaderSet = $f.connectionHeaderSet; cw = $f.cw; delHeader = $f.delHeader; discard = $f.discard; ecr = $f.ecr; err = $f.err; excludeHeader = $f.excludeHeader; hasCL = $f.hasCL; hasTE = $f.hasTE; haveType = $f.haveType; header = $f.header; isHEAD = $f.isHEAD; k = $f.k; k$1 = $f.k$1; keepAlivesEnabled = $f.keepAlivesEnabled; ok = $f.ok; ok$1 = $f.ok$1; owned = $f.owned; p = $f.p; sentLength = $f.sentLength; setHeader = $f.setHeader; te = $f.te; tooBig = $f.tooBig; trailers = $f.trailers; v = $f.v; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + excludeHeader = [excludeHeader]; + header = [header]; + owned = [owned]; + cw = this; + if (cw.wroteHeader) { + $s = -1; return; + } + cw.wroteHeader = true; + w = cw.res; + keepAlivesEnabled = w.conn.server.doKeepAlives(); + isHEAD = w.req.Method === "HEAD"; + header[0] = cw.header; + owned[0] = !(header[0] === false); + if (!owned[0]) { + header[0] = w.handlerHeader; + } + excludeHeader[0] = false; + delHeader = (function(excludeHeader, header, owned) { return function(key) { + var _entry, _key, _tuple, key, ok; + if (owned[0]) { + new Header(header[0]).Del(key); + return; + } + _tuple = (_entry = header[0][$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + ok = _tuple[1]; + if (!ok) { + return; + } + if (excludeHeader[0] === false) { + excludeHeader[0] = {}; + } + _key = key; (excludeHeader[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: true }; + }; })(excludeHeader, header, owned); + setHeader = new extraHeader.ptr("", "", "", sliceType$3.nil, sliceType$3.nil); + trailers = false; + _ref = cw.header; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + if (strings.HasPrefix(k, "Trailer:")) { + if (excludeHeader[0] === false) { + excludeHeader[0] = {}; + } + _key = k; (excludeHeader[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: true }; + trailers = true; + } + _i++; + } + _ref$1 = (_entry$1 = cw.header[$String.keyFor("Trailer")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + _i$1 = 0; + /* while (true) { */ case 1: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + trailers = true; + $r = foreachHeaderElement(v, $methodVal(cw.res, "declareTrailer")); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$1++; + /* } */ $s = 1; continue; case 2: + te = new Header(header[0]).get("Transfer-Encoding"); + hasTE = !(te === ""); + if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$23(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet() && !trailers && !hasTE && bodyAllowedForStatus(w.status) && new Header(header[0]).get("Content-Length") === "" && (!isHEAD || p.$length > 0)) { + w.contentLength = (new $Int64(0, p.$length)); + setHeader.contentLength = strconv.AppendInt($subslice(new sliceType$3(cw.res.clenBuf), 0, 0), (new $Int64(0, p.$length)), 10); + } + if (w.wants10KeepAlive && keepAlivesEnabled) { + sentLength = !(new Header(header[0]).get("Content-Length") === ""); + if (sentLength && new Header(header[0]).get("Connection") === "keep-alive") { + w.closeAfterReply = false; + } + } + hasCL = !((x$4 = w.contentLength, (x$4.$high === -1 && x$4.$low === 4294967295))); + if (w.wants10KeepAlive && (isHEAD || hasCL || !bodyAllowedForStatus(w.status))) { + _tuple = (_entry$2 = header[0][$String.keyFor("Connection")], _entry$2 !== undefined ? [_entry$2.v, true] : [sliceType$1.nil, false]); + connectionHeaderSet = _tuple[1]; + if (!connectionHeaderSet) { + setHeader.connection = "keep-alive"; + } + } else if (!w.req.ProtoAtLeast(1, 1) || w.wantsClose) { + w.closeAfterReply = true; + } + if (new Header(header[0]).get("Connection") === "close" || !keepAlivesEnabled) { + w.closeAfterReply = true; + } + _tuple$1 = $assertType(w.req.Body, ptrType$99, true); + ecr = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok && !ecr.sawEOF) { + w.closeAfterReply = true; + } + /* */ if (!((x$5 = w.req.ContentLength, (x$5.$high === 0 && x$5.$low === 0))) && !w.closeAfterReply) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((x$5 = w.req.ContentLength, (x$5.$high === 0 && x$5.$low === 0))) && !w.closeAfterReply) { */ case 4: + _tmp = false; + _tmp$1 = false; + discard = _tmp; + tooBig = _tmp$1; + _ref$2 = w.req.Body; + /* */ if ($assertType(_ref$2, ptrType$99, true)[1]) { $s = 6; continue; } + /* */ if ($assertType(_ref$2, ptrType$97, true)[1]) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if ($assertType(_ref$2, ptrType$99, true)[1]) { */ case 6: + bdy = _ref$2.$val; + if (bdy.resp.wroteContinue) { + discard = true; + } + $s = 9; continue; + /* } else if ($assertType(_ref$2, ptrType$97, true)[1]) { */ case 7: + bdy$1 = _ref$2.$val; + $r = bdy$1.mu.Lock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (bdy$1.closed) { + if (!bdy$1.sawEOF) { + w.closeAfterReply = true; + } + } else if ((x$6 = bdy$1.unreadDataSizeLocked(), (x$6.$high > 0 || (x$6.$high === 0 && x$6.$low >= 262144)))) { + tooBig = true; + } else { + discard = true; + } + $r = bdy$1.mu.Unlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 9; continue; + /* } else { */ case 8: + bdy$2 = _ref$2; + discard = true; + /* } */ case 9: + /* */ if (discard) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (discard) { */ case 12: + _r$1 = io.CopyN(ioutil.Discard, w.reqBody, new $Int64(0, 262145)); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$2 = _r$1; + err = _tuple$2[1]; + _1 = err; + /* */ if ($interfaceIsEqual(_1, $ifaceNil)) { $s = 16; continue; } + /* */ if ($interfaceIsEqual(_1, ($pkg.ErrBodyReadAfterClose))) { $s = 17; continue; } + /* */ if ($interfaceIsEqual(_1, (io.EOF))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if ($interfaceIsEqual(_1, $ifaceNil)) { */ case 16: + tooBig = true; + $s = 20; continue; + /* } else if ($interfaceIsEqual(_1, ($pkg.ErrBodyReadAfterClose))) { */ case 17: + $s = 20; continue; + /* } else if ($interfaceIsEqual(_1, (io.EOF))) { */ case 18: + _r$2 = w.reqBody.Close(); /* */ $s = 21; case 21: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + if (!($interfaceIsEqual(err, $ifaceNil))) { + w.closeAfterReply = true; + } + $s = 20; continue; + /* } else { */ case 19: + w.closeAfterReply = true; + /* } */ case 20: + case 15: + /* } */ case 13: + /* */ if (tooBig) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (tooBig) { */ case 22: + w.requestTooLarge(); + $r = delHeader("Connection"); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + setHeader.connection = "close"; + /* } */ case 23: + /* } */ case 5: + code = w.status; + /* */ if (bodyAllowedForStatus(code)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (bodyAllowedForStatus(code)) { */ case 25: + _tuple$3 = (_entry$3 = header[0][$String.keyFor("Content-Type")], _entry$3 !== undefined ? [_entry$3.v, true] : [sliceType$1.nil, false]); + haveType = _tuple$3[1]; + /* */ if (!haveType && !hasTE && p.$length > 0) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (!haveType && !hasTE && p.$length > 0) { */ case 28: + _r$3 = DetectContentType(p); /* */ $s = 30; case 30: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + setHeader.contentType = _r$3; + /* } */ case 29: + $s = 27; continue; + /* } else { */ case 26: + _ref$3 = suppressedHeaders(code); + _i$2 = 0; + /* while (true) { */ case 31: + /* if (!(_i$2 < _ref$3.$length)) { break; } */ if(!(_i$2 < _ref$3.$length)) { $s = 32; continue; } + k$1 = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$2]); + $r = delHeader(k$1); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$2++; + /* } */ $s = 31; continue; case 32: + /* } */ case 27: + _tuple$4 = (_entry$4 = header[0][$String.keyFor("Date")], _entry$4 !== undefined ? [_entry$4.v, true] : [sliceType$1.nil, false]); + ok$1 = _tuple$4[1]; + /* */ if (!ok$1) { $s = 34; continue; } + /* */ $s = 35; continue; + /* if (!ok$1) { */ case 34: + _r$4 = appendTime($subslice(new sliceType$3(cw.res.dateBuf), 0, 0), $clone(time.Now(), time.Time)); /* */ $s = 36; case 36: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + setHeader.date = _r$4; + /* } */ case 35: + /* */ if (hasCL && hasTE && !(te === "identity")) { $s = 37; continue; } + /* */ $s = 38; continue; + /* if (hasCL && hasTE && !(te === "identity")) { */ case 37: + $r = w.conn.server.logf("http: WriteHeader called with both Transfer-Encoding of %q and a Content-Length of %d", new sliceType([new $String(te), w.contentLength])); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = delHeader("Content-Length"); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + hasCL = false; + /* } */ case 38: + /* */ if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code)) { $s = 41; continue; } + /* */ if (code === 204) { $s = 42; continue; } + /* */ if (hasCL) { $s = 43; continue; } + /* */ if (w.req.ProtoAtLeast(1, 1)) { $s = 44; continue; } + /* */ $s = 45; continue; + /* if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code)) { */ case 41: + $s = 46; continue; + /* } else if (code === 204) { */ case 42: + $r = delHeader("Transfer-Encoding"); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 46; continue; + /* } else if (hasCL) { */ case 43: + $r = delHeader("Transfer-Encoding"); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 46; continue; + /* } else if (w.req.ProtoAtLeast(1, 1)) { */ case 44: + /* */ if (hasTE && te === "identity") { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (hasTE && te === "identity") { */ case 49: + cw.chunking = false; + w.closeAfterReply = true; + $s = 51; continue; + /* } else { */ case 50: + cw.chunking = true; + setHeader.transferEncoding = "chunked"; + /* */ if (hasTE && te === "chunked") { $s = 52; continue; } + /* */ $s = 53; continue; + /* if (hasTE && te === "chunked") { */ case 52: + $r = delHeader("Transfer-Encoding"); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 53: + /* } */ case 51: + $s = 46; continue; + /* } else { */ case 45: + w.closeAfterReply = true; + $r = delHeader("Transfer-Encoding"); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 46: + /* */ if (cw.chunking) { $s = 56; continue; } + /* */ $s = 57; continue; + /* if (cw.chunking) { */ case 56: + $r = delHeader("Content-Length"); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 57: + if (!w.req.ProtoAtLeast(1, 0)) { + $s = -1; return; + } + /* */ if (w.closeAfterReply && (!keepAlivesEnabled || !hasToken(new Header(cw.header).get("Connection"), "close"))) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (w.closeAfterReply && (!keepAlivesEnabled || !hasToken(new Header(cw.header).get("Connection"), "close"))) { */ case 59: + $r = delHeader("Connection"); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (w.req.ProtoAtLeast(1, 1)) { + setHeader.connection = "close"; + } + /* } */ case 60: + $r = writeStatusLine(w.conn.bufw, w.req.ProtoAtLeast(1, 1), code, new sliceType$3(w.statusBuf)); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$5 = new Header(cw.header).WriteSubset(w.conn.bufw, excludeHeader[0]); /* */ $s = 63; case 63: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + $r = $clone(setHeader, extraHeader).Write(w.conn.bufw); /* */ $s = 64; case 64: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$6 = w.conn.bufw.Write(crlf); /* */ $s = 65; case 65: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: chunkWriter.ptr.prototype.writeHeader }; } $f._1 = _1; $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._entry$3 = _entry$3; $f._entry$4 = _entry$4; $f._i = _i; $f._i$1 = _i$1; $f._i$2 = _i$2; $f._key = _key; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._ref$3 = _ref$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.bdy = bdy; $f.bdy$1 = bdy$1; $f.bdy$2 = bdy$2; $f.code = code; $f.connectionHeaderSet = connectionHeaderSet; $f.cw = cw; $f.delHeader = delHeader; $f.discard = discard; $f.ecr = ecr; $f.err = err; $f.excludeHeader = excludeHeader; $f.hasCL = hasCL; $f.hasTE = hasTE; $f.haveType = haveType; $f.header = header; $f.isHEAD = isHEAD; $f.k = k; $f.k$1 = k$1; $f.keepAlivesEnabled = keepAlivesEnabled; $f.ok = ok; $f.ok$1 = ok$1; $f.owned = owned; $f.p = p; $f.sentLength = sentLength; $f.setHeader = setHeader; $f.te = te; $f.tooBig = tooBig; $f.trailers = trailers; $f.v = v; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + chunkWriter.prototype.writeHeader = function(p) { return this.$val.writeHeader(p); }; + foreachHeaderElement = function(v, fn) { + var _i, _ref, f, fn, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _ref = $f._ref; f = $f.f; fn = $f.fn; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + v = textproto.TrimString(v); + if (v === "") { + $s = -1; return; + } + /* */ if (!strings.Contains(v, ",")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!strings.Contains(v, ",")) { */ case 1: + $r = fn(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + _ref = strings.Split(v, ","); + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + f = textproto.TrimString(f); + /* */ if (!(f === "")) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(f === "")) { */ case 6: + $r = fn(f); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + _i++; + /* } */ $s = 4; continue; case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: foreachHeaderElement }; } $f._i = _i; $f._ref = _ref; $f.f = f; $f.fn = fn; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + writeStatusLine = function(bw, is11, code, scratch) { + var _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, bw, code, is11, ok, scratch, text, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _tuple = $f._tuple; bw = $f.bw; code = $f.code; is11 = $f.is11; ok = $f.ok; scratch = $f.scratch; text = $f.text; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (is11) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (is11) { */ case 1: + _r$1 = bw.WriteString("HTTP/1.1 "); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = 3; continue; + /* } else { */ case 2: + _r$2 = bw.WriteString("HTTP/1.0 "); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 3: + _tuple = (_entry = statusText[$Int.keyFor(code)], _entry !== undefined ? [_entry.v, true] : ["", false]); + text = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (ok) { */ case 6: + _r$3 = bw.Write(strconv.AppendInt($subslice(scratch, 0, 0), (new $Int64(0, code)), 10)); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + _r$4 = bw.WriteByte(32); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + _r$5 = bw.WriteString(text); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _r$6 = bw.WriteString("\r\n"); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + $s = 8; continue; + /* } else { */ case 7: + _r$7 = fmt.Fprintf(bw, "%03d status code %d\r\n", new sliceType([new $Int(code), new $Int(code)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + /* } */ case 8: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: writeStatusLine }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._tuple = _tuple; $f.bw = bw; $f.code = code; $f.is11 = is11; $f.ok = ok; $f.scratch = scratch; $f.text = text; $f.$s = $s; $f.$r = $r; return $f; + }; + response.ptr.prototype.bodyAllowed = function() { + var w; + w = this; + if (!w.wroteHeader) { + $panic(new $String("")); + } + return bodyAllowedForStatus(w.status); + }; + response.prototype.bodyAllowed = function() { return this.$val.bodyAllowed(); }; + response.ptr.prototype.Write = function(data) { + var _r$1, _tuple, data, err, n, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; data = $f.data; err = $f.err; n = $f.n; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.write(data.$length, data, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.data = data; $f.err = err; $f.n = n; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.Write = function(data) { return this.$val.Write(data); }; + response.ptr.prototype.WriteString = function(data) { + var _r$1, _tuple, data, err, n, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; data = $f.data; err = $f.err; n = $f.n; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.write(data.length, sliceType$3.nil, data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.WriteString }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.data = data; $f.err = err; $f.n = n; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.WriteString = function(data) { return this.$val.WriteString(data); }; + response.ptr.prototype.write = function(lenData, dataB, dataS) { + var _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, dataB, dataS, err, lenData, n, w, x$4, x$5, x$6, x$7, x$8, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; dataB = $f.dataB; dataS = $f.dataS; err = $f.err; lenData = $f.lenData; n = $f.n; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.conn.hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$1) { */ case 1: + /* */ if (lenData > 0) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (lenData > 0) { */ case 4: + $r = w.conn.server.logf("http: response.Write on hijacked connection", new sliceType([])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + _tmp = 0; + _tmp$1 = $pkg.ErrHijacked; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* } */ case 2: + /* */ if (!w.wroteHeader) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!w.wroteHeader) { */ case 7: + $r = w.WriteHeader(200); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + if (lenData === 0) { + _tmp$2 = 0; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + if (!w.bodyAllowed()) { + _tmp$4 = 0; + _tmp$5 = $pkg.ErrBodyNotAllowed; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + w.written = (x$4 = w.written, x$5 = (new $Int64(0, lenData)), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + if (!((x$6 = w.contentLength, (x$6.$high === -1 && x$6.$low === 4294967295))) && (x$7 = w.written, x$8 = w.contentLength, (x$7.$high > x$8.$high || (x$7.$high === x$8.$high && x$7.$low > x$8.$low)))) { + _tmp$6 = 0; + _tmp$7 = $pkg.ErrContentLength; + n = _tmp$6; + err = _tmp$7; + $s = -1; return [n, err]; + } + /* */ if (!(dataB === sliceType$3.nil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(dataB === sliceType$3.nil)) { */ case 10: + _r$2 = w.w.Write(dataB); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* } else { */ case 11: + _r$3 = w.w.WriteString(dataS); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* } */ case 12: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.write }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.dataB = dataB; $f.dataS = dataS; $f.err = err; $f.lenData = lenData; $f.n = n; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.write = function(lenData, dataB, dataS) { return this.$val.write(lenData, dataB, dataS); }; + response.ptr.prototype.finishRequest = function() { + var _r$1, _r$2, _r$3, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + (w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$23(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).setTrue(); + /* */ if (!w.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!w.wroteHeader) { */ case 1: + $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = w.w.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + putBufioWriter(w.w); + $r = w.cw.close(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = w.conn.bufw.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $r = w.conn.r.abortPendingRead(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = w.reqBody.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + if (!(w.req.MultipartForm === ptrType$20.nil)) { + w.req.MultipartForm.RemoveAll(); + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.finishRequest }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.finishRequest = function() { return this.$val.finishRequest(); }; + response.ptr.prototype.shouldReuseConnection = function() { + var _r$1, w, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + if (w.closeAfterReply) { + $s = -1; return false; + } + if (!(w.req.Method === "HEAD") && !((x$4 = w.contentLength, (x$4.$high === -1 && x$4.$low === 4294967295))) && w.bodyAllowed() && !((x$5 = w.contentLength, x$6 = w.written, (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { + $s = -1; return false; + } + if (!($interfaceIsEqual(w.conn.werr, $ifaceNil))) { + $s = -1; return false; + } + _r$1 = w.closedRequestBodyEarly(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$1) { */ case 1: + $s = -1; return false; + /* } */ case 2: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.shouldReuseConnection }; } $f._r$1 = _r$1; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.shouldReuseConnection = function() { return this.$val.shouldReuseConnection(); }; + response.ptr.prototype.closedRequestBodyEarly = function() { + var _r$1, _tuple, _v, body$1, ok, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; _v = $f._v; body$1 = $f.body$1; ok = $f.ok; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + _tuple = $assertType(w.req.Body, ptrType$97, true); + body$1 = _tuple[0]; + ok = _tuple[1]; + if (!(ok)) { _v = false; $s = 1; continue s; } + _r$1 = body$1.didEarlyClose(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 1: + $s = -1; return _v; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.closedRequestBodyEarly }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f._v = _v; $f.body$1 = body$1; $f.ok = ok; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.closedRequestBodyEarly = function() { return this.$val.closedRequestBodyEarly(); }; + response.ptr.prototype.Flush = function() { + var _r$1, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + /* */ if (!w.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!w.wroteHeader) { */ case 1: + $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$1 = w.w.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $r = w.cw.flush(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.Flush }; } $f._r$1 = _r$1; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.Flush = function() { return this.$val.Flush(); }; + conn.ptr.prototype.finalFlush = function() { + var _r$1, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!(c.bufr === ptrType$73.nil)) { + putBufioReader(c.bufr); + c.bufr = ptrType$73.nil; + } + /* */ if (!(c.bufw === ptrType$10.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(c.bufw === ptrType$10.nil)) { */ case 1: + _r$1 = c.bufw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + putBufioWriter(c.bufw); + c.bufw = ptrType$10.nil; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.finalFlush }; } $f._r$1 = _r$1; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.finalFlush = function() { return this.$val.finalFlush(); }; + conn.ptr.prototype.close = function() { + var _r$1, c, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.finalFlush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = c.rwc.Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.close }; } $f._r$1 = _r$1; $f.c = c; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.close = function() { return this.$val.close(); }; + conn.ptr.prototype.closeWriteAndWait = function() { + var _r$1, _tuple, c, ok, tcp, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; ok = $f.ok; tcp = $f.tcp; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + $r = c.finalFlush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tuple = $assertType(c.rwc, closeWriter, true); + tcp = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + _r$1 = tcp.CloseWrite(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + /* } */ case 3: + $r = time.Sleep(new time.Duration(0, 500000000)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.closeWriteAndWait }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.ok = ok; $f.tcp = tcp; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.closeWriteAndWait = function() { return this.$val.closeWriteAndWait(); }; + validNPN = function(proto) { + var _1, proto; + _1 = proto; + if (_1 === ("") || _1 === ("http/1.1") || _1 === ("http/1.0")) { + return false; + } + return true; + }; + conn.ptr.prototype.setState = function(nc, state) { + var _1, c, hook, nc, packedState, srv, state, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; c = $f.c; hook = $f.hook; nc = $f.nc; packedState = $f.packedState; srv = $f.srv; state = $f.state; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + srv = c.server; + _1 = state; + /* */ if (_1 === (0)) { $s = 2; continue; } + /* */ if ((_1 === (3)) || (_1 === (4))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === (0)) { */ case 2: + $r = srv.trackConn(c, true); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else if ((_1 === (3)) || (_1 === (4))) { */ case 3: + $r = srv.trackConn(c, false); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + case 1: + if (state > 255 || state < 0) { + $panic(new $String("internal error")); + } + packedState = (x$4 = ((x$5 = $shiftLeft64($clone(time.Now(), time.Time).Unix(), 8), new $Uint64(x$5.$high, x$5.$low))), x$6 = (new $Uint64(0, state)), new $Uint64(x$4.$high | x$6.$high, (x$4.$low | x$6.$low) >>> 0)); + atomic.StoreUint64((x$7 = c.curState, (x$7.$ptr_atomic || (x$7.$ptr_atomic = new ptrType$100(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$7)))), packedState); + hook = srv.ConnState; + /* */ if (!(hook === $throwNilPointerError)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(hook === $throwNilPointerError)) { */ case 7: + $r = hook(nc, state); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: conn.ptr.prototype.setState }; } $f._1 = _1; $f.c = c; $f.hook = hook; $f.nc = nc; $f.packedState = packedState; $f.srv = srv; $f.state = state; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.prototype.setState = function(nc, state) { return this.$val.setState(nc, state); }; + conn.ptr.prototype.getState = function() { + var _tmp, _tmp$1, c, packedState, state, unixSec, x$4, x$5; + state = 0; + unixSec = new $Int64(0, 0); + c = this; + packedState = atomic.LoadUint64((x$4 = c.curState, (x$4.$ptr_atomic || (x$4.$ptr_atomic = new ptrType$100(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$4))))); + _tmp = ((new $Uint64(packedState.$high & 0, (packedState.$low & 255) >>> 0).$low >> 0)); + _tmp$1 = ((x$5 = $shiftRightUint64(packedState, 8), new $Int64(x$5.$high, x$5.$low))); + state = _tmp; + unixSec = _tmp$1; + return [state, unixSec]; + }; + conn.prototype.getState = function() { return this.$val.getState(); }; + badRequestError.prototype.Error = function() { + var e; + e = this.$val; + return "Bad Request: " + (e); + }; + $ptrType(badRequestError).prototype.Error = function() { return new badRequestError(this.$get()).Error(); }; + isCommonNetReadError = function(err) { + var _r$1, _tuple, _tuple$1, _v, err, neterr, oe, ok, ok$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; err = $f.err; neterr = $f.neterr; oe = $f.oe; ok = $f.ok; ok$1 = $f.ok$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($interfaceIsEqual(err, io.EOF)) { + $s = -1; return true; + } + _tuple = $assertType(err, net.Error, true); + neterr = _tuple[0]; + ok = _tuple[1]; + if (!(ok)) { _v = false; $s = 3; continue s; } + _r$1 = neterr.Timeout(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _v = _r$1; case 3: + /* */ if (_v) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_v) { */ case 1: + $s = -1; return true; + /* } */ case 2: + _tuple$1 = $assertType(err, ptrType$60, true); + oe = _tuple$1[0]; + ok$1 = _tuple$1[1]; + if (ok$1 && oe.Op === "read") { + $s = -1; return true; + } + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: isCommonNetReadError }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.err = err; $f.neterr = neterr; $f.oe = oe; $f.ok = ok; $f.ok$1 = ok$1; $f.$s = $s; $f.$r = $r; return $f; + }; + conn.ptr.prototype.serve = function(ctx) { + var _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, c, cancelCtx, ctx, d, d$1, d$2, err, err$1, err$2, fn, h, ok, ok$1, proto, publicErr, req, tlsConn, v, w, x$4, x$5, x$6, x$7, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _entry = $f._entry; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _v = $f._v; c = $f.c; cancelCtx = $f.cancelCtx; ctx = $f.ctx; d = $f.d; d$1 = $f.d$1; d$2 = $f.d$2; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; fn = $f.fn; h = $f.h; ok = $f.ok; ok$1 = $f.ok$1; proto = $f.proto; publicErr = $f.publicErr; req = $f.req; tlsConn = $f.tlsConn; v = $f.v; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + c = [c]; + c[0] = this; + _r$1 = c[0].rwc.RemoteAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = _r$1.String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + c[0].remoteAddr = _r$2; + _arg = ctx; + _arg$1 = $pkg.LocalAddrContextKey; + _r$3 = c[0].rwc.LocalAddr(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _arg$2 = _r$3; + _r$4 = context.WithValue(_arg, _arg$1, _arg$2); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + ctx = _r$4; + $deferred.push([(function(c) { return function $b() { + var _r$5, buf, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$5 = $f._r$5; buf = $f.buf; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $recover(); + /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, $pkg.ErrAbortHandler))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, $pkg.ErrAbortHandler))) { */ case 1: + buf = $makeSlice(sliceType$3, 65536); + buf = $subslice(buf, 0, runtime.Stack(buf, false)); + $r = c[0].server.logf("http: panic serving %v: %v\n%s", new sliceType([new $String(c[0].remoteAddr), err, buf])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$5 = c[0].hijacked(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + /* */ if (!_r$5) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!_r$5) { */ case 4: + $r = c[0].close(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = c[0].setState(c[0].rwc, 4); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$5 = _r$5; $f.buf = buf; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; })(c), []]); + _tuple = $assertType(c[0].rwc, ptrType$101, true); + tlsConn = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (ok) { */ case 5: + d = c[0].server.ReadTimeout; + /* */ if (!((d.$high === 0 && d.$low === 0))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!((d.$high === 0 && d.$low === 0))) { */ case 7: + _r$5 = c[0].rwc.SetReadDeadline($clone($clone(time.Now(), time.Time).Add(d), time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + /* } */ case 8: + d$1 = c[0].server.WriteTimeout; + /* */ if (!((d$1.$high === 0 && d$1.$low === 0))) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!((d$1.$high === 0 && d$1.$low === 0))) { */ case 10: + _r$6 = c[0].rwc.SetWriteDeadline($clone($clone(time.Now(), time.Time).Add(d$1), time.Time)); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + /* } */ case 11: + _r$7 = tlsConn.Handshake(); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + err = _r$7; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: + _r$8 = c[0].rwc.RemoteAddr(); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _arg$3 = _r$8; + _arg$4 = err; + $r = c[0].server.logf("http: TLS handshake error from %s: %v", new sliceType([_arg$3, _arg$4])); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 15: + c[0].tlsState = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$17.nil, sliceType$18.nil, sliceType$5.nil, sliceType$3.nil, $throwNilPointerError, sliceType$3.nil); + _r$9 = tlsConn.ConnectionState(); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + tls.ConnectionState.copy(c[0].tlsState, _r$9); + proto = c[0].tlsState.NegotiatedProtocol; + /* */ if (validNPN(proto)) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (validNPN(proto)) { */ case 19: + fn = (_entry = c[0].server.TLSNextProto[$String.keyFor(proto)], _entry !== undefined ? _entry.v : $throwNilPointerError); + /* */ if (!(fn === $throwNilPointerError)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!(fn === $throwNilPointerError)) { */ case 21: + h = new initNPNRequest.ptr(tlsConn, new serverHandler.ptr(c[0].server)); + $r = fn(c[0].server, tlsConn, new h.constructor.elem(h)); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 22: + $s = -1; return; + /* } */ case 20: + /* } */ case 6: + _r$10 = context.WithCancel(ctx); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + ctx = _tuple$1[0]; + cancelCtx = _tuple$1[1]; + c[0].cancelCtx = cancelCtx; + $deferred.push([cancelCtx, []]); + c[0].r = new connReader.ptr(c[0], new sync.Mutex.ptr(0, 0), false, arrayType$6.zero(), ptrType$72.nil, false, false, new $Int64(0, 0)); + _r$11 = newBufioReader(c[0].r); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + c[0].bufr = _r$11; + _r$12 = newBufioWriterSize((x$4 = new checkConnErrorWriter.ptr(c[0]), new x$4.constructor.elem(x$4)), 4096); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + c[0].bufw = _r$12; + /* while (true) { */ case 27: + _r$13 = c[0].readRequest(ctx); /* */ $s = 29; case 29: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _tuple$2 = _r$13; + w = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* */ if (!((x$5 = c[0].r.remain, x$6 = c[0].server.initialReadLimitSize(), (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!((x$5 = c[0].r.remain, x$6 = c[0].server.initialReadLimitSize(), (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { */ case 30: + $r = c[0].setState(c[0].rwc, 1); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 31: + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 33; continue; } + /* */ $s = 34; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 33: + /* */ if ($interfaceIsEqual(err$1, errTooLarge)) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if ($interfaceIsEqual(err$1, errTooLarge)) { */ case 35: + _r$14 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 431 Request Header Fields Too Large\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n431 Request Header Fields Too Large", new sliceType([])); /* */ $s = 37; case 37: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _r$14; + $r = c[0].closeWriteAndWait(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 36: + _r$15 = isCommonNetReadError(err$1); /* */ $s = 41; case 41: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + /* */ if (_r$15) { $s = 39; continue; } + /* */ $s = 40; continue; + /* if (_r$15) { */ case 39: + $s = -1; return; + /* } */ case 40: + publicErr = "400 Bad Request"; + _tuple$3 = $assertType(err$1, badRequestError, true); + v = _tuple$3[0]; + ok$1 = _tuple$3[1]; + if (ok$1) { + publicErr = publicErr + ": " + (v); + } + _r$16 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 " + publicErr + "\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n" + publicErr, new sliceType([])); /* */ $s = 42; case 42: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$16; + $s = -1; return; + /* } */ case 34: + req = w.req; + /* */ if (req.expectsContinue()) { $s = 43; continue; } + /* */ if (!(new Header(req.Header).get("Expect") === "")) { $s = 44; continue; } + /* */ $s = 45; continue; + /* if (req.expectsContinue()) { */ case 43: + if (req.ProtoAtLeast(1, 1) && !((x$7 = req.ContentLength, (x$7.$high === 0 && x$7.$low === 0)))) { + req.Body = new expectContinueReader.ptr(w, req.Body, false, false); + } + $s = 45; continue; + /* } else if (!(new Header(req.Header).get("Expect") === "")) { */ case 44: + $r = w.sendExpectationFailed(); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 45: + c[0].curReq.Store(w); + _r$17 = requestBodyRemains(req.Body); /* */ $s = 50; case 50: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + /* */ if (_r$17) { $s = 47; continue; } + /* */ $s = 48; continue; + /* if (_r$17) { */ case 47: + $r = registerOnHitEOF(req.Body, $methodVal(w.conn.r, "startBackgroundRead")); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 49; continue; + /* } else { */ case 48: + $r = w.conn.r.startBackgroundRead(); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 49: + $r = new serverHandler.ptr(c[0].server).ServeHTTP(w, w.req); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = w.cancelCtx(); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$18 = c[0].hijacked(); /* */ $s = 57; case 57: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + /* */ if (_r$18) { $s = 55; continue; } + /* */ $s = 56; continue; + /* if (_r$18) { */ case 55: + $s = -1; return; + /* } */ case 56: + $r = w.finishRequest(); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$19 = w.shouldReuseConnection(); /* */ $s = 61; case 61: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + /* */ if (!_r$19) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (!_r$19) { */ case 59: + if (w.requestBodyLimitHit) { _v = true; $s = 64; continue s; } + _r$20 = w.closedRequestBodyEarly(); /* */ $s = 65; case 65: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _v = _r$20; case 64: + /* */ if (_v) { $s = 62; continue; } + /* */ $s = 63; continue; + /* if (_v) { */ case 62: + $r = c[0].closeWriteAndWait(); /* */ $s = 66; case 66: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 63: + $s = -1; return; + /* } */ case 60: + $r = c[0].setState(c[0].rwc, 2); /* */ $s = 67; case 67: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + c[0].curReq.Store((ptrType$95.nil)); + if (!w.conn.server.doKeepAlives()) { + $s = -1; return; + } + d$2 = c[0].server.idleTimeout(); + /* */ if (!((d$2.$high === 0 && d$2.$low === 0))) { $s = 68; continue; } + /* */ $s = 69; continue; + /* if (!((d$2.$high === 0 && d$2.$low === 0))) { */ case 68: + _r$21 = c[0].rwc.SetReadDeadline($clone($clone(time.Now(), time.Time).Add(d$2), time.Time)); /* */ $s = 70; case 70: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$21; + _r$22 = c[0].bufr.Peek(4); /* */ $s = 71; case 71: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _tuple$4 = _r$22; + err$2 = _tuple$4[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return; + } + /* } */ case 69: + _r$23 = c[0].rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil)); /* */ $s = 72; case 72: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _r$23; + /* } */ $s = 27; continue; case 28: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: conn.ptr.prototype.serve }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._entry = _entry; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._v = _v; $f.c = c; $f.cancelCtx = cancelCtx; $f.ctx = ctx; $f.d = d; $f.d$1 = d$1; $f.d$2 = d$2; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.fn = fn; $f.h = h; $f.ok = ok; $f.ok$1 = ok$1; $f.proto = proto; $f.publicErr = publicErr; $f.req = req; $f.tlsConn = tlsConn; $f.v = v; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + conn.prototype.serve = function(ctx) { return this.$val.serve(ctx); }; + response.ptr.prototype.sendExpectationFailed = function() { + var w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + w = this; + new Header(w.Header()).Set("Connection", "close"); + $r = w.WriteHeader(417); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = w.finishRequest(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: response.ptr.prototype.sendExpectationFailed }; } $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + response.prototype.sendExpectationFailed = function() { return this.$val.sendExpectationFailed(); }; + response.ptr.prototype.Hijack = function() { + var _r$1, _tmp, _tmp$1, _tmp$2, _tuple, buf, c, err, rwc, w, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; buf = $f.buf; c = $f.c; err = $f.err; rwc = $f.rwc; w = $f.w; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + rwc = $ifaceNil; + buf = ptrType$90.nil; + err = $ifaceNil; + w = this; + if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$23(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet()) { + $panic(new $String("net/http: Hijack called after ServeHTTP finished")); + } + /* */ if (w.wroteHeader) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (w.wroteHeader) { */ case 1: + $r = w.cw.flush(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + c = w.conn; + $r = c.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(c.mu, "Unlock"), []]); + _r$1 = c.hijackLocked(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + rwc = _tuple[0]; + buf = _tuple[1]; + err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + putBufioWriter(w.w); + w.w = ptrType$10.nil; + } + _tmp = rwc; + _tmp$1 = buf; + _tmp$2 = err; + rwc = _tmp; + buf = _tmp$1; + err = _tmp$2; + $s = -1; return [rwc, buf, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [rwc, buf, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: response.ptr.prototype.Hijack }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.buf = buf; $f.c = c; $f.err = err; $f.rwc = rwc; $f.w = w; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + response.prototype.Hijack = function() { return this.$val.Hijack(); }; + response.ptr.prototype.CloseNotify = function() { + var w; + w = this; + if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$23(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet()) { + $panic(new $String("net/http: CloseNotify called after ServeHTTP finished")); + } + return w.closeNotifyCh; + }; + response.prototype.CloseNotify = function() { return this.$val.CloseNotify(); }; + registerOnHitEOF = function(rc, fn) { + var _r$1, _ref, fn, rc, v, v$1, v$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _ref = $f._ref; fn = $f.fn; rc = $f.rc; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = rc; + /* */ if ($assertType(_ref, ptrType$99, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$97, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$99, true)[1]) { */ case 1: + v = _ref.$val; + $r = registerOnHitEOF(v.readCloser, fn); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else if ($assertType(_ref, ptrType$97, true)[1]) { */ case 2: + v$1 = _ref.$val; + $r = v$1.registerOnHitEOF(fn); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else { */ case 3: + v$2 = _ref; + _r$1 = fmt.Sprintf("%T", new sliceType([rc])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $panic(new $String("unexpected type " + _r$1)); + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: registerOnHitEOF }; } $f._r$1 = _r$1; $f._ref = _ref; $f.fn = fn; $f.rc = rc; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.$s = $s; $f.$r = $r; return $f; + }; + requestBodyRemains = function(rc) { + var _r$1, _r$2, _r$3, _ref, rc, v, v$1, v$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; rc = $f.rc; v = $f.v; v$1 = $f.v$1; v$2 = $f.v$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if ($interfaceIsEqual(rc, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { + $s = -1; return false; + } + _ref = rc; + /* */ if ($assertType(_ref, ptrType$99, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$97, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$99, true)[1]) { */ case 1: + v = _ref.$val; + _r$1 = requestBodyRemains(v.readCloser); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } else if ($assertType(_ref, ptrType$97, true)[1]) { */ case 2: + v$1 = _ref.$val; + _r$2 = v$1.bodyRemains(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return _r$2; + /* } else { */ case 3: + v$2 = _ref; + _r$3 = fmt.Sprintf("%T", new sliceType([rc])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $panic(new $String("unexpected type " + _r$3)); + /* } */ case 4: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: requestBodyRemains }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f.rc = rc; $f.v = v; $f.v$1 = v$1; $f.v$2 = v$2; $f.$s = $s; $f.$r = $r; return $f; + }; + HandlerFunc.prototype.ServeHTTP = function(w, r) { + var f, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + f = this.$val; + $r = f(w, r); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: HandlerFunc.prototype.ServeHTTP }; } $f.f = f; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $ptrType(HandlerFunc).prototype.ServeHTTP = function(w, r) { return new HandlerFunc(this.$get()).ServeHTTP(w, r); }; + Error = function(w, error, code) { + var _r$1, _r$2, _r$3, code, error, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; code = $f.code; error = $f.error; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = w.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = new Header(_r$1).Set("Content-Type", "text/plain; charset=utf-8"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = w.Header(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = new Header(_r$2).Set("X-Content-Type-Options", "nosniff"); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = w.WriteHeader(code); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = fmt.Fprintln(w, new sliceType([new $String(error)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Error }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.code = code; $f.error = error; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Error = Error; + NotFound = function(w, r) { + var r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = Error(w, "404 page not found", 404); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: NotFound }; } $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.NotFound = NotFound; + NotFoundHandler = function() { + return new HandlerFunc((NotFound)); + }; + $pkg.NotFoundHandler = NotFoundHandler; + Redirect = function(w, r, url$1, code) { + var _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, body$1, code, err, h, hadCT, i, olddir, oldpath, query, r, trailing, u, url$1, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; body$1 = $f.body$1; code = $f.code; err = $f.err; h = $f.h; hadCT = $f.hadCT; i = $f.i; olddir = $f.olddir; oldpath = $f.oldpath; query = $f.query; r = $f.r; trailing = $f.trailing; u = $f.u; url$1 = $f.url$1; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = parseURL(url$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + u = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + if (u.Scheme === "" && u.Host === "") { + oldpath = r.URL.Path; + if (oldpath === "") { + oldpath = "/"; + } + if (url$1 === "" || !((url$1.charCodeAt(0) === 47))) { + _tuple$1 = path.Split(oldpath); + olddir = _tuple$1[0]; + url$1 = olddir + url$1; + } + query = ""; + i = strings.Index(url$1, "?"); + if (!((i === -1))) { + _tmp = $substring(url$1, 0, i); + _tmp$1 = $substring(url$1, i); + url$1 = _tmp; + query = _tmp$1; + } + trailing = strings.HasSuffix(url$1, "/"); + url$1 = path.Clean(url$1); + if (trailing && !strings.HasSuffix(url$1, "/")) { + url$1 = url$1 + ("/"); + } + url$1 = url$1 + (query); + } + } + _r$2 = w.Header(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + h = _r$2; + _tuple$2 = (_entry = h[$String.keyFor("Content-Type")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + hadCT = _tuple$2[1]; + new Header(h).Set("Location", hexEscapeNonASCII(url$1)); + if (!hadCT && (r.Method === "GET" || r.Method === "HEAD")) { + new Header(h).Set("Content-Type", "text/html; charset=utf-8"); + } + $r = w.WriteHeader(code); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!hadCT && r.Method === "GET") { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!hadCT && r.Method === "GET") { */ case 4: + _r$3 = htmlEscape(url$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + body$1 = "" + (_entry$1 = statusText[$Int.keyFor(code)], _entry$1 !== undefined ? _entry$1.v : "") + ".\n"; + _r$4 = fmt.Fprintln(w, new sliceType([new $String(body$1)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$4; + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Redirect }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.body$1 = body$1; $f.code = code; $f.err = err; $f.h = h; $f.hadCT = hadCT; $f.i = i; $f.olddir = olddir; $f.oldpath = oldpath; $f.query = query; $f.r = r; $f.trailing = trailing; $f.u = u; $f.url$1 = url$1; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.Redirect = Redirect; + htmlEscape = function(s) { + var _r$1, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = htmlReplacer.Replace(s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: htmlEscape }; } $f._r$1 = _r$1; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + redirectHandler.ptr.prototype.ServeHTTP = function(w, r) { + var r, rh, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; r = $f.r; rh = $f.rh; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + rh = this; + $r = Redirect(w, r, rh.url, rh.code); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: redirectHandler.ptr.prototype.ServeHTTP }; } $f.r = r; $f.rh = rh; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + redirectHandler.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; + RedirectHandler = function(url$1, code) { + var code, url$1; + return new redirectHandler.ptr(url$1, code); + }; + $pkg.RedirectHandler = RedirectHandler; + pathMatch = function(pattern, path$1) { + var n, path$1, pattern; + if (pattern.length === 0) { + return false; + } + n = pattern.length; + if (!((pattern.charCodeAt((n - 1 >> 0)) === 47))) { + return pattern === path$1; + } + return path$1.length >= n && $substring(path$1, 0, n) === pattern; + }; + cleanPath = function(p) { + var np, p; + if (p === "") { + return "/"; + } + if (!((p.charCodeAt(0) === 47))) { + p = "/" + p; + } + np = path.Clean(p); + if ((p.charCodeAt((p.length - 1 >> 0)) === 47) && !(np === "/")) { + if ((p.length === (np.length + 1 >> 0)) && strings.HasPrefix(p, np)) { + np = p; + } else { + np = np + ("/"); + } + } + return np; + }; + stripHostPort = function(h) { + var _r$1, _tuple, err, h, host, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; h = $f.h; host = $f.host; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (strings.IndexByte(h, 58) === -1) { + $s = -1; return h; + } + _r$1 = net.SplitHostPort(h); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return h; + } + $s = -1; return host; + /* */ } return; } if ($f === undefined) { $f = { $blk: stripHostPort }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.h = h; $f.host = host; $f.$s = $s; $f.$r = $r; return $f; + }; + ServeMux.ptr.prototype.match = function(path$1) { + var _entry, _entry$1, _i, _keys, _ref, _tmp, _tmp$1, _tuple, h, k, mux, n, ok, path$1, pattern, v, v$1; + h = $ifaceNil; + pattern = ""; + mux = this; + _tuple = (_entry = mux.m[$String.keyFor(path$1)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); + v = $clone(_tuple[0], muxEntry); + ok = _tuple[1]; + if (ok) { + _tmp = v.h; + _tmp$1 = v.pattern; + h = _tmp; + pattern = _tmp$1; + return [h, pattern]; + } + n = 0; + _ref = mux.m; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry$1 = _ref[_keys[_i]]; + if (_entry$1 === undefined) { + _i++; + continue; + } + k = _entry$1.k; + v$1 = $clone(_entry$1.v, muxEntry); + if (!pathMatch(k, path$1)) { + _i++; + continue; + } + if ($interfaceIsEqual(h, $ifaceNil) || k.length > n) { + n = k.length; + h = v$1.h; + pattern = v$1.pattern; + } + _i++; + } + return [h, pattern]; + }; + ServeMux.prototype.match = function(path$1) { return this.$val.match(path$1); }; + ServeMux.ptr.prototype.redirectToPathSlash = function(host, path$1, u) { + var host, mux, path$1, shouldRedirect, u, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; host = $f.host; mux = $f.mux; path$1 = $f.path$1; shouldRedirect = $f.shouldRedirect; u = $f.u; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mux = this; + $r = mux.mu.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + shouldRedirect = mux.shouldRedirectRLocked(host, path$1); + $r = mux.mu.RUnlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!shouldRedirect) { + $s = -1; return [u, false]; + } + path$1 = path$1 + "/"; + u = new url.URL.ptr("", "", ptrType$18.nil, "", path$1, "", false, u.RawQuery, ""); + $s = -1; return [u, true]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.redirectToPathSlash }; } $f.host = host; $f.mux = mux; $f.path$1 = path$1; $f.shouldRedirect = shouldRedirect; $f.u = u; $f.$s = $s; $f.$r = $r; return $f; + }; + ServeMux.prototype.redirectToPathSlash = function(host, path$1, u) { return this.$val.redirectToPathSlash(host, path$1, u); }; + ServeMux.ptr.prototype.shouldRedirectRLocked = function(host, path$1) { + var _entry, _entry$1, _i, _i$1, _ref, _ref$1, _tuple, _tuple$1, c, c$1, exist, exist$1, host, mux, n, p, path$1; + mux = this; + p = new sliceType$1([path$1, host + path$1]); + _ref = p; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _tuple = (_entry = mux.m[$String.keyFor(c)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); + exist = _tuple[1]; + if (exist) { + return false; + } + _i++; + } + n = path$1.length; + if (n === 0) { + return false; + } + _ref$1 = p; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _tuple$1 = (_entry$1 = mux.m[$String.keyFor(c$1 + "/")], _entry$1 !== undefined ? [_entry$1.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); + exist$1 = _tuple$1[1]; + if (exist$1) { + return !((path$1.charCodeAt((n - 1 >> 0)) === 47)); + } + _i$1++; + } + return false; + }; + ServeMux.prototype.shouldRedirectRLocked = function(host, path$1) { return this.$val.shouldRedirectRLocked(host, path$1); }; + ServeMux.ptr.prototype.Handler = function(r) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, h, host, mux, ok, ok$1, path$1, pattern, r, u, u$1, url$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; h = $f.h; host = $f.host; mux = $f.mux; ok = $f.ok; ok$1 = $f.ok$1; path$1 = $f.path$1; pattern = $f.pattern; r = $f.r; u = $f.u; u$1 = $f.u$1; url$1 = $f.url$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = $ifaceNil; + pattern = ""; + mux = this; + /* */ if (r.Method === "CONNECT") { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.Method === "CONNECT") { */ case 1: + _r$1 = mux.redirectToPathSlash(r.URL.Host, r.URL.Path, r.URL); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + u = _tuple[0]; + ok = _tuple[1]; + if (ok) { + _tmp = RedirectHandler(u.String(), 301); + _tmp$1 = u.Path; + h = _tmp; + pattern = _tmp$1; + $s = -1; return [h, pattern]; + } + _r$2 = mux.handler(r.Host, r.URL.Path); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + h = _tuple$1[0]; + pattern = _tuple$1[1]; + $s = -1; return [h, pattern]; + /* } */ case 2: + _r$3 = stripHostPort(r.Host); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + host = _r$3; + path$1 = cleanPath(r.URL.Path); + _r$4 = mux.redirectToPathSlash(host, path$1, r.URL); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + u$1 = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (ok$1) { + _tmp$2 = RedirectHandler(u$1.String(), 301); + _tmp$3 = u$1.Path; + h = _tmp$2; + pattern = _tmp$3; + $s = -1; return [h, pattern]; + } + /* */ if (!(path$1 === r.URL.Path)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(path$1 === r.URL.Path)) { */ case 7: + _r$5 = mux.handler(host, path$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + pattern = _tuple$3[1]; + url$1 = $clone(r.URL, url.URL); + url$1.Path = path$1; + _tmp$4 = RedirectHandler(url$1.String(), 301); + _tmp$5 = pattern; + h = _tmp$4; + pattern = _tmp$5; + $s = -1; return [h, pattern]; + /* } */ case 8: + _r$6 = mux.handler(host, r.URL.Path); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$4 = _r$6; + h = _tuple$4[0]; + pattern = _tuple$4[1]; + $s = -1; return [h, pattern]; + /* */ } return; } if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.Handler }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.h = h; $f.host = host; $f.mux = mux; $f.ok = ok; $f.ok$1 = ok$1; $f.path$1 = path$1; $f.pattern = pattern; $f.r = r; $f.u = u; $f.u$1 = u$1; $f.url$1 = url$1; $f.$s = $s; $f.$r = $r; return $f; + }; + ServeMux.prototype.Handler = function(r) { return this.$val.Handler(r); }; + ServeMux.ptr.prototype.handler = function(host, path$1) { + var _tmp, _tmp$1, _tuple, _tuple$1, h, host, mux, path$1, pattern, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; h = $f.h; host = $f.host; mux = $f.mux; path$1 = $f.path$1; pattern = $f.pattern; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + h = $ifaceNil; + pattern = ""; + mux = this; + $r = mux.mu.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(mux.mu, "RUnlock"), []]); + if (mux.hosts) { + _tuple = mux.match(host + path$1); + h = _tuple[0]; + pattern = _tuple[1]; + } + if ($interfaceIsEqual(h, $ifaceNil)) { + _tuple$1 = mux.match(path$1); + h = _tuple$1[0]; + pattern = _tuple$1[1]; + } + if ($interfaceIsEqual(h, $ifaceNil)) { + _tmp = NotFoundHandler(); + _tmp$1 = ""; + h = _tmp; + pattern = _tmp$1; + } + $s = -1; return [h, pattern]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [h, pattern]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.handler }; } $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.h = h; $f.host = host; $f.mux = mux; $f.path$1 = path$1; $f.pattern = pattern; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ServeMux.prototype.handler = function(host, path$1) { return this.$val.handler(host, path$1); }; + ServeMux.ptr.prototype.ServeHTTP = function(w, r) { + var _r$1, _r$2, _tuple, h, mux, r, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; h = $f.h; mux = $f.mux; r = $f.r; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mux = this; + /* */ if (r.RequestURI === "*") { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (r.RequestURI === "*") { */ case 1: + /* */ if (r.ProtoAtLeast(1, 1)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (r.ProtoAtLeast(1, 1)) { */ case 3: + _r$1 = w.Header(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = new Header(_r$1).Set("Connection", "close"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $r = w.WriteHeader(400); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 2: + _r$2 = mux.Handler(r); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + h = _tuple[0]; + $r = h.ServeHTTP(w, r); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.ServeHTTP }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.h = h; $f.mux = mux; $f.r = r; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + ServeMux.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; + ServeMux.ptr.prototype.Handle = function(pattern, handler) { + var _entry, _key, _tuple, exist, handler, mux, pattern, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _tuple = $f._tuple; exist = $f.exist; handler = $f.handler; mux = $f.mux; pattern = $f.pattern; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + mux = this; + $r = mux.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(mux.mu, "Unlock"), []]); + if (pattern === "") { + $panic(new $String("http: invalid pattern")); + } + if ($interfaceIsEqual(handler, $ifaceNil)) { + $panic(new $String("http: nil handler")); + } + _tuple = (_entry = mux.m[$String.keyFor(pattern)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); + exist = _tuple[1]; + if (exist) { + $panic(new $String("http: multiple registrations for " + pattern)); + } + if (mux.m === false) { + mux.m = {}; + } + _key = pattern; (mux.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new muxEntry.ptr(handler, pattern) }; + if (!((pattern.charCodeAt(0) === 47))) { + mux.hosts = true; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.Handle }; } $f._entry = _entry; $f._key = _key; $f._tuple = _tuple; $f.exist = exist; $f.handler = handler; $f.mux = mux; $f.pattern = pattern; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + ServeMux.prototype.Handle = function(pattern, handler) { return this.$val.Handle(pattern, handler); }; + ServeMux.ptr.prototype.HandleFunc = function(pattern, handler) { + var handler, mux, pattern, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; handler = $f.handler; mux = $f.mux; pattern = $f.pattern; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + mux = this; + if (handler === $throwNilPointerError) { + $panic(new $String("http: nil handler")); + } + $r = mux.Handle(pattern, new HandlerFunc((handler))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: ServeMux.ptr.prototype.HandleFunc }; } $f.handler = handler; $f.mux = mux; $f.pattern = pattern; $f.$s = $s; $f.$r = $r; return $f; + }; + ServeMux.prototype.HandleFunc = function(pattern, handler) { return this.$val.HandleFunc(pattern, handler); }; + Server.ptr.prototype.getDoneChan = function() { + var s, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; s = $f.s; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = this; + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(s.mu, "Unlock"), []]); + $s = -1; return s.getDoneChanLocked(); + /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.getDoneChan }; } $f.s = s; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.getDoneChan = function() { return this.$val.getDoneChan(); }; + Server.ptr.prototype.getDoneChanLocked = function() { + var s; + s = this; + if (s.doneChan === $chanNil) { + s.doneChan = new $Chan(structType, 0); + } + return s.doneChan; + }; + Server.prototype.getDoneChanLocked = function() { return this.$val.getDoneChanLocked(); }; + Server.ptr.prototype.closeDoneChanLocked = function() { + var _selection, ch, s, $r; + /* */ var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _selection = $f._selection; ch = $f.ch; s = $f.s; $r = $f.$r; } + s = this; + ch = s.getDoneChanLocked(); + _selection = $select([[ch], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + $close(ch); + } + /* */ if ($f === undefined) { $f = { $blk: Server.ptr.prototype.closeDoneChanLocked }; } $f._selection = _selection; $f.ch = ch; $f.s = s; $f.$r = $r; return $f; + }; + Server.prototype.closeDoneChanLocked = function() { return this.$val.closeDoneChanLocked(); }; + Server.ptr.prototype.Close = function() { + var _entry, _i, _keys, _r$1, _r$2, _ref, c, err, srv, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; c = $f.c; err = $f.err; srv = $f.srv; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + srv = this; + atomic.StoreInt32((srv.$ptr_inShutdown || (srv.$ptr_inShutdown = new ptrType$91(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, srv))), 1); + $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(srv.mu, "Unlock"), []]); + srv.closeDoneChanLocked(); + _r$1 = srv.closeListenersLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + _ref = srv.activeConn; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 3: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 3; continue; + } + c = _entry.k; + _r$2 = c.rwc.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + delete srv.activeConn[ptrType$98.keyFor(c)]; + _i++; + /* } */ $s = 3; continue; case 4: + $s = -1; return err; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.Close }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f.c = c; $f.err = err; $f.srv = srv; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.Close = function() { return this.$val.Close(); }; + Server.ptr.prototype.Shutdown = function(ctx) { + var _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _selection, ctx, f, lnerr, srv, ticker, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _selection = $f._selection; ctx = $f.ctx; f = $f.f; lnerr = $f.lnerr; srv = $f.srv; ticker = $f.ticker; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + srv = this; + atomic.StoreInt32((srv.$ptr_inShutdown || (srv.$ptr_inShutdown = new ptrType$91(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, srv))), 1); + $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = srv.closeListenersLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + lnerr = _r$1; + srv.closeDoneChanLocked(); + _ref = srv.onShutdown; + _i = 0; + /* while (true) { */ case 3: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } + f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $go(f, []); + _i++; + /* } */ $s = 3; continue; case 4: + $r = srv.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ticker = time.NewTicker(shutdownPollInterval); + $deferred.push([$methodVal(ticker, "Stop"), []]); + /* while (true) { */ case 6: + _r$2 = srv.closeIdleConns(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (_r$2) { */ case 8: + $s = -1; return lnerr; + /* } */ case 9: + _r$3 = ctx.Done(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = $select([[_r$3], [ticker.C]]); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _selection = _r$4; + /* */ if (_selection[0] === 0) { $s = 13; continue; } + /* */ if (_selection[0] === 1) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (_selection[0] === 0) { */ case 13: + _r$5 = ctx.Err(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return _r$5; + /* } else if (_selection[0] === 1) { */ case 14: + /* } */ case 15: + /* } */ $s = 6; continue; case 7: + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.Shutdown }; } $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._selection = _selection; $f.ctx = ctx; $f.f = f; $f.lnerr = lnerr; $f.srv = srv; $f.ticker = ticker; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.Shutdown = function(ctx) { return this.$val.Shutdown(ctx); }; + Server.ptr.prototype.RegisterOnShutdown = function(f) { + var f, srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; f = $f.f; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + srv.onShutdown = $append(srv.onShutdown, f); + $r = srv.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.RegisterOnShutdown }; } $f.f = f; $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.RegisterOnShutdown = function(f) { return this.$val.RegisterOnShutdown(f); }; + Server.ptr.prototype.closeIdleConns = function() { + var _entry, _i, _keys, _r$1, _ref, _tuple, c, quiescent, s, st, unixSec, x$4, x$5, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; _tuple = $f._tuple; c = $f.c; quiescent = $f.quiescent; s = $f.s; st = $f.st; unixSec = $f.unixSec; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = this; + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(s.mu, "Unlock"), []]); + quiescent = true; + _ref = s.activeConn; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 2: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 2; continue; + } + c = _entry.k; + _tuple = c.getState(); + st = _tuple[0]; + unixSec = _tuple[1]; + if ((st === 0) && (x$4 = (x$5 = $clone(time.Now(), time.Time).Unix(), new $Int64(x$5.$high - 0, x$5.$low - 5)), (unixSec.$high < x$4.$high || (unixSec.$high === x$4.$high && unixSec.$low < x$4.$low)))) { + st = 2; + } + /* */ if (!((st === 2)) || (unixSec.$high === 0 && unixSec.$low === 0)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((st === 2)) || (unixSec.$high === 0 && unixSec.$low === 0)) { */ case 4: + quiescent = false; + _i++; + /* continue; */ $s = 2; continue; + /* } */ case 5: + _r$1 = c.rwc.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + delete s.activeConn[ptrType$98.keyFor(c)]; + _i++; + /* } */ $s = 2; continue; case 3: + $s = -1; return quiescent; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.closeIdleConns }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f._tuple = _tuple; $f.c = c; $f.quiescent = quiescent; $f.s = s; $f.st = st; $f.unixSec = unixSec; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.closeIdleConns = function() { return this.$val.closeIdleConns(); }; + Server.ptr.prototype.closeListenersLocked = function() { + var _entry, _i, _keys, _r$1, _ref, cerr, err, ln, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _ref = $f._ref; cerr = $f.cerr; err = $f.err; ln = $f.ln; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + err = $ifaceNil; + _ref = s.listeners; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 1: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 1; continue; + } + ln = _entry.k; + _r$1 = (ln.$get()).Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cerr = _r$1; + if (!($interfaceIsEqual(cerr, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { + err = cerr; + } + delete s.listeners[ptrType$102.keyFor(ln)]; + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.closeListenersLocked }; } $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._ref = _ref; $f.cerr = cerr; $f.err = err; $f.ln = ln; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.closeListenersLocked = function() { return this.$val.closeListenersLocked(); }; + ConnState.prototype.String = function() { + var _entry, c; + c = this.$val; + return (_entry = stateName[ConnState.keyFor(c)], _entry !== undefined ? _entry.v : ""); + }; + $ptrType(ConnState).prototype.String = function() { return new ConnState(this.$get()).String(); }; + serverHandler.ptr.prototype.ServeHTTP = function(rw, req) { + var handler, req, rw, sh, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; handler = $f.handler; req = $f.req; rw = $f.rw; sh = $f.sh; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + sh = this; + handler = sh.srv.Handler; + if ($interfaceIsEqual(handler, $ifaceNil)) { + handler = $pkg.DefaultServeMux; + } + if (req.RequestURI === "*" && req.Method === "OPTIONS") { + handler = (x$4 = new globalOptionsHandler.ptr(), new x$4.constructor.elem(x$4)); + } + $r = handler.ServeHTTP(rw, req); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: serverHandler.ptr.prototype.ServeHTTP }; } $f.handler = handler; $f.req = req; $f.rw = rw; $f.sh = sh; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + serverHandler.prototype.ServeHTTP = function(rw, req) { return this.$val.ServeHTTP(rw, req); }; + Server.ptr.prototype.ListenAndServe = function() { + var _r$1, _tuple, addr, err, ln, srv, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; addr = $f.addr; err = $f.err; ln = $f.ln; srv = $f.srv; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + if (srv.shuttingDown()) { + $s = -1; return $pkg.ErrServerClosed; + } + addr = srv.Addr; + if (addr === "") { + addr = ":http"; + } + _tuple = net.Listen("tcp", addr); + ln = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$1 = srv.Serve((x$4 = new tcpKeepAliveListener.ptr($assertType(ln, ptrType$103)), new x$4.constructor.elem(x$4))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.ListenAndServe }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.addr = addr; $f.err = err; $f.ln = ln; $f.srv = srv; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.ListenAndServe = function() { return this.$val.ListenAndServe(); }; + Server.ptr.prototype.shouldConfigureHTTP2ForServe = function() { + var srv; + srv = this; + if (srv.TLSConfig === ptrType$14.nil) { + return true; + } + return strSliceContains(srv.TLSConfig.NextProtos, "h2"); + }; + Server.prototype.shouldConfigureHTTP2ForServe = function() { return this.$val.shouldConfigureHTTP2ForServe(); }; + Server.ptr.prototype.Serve = function(l) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _selection, _tuple, _tuple$1, _v, baseCtx, c, ctx, e, err, fn, l, max, ne, ok, rw, srv, tempDelay, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; baseCtx = $f.baseCtx; c = $f.c; ctx = $f.ctx; e = $f.e; err = $f.err; fn = $f.fn; l = $f.l; max = $f.max; ne = $f.ne; ok = $f.ok; rw = $f.rw; srv = $f.srv; tempDelay = $f.tempDelay; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + l = [l]; + srv = this; + fn = testHookServerServe; + /* */ if (!(fn === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(fn === $throwNilPointerError)) { */ case 1: + $r = fn(srv, l[0]); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + l[0] = new onceCloseListener.ptr(l[0], new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), $ifaceNil); + $deferred.push([$methodVal(l[0], "Close"), []]); + _r$1 = srv.setupHTTP2_Serve(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$2 = srv.trackListener((l.$ptr || (l.$ptr = new ptrType$102(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, l))), true); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!_r$2) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!_r$2) { */ case 5: + $s = -1; return $pkg.ErrServerClosed; + /* } */ case 6: + $deferred.push([$methodVal(srv, "trackListener"), [(l.$ptr || (l.$ptr = new ptrType$102(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, l))), false]]); + tempDelay = new time.Duration(0, 0); + baseCtx = context.Background(); + _r$3 = context.WithValue(baseCtx, $pkg.ServerContextKey, srv); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + ctx = _r$3; + /* while (true) { */ case 9: + _r$4 = l[0].Accept(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple = _r$4; + rw = _tuple[0]; + e = _tuple[1]; + /* */ if (!($interfaceIsEqual(e, $ifaceNil))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!($interfaceIsEqual(e, $ifaceNil))) { */ case 12: + _r$5 = srv.getDoneChan(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _selection = $select([[_r$5], []]); + /* */ if (_selection[0] === 0) { $s = 15; continue; } + /* */ if (_selection[0] === 1) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (_selection[0] === 0) { */ case 15: + $s = -1; return $pkg.ErrServerClosed; + /* } else if (_selection[0] === 1) { */ case 16: + /* } */ case 17: + _tuple$1 = $assertType(e, net.Error, true); + ne = _tuple$1[0]; + ok = _tuple$1[1]; + if (!(ok)) { _v = false; $s = 20; continue s; } + _r$6 = ne.Temporary(); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _v = _r$6; case 20: + /* */ if (_v) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (_v) { */ case 18: + if ((tempDelay.$high === 0 && tempDelay.$low === 0)) { + tempDelay = new time.Duration(0, 5000000); + } else { + tempDelay = $mul64(tempDelay, (new time.Duration(0, 2))); + } + max = new time.Duration(0, 1000000000); + if ((tempDelay.$high > max.$high || (tempDelay.$high === max.$high && tempDelay.$low > max.$low))) { + tempDelay = max; + } + $r = srv.logf("http: Accept error: %v; retrying in %v", new sliceType([e, tempDelay])); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.Sleep(tempDelay); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 9; continue; + /* } */ case 19: + $s = -1; return e; + /* } */ case 13: + tempDelay = new time.Duration(0, 0); + _r$7 = srv.newConn(rw); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + c = _r$7; + $r = c.setState(c.rwc, 0); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $go($methodVal(c, "serve"), [ctx]); + /* } */ $s = 9; continue; case 10: + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.Serve }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f.baseCtx = baseCtx; $f.c = c; $f.ctx = ctx; $f.e = e; $f.err = err; $f.fn = fn; $f.l = l; $f.max = max; $f.ne = ne; $f.ok = ok; $f.rw = rw; $f.srv = srv; $f.tempDelay = tempDelay; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.Serve = function(l) { return this.$val.Serve(l); }; + Server.ptr.prototype.ServeTLS = function(l, certFile, keyFile) { + var _r$1, _r$2, _r$3, _r$4, _tuple, certFile, config, configHasCert, err, err$1, keyFile, l, srv, tlsListener, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; certFile = $f.certFile; config = $f.config; configHasCert = $f.configHasCert; err = $f.err; err$1 = $f.err$1; keyFile = $f.keyFile; l = $f.l; srv = $f.srv; tlsListener = $f.tlsListener; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + _r$1 = srv.setupHTTP2_ServeTLS(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$2 = cloneTLSConfig(srv.TLSConfig); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + config = _r$2; + if (!strSliceContains(config.NextProtos, "http/1.1")) { + config.NextProtos = $append(config.NextProtos, "http/1.1"); + } + configHasCert = config.Certificates.$length > 0 || !(config.GetCertificate === $throwNilPointerError); + /* */ if (!configHasCert || !(certFile === "") || !(keyFile === "")) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!configHasCert || !(certFile === "") || !(keyFile === "")) { */ case 3: + err$1 = $ifaceNil; + config.Certificates = $makeSlice(sliceType$11, 1); + _r$3 = tls.LoadX509KeyPair(certFile, keyFile); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + tls.Certificate.copy((x$4 = config.Certificates, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), _tuple[0]); + err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ case 4: + tlsListener = tls.NewListener(l, config); + _r$4 = srv.Serve(tlsListener); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.ServeTLS }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.certFile = certFile; $f.config = config; $f.configHasCert = configHasCert; $f.err = err; $f.err$1 = err$1; $f.keyFile = keyFile; $f.l = l; $f.srv = srv; $f.tlsListener = tlsListener; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.ServeTLS = function(l, certFile, keyFile) { return this.$val.ServeTLS(l, certFile, keyFile); }; + Server.ptr.prototype.trackListener = function(ln, add) { + var _key, add, ln, s, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; add = $f.add; ln = $f.ln; s = $f.s; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = this; + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(s.mu, "Unlock"), []]); + if (s.listeners === false) { + s.listeners = {}; + } + if (add) { + if (s.shuttingDown()) { + $s = -1; return false; + } + _key = ln; (s.listeners || $throwRuntimeError("assignment to entry in nil map"))[ptrType$102.keyFor(_key)] = { k: _key, v: new structType.ptr() }; + } else { + delete s.listeners[ptrType$102.keyFor(ln)]; + } + $s = -1; return true; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.trackListener }; } $f._key = _key; $f.add = add; $f.ln = ln; $f.s = s; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.trackListener = function(ln, add) { return this.$val.trackListener(ln, add); }; + Server.ptr.prototype.trackConn = function(c, add) { + var _key, add, c, s, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; add = $f.add; c = $f.c; s = $f.s; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + s = this; + $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(s.mu, "Unlock"), []]); + if (s.activeConn === false) { + s.activeConn = {}; + } + if (add) { + _key = c; (s.activeConn || $throwRuntimeError("assignment to entry in nil map"))[ptrType$98.keyFor(_key)] = { k: _key, v: new structType.ptr() }; + } else { + delete s.activeConn[ptrType$98.keyFor(c)]; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.trackConn }; } $f._key = _key; $f.add = add; $f.c = c; $f.s = s; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.trackConn = function(c, add) { return this.$val.trackConn(c, add); }; + Server.ptr.prototype.idleTimeout = function() { + var s, x$4; + s = this; + if (!((x$4 = s.IdleTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { + return s.IdleTimeout; + } + return s.ReadTimeout; + }; + Server.prototype.idleTimeout = function() { return this.$val.idleTimeout(); }; + Server.ptr.prototype.readHeaderTimeout = function() { + var s, x$4; + s = this; + if (!((x$4 = s.ReadHeaderTimeout, (x$4.$high === 0 && x$4.$low === 0)))) { + return s.ReadHeaderTimeout; + } + return s.ReadTimeout; + }; + Server.prototype.readHeaderTimeout = function() { return this.$val.readHeaderTimeout(); }; + Server.ptr.prototype.doKeepAlives = function() { + var s; + s = this; + return (atomic.LoadInt32((s.$ptr_disableKeepAlives || (s.$ptr_disableKeepAlives = new ptrType$91(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, s)))) === 0) && !s.shuttingDown(); + }; + Server.prototype.doKeepAlives = function() { return this.$val.doKeepAlives(); }; + Server.ptr.prototype.shuttingDown = function() { + var s; + s = this; + return !((atomic.LoadInt32((s.$ptr_inShutdown || (s.$ptr_inShutdown = new ptrType$91(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, s)))) === 0)); + }; + Server.prototype.shuttingDown = function() { return this.$val.shuttingDown(); }; + Server.ptr.prototype.SetKeepAlivesEnabled = function(v) { + var _r$1, srv, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; srv = $f.srv; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + if (v) { + atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$91(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 0); + $s = -1; return; + } + atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$91(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 1); + _r$1 = srv.closeIdleConns(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.SetKeepAlivesEnabled }; } $f._r$1 = _r$1; $f.srv = srv; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.SetKeepAlivesEnabled = function(v) { return this.$val.SetKeepAlivesEnabled(v); }; + Server.ptr.prototype.logf = function(format, args) { + var args, format, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; format = $f.format; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + s = this; + /* */ if (!(s.ErrorLog === ptrType$55.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(s.ErrorLog === ptrType$55.nil)) { */ case 1: + $r = s.ErrorLog.Printf(format, args); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 3; continue; + /* } else { */ case 2: + $r = log.Printf(format, args); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.logf }; } $f.args = args; $f.format = format; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; + Server.ptr.prototype.ListenAndServeTLS = function(certFile, keyFile) { + var _r$1, _tuple, addr, certFile, err, keyFile, ln, srv, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; addr = $f.addr; certFile = $f.certFile; err = $f.err; keyFile = $f.keyFile; ln = $f.ln; srv = $f.srv; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + srv = this; + if (srv.shuttingDown()) { + $s = -1; return $pkg.ErrServerClosed; + } + addr = srv.Addr; + if (addr === "") { + addr = ":https"; + } + _tuple = net.Listen("tcp", addr); + ln = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + $deferred.push([$methodVal(ln, "Close"), []]); + _r$1 = srv.ServeTLS((x$4 = new tcpKeepAliveListener.ptr($assertType(ln, ptrType$103)), new x$4.constructor.elem(x$4)), certFile, keyFile); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Server.ptr.prototype.ListenAndServeTLS }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.addr = addr; $f.certFile = certFile; $f.err = err; $f.keyFile = keyFile; $f.ln = ln; $f.srv = srv; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Server.prototype.ListenAndServeTLS = function(certFile, keyFile) { return this.$val.ListenAndServeTLS(certFile, keyFile); }; + Server.ptr.prototype.setupHTTP2_ServeTLS = function() { + var srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + $r = srv.nextProtoOnce.Do($methodVal(srv, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return srv.nextProtoErr; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.setupHTTP2_ServeTLS }; } $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.setupHTTP2_ServeTLS = function() { return this.$val.setupHTTP2_ServeTLS(); }; + Server.ptr.prototype.setupHTTP2_Serve = function() { + var srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + $r = srv.nextProtoOnce.Do($methodVal(srv, "onceSetNextProtoDefaults_Serve")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return srv.nextProtoErr; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.setupHTTP2_Serve }; } $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.setupHTTP2_Serve = function() { return this.$val.setupHTTP2_Serve(); }; + Server.ptr.prototype.onceSetNextProtoDefaults_Serve = function() { + var srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + /* */ if (srv.shouldConfigureHTTP2ForServe()) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (srv.shouldConfigureHTTP2ForServe()) { */ case 1: + $r = srv.onceSetNextProtoDefaults(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.onceSetNextProtoDefaults_Serve }; } $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.onceSetNextProtoDefaults_Serve = function() { return this.$val.onceSetNextProtoDefaults_Serve(); }; + Server.ptr.prototype.onceSetNextProtoDefaults = function() { + var _r$1, _r$2, _r$3, conf, srv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; conf = $f.conf; srv = $f.srv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + srv = this; + _r$1 = os.Getenv("GODEBUG"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.Contains(_r$1, "http2server=0"); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$2) { */ case 1: + $s = -1; return; + /* } */ case 2: + /* */ if (srv.TLSNextProto === false) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (srv.TLSNextProto === false) { */ case 5: + conf = new http2Server.ptr(0, 0, 0, false, new time.Duration(0, 0), 0, 0, (function() { + return http2NewPriorityWriteScheduler(ptrType$79.nil); + }), ptrType$52.nil); + _r$3 = http2ConfigureServer(srv, conf); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + srv.nextProtoErr = _r$3; + /* } */ case 6: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Server.ptr.prototype.onceSetNextProtoDefaults }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.conf = conf; $f.srv = srv; $f.$s = $s; $f.$r = $r; return $f; + }; + Server.prototype.onceSetNextProtoDefaults = function() { return this.$val.onceSetNextProtoDefaults(); }; + tcpKeepAliveListener.ptr.prototype.Accept = function() { + var _r$1, _r$2, _r$3, _tuple, err, ln, tc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err; ln = $f.ln; tc = $f.tc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + ln = this; + _r$1 = ln.TCPListener.AcceptTCP(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + tc = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [$ifaceNil, err]; + } + _r$2 = tc.SetKeepAlive(true); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + _r$3 = tc.SetKeepAlivePeriod(new time.Duration(41, 3906340864)); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $s = -1; return [tc, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: tcpKeepAliveListener.ptr.prototype.Accept }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.ln = ln; $f.tc = tc; $f.$s = $s; $f.$r = $r; return $f; + }; + tcpKeepAliveListener.prototype.Accept = function() { return this.$val.Accept(); }; + onceCloseListener.ptr.prototype.Close = function() { + var oc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; oc = $f.oc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + oc = this; + $r = oc.once.Do($methodVal(oc, "close")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return oc.closeErr; + /* */ } return; } if ($f === undefined) { $f = { $blk: onceCloseListener.ptr.prototype.Close }; } $f.oc = oc; $f.$s = $s; $f.$r = $r; return $f; + }; + onceCloseListener.prototype.Close = function() { return this.$val.Close(); }; + onceCloseListener.ptr.prototype.close = function() { + var _r$1, oc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; oc = $f.oc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + oc = this; + _r$1 = oc.Listener.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + oc.closeErr = _r$1; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: onceCloseListener.ptr.prototype.close }; } $f._r$1 = _r$1; $f.oc = oc; $f.$s = $s; $f.$r = $r; return $f; + }; + onceCloseListener.prototype.close = function() { return this.$val.close(); }; + globalOptionsHandler.ptr.prototype.ServeHTTP = function(w, r) { + var _r$1, _r$2, mb, r, w, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; mb = $f.mb; r = $f.r; w = $f.w; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = w.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = new Header(_r$1).Set("Content-Length", "0"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!((x$4 = r.ContentLength, (x$4.$high === 0 && x$4.$low === 0)))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!((x$4 = r.ContentLength, (x$4.$high === 0 && x$4.$low === 0)))) { */ case 3: + mb = MaxBytesReader(w, r.Body, new $Int64(0, 4096)); + _r$2 = io.Copy(ioutil.Discard, mb); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: globalOptionsHandler.ptr.prototype.ServeHTTP }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f.mb = mb; $f.r = r; $f.w = w; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + globalOptionsHandler.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; + initNPNRequest.ptr.prototype.ServeHTTP = function(rw, req) { + var _r$1, _r$2, _r$3, h, req, rw, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; h = $f.h; req = $f.req; rw = $f.rw; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + h = this; + /* */ if (req.TLS === ptrType$17.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (req.TLS === ptrType$17.nil) { */ case 1: + req.TLS = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$17.nil, sliceType$18.nil, sliceType$5.nil, sliceType$3.nil, $throwNilPointerError, sliceType$3.nil); + _r$1 = h.c.ConnectionState(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + tls.ConnectionState.copy(req.TLS, _r$1); + /* } */ case 2: + if ($interfaceIsEqual(req.Body, $ifaceNil)) { + req.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + } + /* */ if (req.RemoteAddr === "") { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (req.RemoteAddr === "") { */ case 4: + _r$2 = h.c.RemoteAddr(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = _r$2.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + req.RemoteAddr = _r$3; + /* } */ case 5: + $r = $clone(h.h, serverHandler).ServeHTTP(rw, req); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: initNPNRequest.ptr.prototype.ServeHTTP }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.h = h; $f.req = req; $f.rw = rw; $f.$s = $s; $f.$r = $r; return $f; + }; + initNPNRequest.prototype.ServeHTTP = function(rw, req) { return this.$val.ServeHTTP(rw, req); }; + newLoggingConn = function(baseName, c) { + var _entry, _entry$1, _key, _r$1, baseName, c, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _key = $f._key; _r$1 = $f._r$1; baseName = $f.baseName; c = $f.c; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + $r = uniqNameMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(uniqNameMu, "Unlock"), []]); + _key = baseName; (uniqNameNext || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: (_entry = uniqNameNext[$String.keyFor(baseName)], _entry !== undefined ? _entry.v : 0) + (1) >> 0 }; + _r$1 = fmt.Sprintf("%s-%d", new sliceType([new $String(baseName), new $Int((_entry$1 = uniqNameNext[$String.keyFor(baseName)], _entry$1 !== undefined ? _entry$1.v : 0))])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return new loggingConn.ptr(_r$1, c); + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: newLoggingConn }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._key = _key; $f._r$1 = _r$1; $f.baseName = baseName; $f.c = c; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + loggingConn.ptr.prototype.Write = function(p) { + var _r$1, _tuple, c, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + c = this; + $r = log.Printf("%s.Write(%d) = ....", new sliceType([new $String(c.name), new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = c.Conn.Write(p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $r = log.Printf("%s.Write(%d) = %d, %v", new sliceType([new $String(c.name), new $Int(p.$length), new $Int(n), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: loggingConn.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + loggingConn.prototype.Write = function(p) { return this.$val.Write(p); }; + loggingConn.ptr.prototype.Read = function(p) { + var _r$1, _tuple, c, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; c = $f.c; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + c = this; + $r = log.Printf("%s.Read(%d) = ....", new sliceType([new $String(c.name), new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = c.Conn.Read(p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $r = log.Printf("%s.Read(%d) = %d, %v", new sliceType([new $String(c.name), new $Int(p.$length), new $Int(n), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: loggingConn.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.c = c; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + loggingConn.prototype.Read = function(p) { return this.$val.Read(p); }; + loggingConn.ptr.prototype.Close = function() { + var _r$1, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + c = this; + $r = log.Printf("%s.Close() = ...", new sliceType([new $String(c.name)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = c.Conn.Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + $r = log.Printf("%s.Close() = %v", new sliceType([new $String(c.name), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: loggingConn.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + loggingConn.prototype.Close = function() { return this.$val.Close(); }; + checkConnErrorWriter.ptr.prototype.Write = function(p) { + var _r$1, _tuple, err, n, p, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.c.rwc.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && $interfaceIsEqual(w.c.werr, $ifaceNil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil)) && $interfaceIsEqual(w.c.werr, $ifaceNil)) { */ case 2: + w.c.werr = err; + $r = w.c.cancelCtx(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: checkConnErrorWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + checkConnErrorWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + numLeadingCRorLF = function(v) { + var _i, _ref, b, n, v; + n = 0; + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((b === 13) || (b === 10)) { + n = n + (1) >> 0; + _i++; + continue; + } + break; + } + return n; + }; + strSliceContains = function(ss, s) { + var _i, _ref, s, ss, v; + _ref = ss; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (v === s) { + return true; + } + _i++; + } + return false; + }; + DetectContentType = function(data) { + var _i, _r$1, _ref, ct, data, firstNonWS, sig, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; ct = $f.ct; data = $f.data; firstNonWS = $f.firstNonWS; sig = $f.sig; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (data.$length > 512) { + data = $subslice(data, 0, 512); + } + firstNonWS = 0; + while (true) { + if (!(firstNonWS < data.$length && isWS(((firstNonWS < 0 || firstNonWS >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + firstNonWS])))) { break; } + firstNonWS = firstNonWS + (1) >> 0; + } + _ref = sniffSignatures; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + sig = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = sig.match(data, firstNonWS); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + ct = _r$1; + if (!(ct === "")) { + $s = -1; return ct; + } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return "application/octet-stream"; + /* */ } return; } if ($f === undefined) { $f = { $blk: DetectContentType }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f.ct = ct; $f.data = data; $f.firstNonWS = firstNonWS; $f.sig = sig; $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.DetectContentType = DetectContentType; + isWS = function(b) { + var _1, b; + _1 = b; + if ((_1 === (9)) || (_1 === (10)) || (_1 === (12)) || (_1 === (13)) || (_1 === (32))) { + return true; + } + return false; + }; + exactSig.ptr.prototype.match = function(data, firstNonWS) { + var data, e, firstNonWS; + e = this; + if (bytes.HasPrefix(data, e.sig)) { + return e.ct; + } + return ""; + }; + exactSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; + maskedSig.ptr.prototype.match = function(data, firstNonWS) { + var _i, _ref, data, db, firstNonWS, i, m, mask, x$4; + m = this; + if (m.skipWS) { + data = $subslice(data, firstNonWS); + } + if (!((m.pat.$length === m.mask.$length))) { + return ""; + } + if (data.$length < m.mask.$length) { + return ""; + } + _ref = m.mask; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + mask = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + db = (((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]) & mask) >>> 0; + if (!((db === (x$4 = m.pat, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i]))))) { + return ""; + } + _i++; + } + return m.ct; + }; + maskedSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; + htmlSig.prototype.match = function(data, firstNonWS) { + var _i, _ref, b, data, db, db$1, firstNonWS, h, i, x$4; + h = this; + data = $subslice(data, firstNonWS); + if (data.$length < (h.$length + 1 >> 0)) { + return ""; + } + _ref = h; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + db = ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]); + if (65 <= b && b <= 90) { + db = (db & (223)) >>> 0; + } + if (!((b === db))) { + return ""; + } + _i++; + } + db$1 = (x$4 = h.$length, ((x$4 < 0 || x$4 >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x$4])); + if (!((db$1 === 32)) && !((db$1 === 62))) { + return ""; + } + return "text/html; charset=utf-8"; + }; + $ptrType(htmlSig).prototype.match = function(data, firstNonWS) { return this.$get().match(data, firstNonWS); }; + mp4Sig.ptr.prototype.match = function(data, firstNonWS) { + var _r$1, boxSize, data, firstNonWS, st; + if (data.$length < 12) { + return ""; + } + boxSize = (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(data, 0, 4)) >> 0)); + if (!(((_r$1 = boxSize % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0)) || data.$length < boxSize) { + return ""; + } + if (!bytes.Equal($subslice(data, 4, 8), mp4ftype)) { + return ""; + } + st = 8; + while (true) { + if (!(st < boxSize)) { break; } + if (st === 12) { + st = st + (4) >> 0; + continue; + } + if (bytes.Equal($subslice(data, st, (st + 3 >> 0)), mp4)) { + return "video/mp4"; + } + st = st + (4) >> 0; + } + return ""; + }; + mp4Sig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; + textSig.ptr.prototype.match = function(data, firstNonWS) { + var _i, _ref, b, data, firstNonWS; + _ref = $subslice(data, firstNonWS); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if ((b <= 8) || ((b === 11)) || (14 <= b && b <= 26) || (28 <= b && b <= 31)) { + return ""; + } + _i++; + } + return "text/plain; charset=utf-8"; + }; + textSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; + socksDialer.ptr.prototype.connect = function(ctx, c, address) { + var _, _1, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, address, am, am$1, ams, b, c, cmdErr, ctx, ctxErr, d, deadline, done, err, err$1, errCh, host, ip, ip4, ip6, l, ok, port, x$4, x$5, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _ = $f._; _1 = $f._1; _i = $f._i; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$12 = $f._tmp$12; _tmp$13 = $f._tmp$13; _tmp$14 = $f._tmp$14; _tmp$15 = $f._tmp$15; _tmp$16 = $f._tmp$16; _tmp$17 = $f._tmp$17; _tmp$18 = $f._tmp$18; _tmp$19 = $f._tmp$19; _tmp$2 = $f._tmp$2; _tmp$20 = $f._tmp$20; _tmp$21 = $f._tmp$21; _tmp$22 = $f._tmp$22; _tmp$23 = $f._tmp$23; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; a = $f.a; address = $f.address; am = $f.am; am$1 = $f.am$1; ams = $f.ams; b = $f.b; c = $f.c; cmdErr = $f.cmdErr; ctx = $f.ctx; ctxErr = $f.ctxErr; d = $f.d; deadline = $f.deadline; done = $f.done; err = $f.err; err$1 = $f.err$1; errCh = $f.errCh; host = $f.host; ip = $f.ip; ip4 = $f.ip4; ip6 = $f.ip6; l = $f.l; ok = $f.ok; port = $f.port; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + a = [a]; + c = [c]; + ctx = [ctx]; + ctxErr = [ctxErr]; + done = [done]; + errCh = [errCh]; + _ = $ifaceNil; + ctxErr[0] = $ifaceNil; + d = this; + _r$1 = sockssplitHostPort(address); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; + _tmp$1 = err; + _ = _tmp; + ctxErr[0] = _tmp$1; + $s = -1; return [_, ctxErr[0]]; + } + _r$2 = ctx[0].Deadline(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + deadline = $clone(_tuple$1[0], time.Time); + ok = _tuple$1[1]; + /* */ if (ok && !$clone(deadline, time.Time).IsZero()) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (ok && !$clone(deadline, time.Time).IsZero()) { */ case 3: + _r$3 = c[0].SetDeadline($clone(deadline, time.Time)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + $deferred.push([$methodVal(c[0], "SetDeadline"), [$clone(socksnoDeadline, time.Time)]]); + /* } */ case 4: + /* */ if (!($interfaceIsEqual(ctx[0], context.Background()))) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!($interfaceIsEqual(ctx[0], context.Background()))) { */ case 6: + errCh[0] = new $Chan($error, 1); + done[0] = new $Chan(structType, 0); + $deferred.push([(function(a, c, ctx, ctxErr, done, errCh) { return function $b() { + var _r$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $close(done[0]); + /* */ if ($interfaceIsEqual(ctxErr[0], $ifaceNil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(ctxErr[0], $ifaceNil)) { */ case 1: + _r$4 = $recv(errCh[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + ctxErr[0] = _r$4[0]; + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f.$s = $s; $f.$r = $r; return $f; + }; })(a, c, ctx, ctxErr, done, errCh), []]); + $go((function(a, c, ctx, ctxErr, done, errCh) { return function $b() { + var _r$4, _r$5, _r$6, _r$7, _selection, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _selection = $f._selection; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$4 = ctx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = $select([[_r$4], [done[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _selection = _r$5; + /* */ if (_selection[0] === 0) { $s = 3; continue; } + /* */ if (_selection[0] === 1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_selection[0] === 0) { */ case 3: + _r$6 = c[0].SetDeadline($clone(socksaLongTimeAgo, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _r$7 = ctx[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $r = $send(errCh[0], _r$7); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 5; continue; + /* } else if (_selection[0] === 1) { */ case 4: + $r = $send(errCh[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._selection = _selection; $f.$s = $s; $f.$r = $r; return $f; + }; })(a, c, ctx, ctxErr, done, errCh), []); + /* } */ case 7: + b = $makeSlice(sliceType$3, 0, (6 + host.length >> 0)); + b = $append(b, 5); + if ((d.AuthMethods.$length === 0) || d.Authenticate === $throwNilPointerError) { + b = $append(b, 1, 0); + } else { + ams = d.AuthMethods; + if (ams.$length > 255) { + _tmp$2 = $ifaceNil; + _tmp$3 = errors.New("too many authentication methods"); + _ = _tmp$2; + ctxErr[0] = _tmp$3; + $s = -1; return [_, ctxErr[0]]; + } + b = $append(b, ((ams.$length << 24 >>> 24))); + _ref = ams; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + am = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + b = $append(b, ((am << 24 >>> 24))); + _i++; + } + } + _r$4 = c[0].Write(b); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + ctxErr[0] = _tuple$2[1]; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + _r$5 = io.ReadFull(c[0], $subslice(b, 0, 2)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$3 = _r$5; + ctxErr[0] = _tuple$3[1]; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { + _tmp$4 = $ifaceNil; + _tmp$5 = errors.New("unexpected protocol version " + strconv.Itoa((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)))); + _ = _tmp$4; + ctxErr[0] = _tmp$5; + $s = -1; return [_, ctxErr[0]]; + } + am$1 = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); + if (am$1 === 255) { + _tmp$6 = $ifaceNil; + _tmp$7 = errors.New("no acceptable authentication methods"); + _ = _tmp$6; + ctxErr[0] = _tmp$7; + $s = -1; return [_, ctxErr[0]]; + } + /* */ if (!(d.Authenticate === $throwNilPointerError)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(d.Authenticate === $throwNilPointerError)) { */ case 10: + _r$6 = d.Authenticate(ctx[0], c[0], am$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + ctxErr[0] = _r$6; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + /* } */ case 11: + b = $subslice(b, 0, 0); + b = $append(b, 5, ((d.cmd << 24 >>> 24)), 0); + ip = net.ParseIP(host); + if (!(ip === net.IP.nil)) { + ip4 = ip.To4(); + if (!(ip4 === net.IP.nil)) { + b = $append(b, 1); + b = $appendSlice(b, $subslice(new sliceType$3(ip4.$array), ip4.$offset, ip4.$offset + ip4.$length)); + } else { + ip6 = ip.To16(); + if (!(ip6 === net.IP.nil)) { + b = $append(b, 4); + b = $appendSlice(b, $subslice(new sliceType$3(ip6.$array), ip6.$offset, ip6.$offset + ip6.$length)); + } else { + _tmp$8 = $ifaceNil; + _tmp$9 = errors.New("unknown address type"); + _ = _tmp$8; + ctxErr[0] = _tmp$9; + $s = -1; return [_, ctxErr[0]]; + } + } + } else { + if (host.length > 255) { + _tmp$10 = $ifaceNil; + _tmp$11 = errors.New("FQDN too long"); + _ = _tmp$10; + ctxErr[0] = _tmp$11; + $s = -1; return [_, ctxErr[0]]; + } + b = $append(b, 3); + b = $append(b, ((host.length << 24 >>> 24))); + b = $appendSlice(b, host); + } + b = $append(b, (((port >> 8 >> 0) << 24 >>> 24)), ((port << 24 >>> 24))); + _r$7 = c[0].Write(b); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$4 = _r$7; + ctxErr[0] = _tuple$4[1]; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + _r$8 = io.ReadFull(c[0], $subslice(b, 0, 4)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$5 = _r$8; + ctxErr[0] = _tuple$5[1]; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { + _tmp$12 = $ifaceNil; + _tmp$13 = errors.New("unexpected protocol version " + strconv.Itoa((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)))); + _ = _tmp$12; + ctxErr[0] = _tmp$13; + $s = -1; return [_, ctxErr[0]]; + } + cmdErr = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); + if (!((cmdErr === 0))) { + _tmp$14 = $ifaceNil; + _tmp$15 = errors.New("unknown error " + new socksReply(cmdErr).String()); + _ = _tmp$14; + ctxErr[0] = _tmp$15; + $s = -1; return [_, ctxErr[0]]; + } + if (!(((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) === 0))) { + _tmp$16 = $ifaceNil; + _tmp$17 = errors.New("non-zero reserved field"); + _ = _tmp$16; + ctxErr[0] = _tmp$17; + $s = -1; return [_, ctxErr[0]]; + } + l = 2; + a[0] = new socksAddr.ptr("", net.IP.nil, 0); + _1 = (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]); + /* */ if (_1 === (1)) { $s = 16; continue; } + /* */ if (_1 === (4)) { $s = 17; continue; } + /* */ if (_1 === (3)) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (_1 === (1)) { */ case 16: + l = l + (4) >> 0; + a[0].IP = $makeSlice(net.IP, 4); + $s = 20; continue; + /* } else if (_1 === (4)) { */ case 17: + l = l + (16) >> 0; + a[0].IP = $makeSlice(net.IP, 16); + $s = 20; continue; + /* } else if (_1 === (3)) { */ case 18: + _r$9 = io.ReadFull(c[0], $subslice(b, 0, 1)); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$6 = _r$9; + err$1 = _tuple$6[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$18 = $ifaceNil; + _tmp$19 = err$1; + _ = _tmp$18; + ctxErr[0] = _tmp$19; + $s = -1; return [_, ctxErr[0]]; + } + l = l + ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))) >> 0; + $s = 20; continue; + /* } else { */ case 19: + _tmp$20 = $ifaceNil; + _tmp$21 = errors.New("unknown address type " + strconv.Itoa((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)))); + _ = _tmp$20; + ctxErr[0] = _tmp$21; + $s = -1; return [_, ctxErr[0]]; + /* } */ case 20: + case 15: + if (b.$capacity < l) { + b = $makeSlice(sliceType$3, l); + } else { + b = $subslice(b, 0, l); + } + _r$10 = io.ReadFull(c[0], b); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$7 = _r$10; + ctxErr[0] = _tuple$7[1]; + if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { + $s = -1; return [_, ctxErr[0]]; + } + if (!(a[0].IP === net.IP.nil)) { + $copySlice(a[0].IP, b); + } else { + a[0].Name = ($bytesToString($subslice(b, 0, (b.$length - 2 >> 0)))); + } + a[0].Port = ((((x$4 = b.$length - 2 >> 0, ((x$4 < 0 || x$4 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$4])) >> 0)) << 8 >> 0) | (((x$5 = b.$length - 1 >> 0, ((x$5 < 0 || x$5 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$5])) >> 0)); + _tmp$22 = a[0]; + _tmp$23 = $ifaceNil; + _ = _tmp$22; + ctxErr[0] = _tmp$23; + $s = -1; return [_, ctxErr[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [_, ctxErr[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: socksDialer.ptr.prototype.connect }; } $f._ = _; $f._1 = _1; $f._i = _i; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$12 = _tmp$12; $f._tmp$13 = _tmp$13; $f._tmp$14 = _tmp$14; $f._tmp$15 = _tmp$15; $f._tmp$16 = _tmp$16; $f._tmp$17 = _tmp$17; $f._tmp$18 = _tmp$18; $f._tmp$19 = _tmp$19; $f._tmp$2 = _tmp$2; $f._tmp$20 = _tmp$20; $f._tmp$21 = _tmp$21; $f._tmp$22 = _tmp$22; $f._tmp$23 = _tmp$23; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f.a = a; $f.address = address; $f.am = am; $f.am$1 = am$1; $f.ams = ams; $f.b = b; $f.c = c; $f.cmdErr = cmdErr; $f.ctx = ctx; $f.ctxErr = ctxErr; $f.d = d; $f.deadline = deadline; $f.done = done; $f.err = err; $f.err$1 = err$1; $f.errCh = errCh; $f.host = host; $f.ip = ip; $f.ip4 = ip4; $f.ip6 = ip6; $f.l = l; $f.ok = ok; $f.port = port; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + socksDialer.prototype.connect = function(ctx, c, address) { return this.$val.connect(ctx, c, address); }; + sockssplitHostPort = function(address) { + var _r$1, _tuple, _tuple$1, address, err, host, port, portnum, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; address = $f.address; err = $f.err; host = $f.host; port = $f.port; portnum = $f.portnum; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = net.SplitHostPort(address); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + port = _tuple[1]; + err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", 0, err]; + } + _tuple$1 = strconv.Atoi(port); + portnum = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return ["", 0, err]; + } + if (1 > portnum || portnum > 65535) { + $s = -1; return ["", 0, errors.New("port number out of range " + port)]; + } + $s = -1; return [host, portnum, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: sockssplitHostPort }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.address = address; $f.err = err; $f.host = host; $f.port = port; $f.portnum = portnum; $f.$s = $s; $f.$r = $r; return $f; + }; + socksCommand.prototype.String = function() { + var _1, cmd; + cmd = this.$val; + _1 = cmd; + if (_1 === (1)) { + return "socks connect"; + } else if (_1 === (2)) { + return "socks bind"; + } else { + return "socks " + strconv.Itoa(((cmd >> 0))); + } + }; + $ptrType(socksCommand).prototype.String = function() { return new socksCommand(this.$get()).String(); }; + socksReply.prototype.String = function() { + var _1, code; + code = this.$val; + _1 = code; + if (_1 === (0)) { + return "succeeded"; + } else if (_1 === (1)) { + return "general SOCKS server failure"; + } else if (_1 === (2)) { + return "connection not allowed by ruleset"; + } else if (_1 === (3)) { + return "network unreachable"; + } else if (_1 === (4)) { + return "host unreachable"; + } else if (_1 === (5)) { + return "connection refused"; + } else if (_1 === (6)) { + return "TTL expired"; + } else if (_1 === (7)) { + return "command not supported"; + } else if (_1 === (8)) { + return "address type not supported"; + } else { + return "unknown code: " + strconv.Itoa(((code >> 0))); + } + }; + $ptrType(socksReply).prototype.String = function() { return new socksReply(this.$get()).String(); }; + socksAddr.ptr.prototype.Network = function() { + var a; + a = this; + return "socks"; + }; + socksAddr.prototype.Network = function() { return this.$val.Network(); }; + socksAddr.ptr.prototype.String = function() { + var a, port; + a = this; + if (a === ptrType$104.nil) { + return ""; + } + port = strconv.Itoa(a.Port); + if (a.IP === net.IP.nil) { + return net.JoinHostPort(a.Name, port); + } + return net.JoinHostPort(a.IP.String(), port); + }; + socksAddr.prototype.String = function() { return this.$val.String(); }; + socksConn.ptr.prototype.BoundAddr = function() { + var c; + c = this; + if (c === ptrType$105.nil) { + return $ifaceNil; + } + return c.boundAddr; + }; + socksConn.prototype.BoundAddr = function() { return this.$val.BoundAddr(); }; + socksDialer.ptr.prototype.DialContext = function(ctx, network, address) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, a, address, c, ctx, d, dd, dst, dst$1, dst$2, dst$3, err, err$1, network, proxy, proxy$1, proxy$2, proxy$3, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; a = $f.a; address = $f.address; c = $f.c; ctx = $f.ctx; d = $f.d; dd = $f.dd; dst = $f.dst; dst$1 = $f.dst$1; dst$2 = $f.dst$2; dst$3 = $f.dst$3; err = $f.err; err$1 = $f.err$1; network = $f.network; proxy = $f.proxy; proxy$1 = $f.proxy$1; proxy$2 = $f.proxy$2; proxy$3 = $f.proxy$3; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + err = d.validateTarget(network, address); + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: + _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + proxy = _tuple[0]; + dst = _tuple[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; + /* } */ case 2: + /* */ if ($interfaceIsEqual(ctx, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(ctx, $ifaceNil)) { */ case 4: + _r$2 = d.pathAddrs(address); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + proxy$1 = _tuple$1[0]; + dst$1 = _tuple$1[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, errors.New("nil context"))]; + /* } */ case 5: + err$1 = $ifaceNil; + c = $ifaceNil; + /* */ if (!(d.ProxyDial === $throwNilPointerError)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(d.ProxyDial === $throwNilPointerError)) { */ case 7: + _r$3 = d.ProxyDial(ctx, d.proxyNetwork, d.proxyAddress); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + c = _tuple$2[0]; + err$1 = _tuple$2[1]; + $s = 9; continue; + /* } else { */ case 8: + dd = new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$2.nil, $chanNil, $throwNilPointerError); + _r$4 = dd.DialContext(ctx, d.proxyNetwork, d.proxyAddress); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + c = _tuple$3[0]; + err$1 = _tuple$3[1]; + /* } */ case 9: + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: + _r$5 = d.pathAddrs(address); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + proxy$2 = _tuple$4[0]; + dst$2 = _tuple$4[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$2, dst$2, err$1)]; + /* } */ case 13: + _r$6 = d.connect(ctx, c, address); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple$5 = _r$6; + a = _tuple$5[0]; + err$1 = _tuple$5[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 16: + _r$7 = c.Close(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _r$7; + _r$8 = d.pathAddrs(address); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$6 = _r$8; + proxy$3 = _tuple$6[0]; + dst$3 = _tuple$6[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$3, dst$3, err$1)]; + /* } */ case 17: + $s = -1; return [new socksConn.ptr(c, a), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: socksDialer.ptr.prototype.DialContext }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f.a = a; $f.address = address; $f.c = c; $f.ctx = ctx; $f.d = d; $f.dd = dd; $f.dst = dst; $f.dst$1 = dst$1; $f.dst$2 = dst$2; $f.dst$3 = dst$3; $f.err = err; $f.err$1 = err$1; $f.network = network; $f.proxy = proxy; $f.proxy$1 = proxy$1; $f.proxy$2 = proxy$2; $f.proxy$3 = proxy$3; $f.$s = $s; $f.$r = $r; return $f; + }; + socksDialer.prototype.DialContext = function(ctx, network, address) { return this.$val.DialContext(ctx, network, address); }; + socksDialer.ptr.prototype.DialWithConn = function(ctx, c, network, address) { + var _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, a, address, c, ctx, d, dst, dst$1, dst$2, err, err$1, network, proxy, proxy$1, proxy$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; a = $f.a; address = $f.address; c = $f.c; ctx = $f.ctx; d = $f.d; dst = $f.dst; dst$1 = $f.dst$1; dst$2 = $f.dst$2; err = $f.err; err$1 = $f.err$1; network = $f.network; proxy = $f.proxy; proxy$1 = $f.proxy$1; proxy$2 = $f.proxy$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + err = d.validateTarget(network, address); + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: + _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + proxy = _tuple[0]; + dst = _tuple[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; + /* } */ case 2: + /* */ if ($interfaceIsEqual(ctx, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(ctx, $ifaceNil)) { */ case 4: + _r$2 = d.pathAddrs(address); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + proxy$1 = _tuple$1[0]; + dst$1 = _tuple$1[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, errors.New("nil context"))]; + /* } */ case 5: + _r$3 = d.connect(ctx, c, address); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + a = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: + _r$4 = d.pathAddrs(address); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + proxy$2 = _tuple$3[0]; + dst$2 = _tuple$3[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$2, dst$2, err$1)]; + /* } */ case 9: + $s = -1; return [a, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: socksDialer.ptr.prototype.DialWithConn }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f.a = a; $f.address = address; $f.c = c; $f.ctx = ctx; $f.d = d; $f.dst = dst; $f.dst$1 = dst$1; $f.dst$2 = dst$2; $f.err = err; $f.err$1 = err$1; $f.network = network; $f.proxy = proxy; $f.proxy$1 = proxy$1; $f.proxy$2 = proxy$2; $f.$s = $s; $f.$r = $r; return $f; + }; + socksDialer.prototype.DialWithConn = function(ctx, c, network, address) { return this.$val.DialWithConn(ctx, c, network, address); }; + socksDialer.ptr.prototype.Dial = function(network, address) { + var _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, address, c, d, dst, dst$1, err, err$1, err$2, network, proxy, proxy$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; address = $f.address; c = $f.c; d = $f.d; dst = $f.dst; dst$1 = $f.dst$1; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; network = $f.network; proxy = $f.proxy; proxy$1 = $f.proxy$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + d = this; + err = d.validateTarget(network, address); + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: + _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + proxy = _tuple[0]; + dst = _tuple[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; + /* } */ case 2: + err$1 = $ifaceNil; + c = $ifaceNil; + /* */ if (!(d.ProxyDial === $throwNilPointerError)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(d.ProxyDial === $throwNilPointerError)) { */ case 4: + _r$2 = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + c = _tuple$1[0]; + err$1 = _tuple$1[1]; + $s = 6; continue; + /* } else { */ case 5: + _tuple$2 = net.Dial(d.proxyNetwork, d.proxyAddress); + c = _tuple$2[0]; + err$1 = _tuple$2[1]; + /* } */ case 6: + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: + _r$3 = d.pathAddrs(address); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$3 = _r$3; + proxy$1 = _tuple$3[0]; + dst$1 = _tuple$3[1]; + $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, err$1)]; + /* } */ case 9: + _r$4 = d.DialWithConn(context.Background(), c, network, address); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$4 = _r$4; + err$2 = _tuple$4[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [$ifaceNil, err$2]; + } + $s = -1; return [c, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: socksDialer.ptr.prototype.Dial }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.address = address; $f.c = c; $f.d = d; $f.dst = dst; $f.dst$1 = dst$1; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.network = network; $f.proxy = proxy; $f.proxy$1 = proxy$1; $f.$s = $s; $f.$r = $r; return $f; + }; + socksDialer.prototype.Dial = function(network, address) { return this.$val.Dial(network, address); }; + socksDialer.ptr.prototype.validateTarget = function(network, address) { + var _1, _2, address, d, network; + d = this; + _1 = network; + if (_1 === ("tcp") || _1 === ("tcp6") || _1 === ("tcp4")) { + } else { + return errors.New("network not implemented"); + } + _2 = d.cmd; + if ((_2 === (1)) || (_2 === (2))) { + } else { + return errors.New("command not implemented"); + } + return $ifaceNil; + }; + socksDialer.prototype.validateTarget = function(network, address) { return this.$val.validateTarget(network, address); }; + socksDialer.ptr.prototype.pathAddrs = function(address) { + var _i, _r$1, _ref, _tmp, _tmp$1, _tmp$2, _tuple, a, address, d, dst, err, err$1, host, i, port, proxy, s, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _i = $f._i; _r$1 = $f._r$1; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tuple = $f._tuple; a = $f.a; address = $f.address; d = $f.d; dst = $f.dst; err = $f.err; err$1 = $f.err$1; host = $f.host; i = $f.i; port = $f.port; proxy = $f.proxy; s = $f.s; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + proxy = $ifaceNil; + dst = $ifaceNil; + err = $ifaceNil; + d = this; + _ref = new sliceType$1([d.proxyAddress, address]); + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = sockssplitHostPort(s); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + host = _tuple[0]; + port = _tuple[1]; + err$1 = _tuple[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp = $ifaceNil; + _tmp$1 = $ifaceNil; + _tmp$2 = err$1; + proxy = _tmp; + dst = _tmp$1; + err = _tmp$2; + $s = -1; return [proxy, dst, err]; + } + a = new socksAddr.ptr("", net.IP.nil, port); + a.IP = net.ParseIP(host); + if (a.IP === net.IP.nil) { + a.Name = host; + } + if (i === 0) { + proxy = a; + } else { + dst = a; + } + _i++; + /* } */ $s = 1; continue; case 2: + $s = -1; return [proxy, dst, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: socksDialer.ptr.prototype.pathAddrs }; } $f._i = _i; $f._r$1 = _r$1; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tuple = _tuple; $f.a = a; $f.address = address; $f.d = d; $f.dst = dst; $f.err = err; $f.err$1 = err$1; $f.host = host; $f.i = i; $f.port = port; $f.proxy = proxy; $f.s = s; $f.$s = $s; $f.$r = $r; return $f; + }; + socksDialer.prototype.pathAddrs = function(address) { return this.$val.pathAddrs(address); }; + socksNewDialer = function(network, address) { + var address, network; + return new socksDialer.ptr(1, network, address, $throwNilPointerError, sliceType$24.nil, $throwNilPointerError); + }; + socksUsernamePassword.ptr.prototype.Authenticate = function(ctx, rw, auth) { + var _1, _r$1, _r$2, _tuple, _tuple$1, auth, b, ctx, err, err$1, rw, up, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; auth = $f.auth; b = $f.b; ctx = $f.ctx; err = $f.err; err$1 = $f.err$1; rw = $f.rw; up = $f.up; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + up = this; + _1 = auth; + /* */ if (_1 === (0)) { $s = 2; continue; } + /* */ if (_1 === (2)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (_1 === (0)) { */ case 2: + $s = -1; return $ifaceNil; + /* } else if (_1 === (2)) { */ case 3: + if ((up.Username.length === 0) || up.Username.length > 255 || (up.Password.length === 0) || up.Password.length > 255) { + $s = -1; return errors.New("invalid username/password"); + } + b = new sliceType$3([1]); + b = $append(b, ((up.Username.length << 24 >>> 24))); + b = $appendSlice(b, up.Username); + b = $append(b, ((up.Password.length << 24 >>> 24))); + b = $appendSlice(b, up.Password); + _r$1 = rw.Write(b); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$2 = io.ReadFull(rw, $subslice(b, 0, 2)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 1))) { + $s = -1; return errors.New("invalid username/password version"); + } + if (!(((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) === 0))) { + $s = -1; return errors.New("username/password authentication failed"); + } + $s = -1; return $ifaceNil; + /* } */ case 4: + case 1: + $s = -1; return errors.New("unsupported authentication method " + strconv.Itoa(((auth >> 0)))); + /* */ } return; } if ($f === undefined) { $f = { $blk: socksUsernamePassword.ptr.prototype.Authenticate }; } $f._1 = _1; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.auth = auth; $f.b = b; $f.ctx = ctx; $f.err = err; $f.err$1 = err$1; $f.rw = rw; $f.up = up; $f.$s = $s; $f.$r = $r; return $f; + }; + socksUsernamePassword.prototype.Authenticate = function(ctx, rw, auth) { return this.$val.Authenticate(ctx, rw, auth); }; + StatusText = function(code) { + var _entry, code; + return (_entry = statusText[$Int.keyFor(code)], _entry !== undefined ? _entry.v : ""); + }; + $pkg.StatusText = StatusText; + errorReader.ptr.prototype.Read = function(p) { + var _tmp, _tmp$1, err, n, p, r; + n = 0; + err = $ifaceNil; + r = this; + _tmp = 0; + _tmp$1 = r.err; + n = _tmp; + err = _tmp$1; + return [n, err]; + }; + errorReader.prototype.Read = function(p) { return this.$val.Read(p); }; + byteReader.ptr.prototype.Read = function(p) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, br, err, n, p; + n = 0; + err = $ifaceNil; + br = this; + if (br.done) { + _tmp = 0; + _tmp$1 = io.EOF; + n = _tmp; + err = _tmp$1; + return [n, err]; + } + if (p.$length === 0) { + _tmp$2 = 0; + _tmp$3 = $ifaceNil; + n = _tmp$2; + err = _tmp$3; + return [n, err]; + } + br.done = true; + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = br.b); + _tmp$4 = 1; + _tmp$5 = io.EOF; + n = _tmp$4; + err = _tmp$5; + return [n, err]; + }; + byteReader.prototype.Read = function(p) { return this.$val.Read(p); }; + transferBodyReader.ptr.prototype.Read = function(p) { + var _r$1, _tuple, br, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; br = $f.br; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + br = this; + _r$1 = br.tw.Body.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { + br.tw.bodyReadError = err; + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferBodyReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.br = br; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + transferBodyReader.prototype.Read = function(p) { return this.$val.Read(p); }; + newTransferWriter = function(r) { + var _r$1, _r$2, _r$3, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, atLeastHTTP11, err, r, rr, rr$1, t, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _ref = $f._ref; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _v = $f._v; _v$1 = $f._v$1; atLeastHTTP11 = $f.atLeastHTTP11; err = $f.err; r = $f.r; rr = $f.rr; rr$1 = $f.rr$1; t = $f.t; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = ptrType$106.nil; + err = $ifaceNil; + t = new transferWriter.ptr("", $ifaceNil, $ifaceNil, false, new $Int64(0, 0), false, sliceType$1.nil, false, false, false, $ifaceNil, false, $chanNil); + atLeastHTTP11 = false; + _ref = r; + /* */ if ($assertType(_ref, ptrType$7, true)[1]) { $s = 1; continue; } + /* */ if ($assertType(_ref, ptrType$16, true)[1]) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($assertType(_ref, ptrType$7, true)[1]) { */ case 1: + rr = _ref.$val; + /* */ if (!((x$4 = rr.ContentLength, (x$4.$high === 0 && x$4.$low === 0))) && $interfaceIsEqual(rr.Body, $ifaceNil)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!((x$4 = rr.ContentLength, (x$4.$high === 0 && x$4.$low === 0))) && $interfaceIsEqual(rr.Body, $ifaceNil)) { */ case 4: + _tmp = ptrType$106.nil; + _r$1 = fmt.Errorf("http: Request.ContentLength=%d with nil Body", new sliceType([rr.ContentLength])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$1 = _r$1; + t = _tmp; + err = _tmp$1; + $s = -1; return [t, err]; + /* } */ case 5: + t.Method = valueOrDefault(rr.Method, "GET"); + t.Close = rr.Close; + t.TransferEncoding = rr.TransferEncoding; + t.Header = rr.Header; + t.Trailer = rr.Trailer; + t.Body = rr.Body; + t.BodyCloser = rr.Body; + t.ContentLength = rr.outgoingLength(); + if (!((x$5 = t.ContentLength, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low < 0))) && (t.TransferEncoding.$length === 0))) { _v = false; $s = 9; continue s; } + _r$2 = t.shouldSendChunkedRequestBody(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _v = _r$2; case 9: + /* */ if (_v) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (_v) { */ case 7: + t.TransferEncoding = new sliceType$1(["chunked"]); + /* } */ case 8: + if (!(!((x$6 = t.ContentLength, (x$6.$high === 0 && x$6.$low === 0))))) { _v$1 = false; $s = 13; continue s; } + _r$3 = isKnownInMemoryReader(t.Body); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _v$1 = !_r$3; case 13: + /* */ if (_v$1) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (_v$1) { */ case 11: + t.FlushHeaders = true; + /* } */ case 12: + atLeastHTTP11 = true; + $s = 3; continue; + /* } else if ($assertType(_ref, ptrType$16, true)[1]) { */ case 2: + rr$1 = _ref.$val; + t.IsResponse = true; + if (!(rr$1.Request === ptrType$7.nil)) { + t.Method = rr$1.Request.Method; + } + t.Body = rr$1.Body; + t.BodyCloser = rr$1.Body; + t.ContentLength = rr$1.ContentLength; + t.Close = rr$1.Close; + t.TransferEncoding = rr$1.TransferEncoding; + t.Header = rr$1.Header; + t.Trailer = rr$1.Trailer; + atLeastHTTP11 = rr$1.ProtoAtLeast(1, 1); + t.ResponseToHEAD = noResponseBodyExpected(t.Method); + /* } */ case 3: + if (t.ResponseToHEAD) { + t.Body = $ifaceNil; + if (chunked(t.TransferEncoding)) { + t.ContentLength = new $Int64(-1, 4294967295); + } + } else { + if (!atLeastHTTP11 || $interfaceIsEqual(t.Body, $ifaceNil)) { + t.TransferEncoding = sliceType$1.nil; + } + if (chunked(t.TransferEncoding)) { + t.ContentLength = new $Int64(-1, 4294967295); + } else if ($interfaceIsEqual(t.Body, $ifaceNil)) { + t.ContentLength = new $Int64(0, 0); + } + } + if (!chunked(t.TransferEncoding)) { + t.Trailer = false; + } + _tmp$2 = t; + _tmp$3 = $ifaceNil; + t = _tmp$2; + err = _tmp$3; + $s = -1; return [t, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: newTransferWriter }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._ref = _ref; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._v = _v; $f._v$1 = _v$1; $f.atLeastHTTP11 = atLeastHTTP11; $f.err = err; $f.r = r; $f.rr = rr; $f.rr$1 = rr$1; $f.t = t; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + transferWriter.ptr.prototype.shouldSendChunkedRequestBody = function() { + var t, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; t = $f.t; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + if ((x$4 = t.ContentLength, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low >= 0))) || $interfaceIsEqual(t.Body, $ifaceNil)) { + $s = -1; return false; + } + /* */ if (requestMethodUsuallyLacksBody(t.Method)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (requestMethodUsuallyLacksBody(t.Method)) { */ case 1: + $r = t.probeRequestBody(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return !($interfaceIsEqual(t.Body, $ifaceNil)); + /* } */ case 2: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferWriter.ptr.prototype.shouldSendChunkedRequestBody }; } $f.t = t; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + transferWriter.prototype.shouldSendChunkedRequestBody = function() { return this.$val.shouldSendChunkedRequestBody(); }; + transferWriter.ptr.prototype.probeRequestBody = function() { + var _r$1, _selection, rres, t, timer, x$4, x$5, x$6, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; rres = $f.rres; t = $f.t; timer = $f.timer; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = [t]; + t[0] = this; + t[0].ByteReadCh = new $Chan(readResult, 1); + $go((function(t) { return function $b(body$1) { + var _r$1, _tuple, body$1, buf, rres, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; body$1 = $f.body$1; buf = $f.buf; rres = $f.rres; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = arrayType$6.zero(); + rres = new readResult.ptr(0, $ifaceNil, 0); + _r$1 = body$1.Read(new sliceType$3(buf)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + rres.n = _tuple[0]; + rres.err = _tuple[1]; + if (rres.n === 1) { + rres.b = buf[0]; + } + $r = $send(t[0].ByteReadCh, $clone($clone(rres, readResult), readResult)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.body$1 = body$1; $f.buf = buf; $f.rres = rres; $f.$s = $s; $f.$r = $r; return $f; + }; })(t), [t[0].Body]); + timer = time.NewTimer(new time.Duration(0, 200000000)); + _r$1 = $select([[t[0].ByteReadCh], [timer.C]]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + rres = $clone(_selection[1][0], readResult); + timer.Stop(); + if ((rres.n === 0) && $interfaceIsEqual(rres.err, io.EOF)) { + t[0].Body = $ifaceNil; + t[0].ContentLength = new $Int64(0, 0); + } else if (rres.n === 1) { + if (!($interfaceIsEqual(rres.err, $ifaceNil))) { + t[0].Body = io.MultiReader(new sliceType$23([new byteReader.ptr(rres.b, false), (x$4 = new errorReader.ptr(rres.err), new x$4.constructor.elem(x$4))])); + } else { + t[0].Body = io.MultiReader(new sliceType$23([new byteReader.ptr(rres.b, false), t[0].Body])); + } + } else if (!($interfaceIsEqual(rres.err, $ifaceNil))) { + t[0].Body = (x$5 = new errorReader.ptr(rres.err), new x$5.constructor.elem(x$5)); + } + } else if (_selection[0] === 1) { + t[0].Body = io.MultiReader(new sliceType$23([(x$6 = new finishAsyncByteRead.ptr(t[0]), new x$6.constructor.elem(x$6)), t[0].Body])); + t[0].FlushHeaders = true; + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferWriter.ptr.prototype.probeRequestBody }; } $f._r$1 = _r$1; $f._selection = _selection; $f.rres = rres; $f.t = t; $f.timer = timer; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$r = $r; return $f; + }; + transferWriter.prototype.probeRequestBody = function() { return this.$val.probeRequestBody(); }; + noResponseBodyExpected = function(requestMethod) { + var requestMethod; + return requestMethod === "HEAD"; + }; + transferWriter.ptr.prototype.shouldSendContentLength = function() { + var t, x$4, x$5, x$6; + t = this; + if (chunked(t.TransferEncoding)) { + return false; + } + if ((x$4 = t.ContentLength, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 0)))) { + return true; + } + if ((x$5 = t.ContentLength, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low < 0)))) { + return false; + } + if (t.Method === "POST" || t.Method === "PUT") { + return true; + } + if ((x$6 = t.ContentLength, (x$6.$high === 0 && x$6.$low === 0)) && isIdentity(t.TransferEncoding)) { + if (t.Method === "GET" || t.Method === "HEAD") { + return false; + } + return true; + } + return false; + }; + transferWriter.prototype.shouldSendContentLength = function() { return this.$val.shouldSendContentLength(); }; + transferWriter.ptr.prototype.writeHeader = function(w, trace) { + var _1, _entry, _i, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, err, err$1, err$2, err$3, err$4, k, keys, t, trace, w, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; k = $f.k; keys = $f.keys; t = $f.t; trace = $f.trace; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + /* */ if (t.Close && !hasToken(new Header(t.Header).get("Connection"), "close")) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (t.Close && !hasToken(new Header(t.Header).get("Connection"), "close")) { */ case 1: + _r$1 = io.WriteString(w, "Connection: close\r\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* */ if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 4: + $r = trace.WroteHeaderField("Connection", new sliceType$1(["close"])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + /* } */ case 2: + /* */ if (t.shouldSendContentLength()) { $s = 7; continue; } + /* */ if (chunked(t.TransferEncoding)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (t.shouldSendContentLength()) { */ case 7: + _r$2 = io.WriteString(w, "Content-Length: "); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + _r$3 = io.WriteString(w, strconv.FormatInt(t.ContentLength, 10) + "\r\n"); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + err$2 = _tuple$2[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + /* */ if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 12: + $r = trace.WroteHeaderField("Content-Length", new sliceType$1([strconv.FormatInt(t.ContentLength, 10)])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 13: + $s = 9; continue; + /* } else if (chunked(t.TransferEncoding)) { */ case 8: + _r$4 = io.WriteString(w, "Transfer-Encoding: chunked\r\n"); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + err$3 = _tuple$3[1]; + if (!($interfaceIsEqual(err$3, $ifaceNil))) { + $s = -1; return err$3; + } + /* */ if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 16; continue; } + /* */ $s = 17; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 16: + $r = trace.WroteHeaderField("Transfer-Encoding", new sliceType$1(["chunked"])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 17: + /* } */ case 9: + /* */ if (!(t.Trailer === false)) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!(t.Trailer === false)) { */ case 19: + keys = $makeSlice(sliceType$1, 0, $keys(t.Trailer).length); + _ref = t.Trailer; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + k = CanonicalHeaderKey(k); + _1 = k; + if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { + $s = -1; return new badStringError.ptr("invalid Trailer key", k); + } + keys = $append(keys, k); + _i++; + } + /* */ if (keys.$length > 0) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (keys.$length > 0) { */ case 21: + $r = sort.Strings(keys); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$5 = io.WriteString(w, "Trailer: " + strings.Join(keys, ",") + "\r\n"); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + err$4 = _tuple$4[1]; + if (!($interfaceIsEqual(err$4, $ifaceNil))) { + $s = -1; return err$4; + } + /* */ if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 25: + $r = trace.WroteHeaderField("Trailer", keys); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + /* } */ case 22: + /* } */ case 20: + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferWriter.ptr.prototype.writeHeader }; } $f._1 = _1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.k = k; $f.keys = keys; $f.t = t; $f.trace = trace; $f.w = w; $f.$s = $s; $f.$r = $r; return $f; + }; + transferWriter.prototype.writeHeader = function(w, trace) { return this.$val.writeHeader(w, trace); }; + transferWriter.ptr.prototype.writeBody = function(w) { + var _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, body$1, bw, cw, err, err$1, err$2, ncopy, nextra, ok, t, w, x$4, x$5, x$6, x$7, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; body$1 = $f.body$1; bw = $f.bw; cw = $f.cw; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; ncopy = $f.ncopy; nextra = $f.nextra; ok = $f.ok; t = $f.t; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + err = $ifaceNil; + ncopy = new $Int64(0, 0); + /* */ if (!($interfaceIsEqual(t.Body, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(t.Body, $ifaceNil))) { */ case 1: + body$1 = new transferBodyReader.ptr(t); + /* */ if (chunked(t.TransferEncoding)) { $s = 3; continue; } + /* */ if ((x$4 = t.ContentLength, (x$4.$high === -1 && x$4.$low === 4294967295))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (chunked(t.TransferEncoding)) { */ case 3: + _tuple = $assertType(w, ptrType$10, true); + bw = _tuple[0]; + ok = _tuple[1]; + if (ok && !t.IsResponse) { + w = new internal.FlushAfterChunkWriter.ptr(bw); + } + cw = internal.NewChunkedWriter(w); + _r$1 = io.Copy(cw, new body$1.constructor.elem(body$1)); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + err = _tuple$1[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 8: + _r$2 = cw.Close(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + /* } */ case 9: + $s = 6; continue; + /* } else if ((x$4 = t.ContentLength, (x$4.$high === -1 && x$4.$low === 4294967295))) { */ case 4: + _r$3 = io.Copy(w, new body$1.constructor.elem(body$1)); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$2 = _r$3; + ncopy = _tuple$2[0]; + err = _tuple$2[1]; + $s = 6; continue; + /* } else { */ case 5: + _r$4 = io.Copy(w, io.LimitReader(new body$1.constructor.elem(body$1), t.ContentLength)); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$3 = _r$4; + ncopy = _tuple$3[0]; + err = _tuple$3[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + nextra = new $Int64(0, 0); + _r$5 = io.Copy(ioutil.Discard, new body$1.constructor.elem(body$1)); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tuple$4 = _r$5; + nextra = _tuple$4[0]; + err = _tuple$4[1]; + ncopy = (x$5 = nextra, new $Int64(ncopy.$high + x$5.$high, ncopy.$low + x$5.$low)); + /* } */ case 6: + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + /* } */ case 2: + /* */ if (!($interfaceIsEqual(t.BodyCloser, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(t.BodyCloser, $ifaceNil))) { */ case 14: + _r$6 = t.BodyCloser.Close(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err$1 = _r$6; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + $s = -1; return err$1; + } + /* } */ case 15: + /* */ if (!t.ResponseToHEAD && !((x$6 = t.ContentLength, (x$6.$high === -1 && x$6.$low === 4294967295))) && !((x$7 = t.ContentLength, (x$7.$high === ncopy.$high && x$7.$low === ncopy.$low)))) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (!t.ResponseToHEAD && !((x$6 = t.ContentLength, (x$6.$high === -1 && x$6.$low === 4294967295))) && !((x$7 = t.ContentLength, (x$7.$high === ncopy.$high && x$7.$low === ncopy.$low)))) { */ case 17: + _r$7 = fmt.Errorf("http: ContentLength=%d with Body length %d", new sliceType([t.ContentLength, ncopy])); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $s = -1; return _r$7; + /* } */ case 18: + /* */ if (chunked(t.TransferEncoding)) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if (chunked(t.TransferEncoding)) { */ case 20: + /* */ if (!(t.Trailer === false)) { $s = 22; continue; } + /* */ $s = 23; continue; + /* if (!(t.Trailer === false)) { */ case 22: + _r$8 = new Header(t.Trailer).Write(w); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + err$2 = _r$8; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return err$2; + } + /* } */ case 23: + _r$9 = io.WriteString(w, "\r\n"); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$5 = _r$9; + err = _tuple$5[1]; + /* } */ case 21: + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferWriter.ptr.prototype.writeBody }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f.body$1 = body$1; $f.bw = bw; $f.cw = cw; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.ncopy = ncopy; $f.nextra = nextra; $f.ok = ok; $f.t = t; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.$s = $s; $f.$r = $r; return $f; + }; + transferWriter.prototype.writeBody = function(w) { return this.$val.writeBody(w); }; + transferReader.ptr.prototype.protoAtLeast = function(m, n) { + var m, n, t; + t = this; + return t.ProtoMajor > m || ((t.ProtoMajor === m) && t.ProtoMinor >= n); + }; + transferReader.prototype.protoAtLeast = function(m, n) { return this.$val.protoAtLeast(m, n); }; + bodyAllowedForStatus = function(status) { + var status; + if (status >= 100 && status <= 199) { + return false; + } else if ((status === 204)) { + return false; + } else if ((status === 304)) { + return false; + } + return true; + }; + suppressedHeaders = function(status) { + var status; + if ((status === 304)) { + return suppressedHeaders304; + } else if (!bodyAllowedForStatus(status)) { + return suppressedHeadersNoBody; + } + return sliceType$1.nil; + }; + readTransfer = function(msg, r) { + var _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, err$1, isResponse, msg, n, r, realLength, rr, rr$1, rr$2, rr$3, rr$4, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _ref$1 = $f._ref$1; _ref$2 = $f._ref$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; err = $f.err; err$1 = $f.err$1; isResponse = $f.isResponse; msg = $f.msg; n = $f.n; r = $f.r; realLength = $f.realLength; rr = $f.rr; rr$1 = $f.rr$1; rr$2 = $f.rr$2; rr$3 = $f.rr$3; rr$4 = $f.rr$4; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = $ifaceNil; + t = new transferReader.ptr(false, 0, "GET", 0, 0, $ifaceNil, new $Int64(0, 0), sliceType$1.nil, false, false); + isResponse = false; + _ref = msg; + if ($assertType(_ref, ptrType$16, true)[1]) { + rr = _ref.$val; + t.Header = rr.Header; + t.StatusCode = rr.StatusCode; + t.ProtoMajor = rr.ProtoMajor; + t.ProtoMinor = rr.ProtoMinor; + t.Close = shouldClose(t.ProtoMajor, t.ProtoMinor, t.Header, true); + isResponse = true; + if (!(rr.Request === ptrType$7.nil)) { + t.RequestMethod = rr.Request.Method; + } + } else if ($assertType(_ref, ptrType$7, true)[1]) { + rr$1 = _ref.$val; + t.Header = rr$1.Header; + t.RequestMethod = rr$1.Method; + t.ProtoMajor = rr$1.ProtoMajor; + t.ProtoMinor = rr$1.ProtoMinor; + t.StatusCode = 200; + t.Close = rr$1.Close; + } else { + rr$2 = _ref; + $panic(new $String("unexpected type")); + } + if ((t.ProtoMajor === 0) && (t.ProtoMinor === 0)) { + _tmp = 1; + _tmp$1 = 1; + t.ProtoMajor = _tmp; + t.ProtoMinor = _tmp$1; + } + _r$1 = t.fixTransferEncoding(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = err; + $s = -1; return err; + } + _r$2 = fixLength(isResponse, t.StatusCode, t.RequestMethod, t.Header, t.TransferEncoding); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + realLength = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = err; + $s = -1; return err; + } + /* */ if (isResponse && t.RequestMethod === "HEAD") { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (isResponse && t.RequestMethod === "HEAD") { */ case 3: + _r$3 = parseContentLength(new Header(t.Header).get("Content-Length")); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$1 = _r$3; + n = _tuple$1[0]; + err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + err = err$1; + $s = -1; return err; + } else { + t.ContentLength = n; + } + $s = 5; continue; + /* } else { */ case 4: + t.ContentLength = realLength; + /* } */ case 5: + _r$4 = fixTrailer(t.Header, t.TransferEncoding); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$2 = _r$4; + t.Trailer = _tuple$2[0]; + err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + err = err; + $s = -1; return err; + } + _ref$1 = msg; + if ($assertType(_ref$1, ptrType$16, true)[1]) { + if ((realLength.$high === -1 && realLength.$low === 4294967295) && !chunked(t.TransferEncoding) && bodyAllowedForStatus(t.StatusCode)) { + t.Close = true; + } + } + if (chunked(t.TransferEncoding)) { + if (noResponseBodyExpected(t.RequestMethod) || !bodyAllowedForStatus(t.StatusCode)) { + t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + } else { + t.Body = new body.ptr(internal.NewChunkedReader(r), msg, r, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); + } + } else if ((realLength.$high === 0 && realLength.$low === 0)) { + t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + } else if ((realLength.$high > 0 || (realLength.$high === 0 && realLength.$low > 0))) { + t.Body = new body.ptr(io.LimitReader(r, realLength), $ifaceNil, ptrType$73.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); + } else if (t.Close) { + t.Body = new body.ptr(r, $ifaceNil, ptrType$73.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); + } else { + t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); + } + _ref$2 = msg; + if ($assertType(_ref$2, ptrType$7, true)[1]) { + rr$3 = _ref$2.$val; + rr$3.Body = t.Body; + rr$3.ContentLength = t.ContentLength; + rr$3.TransferEncoding = t.TransferEncoding; + rr$3.Close = t.Close; + rr$3.Trailer = t.Trailer; + } else if ($assertType(_ref$2, ptrType$16, true)[1]) { + rr$4 = _ref$2.$val; + rr$4.Body = t.Body; + rr$4.ContentLength = t.ContentLength; + rr$4.TransferEncoding = t.TransferEncoding; + rr$4.Close = t.Close; + rr$4.Trailer = t.Trailer; + } + err = $ifaceNil; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: readTransfer }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._ref$1 = _ref$1; $f._ref$2 = _ref$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.err = err; $f.err$1 = err$1; $f.isResponse = isResponse; $f.msg = msg; $f.n = n; $f.r = r; $f.realLength = realLength; $f.rr = rr; $f.rr$1 = rr$1; $f.rr$2 = rr$2; $f.rr$3 = rr$3; $f.rr$4 = rr$4; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + chunked = function(te) { + var te; + return te.$length > 0 && (0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "chunked"; + }; + isIdentity = function(te) { + var te; + return (te.$length === 1) && (0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "identity"; + }; + transferReader.ptr.prototype.fixTransferEncoding = function() { + var _entry, _i, _r$1, _r$2, _ref, _tuple, encoding, encodings, present, raw, t, te, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; _tuple = $f._tuple; encoding = $f.encoding; encodings = $f.encodings; present = $f.present; raw = $f.raw; t = $f.t; te = $f.te; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _tuple = (_entry = t.Header[$String.keyFor("Transfer-Encoding")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + raw = _tuple[0]; + present = _tuple[1]; + if (!present) { + $s = -1; return $ifaceNil; + } + delete t.Header[$String.keyFor("Transfer-Encoding")]; + if (!t.protoAtLeast(1, 1)) { + $s = -1; return $ifaceNil; + } + encodings = strings.Split((0 >= raw.$length ? ($throwRuntimeError("index out of range"), undefined) : raw.$array[raw.$offset + 0]), ","); + te = $makeSlice(sliceType$1, 0, encodings.$length); + _ref = encodings; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + encoding = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$1 = strings.TrimSpace(encoding); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.ToLower(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + encoding = _r$2; + if (encoding === "identity") { + /* break; */ $s = 2; continue; + } + if (!(encoding === "chunked")) { + $s = -1; return new badStringError.ptr("unsupported transfer encoding", encoding); + } + te = $subslice(te, 0, (te.$length + 1 >> 0)); + (x$4 = te.$length - 1 >> 0, ((x$4 < 0 || x$4 >= te.$length) ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + x$4] = encoding)); + _i++; + /* } */ $s = 1; continue; case 2: + if (te.$length > 1) { + $s = -1; return new badStringError.ptr("too many transfer encodings", strings.Join(te, ",")); + } + if (te.$length > 0) { + delete t.Header[$String.keyFor("Content-Length")]; + t.TransferEncoding = te; + $s = -1; return $ifaceNil; + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: transferReader.ptr.prototype.fixTransferEncoding }; } $f._entry = _entry; $f._i = _i; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f._tuple = _tuple; $f.encoding = encoding; $f.encodings = encodings; $f.present = present; $f.raw = raw; $f.t = t; $f.te = te; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + transferReader.prototype.fixTransferEncoding = function() { return this.$val.fixTransferEncoding(); }; + fixLength = function(isResponse, status, requestMethod, header, te) { + var _1, _entry, _entry$1, _i, _q, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, cl, contentLens, ct, err, first, header, isRequest, isResponse, n, requestMethod, status, te, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _q = $f._q; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _ref = $f._ref; _tuple = $f._tuple; cl = $f.cl; contentLens = $f.contentLens; ct = $f.ct; err = $f.err; first = $f.first; header = $f.header; isRequest = $f.isRequest; isResponse = $f.isResponse; n = $f.n; requestMethod = $f.requestMethod; status = $f.status; te = $f.te; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + isRequest = !isResponse; + contentLens = (_entry = header[$String.keyFor("Content-Length")], _entry !== undefined ? _entry.v : sliceType$1.nil); + /* */ if (contentLens.$length > 1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (contentLens.$length > 1) { */ case 1: + _r$1 = strings.TrimSpace((0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + first = _r$1; + _ref = $subslice(contentLens, 1); + _i = 0; + /* while (true) { */ case 4: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } + ct = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r$2 = strings.TrimSpace(ct); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (!(first === _r$2)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(first === _r$2)) { */ case 6: + _r$3 = fmt.Errorf("http: message cannot contain multiple Content-Length headers; got %q", new sliceType([contentLens])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [new $Int64(0, 0), _r$3]; + /* } */ case 7: + _i++; + /* } */ $s = 4; continue; case 5: + new Header(header).Del("Content-Length"); + new Header(header).Add("Content-Length", first); + contentLens = (_entry$1 = header[$String.keyFor("Content-Length")], _entry$1 !== undefined ? _entry$1.v : sliceType$1.nil); + /* } */ case 2: + /* */ if (noResponseBodyExpected(requestMethod)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (noResponseBodyExpected(requestMethod)) { */ case 10: + /* */ if (isRequest && contentLens.$length > 0 && !((contentLens.$length === 1) && (0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0]) === "0")) { $s = 12; continue; } + /* */ $s = 13; continue; + /* if (isRequest && contentLens.$length > 0 && !((contentLens.$length === 1) && (0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0]) === "0")) { */ case 12: + _r$4 = fmt.Errorf("http: method cannot contain a Content-Length; got %q", new sliceType([contentLens])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [new $Int64(0, 0), _r$4]; + /* } */ case 13: + $s = -1; return [new $Int64(0, 0), $ifaceNil]; + /* } */ case 11: + if ((_q = status / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === 1) { + $s = -1; return [new $Int64(0, 0), $ifaceNil]; + } + _1 = status; + if ((_1 === (204)) || (_1 === (304))) { + $s = -1; return [new $Int64(0, 0), $ifaceNil]; + } + if (chunked(te)) { + $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; + } + cl = ""; + /* */ if (contentLens.$length === 1) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (contentLens.$length === 1) { */ case 15: + _r$5 = strings.TrimSpace((0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0])); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + cl = _r$5; + /* } */ case 16: + /* */ if (!(cl === "")) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!(cl === "")) { */ case 18: + _r$6 = parseContentLength(cl); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tuple = _r$6; + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [new $Int64(-1, 4294967295), err]; + } + $s = -1; return [n, $ifaceNil]; + /* } */ case 19: + new Header(header).Del("Content-Length"); + if (isRequest) { + $s = -1; return [new $Int64(0, 0), $ifaceNil]; + } + $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: fixLength }; } $f._1 = _1; $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._q = _q; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._tuple = _tuple; $f.cl = cl; $f.contentLens = contentLens; $f.ct = ct; $f.err = err; $f.first = first; $f.header = header; $f.isRequest = isRequest; $f.isResponse = isResponse; $f.n = n; $f.requestMethod = requestMethod; $f.status = status; $f.te = te; $f.$s = $s; $f.$r = $r; return $f; + }; + shouldClose = function(major, minor, header, removeCloseHeader) { + var _entry, conv, hasClose, header, major, minor, removeCloseHeader; + if (major < 1) { + return true; + } + conv = (_entry = header[$String.keyFor("Connection")], _entry !== undefined ? _entry.v : sliceType$1.nil); + hasClose = httpguts.HeaderValuesContainsToken(conv, "close"); + if ((major === 1) && (minor === 0)) { + return hasClose || !httpguts.HeaderValuesContainsToken(conv, "keep-alive"); + } + if (hasClose && removeCloseHeader) { + new Header(header).Del("Connection"); + } + return hasClose; + }; + fixTrailer = function(header, te) { + var _entry, _i, _ref, _tuple, err, header, ok, te, trailer, v, vv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _ref = $f._ref; _tuple = $f._tuple; err = $f.err; header = $f.header; ok = $f.ok; te = $f.te; trailer = $f.trailer; v = $f.v; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + err = [err]; + trailer = [trailer]; + _tuple = (_entry = header[$String.keyFor("Trailer")], _entry !== undefined ? [_entry.v, true] : [sliceType$1.nil, false]); + vv = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + $s = -1; return [false, $ifaceNil]; + } + new Header(header).Del("Trailer"); + trailer[0] = {}; + err[0] = $ifaceNil; + _ref = vv; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + $r = foreachHeaderElement(v, (function(err, trailer) { return function(key) { + var _1, _key, key; + key = CanonicalHeaderKey(key); + _1 = key; + if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { + if ($interfaceIsEqual(err[0], $ifaceNil)) { + err[0] = new badStringError.ptr("bad trailer key", key); + return; + } + } + _key = key; (trailer[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$1.nil }; + }; })(err, trailer)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + /* } */ $s = 1; continue; case 2: + if (!($interfaceIsEqual(err[0], $ifaceNil))) { + $s = -1; return [false, err[0]]; + } + if ($keys(trailer[0]).length === 0) { + $s = -1; return [false, $ifaceNil]; + } + if (!chunked(te)) { + $s = -1; return [false, $pkg.ErrUnexpectedTrailer]; + } + $s = -1; return [trailer[0], $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: fixTrailer }; } $f._entry = _entry; $f._i = _i; $f._ref = _ref; $f._tuple = _tuple; $f.err = err; $f.header = header; $f.ok = ok; $f.te = te; $f.trailer = trailer; $f.v = v; $f.vv = vv; $f.$s = $s; $f.$r = $r; return $f; + }; + body.ptr.prototype.Read = function(p) { + var _r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; b = $f.b; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + b = this; + $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(b.mu, "Unlock"), []]); + if (b.closed) { + _tmp = 0; + _tmp$1 = $pkg.ErrBodyReadAfterClose; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = b.readLocked(p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: body.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.b = b; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + body.prototype.Read = function(p) { return this.$val.Read(p); }; + body.ptr.prototype.readLocked = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, e, err, lr, lr$1, n, ok, ok$1, p, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; e = $f.e; err = $f.err; lr = $f.lr; lr$1 = $f.lr$1; n = $f.n; ok = $f.ok; ok$1 = $f.ok$1; p = $f.p; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + b = this; + if (b.sawEOF) { + _tmp = 0; + _tmp$1 = io.EOF; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = b.src.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($interfaceIsEqual(err, io.EOF)) { */ case 2: + b.sawEOF = true; + /* */ if (!($interfaceIsEqual(b.hdr, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(b.hdr, $ifaceNil))) { */ case 4: + _r$2 = b.readTrailer(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + e = _r$2; + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = e; + b.sawEOF = false; + b.closed = true; + } + b.hdr = $ifaceNil; + $s = 6; continue; + /* } else { */ case 5: + _tuple$1 = $assertType(b.src, ptrType$93, true); + lr = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok && (x$4 = lr.N, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 0)))) { + err = io.ErrUnexpectedEOF; + } + /* } */ case 6: + /* } */ case 3: + if ($interfaceIsEqual(err, $ifaceNil) && n > 0) { + _tuple$2 = $assertType(b.src, ptrType$93, true); + lr$1 = _tuple$2[0]; + ok$1 = _tuple$2[1]; + if (ok$1 && (x$5 = lr$1.N, (x$5.$high === 0 && x$5.$low === 0))) { + err = io.EOF; + b.sawEOF = true; + } + } + /* */ if (b.sawEOF && !(b.onHitEOF === $throwNilPointerError)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (b.sawEOF && !(b.onHitEOF === $throwNilPointerError)) { */ case 8: + $r = b.onHitEOF(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + _tmp$2 = n; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: body.ptr.prototype.readLocked }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.e = e; $f.err = err; $f.lr = lr; $f.lr$1 = lr$1; $f.n = n; $f.ok = ok; $f.ok$1 = ok$1; $f.p = p; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + body.prototype.readLocked = function(p) { return this.$val.readLocked(p); }; + seeUpcomingDoubleCRLF = function(r) { + var _r$1, _tuple, buf, err, peekSize, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; buf = $f.buf; err = $f.err; peekSize = $f.peekSize; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + peekSize = 4; + /* while (true) { */ case 1: + _r$1 = r.Peek(peekSize); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + buf = _tuple[0]; + err = _tuple[1]; + if (bytes.HasSuffix(buf, doubleCRLF)) { + $s = -1; return true; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + /* break; */ $s = 2; continue; + } + peekSize = peekSize + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: seeUpcomingDoubleCRLF }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.peekSize = peekSize; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + body.ptr.prototype.readTrailer = function() { + var _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, b, buf, err, hdr, rr, rr$1, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; b = $f.b; buf = $f.buf; err = $f.err; hdr = $f.hdr; rr = $f.rr; rr$1 = $f.rr$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + b = this; + _r$1 = b.r.Peek(2); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + buf = _tuple[0]; + err = _tuple[1]; + /* */ if (bytes.Equal(buf, singleCRLF)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (bytes.Equal(buf, singleCRLF)) { */ case 2: + _r$2 = b.r.Discard(2); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$2; + $s = -1; return $ifaceNil; + /* } */ case 3: + if (buf.$length < 2) { + $s = -1; return errTrailerEOF; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return err; + } + _r$3 = seeUpcomingDoubleCRLF(b.r); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + /* */ if (!_r$3) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!_r$3) { */ case 5: + $s = -1; return errors.New("http: suspiciously long trailer after chunked body"); + /* } */ case 6: + _r$4 = textproto.NewReader(b.r).ReadMIMEHeader(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + hdr = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + $s = -1; return errTrailerEOF; + } + $s = -1; return err; + } + _ref = b.hdr; + if ($assertType(_ref, ptrType$7, true)[1]) { + rr = _ref.$val; + mergeSetHeader((rr.$ptr_Trailer || (rr.$ptr_Trailer = new ptrType$74(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr))), (hdr)); + } else if ($assertType(_ref, ptrType$16, true)[1]) { + rr$1 = _ref.$val; + mergeSetHeader((rr$1.$ptr_Trailer || (rr$1.$ptr_Trailer = new ptrType$74(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr$1))), (hdr)); + } + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: body.ptr.prototype.readTrailer }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.b = b; $f.buf = buf; $f.err = err; $f.hdr = hdr; $f.rr = rr; $f.rr$1 = rr$1; $f.$s = $s; $f.$r = $r; return $f; + }; + body.prototype.readTrailer = function() { return this.$val.readTrailer(); }; + mergeSetHeader = function(dst, src) { + var _entry, _i, _key, _keys, _ref, dst, k, src, vv; + if (dst.$get() === false) { + dst.$set(src); + return; + } + _ref = src; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + vv = _entry.v; + _key = k; (dst.$get() || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; + _i++; + } + }; + body.ptr.prototype.unreadDataSizeLocked = function() { + var _tuple, b, lr, ok; + b = this; + _tuple = $assertType(b.src, ptrType$93, true); + lr = _tuple[0]; + ok = _tuple[1]; + if (ok) { + return lr.N; + } + return new $Int64(-1, 4294967295); + }; + body.prototype.unreadDataSizeLocked = function() { return this.$val.unreadDataSizeLocked(); }; + body.ptr.prototype.Close = function() { + var _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, err, lr, n, ok, x$4, x$5, x$6, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; b = $f.b; err = $f.err; lr = $f.lr; n = $f.n; ok = $f.ok; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + b = this; + $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(b.mu, "Unlock"), []]); + if (b.closed) { + $s = -1; return $ifaceNil; + } + err = $ifaceNil; + /* */ if (b.sawEOF) { $s = 3; continue; } + /* */ if ($interfaceIsEqual(b.hdr, $ifaceNil) && b.closing) { $s = 4; continue; } + /* */ if (b.doEarlyClose) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (b.sawEOF) { */ case 3: + $s = 7; continue; + /* } else if ($interfaceIsEqual(b.hdr, $ifaceNil) && b.closing) { */ case 4: + $s = 7; continue; + /* } else if (b.doEarlyClose) { */ case 5: + _tuple = $assertType(b.src, ptrType$93, true); + lr = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok && (x$4 = lr.N, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 262144)))) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (ok && (x$4 = lr.N, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 262144)))) { */ case 8: + b.earlyClose = true; + $s = 10; continue; + /* } else { */ case 9: + n = new $Int64(0, 0); + _r$1 = io.CopyN(ioutil.Discard, (x$5 = new bodyLocked.ptr(b), new x$5.constructor.elem(x$5)), new $Int64(0, 262144)); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple$1 = _r$1; + n = _tuple$1[0]; + err = _tuple$1[1]; + if ($interfaceIsEqual(err, io.EOF)) { + err = $ifaceNil; + } + if ((n.$high === 0 && n.$low === 262144)) { + b.earlyClose = true; + } + /* } */ case 10: + $s = 7; continue; + /* } else { */ case 6: + _r$2 = io.Copy(ioutil.Discard, (x$6 = new bodyLocked.ptr(b), new x$6.constructor.elem(x$6))); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$2 = _r$2; + err = _tuple$2[1]; + /* } */ case 7: + case 2: + b.closed = true; + $s = -1; return err; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: body.ptr.prototype.Close }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.b = b; $f.err = err; $f.lr = lr; $f.n = n; $f.ok = ok; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + body.prototype.Close = function() { return this.$val.Close(); }; + body.ptr.prototype.didEarlyClose = function() { + var b, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + b = this; + $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(b.mu, "Unlock"), []]); + $s = -1; return b.earlyClose; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: body.ptr.prototype.didEarlyClose }; } $f.b = b; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + body.prototype.didEarlyClose = function() { return this.$val.didEarlyClose(); }; + body.ptr.prototype.bodyRemains = function() { + var b, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + b = this; + $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(b.mu, "Unlock"), []]); + $s = -1; return !b.sawEOF; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: body.ptr.prototype.bodyRemains }; } $f.b = b; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + body.prototype.bodyRemains = function() { return this.$val.bodyRemains(); }; + body.ptr.prototype.registerOnHitEOF = function(fn) { + var b, fn, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; fn = $f.fn; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + b = this; + $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(b.mu, "Unlock"), []]); + b.onHitEOF = fn; + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: body.ptr.prototype.registerOnHitEOF }; } $f.b = b; $f.fn = fn; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + body.prototype.registerOnHitEOF = function(fn) { return this.$val.registerOnHitEOF(fn); }; + bodyLocked.ptr.prototype.Read = function(p) { + var _r$1, _tmp, _tmp$1, _tuple, bl, err, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; bl = $f.bl; err = $f.err; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + bl = this; + if (bl.b.closed) { + _tmp = 0; + _tmp$1 = $pkg.ErrBodyReadAfterClose; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + _r$1 = bl.b.readLocked(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: bodyLocked.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.bl = bl; $f.err = err; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + bodyLocked.prototype.Read = function(p) { return this.$val.Read(p); }; + parseContentLength = function(cl) { + var _r$1, _tuple, cl, err, n, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; cl = $f.cl; err = $f.err; n = $f.n; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = strings.TrimSpace(cl); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cl = _r$1; + if (cl === "") { + $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; + } + _tuple = strconv.ParseInt(cl, 10, 64); + n = _tuple[0]; + err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) || (n.$high < 0 || (n.$high === 0 && n.$low < 0))) { + $s = -1; return [new $Int64(0, 0), new badStringError.ptr("bad Content-Length", cl)]; + } + $s = -1; return [n, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: parseContentLength }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.cl = cl; $f.err = err; $f.n = n; $f.$s = $s; $f.$r = $r; return $f; + }; + finishAsyncByteRead.ptr.prototype.Read = function(p) { + var _r$1, _tmp, _tmp$1, err, fr, n, p, rres, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; err = $f.err; fr = $f.fr; n = $f.n; p = $f.p; rres = $f.rres; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + fr = this; + if (p.$length === 0) { + $s = -1; return [n, err]; + } + _r$1 = $recv(fr.tw.ByteReadCh); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + rres = $clone(_r$1[0], readResult); + _tmp = rres.n; + _tmp$1 = rres.err; + n = _tmp; + err = _tmp$1; + if (n === 1) { + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = rres.b); + } + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: finishAsyncByteRead.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f.err = err; $f.fr = fr; $f.n = n; $f.p = p; $f.rres = rres; $f.$s = $s; $f.$r = $r; return $f; + }; + finishAsyncByteRead.prototype.Read = function(p) { return this.$val.Read(p); }; + isKnownInMemoryReader = function(r) { + var _r$1, _r$2, _r$3, _r$4, _ref, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _ref = $f._ref; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _ref = r; + if ($assertType(_ref, ptrType$85, true)[1] || $assertType(_ref, ptrType$37, true)[1] || $assertType(_ref, ptrType$86, true)[1]) { + $s = -1; return true; + } + /* */ if ($interfaceIsEqual(reflect.TypeOf(r), nopCloserType)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(reflect.TypeOf(r), nopCloserType)) { */ case 1: + _r$1 = reflect.ValueOf(r); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = $clone(_r$1, reflect.Value).Field(0); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _r$3 = $clone(_r$2, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$4 = isKnownInMemoryReader($assertType(_r$3, io.Reader)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 2: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: isKnownInMemoryReader }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._ref = _ref; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + init$3 = function() { + $close(connsPerHostClosedCh); + }; + Transport.ptr.prototype.onceSetNextProtoDefaults = function() { + var _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _v, _v$1, altProto, err, h2i, limit1, ok, rv, t, t2, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _v = $f._v; _v$1 = $f._v$1; altProto = $f.altProto; err = $f.err; h2i = $f.h2i; limit1 = $f.limit1; ok = $f.ok; rv = $f.rv; t = $f.t; t2 = $f.t2; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = os.Getenv("GODEBUG"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$2 = strings.Contains(_r$1, "http2client=0"); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$2) { */ case 1: + $s = -1; return; + /* } */ case 2: + _tuple = $assertType(t.altProto.Load(), mapType$1, true); + altProto = _tuple[0]; + _r$3 = reflect.ValueOf((_entry = altProto[$String.keyFor("https")], _entry !== undefined ? _entry.v : $ifaceNil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + rv = _r$3; + if (!($clone(rv, reflect.Value).IsValid())) { _v$1 = false; $s = 9; continue s; } + _r$4 = $clone(rv, reflect.Value).Type().Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _v$1 = _r$4 === 25; case 9: + if (!(_v$1)) { _v = false; $s = 8; continue s; } + _r$5 = $clone(rv, reflect.Value).Type().NumField(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _v = _r$5 === 1; case 8: + /* */ if (_v) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (_v) { */ case 6: + _r$6 = $clone(rv, reflect.Value).Field(0); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + v = _r$6; + /* */ if ($clone(v, reflect.Value).CanInterface()) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if ($clone(v, reflect.Value).CanInterface()) { */ case 13: + _r$7 = $clone(v, reflect.Value).Interface(); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _tuple$1 = $assertType(_r$7, h2Transport, true); + h2i = _tuple$1[0]; + ok = _tuple$1[1]; + if (ok) { + t.h2transport = h2i; + } + /* } */ case 14: + /* } */ case 7: + if (!(t.TLSNextProto === false)) { + $s = -1; return; + } + if (!(t.TLSClientConfig === ptrType$14.nil) || !(t.Dial === $throwNilPointerError) || !(t.DialTLS === $throwNilPointerError)) { + $s = -1; return; + } + _r$8 = http2configureTransport(t); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tuple$2 = _r$8; + t2 = _tuple$2[0]; + err = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } + /* */ $s = 18; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: + $r = log.Printf("Error enabling Transport HTTP/2 support: %v", new sliceType([err])); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 18: + t.h2transport = t2; + limit1 = t.MaxResponseHeaderBytes; + if (!((limit1.$high === 0 && limit1.$low === 0)) && (t2.MaxHeaderListSize === 0)) { + if ((limit1.$high > 0 || (limit1.$high === 0 && limit1.$low >= 4294967295))) { + t2.MaxHeaderListSize = 4294967295; + } else { + t2.MaxHeaderListSize = ((limit1.$low >>> 0)); + } + } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.onceSetNextProtoDefaults }; } $f._entry = _entry; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._v = _v; $f._v$1 = _v$1; $f.altProto = altProto; $f.err = err; $f.h2i = h2i; $f.limit1 = limit1; $f.ok = ok; $f.rv = rv; $f.t = t; $f.t2 = t2; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.onceSetNextProtoDefaults = function() { return this.$val.onceSetNextProtoDefaults(); }; + transportRequest.ptr.prototype.extraHeaders = function() { + var tr; + tr = this; + if (tr.extra === false) { + tr.extra = {}; + } + return tr.extra; + }; + transportRequest.prototype.extraHeaders = function() { return this.$val.extraHeaders(); }; + transportRequest.ptr.prototype.setError = function(err) { + var err, tr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; tr = $f.tr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + tr = this; + $r = tr.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ($interfaceIsEqual(tr.err, $ifaceNil)) { + tr.err = err; + } + $r = tr.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: transportRequest.ptr.prototype.setError }; } $f.err = err; $f.tr = tr; $f.$s = $s; $f.$r = $r; return $f; + }; + transportRequest.prototype.setError = function(err) { return this.$val.setError(err); }; + Transport.ptr.prototype.roundTrip = function(req) { + var _entry, _entry$1, _i, _i$1, _keys, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _v, altProto, altRT, cm, ctx, e, err, err$1, err$2, isHTTP, k, newReq, ok, pconn, req, resp, resp$1, scheme, t, trace, treq, v, vv, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _ref = $f._ref; _ref$1 = $f._ref$1; _selection = $f._selection; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; _v = $f._v; altProto = $f.altProto; altRT = $f.altRT; cm = $f.cm; ctx = $f.ctx; e = $f.e; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; isHTTP = $f.isHTTP; k = $f.k; newReq = $f.newReq; ok = $f.ok; pconn = $f.pconn; req = $f.req; resp = $f.resp; resp$1 = $f.resp$1; scheme = $f.scheme; t = $f.t; trace = $f.trace; treq = $f.treq; v = $f.v; vv = $f.vv; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.nextProtoOnce.Do($methodVal(t, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + ctx = req.Context(); + _r$1 = httptrace.ContextClientTrace(ctx); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace = _r$1; + /* */ if (req.URL === ptrType$19.nil) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (req.URL === ptrType$19.nil) { */ case 3: + $r = req.closeBody(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, errors.New("http: nil Request.URL")]; + /* } */ case 4: + /* */ if (req.Header === false) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (req.Header === false) { */ case 6: + $r = req.closeBody(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, errors.New("http: nil Request.Header")]; + /* } */ case 7: + scheme = req.URL.Scheme; + isHTTP = scheme === "http" || scheme === "https"; + /* */ if (isHTTP) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (isHTTP) { */ case 9: + _ref = req.Header; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 11: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 12; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 11; continue; + } + k = _entry.k; + vv = _entry.v; + /* */ if (!httpguts.ValidHeaderFieldName(k)) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (!httpguts.ValidHeaderFieldName(k)) { */ case 13: + _r$2 = fmt.Errorf("net/http: invalid header field name %q", new sliceType([new $String(k)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$2]; + /* } */ case 14: + _ref$1 = vv; + _i$1 = 0; + /* while (true) { */ case 16: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 17; continue; } + v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 18: + _r$3 = fmt.Errorf("net/http: invalid header field value %q for key %v", new sliceType([new $String(v), new $String(k)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$3]; + /* } */ case 19: + _i$1++; + /* } */ $s = 16; continue; case 17: + _i++; + /* } */ $s = 11; continue; case 12: + /* } */ case 10: + _tuple = $assertType(t.altProto.Load(), mapType$1, true); + altProto = _tuple[0]; + altRT = (_entry$1 = altProto[$String.keyFor(scheme)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil); + /* */ if (!($interfaceIsEqual(altRT, $ifaceNil))) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!($interfaceIsEqual(altRT, $ifaceNil))) { */ case 21: + _r$4 = altRT.RoundTrip(req); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + resp = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $pkg.ErrSkipAltProtocol))) { + $s = -1; return [resp, err]; + } + /* } */ case 22: + /* */ if (!isHTTP) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (!isHTTP) { */ case 24: + $r = req.closeBody(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, new badStringError.ptr("unsupported protocol scheme", scheme)]; + /* } */ case 25: + if (!(!(req.Method === ""))) { _v = false; $s = 29; continue s; } + _r$5 = validMethod(req.Method); /* */ $s = 30; case 30: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _v = !_r$5; case 29: + /* */ if (_v) { $s = 27; continue; } + /* */ $s = 28; continue; + /* if (_v) { */ case 27: + _r$6 = fmt.Errorf("net/http: invalid method %q", new sliceType([new $String(req.Method)])); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$6]; + /* } */ case 28: + /* */ if (req.URL.Host === "") { $s = 32; continue; } + /* */ $s = 33; continue; + /* if (req.URL.Host === "") { */ case 32: + $r = req.closeBody(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, errors.New("http: no Host in request URL")]; + /* } */ case 33: + /* while (true) { */ case 35: + newReq = [newReq]; + _r$7 = ctx.Done(); /* */ $s = 37; case 37: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _selection = $select([[_r$7], []]); + /* */ if (_selection[0] === 0) { $s = 38; continue; } + /* */ if (_selection[0] === 1) { $s = 39; continue; } + /* */ $s = 40; continue; + /* if (_selection[0] === 0) { */ case 38: + $r = req.closeBody(); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$8 = ctx.Err(); /* */ $s = 42; case 42: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, _r$8]; + /* } else if (_selection[0] === 1) { */ case 39: + /* } */ case 40: + treq = new transportRequest.ptr(req, false, trace, new sync.Mutex.ptr(0, 0), $ifaceNil); + _r$9 = t.connectMethodForRequest(treq); /* */ $s = 43; case 43: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$2 = _r$9; + cm = $clone(_tuple$2[0], connectMethod); + err$1 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 44; continue; } + /* */ $s = 45; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 44: + $r = req.closeBody(); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, err$1]; + /* } */ case 45: + _r$10 = t.getConn(treq, $clone(cm, connectMethod)); /* */ $s = 47; case 47: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$3 = _r$10; + pconn = _tuple$3[0]; + err$1 = _tuple$3[1]; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 48; continue; } + /* */ $s = 49; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 48: + $r = t.setReqCanceler(req, $throwNilPointerError); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = req.closeBody(); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$16.nil, err$1]; + /* } */ case 49: + resp$1 = ptrType$16.nil; + /* */ if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { $s = 52; continue; } + /* */ $s = 53; continue; + /* if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { */ case 52: + $r = t.decHostConnCount($clone(cm.key(), connectMethodKey)); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = t.setReqCanceler(req, $throwNilPointerError); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$11 = pconn.alt.RoundTrip(req); /* */ $s = 57; case 57: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _tuple$4 = _r$11; + resp$1 = _tuple$4[0]; + err$1 = _tuple$4[1]; + $s = 54; continue; + /* } else { */ case 53: + _r$12 = pconn.roundTrip(treq); /* */ $s = 58; case 58: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$5 = _r$12; + resp$1 = _tuple$5[0]; + err$1 = _tuple$5[1]; + /* } */ case 54: + if ($interfaceIsEqual(err$1, $ifaceNil)) { + $s = -1; return [resp$1, $ifaceNil]; + } + _r$13 = pconn.shouldRetryRequest(req, err$1); /* */ $s = 61; case 61: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + /* */ if (!_r$13) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (!_r$13) { */ case 59: + _tuple$6 = $assertType(err$1, transportReadFromServerError, true); + e = $clone(_tuple$6[0], transportReadFromServerError); + ok = _tuple$6[1]; + if (ok) { + err$1 = e.err; + } + $s = -1; return [ptrType$16.nil, err$1]; + /* } */ case 60: + $r = testHookRoundTripRetried(); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(req.GetBody === $throwNilPointerError) && $interfaceIsEqual(pconn.alt, $ifaceNil)) { $s = 63; continue; } + /* */ $s = 64; continue; + /* if (!(req.GetBody === $throwNilPointerError) && $interfaceIsEqual(pconn.alt, $ifaceNil)) { */ case 63: + newReq[0] = $clone(req, Request); + err$2 = $ifaceNil; + _r$14 = req.GetBody(); /* */ $s = 65; case 65: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _tuple$7 = _r$14; + newReq[0].Body = _tuple$7[0]; + err$2 = _tuple$7[1]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + $s = -1; return [ptrType$16.nil, err$2]; + } + req = newReq[0]; + /* } */ case 64: + /* } */ $s = 35; continue; case 36: + $s = -1; return [ptrType$16.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.roundTrip }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._i$1 = _i$1; $f._keys = _keys; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._ref = _ref; $f._ref$1 = _ref$1; $f._selection = _selection; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f._v = _v; $f.altProto = altProto; $f.altRT = altRT; $f.cm = cm; $f.ctx = ctx; $f.e = e; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.isHTTP = isHTTP; $f.k = k; $f.newReq = newReq; $f.ok = ok; $f.pconn = pconn; $f.req = req; $f.resp = resp; $f.resp$1 = resp$1; $f.scheme = scheme; $f.t = t; $f.trace = trace; $f.treq = treq; $f.v = v; $f.vv = vv; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.roundTrip = function(req) { return this.$val.roundTrip(req); }; + persistConn.ptr.prototype.shouldRetryRequest = function(req, err) { + var _r$1, _tuple, _tuple$1, err, ok, ok$1, pc, req, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; ok = $f.ok; ok$1 = $f.ok$1; pc = $f.pc; req = $f.req; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + if (http2isNoCachedConnError(err)) { + $s = -1; return true; + } + if ($interfaceIsEqual(err, errMissingHost)) { + $s = -1; return false; + } + _r$1 = pc.isReused(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!_r$1) { */ case 1: + $s = -1; return false; + /* } */ case 2: + _tuple = $assertType(err, nothingWrittenError, true); + ok = _tuple[1]; + if (ok) { + $s = -1; return (x$4 = req.outgoingLength(), (x$4.$high === 0 && x$4.$low === 0)) || !(req.GetBody === $throwNilPointerError); + } + if (!req.isReplayable()) { + $s = -1; return false; + } + _tuple$1 = $assertType(err, transportReadFromServerError, true); + ok$1 = _tuple$1[1]; + if (ok$1) { + $s = -1; return true; + } + if ($interfaceIsEqual(err, errServerClosedIdle)) { + $s = -1; return true; + } + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.shouldRetryRequest }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.ok = ok; $f.ok$1 = ok$1; $f.pc = pc; $f.req = req; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.shouldRetryRequest = function(req, err) { return this.$val.shouldRetryRequest(req, err); }; + Transport.ptr.prototype.RegisterProtocol = function(scheme, rt) { + var _entry, _entry$1, _i, _key, _key$1, _keys, _ref, _tuple, _tuple$1, exists, k, newMap, oldMap, rt, scheme, t, v, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _key$1 = $f._key$1; _keys = $f._keys; _ref = $f._ref; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; exists = $f.exists; k = $f.k; newMap = $f.newMap; oldMap = $f.oldMap; rt = $f.rt; scheme = $f.scheme; t = $f.t; v = $f.v; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + $r = t.altMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.altMu, "Unlock"), []]); + _tuple = $assertType(t.altProto.Load(), mapType$1, true); + oldMap = _tuple[0]; + _tuple$1 = (_entry = oldMap[$String.keyFor(scheme)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); + exists = _tuple$1[1]; + if (exists) { + $panic(new $String("protocol " + scheme + " already registered")); + } + newMap = {}; + _ref = oldMap; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry$1 = _ref[_keys[_i]]; + if (_entry$1 === undefined) { + _i++; + continue; + } + k = _entry$1.k; + v = _entry$1.v; + _key = k; (newMap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; + _i++; + } + _key$1 = scheme; (newMap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: rt }; + t.altProto.Store(new mapType$1(newMap)); + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.RegisterProtocol }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._key$1 = _key$1; $f._keys = _keys; $f._ref = _ref; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.exists = exists; $f.k = k; $f.newMap = newMap; $f.oldMap = oldMap; $f.rt = rt; $f.scheme = scheme; $f.t = t; $f.v = v; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.RegisterProtocol = function(scheme, rt) { return this.$val.RegisterProtocol(scheme, rt); }; + Transport.ptr.prototype.CloseIdleConnections = function() { + var _entry, _i, _i$1, _keys, _ref, _ref$1, conns, m, pconn, t, t2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _i = $f._i; _i$1 = $f._i$1; _keys = $f._keys; _ref = $f._ref; _ref$1 = $f._ref$1; conns = $f.conns; m = $f.m; pconn = $f.pconn; t = $f.t; t2 = $f.t2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.nextProtoOnce.Do($methodVal(t, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = t.idleMu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + m = t.idleConn; + t.idleConn = false; + t.idleConnCh = false; + t.wantIdle = true; + connLRU.copy(t.idleLRU, new connLRU.ptr(ptrType$13.nil, false)); + $r = t.idleMu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _ref = m; + _i = 0; + _keys = $keys(_ref); + /* while (true) { */ case 4: + /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 5; continue; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + /* continue; */ $s = 4; continue; + } + conns = _entry.v; + _ref$1 = conns; + _i$1 = 0; + /* while (true) { */ case 6: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 7; continue; } + pconn = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + $r = pconn.close(errCloseIdleConns); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i$1++; + /* } */ $s = 6; continue; case 7: + _i++; + /* } */ $s = 4; continue; case 5: + t2 = t.h2transport; + /* */ if (!($interfaceIsEqual(t2, $ifaceNil))) { $s = 9; continue; } + /* */ $s = 10; continue; + /* if (!($interfaceIsEqual(t2, $ifaceNil))) { */ case 9: + $r = t2.CloseIdleConnections(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 10: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.CloseIdleConnections }; } $f._entry = _entry; $f._i = _i; $f._i$1 = _i$1; $f._keys = _keys; $f._ref = _ref; $f._ref$1 = _ref$1; $f.conns = conns; $f.m = m; $f.pconn = pconn; $f.t = t; $f.t2 = t2; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.CloseIdleConnections = function() { return this.$val.CloseIdleConnections(); }; + Transport.ptr.prototype.CancelRequest = function(req) { + var req, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; req = $f.req; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.cancelRequest(req, errRequestCanceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.CancelRequest }; } $f.req = req; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.CancelRequest = function(req) { return this.$val.CancelRequest(req); }; + Transport.ptr.prototype.cancelRequest = function(req, err) { + var _entry, cancel, err, req, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; cancel = $f.cancel; err = $f.err; req = $f.req; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cancel = (_entry = t.reqCanceler[ptrType$7.keyFor(req)], _entry !== undefined ? _entry.v : $throwNilPointerError); + delete t.reqCanceler[ptrType$7.keyFor(req)]; + $r = t.reqMu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(cancel === $throwNilPointerError)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!(cancel === $throwNilPointerError)) { */ case 3: + $r = cancel(err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.cancelRequest }; } $f._entry = _entry; $f.cancel = cancel; $f.err = err; $f.req = req; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.cancelRequest = function(req, err) { return this.$val.cancelRequest(req, err); }; + Transport.ptr.prototype.connectMethodForRequest = function(treq) { + var _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, cm, err, port, port$1, t, treq, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; cm = $f.cm; err = $f.err; port = $f.port; port$1 = $f.port$1; t = $f.t; treq = $f.treq; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cm = new connectMethod.ptr(ptrType$19.nil, "", ""); + err = $ifaceNil; + t = this; + port = treq.Request.URL.Port(); + /* */ if (!validPort(port)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!validPort(port)) { */ case 1: + _tmp = $clone(cm, connectMethod); + _r$1 = fmt.Errorf("invalid URL port %q", new sliceType([new $String(port)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$1 = _r$1; + connectMethod.copy(cm, _tmp); + err = _tmp$1; + $s = -1; return [cm, err]; + /* } */ case 2: + cm.targetScheme = treq.Request.URL.Scheme; + _r$2 = canonicalAddr(treq.Request.URL); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + cm.targetAddr = _r$2; + /* */ if (!(t.Proxy === $throwNilPointerError)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (!(t.Proxy === $throwNilPointerError)) { */ case 5: + _r$3 = t.Proxy(treq.Request); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + cm.proxyURL = _tuple[0]; + err = _tuple[1]; + /* */ if ($interfaceIsEqual(err, $ifaceNil) && !(cm.proxyURL === ptrType$19.nil)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if ($interfaceIsEqual(err, $ifaceNil) && !(cm.proxyURL === ptrType$19.nil)) { */ case 8: + port$1 = cm.proxyURL.Port(); + /* */ if (!validPort(port$1)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!validPort(port$1)) { */ case 10: + _tmp$2 = $clone(cm, connectMethod); + _r$4 = fmt.Errorf("invalid proxy URL port %q", new sliceType([new $String(port$1)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tmp$3 = _r$4; + connectMethod.copy(cm, _tmp$2); + err = _tmp$3; + $s = -1; return [cm, err]; + /* } */ case 11: + /* } */ case 9: + /* } */ case 6: + _tmp$4 = $clone(cm, connectMethod); + _tmp$5 = err; + connectMethod.copy(cm, _tmp$4); + err = _tmp$5; + $s = -1; return [cm, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.connectMethodForRequest }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.cm = cm; $f.err = err; $f.port = port; $f.port$1 = port$1; $f.t = t; $f.treq = treq; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.connectMethodForRequest = function(treq) { return this.$val.connectMethodForRequest(treq); }; + connectMethod.ptr.prototype.proxyAuth = function() { + var _tuple, cm, password, u, username; + cm = this; + if (cm.proxyURL === ptrType$19.nil) { + return ""; + } + u = cm.proxyURL.User; + if (!(u === ptrType$18.nil)) { + username = u.Username(); + _tuple = u.Password(); + password = _tuple[0]; + return "Basic " + basicAuth(username, password); + } + return ""; + }; + connectMethod.prototype.proxyAuth = function() { return this.$val.proxyAuth(); }; + transportReadFromServerError.ptr.prototype.Error = function() { + var _r$1, e, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + e = this; + _r$1 = fmt.Sprintf("net/http: Transport failed to read from server: %v", new sliceType([e.err])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: transportReadFromServerError.ptr.prototype.Error }; } $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f; + }; + transportReadFromServerError.prototype.Error = function() { return this.$val.Error(); }; + Transport.ptr.prototype.putOrCloseIdleConn = function(pconn) { + var _r$1, err, pconn, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; pconn = $f.pconn; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + _r$1 = t.tryPutIdleConn(pconn); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + $r = pconn.close(err); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.putOrCloseIdleConn }; } $f._r$1 = _r$1; $f.err = err; $f.pconn = pconn; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.putOrCloseIdleConn = function(pconn) { return this.$val.putOrCloseIdleConn(pconn); }; + Transport.ptr.prototype.maxIdleConnsPerHost = function() { + var t, v; + t = this; + v = t.MaxIdleConnsPerHost; + if (!((v === 0))) { + return v; + } + return 2; + }; + Transport.prototype.maxIdleConnsPerHost = function() { return this.$val.maxIdleConnsPerHost(); }; + Transport.ptr.prototype.tryPutIdleConn = function(pconn) { + var _entry, _entry$1, _i, _key, _r$1, _ref, _selection, exist, idles, key, oldest, pconn, t, waitingDialer, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _i = $f._i; _key = $f._key; _r$1 = $f._r$1; _ref = $f._ref; _selection = $f._selection; exist = $f.exist; idles = $f.idles; key = $f.key; oldest = $f.oldest; pconn = $f.pconn; t = $f.t; waitingDialer = $f.waitingDialer; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + if (t.DisableKeepAlives || t.MaxIdleConnsPerHost < 0) { + $s = -1; return errKeepAlivesDisabled; + } + _r$1 = pconn.isBroken(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (_r$1) { */ case 1: + $s = -1; return errConnBroken; + /* } */ case 2: + if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { + $s = -1; return errNotCachingH2Conn; + } + $r = pconn.markReused(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + key = $clone(pconn.cacheKey, connectMethodKey); + $r = t.idleMu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); + waitingDialer = (_entry = t.idleConnCh[connectMethodKey.keyFor(key)], _entry !== undefined ? _entry.v : $chanNil); + _selection = $select([[waitingDialer, pconn], []]); + if (_selection[0] === 0) { + $s = -1; return $ifaceNil; + } else if (_selection[0] === 1) { + if (!(waitingDialer === $chanNil)) { + delete t.idleConnCh[connectMethodKey.keyFor(key)]; + } + } + if (t.wantIdle) { + $s = -1; return errWantIdle; + } + if (t.idleConn === false) { + t.idleConn = {}; + } + idles = (_entry$1 = t.idleConn[connectMethodKey.keyFor(key)], _entry$1 !== undefined ? _entry$1.v : sliceType$25.nil); + if (idles.$length >= t.maxIdleConnsPerHost()) { + $s = -1; return errTooManyIdleHost; + } + _ref = idles; + _i = 0; + /* while (true) { */ case 6: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 7; continue; } + exist = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + /* */ if (exist === pconn) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (exist === pconn) { */ case 8: + $r = log.Fatalf("dup idle pconn %p in freelist", new sliceType([pconn])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + _i++; + /* } */ $s = 6; continue; case 7: + _key = $clone(key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $append(idles, pconn) }; + t.idleLRU.add(pconn); + /* */ if (!((t.MaxIdleConns === 0)) && t.idleLRU.len() > t.MaxIdleConns) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if (!((t.MaxIdleConns === 0)) && t.idleLRU.len() > t.MaxIdleConns) { */ case 11: + oldest = t.idleLRU.removeOldest(); + $r = oldest.close(errTooManyIdle); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + t.removeIdleConnLocked(oldest); + /* } */ case 12: + if ((x$4 = t.IdleConnTimeout, (x$4.$high > 0 || (x$4.$high === 0 && x$4.$low > 0)))) { + if (!(pconn.idleTimer === ptrType$57.nil)) { + pconn.idleTimer.Reset(t.IdleConnTimeout); + } else { + pconn.idleTimer = time.AfterFunc(t.IdleConnTimeout, $methodVal(pconn, "closeConnIfStillIdle")); + } + } + time.Time.copy(pconn.idleAt, time.Now()); + $s = -1; return $ifaceNil; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.tryPutIdleConn }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._i = _i; $f._key = _key; $f._r$1 = _r$1; $f._ref = _ref; $f._selection = _selection; $f.exist = exist; $f.idles = idles; $f.key = key; $f.oldest = oldest; $f.pconn = pconn; $f.t = t; $f.waitingDialer = waitingDialer; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.tryPutIdleConn = function(pconn) { return this.$val.tryPutIdleConn(pconn); }; + Transport.ptr.prototype.getIdleConnCh = function(cm) { + var _entry, _key, _tuple, ch, cm, key, ok, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _tuple = $f._tuple; ch = $f.ch; cm = $f.cm; key = $f.key; ok = $f.ok; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + if (t.DisableKeepAlives) { + $s = -1; return $chanNil; + } + key = $clone(cm.key(), connectMethodKey); + $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); + t.wantIdle = false; + if (t.idleConnCh === false) { + t.idleConnCh = {}; + } + _tuple = (_entry = t.idleConnCh[connectMethodKey.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [$chanNil, false]); + ch = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + ch = new $Chan(ptrType$107, 0); + _key = $clone(key, connectMethodKey); (t.idleConnCh || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: ch }; + } + $s = -1; return ch; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.getIdleConnCh }; } $f._entry = _entry; $f._key = _key; $f._tuple = _tuple; $f.ch = ch; $f.cm = cm; $f.key = key; $f.ok = ok; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.getIdleConnCh = function(cm) { return this.$val.getIdleConnCh(cm); }; + Transport.ptr.prototype.getIdleConn = function(cm) { + var _entry, _key, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, cm, idleSince, key, ok, pconn, pconns, t, x$4, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _r$1 = $f._r$1; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; cm = $f.cm; idleSince = $f.idleSince; key = $f.key; ok = $f.ok; pconn = $f.pconn; pconns = $f.pconns; t = $f.t; x$4 = $f.x$4; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pconn = ptrType$107.nil; + idleSince = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + t = this; + key = $clone(cm.key(), connectMethodKey); + $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); + /* while (true) { */ case 2: + _tuple = (_entry = t.idleConn[connectMethodKey.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [sliceType$25.nil, false]); + pconns = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + _tmp = ptrType$107.nil; + _tmp$1 = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); + pconn = _tmp; + time.Time.copy(idleSince, _tmp$1); + $s = -1; return [pconn, idleSince]; + } + if (pconns.$length === 1) { + pconn = (0 >= pconns.$length ? ($throwRuntimeError("index out of range"), undefined) : pconns.$array[pconns.$offset + 0]); + delete t.idleConn[connectMethodKey.keyFor(key)]; + } else { + pconn = (x$4 = pconns.$length - 1 >> 0, ((x$4 < 0 || x$4 >= pconns.$length) ? ($throwRuntimeError("index out of range"), undefined) : pconns.$array[pconns.$offset + x$4])); + _key = $clone(key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $subslice(pconns, 0, (pconns.$length - 1 >> 0)) }; + } + t.idleLRU.remove(pconn); + _r$1 = pconn.isBroken(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (_r$1) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$1) { */ case 4: + /* continue; */ $s = 2; continue; + /* } */ case 5: + _tmp$2 = pconn; + _tmp$3 = $clone(pconn.idleAt, time.Time); + pconn = _tmp$2; + time.Time.copy(idleSince, _tmp$3); + $s = -1; return [pconn, idleSince]; + /* } */ $s = 2; continue; case 3: + $s = -1; return [pconn, idleSince]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [pconn, idleSince]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.getIdleConn }; } $f._entry = _entry; $f._key = _key; $f._r$1 = _r$1; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f.cm = cm; $f.idleSince = idleSince; $f.key = key; $f.ok = ok; $f.pconn = pconn; $f.pconns = pconns; $f.t = t; $f.x$4 = x$4; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.getIdleConn = function(cm) { return this.$val.getIdleConn(cm); }; + Transport.ptr.prototype.removeIdleConn = function(pconn) { + var pconn, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; pconn = $f.pconn; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); + t.removeIdleConnLocked(pconn); + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.removeIdleConn }; } $f.pconn = pconn; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.removeIdleConn = function(pconn) { return this.$val.removeIdleConn(pconn); }; + Transport.ptr.prototype.removeIdleConnLocked = function(pconn) { + var _1, _entry, _i, _key, _ref, i, key, pconn, pconns, t, v; + t = this; + if (!(pconn.idleTimer === ptrType$57.nil)) { + pconn.idleTimer.Stop(); + } + t.idleLRU.remove(pconn); + key = $clone(pconn.cacheKey, connectMethodKey); + pconns = (_entry = t.idleConn[connectMethodKey.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$25.nil); + _1 = pconns.$length; + if (_1 === (0)) { + } else if (_1 === (1)) { + if ((0 >= pconns.$length ? ($throwRuntimeError("index out of range"), undefined) : pconns.$array[pconns.$offset + 0]) === pconn) { + delete t.idleConn[connectMethodKey.keyFor(key)]; + } + } else { + _ref = pconns; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!(v === pconn)) { + _i++; + continue; + } + $copySlice($subslice(pconns, i), $subslice(pconns, (i + 1 >> 0))); + _key = $clone(key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $subslice(pconns, 0, (pconns.$length - 1 >> 0)) }; + break; + } + } + }; + Transport.prototype.removeIdleConnLocked = function(pconn) { return this.$val.removeIdleConnLocked(pconn); }; + Transport.ptr.prototype.setReqCanceler = function(r, fn) { + var _key, fn, r, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _key = $f._key; fn = $f.fn; r = $f.r; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.reqMu, "Unlock"), []]); + if (t.reqCanceler === false) { + t.reqCanceler = {}; + } + if (!(fn === $throwNilPointerError)) { + _key = r; (t.reqCanceler || $throwRuntimeError("assignment to entry in nil map"))[ptrType$7.keyFor(_key)] = { k: _key, v: fn }; + } else { + delete t.reqCanceler[ptrType$7.keyFor(r)]; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.setReqCanceler }; } $f._key = _key; $f.fn = fn; $f.r = r; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.setReqCanceler = function(r, fn) { return this.$val.setReqCanceler(r, fn); }; + Transport.ptr.prototype.replaceReqCanceler = function(r, fn) { + var _entry, _key, _tuple, fn, ok, r, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _key = $f._key; _tuple = $f._tuple; fn = $f.fn; ok = $f.ok; r = $f.r; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.reqMu, "Unlock"), []]); + _tuple = (_entry = t.reqCanceler[ptrType$7.keyFor(r)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); + ok = _tuple[1]; + if (!ok) { + $s = -1; return false; + } + if (!(fn === $throwNilPointerError)) { + _key = r; (t.reqCanceler || $throwRuntimeError("assignment to entry in nil map"))[ptrType$7.keyFor(_key)] = { k: _key, v: fn }; + } else { + delete t.reqCanceler[ptrType$7.keyFor(r)]; + } + $s = -1; return true; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.replaceReqCanceler }; } $f._entry = _entry; $f._key = _key; $f._tuple = _tuple; $f.fn = fn; $f.ok = ok; $f.r = r; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.replaceReqCanceler = function(r, fn) { return this.$val.replaceReqCanceler(r, fn); }; + Transport.ptr.prototype.dial = function(ctx, network, addr) { + var _r$1, _r$2, _r$3, _tuple, addr, c, ctx, err, network, t, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; addr = $f.addr; c = $f.c; ctx = $f.ctx; err = $f.err; network = $f.network; t = $f.t; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + t = this; + /* */ if (!(t.DialContext === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(t.DialContext === $throwNilPointerError)) { */ case 1: + _r$1 = t.DialContext(ctx, network, addr); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + /* */ if (!(t.Dial === $throwNilPointerError)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(t.Dial === $throwNilPointerError)) { */ case 4: + _r$2 = t.Dial(network, addr); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + c = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(c, $ifaceNil) && $interfaceIsEqual(err, $ifaceNil)) { + err = errors.New("net/http: Transport.Dial hook returned (nil, nil)"); + } + $s = -1; return [c, err]; + /* } */ case 5: + _r$3 = zeroDialer.DialContext(ctx, network, addr); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.dial }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.addr = addr; $f.c = c; $f.ctx = ctx; $f.err = err; $f.network = network; $f.t = t; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.dial = function(ctx, network, addr) { return this.$val.dial(ctx, network, addr); }; + Transport.ptr.prototype.getConn = function(treq, cm) { + var _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _tuple, cancelc, cm, cmKey, ctx, dialc, err, err$1, err$2, handlePendingDial, idleConnCh, idleSince, pc, pc$1, pc$2, req, t, testHookPostPendingDial$1, testHookPrePendingDial$1, trace, treq, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _selection = $f._selection; _selection$1 = $f._selection$1; _selection$2 = $f._selection$2; _tuple = $f._tuple; cancelc = $f.cancelc; cm = $f.cm; cmKey = $f.cmKey; ctx = $f.ctx; dialc = $f.dialc; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; handlePendingDial = $f.handlePendingDial; idleConnCh = $f.idleConnCh; idleSince = $f.idleSince; pc = $f.pc; pc$1 = $f.pc$1; pc$2 = $f.pc$2; req = $f.req; t = $f.t; testHookPostPendingDial$1 = $f.testHookPostPendingDial$1; testHookPrePendingDial$1 = $f.testHookPrePendingDial$1; trace = $f.trace; treq = $f.treq; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cancelc = [cancelc]; + cm = [cm]; + cmKey = [cmKey]; + ctx = [ctx]; + dialc = [dialc]; + t = [t]; + testHookPostPendingDial$1 = [testHookPostPendingDial$1]; + testHookPrePendingDial$1 = [testHookPrePendingDial$1]; + t[0] = this; + req = treq.Request; + trace = treq.trace; + ctx[0] = req.Context(); + /* */ if (!(trace === ptrType$49.nil) && !(trace.GetConn === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GetConn === $throwNilPointerError)) { */ case 1: + _r$1 = cm[0].addr(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $r = trace.GetConn(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$2 = t[0].getIdleConn($clone(cm[0], connectMethod)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + pc = _tuple[0]; + idleSince = $clone(_tuple[1], time.Time); + /* */ if (!(pc === ptrType$107.nil)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(pc === ptrType$107.nil)) { */ case 6: + /* */ if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { */ case 8: + _r$3 = pc.gotIdleConnTrace($clone(idleSince, time.Time)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $r = trace.GotConn($clone(_r$3, httptrace.GotConnInfo)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + $r = t[0].setReqCanceler(req, (function(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1) { return function(param) { + var param; + }; })(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [pc, $ifaceNil]; + /* } */ case 7: + dialc[0] = new $Chan(dialRes, 0); + cmKey[0] = $clone(cm[0].key(), connectMethodKey); + testHookPrePendingDial$1[0] = testHookPrePendingDial; + testHookPostPendingDial$1[0] = testHookPostPendingDial; + handlePendingDial = (function(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = testHookPrePendingDial$1[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $go((function(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1) { return function $b() { + var _r$4, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$4 = $f._r$4; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$4 = $recv(dialc[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + v = $clone(_r$4[0], dialRes); + /* */ if ($interfaceIsEqual(v.err, $ifaceNil)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if ($interfaceIsEqual(v.err, $ifaceNil)) { */ case 2: + $r = t[0].putOrCloseIdleConn(v.pc); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 4; continue; + /* } else { */ case 3: + $r = t[0].decHostConnCount($clone(cmKey[0], connectMethodKey)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 4: + $r = testHookPostPendingDial$1[0](); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$4 = _r$4; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; })(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1), []); + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1); + cancelc[0] = new $Chan($error, 1); + $r = t[0].setReqCanceler(req, (function(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1) { return function $b(err) { + var err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(cancelc[0], err); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; })(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (t[0].MaxConnsPerHost > 0) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (t[0].MaxConnsPerHost > 0) { */ case 14: + _r$4 = t[0].incHostConnCount($clone(cmKey[0], connectMethodKey)); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _r$5 = t[0].getIdleConnCh($clone(cm[0], connectMethod)); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$6 = req.Context().Done(); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$7 = $select([[_r$4], [_r$5], [req.Cancel], [_r$6], [cancelc[0]]]); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _selection = _r$7; + /* */ if (_selection[0] === 0) { $s = 20; continue; } + /* */ if (_selection[0] === 1) { $s = 21; continue; } + /* */ if (_selection[0] === 2) { $s = 22; continue; } + /* */ if (_selection[0] === 3) { $s = 23; continue; } + /* */ if (_selection[0] === 4) { $s = 24; continue; } + /* */ $s = 25; continue; + /* if (_selection[0] === 0) { */ case 20: + $s = 25; continue; + /* } else if (_selection[0] === 1) { */ case 21: + pc$1 = _selection[1][0]; + /* */ if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { */ case 26: + _r$8 = pc$1.isReused(); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + $r = trace.GotConn(new httptrace.GotConnInfo.ptr(pc$1.conn, _r$8, false, new time.Duration(0, 0))); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 27: + $s = -1; return [pc$1, $ifaceNil]; + /* } else if (_selection[0] === 2) { */ case 22: + $s = -1; return [ptrType$107.nil, errRequestCanceledConn]; + /* } else if (_selection[0] === 3) { */ case 23: + _r$9 = req.Context().Err(); /* */ $s = 30; case 30: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$9]; + /* } else if (_selection[0] === 4) { */ case 24: + err = _selection[1][0]; + if ($interfaceIsEqual(err, errRequestCanceled)) { + err = errRequestCanceledConn; + } + $s = -1; return [ptrType$107.nil, err]; + /* } */ case 25: + /* } */ case 15: + $go((function(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1) { return function $b() { + var _r$10, _tuple$1, err$1, pc$2, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _tuple$1 = $f._tuple$1; err$1 = $f.err$1; pc$2 = $f.pc$2; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$10 = t[0].dialConn(ctx[0], $clone(cm[0], connectMethod)); /* */ $s = 1; case 1: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _tuple$1 = _r$10; + pc$2 = _tuple$1[0]; + err$1 = _tuple$1[1]; + $r = $send(dialc[0], $clone(new dialRes.ptr(pc$2, err$1), dialRes)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$10 = _r$10; $f._tuple$1 = _tuple$1; $f.err$1 = err$1; $f.pc$2 = pc$2; $f.$s = $s; $f.$r = $r; return $f; + }; })(cancelc, cm, cmKey, ctx, dialc, t, testHookPostPendingDial$1, testHookPrePendingDial$1), []); + _r$10 = t[0].getIdleConnCh($clone(cm[0], connectMethod)); /* */ $s = 31; case 31: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + idleConnCh = _r$10; + _r$11 = req.Context().Done(); /* */ $s = 32; case 32: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = $select([[dialc[0]], [idleConnCh], [req.Cancel], [_r$11], [cancelc[0]]]); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _selection$1 = _r$12; + /* */ if (_selection$1[0] === 0) { $s = 34; continue; } + /* */ if (_selection$1[0] === 1) { $s = 35; continue; } + /* */ if (_selection$1[0] === 2) { $s = 36; continue; } + /* */ if (_selection$1[0] === 3) { $s = 37; continue; } + /* */ if (_selection$1[0] === 4) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if (_selection$1[0] === 0) { */ case 34: + v = $clone(_selection$1[1][0], dialRes); + /* */ if (!(v.pc === ptrType$107.nil)) { $s = 40; continue; } + /* */ $s = 41; continue; + /* if (!(v.pc === ptrType$107.nil)) { */ case 40: + /* */ if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError) && $interfaceIsEqual(v.pc.alt, $ifaceNil)) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError) && $interfaceIsEqual(v.pc.alt, $ifaceNil)) { */ case 42: + $r = trace.GotConn(new httptrace.GotConnInfo.ptr(v.pc.conn, false, false, new time.Duration(0, 0))); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 43: + $s = -1; return [v.pc, $ifaceNil]; + /* } */ case 41: + $r = t[0].decHostConnCount($clone(cmKey[0], connectMethodKey)); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$13 = req.Context().Done(); /* */ $s = 46; case 46: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _selection$2 = $select([[req.Cancel], [_r$13], [cancelc[0]], []]); + /* */ if (_selection$2[0] === 0) { $s = 47; continue; } + /* */ if (_selection$2[0] === 1) { $s = 48; continue; } + /* */ if (_selection$2[0] === 2) { $s = 49; continue; } + /* */ if (_selection$2[0] === 3) { $s = 50; continue; } + /* */ $s = 51; continue; + /* if (_selection$2[0] === 0) { */ case 47: + $s = -1; return [ptrType$107.nil, errRequestCanceledConn]; + /* } else if (_selection$2[0] === 1) { */ case 48: + _r$14 = req.Context().Err(); /* */ $s = 52; case 52: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$14]; + /* } else if (_selection$2[0] === 2) { */ case 49: + err$1 = _selection$2[1][0]; + if ($interfaceIsEqual(err$1, errRequestCanceled)) { + err$1 = errRequestCanceledConn; + } + $s = -1; return [ptrType$107.nil, err$1]; + /* } else if (_selection$2[0] === 3) { */ case 50: + $s = -1; return [ptrType$107.nil, v.err]; + /* } */ case 51: + $s = 39; continue; + /* } else if (_selection$1[0] === 1) { */ case 35: + pc$2 = _selection$1[1][0]; + $r = handlePendingDial(); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { $s = 54; continue; } + /* */ $s = 55; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GotConn === $throwNilPointerError)) { */ case 54: + _r$15 = pc$2.isReused(); /* */ $s = 56; case 56: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $r = trace.GotConn(new httptrace.GotConnInfo.ptr(pc$2.conn, _r$15, false, new time.Duration(0, 0))); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 55: + $s = -1; return [pc$2, $ifaceNil]; + /* } else if (_selection$1[0] === 2) { */ case 36: + $r = handlePendingDial(); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, errRequestCanceledConn]; + /* } else if (_selection$1[0] === 3) { */ case 37: + $r = handlePendingDial(); /* */ $s = 59; case 59: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$16 = req.Context().Err(); /* */ $s = 60; case 60: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$16]; + /* } else if (_selection$1[0] === 4) { */ case 38: + err$2 = _selection$1[1][0]; + $r = handlePendingDial(); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ($interfaceIsEqual(err$2, errRequestCanceled)) { + err$2 = errRequestCanceledConn; + } + $s = -1; return [ptrType$107.nil, err$2]; + /* } */ case 39: + $s = -1; return [ptrType$107.nil, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.getConn }; } $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._selection = _selection; $f._selection$1 = _selection$1; $f._selection$2 = _selection$2; $f._tuple = _tuple; $f.cancelc = cancelc; $f.cm = cm; $f.cmKey = cmKey; $f.ctx = ctx; $f.dialc = dialc; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.handlePendingDial = handlePendingDial; $f.idleConnCh = idleConnCh; $f.idleSince = idleSince; $f.pc = pc; $f.pc$1 = pc$1; $f.pc$2 = pc$2; $f.req = req; $f.t = t; $f.testHookPostPendingDial$1 = testHookPostPendingDial$1; $f.testHookPrePendingDial$1 = testHookPrePendingDial$1; $f.trace = trace; $f.treq = treq; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.getConn = function(treq, cm) { return this.$val.getConn(treq, cm); }; + Transport.ptr.prototype.incHostConnCount = function(cmKey) { + var _entry, _entry$1, _entry$2, _key, _key$1, _tuple, ch, cmKey, ok, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _key = $f._key; _key$1 = $f._key$1; _tuple = $f._tuple; ch = $f.ch; cmKey = $f.cmKey; ok = $f.ok; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + if (t.MaxConnsPerHost <= 0) { + $s = -1; return connsPerHostClosedCh; + } + $r = t.connCountMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.connCountMu, "Unlock"), []]); + if ((_entry = t.connPerHostCount[connectMethodKey.keyFor(cmKey)], _entry !== undefined ? _entry.v : 0) === t.MaxConnsPerHost) { + if (t.connPerHostAvailable === false) { + t.connPerHostAvailable = {}; + } + _tuple = (_entry$1 = t.connPerHostAvailable[connectMethodKey.keyFor(cmKey)], _entry$1 !== undefined ? [_entry$1.v, true] : [$chanNil, false]); + ch = _tuple[0]; + ok = _tuple[1]; + if (!ok) { + ch = new $Chan(structType, 0); + _key = $clone(cmKey, connectMethodKey); (t.connPerHostAvailable || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: ch }; + } + $s = -1; return ch; + } + if (t.connPerHostCount === false) { + t.connPerHostCount = {}; + } + _key$1 = $clone(cmKey, connectMethodKey); (t.connPerHostCount || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key$1)] = { k: _key$1, v: (_entry$2 = t.connPerHostCount[connectMethodKey.keyFor(cmKey)], _entry$2 !== undefined ? _entry$2.v : 0) + (1) >> 0 }; + $s = -1; return connsPerHostClosedCh; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.incHostConnCount }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._key = _key; $f._key$1 = _key$1; $f._tuple = _tuple; $f.ch = ch; $f.cmKey = cmKey; $f.ok = ok; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.incHostConnCount = function(cmKey) { return this.$val.incHostConnCount(cmKey); }; + Transport.ptr.prototype.decHostConnCount = function(cmKey) { + var _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _selection, cmKey, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _entry$1 = $f._entry$1; _entry$2 = $f._entry$2; _entry$3 = $f._entry$3; _entry$4 = $f._entry$4; _key = $f._key; _selection = $f._selection; cmKey = $f.cmKey; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = this; + if (t.MaxConnsPerHost <= 0) { + $s = -1; return; + } + $r = t.connCountMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.connCountMu, "Unlock"), []]); + _key = $clone(cmKey, connectMethodKey); (t.connPerHostCount || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: (_entry = t.connPerHostCount[connectMethodKey.keyFor(cmKey)], _entry !== undefined ? _entry.v : 0) - (1) >> 0 }; + _selection = $select([[(_entry$1 = t.connPerHostAvailable[connectMethodKey.keyFor(cmKey)], _entry$1 !== undefined ? _entry$1.v : $chanNil), new structType.ptr()], []]); + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + if (!((_entry$2 = t.connPerHostAvailable[connectMethodKey.keyFor(cmKey)], _entry$2 !== undefined ? _entry$2.v : $chanNil) === $chanNil)) { + $close((_entry$3 = t.connPerHostAvailable[connectMethodKey.keyFor(cmKey)], _entry$3 !== undefined ? _entry$3.v : $chanNil)); + } + delete t.connPerHostAvailable[connectMethodKey.keyFor(cmKey)]; + } + if ((_entry$4 = t.connPerHostCount[connectMethodKey.keyFor(cmKey)], _entry$4 !== undefined ? _entry$4.v : 0) === 0) { + delete t.connPerHostCount[connectMethodKey.keyFor(cmKey)]; + } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.decHostConnCount }; } $f._entry = _entry; $f._entry$1 = _entry$1; $f._entry$2 = _entry$2; $f._entry$3 = _entry$3; $f._entry$4 = _entry$4; $f._key = _key; $f._selection = _selection; $f.cmKey = cmKey; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + Transport.prototype.decHostConnCount = function(cmKey) { return this.$val.decHostConnCount(cmKey); }; + connCloseListener.ptr.prototype.Close = function() { + var _r$1, c, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; c = $f.c; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + c = this; + if (!((atomic.AddInt32((c.$ptr_didClose || (c.$ptr_didClose = new ptrType$91(function() { return this.$target.didClose; }, function($v) { this.$target.didClose = $v; }, c))), 1) === 1))) { + $s = -1; return $ifaceNil; + } + _r$1 = c.Conn.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + $r = c.t.decHostConnCount($clone(c.cmKey, connectMethodKey)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: connCloseListener.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.c = c; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; + connCloseListener.prototype.Close = function() { return this.$val.Close(); }; + persistConn.ptr.prototype.addTLS = function(name, trace) { + var _r$1, _r$2, _r$3, _r$4, cfg, cs, d, err, errc, name, pconn, plainConn, timer, tlsConn, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; cfg = $f.cfg; cs = $f.cs; d = $f.d; err = $f.err; errc = $f.errc; name = $f.name; pconn = $f.pconn; plainConn = $f.plainConn; timer = $f.timer; tlsConn = $f.tlsConn; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cs = [cs]; + errc = [errc]; + timer = [timer]; + tlsConn = [tlsConn]; + trace = [trace]; + pconn = this; + _r$1 = cloneTLSConfig(pconn.t.TLSClientConfig); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cfg = _r$1; + if (cfg.ServerName === "") { + cfg.ServerName = name; + } + plainConn = pconn.conn; + tlsConn[0] = tls.Client(plainConn, cfg); + errc[0] = new $Chan($error, 2); + timer[0] = ptrType$57.nil; + d = pconn.t.TLSHandshakeTimeout; + if (!((d.$high === 0 && d.$low === 0))) { + timer[0] = time.AfterFunc(d, (function(cs, errc, timer, tlsConn, trace) { return function $b() { + var x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(errc[0], (x$4 = new tlsHandshakeTimeoutError.ptr(), new x$4.constructor.elem(x$4))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; })(cs, errc, timer, tlsConn, trace)); + } + $go((function(cs, errc, timer, tlsConn, trace) { return function $b() { + var _r$2, err, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$2 = $f._r$2; err = $f.err; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeStart === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeStart === $throwNilPointerError)) { */ case 1: + $r = trace[0].TLSHandshakeStart(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _r$2 = tlsConn[0].Handshake(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + if (!(timer[0] === ptrType$57.nil)) { + timer[0].Stop(); + } + $r = $send(errc[0], err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$2 = _r$2; $f.err = err; $f.$s = $s; $f.$r = $r; return $f; + }; })(cs, errc, timer, tlsConn, trace), []); + _r$2 = $recv(errc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2[0]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: + _r$3 = plainConn.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3; + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { */ case 6: + $r = trace[0].TLSHandshakeDone(new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$17.nil, sliceType$18.nil, sliceType$5.nil, sliceType$3.nil, $throwNilPointerError, sliceType$3.nil), err); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + $s = -1; return err; + /* } */ case 4: + _r$4 = tlsConn[0].ConnectionState(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + cs[0] = $clone(_r$4, tls.ConnectionState); + /* */ if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(trace[0] === ptrType$49.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { */ case 10: + $r = trace[0].TLSHandshakeDone($clone(cs[0], tls.ConnectionState), $ifaceNil); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 11: + pconn.tlsState = cs[0]; + pconn.conn = tlsConn[0]; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.addTLS }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.cfg = cfg; $f.cs = cs; $f.d = d; $f.err = err; $f.errc = errc; $f.name = name; $f.pconn = pconn; $f.plainConn = plainConn; $f.timer = timer; $f.tlsConn = tlsConn; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.addTLS = function(name, trace) { return this.$val.addTLS(name, trace); }; + Transport.ptr.prototype.dialConn = function(ctx, cm) { + var _arg, _arg$1, _arg$2, _arg$3, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, auth, br, cm, conn$1, conn$2, conn$3, connectReq, cs, ctx, d, err, err$1, err$2, err$3, err$4, err$5, f, firstTLSHost, hdr, next, ok, ok$1, pa, pa$1, pconn, resp, s, t, tc, trace, u, wrapErr, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _entry = $f._entry; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$16 = $f._r$16; _r$17 = $f._r$17; _r$18 = $f._r$18; _r$19 = $f._r$19; _r$2 = $f._r$2; _r$20 = $f._r$20; _r$21 = $f._r$21; _r$22 = $f._r$22; _r$23 = $f._r$23; _r$24 = $f._r$24; _r$25 = $f._r$25; _r$26 = $f._r$26; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; _tuple$3 = $f._tuple$3; _tuple$4 = $f._tuple$4; _tuple$5 = $f._tuple$5; _tuple$6 = $f._tuple$6; _tuple$7 = $f._tuple$7; auth = $f.auth; br = $f.br; cm = $f.cm; conn$1 = $f.conn$1; conn$2 = $f.conn$2; conn$3 = $f.conn$3; connectReq = $f.connectReq; cs = $f.cs; ctx = $f.ctx; d = $f.d; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; err$3 = $f.err$3; err$4 = $f.err$4; err$5 = $f.err$5; f = $f.f; firstTLSHost = $f.firstTLSHost; hdr = $f.hdr; next = $f.next; ok = $f.ok; ok$1 = $f.ok$1; pa = $f.pa; pa$1 = $f.pa$1; pconn = $f.pconn; resp = $f.resp; s = $f.s; t = $f.t; tc = $f.tc; trace = $f.trace; u = $f.u; wrapErr = $f.wrapErr; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cm = [cm]; + cs = [cs]; + pa = [pa]; + t = this; + pconn = new persistConn.ptr($ifaceNil, t, $clone(cm[0].key(), connectMethodKey), $ifaceNil, ptrType$17.nil, ptrType$73.nil, ptrType$10.nil, new $Int64(0, 0), new $Chan(requestAndChan, 1), new $Chan(writeRequest, 1), new $Chan(structType, 0), false, false, new $Int64(0, 0), new $Chan($error, 1), new $Chan(structType, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), ptrType$57.nil, new sync.Mutex.ptr(0, 0), 0, $ifaceNil, $ifaceNil, false, false, $throwNilPointerError); + _r$1 = httptrace.ContextClientTrace(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + trace = _r$1; + wrapErr = (function(cm, cs, pa) { return function(err) { + var err; + if (!(cm[0].proxyURL === ptrType$19.nil)) { + return new net.OpError.ptr("proxyconnect", "tcp", $ifaceNil, $ifaceNil, err); + } + return err; + }; })(cm, cs, pa); + /* */ if (cm[0].scheme() === "https" && !(t.DialTLS === $throwNilPointerError)) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (cm[0].scheme() === "https" && !(t.DialTLS === $throwNilPointerError)) { */ case 2: + err = $ifaceNil; + _r$2 = cm[0].addr(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _arg = _r$2; + _r$3 = t.DialTLS("tcp", _arg); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple = _r$3; + pconn.conn = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: + _r$4 = wrapErr(err); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$4]; + /* } */ case 8: + /* */ if ($interfaceIsEqual(pconn.conn, $ifaceNil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if ($interfaceIsEqual(pconn.conn, $ifaceNil)) { */ case 10: + _r$5 = wrapErr(errors.New("net/http: Transport.DialTLS returned (nil, nil)")); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$5]; + /* } */ case 11: + _tuple$1 = $assertType(pconn.conn, ptrType$101, true); + tc = _tuple$1[0]; + ok = _tuple$1[1]; + /* */ if (ok) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (ok) { */ case 13: + /* */ if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeStart === $throwNilPointerError)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeStart === $throwNilPointerError)) { */ case 15: + $r = trace.TLSHandshakeStart(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 16: + _r$6 = tc.Handshake(); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + err$1 = _r$6; + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 19: + $go($methodVal(pconn.conn, "Close"), []); + /* */ if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { */ case 21: + $r = trace.TLSHandshakeDone(new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$17.nil, sliceType$18.nil, sliceType$5.nil, sliceType$3.nil, $throwNilPointerError, sliceType$3.nil), err$1); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 22: + $s = -1; return [ptrType$107.nil, err$1]; + /* } */ case 20: + _r$7 = tc.ConnectionState(); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + cs[0] = $clone(_r$7, tls.ConnectionState); + /* */ if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { */ case 25: + $r = trace.TLSHandshakeDone($clone(cs[0], tls.ConnectionState), $ifaceNil); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + pconn.tlsState = cs[0]; + /* } */ case 14: + $s = 4; continue; + /* } else { */ case 3: + _arg$1 = ctx; + _r$8 = cm[0].addr(); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _arg$2 = _r$8; + _r$9 = t.dial(_arg$1, "tcp", _arg$2); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _tuple$2 = _r$9; + conn$1 = _tuple$2[0]; + err$2 = _tuple$2[1]; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 30; continue; } + /* */ $s = 31; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 30: + _r$10 = wrapErr(err$2); /* */ $s = 32; case 32: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$10]; + /* } */ case 31: + pconn.conn = conn$1; + /* */ if (cm[0].scheme() === "https") { $s = 33; continue; } + /* */ $s = 34; continue; + /* if (cm[0].scheme() === "https") { */ case 33: + firstTLSHost = ""; + _r$11 = cm[0].addr(); /* */ $s = 35; case 35: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = net.SplitHostPort(_r$11); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _tuple$3 = _r$12; + firstTLSHost = _tuple$3[0]; + err$2 = _tuple$3[2]; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 37; continue; } + /* */ $s = 38; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 37: + _r$13 = wrapErr(err$2); /* */ $s = 39; case 39: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$13]; + /* } */ case 38: + _r$14 = pconn.addTLS(firstTLSHost, trace); /* */ $s = 40; case 40: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + err$2 = _r$14; + /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 41; continue; } + /* */ $s = 42; continue; + /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 41: + _r$15 = wrapErr(err$2); /* */ $s = 43; case 43: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + $s = -1; return [ptrType$107.nil, _r$15]; + /* } */ case 42: + /* } */ case 34: + /* } */ case 4: + /* */ if (cm[0].proxyURL === ptrType$19.nil) { $s = 45; continue; } + /* */ if (cm[0].proxyURL.Scheme === "socks5") { $s = 46; continue; } + /* */ if (cm[0].targetScheme === "http") { $s = 47; continue; } + /* */ if (cm[0].targetScheme === "https") { $s = 48; continue; } + /* */ $s = 49; continue; + /* if (cm[0].proxyURL === ptrType$19.nil) { */ case 45: + $s = 49; continue; + /* } else if (cm[0].proxyURL.Scheme === "socks5") { */ case 46: + conn$2 = pconn.conn; + _r$16 = conn$2.RemoteAddr(); /* */ $s = 50; case 50: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } + _r$17 = _r$16.String(); /* */ $s = 51; case 51: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } + _arg$3 = _r$17; + _r$18 = socksNewDialer("tcp", _arg$3); /* */ $s = 52; case 52: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } + d = _r$18; + u = cm[0].proxyURL.User; + if (!(u === ptrType$18.nil)) { + auth = new socksUsernamePassword.ptr(u.Username(), ""); + _tuple$4 = u.Password(); + auth.Password = _tuple$4[0]; + d.AuthMethods = new sliceType$24([0, 2]); + d.Authenticate = $methodVal(auth, "Authenticate"); + } + _r$19 = d.DialWithConn(ctx, conn$2, "tcp", cm[0].targetAddr); /* */ $s = 53; case 53: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } + _tuple$5 = _r$19; + err$3 = _tuple$5[1]; + /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 54; continue; } + /* */ $s = 55; continue; + /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 54: + _r$20 = conn$2.Close(); /* */ $s = 56; case 56: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } + _r$20; + $s = -1; return [ptrType$107.nil, err$3]; + /* } */ case 55: + $s = 49; continue; + /* } else if (cm[0].targetScheme === "http") { */ case 47: + pconn.isProxy = true; + pa[0] = cm[0].proxyAuth(); + if (!(pa[0] === "")) { + pconn.mutateHeaderFunc = (function(cm, cs, pa) { return function(h) { + var h; + new Header(h).Set("Proxy-Authorization", pa[0]); + }; })(cm, cs, pa); + } + $s = 49; continue; + /* } else if (cm[0].targetScheme === "https") { */ case 48: + conn$3 = pconn.conn; + hdr = t.ProxyConnectHeader; + if (hdr === false) { + hdr = {}; + } + connectReq = new Request.ptr("CONNECT", new url.URL.ptr("", cm[0].targetAddr, ptrType$18.nil, "", "", "", false, "", ""), "", 0, 0, hdr, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$1.nil, false, cm[0].targetAddr, false, false, ptrType$20.nil, false, "", "", ptrType$17.nil, $chanNil, ptrType$16.nil, $ifaceNil); + pa$1 = cm[0].proxyAuth(); + if (!(pa$1 === "")) { + new Header(connectReq.Header).Set("Proxy-Authorization", pa$1); + } + _r$21 = connectReq.Write(conn$3); /* */ $s = 57; case 57: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } + _r$21; + br = bufio.NewReader(conn$3); + _r$22 = ReadResponse(br, connectReq); /* */ $s = 58; case 58: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } + _tuple$6 = _r$22; + resp = _tuple$6[0]; + err$4 = _tuple$6[1]; + /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 59; continue; } + /* */ $s = 60; continue; + /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 59: + _r$23 = conn$3.Close(); /* */ $s = 61; case 61: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } + _r$23; + $s = -1; return [ptrType$107.nil, err$4]; + /* } */ case 60: + /* */ if (!((resp.StatusCode === 200))) { $s = 62; continue; } + /* */ $s = 63; continue; + /* if (!((resp.StatusCode === 200))) { */ case 62: + f = strings.SplitN(resp.Status, " ", 2); + _r$24 = conn$3.Close(); /* */ $s = 64; case 64: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } + _r$24; + if (f.$length < 2) { + $s = -1; return [ptrType$107.nil, errors.New("unknown status code")]; + } + $s = -1; return [ptrType$107.nil, errors.New((1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]))]; + /* } */ case 63: + /* } */ case 49: + case 44: + /* */ if (!(cm[0].proxyURL === ptrType$19.nil) && cm[0].targetScheme === "https") { $s = 65; continue; } + /* */ $s = 66; continue; + /* if (!(cm[0].proxyURL === ptrType$19.nil) && cm[0].targetScheme === "https") { */ case 65: + _r$25 = pconn.addTLS(cm[0].tlsHost(), trace); /* */ $s = 67; case 67: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } + err$5 = _r$25; + if (!($interfaceIsEqual(err$5, $ifaceNil))) { + $s = -1; return [ptrType$107.nil, err$5]; + } + /* } */ case 66: + s = pconn.tlsState; + /* */ if (!(s === ptrType$17.nil) && s.NegotiatedProtocolIsMutual && !(s.NegotiatedProtocol === "")) { $s = 68; continue; } + /* */ $s = 69; continue; + /* if (!(s === ptrType$17.nil) && s.NegotiatedProtocolIsMutual && !(s.NegotiatedProtocol === "")) { */ case 68: + _tuple$7 = (_entry = t.TLSNextProto[$String.keyFor(s.NegotiatedProtocol)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); + next = _tuple$7[0]; + ok$1 = _tuple$7[1]; + /* */ if (ok$1) { $s = 70; continue; } + /* */ $s = 71; continue; + /* if (ok$1) { */ case 70: + _r$26 = next(cm[0].targetAddr, $assertType(pconn.conn, ptrType$101)); /* */ $s = 72; case 72: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } + $s = -1; return [new persistConn.ptr(_r$26, ptrType$21.nil, new connectMethodKey.ptr("", "", ""), $ifaceNil, ptrType$17.nil, ptrType$73.nil, ptrType$10.nil, new $Int64(0, 0), $chanNil, $chanNil, $chanNil, false, false, new $Int64(0, 0), $chanNil, $chanNil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), ptrType$57.nil, new sync.Mutex.ptr(0, 0), 0, $ifaceNil, $ifaceNil, false, false, $throwNilPointerError), $ifaceNil]; + /* } */ case 71: + /* } */ case 69: + if (t.MaxConnsPerHost > 0) { + pconn.conn = new connCloseListener.ptr(pconn.conn, t, $clone(pconn.cacheKey, connectMethodKey), 0); + } + pconn.br = bufio.NewReader(pconn); + pconn.bw = bufio.NewWriter((x$4 = new persistConnWriter.ptr(pconn), new x$4.constructor.elem(x$4))); + $go($methodVal(pconn, "readLoop"), []); + $go($methodVal(pconn, "writeLoop"), []); + $s = -1; return [pconn, $ifaceNil]; + /* */ } return; } if ($f === undefined) { $f = { $blk: Transport.ptr.prototype.dialConn }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._entry = _entry; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$16 = _r$16; $f._r$17 = _r$17; $f._r$18 = _r$18; $f._r$19 = _r$19; $f._r$2 = _r$2; $f._r$20 = _r$20; $f._r$21 = _r$21; $f._r$22 = _r$22; $f._r$23 = _r$23; $f._r$24 = _r$24; $f._r$25 = _r$25; $f._r$26 = _r$26; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f._tuple$3 = _tuple$3; $f._tuple$4 = _tuple$4; $f._tuple$5 = _tuple$5; $f._tuple$6 = _tuple$6; $f._tuple$7 = _tuple$7; $f.auth = auth; $f.br = br; $f.cm = cm; $f.conn$1 = conn$1; $f.conn$2 = conn$2; $f.conn$3 = conn$3; $f.connectReq = connectReq; $f.cs = cs; $f.ctx = ctx; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.err$3 = err$3; $f.err$4 = err$4; $f.err$5 = err$5; $f.f = f; $f.firstTLSHost = firstTLSHost; $f.hdr = hdr; $f.next = next; $f.ok = ok; $f.ok$1 = ok$1; $f.pa = pa; $f.pa$1 = pa$1; $f.pconn = pconn; $f.resp = resp; $f.s = s; $f.t = t; $f.tc = tc; $f.trace = trace; $f.u = u; $f.wrapErr = wrapErr; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + Transport.prototype.dialConn = function(ctx, cm) { return this.$val.dialConn(ctx, cm); }; + persistConnWriter.ptr.prototype.Write = function(p) { + var _r$1, _tuple, err, n, p, w, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; w = $f.w; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + w = this; + _r$1 = w.pc.conn.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + w.pc.nwrite = (x$4 = w.pc.nwrite, x$5 = (new $Int64(0, n)), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConnWriter.ptr.prototype.Write }; } $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.w = w; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConnWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + connectMethod.ptr.prototype.key = function() { + var cm, proxyStr, targetAddr; + cm = this; + proxyStr = ""; + targetAddr = cm.targetAddr; + if (!(cm.proxyURL === ptrType$19.nil)) { + proxyStr = cm.proxyURL.String(); + if ((cm.proxyURL.Scheme === "http" || cm.proxyURL.Scheme === "https") && cm.targetScheme === "http") { + targetAddr = ""; + } + } + return new connectMethodKey.ptr(proxyStr, cm.targetScheme, targetAddr); + }; + connectMethod.prototype.key = function() { return this.$val.key(); }; + connectMethod.ptr.prototype.scheme = function() { + var cm; + cm = this; + if (!(cm.proxyURL === ptrType$19.nil)) { + return cm.proxyURL.Scheme; + } + return cm.targetScheme; + }; + connectMethod.prototype.scheme = function() { return this.$val.scheme(); }; + connectMethod.ptr.prototype.addr = function() { + var _r$1, cm, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cm = $f.cm; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + cm = this; + /* */ if (!(cm.proxyURL === ptrType$19.nil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(cm.proxyURL === ptrType$19.nil)) { */ case 1: + _r$1 = canonicalAddr(cm.proxyURL); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 2: + $s = -1; return cm.targetAddr; + /* */ } return; } if ($f === undefined) { $f = { $blk: connectMethod.ptr.prototype.addr }; } $f._r$1 = _r$1; $f.cm = cm; $f.$s = $s; $f.$r = $r; return $f; + }; + connectMethod.prototype.addr = function() { return this.$val.addr(); }; + connectMethod.ptr.prototype.tlsHost = function() { + var cm, h; + cm = this; + h = cm.targetAddr; + if (hasPort(h)) { + h = $substring(h, 0, strings.LastIndex(h, ":")); + } + return h; + }; + connectMethod.prototype.tlsHost = function() { return this.$val.tlsHost(); }; + connectMethodKey.ptr.prototype.String = function() { + var _r$1, k, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; k = $f.k; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + k = this; + _r$1 = fmt.Sprintf("%s|%s|%s", new sliceType([new $String(k.proxy), new $String(k.scheme), new $String(k.addr)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: connectMethodKey.ptr.prototype.String }; } $f._r$1 = _r$1; $f.k = k; $f.$s = $s; $f.$r = $r; return $f; + }; + connectMethodKey.prototype.String = function() { return this.$val.String(); }; + persistConn.ptr.prototype.maxHeaderResponseSize = function() { + var pc, v; + pc = this; + v = pc.t.MaxResponseHeaderBytes; + if (!((v.$high === 0 && v.$low === 0))) { + return v; + } + return new $Int64(0, 10485760); + }; + persistConn.prototype.maxHeaderResponseSize = function() { return this.$val.maxHeaderResponseSize(); }; + persistConn.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, p, pc, x$4, x$5, x$6, x$7, x$8, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tuple = $f._tuple; err = $f.err; n = $f.n; p = $f.p; pc = $f.pc; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; x$7 = $f.x$7; x$8 = $f.x$8; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + pc = this; + /* */ if ((x$4 = pc.readLimit, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low <= 0)))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ((x$4 = pc.readLimit, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low <= 0)))) { */ case 1: + _tmp = 0; + _r$1 = fmt.Errorf("read limit of %d bytes exhausted", new sliceType([pc.maxHeaderResponseSize()])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tmp$1 = _r$1; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + /* } */ case 2: + if ((x$5 = (new $Int64(0, p.$length)), x$6 = pc.readLimit, (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { + p = $subslice(p, 0, $flatten64(pc.readLimit)); + } + _r$2 = pc.conn.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple = _r$2; + n = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, io.EOF)) { + pc.sawEOF = true; + } + pc.readLimit = (x$7 = pc.readLimit, x$8 = (new $Int64(0, n)), new $Int64(x$7.$high - x$8.$high, x$7.$low - x$8.$low)); + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tuple = _tuple; $f.err = err; $f.n = n; $f.p = p; $f.pc = pc; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.x$7 = x$7; $f.x$8 = x$8; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.Read = function(p) { return this.$val.Read(p); }; + persistConn.ptr.prototype.isBroken = function() { + var b, pc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; b = $f.b; pc = $f.pc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + b = !($interfaceIsEqual(pc.closed, $ifaceNil)); + $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return b; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.isBroken }; } $f.b = b; $f.pc = pc; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.isBroken = function() { return this.$val.isBroken(); }; + persistConn.ptr.prototype.canceled = function() { + var pc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; pc = $f.pc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(pc.mu, "Unlock"), []]); + $s = -1; return pc.canceledErr; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.canceled }; } $f.pc = pc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.canceled = function() { return this.$val.canceled(); }; + persistConn.ptr.prototype.isReused = function() { + var pc, r, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; pc = $f.pc; r = $f.r; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + r = pc.reused; + $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return r; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.isReused }; } $f.pc = pc; $f.r = r; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.isReused = function() { return this.$val.isReused(); }; + persistConn.ptr.prototype.gotIdleConnTrace = function(idleAt) { + var idleAt, pc, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; idleAt = $f.idleAt; pc = $f.pc; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + t = new httptrace.GotConnInfo.ptr($ifaceNil, false, false, new time.Duration(0, 0)); + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(pc.mu, "Unlock"), []]); + t.Reused = pc.reused; + t.Conn = pc.conn; + t.WasIdle = true; + if (!$clone(idleAt, time.Time).IsZero()) { + t.IdleTime = time.Since($clone(idleAt, time.Time)); + } + $s = -1; return t; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return t; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.gotIdleConnTrace }; } $f.idleAt = idleAt; $f.pc = pc; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.gotIdleConnTrace = function(idleAt) { return this.$val.gotIdleConnTrace(idleAt); }; + persistConn.ptr.prototype.cancelRequest = function(err) { + var err, pc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; pc = $f.pc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(pc.mu, "Unlock"), []]); + pc.canceledErr = err; + $r = pc.closeLocked(errRequestCanceled); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.cancelRequest }; } $f.err = err; $f.pc = pc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.cancelRequest = function(err) { return this.$val.cancelRequest(err); }; + persistConn.ptr.prototype.closeConnIfStillIdle = function() { + var _entry, _tuple, ok, pc, t, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _tuple = $f._tuple; ok = $f.ok; pc = $f.pc; t = $f.t; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pc = this; + t = pc.t; + $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); + _tuple = (_entry = t.idleLRU.m[ptrType$107.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$108.nil, false]); + ok = _tuple[1]; + if (!ok) { + $s = -1; return; + } + t.removeIdleConnLocked(pc); + $r = pc.close(errIdleConnTimeout); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.closeConnIfStillIdle }; } $f._entry = _entry; $f._tuple = _tuple; $f.ok = ok; $f.pc = pc; $f.t = t; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.closeConnIfStillIdle = function() { return this.$val.closeConnIfStillIdle(); }; + persistConn.ptr.prototype.mapRoundTripError = function(req, startBytesWritten, err) { + var _r$1, _r$2, _r$3, _r$4, _tuple, cerr, err, ok, pc, req, reqErr, startBytesWritten, x$4, x$5, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _tuple = $f._tuple; cerr = $f.cerr; err = $f.err; ok = $f.ok; pc = $f.pc; req = $f.req; reqErr = $f.reqErr; startBytesWritten = $f.startBytesWritten; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $s = -1; return $ifaceNil; + } + _r$1 = pc.canceled(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + cerr = _r$1; + if (!($interfaceIsEqual(cerr, $ifaceNil))) { + $s = -1; return cerr; + } + $r = req.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + reqErr = req.err; + $r = req.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!($interfaceIsEqual(reqErr, $ifaceNil))) { + $s = -1; return reqErr; + } + if ($interfaceIsEqual(err, errServerClosedIdle)) { + $s = -1; return err; + } + _tuple = $assertType(err, transportReadFromServerError, true); + ok = _tuple[1]; + if (ok) { + $s = -1; return err; + } + _r$2 = pc.isBroken(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + /* */ if (_r$2) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (_r$2) { */ case 4: + _r$3 = $recv(pc.writeLoopDone); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _r$3[0]; + if ((x$4 = pc.nwrite, (x$4.$high === startBytesWritten.$high && x$4.$low === startBytesWritten.$low))) { + $s = -1; return (x$5 = new nothingWrittenError.ptr(err), new x$5.constructor.elem(x$5)); + } + _r$4 = fmt.Errorf("net/http: HTTP/1.x transport connection broken: %v", new sliceType([err])); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $s = -1; return _r$4; + /* } */ case 5: + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.mapRoundTripError }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._tuple = _tuple; $f.cerr = cerr; $f.err = err; $f.ok = ok; $f.pc = pc; $f.req = req; $f.reqErr = reqErr; $f.startBytesWritten = startBytesWritten; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.mapRoundTripError = function(req, startBytesWritten, err) { return this.$val.mapRoundTripError(req, startBytesWritten, err); }; + persistConn.ptr.prototype.readLoop = function() { + var _arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _selection$3, _tuple, _tuple$1, _v, _v$1, _v$2, _v$3, alive, body$1, bodyEOF, closeErr, eofc, err, hasBody, pc, rc, resp, testHookReadLoopBeforeNextRead$1, trace, tryPutIdleConn, waitForBodyRead, x$4, x$5, x$6, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$13 = $f._r$13; _r$14 = $f._r$14; _r$15 = $f._r$15; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _selection = $f._selection; _selection$1 = $f._selection$1; _selection$2 = $f._selection$2; _selection$3 = $f._selection$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _v = $f._v; _v$1 = $f._v$1; _v$2 = $f._v$2; _v$3 = $f._v$3; alive = $f.alive; body$1 = $f.body$1; bodyEOF = $f.bodyEOF; closeErr = $f.closeErr; eofc = $f.eofc; err = $f.err; hasBody = $f.hasBody; pc = $f.pc; rc = $f.rc; resp = $f.resp; testHookReadLoopBeforeNextRead$1 = $f.testHookReadLoopBeforeNextRead$1; trace = $f.trace; tryPutIdleConn = $f.tryPutIdleConn; waitForBodyRead = $f.waitForBodyRead; x$4 = $f.x$4; x$5 = $f.x$5; x$6 = $f.x$6; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + closeErr = [closeErr]; + eofc = [eofc]; + pc = [pc]; + pc[0] = this; + closeErr[0] = errReadLoopExiting; + $deferred.push([(function(closeErr, eofc, pc) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = pc[0].close(closeErr[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = pc[0].t.removeIdleConn(pc[0]); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(closeErr, eofc, pc), []]); + tryPutIdleConn = (function(closeErr, eofc, pc) { return function $b(trace) { + var _r$1, err, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + _r$1 = pc[0].t.tryPutIdleConn(pc[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + closeErr[0] = err; + /* */ if (!(trace === ptrType$49.nil) && !(trace.PutIdleConn === $throwNilPointerError) && !($interfaceIsEqual(err, errKeepAlivesDisabled))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.PutIdleConn === $throwNilPointerError) && !($interfaceIsEqual(err, errKeepAlivesDisabled))) { */ case 4: + $r = trace.PutIdleConn(err); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + $s = -1; return false; + /* } */ case 3: + /* */ if (!(trace === ptrType$49.nil) && !(trace.PutIdleConn === $throwNilPointerError)) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.PutIdleConn === $throwNilPointerError)) { */ case 7: + $r = trace.PutIdleConn($ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 8: + $s = -1; return true; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.err = err; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; })(closeErr, eofc, pc); + eofc[0] = new $Chan(structType, 0); + $deferred.push([function(_arg) { $close(_arg); }, [eofc[0]]]); + $r = testHookMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + testHookReadLoopBeforeNextRead$1 = testHookReadLoopBeforeNextRead; + $r = testHookMu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + alive = true; + /* while (true) { */ case 3: + /* if (!(alive)) { break; } */ if(!(alive)) { $s = 4; continue; } + waitForBodyRead = [waitForBodyRead]; + pc[0].readLimit = pc[0].maxHeaderResponseSize(); + _r$1 = pc[0].br.Peek(1); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + err = _tuple[1]; + $r = pc[0].mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (pc[0].numExpectedResponses === 0) { $s = 7; continue; } + /* */ $s = 8; continue; + /* if (pc[0].numExpectedResponses === 0) { */ case 7: + $r = pc[0].readLoopPeekFailLocked(err); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = pc[0].mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 8: + $r = pc[0].mu.Unlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$2 = $recv(pc[0].reqch); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + rc = $clone(_r$2[0], requestAndChan); + _r$3 = httptrace.ContextClientTrace(rc.req.Context()); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + trace = _r$3; + resp = ptrType$16.nil; + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 14: + _r$4 = pc[0].readResponse($clone(rc, requestAndChan), trace); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + _tuple$1 = _r$4; + resp = _tuple$1[0]; + err = _tuple$1[1]; + $s = 16; continue; + /* } else { */ case 15: + err = (x$4 = new transportReadFromServerError.ptr(err), new x$4.constructor.elem(x$4)); + closeErr[0] = err; + /* } */ case 16: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } + /* */ $s = 19; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 18: + /* */ if ((x$5 = pc[0].readLimit, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low <= 0)))) { $s = 20; continue; } + /* */ $s = 21; continue; + /* if ((x$5 = pc[0].readLimit, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low <= 0)))) { */ case 20: + _r$5 = fmt.Errorf("net/http: server response headers exceeded %d bytes; aborted", new sliceType([pc[0].maxHeaderResponseSize()])); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + err = _r$5; + /* } */ case 21: + _r$6 = $select([[rc.ch, new responseAndError.ptr(ptrType$16.nil, err)], [rc.callerGone]]); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _selection = _r$6; + if (_selection[0] === 0) { + } else if (_selection[0] === 1) { + $s = -1; return; + } + $s = -1; return; + /* } */ case 19: + pc[0].readLimit = new $Int64(2147483647, 4294967295); + $r = pc[0].mu.Lock(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + pc[0].numExpectedResponses = pc[0].numExpectedResponses - (1) >> 0; + $r = pc[0].mu.Unlock(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + hasBody = !(rc.req.Method === "HEAD") && !((x$6 = resp.ContentLength, (x$6.$high === 0 && x$6.$low === 0))); + if (resp.Close || rc.req.Close || resp.StatusCode <= 199) { + alive = false; + } + /* */ if (!hasBody) { $s = 26; continue; } + /* */ $s = 27; continue; + /* if (!hasBody) { */ case 26: + $r = pc[0].t.setReqCanceler(rc.req, $throwNilPointerError); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(alive && !pc[0].sawEOF)) { _v$1 = false; $s = 30; continue s; } + _r$7 = pc[0].wroteRequest(); /* */ $s = 31; case 31: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + _v$1 = _r$7; case 30: + if (!(_v$1)) { _v = false; $s = 29; continue s; } + _r$8 = tryPutIdleConn(trace); /* */ $s = 32; case 32: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _v = _r$8; case 29: + alive = _v; + _r$9 = $select([[rc.ch, new responseAndError.ptr(resp, $ifaceNil)], [rc.callerGone]]); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _selection$1 = _r$9; + if (_selection$1[0] === 0) { + } else if (_selection$1[0] === 1) { + $s = -1; return; + } + $r = testHookReadLoopBeforeNextRead$1(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* continue; */ $s = 3; continue; + /* } */ case 27: + waitForBodyRead[0] = new $Chan($Bool, 2); + body$1 = new bodyEOFSignal.ptr(resp.Body, new sync.Mutex.ptr(0, 0), false, $ifaceNil, (function(closeErr, eofc, pc, waitForBodyRead) { return function $b(err$1) { + var _r$10, _r$11, cerr, err$1, isEOF, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; _r$11 = $f._r$11; cerr = $f.cerr; err$1 = $f.err$1; isEOF = $f.isEOF; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + isEOF = $interfaceIsEqual(err$1, io.EOF); + $r = $send(waitForBodyRead[0], isEOF); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (isEOF) { $s = 2; continue; } + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (isEOF) { */ case 2: + _r$10 = $recv(eofc[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10[0]; + $s = 4; continue; + /* } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 3: + _r$11 = pc[0].canceled(); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + cerr = _r$11; + if (!($interfaceIsEqual(cerr, $ifaceNil))) { + $s = -1; return cerr; + } + /* } */ case 4: + $s = -1; return err$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$10 = _r$10; $f._r$11 = _r$11; $f.cerr = cerr; $f.err$1 = err$1; $f.isEOF = isEOF; $f.$s = $s; $f.$r = $r; return $f; + }; })(closeErr, eofc, pc, waitForBodyRead), (function(closeErr, eofc, pc, waitForBodyRead) { return function $b() { + var _r$10, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$10 = $f._r$10; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = $send(waitForBodyRead[0], false); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$10 = $recv(eofc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _r$10[0]; + $s = -1; return $ifaceNil; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$10 = _r$10; $f.$s = $s; $f.$r = $r; return $f; + }; })(closeErr, eofc, pc, waitForBodyRead)); + resp.Body = body$1; + if (rc.addedGzip && strings.EqualFold(new Header(resp.Header).Get("Content-Encoding"), "gzip")) { + resp.Body = new gzipReader.ptr(body$1, ptrType$76.nil, $ifaceNil); + new Header(resp.Header).Del("Content-Encoding"); + new Header(resp.Header).Del("Content-Length"); + resp.ContentLength = new $Int64(-1, 4294967295); + resp.Uncompressed = true; + } + _r$10 = $select([[rc.ch, new responseAndError.ptr(resp, $ifaceNil)], [rc.callerGone]]); /* */ $s = 35; case 35: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } + _selection$2 = _r$10; + if (_selection$2[0] === 0) { + } else if (_selection$2[0] === 1) { + $s = -1; return; + } + _r$11 = rc.req.Context().Done(); /* */ $s = 36; case 36: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } + _r$12 = $select([[waitForBodyRead[0]], [rc.req.Cancel], [_r$11], [pc[0].closech]]); /* */ $s = 37; case 37: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } + _selection$3 = _r$12; + /* */ if (_selection$3[0] === 0) { $s = 38; continue; } + /* */ if (_selection$3[0] === 1) { $s = 39; continue; } + /* */ if (_selection$3[0] === 2) { $s = 40; continue; } + /* */ if (_selection$3[0] === 3) { $s = 41; continue; } + /* */ $s = 42; continue; + /* if (_selection$3[0] === 0) { */ case 38: + bodyEOF = _selection$3[1][0]; + $r = pc[0].t.setReqCanceler(rc.req, $throwNilPointerError); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!(alive && bodyEOF && !pc[0].sawEOF)) { _v$3 = false; $s = 45; continue s; } + _r$13 = pc[0].wroteRequest(); /* */ $s = 46; case 46: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } + _v$3 = _r$13; case 45: + if (!(_v$3)) { _v$2 = false; $s = 44; continue s; } + _r$14 = tryPutIdleConn(trace); /* */ $s = 47; case 47: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } + _v$2 = _r$14; case 44: + alive = _v$2; + /* */ if (bodyEOF) { $s = 48; continue; } + /* */ $s = 49; continue; + /* if (bodyEOF) { */ case 48: + $r = $send(eofc[0], $clone(new structType.ptr(), structType)); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 49: + $s = 42; continue; + /* } else if (_selection$3[0] === 1) { */ case 39: + alive = false; + $r = pc[0].t.CancelRequest(rc.req); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 42; continue; + /* } else if (_selection$3[0] === 2) { */ case 40: + alive = false; + _arg$1 = rc.req; + _r$15 = rc.req.Context().Err(); /* */ $s = 52; case 52: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } + _arg$2 = _r$15; + $r = pc[0].t.cancelRequest(_arg$1, _arg$2); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 42; continue; + /* } else if (_selection$3[0] === 3) { */ case 41: + alive = false; + /* } */ case 42: + $r = testHookReadLoopBeforeNextRead$1(); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ $s = 3; continue; case 4: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.readLoop }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$13 = _r$13; $f._r$14 = _r$14; $f._r$15 = _r$15; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._selection = _selection; $f._selection$1 = _selection$1; $f._selection$2 = _selection$2; $f._selection$3 = _selection$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._v = _v; $f._v$1 = _v$1; $f._v$2 = _v$2; $f._v$3 = _v$3; $f.alive = alive; $f.body$1 = body$1; $f.bodyEOF = bodyEOF; $f.closeErr = closeErr; $f.eofc = eofc; $f.err = err; $f.hasBody = hasBody; $f.pc = pc; $f.rc = rc; $f.resp = resp; $f.testHookReadLoopBeforeNextRead$1 = testHookReadLoopBeforeNextRead$1; $f.trace = trace; $f.tryPutIdleConn = tryPutIdleConn; $f.waitForBodyRead = waitForBodyRead; $f.x$4 = x$4; $f.x$5 = x$5; $f.x$6 = x$6; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.readLoop = function() { return this.$val.readLoop(); }; + persistConn.ptr.prototype.readLoopPeekFailLocked = function(peekErr) { + var _r$1, _r$2, _tuple, buf, n, pc, peekErr, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; buf = $f.buf; n = $f.n; pc = $f.pc; peekErr = $f.peekErr; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + if (!($interfaceIsEqual(pc.closed, $ifaceNil))) { + $s = -1; return; + } + n = pc.br.Buffered(); + /* */ if (n > 0) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (n > 0) { */ case 1: + _r$1 = pc.br.Peek(n); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + buf = _tuple[0]; + $r = log.Printf("Unsolicited response received on idle HTTP channel starting with %q; err=%v", new sliceType([buf, peekErr])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + /* */ if ($interfaceIsEqual(peekErr, io.EOF)) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if ($interfaceIsEqual(peekErr, io.EOF)) { */ case 5: + $r = pc.closeLocked(errServerClosedIdle); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = 7; continue; + /* } else { */ case 6: + _r$2 = fmt.Errorf("readLoopPeekFailLocked: %v", new sliceType([peekErr])); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = pc.closeLocked(_r$2); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 7: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.readLoopPeekFailLocked }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.buf = buf; $f.n = n; $f.pc = pc; $f.peekErr = peekErr; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.readLoopPeekFailLocked = function(peekErr) { return this.$val.readLoopPeekFailLocked(peekErr); }; + persistConn.ptr.prototype.readResponse = function(rc, trace) { + var _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, continueCh, err, err$1, err$2, is1xx, is1xxNonTerminal, num1xx, pc, peek, rc, resCode, resp, trace, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; continueCh = $f.continueCh; err = $f.err; err$1 = $f.err$1; err$2 = $f.err$2; is1xx = $f.is1xx; is1xxNonTerminal = $f.is1xxNonTerminal; num1xx = $f.num1xx; pc = $f.pc; peek = $f.peek; rc = $f.rc; resCode = $f.resCode; resp = $f.resp; trace = $f.trace; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + resp = ptrType$16.nil; + err = $ifaceNil; + pc = this; + /* */ if (!(trace === ptrType$49.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { */ case 1: + _r$1 = pc.br.Peek(1); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + peek = _tuple[0]; + err$1 = _tuple[1]; + /* */ if ($interfaceIsEqual(err$1, $ifaceNil) && (peek.$length === 1)) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if ($interfaceIsEqual(err$1, $ifaceNil) && (peek.$length === 1)) { */ case 4: + $r = trace.GotFirstResponseByte(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 5: + /* } */ case 2: + num1xx = 0; + continueCh = rc.continueCh; + /* while (true) { */ case 7: + _r$2 = ReadResponse(pc.br, rc.req); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + resp = _tuple$1[0]; + err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $s = -1; return [resp, err]; + } + resCode = resp.StatusCode; + /* */ if (!(continueCh === $chanNil)) { $s = 10; continue; } + /* */ $s = 11; continue; + /* if (!(continueCh === $chanNil)) { */ case 10: + /* */ if (resCode === 100) { $s = 12; continue; } + /* */ if (resCode >= 200) { $s = 13; continue; } + /* */ $s = 14; continue; + /* if (resCode === 100) { */ case 12: + /* */ if (!(trace === ptrType$49.nil) && !(trace.Got100Continue === $throwNilPointerError)) { $s = 15; continue; } + /* */ $s = 16; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.Got100Continue === $throwNilPointerError)) { */ case 15: + $r = trace.Got100Continue(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 16: + $r = $send(continueCh, $clone(new structType.ptr(), structType)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + continueCh = $chanNil; + $s = 14; continue; + /* } else if (resCode >= 200) { */ case 13: + $close(continueCh); + continueCh = $chanNil; + /* } */ case 14: + /* } */ case 11: + is1xx = 100 <= resCode && resCode <= 199; + is1xxNonTerminal = is1xx && !((resCode === 101)); + /* */ if (is1xxNonTerminal) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (is1xxNonTerminal) { */ case 19: + num1xx = num1xx + (1) >> 0; + if (num1xx > 5) { + _tmp = ptrType$16.nil; + _tmp$1 = errors.New("net/http: too many 1xx informational responses"); + resp = _tmp; + err = _tmp$1; + $s = -1; return [resp, err]; + } + pc.readLimit = pc.maxHeaderResponseSize(); + /* */ if (!(trace === ptrType$49.nil) && !(trace.Got1xxResponse === $throwNilPointerError)) { $s = 21; continue; } + /* */ $s = 22; continue; + /* if (!(trace === ptrType$49.nil) && !(trace.Got1xxResponse === $throwNilPointerError)) { */ case 21: + _r$3 = trace.Got1xxResponse(resCode, (resp.Header)); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err$2 = _r$3; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$2 = ptrType$16.nil; + _tmp$3 = err$2; + resp = _tmp$2; + err = _tmp$3; + $s = -1; return [resp, err]; + } + /* } */ case 22: + /* continue; */ $s = 7; continue; + /* } */ case 20: + /* break; */ $s = 8; continue; + /* } */ $s = 7; continue; case 8: + resp.TLS = pc.tlsState; + $s = -1; return [resp, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.readResponse }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.continueCh = continueCh; $f.err = err; $f.err$1 = err$1; $f.err$2 = err$2; $f.is1xx = is1xx; $f.is1xxNonTerminal = is1xxNonTerminal; $f.num1xx = num1xx; $f.pc = pc; $f.peek = peek; $f.rc = rc; $f.resCode = resCode; $f.resp = resp; $f.trace = trace; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.readResponse = function(rc, trace) { return this.$val.readResponse(rc, trace); }; + persistConn.ptr.prototype.waitForContinue = function(continueCh) { + var continueCh, pc; + pc = this; + if (continueCh === $chanNil) { + return $throwNilPointerError; + } + return (function $b() { + var _r$1, _selection, _tuple, ok, timer, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; _tuple = $f._tuple; ok = $f.ok; timer = $f.timer; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + timer = time.NewTimer(pc.t.ExpectContinueTimeout); + $deferred.push([$methodVal(timer, "Stop"), []]); + _r$1 = $select([[continueCh], [timer.C], [pc.closech]]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + if (_selection[0] === 0) { + _tuple = _selection[1]; + ok = _tuple[1]; + $s = -1; return ok; + } else if (_selection[0] === 1) { + $s = -1; return true; + } else if (_selection[0] === 2) { + $s = -1; return false; + } + $s = -1; return false; + /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._selection = _selection; $f._tuple = _tuple; $f.ok = ok; $f.timer = timer; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }); + }; + persistConn.prototype.waitForContinue = function(continueCh) { return this.$val.waitForContinue(continueCh); }; + persistConn.ptr.prototype.writeLoop = function() { + var _arg, _r$1, _r$2, _r$3, _selection, _tuple, bre, err, ok, pc, startBytesWritten, wr, x$4, x$5, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _selection = $f._selection; _tuple = $f._tuple; bre = $f.bre; err = $f.err; ok = $f.ok; pc = $f.pc; startBytesWritten = $f.startBytesWritten; wr = $f.wr; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pc = this; + $deferred.push([function(_arg) { $close(_arg); }, [pc.writeLoopDone]]); + /* while (true) { */ case 1: + _r$1 = $select([[pc.writech], [pc.closech]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection = _r$1; + /* */ if (_selection[0] === 0) { $s = 4; continue; } + /* */ if (_selection[0] === 1) { $s = 5; continue; } + /* */ $s = 6; continue; + /* if (_selection[0] === 0) { */ case 4: + wr = $clone(_selection[1][0], writeRequest); + startBytesWritten = pc.nwrite; + _r$2 = wr.req.Request.write(pc.bw, pc.isProxy, wr.req.extra, pc.waitForContinue(wr.continueCh)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + _tuple = $assertType(err, requestBodyReadError, true); + bre = $clone(_tuple[0], requestBodyReadError); + ok = _tuple[1]; + /* */ if (ok) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (ok) { */ case 8: + err = bre.error; + $r = wr.req.setError(err); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 11; continue; } + /* */ $s = 12; continue; + /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 11: + _r$3 = pc.bw.Flush(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + err = _r$3; + /* } */ case 12: + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: + $r = wr.req.Request.closeBody(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ((x$4 = pc.nwrite, (x$4.$high === startBytesWritten.$high && x$4.$low === startBytesWritten.$low))) { + err = (x$5 = new nothingWrittenError.ptr(err), new x$5.constructor.elem(x$5)); + } + /* } */ case 15: + $r = $send(pc.writeErrCh, err); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = $send(wr.ch, err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 19; continue; } + /* */ $s = 20; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 19: + $r = pc.close(err); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* } */ case 20: + $s = 6; continue; + /* } else if (_selection[0] === 1) { */ case 5: + $s = -1; return; + /* } */ case 6: + /* } */ $s = 1; continue; case 2: + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.writeLoop }; } $f._arg = _arg; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._selection = _selection; $f._tuple = _tuple; $f.bre = bre; $f.err = err; $f.ok = ok; $f.pc = pc; $f.startBytesWritten = startBytesWritten; $f.wr = wr; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.writeLoop = function() { return this.$val.writeLoop(); }; + persistConn.ptr.prototype.wroteRequest = function() { + var _r$1, _selection, _selection$1, err, err$1, pc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _selection = $f._selection; _selection$1 = $f._selection$1; err = $f.err; err$1 = $f.err$1; pc = $f.pc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + _selection = $select([[pc.writeErrCh], []]); + /* */ if (_selection[0] === 0) { $s = 1; continue; } + /* */ if (_selection[0] === 1) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (_selection[0] === 0) { */ case 1: + err = _selection[1][0]; + $s = -1; return $interfaceIsEqual(err, $ifaceNil); + /* } else if (_selection[0] === 1) { */ case 2: + _r$1 = $select([[pc.writeErrCh], [time.After(new time.Duration(0, 50000000))]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _selection$1 = _r$1; + if (_selection$1[0] === 0) { + err$1 = _selection$1[1][0]; + $s = -1; return $interfaceIsEqual(err$1, $ifaceNil); + } else if (_selection$1[0] === 1) { + $s = -1; return false; + } + /* } */ case 3: + $s = -1; return false; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.wroteRequest }; } $f._r$1 = _r$1; $f._selection = _selection; $f._selection$1 = _selection$1; $f.err = err; $f.err$1 = err$1; $f.pc = pc; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.wroteRequest = function() { return this.$val.wroteRequest(); }; + httpError.ptr.prototype.Error = function() { + var e; + e = this; + return e.err; + }; + httpError.prototype.Error = function() { return this.$val.Error(); }; + httpError.ptr.prototype.Timeout = function() { + var e; + e = this; + return e.timeout; + }; + httpError.prototype.Timeout = function() { return this.$val.Timeout(); }; + httpError.ptr.prototype.Temporary = function() { + var e; + e = this; + return true; + }; + httpError.prototype.Temporary = function() { return this.$val.Temporary(); }; + nop = function() { + }; + persistConn.ptr.prototype.roundTrip = function(req) { + var _arg, _arg$1, _arg$2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, cancelChan, continueCh, ctxDoneChan, d, err, err$1, gone, headerFn, pc, re, req, requestedGzip, resc, resp, respHeaderTimer, startBytesWritten, timer, writeErrCh, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _selection = $f._selection; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$10 = $f._tmp$10; _tmp$11 = $f._tmp$11; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tmp$6 = $f._tmp$6; _tmp$7 = $f._tmp$7; _tmp$8 = $f._tmp$8; _tmp$9 = $f._tmp$9; cancelChan = $f.cancelChan; continueCh = $f.continueCh; ctxDoneChan = $f.ctxDoneChan; d = $f.d; err = $f.err; err$1 = $f.err$1; gone = $f.gone; headerFn = $f.headerFn; pc = $f.pc; re = $f.re; req = $f.req; requestedGzip = $f.requestedGzip; resc = $f.resc; resp = $f.resp; respHeaderTimer = $f.respHeaderTimer; startBytesWritten = $f.startBytesWritten; timer = $f.timer; writeErrCh = $f.writeErrCh; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + err = [err]; + pc = [pc]; + req = [req]; + resp = ptrType$16.nil; + err[0] = $ifaceNil; + pc[0] = this; + $r = testHookEnterRoundTrip(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$1 = pc[0].t.replaceReqCanceler(req[0].Request, $methodVal(pc[0], "cancelRequest")); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + /* */ if (!_r$1) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!_r$1) { */ case 2: + $r = pc[0].t.putOrCloseIdleConn(pc[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = ptrType$16.nil; + _tmp$1 = errRequestCanceled; + resp = _tmp; + err[0] = _tmp$1; + $s = -1; return [resp, err[0]]; + /* } */ case 3: + $r = pc[0].mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + pc[0].numExpectedResponses = pc[0].numExpectedResponses + (1) >> 0; + headerFn = pc[0].mutateHeaderFunc; + $r = pc[0].mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ if (!(headerFn === $throwNilPointerError)) { $s = 8; continue; } + /* */ $s = 9; continue; + /* if (!(headerFn === $throwNilPointerError)) { */ case 8: + $r = headerFn(req[0].extraHeaders()); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 9: + requestedGzip = false; + if (!pc[0].t.DisableCompression && new Header(req[0].Request.Header).Get("Accept-Encoding") === "" && new Header(req[0].Request.Header).Get("Range") === "" && !(req[0].Request.Method === "HEAD")) { + requestedGzip = true; + new Header(req[0].extraHeaders()).Set("Accept-Encoding", "gzip"); + } + continueCh = $chanNil; + if (req[0].Request.ProtoAtLeast(1, 1) && !($interfaceIsEqual(req[0].Request.Body, $ifaceNil)) && req[0].Request.expectsContinue()) { + continueCh = new $Chan(structType, 1); + } + if (pc[0].t.DisableKeepAlives) { + new Header(req[0].extraHeaders()).Set("Connection", "close"); + } + gone = new $Chan(structType, 0); + $deferred.push([function(_arg) { $close(_arg); }, [gone]]); + $deferred.push([(function(err, pc, req) { return function $b() { + var $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 1: + $r = pc[0].t.setReqCanceler(req[0].Request, $throwNilPointerError); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.$s = $s; $f.$r = $r; return $f; + }; })(err, pc, req), []]); + startBytesWritten = pc[0].nwrite; + writeErrCh = new $Chan($error, 1); + $r = $send(pc[0].writech, $clone(new writeRequest.ptr(req[0], writeErrCh, continueCh), writeRequest)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + resc = new $Chan(responseAndError, 0); + $r = $send(pc[0].reqch, $clone(new requestAndChan.ptr(req[0].Request, resc, requestedGzip, continueCh, gone), requestAndChan)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + respHeaderTimer = $chanNil; + cancelChan = req[0].Request.Cancel; + _r$2 = req[0].Request.Context().Done(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + ctxDoneChan = _r$2; + /* while (true) { */ case 14: + $r = testHookWaitResLoop(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _r$3 = $select([[writeErrCh], [pc[0].closech], [respHeaderTimer], [resc], [cancelChan], [ctxDoneChan]]); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _selection = _r$3; + /* */ if (_selection[0] === 0) { $s = 18; continue; } + /* */ if (_selection[0] === 1) { $s = 19; continue; } + /* */ if (_selection[0] === 2) { $s = 20; continue; } + /* */ if (_selection[0] === 3) { $s = 21; continue; } + /* */ if (_selection[0] === 4) { $s = 22; continue; } + /* */ if (_selection[0] === 5) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if (_selection[0] === 0) { */ case 18: + err$1 = _selection[1][0]; + /* */ if (false) { $s = 25; continue; } + /* */ $s = 26; continue; + /* if (false) { */ case 25: + $r = req[0].logf("writeErrCh resv: %T/%#v", new sliceType([err$1, err$1])); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 26: + /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 28; continue; } + /* */ $s = 29; continue; + /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 28: + _r$4 = fmt.Errorf("write error: %v", new sliceType([err$1])); /* */ $s = 30; case 30: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } + $r = pc[0].close(_r$4); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$2 = ptrType$16.nil; + _r$5 = pc[0].mapRoundTripError(req[0], startBytesWritten, err$1); /* */ $s = 32; case 32: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _tmp$3 = _r$5; + resp = _tmp$2; + err[0] = _tmp$3; + $s = -1; return [resp, err[0]]; + /* } */ case 29: + d = pc[0].t.ResponseHeaderTimeout; + /* */ if ((d.$high > 0 || (d.$high === 0 && d.$low > 0))) { $s = 33; continue; } + /* */ $s = 34; continue; + /* if ((d.$high > 0 || (d.$high === 0 && d.$low > 0))) { */ case 33: + /* */ if (false) { $s = 35; continue; } + /* */ $s = 36; continue; + /* if (false) { */ case 35: + $r = req[0].logf("starting timer for %v", new sliceType([d])); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 36: + timer = time.NewTimer(d); + $deferred.push([$methodVal(timer, "Stop"), []]); + respHeaderTimer = timer.C; + /* } */ case 34: + $s = 24; continue; + /* } else if (_selection[0] === 1) { */ case 19: + /* */ if (false) { $s = 38; continue; } + /* */ $s = 39; continue; + /* if (false) { */ case 38: + $r = req[0].logf("closech recv: %T %#v", new sliceType([pc[0].closed, pc[0].closed])); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 39: + _tmp$4 = ptrType$16.nil; + _r$6 = pc[0].mapRoundTripError(req[0], startBytesWritten, pc[0].closed); /* */ $s = 41; case 41: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _tmp$5 = _r$6; + resp = _tmp$4; + err[0] = _tmp$5; + $s = -1; return [resp, err[0]]; + /* } else if (_selection[0] === 2) { */ case 20: + /* */ if (false) { $s = 42; continue; } + /* */ $s = 43; continue; + /* if (false) { */ case 42: + $r = req[0].logf("timeout waiting for response headers.", new sliceType([])); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 43: + $r = pc[0].close(errTimeout); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp$6 = ptrType$16.nil; + _tmp$7 = errTimeout; + resp = _tmp$6; + err[0] = _tmp$7; + $s = -1; return [resp, err[0]]; + /* } else if (_selection[0] === 3) { */ case 21: + re = $clone(_selection[1][0], responseAndError); + /* */ if ((re.res === ptrType$16.nil) === ($interfaceIsEqual(re.err, $ifaceNil))) { $s = 46; continue; } + /* */ $s = 47; continue; + /* if ((re.res === ptrType$16.nil) === ($interfaceIsEqual(re.err, $ifaceNil))) { */ case 46: + _r$7 = fmt.Sprintf("internal error: exactly one of res or err should be set; nil=%v", new sliceType([new $Bool(re.res === ptrType$16.nil)])); /* */ $s = 48; case 48: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } + $panic(new $String(_r$7)); + /* } */ case 47: + /* */ if (false) { $s = 49; continue; } + /* */ $s = 50; continue; + /* if (false) { */ case 49: + $r = req[0].logf("resc recv: %p, %T/%#v", new sliceType([re.res, re.err, re.err])); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 50: + /* */ if (!($interfaceIsEqual(re.err, $ifaceNil))) { $s = 52; continue; } + /* */ $s = 53; continue; + /* if (!($interfaceIsEqual(re.err, $ifaceNil))) { */ case 52: + _tmp$8 = ptrType$16.nil; + _r$8 = pc[0].mapRoundTripError(req[0], startBytesWritten, re.err); /* */ $s = 54; case 54: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } + _tmp$9 = _r$8; + resp = _tmp$8; + err[0] = _tmp$9; + $s = -1; return [resp, err[0]]; + /* } */ case 53: + _tmp$10 = re.res; + _tmp$11 = $ifaceNil; + resp = _tmp$10; + err[0] = _tmp$11; + $s = -1; return [resp, err[0]]; + /* } else if (_selection[0] === 4) { */ case 22: + $r = pc[0].t.CancelRequest(req[0].Request); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cancelChan = $chanNil; + $s = 24; continue; + /* } else if (_selection[0] === 5) { */ case 23: + _arg$1 = req[0].Request; + _r$9 = req[0].Request.Context().Err(); /* */ $s = 56; case 56: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } + _arg$2 = _r$9; + $r = pc[0].t.cancelRequest(_arg$1, _arg$2); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + cancelChan = $chanNil; + ctxDoneChan = $chanNil; + /* } */ case 24: + /* } */ $s = 14; continue; case 15: + $s = -1; return [resp, err[0]]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [resp, err[0]]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.roundTrip }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._selection = _selection; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$10 = _tmp$10; $f._tmp$11 = _tmp$11; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tmp$6 = _tmp$6; $f._tmp$7 = _tmp$7; $f._tmp$8 = _tmp$8; $f._tmp$9 = _tmp$9; $f.cancelChan = cancelChan; $f.continueCh = continueCh; $f.ctxDoneChan = ctxDoneChan; $f.d = d; $f.err = err; $f.err$1 = err$1; $f.gone = gone; $f.headerFn = headerFn; $f.pc = pc; $f.re = re; $f.req = req; $f.requestedGzip = requestedGzip; $f.resc = resc; $f.resp = resp; $f.respHeaderTimer = respHeaderTimer; $f.startBytesWritten = startBytesWritten; $f.timer = timer; $f.writeErrCh = writeErrCh; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.roundTrip = function(req) { return this.$val.roundTrip(req); }; + transportRequest.ptr.prototype.logf = function(format, args) { + var _r$1, _r$2, _tuple, args, format, logf$1, ok, tr, x$4, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; args = $f.args; format = $f.format; logf$1 = $f.logf$1; ok = $f.ok; tr = $f.tr; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + tr = this; + _r$1 = tr.Request.Context().Value((x$4 = new tLogKey.ptr(), new x$4.constructor.elem(x$4))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = $assertType(_r$1, funcType$4, true); + logf$1 = _tuple[0]; + ok = _tuple[1]; + /* */ if (ok) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (ok) { */ case 2: + _r$2 = $clone(time.Now(), time.Time).Format("2006-01-02T15:04:05.999999999Z07:00"); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + $r = logf$1(_r$2 + ": " + format, args); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 3: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: transportRequest.ptr.prototype.logf }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f.args = args; $f.format = format; $f.logf$1 = logf$1; $f.ok = ok; $f.tr = tr; $f.x$4 = x$4; $f.$s = $s; $f.$r = $r; return $f; + }; + transportRequest.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; + persistConn.ptr.prototype.markReused = function() { + var pc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; pc = $f.pc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + pc.reused = true; + $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.markReused }; } $f.pc = pc; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.markReused = function() { return this.$val.markReused(); }; + persistConn.ptr.prototype.close = function(err) { + var err, pc, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; err = $f.err; pc = $f.pc; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + pc = this; + $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(pc.mu, "Unlock"), []]); + $r = pc.closeLocked(err); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $s = -1; return; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.close }; } $f.err = err; $f.pc = pc; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + persistConn.prototype.close = function(err) { return this.$val.close(err); }; + persistConn.ptr.prototype.closeLocked = function(err) { + var _r$1, err, pc, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; pc = $f.pc; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + pc = this; + if ($interfaceIsEqual(err, $ifaceNil)) { + $panic(new $String("nil error")); + } + pc.broken = true; + /* */ if ($interfaceIsEqual(pc.closed, $ifaceNil)) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if ($interfaceIsEqual(pc.closed, $ifaceNil)) { */ case 1: + pc.closed = err; + /* */ if (!($interfaceIsEqual(pc.alt, $ifaceNil))) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if (!($interfaceIsEqual(pc.alt, $ifaceNil))) { */ case 3: + $s = 5; continue; + /* } else { */ case 4: + _r$1 = pc.conn.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $close(pc.closech); + /* } */ case 5: + /* } */ case 2: + pc.mutateHeaderFunc = $throwNilPointerError; + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: persistConn.ptr.prototype.closeLocked }; } $f._r$1 = _r$1; $f.err = err; $f.pc = pc; $f.$s = $s; $f.$r = $r; return $f; + }; + persistConn.prototype.closeLocked = function(err) { return this.$val.closeLocked(err); }; + canonicalAddr = function(url$1) { + var _entry, _r$1, _tuple, addr, err, port, url$1, v, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _entry = $f._entry; _r$1 = $f._r$1; _tuple = $f._tuple; addr = $f.addr; err = $f.err; port = $f.port; url$1 = $f.url$1; v = $f.v; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + addr = url$1.Hostname(); + _r$1 = idnaASCII(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + v = _tuple[0]; + err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + addr = v; + } + port = url$1.Port(); + if (port === "") { + port = (_entry = portMap[$String.keyFor(url$1.Scheme)], _entry !== undefined ? _entry.v : ""); + } + $s = -1; return net.JoinHostPort(addr, port); + /* */ } return; } if ($f === undefined) { $f = { $blk: canonicalAddr }; } $f._entry = _entry; $f._r$1 = _r$1; $f._tuple = _tuple; $f.addr = addr; $f.err = err; $f.port = port; $f.url$1 = url$1; $f.v = v; $f.$s = $s; $f.$r = $r; return $f; + }; + bodyEOFSignal.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, closed, err, es, n, p, rerr, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tmp$4 = $f._tmp$4; _tmp$5 = $f._tmp$5; _tuple = $f._tuple; closed = $f.closed; err = $f.err; es = $f.es; n = $f.n; p = $f.p; rerr = $f.rerr; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + n = 0; + err = $ifaceNil; + es = this; + $r = es.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _tmp = es.closed; + _tmp$1 = es.rerr; + closed = _tmp; + rerr = _tmp$1; + $r = es.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (closed) { + _tmp$2 = 0; + _tmp$3 = errReadOnClosedResBody; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + if (!($interfaceIsEqual(rerr, $ifaceNil))) { + _tmp$4 = 0; + _tmp$5 = rerr; + n = _tmp$4; + err = _tmp$5; + $s = -1; return [n, err]; + } + _r$1 = es.body.Read(p); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + n = _tuple[0]; + err = _tuple[1]; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } + /* */ $s = 5; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: + $r = es.mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(es.mu, "Unlock"), []]); + if ($interfaceIsEqual(es.rerr, $ifaceNil)) { + es.rerr = err; + } + _r$2 = es.condfn(err); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + /* } */ case 5: + $s = -1; return [n, err]; + /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: bodyEOFSignal.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tmp$4 = _tmp$4; $f._tmp$5 = _tmp$5; $f._tuple = _tuple; $f.closed = closed; $f.err = err; $f.es = es; $f.n = n; $f.p = p; $f.rerr = rerr; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + bodyEOFSignal.prototype.Read = function(p) { return this.$val.Read(p); }; + bodyEOFSignal.ptr.prototype.Close = function() { + var _r$1, _r$2, _r$3, err, es, $s, $deferred, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; err = $f.err; es = $f.es; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred); + es = this; + $r = es.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $deferred.push([$methodVal(es.mu, "Unlock"), []]); + if (es.closed) { + $s = -1; return $ifaceNil; + } + es.closed = true; + /* */ if (!(es.earlyCloseFn === $throwNilPointerError) && !($interfaceIsEqual(es.rerr, io.EOF))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!(es.earlyCloseFn === $throwNilPointerError) && !($interfaceIsEqual(es.rerr, io.EOF))) { */ case 2: + _r$1 = es.earlyCloseFn(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* } */ case 3: + _r$2 = es.body.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + err = _r$2; + _r$3 = es.condfn(err); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + $s = -1; return _r$3; + /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: bodyEOFSignal.ptr.prototype.Close }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f.err = err; $f.es = es; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } } + }; + bodyEOFSignal.prototype.Close = function() { return this.$val.Close(); }; + bodyEOFSignal.ptr.prototype.condfn = function(err) { + var _r$1, err, es, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; err = $f.err; es = $f.es; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + es = this; + if (es.fn === $throwNilPointerError) { + $s = -1; return err; + } + _r$1 = es.fn(err); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + err = _r$1; + es.fn = $throwNilPointerError; + $s = -1; return err; + /* */ } return; } if ($f === undefined) { $f = { $blk: bodyEOFSignal.ptr.prototype.condfn }; } $f._r$1 = _r$1; $f.err = err; $f.es = es; $f.$s = $s; $f.$r = $r; return $f; + }; + bodyEOFSignal.prototype.condfn = function(err) { return this.$val.condfn(err); }; + gzipReader.ptr.prototype.Read = function(p) { + var _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; _r$2 = $f._r$2; _tmp = $f._tmp; _tmp$1 = $f._tmp$1; _tmp$2 = $f._tmp$2; _tmp$3 = $f._tmp$3; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; err = $f.err; gz = $f.gz; n = $f.n; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + n = 0; + err = $ifaceNil; + gz = this; + /* */ if (gz.zr === ptrType$76.nil) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (gz.zr === ptrType$76.nil) { */ case 1: + /* */ if ($interfaceIsEqual(gz.zerr, $ifaceNil)) { $s = 3; continue; } + /* */ $s = 4; continue; + /* if ($interfaceIsEqual(gz.zerr, $ifaceNil)) { */ case 3: + _r$1 = gzip.NewReader(gz.body); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _tuple = _r$1; + gz.zr = _tuple[0]; + gz.zerr = _tuple[1]; + /* } */ case 4: + if (!($interfaceIsEqual(gz.zerr, $ifaceNil))) { + _tmp = 0; + _tmp$1 = gz.zerr; + n = _tmp; + err = _tmp$1; + $s = -1; return [n, err]; + } + /* } */ case 2: + $r = gz.body.mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (gz.body.closed) { + err = errReadOnClosedResBody; + } + $r = gz.body.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = 0; + _tmp$3 = err; + n = _tmp$2; + err = _tmp$3; + $s = -1; return [n, err]; + } + _r$2 = gz.zr.Read(p); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$1 = _r$2; + n = _tuple$1[0]; + err = _tuple$1[1]; + $s = -1; return [n, err]; + /* */ } return; } if ($f === undefined) { $f = { $blk: gzipReader.ptr.prototype.Read }; } $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tmp = _tmp; $f._tmp$1 = _tmp$1; $f._tmp$2 = _tmp$2; $f._tmp$3 = _tmp$3; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.err = err; $f.gz = gz; $f.n = n; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + gzipReader.prototype.Read = function(p) { return this.$val.Read(p); }; + gzipReader.ptr.prototype.Close = function() { + var _r$1, gz, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; gz = $f.gz; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + gz = this; + _r$1 = gz.body.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: gzipReader.ptr.prototype.Close }; } $f._r$1 = _r$1; $f.gz = gz; $f.$s = $s; $f.$r = $r; return $f; + }; + gzipReader.prototype.Close = function() { return this.$val.Close(); }; + tlsHandshakeTimeoutError.ptr.prototype.Timeout = function() { + return true; + }; + tlsHandshakeTimeoutError.prototype.Timeout = function() { return this.$val.Timeout(); }; + tlsHandshakeTimeoutError.ptr.prototype.Temporary = function() { + return true; + }; + tlsHandshakeTimeoutError.prototype.Temporary = function() { return this.$val.Temporary(); }; + tlsHandshakeTimeoutError.ptr.prototype.Error = function() { + return "net/http: TLS handshake timeout"; + }; + tlsHandshakeTimeoutError.prototype.Error = function() { return this.$val.Error(); }; + fakeLocker.ptr.prototype.Lock = function() { + }; + fakeLocker.prototype.Lock = function() { return this.$val.Lock(); }; + fakeLocker.ptr.prototype.Unlock = function() { + }; + fakeLocker.prototype.Unlock = function() { return this.$val.Unlock(); }; + cloneTLSConfig = function(cfg) { + var _r$1, cfg, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; cfg = $f.cfg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + if (cfg === ptrType$14.nil) { + $s = -1; return new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$11.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$32.nil, sliceType$1.nil, "", 0, ptrType$32.nil, false, sliceType$12.nil, false, false, arrayType$2.zero(), $ifaceNil, 0, 0, sliceType$13.nil, false, 0, $ifaceNil, new sync.Once.ptr(new sync.Mutex.ptr(0, 0), 0), new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$14.nil); + } + _r$1 = cfg.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $s = -1; return _r$1; + /* */ } return; } if ($f === undefined) { $f = { $blk: cloneTLSConfig }; } $f._r$1 = _r$1; $f.cfg = cfg; $f.$s = $s; $f.$r = $r; return $f; + }; + connLRU.ptr.prototype.add = function(pc) { + var _entry, _key, _tuple, cl, ele, ok, pc; + cl = this; + if (cl.ll === ptrType$13.nil) { + cl.ll = list.New(); + cl.m = {}; + } + ele = cl.ll.PushFront(pc); + _tuple = (_entry = cl.m[ptrType$107.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$108.nil, false]); + ok = _tuple[1]; + if (ok) { + $panic(new $String("persistConn was already in LRU")); + } + _key = pc; (cl.m || $throwRuntimeError("assignment to entry in nil map"))[ptrType$107.keyFor(_key)] = { k: _key, v: ele }; + }; + connLRU.prototype.add = function(pc) { return this.$val.add(pc); }; + connLRU.ptr.prototype.removeOldest = function() { + var cl, ele, pc; + cl = this; + ele = cl.ll.Back(); + pc = $assertType(ele.Value, ptrType$107); + cl.ll.Remove(ele); + delete cl.m[ptrType$107.keyFor(pc)]; + return pc; + }; + connLRU.prototype.removeOldest = function() { return this.$val.removeOldest(); }; + connLRU.ptr.prototype.remove = function(pc) { + var _entry, _tuple, cl, ele, ok, pc; + cl = this; + _tuple = (_entry = cl.m[ptrType$107.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$108.nil, false]); + ele = _tuple[0]; + ok = _tuple[1]; + if (ok) { + cl.ll.Remove(ele); + delete cl.m[ptrType$107.keyFor(pc)]; + } + }; + connLRU.prototype.remove = function(pc) { return this.$val.remove(pc); }; + connLRU.ptr.prototype.len = function() { + var cl; + cl = this; + return $keys(cl.m).length; + }; + connLRU.prototype.len = function() { return this.$val.len(); }; + validPort = function(p) { + var _i, _ref, p, r; + _ref = (new sliceType$3($stringToBytes(p))); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + r = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (r < 48 || r > 57) { + return false; + } + _i++; + } + return true; + }; + ptrType$110.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$111.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}]; + noTransport.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}]; + ptrType$112.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "CancelRequest", name: "CancelRequest", pkg: "", typ: $funcType([ptrType$7], [], false)}]; + ptrType$113.methods = [{prop: "send", name: "send", pkg: "net/http", typ: $funcType([ptrType$7, time.Time], [ptrType$16, funcType$5, $error], false)}, {prop: "deadline", name: "deadline", pkg: "net/http", typ: $funcType([], [time.Time], false)}, {prop: "transport", name: "transport", pkg: "net/http", typ: $funcType([], [RoundTripper], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType$16, $error], false)}, {prop: "checkRedirect", name: "checkRedirect", pkg: "net/http", typ: $funcType([ptrType$7, sliceType$7], [$error], false)}, {prop: "Do", name: "Do", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "do$", name: "do", pkg: "net/http", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "makeHeadersCopier", name: "makeHeadersCopier", pkg: "net/http", typ: $funcType([ptrType$7], [funcType$6], false)}, {prop: "Post", name: "Post", pkg: "", typ: $funcType([$String, $String, io.Reader], [ptrType$16, $error], false)}, {prop: "PostForm", name: "PostForm", pkg: "", typ: $funcType([$String, url.Values], [ptrType$16, $error], false)}, {prop: "Head", name: "Head", pkg: "", typ: $funcType([$String], [ptrType$16, $error], false)}]; + ptrType$114.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$25.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$3.methods = [{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$7, $String], [ptrType$29, $error], false)}, {prop: "shouldTraceGetConn", name: "shouldTraceGetConn", pkg: "net/http", typ: $funcType([http2clientConnIdleState], [$Bool], false)}, {prop: "getClientConn", name: "getClientConn", pkg: "net/http", typ: $funcType([ptrType$7, $String, $Bool], [ptrType$29, $error], false)}, {prop: "getStartDialLocked", name: "getStartDialLocked", pkg: "net/http", typ: $funcType([$String], [ptrType$30], false)}, {prop: "addConnIfNeeded", name: "addConnIfNeeded", pkg: "net/http", typ: $funcType([$String, ptrType$22, ptrType$101], [$Bool, $error], false)}, {prop: "addConn", name: "addConn", pkg: "net/http", typ: $funcType([$String, ptrType$29], [], false)}, {prop: "addConnLocked", name: "addConnLocked", pkg: "net/http", typ: $funcType([$String, ptrType$29], [], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$29], [], false)}, {prop: "closeIdleConnections", name: "closeIdleConnections", pkg: "net/http", typ: $funcType([], [], false)}]; + ptrType$30.methods = [{prop: "dial", name: "dial", pkg: "net/http", typ: $funcType([$String], [], false)}]; + ptrType$31.methods = [{prop: "run", name: "run", pkg: "net/http", typ: $funcType([ptrType$22, $String, ptrType$101], [], false)}]; + http2noDialClientConnPool.methods = [{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$7, $String], [ptrType$29, $error], false)}]; + http2noDialH2RoundTripper.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}]; + ptrType$117.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "bytesFromFirstChunk", name: "bytesFromFirstChunk", pkg: "net/http", typ: $funcType([], [sliceType$3], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "lastChunkOrAlloc", name: "lastChunkOrAlloc", pkg: "net/http", typ: $funcType([$Int64], [sliceType$3], false)}]; + http2ErrCode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + http2ConnectionError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2StreamError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2goAwayFlowError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2connError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2pseudoHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2duplicatePseudoHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2headerFieldNameError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2headerFieldValueError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$33.methods = [{prop: "setConnFlow", name: "setConnFlow", pkg: "net/http", typ: $funcType([ptrType$33], [], false)}, {prop: "available", name: "available", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "take", name: "take", pkg: "net/http", typ: $funcType([$Int32], [], false)}, {prop: "add", name: "add", pkg: "net/http", typ: $funcType([$Int32], [$Bool], false)}]; + http2FrameType.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + http2Flags.methods = [{prop: "Has", name: "Has", pkg: "", typ: $funcType([http2Flags], [$Bool], false)}]; + http2FrameHeader.methods = [{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [http2FrameHeader], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeDebug", name: "writeDebug", pkg: "net/http", typ: $funcType([ptrType$37], [], false)}]; + ptrType$118.methods = [{prop: "checkValid", name: "checkValid", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "invalidate", name: "invalidate", pkg: "net/http", typ: $funcType([], [], false)}]; + ptrType$34.methods = [{prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "startWrite", name: "startWrite", pkg: "net/http", typ: $funcType([http2FrameType, http2Flags, $Uint32], [], false)}, {prop: "endWrite", name: "endWrite", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "logWrite", name: "logWrite", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeByte", name: "writeByte", pkg: "net/http", typ: $funcType([$Uint8], [], false)}, {prop: "writeBytes", name: "writeBytes", pkg: "net/http", typ: $funcType([sliceType$3], [], false)}, {prop: "writeUint16", name: "writeUint16", pkg: "net/http", typ: $funcType([$Uint16], [], false)}, {prop: "writeUint32", name: "writeUint32", pkg: "net/http", typ: $funcType([$Uint32], [], false)}, {prop: "SetReuseFrames", name: "SetReuseFrames", pkg: "", typ: $funcType([], [], false)}, {prop: "SetMaxReadFrameSize", name: "SetMaxReadFrameSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "ErrorDetail", name: "ErrorDetail", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadFrame", name: "ReadFrame", pkg: "", typ: $funcType([], [http2Frame, $error], false)}, {prop: "connError", name: "connError", pkg: "net/http", typ: $funcType([http2ErrCode, $String], [$error], false)}, {prop: "checkFrameOrder", name: "checkFrameOrder", pkg: "net/http", typ: $funcType([http2Frame], [$error], false)}, {prop: "WriteData", name: "WriteData", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3], [$error], false)}, {prop: "WriteDataPadded", name: "WriteDataPadded", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3, sliceType$3], [$error], false)}, {prop: "WriteSettings", name: "WriteSettings", pkg: "", typ: $funcType([sliceType$19], [$error], true)}, {prop: "WriteSettingsAck", name: "WriteSettingsAck", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WritePing", name: "WritePing", pkg: "", typ: $funcType([$Bool, arrayType$5], [$error], false)}, {prop: "WriteGoAway", name: "WriteGoAway", pkg: "", typ: $funcType([$Uint32, http2ErrCode, sliceType$3], [$error], false)}, {prop: "WriteWindowUpdate", name: "WriteWindowUpdate", pkg: "", typ: $funcType([$Uint32, $Uint32], [$error], false)}, {prop: "WriteHeaders", name: "WriteHeaders", pkg: "", typ: $funcType([http2HeadersFrameParam], [$error], false)}, {prop: "WritePriority", name: "WritePriority", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [$error], false)}, {prop: "WriteRSTStream", name: "WriteRSTStream", pkg: "", typ: $funcType([$Uint32, http2ErrCode], [$error], false)}, {prop: "WriteContinuation", name: "WriteContinuation", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3], [$error], false)}, {prop: "WritePushPromise", name: "WritePushPromise", pkg: "", typ: $funcType([http2PushPromiseParam], [$error], false)}, {prop: "WriteRawFrame", name: "WriteRawFrame", pkg: "", typ: $funcType([http2FrameType, http2Flags, $Uint32, sliceType$3], [$error], false)}, {prop: "maxHeaderStringLen", name: "maxHeaderStringLen", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "readMetaFrame", name: "readMetaFrame", pkg: "net/http", typ: $funcType([ptrType$38], [ptrType$39, $error], false)}]; + ptrType$35.methods = [{prop: "getDataFrame", name: "getDataFrame", pkg: "net/http", typ: $funcType([], [ptrType$42], false)}]; + ptrType$42.methods = [{prop: "StreamEnded", name: "StreamEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Data", name: "Data", pkg: "", typ: $funcType([], [sliceType$3], false)}]; + ptrType$41.methods = [{prop: "IsAck", name: "IsAck", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([http2SettingID], [$Uint32, $Bool], false)}, {prop: "Setting", name: "Setting", pkg: "", typ: $funcType([$Int], [http2Setting], false)}, {prop: "NumSettings", name: "NumSettings", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "HasDuplicates", name: "HasDuplicates", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ForeachSetting", name: "ForeachSetting", pkg: "", typ: $funcType([funcType$9], [$error], false)}]; + ptrType$44.methods = [{prop: "IsAck", name: "IsAck", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$45.methods = [{prop: "DebugData", name: "DebugData", pkg: "", typ: $funcType([], [sliceType$3], false)}]; + ptrType$119.methods = [{prop: "Payload", name: "Payload", pkg: "", typ: $funcType([], [sliceType$3], false)}]; + ptrType$38.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "StreamEnded", name: "StreamEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasPriority", name: "HasPriority", pkg: "", typ: $funcType([], [$Bool], false)}]; + http2PriorityParam.methods = [{prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$40.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$67.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$39.methods = [{prop: "PseudoValue", name: "PseudoValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "RegularFields", name: "RegularFields", pkg: "", typ: $funcType([], [sliceType$15], false)}, {prop: "PseudoFields", name: "PseudoFields", pkg: "", typ: $funcType([], [sliceType$15], false)}, {prop: "checkPseudos", name: "checkPseudos", pkg: "net/http", typ: $funcType([], [$error], false)}]; + http2goroutineLock.methods = [{prop: "check", name: "check", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "checkNotOn", name: "checkNotOn", pkg: "net/http", typ: $funcType([], [], false)}]; + http2streamState.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + http2Setting.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Valid", name: "Valid", pkg: "", typ: $funcType([], [$error], false)}]; + http2SettingID.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + http2gate.methods = [{prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; + http2closeWaiter.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; + ptrType$69.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([], [], false)}]; + ptrType$56.methods = [{prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$120.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$71.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Keys", name: "Keys", pkg: "", typ: $funcType([Header], [sliceType$1], false)}, {prop: "SortStrings", name: "SortStrings", pkg: "", typ: $funcType([sliceType$1], [], false)}]; + ptrType$68.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "CloseWithError", name: "CloseWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "BreakWithError", name: "BreakWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "closeWithErrorAndCode", name: "closeWithErrorAndCode", pkg: "net/http", typ: $funcType([$error, funcType$2], [], false)}, {prop: "closeWithError", name: "closeWithError", pkg: "net/http", typ: $funcType([ptrType$51, $error, funcType$2], [], false)}, {prop: "closeDoneLocked", name: "closeDoneLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$3], false)}]; + ptrType$53.methods = [{prop: "initialConnRecvWindowSize", name: "initialConnRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "initialStreamRecvWindowSize", name: "initialStreamRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "maxReadFrameSize", name: "maxReadFrameSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "maxConcurrentStreams", name: "maxConcurrentStreams", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "ServeConn", name: "ServeConn", pkg: "", typ: $funcType([net.Conn, ptrType$54], [], false)}]; + ptrType$52.methods = [{prop: "registerConn", name: "registerConn", pkg: "net/http", typ: $funcType([ptrType$9], [], false)}, {prop: "unregisterConn", name: "unregisterConn", pkg: "net/http", typ: $funcType([ptrType$9], [], false)}, {prop: "startGracefulShutdown", name: "startGracefulShutdown", pkg: "net/http", typ: $funcType([], [], false)}]; + ptrType$54.methods = [{prop: "baseConfig", name: "baseConfig", pkg: "net/http", typ: $funcType([], [ptrType$48], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([], [Handler], false)}]; + ptrType$9.methods = [{prop: "rejectConn", name: "rejectConn", pkg: "net/http", typ: $funcType([http2ErrCode, $String], [], false)}, {prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "curOpenStreams", name: "curOpenStreams", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "Framer", name: "Framer", pkg: "", typ: $funcType([], [ptrType$34], false)}, {prop: "CloseConn", name: "CloseConn", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "HeaderEncoder", name: "HeaderEncoder", pkg: "", typ: $funcType([], [ptrType$58, ptrType$37], false)}, {prop: "state", name: "state", pkg: "net/http", typ: $funcType([$Uint32], [http2streamState, ptrType$6], false)}, {prop: "setConnState", name: "setConnState", pkg: "net/http", typ: $funcType([ConnState], [], false)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "condlogf", name: "condlogf", pkg: "net/http", typ: $funcType([$error, $String, sliceType], [], true)}, {prop: "canonicalHeader", name: "canonicalHeader", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "readFrames", name: "readFrames", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeFrameAsync", name: "writeFrameAsync", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "closeAllStreamsOnConnClose", name: "closeAllStreamsOnConnClose", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "stopShutdownTimer", name: "stopShutdownTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "notePanic", name: "notePanic", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "serve", name: "serve", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "awaitGracefulShutdown", name: "awaitGracefulShutdown", pkg: "net/http", typ: $funcType([chanType$3, chanType$2], [], false)}, {prop: "onSettingsTimer", name: "onSettingsTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onIdleTimer", name: "onIdleTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onShutdownTimer", name: "onShutdownTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "sendServeMsg", name: "sendServeMsg", pkg: "net/http", typ: $funcType([$emptyInterface], [], false)}, {prop: "readPreface", name: "readPreface", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "writeDataFromHandler", name: "writeDataFromHandler", pkg: "net/http", typ: $funcType([ptrType$6, sliceType$3, $Bool], [$error], false)}, {prop: "writeFrameFromHandler", name: "writeFrameFromHandler", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [$error], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "startFrameWrite", name: "startFrameWrite", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "wroteFrame", name: "wroteFrame", pkg: "net/http", typ: $funcType([http2frameWriteResult], [], false)}, {prop: "scheduleFrameWrite", name: "scheduleFrameWrite", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startGracefulShutdown", name: "startGracefulShutdown", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startGracefulShutdownInternal", name: "startGracefulShutdownInternal", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "goAway", name: "goAway", pkg: "net/http", typ: $funcType([http2ErrCode], [], false)}, {prop: "shutDownIn", name: "shutDownIn", pkg: "net/http", typ: $funcType([time.Duration], [], false)}, {prop: "resetStream", name: "resetStream", pkg: "net/http", typ: $funcType([http2StreamError], [], false)}, {prop: "processFrameFromReader", name: "processFrameFromReader", pkg: "net/http", typ: $funcType([http2readFrameResult], [$Bool], false)}, {prop: "processFrame", name: "processFrame", pkg: "net/http", typ: $funcType([http2Frame], [$error], false)}, {prop: "processPing", name: "processPing", pkg: "net/http", typ: $funcType([ptrType$44], [$error], false)}, {prop: "processWindowUpdate", name: "processWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$43], [$error], false)}, {prop: "processResetStream", name: "processResetStream", pkg: "net/http", typ: $funcType([ptrType$46], [$error], false)}, {prop: "closeStream", name: "closeStream", pkg: "net/http", typ: $funcType([ptrType$6, $error], [], false)}, {prop: "processSettings", name: "processSettings", pkg: "net/http", typ: $funcType([ptrType$41], [$error], false)}, {prop: "processSetting", name: "processSetting", pkg: "net/http", typ: $funcType([http2Setting], [$error], false)}, {prop: "processSettingInitialWindowSize", name: "processSettingInitialWindowSize", pkg: "net/http", typ: $funcType([$Uint32], [$error], false)}, {prop: "processData", name: "processData", pkg: "net/http", typ: $funcType([ptrType$42], [$error], false)}, {prop: "processGoAway", name: "processGoAway", pkg: "net/http", typ: $funcType([ptrType$45], [$error], false)}, {prop: "processHeaders", name: "processHeaders", pkg: "net/http", typ: $funcType([ptrType$39], [$error], false)}, {prop: "processPriority", name: "processPriority", pkg: "net/http", typ: $funcType([ptrType$66], [$error], false)}, {prop: "newStream", name: "newStream", pkg: "net/http", typ: $funcType([$Uint32, $Uint32, http2streamState], [ptrType$6], false)}, {prop: "newWriterAndRequest", name: "newWriterAndRequest", pkg: "net/http", typ: $funcType([ptrType$6, ptrType$39], [ptrType$5, ptrType$7, $error], false)}, {prop: "newWriterAndRequestNoBody", name: "newWriterAndRequestNoBody", pkg: "net/http", typ: $funcType([ptrType$6, http2requestParam], [ptrType$5, ptrType$7, $error], false)}, {prop: "runHandler", name: "runHandler", pkg: "net/http", typ: $funcType([ptrType$5, ptrType$7, funcType$22], [], false)}, {prop: "writeHeaders", name: "writeHeaders", pkg: "net/http", typ: $funcType([ptrType$6, ptrType$64], [$error], false)}, {prop: "write100ContinueHeaders", name: "write100ContinueHeaders", pkg: "net/http", typ: $funcType([ptrType$6], [], false)}, {prop: "noteBodyReadFromHandler", name: "noteBodyReadFromHandler", pkg: "net/http", typ: $funcType([ptrType$6, $Int, $error], [], false)}, {prop: "noteBodyRead", name: "noteBodyRead", pkg: "net/http", typ: $funcType([ptrType$6, $Int], [], false)}, {prop: "sendWindowUpdate", name: "sendWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$6, $Int], [], false)}, {prop: "sendWindowUpdate32", name: "sendWindowUpdate32", pkg: "net/http", typ: $funcType([ptrType$6, $Int32], [], false)}, {prop: "startPush", name: "startPush", pkg: "net/http", typ: $funcType([ptrType$62], [], false)}]; + ptrType$6.methods = [{prop: "isPushed", name: "isPushed", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "endStream", name: "endStream", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "copyTrailersToHandlerRequest", name: "copyTrailersToHandlerRequest", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onWriteTimeout", name: "onWriteTimeout", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "processTrailerHeaders", name: "processTrailerHeaders", pkg: "net/http", typ: $funcType([ptrType$39], [$error], false)}]; + ptrType$8.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$5.methods = [{prop: "Push", name: "Push", pkg: "", typ: $funcType([$String, ptrType$50], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "CloseNotify", name: "CloseNotify", pkg: "", typ: $funcType([], [chanType$9], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([$Int, sliceType$3, $String], [$Int, $error], false)}, {prop: "handlerDone", name: "handlerDone", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "push", name: "push", pkg: "net/http", typ: $funcType([$String, http2pushOptions], [$error], false)}]; + ptrType$70.methods = [{prop: "hasTrailers", name: "hasTrailers", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "declareTrailer", name: "declareTrailer", pkg: "net/http", typ: $funcType([$String], [], false)}, {prop: "writeChunk", name: "writeChunk", pkg: "net/http", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "promoteUndeclaredTrailers", name: "promoteUndeclaredTrailers", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([$Int], [], false)}]; + http2chunkWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$22.methods = [{prop: "idleConnTimeout", name: "idleConnTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "disableCompression", name: "disableCompression", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "connPool", name: "connPool", pkg: "net/http", typ: $funcType([], [http2ClientConnPool], false)}, {prop: "initConnPool", name: "initConnPool", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "RoundTripOpt", name: "RoundTripOpt", pkg: "", typ: $funcType([ptrType$7, http2RoundTripOpt], [ptrType$16, $error], false)}, {prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}, {prop: "dialClientConn", name: "dialClientConn", pkg: "net/http", typ: $funcType([$String, $Bool], [ptrType$29, $error], false)}, {prop: "newTLSConfig", name: "newTLSConfig", pkg: "net/http", typ: $funcType([$String], [ptrType$14], false)}, {prop: "dialTLS", name: "dialTLS", pkg: "net/http", typ: $funcType([], [funcType$23], false)}, {prop: "dialTLSDefault", name: "dialTLSDefault", pkg: "net/http", typ: $funcType([$String, $String, ptrType$14], [net.Conn, $error], false)}, {prop: "disableKeepAlives", name: "disableKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "expectContinueTimeout", name: "expectContinueTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "NewClientConn", name: "NewClientConn", pkg: "", typ: $funcType([net.Conn], [ptrType$29, $error], false)}, {prop: "newClientConn", name: "newClientConn", pkg: "net/http", typ: $funcType([net.Conn, $Bool], [ptrType$29, $error], false)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "getBodyWriterState", name: "getBodyWriterState", pkg: "net/http", typ: $funcType([ptrType$75, io.Reader], [http2bodyWriterState], false)}]; + ptrType$29.methods = [{prop: "Ping", name: "Ping", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "setGoAway", name: "setGoAway", pkg: "net/http", typ: $funcType([ptrType$45], [], false)}, {prop: "CanTakeNewRequest", name: "CanTakeNewRequest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "idleState", name: "idleState", pkg: "net/http", typ: $funcType([], [http2clientConnIdleState], false)}, {prop: "idleStateLocked", name: "idleStateLocked", pkg: "net/http", typ: $funcType([], [http2clientConnIdleState], false)}, {prop: "canTakeNewRequestLocked", name: "canTakeNewRequestLocked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "onIdleTimeout", name: "onIdleTimeout", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "closeIfIdle", name: "closeIfIdle", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shutdown", name: "shutdown", pkg: "net/http", typ: $funcType([http2contextContext], [$error], false)}, {prop: "sendGoAway", name: "sendGoAway", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "frameScratchBuffer", name: "frameScratchBuffer", pkg: "net/http", typ: $funcType([], [sliceType$3], false)}, {prop: "putFrameScratchBuffer", name: "putFrameScratchBuffer", pkg: "net/http", typ: $funcType([sliceType$3], [], false)}, {prop: "responseHeaderTimeout", name: "responseHeaderTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "roundTrip", name: "roundTrip", pkg: "net/http", typ: $funcType([ptrType$7], [ptrType$16, $Bool, $error], false)}, {prop: "awaitOpenSlotForRequest", name: "awaitOpenSlotForRequest", pkg: "net/http", typ: $funcType([ptrType$7], [$error], false)}, {prop: "writeHeaders", name: "writeHeaders", pkg: "net/http", typ: $funcType([$Uint32, $Bool, $Int, sliceType$3], [$error], false)}, {prop: "encodeHeaders", name: "encodeHeaders", pkg: "net/http", typ: $funcType([ptrType$7, $Bool, $String, $Int64], [sliceType$3, $error], false)}, {prop: "encodeTrailers", name: "encodeTrailers", pkg: "net/http", typ: $funcType([ptrType$7], [sliceType$3, $error], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([$String, $String], [], false)}, {prop: "newStream", name: "newStream", pkg: "net/http", typ: $funcType([], [ptrType$75], false)}, {prop: "forgetStreamID", name: "forgetStreamID", pkg: "net/http", typ: $funcType([$Uint32], [], false)}, {prop: "streamByID", name: "streamByID", pkg: "net/http", typ: $funcType([$Uint32, $Bool], [ptrType$75], false)}, {prop: "readLoop", name: "readLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "ping", name: "ping", pkg: "net/http", typ: $funcType([http2contextContext], [$error], false)}, {prop: "writeStreamReset", name: "writeStreamReset", pkg: "net/http", typ: $funcType([$Uint32, http2ErrCode, $error], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}]; + ptrType$75.methods = [{prop: "get1xxTraceFunc", name: "get1xxTraceFunc", pkg: "net/http", typ: $funcType([], [funcType$13], false)}, {prop: "awaitRequestCancel", name: "awaitRequestCancel", pkg: "net/http", typ: $funcType([ptrType$7], [], false)}, {prop: "cancelStream", name: "cancelStream", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "checkResetOrDone", name: "checkResetOrDone", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "getStartedWrite", name: "getStartedWrite", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "abortRequestBodyWrite", name: "abortRequestBodyWrite", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "writeRequestBody", name: "writeRequestBody", pkg: "net/http", typ: $funcType([io.Reader, io.Closer], [$error], false)}, {prop: "awaitFlowControl", name: "awaitFlowControl", pkg: "net/http", typ: $funcType([$Int], [$Int32, $error], false)}, {prop: "copyTrailers", name: "copyTrailers", pkg: "net/http", typ: $funcType([], [], false)}]; + http2stickyErrWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + http2noCachedConnError.methods = [{prop: "IsHTTP2NoCachedConnError", name: "IsHTTP2NoCachedConnError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$121.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$122.methods = [{prop: "cleanup", name: "cleanup", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "run", name: "run", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "processHeaders", name: "processHeaders", pkg: "net/http", typ: $funcType([ptrType$39], [$error], false)}, {prop: "handleResponse", name: "handleResponse", pkg: "net/http", typ: $funcType([ptrType$75, ptrType$39], [ptrType$16, $error], false)}, {prop: "processTrailers", name: "processTrailers", pkg: "net/http", typ: $funcType([ptrType$75, ptrType$39], [$error], false)}, {prop: "processData", name: "processData", pkg: "net/http", typ: $funcType([ptrType$42], [$error], false)}, {prop: "endStream", name: "endStream", pkg: "net/http", typ: $funcType([ptrType$75], [], false)}, {prop: "endStreamError", name: "endStreamError", pkg: "net/http", typ: $funcType([ptrType$75, $error], [], false)}, {prop: "processGoAway", name: "processGoAway", pkg: "net/http", typ: $funcType([ptrType$45], [$error], false)}, {prop: "processSettings", name: "processSettings", pkg: "net/http", typ: $funcType([ptrType$41], [$error], false)}, {prop: "processWindowUpdate", name: "processWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$43], [$error], false)}, {prop: "processResetStream", name: "processResetStream", pkg: "net/http", typ: $funcType([ptrType$46], [$error], false)}, {prop: "processPing", name: "processPing", pkg: "net/http", typ: $funcType([ptrType$44], [$error], false)}, {prop: "processPushPromise", name: "processPushPromise", pkg: "net/http", typ: $funcType([ptrType$67], [$error], false)}]; + http2GoAwayError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + http2transportResponseBody.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + http2erringRoundTripper.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}]; + ptrType$123.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + http2bodyWriterState.methods = [{prop: "cancel", name: "cancel", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "on100", name: "on100", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "scheduleBodyWrite", name: "scheduleBodyWrite", pkg: "net/http", typ: $funcType([], [], false)}]; + http2flushFrameWriter.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2writeSettings.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]; + ptrType$124.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + ptrType$63.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2handlerPanicRST.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2writePingAck.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2writeSettingsAck.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + ptrType$64.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "writeHeaderBlock", name: "writeHeaderBlock", pkg: "net/http", typ: $funcType([http2writeContext, sliceType$3, $Bool, $Bool], [$error], false)}]; + ptrType$65.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "writeHeaderBlock", name: "writeHeaderBlock", pkg: "net/http", typ: $funcType([http2writeContext, sliceType$3, $Bool, $Bool], [$error], false)}]; + http2write100ContinueHeadersFrame.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; + http2writeWindowUpdate.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]; + http2FrameWriteRequest.methods = [{prop: "StreamID", name: "StreamID", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "DataSize", name: "DataSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Consume", name: "Consume", pkg: "", typ: $funcType([$Int32], [http2FrameWriteRequest, http2FrameWriteRequest, $Int], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$125.methods = [{prop: "replyToWriter", name: "replyToWriter", pkg: "net/http", typ: $funcType([$error], [], false)}]; + ptrType$78.methods = [{prop: "empty", name: "empty", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "push", name: "push", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "shift", name: "shift", pkg: "net/http", typ: $funcType([], [http2FrameWriteRequest], false)}, {prop: "consume", name: "consume", pkg: "net/http", typ: $funcType([$Int32], [http2FrameWriteRequest, $Bool], false)}]; + ptrType$81.methods = [{prop: "put", name: "put", pkg: "net/http", typ: $funcType([ptrType$78], [], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([], [ptrType$78], false)}]; + ptrType$80.methods = [{prop: "setParent", name: "setParent", pkg: "net/http", typ: $funcType([ptrType$80], [], false)}, {prop: "addBytes", name: "addBytes", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "walkReadyInOrder", name: "walkReadyInOrder", pkg: "net/http", typ: $funcType([$Bool, ptrType$82, funcType$25], [$Bool], false)}]; + http2sortPriorityNodeSiblings.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + ptrType$126.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "addClosedOrIdleNode", name: "addClosedOrIdleNode", pkg: "net/http", typ: $funcType([ptrType$82, $Int, ptrType$80], [], false)}, {prop: "removeNode", name: "removeNode", pkg: "net/http", typ: $funcType([ptrType$80], [], false)}]; + ptrType$127.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}]; + Header.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, ptrType$49], [$error], false)}, {prop: "clone", name: "clone", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "sortedKeyValues", name: "sortedKeyValues", pkg: "net/http", typ: $funcType([mapType$14], [sliceType$4, ptrType$83], false)}, {prop: "WriteSubset", name: "WriteSubset", pkg: "", typ: $funcType([io.Writer, mapType$14], [$error], false)}, {prop: "writeSubset", name: "writeSubset", pkg: "net/http", typ: $funcType([io.Writer, mapType$14, ptrType$49], [$error], false)}]; + stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; + ptrType$83.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + ptrType$128.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + noBody.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}]; + ptrType$129.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$130.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$7.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "WithContext", name: "WithContext", pkg: "", typ: $funcType([context.Context], [ptrType$7], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "UserAgent", name: "UserAgent", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$8], false)}, {prop: "Cookie", name: "Cookie", pkg: "", typ: $funcType([$String], [ptrType$25, $error], false)}, {prop: "AddCookie", name: "AddCookie", pkg: "", typ: $funcType([ptrType$25], [], false)}, {prop: "Referer", name: "Referer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MultipartReader", name: "MultipartReader", pkg: "", typ: $funcType([], [ptrType$84, $error], false)}, {prop: "multipartReader", name: "multipartReader", pkg: "net/http", typ: $funcType([$Bool], [ptrType$84, $error], false)}, {prop: "isH2Upgrade", name: "isH2Upgrade", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "WriteProxy", name: "WriteProxy", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, $Bool, Header, funcType$5], [$error], false)}, {prop: "BasicAuth", name: "BasicAuth", pkg: "", typ: $funcType([], [$String, $String, $Bool], false)}, {prop: "SetBasicAuth", name: "SetBasicAuth", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "ParseForm", name: "ParseForm", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ParseMultipartForm", name: "ParseMultipartForm", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "FormValue", name: "FormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "PostFormValue", name: "PostFormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "FormFile", name: "FormFile", pkg: "", typ: $funcType([$String], [multipart.File, ptrType$89, $error], false)}, {prop: "expectsContinue", name: "expectsContinue", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsHttp10KeepAlive", name: "wantsHttp10KeepAlive", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsClose", name: "wantsClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "isReplayable", name: "isReplayable", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "outgoingLength", name: "outgoingLength", pkg: "net/http", typ: $funcType([], [$Int64], false)}]; + ptrType$88.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType$16.methods = [{prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$8], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$19, $error], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [], false)}]; + ptrType$98.methods = [{prop: "hijacked", name: "hijacked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "hijackLocked", name: "hijackLocked", pkg: "net/http", typ: $funcType([], [net.Conn, ptrType$90, $error], false)}, {prop: "readRequest", name: "readRequest", pkg: "net/http", typ: $funcType([context.Context], [ptrType$95, $error], false)}, {prop: "finalFlush", name: "finalFlush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "closeWriteAndWait", name: "closeWriteAndWait", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setState", name: "setState", pkg: "net/http", typ: $funcType([net.Conn, ConnState], [], false)}, {prop: "getState", name: "getState", pkg: "net/http", typ: $funcType([], [ConnState, $Int64], false)}, {prop: "serve", name: "serve", pkg: "net/http", typ: $funcType([context.Context], [], false)}]; + ptrType$131.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "flush", name: "flush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([sliceType$3], [], false)}]; + ptrType$95.methods = [{prop: "finalTrailers", name: "finalTrailers", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "declareTrailer", name: "declareTrailer", pkg: "net/http", typ: $funcType([$String], [], false)}, {prop: "requestTooLarge", name: "requestTooLarge", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "needsSniff", name: "needsSniff", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "bodyAllowed", name: "bodyAllowed", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([$Int, sliceType$3, $String], [$Int, $error], false)}, {prop: "finishRequest", name: "finishRequest", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldReuseConnection", name: "shouldReuseConnection", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closedRequestBodyEarly", name: "closedRequestBodyEarly", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "sendExpectationFailed", name: "sendExpectationFailed", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Hijack", name: "Hijack", pkg: "", typ: $funcType([], [net.Conn, ptrType$90, $error], false)}, {prop: "CloseNotify", name: "CloseNotify", pkg: "", typ: $funcType([], [chanType$9], false)}]; + ptrType$23.methods = [{prop: "isSet", name: "isSet", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "setTrue", name: "setTrue", pkg: "net/http", typ: $funcType([], [], false)}]; + ptrType$94.methods = [{prop: "lock", name: "lock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "unlock", name: "unlock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startBackgroundRead", name: "startBackgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "backgroundRead", name: "backgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "abortPendingRead", name: "abortPendingRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setReadLimit", name: "setReadLimit", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "setInfiniteReadLimit", name: "setInfiniteReadLimit", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "hitReadLimit", name: "hitReadLimit", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "handleReadError", name: "handleReadError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeNotify", name: "closeNotify", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$99.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + extraHeader.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([ptrType$10], [], false)}]; + badRequestError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + HandlerFunc.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]; + ptrType$132.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]; + ptrType$133.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([$String], [Handler, $String], false)}, {prop: "redirectToPathSlash", name: "redirectToPathSlash", pkg: "net/http", typ: $funcType([$String, $String, ptrType$19], [ptrType$19, $Bool], false)}, {prop: "shouldRedirectRLocked", name: "shouldRedirectRLocked", pkg: "net/http", typ: $funcType([$String, $String], [$Bool], false)}, {prop: "Handler", name: "Handler", pkg: "", typ: $funcType([ptrType$7], [Handler, $String], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([$String, $String], [Handler, $String], false)}, {prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}, {prop: "Handle", name: "Handle", pkg: "", typ: $funcType([$String, Handler], [], false)}, {prop: "HandleFunc", name: "HandleFunc", pkg: "", typ: $funcType([$String, funcType$22], [], false)}]; + ptrType$48.methods = [{prop: "newConn", name: "newConn", pkg: "net/http", typ: $funcType([net.Conn], [ptrType$98], false)}, {prop: "maxHeaderBytes", name: "maxHeaderBytes", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "initialReadLimitSize", name: "initialReadLimitSize", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "getDoneChan", name: "getDoneChan", pkg: "net/http", typ: $funcType([], [chanType$3], false)}, {prop: "getDoneChanLocked", name: "getDoneChanLocked", pkg: "net/http", typ: $funcType([], [chanType$2], false)}, {prop: "closeDoneChanLocked", name: "closeDoneChanLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "RegisterOnShutdown", name: "RegisterOnShutdown", pkg: "", typ: $funcType([funcType$2], [], false)}, {prop: "closeIdleConns", name: "closeIdleConns", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeListenersLocked", name: "closeListenersLocked", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "ListenAndServe", name: "ListenAndServe", pkg: "", typ: $funcType([], [$error], false)}, {prop: "shouldConfigureHTTP2ForServe", name: "shouldConfigureHTTP2ForServe", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Serve", name: "Serve", pkg: "", typ: $funcType([net.Listener], [$error], false)}, {prop: "ServeTLS", name: "ServeTLS", pkg: "", typ: $funcType([net.Listener, $String, $String], [$error], false)}, {prop: "trackListener", name: "trackListener", pkg: "net/http", typ: $funcType([ptrType$102, $Bool], [$Bool], false)}, {prop: "trackConn", name: "trackConn", pkg: "net/http", typ: $funcType([ptrType$98, $Bool], [], false)}, {prop: "idleTimeout", name: "idleTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "readHeaderTimeout", name: "readHeaderTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "doKeepAlives", name: "doKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "shuttingDown", name: "shuttingDown", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "SetKeepAlivesEnabled", name: "SetKeepAlivesEnabled", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "ListenAndServeTLS", name: "ListenAndServeTLS", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "setupHTTP2_ServeTLS", name: "setupHTTP2_ServeTLS", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "setupHTTP2_Serve", name: "setupHTTP2_Serve", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "onceSetNextProtoDefaults_Serve", name: "onceSetNextProtoDefaults_Serve", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onceSetNextProtoDefaults", name: "onceSetNextProtoDefaults", pkg: "net/http", typ: $funcType([], [], false)}]; + ConnState.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + serverHandler.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]; + tcpKeepAliveListener.methods = [{prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [net.Conn, $error], false)}]; + ptrType$136.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}]; + globalOptionsHandler.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]; + initNPNRequest.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]; + ptrType$137.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + checkConnErrorWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$138.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; + ptrType$139.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; + htmlSig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; + mp4Sig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; + textSig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; + socksCommand.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + socksReply.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$104.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$105.methods = [{prop: "BoundAddr", name: "BoundAddr", pkg: "", typ: $funcType([], [net.Addr], false)}]; + ptrType$140.methods = [{prop: "connect", name: "connect", pkg: "net/http", typ: $funcType([context.Context, net.Conn, $String], [net.Addr, $error], false)}, {prop: "DialContext", name: "DialContext", pkg: "", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}, {prop: "DialWithConn", name: "DialWithConn", pkg: "", typ: $funcType([context.Context, net.Conn, $String, $String], [net.Addr, $error], false)}, {prop: "Dial", name: "Dial", pkg: "", typ: $funcType([$String, $String], [net.Conn, $error], false)}, {prop: "validateTarget", name: "validateTarget", pkg: "net/http", typ: $funcType([$String, $String], [$error], false)}, {prop: "pathAddrs", name: "pathAddrs", pkg: "net/http", typ: $funcType([$String], [net.Addr, net.Addr, $error], false)}]; + ptrType$141.methods = [{prop: "Authenticate", name: "Authenticate", pkg: "", typ: $funcType([context.Context, io.ReadWriter, socksAuthMethod], [$error], false)}]; + errorReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$142.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + transferBodyReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$106.methods = [{prop: "shouldSendChunkedRequestBody", name: "shouldSendChunkedRequestBody", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "probeRequestBody", name: "probeRequestBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldSendContentLength", name: "shouldSendContentLength", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([io.Writer, ptrType$49], [$error], false)}, {prop: "writeBody", name: "writeBody", pkg: "net/http", typ: $funcType([io.Writer], [$error], false)}]; + ptrType$143.methods = [{prop: "protoAtLeast", name: "protoAtLeast", pkg: "net/http", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "fixTransferEncoding", name: "fixTransferEncoding", pkg: "net/http", typ: $funcType([], [$error], false)}]; + ptrType$97.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "readLocked", name: "readLocked", pkg: "net/http", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "readTrailer", name: "readTrailer", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "unreadDataSizeLocked", name: "unreadDataSizeLocked", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "didEarlyClose", name: "didEarlyClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "bodyRemains", name: "bodyRemains", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "registerOnHitEOF", name: "registerOnHitEOF", pkg: "net/http", typ: $funcType([funcType$2], [], false)}]; + bodyLocked.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + finishAsyncByteRead.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$21.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "onceSetNextProtoDefaults", name: "onceSetNextProtoDefaults", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "roundTrip", name: "roundTrip", pkg: "net/http", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}, {prop: "RegisterProtocol", name: "RegisterProtocol", pkg: "", typ: $funcType([$String, RoundTripper], [], false)}, {prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}, {prop: "CancelRequest", name: "CancelRequest", pkg: "", typ: $funcType([ptrType$7], [], false)}, {prop: "cancelRequest", name: "cancelRequest", pkg: "net/http", typ: $funcType([ptrType$7, $error], [], false)}, {prop: "connectMethodForRequest", name: "connectMethodForRequest", pkg: "net/http", typ: $funcType([ptrType$144], [connectMethod, $error], false)}, {prop: "putOrCloseIdleConn", name: "putOrCloseIdleConn", pkg: "net/http", typ: $funcType([ptrType$107], [], false)}, {prop: "maxIdleConnsPerHost", name: "maxIdleConnsPerHost", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "tryPutIdleConn", name: "tryPutIdleConn", pkg: "net/http", typ: $funcType([ptrType$107], [$error], false)}, {prop: "getIdleConnCh", name: "getIdleConnCh", pkg: "net/http", typ: $funcType([connectMethod], [chanType$13], false)}, {prop: "getIdleConn", name: "getIdleConn", pkg: "net/http", typ: $funcType([connectMethod], [ptrType$107, time.Time], false)}, {prop: "removeIdleConn", name: "removeIdleConn", pkg: "net/http", typ: $funcType([ptrType$107], [], false)}, {prop: "removeIdleConnLocked", name: "removeIdleConnLocked", pkg: "net/http", typ: $funcType([ptrType$107], [], false)}, {prop: "setReqCanceler", name: "setReqCanceler", pkg: "net/http", typ: $funcType([ptrType$7, funcType$12], [], false)}, {prop: "replaceReqCanceler", name: "replaceReqCanceler", pkg: "net/http", typ: $funcType([ptrType$7, funcType$12], [$Bool], false)}, {prop: "dial", name: "dial", pkg: "net/http", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}, {prop: "getConn", name: "getConn", pkg: "net/http", typ: $funcType([ptrType$144, connectMethod], [ptrType$107, $error], false)}, {prop: "incHostConnCount", name: "incHostConnCount", pkg: "net/http", typ: $funcType([connectMethodKey], [chanType$3], false)}, {prop: "decHostConnCount", name: "decHostConnCount", pkg: "net/http", typ: $funcType([connectMethodKey], [], false)}, {prop: "dialConn", name: "dialConn", pkg: "net/http", typ: $funcType([context.Context, connectMethod], [ptrType$107, $error], false)}]; + ptrType$144.methods = [{prop: "extraHeaders", name: "extraHeaders", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "setError", name: "setError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}]; + transportReadFromServerError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$145.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + persistConnWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; + ptrType$146.methods = [{prop: "proxyAuth", name: "proxyAuth", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "key", name: "key", pkg: "net/http", typ: $funcType([], [connectMethodKey], false)}, {prop: "scheme", name: "scheme", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "addr", name: "addr", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "tlsHost", name: "tlsHost", pkg: "net/http", typ: $funcType([], [$String], false)}]; + connectMethodKey.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$107.methods = [{prop: "shouldRetryRequest", name: "shouldRetryRequest", pkg: "net/http", typ: $funcType([ptrType$7, $error], [$Bool], false)}, {prop: "addTLS", name: "addTLS", pkg: "net/http", typ: $funcType([$String, ptrType$49], [$error], false)}, {prop: "maxHeaderResponseSize", name: "maxHeaderResponseSize", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "isBroken", name: "isBroken", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "canceled", name: "canceled", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "isReused", name: "isReused", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "gotIdleConnTrace", name: "gotIdleConnTrace", pkg: "net/http", typ: $funcType([time.Time], [httptrace.GotConnInfo], false)}, {prop: "cancelRequest", name: "cancelRequest", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeConnIfStillIdle", name: "closeConnIfStillIdle", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "mapRoundTripError", name: "mapRoundTripError", pkg: "net/http", typ: $funcType([ptrType$144, $Int64, $error], [$error], false)}, {prop: "readLoop", name: "readLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "readLoopPeekFailLocked", name: "readLoopPeekFailLocked", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "readResponse", name: "readResponse", pkg: "net/http", typ: $funcType([requestAndChan, ptrType$49], [ptrType$16, $error], false)}, {prop: "waitForContinue", name: "waitForContinue", pkg: "net/http", typ: $funcType([chanType$3], [funcType$5], false)}, {prop: "writeLoop", name: "writeLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "wroteRequest", name: "wroteRequest", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "roundTrip", name: "roundTrip", pkg: "net/http", typ: $funcType([ptrType$144], [ptrType$16, $error], false)}, {prop: "markReused", name: "markReused", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeLocked", name: "closeLocked", pkg: "net/http", typ: $funcType([$error], [], false)}]; + ptrType$147.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$109.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "condfn", name: "condfn", pkg: "net/http", typ: $funcType([$error], [$error], false)}]; + ptrType$148.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; + tlsHandshakeTimeoutError.methods = [{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + fakeLocker.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$149.methods = [{prop: "add", name: "add", pkg: "net/http", typ: $funcType([ptrType$107], [], false)}, {prop: "removeOldest", name: "removeOldest", pkg: "net/http", typ: $funcType([], [ptrType$107], false)}, {prop: "remove", name: "remove", pkg: "net/http", typ: $funcType([ptrType$107], [], false)}, {prop: "len", name: "len", pkg: "net/http", typ: $funcType([], [$Int], false)}]; + streamReader.init("net/http", [{prop: "pending", name: "pending", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$15, tag: ""}]); + fetchTransport.init("", []); + noTransport.init("", []); + XHRTransport.init("net/http", [{prop: "inflight", name: "inflight", embedded: false, exported: false, typ: mapType$2, tag: ""}]); + Client.init("", [{prop: "Transport", name: "Transport", embedded: false, exported: true, typ: RoundTripper, tag: ""}, {prop: "CheckRedirect", name: "CheckRedirect", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "Jar", name: "Jar", embedded: false, exported: true, typ: CookieJar, tag: ""}, {prop: "Timeout", name: "Timeout", embedded: false, exported: true, typ: time.Duration, tag: ""}]); + RoundTripper.init([{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$7], [ptrType$16, $error], false)}]); + cancelTimerBody.init("net/http", [{prop: "stop", name: "stop", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "rc", name: "rc", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "reqDidTimeout", name: "reqDidTimeout", embedded: false, exported: false, typ: funcType$5, tag: ""}]); + Cookie.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Domain", name: "Domain", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Expires", name: "Expires", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "RawExpires", name: "RawExpires", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "MaxAge", name: "MaxAge", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Secure", name: "Secure", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HttpOnly", name: "HttpOnly", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SameSite", name: "SameSite", embedded: false, exported: true, typ: SameSite, tag: ""}, {prop: "Raw", name: "Raw", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Unparsed", name: "Unparsed", embedded: false, exported: true, typ: sliceType$1, tag: ""}]); + http2ClientConnPool.init([{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$7, $String], [ptrType$29, $error], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$29], [], false)}]); + http2clientConnPoolIdleCloser.init([{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$7, $String], [ptrType$29, $error], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$29], [], false)}, {prop: "closeIdleConnections", name: "closeIdleConnections", pkg: "net/http", typ: $funcType([], [], false)}]); + http2clientConnPool.init("net/http", [{prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$22, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "conns", name: "conns", embedded: false, exported: false, typ: mapType$3, tag: ""}, {prop: "dialing", name: "dialing", embedded: false, exported: false, typ: mapType$4, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: mapType$5, tag: ""}, {prop: "addConnCalls", name: "addConnCalls", embedded: false, exported: false, typ: mapType$6, tag: ""}]); + http2dialCall.init("net/http", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + http2addConnCall.init("net/http", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + http2noDialClientConnPool.init("net/http", [{prop: "http2clientConnPool", name: "http2clientConnPool", embedded: true, exported: false, typ: ptrType$3, tag: ""}]); + http2noDialH2RoundTripper.init("net/http", [{prop: "http2Transport", name: "http2Transport", embedded: true, exported: false, typ: ptrType$22, tag: ""}]); + http2dataBuffer.init("net/http", [{prop: "chunks", name: "chunks", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "expected", name: "expected", embedded: false, exported: false, typ: $Int64, tag: ""}]); + http2StreamError.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Code", name: "Code", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "Cause", name: "Cause", embedded: false, exported: true, typ: $error, tag: ""}]); + http2goAwayFlowError.init("", []); + http2connError.init("", [{prop: "Code", name: "Code", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "Reason", name: "Reason", embedded: false, exported: true, typ: $String, tag: ""}]); + http2flow.init("net/http", [{prop: "n", name: "n", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$33, tag: ""}]); + http2FrameHeader.init("net/http", [{prop: "valid", name: "valid", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: http2FrameType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: http2Flags, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + http2Frame.init([{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [http2FrameHeader], false)}, {prop: "invalidate", name: "invalidate", pkg: "net/http", typ: $funcType([], [], false)}]); + http2Framer.init("net/http", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "lastFrame", name: "lastFrame", embedded: false, exported: false, typ: http2Frame, tag: ""}, {prop: "errDetail", name: "errDetail", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "lastHeaderStream", name: "lastHeaderStream", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxReadSize", name: "maxReadSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "headerBuf", name: "headerBuf", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "getReadBuf", name: "getReadBuf", embedded: false, exported: false, typ: funcType$8, tag: ""}, {prop: "readBuf", name: "readBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "maxWriteSize", name: "maxWriteSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "wbuf", name: "wbuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "AllowIllegalWrites", name: "AllowIllegalWrites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AllowIllegalReads", name: "AllowIllegalReads", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ReadMetaHeaders", name: "ReadMetaHeaders", embedded: false, exported: true, typ: ptrType$36, tag: ""}, {prop: "MaxHeaderListSize", name: "MaxHeaderListSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "logReads", name: "logReads", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "logWrites", name: "logWrites", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "debugFramer", name: "debugFramer", embedded: false, exported: false, typ: ptrType$34, tag: ""}, {prop: "debugFramerBuf", name: "debugFramerBuf", embedded: false, exported: false, typ: ptrType$37, tag: ""}, {prop: "debugReadLoggerf", name: "debugReadLoggerf", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "debugWriteLoggerf", name: "debugWriteLoggerf", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "frameCache", name: "frameCache", embedded: false, exported: false, typ: ptrType$35, tag: ""}]); + http2frameCache.init("net/http", [{prop: "dataFrame", name: "dataFrame", embedded: false, exported: false, typ: http2DataFrame, tag: ""}]); + http2DataFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2SettingsFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2PingFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: arrayType$5, tag: ""}]); + http2GoAwayFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "LastStreamID", name: "LastStreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "debugData", name: "debugData", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2UnknownFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2WindowUpdateFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Increment", name: "Increment", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + http2HeadersFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: http2PriorityParam, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2HeadersFrameParam.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "BlockFragment", name: "BlockFragment", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "EndStream", name: "EndStream", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "EndHeaders", name: "EndHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PadLength", name: "PadLength", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: http2PriorityParam, tag: ""}]); + http2PriorityFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "http2PriorityParam", name: "http2PriorityParam", embedded: true, exported: false, typ: http2PriorityParam, tag: ""}]); + http2PriorityParam.init("", [{prop: "StreamDep", name: "StreamDep", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Exclusive", name: "Exclusive", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Weight", name: "Weight", embedded: false, exported: true, typ: $Uint8, tag: ""}]); + http2RSTStreamFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}]); + http2ContinuationFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2PushPromiseFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "PromiseID", name: "PromiseID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + http2PushPromiseParam.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "PromiseID", name: "PromiseID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "BlockFragment", name: "BlockFragment", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "EndHeaders", name: "EndHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PadLength", name: "PadLength", embedded: false, exported: true, typ: $Uint8, tag: ""}]); + http2MetaHeadersFrame.init("net/http", [{prop: "http2HeadersFrame", name: "http2HeadersFrame", embedded: true, exported: false, typ: ptrType$38, tag: ""}, {prop: "Fields", name: "Fields", embedded: false, exported: true, typ: sliceType$15, tag: ""}, {prop: "Truncated", name: "Truncated", embedded: false, exported: true, typ: $Bool, tag: ""}]); + http2contextContext.init([{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$3], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]); + http2clientTrace.init("", [{prop: "GetConn", name: "GetConn", embedded: false, exported: true, typ: funcType$10, tag: ""}, {prop: "GotConn", name: "GotConn", embedded: false, exported: true, typ: funcType$11, tag: ""}, {prop: "PutIdleConn", name: "PutIdleConn", embedded: false, exported: true, typ: funcType$12, tag: ""}, {prop: "GotFirstResponseByte", name: "GotFirstResponseByte", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Got100Continue", name: "Got100Continue", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Got1xxResponse", name: "Got1xxResponse", embedded: false, exported: true, typ: funcType$13, tag: ""}, {prop: "DNSStart", name: "DNSStart", embedded: false, exported: true, typ: funcType$14, tag: ""}, {prop: "DNSDone", name: "DNSDone", embedded: false, exported: true, typ: funcType$15, tag: ""}, {prop: "ConnectStart", name: "ConnectStart", embedded: false, exported: true, typ: funcType$16, tag: ""}, {prop: "ConnectDone", name: "ConnectDone", embedded: false, exported: true, typ: funcType$17, tag: ""}, {prop: "TLSHandshakeStart", name: "TLSHandshakeStart", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "TLSHandshakeDone", name: "TLSHandshakeDone", embedded: false, exported: true, typ: funcType$18, tag: ""}, {prop: "WroteHeaderField", name: "WroteHeaderField", embedded: false, exported: true, typ: funcType$19, tag: ""}, {prop: "WroteHeaders", name: "WroteHeaders", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Wait100Continue", name: "Wait100Continue", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "WroteRequest", name: "WroteRequest", embedded: false, exported: true, typ: funcType$20, tag: ""}]); + http2Setting.init("", [{prop: "ID", name: "ID", embedded: false, exported: true, typ: http2SettingID, tag: ""}, {prop: "Val", name: "Val", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + http2gate.init(structType, false, false); + http2closeWaiter.init(structType, false, false); + http2bufferedWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$10, tag: ""}]); + http2httpError.init("net/http", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: $Bool, tag: ""}]); + http2connectionStater.init([{prop: "ConnectionState", name: "ConnectionState", pkg: "", typ: $funcType([], [tls.ConnectionState], false)}]); + http2sorter.init("net/http", [{prop: "v", name: "v", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + http2pipe.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: sync.Cond, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: http2pipeBuffer, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "breakErr", name: "breakErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "donec", name: "donec", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "readFn", name: "readFn", embedded: false, exported: false, typ: funcType$2, tag: ""}]); + http2pipeBuffer.init([{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]); + http2Server.init("net/http", [{prop: "MaxHandlers", name: "MaxHandlers", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxConcurrentStreams", name: "MaxConcurrentStreams", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "MaxReadFrameSize", name: "MaxReadFrameSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "PermitProhibitedCipherSuites", name: "PermitProhibitedCipherSuites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IdleTimeout", name: "IdleTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "MaxUploadBufferPerConnection", name: "MaxUploadBufferPerConnection", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "MaxUploadBufferPerStream", name: "MaxUploadBufferPerStream", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "NewWriteScheduler", name: "NewWriteScheduler", embedded: false, exported: true, typ: funcType$21, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: ptrType$52, tag: ""}]); + http2serverInternalState.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "activeConns", name: "activeConns", embedded: false, exported: false, typ: mapType$7, tag: ""}]); + http2ServeConnOpts.init("", [{prop: "BaseConfig", name: "BaseConfig", embedded: false, exported: true, typ: ptrType$48, tag: ""}, {prop: "Handler", name: "Handler", embedded: false, exported: true, typ: Handler, tag: ""}]); + http2serverConn.init("net/http", [{prop: "srv", name: "srv", embedded: false, exported: false, typ: ptrType$53, tag: ""}, {prop: "hs", name: "hs", embedded: false, exported: false, typ: ptrType$48, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$56, tag: ""}, {prop: "handler", name: "handler", embedded: false, exported: false, typ: Handler, tag: ""}, {prop: "baseCtx", name: "baseCtx", embedded: false, exported: false, typ: http2contextContext, tag: ""}, {prop: "framer", name: "framer", embedded: false, exported: false, typ: ptrType$34, tag: ""}, {prop: "doneServing", name: "doneServing", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "readFrameCh", name: "readFrameCh", embedded: false, exported: false, typ: chanType$4, tag: ""}, {prop: "wantWriteFrameCh", name: "wantWriteFrameCh", embedded: false, exported: false, typ: chanType$5, tag: ""}, {prop: "wroteFrameCh", name: "wroteFrameCh", embedded: false, exported: false, typ: chanType$6, tag: ""}, {prop: "bodyReadCh", name: "bodyReadCh", embedded: false, exported: false, typ: chanType$7, tag: ""}, {prop: "serveMsgCh", name: "serveMsgCh", embedded: false, exported: false, typ: chanType$8, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "remoteAddrStr", name: "remoteAddrStr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "writeSched", name: "writeSched", embedded: false, exported: false, typ: http2WriteScheduler, tag: ""}, {prop: "serveG", name: "serveG", embedded: false, exported: false, typ: http2goroutineLock, tag: ""}, {prop: "pushEnabled", name: "pushEnabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawFirstSettings", name: "sawFirstSettings", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needToSendSettingsAck", name: "needToSendSettingsAck", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "unackedSettings", name: "unackedSettings", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "clientMaxStreams", name: "clientMaxStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "advMaxStreams", name: "advMaxStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "curClientStreams", name: "curClientStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "curPushedStreams", name: "curPushedStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxClientStreamID", name: "maxClientStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxPushPromiseID", name: "maxPushPromiseID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "streams", name: "streams", embedded: false, exported: false, typ: mapType$8, tag: ""}, {prop: "initialStreamSendWindowSize", name: "initialStreamSendWindowSize", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "maxFrameSize", name: "maxFrameSize", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "headerTableSize", name: "headerTableSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "peerMaxHeaderListSize", name: "peerMaxHeaderListSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "canonHeader", name: "canonHeader", embedded: false, exported: false, typ: mapType$9, tag: ""}, {prop: "writingFrame", name: "writingFrame", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "writingFrameAsync", name: "writingFrameAsync", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needsFrameFlush", name: "needsFrameFlush", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "inGoAway", name: "inGoAway", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "inFrameScheduleLoop", name: "inFrameScheduleLoop", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needToSendGoAway", name: "needToSendGoAway", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goAwayCode", name: "goAwayCode", embedded: false, exported: false, typ: http2ErrCode, tag: ""}, {prop: "shutdownTimer", name: "shutdownTimer", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "headerWriteBuf", name: "headerWriteBuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "hpackEncoder", name: "hpackEncoder", embedded: false, exported: false, typ: ptrType$58, tag: ""}, {prop: "shutdownOnce", name: "shutdownOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}]); + http2stream.init("net/http", [{prop: "sc", name: "sc", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$68, tag: ""}, {prop: "cw", name: "cw", embedded: false, exported: false, typ: http2closeWaiter, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: http2contextContext, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "bodyBytes", name: "bodyBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "declBodyBytes", name: "declBodyBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "numTrailerValues", name: "numTrailerValues", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "weight", name: "weight", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2streamState, tag: ""}, {prop: "resetQueued", name: "resetQueued", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "gotTrailerHeader", name: "gotTrailerHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wroteHeaders", name: "wroteHeaders", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "writeDeadline", name: "writeDeadline", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "trailer", name: "trailer", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "reqTrailer", name: "reqTrailer", embedded: false, exported: false, typ: Header, tag: ""}]); + http2readFrameResult.init("net/http", [{prop: "f", name: "f", embedded: false, exported: false, typ: http2Frame, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "readMore", name: "readMore", embedded: false, exported: false, typ: funcType$2, tag: ""}]); + http2frameWriteResult.init("net/http", [{prop: "wr", name: "wr", embedded: false, exported: false, typ: http2FrameWriteRequest, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + http2requestParam.init("net/http", [{prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "scheme", name: "scheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "authority", name: "authority", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}]); + http2bodyReadMsg.init("net/http", [{prop: "st", name: "st", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}]); + http2requestBody.init("net/http", [{prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pipe", name: "pipe", embedded: false, exported: false, typ: ptrType$68, tag: ""}, {prop: "needsContinue", name: "needsContinue", embedded: false, exported: false, typ: $Bool, tag: ""}]); + http2responseWriter.init("net/http", [{prop: "rws", name: "rws", embedded: false, exported: false, typ: ptrType$70, tag: ""}]); + http2responseWriterState.init("net/http", [{prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$8, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "handlerHeader", name: "handlerHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "snapHeader", name: "snapHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentHeader", name: "sentHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "handlerDone", name: "handlerDone", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentContentLen", name: "sentContentLen", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "wroteBytes", name: "wroteBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "closeNotifierMu", name: "closeNotifierMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closeNotifierCh", name: "closeNotifierCh", embedded: false, exported: false, typ: chanType$10, tag: ""}]); + http2chunkWriter.init("net/http", [{prop: "rws", name: "rws", embedded: false, exported: false, typ: ptrType$70, tag: ""}]); + http2pushOptions.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}]); + http2startPushRequest.init("net/http", [{prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "url", name: "url", embedded: false, exported: false, typ: ptrType$19, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType, tag: ""}]); + http2Transport.init("net/http", [{prop: "DialTLS", name: "DialTLS", embedded: false, exported: true, typ: funcType$23, tag: ""}, {prop: "TLSClientConfig", name: "TLSClientConfig", embedded: false, exported: true, typ: ptrType$14, tag: ""}, {prop: "ConnPool", name: "ConnPool", embedded: false, exported: true, typ: http2ClientConnPool, tag: ""}, {prop: "DisableCompression", name: "DisableCompression", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AllowHTTP", name: "AllowHTTP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxHeaderListSize", name: "MaxHeaderListSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "t1", name: "t1", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "connPoolOnce", name: "connPoolOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "connPoolOrDef", name: "connPoolOrDef", embedded: false, exported: false, typ: http2ClientConnPool, tag: ""}]); + http2ClientConn.init("net/http", [{prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$22, tag: ""}, {prop: "tconn", name: "tconn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "singleUse", name: "singleUse", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "readerDone", name: "readerDone", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "readerErr", name: "readerErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "idleTimeout", name: "idleTimeout", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "cond", name: "cond", embedded: false, exported: false, typ: ptrType$72, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wantSettingsAck", name: "wantSettingsAck", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goAway", name: "goAway", embedded: false, exported: false, typ: ptrType$45, tag: ""}, {prop: "goAwayDebug", name: "goAwayDebug", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "streams", name: "streams", embedded: false, exported: false, typ: mapType$10, tag: ""}, {prop: "nextStreamID", name: "nextStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "pendingRequests", name: "pendingRequests", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "pings", name: "pings", embedded: false, exported: false, typ: mapType$11, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "br", name: "br", embedded: false, exported: false, typ: ptrType$73, tag: ""}, {prop: "fr", name: "fr", embedded: false, exported: false, typ: ptrType$34, tag: ""}, {prop: "lastActive", name: "lastActive", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "maxFrameSize", name: "maxFrameSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxConcurrentStreams", name: "maxConcurrentStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "peerMaxHeaderListSize", name: "peerMaxHeaderListSize", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "initialWindowSize", name: "initialWindowSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "hbuf", name: "hbuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "henc", name: "henc", embedded: false, exported: false, typ: ptrType$58, tag: ""}, {prop: "freeBuf", name: "freeBuf", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "wmu", name: "wmu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}]); + http2clientStream.init("net/http", [{prop: "cc", name: "cc", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "trace", name: "trace", embedded: false, exported: false, typ: ptrType$47, tag: ""}, {prop: "ID", name: "ID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "resc", name: "resc", embedded: false, exported: false, typ: chanType$11, tag: ""}, {prop: "bufPipe", name: "bufPipe", embedded: false, exported: false, typ: http2pipe, tag: ""}, {prop: "startedWrite", name: "startedWrite", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "requestedGzip", name: "requestedGzip", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "on100", name: "on100", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "bytesRemain", name: "bytesRemain", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "readErr", name: "readErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "stopReqBody", name: "stopReqBody", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "didReset", name: "didReset", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "peerReset", name: "peerReset", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "resetErr", name: "resetErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "firstByte", name: "firstByte", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pastHeaders", name: "pastHeaders", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pastTrailers", name: "pastTrailers", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "num1xx", name: "num1xx", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "trailer", name: "trailer", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "resTrailer", name: "resTrailer", embedded: false, exported: false, typ: ptrType$74, tag: ""}]); + http2stickyErrWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: ptrType$51, tag: ""}]); + http2noCachedConnError.init("", []); + http2RoundTripOpt.init("", [{prop: "OnlyCachedConn", name: "OnlyCachedConn", embedded: false, exported: true, typ: $Bool, tag: ""}]); + http2clientConnIdleState.init("net/http", [{prop: "canTakeNewRequest", name: "canTakeNewRequest", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "freshConn", name: "freshConn", embedded: false, exported: false, typ: $Bool, tag: ""}]); + http2badStringError.init("net/http", [{prop: "what", name: "what", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); + http2resAndError.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$16, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + http2clientConnReadLoop.init("net/http", [{prop: "cc", name: "cc", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "closeWhenIdle", name: "closeWhenIdle", embedded: false, exported: false, typ: $Bool, tag: ""}]); + http2GoAwayError.init("", [{prop: "LastStreamID", name: "LastStreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "DebugData", name: "DebugData", embedded: false, exported: true, typ: $String, tag: ""}]); + http2transportResponseBody.init("net/http", [{prop: "cs", name: "cs", embedded: false, exported: false, typ: ptrType$75, tag: ""}]); + http2erringRoundTripper.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + http2gzipReader.init("net/http", [{prop: "body", name: "body", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "zr", name: "zr", embedded: false, exported: false, typ: ptrType$76, tag: ""}, {prop: "zerr", name: "zerr", embedded: false, exported: false, typ: $error, tag: ""}]); + http2bodyWriterState.init("net/http", [{prop: "cs", name: "cs", embedded: false, exported: false, typ: ptrType$75, tag: ""}, {prop: "timer", name: "timer", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "fnonce", name: "fnonce", embedded: false, exported: false, typ: ptrType$77, tag: ""}, {prop: "fn", name: "fn", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "resc", name: "resc", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "delay", name: "delay", embedded: false, exported: false, typ: time.Duration, tag: ""}]); + http2writeFramer.init([{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]); + http2writeContext.init([{prop: "CloseConn", name: "CloseConn", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Framer", name: "Framer", pkg: "", typ: $funcType([], [ptrType$34], false)}, {prop: "HeaderEncoder", name: "HeaderEncoder", pkg: "", typ: $funcType([], [ptrType$58, ptrType$37], false)}]); + http2flushFrameWriter.init("", []); + http2writeSettings.init(http2Setting); + http2writeGoAway.init("net/http", [{prop: "maxStreamID", name: "maxStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "code", name: "code", embedded: false, exported: false, typ: http2ErrCode, tag: ""}]); + http2writeData.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "endStream", name: "endStream", embedded: false, exported: false, typ: $Bool, tag: ""}]); + http2handlerPanicRST.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + http2writePingAck.init("net/http", [{prop: "pf", name: "pf", embedded: false, exported: false, typ: ptrType$44, tag: ""}]); + http2writeSettingsAck.init("", []); + http2writeResHeaders.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "httpResCode", name: "httpResCode", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "endStream", name: "endStream", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "date", name: "date", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "contentType", name: "contentType", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: $String, tag: ""}]); + http2writePushPromise.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "url", name: "url", embedded: false, exported: false, typ: ptrType$19, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "allocatePromisedID", name: "allocatePromisedID", embedded: false, exported: false, typ: funcType$24, tag: ""}, {prop: "promisedID", name: "promisedID", embedded: false, exported: false, typ: $Uint32, tag: ""}]); + http2write100ContinueHeadersFrame.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}]); + http2writeWindowUpdate.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Uint32, tag: ""}]); + http2WriteScheduler.init([{prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}]); + http2OpenStreamOptions.init("", [{prop: "PusherID", name: "PusherID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); + http2FrameWriteRequest.init("net/http", [{prop: "write", name: "write", embedded: false, exported: false, typ: http2writeFramer, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType, tag: ""}]); + http2writeQueue.init("net/http", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType$20, tag: ""}]); + http2writeQueuePool.init(ptrType$78); + http2PriorityWriteSchedulerConfig.init("", [{prop: "MaxClosedNodesInTree", name: "MaxClosedNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxIdleNodesInTree", name: "MaxIdleNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ThrottleOutOfOrderWrites", name: "ThrottleOutOfOrderWrites", embedded: false, exported: true, typ: $Bool, tag: ""}]); + http2priorityNode.init("net/http", [{prop: "q", name: "q", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "weight", name: "weight", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2priorityNodeState, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "subtreeBytes", name: "subtreeBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$80, tag: ""}, {prop: "kids", name: "kids", embedded: false, exported: false, typ: ptrType$80, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: ptrType$80, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$80, tag: ""}]); + http2sortPriorityNodeSiblings.init(ptrType$80); + http2priorityWriteScheduler.init("net/http", [{prop: "root", name: "root", embedded: false, exported: false, typ: http2priorityNode, tag: ""}, {prop: "nodes", name: "nodes", embedded: false, exported: false, typ: mapType$12, tag: ""}, {prop: "maxID", name: "maxID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "closedNodes", name: "closedNodes", embedded: false, exported: false, typ: sliceType$21, tag: ""}, {prop: "idleNodes", name: "idleNodes", embedded: false, exported: false, typ: sliceType$21, tag: ""}, {prop: "maxClosedNodesInTree", name: "maxClosedNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxIdleNodesInTree", name: "maxIdleNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "writeThrottleLimit", name: "writeThrottleLimit", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "enableWriteThrottle", name: "enableWriteThrottle", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$21, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]); + http2randomWriteScheduler.init("net/http", [{prop: "zero", name: "zero", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "sq", name: "sq", embedded: false, exported: false, typ: mapType$13, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]); + Header.init($String, sliceType$1); + writeStringer.init([{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]); + stringWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]); + keyValues.init("net/http", [{prop: "key", name: "key", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); + headerSorter.init("net/http", [{prop: "kvs", name: "kvs", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); + contextKey.init("net/http", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}]); + noBody.init("", []); + PushOptions.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}]); + CookieJar.init([{prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([ptrType$19], [sliceType$8], false)}, {prop: "SetCookies", name: "SetCookies", pkg: "", typ: $funcType([ptrType$19, sliceType$8], [], false)}]); + ProtocolError.init("", [{prop: "ErrorString", name: "ErrorString", embedded: false, exported: true, typ: $String, tag: ""}]); + badStringError.init("net/http", [{prop: "what", name: "what", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); + Request.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "URL", name: "URL", embedded: false, exported: true, typ: ptrType$19, tag: ""}, {prop: "Proto", name: "Proto", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "GetBody", name: "GetBody", embedded: false, exported: true, typ: funcType$26, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Form", name: "Form", embedded: false, exported: true, typ: url.Values, tag: ""}, {prop: "PostForm", name: "PostForm", embedded: false, exported: true, typ: url.Values, tag: ""}, {prop: "MultipartForm", name: "MultipartForm", embedded: false, exported: true, typ: ptrType$20, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "RemoteAddr", name: "RemoteAddr", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RequestURI", name: "RequestURI", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "TLS", name: "TLS", embedded: false, exported: true, typ: ptrType$17, tag: ""}, {prop: "Cancel", name: "Cancel", embedded: false, exported: true, typ: chanType$3, tag: ""}, {prop: "Response", name: "Response", embedded: false, exported: true, typ: ptrType$16, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}]); + requestBodyReadError.init("net/http", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); + maxBytesReader.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: ResponseWriter, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + Response.init("", [{prop: "Status", name: "Status", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Proto", name: "Proto", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Uncompressed", name: "Uncompressed", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Request", name: "Request", embedded: false, exported: true, typ: ptrType$7, tag: ""}, {prop: "TLS", name: "TLS", embedded: false, exported: true, typ: ptrType$17, tag: ""}]); + Handler.init([{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$7], [], false)}]); + ResponseWriter.init([{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}]); + conn.init("net/http", [{prop: "server", name: "server", embedded: false, exported: false, typ: ptrType$48, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "rwc", name: "rwc", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "remoteAddr", name: "remoteAddr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$94, tag: ""}, {prop: "bufr", name: "bufr", embedded: false, exported: false, typ: ptrType$73, tag: ""}, {prop: "bufw", name: "bufw", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "lastMethod", name: "lastMethod", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "curReq", name: "curReq", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "curState", name: "curState", embedded: false, exported: false, typ: structType$2, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hijackedv", name: "hijackedv", embedded: false, exported: false, typ: $Bool, tag: ""}]); + chunkWriter.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$95, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "chunking", name: "chunking", embedded: false, exported: false, typ: $Bool, tag: ""}]); + response.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$98, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "reqBody", name: "reqBody", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wroteContinue", name: "wroteContinue", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wants10KeepAlive", name: "wants10KeepAlive", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wantsClose", name: "wantsClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "cw", name: "cw", embedded: false, exported: false, typ: chunkWriter, tag: ""}, {prop: "handlerHeader", name: "handlerHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "calledHeader", name: "calledHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "written", name: "written", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "closeAfterReply", name: "closeAfterReply", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "requestBodyLimitHit", name: "requestBodyLimitHit", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "handlerDone", name: "handlerDone", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "dateBuf", name: "dateBuf", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "clenBuf", name: "clenBuf", embedded: false, exported: false, typ: arrayType$7, tag: ""}, {prop: "statusBuf", name: "statusBuf", embedded: false, exported: false, typ: arrayType$8, tag: ""}, {prop: "closeNotifyCh", name: "closeNotifyCh", embedded: false, exported: false, typ: chanType$10, tag: ""}, {prop: "didCloseNotify", name: "didCloseNotify", embedded: false, exported: false, typ: $Int32, tag: ""}]); + writerOnly.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); + readResult.init("net/http", [{prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}]); + connReader.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$98, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hasByte", name: "hasByte", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "byteBuf", name: "byteBuf", embedded: false, exported: false, typ: arrayType$6, tag: ""}, {prop: "cond", name: "cond", embedded: false, exported: false, typ: ptrType$72, tag: ""}, {prop: "inRead", name: "inRead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "aborted", name: "aborted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "remain", name: "remain", embedded: false, exported: false, typ: $Int64, tag: ""}]); + expectContinueReader.init("net/http", [{prop: "resp", name: "resp", embedded: false, exported: false, typ: ptrType$95, tag: ""}, {prop: "readCloser", name: "readCloser", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}]); + extraHeader.init("net/http", [{prop: "contentType", name: "contentType", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "connection", name: "connection", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "transferEncoding", name: "transferEncoding", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "date", name: "date", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); + closeWriter.init([{prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}]); + HandlerFunc.init([ResponseWriter, ptrType$7], [], false); + redirectHandler.init("net/http", [{prop: "url", name: "url", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "code", name: "code", embedded: false, exported: false, typ: $Int, tag: ""}]); + ServeMux.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType$15, tag: ""}, {prop: "hosts", name: "hosts", embedded: false, exported: false, typ: $Bool, tag: ""}]); + muxEntry.init("net/http", [{prop: "h", name: "h", embedded: false, exported: false, typ: Handler, tag: ""}, {prop: "pattern", name: "pattern", embedded: false, exported: false, typ: $String, tag: ""}]); + Server.init("net/http", [{prop: "Addr", name: "Addr", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Handler", name: "Handler", embedded: false, exported: true, typ: Handler, tag: ""}, {prop: "TLSConfig", name: "TLSConfig", embedded: false, exported: true, typ: ptrType$14, tag: ""}, {prop: "ReadTimeout", name: "ReadTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ReadHeaderTimeout", name: "ReadHeaderTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "WriteTimeout", name: "WriteTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "IdleTimeout", name: "IdleTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "MaxHeaderBytes", name: "MaxHeaderBytes", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TLSNextProto", name: "TLSNextProto", embedded: false, exported: true, typ: mapType$16, tag: ""}, {prop: "ConnState", name: "ConnState", embedded: false, exported: true, typ: funcType$28, tag: ""}, {prop: "ErrorLog", name: "ErrorLog", embedded: false, exported: true, typ: ptrType$55, tag: ""}, {prop: "disableKeepAlives", name: "disableKeepAlives", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "inShutdown", name: "inShutdown", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "nextProtoOnce", name: "nextProtoOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "nextProtoErr", name: "nextProtoErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "listeners", name: "listeners", embedded: false, exported: false, typ: mapType$17, tag: ""}, {prop: "activeConn", name: "activeConn", embedded: false, exported: false, typ: mapType$18, tag: ""}, {prop: "doneChan", name: "doneChan", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "onShutdown", name: "onShutdown", embedded: false, exported: false, typ: sliceType$16, tag: ""}]); + serverHandler.init("net/http", [{prop: "srv", name: "srv", embedded: false, exported: false, typ: ptrType$48, tag: ""}]); + tcpKeepAliveListener.init("", [{prop: "TCPListener", name: "TCPListener", embedded: true, exported: true, typ: ptrType$103, tag: ""}]); + onceCloseListener.init("net/http", [{prop: "Listener", name: "Listener", embedded: true, exported: true, typ: net.Listener, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "closeErr", name: "closeErr", embedded: false, exported: false, typ: $error, tag: ""}]); + globalOptionsHandler.init("", []); + initNPNRequest.init("net/http", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$101, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: serverHandler, tag: ""}]); + loggingConn.init("net/http", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}]); + checkConnErrorWriter.init("net/http", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$98, tag: ""}]); + sniffSig.init([{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]); + exactSig.init("net/http", [{prop: "sig", name: "sig", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]); + maskedSig.init("net/http", [{prop: "mask", name: "mask", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "pat", name: "pat", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "skipWS", name: "skipWS", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]); + htmlSig.init($Uint8); + mp4Sig.init("", []); + textSig.init("", []); + socksAddr.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "IP", name: "IP", embedded: false, exported: true, typ: net.IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}]); + socksConn.init("net/http", [{prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}, {prop: "boundAddr", name: "boundAddr", embedded: false, exported: false, typ: net.Addr, tag: ""}]); + socksDialer.init("net/http", [{prop: "cmd", name: "cmd", embedded: false, exported: false, typ: socksCommand, tag: ""}, {prop: "proxyNetwork", name: "proxyNetwork", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "proxyAddress", name: "proxyAddress", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "ProxyDial", name: "ProxyDial", embedded: false, exported: true, typ: funcType$29, tag: ""}, {prop: "AuthMethods", name: "AuthMethods", embedded: false, exported: true, typ: sliceType$24, tag: ""}, {prop: "Authenticate", name: "Authenticate", embedded: false, exported: true, typ: funcType$30, tag: ""}]); + socksUsernamePassword.init("", [{prop: "Username", name: "Username", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Password", name: "Password", embedded: false, exported: true, typ: $String, tag: ""}]); + errorReader.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + byteReader.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); + transferBodyReader.init("net/http", [{prop: "tw", name: "tw", embedded: false, exported: false, typ: ptrType$106, tag: ""}]); + transferWriter.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "BodyCloser", name: "BodyCloser", embedded: false, exported: true, typ: io.Closer, tag: ""}, {prop: "ResponseToHEAD", name: "ResponseToHEAD", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "IsResponse", name: "IsResponse", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "bodyReadError", name: "bodyReadError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "FlushHeaders", name: "FlushHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ByteReadCh", name: "ByteReadCh", embedded: false, exported: true, typ: chanType$12, tag: ""}]); + transferReader.init("", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "RequestMethod", name: "RequestMethod", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}]); + body.init("net/http", [{prop: "src", name: "src", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "hdr", name: "hdr", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$73, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "doEarlyClose", name: "doEarlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "earlyClose", name: "earlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "onHitEOF", name: "onHitEOF", embedded: false, exported: false, typ: funcType$2, tag: ""}]); + bodyLocked.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: ptrType$97, tag: ""}]); + finishAsyncByteRead.init("net/http", [{prop: "tw", name: "tw", embedded: false, exported: false, typ: ptrType$106, tag: ""}]); + Transport.init("net/http", [{prop: "idleMu", name: "idleMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "wantIdle", name: "wantIdle", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "idleConn", name: "idleConn", embedded: false, exported: false, typ: mapType$19, tag: ""}, {prop: "idleConnCh", name: "idleConnCh", embedded: false, exported: false, typ: mapType$20, tag: ""}, {prop: "idleLRU", name: "idleLRU", embedded: false, exported: false, typ: connLRU, tag: ""}, {prop: "reqMu", name: "reqMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "reqCanceler", name: "reqCanceler", embedded: false, exported: false, typ: mapType$21, tag: ""}, {prop: "altMu", name: "altMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "altProto", name: "altProto", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "connCountMu", name: "connCountMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "connPerHostCount", name: "connPerHostCount", embedded: false, exported: false, typ: mapType$22, tag: ""}, {prop: "connPerHostAvailable", name: "connPerHostAvailable", embedded: false, exported: false, typ: mapType$23, tag: ""}, {prop: "Proxy", name: "Proxy", embedded: false, exported: true, typ: funcType$31, tag: ""}, {prop: "DialContext", name: "DialContext", embedded: false, exported: true, typ: funcType$29, tag: ""}, {prop: "Dial", name: "Dial", embedded: false, exported: true, typ: funcType$32, tag: ""}, {prop: "DialTLS", name: "DialTLS", embedded: false, exported: true, typ: funcType$32, tag: ""}, {prop: "TLSClientConfig", name: "TLSClientConfig", embedded: false, exported: true, typ: ptrType$14, tag: ""}, {prop: "TLSHandshakeTimeout", name: "TLSHandshakeTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "DisableKeepAlives", name: "DisableKeepAlives", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "DisableCompression", name: "DisableCompression", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxIdleConns", name: "MaxIdleConns", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxIdleConnsPerHost", name: "MaxIdleConnsPerHost", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxConnsPerHost", name: "MaxConnsPerHost", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "IdleConnTimeout", name: "IdleConnTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ResponseHeaderTimeout", name: "ResponseHeaderTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ExpectContinueTimeout", name: "ExpectContinueTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "TLSNextProto", name: "TLSNextProto", embedded: false, exported: true, typ: mapType$24, tag: ""}, {prop: "ProxyConnectHeader", name: "ProxyConnectHeader", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "MaxResponseHeaderBytes", name: "MaxResponseHeaderBytes", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "nextProtoOnce", name: "nextProtoOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "h2transport", name: "h2transport", embedded: false, exported: false, typ: h2Transport, tag: ""}]); + h2Transport.init([{prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}]); + transportRequest.init("net/http", [{prop: "Request", name: "Request", embedded: true, exported: true, typ: ptrType$7, tag: ""}, {prop: "extra", name: "extra", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trace", name: "trace", embedded: false, exported: false, typ: ptrType$49, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + transportReadFromServerError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + connCloseListener.init("net/http", [{prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}, {prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "cmKey", name: "cmKey", embedded: false, exported: false, typ: connectMethodKey, tag: ""}, {prop: "didClose", name: "didClose", embedded: false, exported: false, typ: $Int32, tag: ""}]); + persistConnWriter.init("net/http", [{prop: "pc", name: "pc", embedded: false, exported: false, typ: ptrType$107, tag: ""}]); + connectMethod.init("net/http", [{prop: "proxyURL", name: "proxyURL", embedded: false, exported: false, typ: ptrType$19, tag: ""}, {prop: "targetScheme", name: "targetScheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "targetAddr", name: "targetAddr", embedded: false, exported: false, typ: $String, tag: ""}]); + connectMethodKey.init("net/http", [{prop: "proxy", name: "proxy", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "scheme", name: "scheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "addr", name: "addr", embedded: false, exported: false, typ: $String, tag: ""}]); + persistConn.init("net/http", [{prop: "alt", name: "alt", embedded: false, exported: false, typ: RoundTripper, tag: ""}, {prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "cacheKey", name: "cacheKey", embedded: false, exported: false, typ: connectMethodKey, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "br", name: "br", embedded: false, exported: false, typ: ptrType$73, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "nwrite", name: "nwrite", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "reqch", name: "reqch", embedded: false, exported: false, typ: chanType$14, tag: ""}, {prop: "writech", name: "writech", embedded: false, exported: false, typ: chanType$15, tag: ""}, {prop: "closech", name: "closech", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "isProxy", name: "isProxy", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "readLimit", name: "readLimit", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "writeErrCh", name: "writeErrCh", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "writeLoopDone", name: "writeLoopDone", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "idleAt", name: "idleAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$57, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "numExpectedResponses", name: "numExpectedResponses", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "canceledErr", name: "canceledErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "broken", name: "broken", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "reused", name: "reused", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mutateHeaderFunc", name: "mutateHeaderFunc", embedded: false, exported: false, typ: funcType$34, tag: ""}]); + nothingWrittenError.init("net/http", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); + responseAndError.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$16, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + requestAndChan.init("net/http", [{prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$16, tag: ""}, {prop: "addedGzip", name: "addedGzip", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "continueCh", name: "continueCh", embedded: false, exported: false, typ: chanType$17, tag: ""}, {prop: "callerGone", name: "callerGone", embedded: false, exported: false, typ: chanType$3, tag: ""}]); + writeRequest.init("net/http", [{prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$144, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$18, tag: ""}, {prop: "continueCh", name: "continueCh", embedded: false, exported: false, typ: chanType$3, tag: ""}]); + httpError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: $Bool, tag: ""}]); + tLogKey.init("", []); + bodyEOFSignal.init("net/http", [{prop: "body", name: "body", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rerr", name: "rerr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "fn", name: "fn", embedded: false, exported: false, typ: funcType$35, tag: ""}, {prop: "earlyCloseFn", name: "earlyCloseFn", embedded: false, exported: false, typ: funcType$36, tag: ""}]); + gzipReader.init("net/http", [{prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$109, tag: ""}, {prop: "zr", name: "zr", embedded: false, exported: false, typ: ptrType$76, tag: ""}, {prop: "zerr", name: "zerr", embedded: false, exported: false, typ: $error, tag: ""}]); + tlsHandshakeTimeoutError.init("", []); + fakeLocker.init("", []); + connLRU.init("net/http", [{prop: "ll", name: "ll", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType$25, tag: ""}]); + canceler.init([{prop: "CancelRequest", name: "CancelRequest", pkg: "", typ: $funcType([ptrType$7], [], false)}]); + I.init([{prop: "doKeepAlives", name: "doKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}]); + requestTooLarger.init([{prop: "requestTooLarge", name: "requestTooLarge", pkg: "net/http", typ: $funcType([], [], false)}]); + dialRes.init("net/http", [{prop: "pc", name: "pc", embedded: false, exported: false, typ: ptrType$107, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = gzip.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = list.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = context.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = tls.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = base64.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = binary.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = errors.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = js.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = io.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = ioutil.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = log.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = math.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = rand$1.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = mime.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = multipart.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = net.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = httptrace.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = internal.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = textproto.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = url.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = os.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = path.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = filepath.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = reflect.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = runtime.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sort.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strconv.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = strings.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = atomic.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = utf8.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = httpguts.$init(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = httpproxy.$init(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = hpack.$init(); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = idna.$init(); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + testHookClientDoResult = $throwNilPointerError; + http2VerboseLogs = false; + http2logFrameWrites = false; + http2logFrameReads = false; + http2inTests = false; + http2testHookOnConn = $throwNilPointerError; + http2testHookGetServerConn = $throwNilPointerError; + http2testHookOnPanicMu = ptrType.nil; + http2testHookOnPanic = $throwNilPointerError; + http2got1xxFuncForTests = $throwNilPointerError; + textprotoReaderPool = new sync.Pool.ptr(0, 0, sliceType.nil, $throwNilPointerError); + bufioReaderPool = new sync.Pool.ptr(0, 0, sliceType.nil, $throwNilPointerError); + bufioWriter2kPool = new sync.Pool.ptr(0, 0, sliceType.nil, $throwNilPointerError); + bufioWriter4kPool = new sync.Pool.ptr(0, 0, sliceType.nil, $throwNilPointerError); + defaultServeMux = new ServeMux.ptr(new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), false, false); + testHookServerServe = $throwNilPointerError; + uniqNameMu = new sync.Mutex.ptr(0, 0); + zeroDialer = new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$2.nil, $chanNil, $throwNilPointerError); + $pkg.DefaultTransport = (function() { + var x; + if (!($global.fetch === undefined) && !($global.ReadableStream === undefined)) { + return new fetchTransport.ptr(); + } else if (!($global.XMLHttpRequest === undefined)) { + return new XHRTransport.ptr(false); + } else { + return (x = new noTransport.ptr(), new x.constructor.elem(x)); + } + })(); + $pkg.DefaultClient = new Client.ptr($ifaceNil, $throwNilPointerError, $ifaceNil, new time.Duration(0, 0)); + $pkg.ErrUseLastResponse = errors.New("net/http: use last response"); + cookieNameSanitizer = strings.NewReplacer(new sliceType$1(["\n", "-", "\r", "-"])); + errSeeker = errors.New("seeker can't seek"); + errNoOverlap = errors.New("invalid range: failed to overlap"); + unixEpochTime = $clone(time.Unix(new $Int64(0, 0), new $Int64(0, 0)), time.Time); + http2dataChunkSizeClasses = new sliceType$2([1024, 2048, 4096, 8192, 16384]); + http2dataChunkPools = $toNativeArray($kindStruct, [new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return $makeSlice(sliceType$3, 1024); + })), new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return $makeSlice(sliceType$3, 2048); + })), new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return $makeSlice(sliceType$3, 4096); + })), new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return $makeSlice(sliceType$3, 8192); + })), new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return $makeSlice(sliceType$3, 16384); + }))]); + http2errReadEmpty = errors.New("read from empty dataBuffer"); + http2errCodeName = $makeMap(http2ErrCode.keyFor, [{ k: 0, v: "NO_ERROR" }, { k: 1, v: "PROTOCOL_ERROR" }, { k: 2, v: "INTERNAL_ERROR" }, { k: 3, v: "FLOW_CONTROL_ERROR" }, { k: 4, v: "SETTINGS_TIMEOUT" }, { k: 5, v: "STREAM_CLOSED" }, { k: 6, v: "FRAME_SIZE_ERROR" }, { k: 7, v: "REFUSED_STREAM" }, { k: 8, v: "CANCEL" }, { k: 9, v: "COMPRESSION_ERROR" }, { k: 10, v: "CONNECT_ERROR" }, { k: 11, v: "ENHANCE_YOUR_CALM" }, { k: 12, v: "INADEQUATE_SECURITY" }, { k: 13, v: "HTTP_1_1_REQUIRED" }]); + http2errMixPseudoHeaderTypes = errors.New("mix of request and response pseudo headers"); + http2errPseudoAfterRegular = errors.New("pseudo header field after regular"); + http2padZeros = $makeSlice(sliceType$3, 255); + http2frameName = $makeMap(http2FrameType.keyFor, [{ k: 0, v: "DATA" }, { k: 1, v: "HEADERS" }, { k: 2, v: "PRIORITY" }, { k: 3, v: "RST_STREAM" }, { k: 4, v: "SETTINGS" }, { k: 5, v: "PUSH_PROMISE" }, { k: 6, v: "PING" }, { k: 7, v: "GOAWAY" }, { k: 8, v: "WINDOW_UPDATE" }, { k: 9, v: "CONTINUATION" }]); + http2flagName = $makeMap(http2FrameType.keyFor, [{ k: 0, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "END_STREAM" }, { k: 8, v: "PADDED" }]) }, { k: 1, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "END_STREAM" }, { k: 4, v: "END_HEADERS" }, { k: 8, v: "PADDED" }, { k: 32, v: "PRIORITY" }]) }, { k: 4, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "ACK" }]) }, { k: 6, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "ACK" }]) }, { k: 9, v: $makeMap(http2Flags.keyFor, [{ k: 4, v: "END_HEADERS" }]) }, { k: 5, v: $makeMap(http2Flags.keyFor, [{ k: 4, v: "END_HEADERS" }, { k: 8, v: "PADDED" }]) }]); + http2fhBytes = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var buf, buf$24ptr; + buf = $makeSlice(sliceType$3, 9); + return (buf$24ptr || (buf$24ptr = new ptrType$4(function() { return buf; }, function($v) { buf = $subslice(new sliceType$3($v.$array), $v.$offset, $v.$offset + $v.$length); }))); + })); + http2ErrFrameTooLarge = errors.New("http2: frame too large"); + http2errStreamID = errors.New("invalid stream ID"); + http2errDepStreamID = errors.New("invalid dependent stream ID"); + http2errPadLength = errors.New("pad length too large"); + http2errPadBytes = errors.New("padding bytes must all be zeros unless AllowIllegalWrites is enabled"); + _r = os.Getenv("DEBUG_HTTP2_GOROUTINES"); /* */ $s = 41; case 41: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + http2DebugGoroutines = _r === "1"; + http2goroutineSpace = (new sliceType$3($stringToBytes("goroutine "))); + http2littleBuf = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var buf, buf$24ptr; + buf = $makeSlice(sliceType$3, 64); + return (buf$24ptr || (buf$24ptr = new ptrType$4(function() { return buf; }, function($v) { buf = $subslice(new sliceType$3($v.$array), $v.$offset, $v.$offset + $v.$length); }))); + })); + http2commonLowerHeader = $makeMap($String.keyFor, []); + http2commonCanonHeader = $makeMap($String.keyFor, []); + http2clientPreface = (new sliceType$3($stringToBytes("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"))); + http2stateName = $toNativeArray($kindString, ["Idle", "Open", "HalfClosedLocal", "HalfClosedRemote", "Closed"]); + http2frameParsers = $makeMap(http2FrameType.keyFor, [{ k: 0, v: http2parseDataFrame }, { k: 1, v: http2parseHeadersFrame }, { k: 2, v: http2parsePriorityFrame }, { k: 3, v: http2parseRSTStreamFrame }, { k: 4, v: http2parseSettingsFrame }, { k: 5, v: http2parsePushPromise }, { k: 6, v: http2parsePingFrame }, { k: 7, v: http2parseGoAwayFrame }, { k: 8, v: http2parseWindowUpdateFrame }, { k: 9, v: http2parseContinuationFrame }]); + http2settingName = $makeMap(http2SettingID.keyFor, [{ k: 1, v: "HEADER_TABLE_SIZE" }, { k: 2, v: "ENABLE_PUSH" }, { k: 3, v: "MAX_CONCURRENT_STREAMS" }, { k: 4, v: "INITIAL_WINDOW_SIZE" }, { k: 5, v: "MAX_FRAME_SIZE" }, { k: 6, v: "MAX_HEADER_LIST_SIZE" }]); + http2errInvalidHeaderFieldName = errors.New("http2: invalid header field name"); + http2errInvalidHeaderFieldValue = errors.New("http2: invalid header field value"); + http2httpCodeStringCommon = $makeMap($Int.keyFor, []); + http2bufWriterPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return bufio.NewWriterSize($ifaceNil, 4096); + })); + http2errTimeout = new http2httpError.ptr("http2: timeout awaiting response headers", true); + http2sorterPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return new http2sorter.ptr(sliceType$1.nil); + })); + http2errClosedPipeWrite = errors.New("write on closed buffer"); + http2errClientDisconnected = errors.New("client disconnected"); + http2errClosedBody = errors.New("body closed by handler"); + http2errHandlerComplete = errors.New("http2: request body closed due to handler exiting"); + http2errStreamClosed = errors.New("http2: stream closed"); + http2responseWriterStatePool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var rws, x; + rws = new http2responseWriterState.ptr(ptrType$6.nil, ptrType$7.nil, ptrType$8.nil, ptrType$9.nil, ptrType$10.nil, false, false, sliceType$1.nil, 0, false, false, false, false, new $Int64(0, 0), new $Int64(0, 0), new sync.Mutex.ptr(0, 0), $chanNil); + rws.bw = bufio.NewWriterSize((x = new http2chunkWriter.ptr(rws), new x.constructor.elem(x)), 4096); + return rws; + })); + http2settingsTimerMsg = $newDataPointer(0, ptrType$11); + http2idleTimerMsg = $newDataPointer(0, ptrType$11); + http2shutdownTimerMsg = $newDataPointer(0, ptrType$11); + http2gracefulShutdownMsg = $newDataPointer(0, ptrType$11); + http2errPrefaceTimeout = errors.New("timeout waiting for client preface"); + http2errChanPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return new chanType(new $Chan($error, 1)); + })); + http2writeDataPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return new http2writeData.ptr(0, sliceType$3.nil, false); + })); + http2errHandlerPanicked = errors.New("http2: handler panicked"); + http2goAwayTimeout = new time.Duration(0, 1000000000); + http2ErrRecursivePush = errors.New("http2: recursive push not allowed"); + http2ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS"); + http2connHeaders = new sliceType$1(["Connection", "Keep-Alive", "Proxy-Connection", "Transfer-Encoding", "Upgrade"]); + http2errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6"); + http2ErrNoCachedConn = (x = new http2noCachedConnError.ptr(), new x.constructor.elem(x)); + http2errClientConnClosed = errors.New("http2: client conn is closed"); + http2errClientConnUnusable = errors.New("http2: client conn not usable"); + http2errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY"); + http2shutdownEnterWaitStateHook = (function() { + }); + http2errRequestCanceled = errors.New("net/http: request canceled"); + http2errStopReqBodyWrite = errors.New("http2: aborting request body write"); + http2errStopReqBodyWriteAndCancel = errors.New("http2: canceling request"); + http2errClosedResponseBody = errors.New("http2: response body closed"); + http2errInvalidTrailers = errors.New("http2: invalid trailers"); + http2errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit"); + http2errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit"); + http2errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers"); + http2noBody = ioutil.NopCloser(bytes.NewReader(sliceType$3.nil)); + headerNewlineToSpace = strings.NewReplacer(new sliceType$1(["\n", " ", "\r", " "])); + headerSorterPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + return new headerSorter.ptr(sliceType$4.nil); + })); + aLongTimeAgo = $clone(time.Unix(new $Int64(0, 1), new $Int64(0, 0)), time.Time); + $pkg.NoBody = new noBody.ptr(); + $pkg.ErrMissingFile = errors.New("http: no such file"); + $pkg.ErrNotSupported = new ProtocolError.ptr("feature not supported"); + $pkg.ErrUnexpectedTrailer = new ProtocolError.ptr("trailer header without chunked transfer encoding"); + $pkg.ErrMissingBoundary = new ProtocolError.ptr("no multipart boundary param in Content-Type"); + $pkg.ErrNotMultipart = new ProtocolError.ptr("request Content-Type isn't multipart/form-data"); + reqWriteExcludeHeader = $makeMap($String.keyFor, [{ k: "Host", v: true }, { k: "User-Agent", v: true }, { k: "Content-Length", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Trailer", v: true }]); + $pkg.ErrNoCookie = errors.New("http: named cookie not present"); + multipartByReader = new multipart.Form.ptr({}, {}); + errMissingHost = errors.New("http: Request.Write on Request with no Host or URL set"); + respExcludeHeader = $makeMap($String.keyFor, [{ k: "Content-Length", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Trailer", v: true }]); + $pkg.ErrNoLocation = errors.New("http: no Location header in response"); + $pkg.ErrBodyNotAllowed = errors.New("http: request method or response status code does not allow body"); + $pkg.ErrHijacked = errors.New("http: connection has been hijacked"); + $pkg.ErrContentLength = errors.New("http: wrote more than the declared Content-Length"); + $pkg.ErrWriteAfterFlush = errors.New("unused"); + $pkg.ServerContextKey = new contextKey.ptr("http-server"); + $pkg.LocalAddrContextKey = new contextKey.ptr("local-addr"); + crlf = (new sliceType$3($stringToBytes("\r\n"))); + colonSpace = (new sliceType$3($stringToBytes(": "))); + copyBufPool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var b, b$24ptr; + b = $makeSlice(sliceType$3, 32768); + return (b$24ptr || (b$24ptr = new ptrType$4(function() { return b; }, function($v) { b = $subslice(new sliceType$3($v.$array), $v.$offset, $v.$offset + $v.$length); }))); + })); + errTooLarge = errors.New("http: request too large"); + extraHeaderKeys = new sliceType$5([(new sliceType$3($stringToBytes("Content-Type"))), (new sliceType$3($stringToBytes("Connection"))), (new sliceType$3($stringToBytes("Transfer-Encoding")))]); + headerContentLength = (new sliceType$3($stringToBytes("Content-Length: "))); + headerDate = (new sliceType$3($stringToBytes("Date: "))); + $pkg.ErrAbortHandler = errors.New("net/http: abort Handler"); + parseURL = url.Parse; + htmlReplacer = strings.NewReplacer(new sliceType$1(["&", "&", "<", "<", ">", ">", "\"", """, "'", "'"])); + $pkg.DefaultServeMux = defaultServeMux; + shutdownPollInterval = new time.Duration(0, 500000000); + stateName = $makeMap(ConnState.keyFor, [{ k: 0, v: "new" }, { k: 1, v: "active" }, { k: 2, v: "idle" }, { k: 3, v: "hijacked" }, { k: 4, v: "closed" }]); + $pkg.ErrServerClosed = errors.New("http: Server closed"); + $pkg.ErrHandlerTimeout = errors.New("http: Handler timeout"); + uniqNameNext = {}; + sniffSignatures = new sliceType$6([(new htmlSig($stringToBytes("= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (ts > max) { + max = ts; + } + _i++; + } + timespan = $mul64((new time.Duration(0, max)), new time.Duration(0, 1000000)); + _r$5 = fmt.Printf("Whoa! Got results! %d timestamps over %v\n", new sliceType$3([new $Int(plog[0].Timestamps.$length), timespan])); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } + _r$5; + _ref$1 = plog[0].Timestamps; + _i$1 = 0; + /* while (true) { */ case 11: + /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 12; continue; } + i = _i$1; + ts$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _r$6 = fmt.Printf("[%dms] %d / %d links/nodes\n", new sliceType$3([new $Int(ts$1), new $Int((x = plog[0].Indices, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).$length), new $Int((x$1 = plog[0].Nodes, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).$length)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } + _r$6; + _i$1++; + /* } */ $s = 11; continue; case 12: + $s = -1; return; + /* */ } return; } if ($f === undefined) { $f = { $blk: Simulation.ptr.prototype.runSimulation }; } $f._i = _i; $f._i$1 = _i$1; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._ref = _ref; $f._ref$1 = _ref$1; $f._tuple = _tuple; $f.buf = buf; $f.err = err; $f.i = i; $f.max = max; $f.payload = payload; $f.plog = plog; $f.resp = resp; $f.s = s; $f.timespan = timespan; $f.ts = ts; $f.ts$1 = ts$1; $f.url = url; $f.x = x; $f.x$1 = x$1; $f.$s = $s; $f.$r = $r; return $f; + }; + Simulation.prototype.runSimulation = function() { return this.$val.runSimulation(); }; NewUploadWidget = function(handler) { var handler; return new UploadWidget.ptr(new vecty.Core.ptr($ifaceNil, $ifaceNil, false, false), handler); @@ -35252,26 +125948,31 @@ $packages["github.com/status-im/whispervis/widgets"] = (function() { ptrType.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "onEditInput", name: "onEditInput", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Changed", name: "Changed", pkg: "", typ: $funcType([], [$Bool], false)}]; ptrType$4.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "Inc", name: "Inc", pkg: "", typ: $funcType([], [], false)}, {prop: "Steps", name: "Steps", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "SetSteps", name: "SetSteps", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Progress", name: "Progress", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "text", name: "text", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([], [$String], false)}]; ptrType$1.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Changed", name: "Changed", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "onChange", name: "onChange", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}]; - ptrType$5.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "onEditInput", name: "onEditInput", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}, {prop: "Address", name: "Address", pkg: "", typ: $funcType([], [$String], false)}, {prop: "onSimulateClick", name: "onSimulateClick", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}]; + ptrType$5.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "onEditInput", name: "onEditInput", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}, {prop: "Address", name: "Address", pkg: "", typ: $funcType([], [$String], false)}, {prop: "onSimulateClick", name: "onSimulateClick", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}, {prop: "runSimulation", name: "runSimulation", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([], [], false)}]; ptrType$6.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "onUploadClick", name: "onUploadClick", pkg: "github.com/status-im/whispervis/widgets", typ: $funcType([ptrType$3], [], false)}]; ForceEditor.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ForcesConfig, tag: ""}, {prop: "repelling", name: "repelling", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "spring", name: "spring", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "drag", name: "drag", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "steps", name: "steps", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); ForcesConfig.init("", [{prop: "Config", name: "Config", embedded: true, exported: true, typ: layout.Config, tag: ""}, {prop: "Steps", name: "Steps", embedded: false, exported: true, typ: $Int, tag: ""}]); ForceInput.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "changed", name: "changed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "title", name: "title", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $Float64, tag: ""}]); Loader.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "mx", name: "mx", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "steps", name: "steps", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "current", name: "current", embedded: false, exported: false, typ: $Int, tag: ""}]); Range.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "changed", name: "changed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "title", name: "title", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $Int, tag: ""}]); - Simulation.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "address", name: "address", embedded: false, exported: false, typ: $String, tag: ""}]); - UploadWidget.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "handler", name: "handler", embedded: false, exported: false, typ: funcType, tag: ""}]); + Simulation.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "networkFn", name: "networkFn", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "address", name: "address", embedded: false, exported: false, typ: $String, tag: ""}]); + UploadWidget.init("github.com/status-im/whispervis/widgets", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "handler", name: "handler", embedded: false, exported: false, typ: funcType$1, tag: ""}]); $init = function() { $pkg.$init = function() {}; /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = layout.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = vecty.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = elem.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = event.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = prop.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = jsapi.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = json.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = layout.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = vecty.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = elem.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = event.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = prop.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = propagation.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = jsapi.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = http.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = sync.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = time.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } $pkg.DefaultForcesConfig = new ForcesConfig.ptr($clone(layout.DefaultConfig, layout.Config), 20); /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; }; @@ -35386,42 +126087,6 @@ $packages["github.com/vecty/vthree"] = (function() { $pkg.$init = $init; return $pkg; })(); -$packages["io/ioutil"] = (function() { - var $pkg = {}, $init, bytes, io, os, filepath, sort, strconv, strings, sync, time, sliceType, sliceType$1, ptrType, blackHolePool; - bytes = $packages["bytes"]; - io = $packages["io"]; - os = $packages["os"]; - filepath = $packages["path/filepath"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - time = $packages["time"]; - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - ptrType = $ptrType(sliceType$1); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filepath.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - blackHolePool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { - var b, b$24ptr; - b = $makeSlice(sliceType$1, 8192); - return (b$24ptr || (b$24ptr = new ptrType(function() { return b; }, function($v) { b = $subslice(new sliceType$1($v.$array), $v.$offset, $v.$offset + $v.$length); }))); - })); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); $packages["github.com/status-im/whispervis"] = (function() { var $pkg = {}, $init, bytes, gzip, fmt, formats, graph, layout, js, vecty, elem, event, prop, three, widgets, vthree, io, ioutil, os, filepath, runtime, strings, time, asset, bindataFileInfo, bintree, TrackBallControl, Network, NetworkSelector, Page, WebGLScene, sliceType, ptrType, funcType, sliceType$1, arrayType, ptrType$1, ptrType$2, sliceType$2, ptrType$3, structType, sliceType$3, structType$1, sliceType$4, ptrType$4, ptrType$5, ptrType$6, ptrType$7, sliceType$5, sliceType$6, sliceType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, funcType$1, mapType, ptrType$19, ptrType$20, ptrType$21, mapType$1, funcType$2, ptrType$22, mapType$2, ptrType$23, sliceType$8, _data3dgrid125Json, _dataNet100Json, _dataNet300Json, _bindata, _bintree, bindataRead, data3dgrid125JsonBytes, data3dgrid125Json, dataNet100JsonBytes, dataNet100Json, dataNet300JsonBytes, dataNet300Json, Asset, AssetDir, NewTrackBallControl, NewEthereumGeometry, main, NewNodeMaterial, NewEdgeMatherial, LoadNetwork, LoadNetworkFromReader, NewNetworkSelector, LoadNetworks, NewPage, NewWebGLScene; bytes = $packages["bytes"]; @@ -35517,7 +126182,7 @@ $packages["github.com/status-im/whispervis"] = (function() { this.upload = upload_; this.handler = handler_; }); - Page = $pkg.Page = $newType(0, $kindStruct, "main.Page", true, "github.com/status-im/whispervis", true, function(Core_, layout_, webgl_, loaded_, loader_, forceEditor_, network_, simulationConf_, data_) { + Page = $pkg.Page = $newType(0, $kindStruct, "main.Page", true, "github.com/status-im/whispervis", true, function(Core_, layout_, webgl_, loaded_, loader_, forceEditor_, network_, simulationConf_) { this.$val = this; if (arguments.length === 0) { this.Core = new vecty.Core.ptr($ifaceNil, $ifaceNil, false, false); @@ -35528,7 +126193,6 @@ $packages["github.com/status-im/whispervis"] = (function() { this.forceEditor = ptrType$14.nil; this.network = ptrType$15.nil; this.simulationConf = ptrType$16.nil; - this.data = ptrType$6.nil; return; } this.Core = Core_; @@ -35539,7 +126203,6 @@ $packages["github.com/status-im/whispervis"] = (function() { this.forceEditor = forceEditor_; this.network = network_; this.simulationConf = simulationConf_; - this.data = data_; }); WebGLScene = $pkg.WebGLScene = $newType(0, $kindStruct, "main.WebGLScene", true, "github.com/status-im/whispervis", true, function(WebGLRenderer_, scene_, camera_, renderer_, graph_, nodes_, edges_, controls_, autoRotate_) { this.$val = this; @@ -36107,8 +126770,8 @@ $packages["github.com/status-im/whispervis"] = (function() { }; $pkg.LoadNetworks = LoadNetworks; NetworkSelector.ptr.prototype.networkOptions = function() { - var _arg, _arg$1, _entry, _i, _keys, _r, _r$1, _r$2, _ref, n, name, options, x, $s, $r; - /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _ref = $f._ref; n = $f.n; name = $f.name; options = $f.options; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + var _arg, _arg$1, _entry, _i, _keys, _r, _r$1, _ref, n, name, options, x, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _entry = $f._entry; _i = $f._i; _keys = $f._keys; _r = $f._r; _r$1 = $f._r$1; _ref = $f._ref; n = $f.n; name = $f.name; options = $f.options; x = $f.x; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: n = this; options = vecty.List.nil; _ref = n.networks; @@ -36122,17 +126785,15 @@ $packages["github.com/status-im/whispervis"] = (function() { /* continue; */ $s = 1; continue; } name = _entry.k; - _r = fmt.Printf("'%s' == '%s'\n", new sliceType$1([new $String(n.current.Name), new $String(name)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; _arg = (x = vecty.Markup(new sliceType$6([vecty.Property("value", new $String(name)), vecty.Property("selected", new $Bool(n.current.Name === "data/" + name))])), new x.constructor.elem(x)); - _r$1 = vecty.Text(name, new sliceType$5([])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _r$2 = elem.Option(new sliceType$5([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - options = $append(options, _r$2); + _r = vecty.Text(name, new sliceType$5([])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _arg$1 = _r; + _r$1 = elem.Option(new sliceType$5([_arg, _arg$1])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + options = $append(options, _r$1); _i++; /* } */ $s = 1; continue; case 2: $s = -1; return options; - /* */ } return; } if ($f === undefined) { $f = { $blk: NetworkSelector.ptr.prototype.networkOptions }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._ref = _ref; $f.n = n; $f.name = name; $f.options = options; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; + /* */ } return; } if ($f === undefined) { $f = { $blk: NetworkSelector.ptr.prototype.networkOptions }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._entry = _entry; $f._i = _i; $f._keys = _keys; $f._r = _r; $f._r$1 = _r$1; $f._ref = _ref; $f.n = n; $f.name = name; $f.options = options; $f.x = x; $f.$s = $s; $f.$r = $r; return $f; }; NetworkSelector.prototype.networkOptions = function() { return this.$val.networkOptions(); }; NetworkSelector.ptr.prototype.onChange = function(e) { @@ -36272,10 +126933,11 @@ $packages["github.com/status-im/whispervis"] = (function() { NewPage = function() { var _r, page, $s, $r; /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; page = $f.page; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - page = new Page.ptr(new vecty.Core.ptr($ifaceNil, $ifaceNil, false, false), ptrType$11.nil, ptrType$12.nil, false, widgets.NewLoader(), widgets.NewForceEditor(), ptrType$15.nil, widgets.NewSimulation(""), ptrType$6.nil); + page = new Page.ptr(new vecty.Core.ptr($ifaceNil, $ifaceNil, false, false), ptrType$11.nil, ptrType$12.nil, false, widgets.NewLoader(), widgets.NewForceEditor(), ptrType$15.nil, ptrType$16.nil); _r = NewNetworkSelector($methodVal(page, "onNetworkChange")); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } page.network = _r; page.webgl = NewWebGLScene(); + page.simulationConf = widgets.NewSimulation("localhost:8084", $methodVal(page, "CurrentNetwork")); $s = -1; return page; /* */ } return; } if ($f === undefined) { $f = { $blk: NewPage }; } $f._r = _r; $f.page = page; $f.$s = $s; $f.$r = $r; return $f; }; @@ -36344,15 +127006,34 @@ $packages["github.com/status-im/whispervis"] = (function() { p = this; _r = fmt.Println(new sliceType$1([new $String("Network changed:"), network])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } _r; - p.data = network.Data; config = $clone(p.forceEditor.Config(), widgets.ForcesConfig); - _r$1 = layout.NewFromConfig(p.data, $clone(config.Config, layout.Config)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1 = layout.NewFromConfig(network.Data, $clone(config.Config, layout.Config)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } p.layout = _r$1; $go($methodVal(p, "UpdateGraph"), []); $s = -1; return; /* */ } return; } if ($f === undefined) { $f = { $blk: Page.ptr.prototype.onNetworkChange }; } $f._r = _r; $f._r$1 = _r$1; $f.config = config; $f.network = network; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; }; Page.prototype.onNetworkChange = function(network) { return this.$val.onNetworkChange(network); }; + Page.ptr.prototype.CurrentNetwork = function() { + var _r, _r$1, buf, err, net, p, $s, $r; + /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; buf = $f.buf; err = $f.err; net = $f.net; p = $f.p; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + buf = [buf]; + p = this; + net = p.network.current.Data; + buf[0] = new bytes.Buffer.ptr(sliceType.nil, 0, arrayType.zero(), 0); + _r = formats.NewD3JSON(buf[0], true).ExportGraph(net); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + err = _r; + /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } + /* */ $s = 3; continue; + /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: + _r$1 = fmt.Println(new sliceType$1([new $String("[ERROR] Can't export graph:"), err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + _r$1; + $s = -1; return sliceType.nil; + /* } */ case 3: + $s = -1; return buf[0].Bytes(); + /* */ } return; } if ($f === undefined) { $f = { $blk: Page.ptr.prototype.CurrentNetwork }; } $f._r = _r; $f._r$1 = _r$1; $f.buf = buf; $f.err = err; $f.net = net; $f.p = p; $f.$s = $s; $f.$r = $r; return $f; + }; + Page.prototype.CurrentNetwork = function() { return this.$val.CurrentNetwork(); }; NewWebGLScene = function() { var w; w = new WebGLScene.ptr(ptrType$17.nil, ptrType$18.nil, new three.PerspectiveCamera.ptr(null, new three.Vector3.ptr(null)), ptrType.nil, ptrType$10.nil, ptrType$10.nil, ptrType$10.nil, new TrackBallControl.ptr(null), false); @@ -36454,7 +127135,7 @@ $packages["github.com/status-im/whispervis"] = (function() { TrackBallControl.methods = [{prop: "Update", name: "Update", pkg: "", typ: $funcType([], [], false)}]; ptrType$5.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NodesCount", name: "NodesCount", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "LinksCount", name: "LinksCount", pkg: "", typ: $funcType([], [$Int], false)}]; ptrType$15.methods = [{prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "descriptionBlock", name: "descriptionBlock", pkg: "github.com/status-im/whispervis", typ: $funcType([], [ptrType$20], false)}, {prop: "networkOptions", name: "networkOptions", pkg: "github.com/status-im/whispervis", typ: $funcType([], [vecty.List], false)}, {prop: "onChange", name: "onChange", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$21], [], false)}, {prop: "onUpload", name: "onUpload", pkg: "github.com/status-im/whispervis", typ: $funcType([sliceType], [], false)}, {prop: "setCurrentNetwork", name: "setCurrentNetwork", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$5], [], false)}]; - ptrType$22.methods = [{prop: "UpdateGraph", name: "UpdateGraph", pkg: "", typ: $funcType([], [], false)}, {prop: "KeyListener", name: "KeyListener", pkg: "", typ: $funcType([ptrType$21], [], false)}, {prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "updateButton", name: "updateButton", pkg: "github.com/status-im/whispervis", typ: $funcType([], [ptrType$20], false)}, {prop: "onUpdateClick", name: "onUpdateClick", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$21], [], false)}, {prop: "onNetworkChange", name: "onNetworkChange", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$5], [], false)}, {prop: "VisibilityListener", name: "VisibilityListener", pkg: "", typ: $funcType([ptrType$21], [], false)}]; + ptrType$22.methods = [{prop: "UpdateGraph", name: "UpdateGraph", pkg: "", typ: $funcType([], [], false)}, {prop: "KeyListener", name: "KeyListener", pkg: "", typ: $funcType([ptrType$21], [], false)}, {prop: "Render", name: "Render", pkg: "", typ: $funcType([], [vecty.ComponentOrHTML], false)}, {prop: "updateButton", name: "updateButton", pkg: "github.com/status-im/whispervis", typ: $funcType([], [ptrType$20], false)}, {prop: "onUpdateClick", name: "onUpdateClick", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$21], [], false)}, {prop: "onNetworkChange", name: "onNetworkChange", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType$5], [], false)}, {prop: "CurrentNetwork", name: "CurrentNetwork", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "VisibilityListener", name: "VisibilityListener", pkg: "", typ: $funcType([ptrType$21], [], false)}]; ptrType$12.methods = [{prop: "animate", name: "animate", pkg: "github.com/status-im/whispervis", typ: $funcType([], [], false)}, {prop: "ToggleAutoRotation", name: "ToggleAutoRotation", pkg: "", typ: $funcType([], [], false)}, {prop: "CreateObjects", name: "CreateObjects", pkg: "", typ: $funcType([mapType$2, sliceType$8], [], false)}, {prop: "createNodes", name: "createNodes", pkg: "github.com/status-im/whispervis", typ: $funcType([mapType$2], [], false)}, {prop: "createEdges", name: "createEdges", pkg: "github.com/status-im/whispervis", typ: $funcType([mapType$2, sliceType$8], [], false)}, {prop: "RemoveObjects", name: "RemoveObjects", pkg: "", typ: $funcType([], [], false)}, {prop: "init", name: "init", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType], [], false)}, {prop: "shutdown", name: "shutdown", pkg: "github.com/status-im/whispervis", typ: $funcType([ptrType], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "InitScene", name: "InitScene", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "InitLights", name: "InitLights", pkg: "", typ: $funcType([], [], false)}, {prop: "InitControls", name: "InitControls", pkg: "", typ: $funcType([], [], false)}]; asset.init("github.com/status-im/whispervis", [{prop: "bytes", name: "bytes", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: os.FileInfo, tag: ""}]); bindataFileInfo.init("github.com/status-im/whispervis", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "mode", name: "mode", embedded: false, exported: false, typ: os.FileMode, tag: ""}, {prop: "modTime", name: "modTime", embedded: false, exported: false, typ: time.Time, tag: ""}]); @@ -36462,7 +127143,7 @@ $packages["github.com/status-im/whispervis"] = (function() { TrackBallControl.init("", [{prop: "Object", name: "Object", embedded: true, exported: true, typ: ptrType$19, tag: ""}]); Network.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Description", name: "Description", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: ptrType$6, tag: ""}]); NetworkSelector.init("github.com/status-im/whispervis", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "current", name: "current", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "isCustom", name: "isCustom", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "networks", name: "networks", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "upload", name: "upload", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "handler", name: "handler", embedded: false, exported: false, typ: funcType$2, tag: ""}]); - Page.init("github.com/status-im/whispervis", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "layout", name: "layout", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "webgl", name: "webgl", embedded: false, exported: false, typ: ptrType$12, tag: ""}, {prop: "loaded", name: "loaded", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "loader", name: "loader", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "forceEditor", name: "forceEditor", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "network", name: "network", embedded: false, exported: false, typ: ptrType$15, tag: ""}, {prop: "simulationConf", name: "simulationConf", embedded: false, exported: false, typ: ptrType$16, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: ptrType$6, tag: ""}]); + Page.init("github.com/status-im/whispervis", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: vecty.Core, tag: ""}, {prop: "layout", name: "layout", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "webgl", name: "webgl", embedded: false, exported: false, typ: ptrType$12, tag: ""}, {prop: "loaded", name: "loaded", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "loader", name: "loader", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "forceEditor", name: "forceEditor", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "network", name: "network", embedded: false, exported: false, typ: ptrType$15, tag: ""}, {prop: "simulationConf", name: "simulationConf", embedded: false, exported: false, typ: ptrType$16, tag: ""}]); WebGLScene.init("github.com/status-im/whispervis", [{prop: "WebGLRenderer", name: "WebGLRenderer", embedded: true, exported: true, typ: ptrType$17, tag: ""}, {prop: "scene", name: "scene", embedded: false, exported: false, typ: ptrType$18, tag: ""}, {prop: "camera", name: "camera", embedded: false, exported: false, typ: three.PerspectiveCamera, tag: ""}, {prop: "renderer", name: "renderer", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "graph", name: "graph", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "nodes", name: "nodes", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "edges", name: "edges", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "controls", name: "controls", embedded: false, exported: false, typ: TrackBallControl, tag: ""}, {prop: "autoRotate", name: "autoRotate", embedded: false, exported: false, typ: $Bool, tag: ""}]); $init = function() { $pkg.$init = function() {}; diff --git a/whispervis.js.map b/whispervis.js.map index 70755b6..4754460 100644 --- a/whispervis.js.map +++ b/whispervis.js.map @@ -1 +1 @@ -{"version":3,"file":"whispervis.js","sources":["/github.com/gopherjs/gopherjs/js/js.go","runtime.go","/runtime/error.go","/errors/errors.go","atomic.go","pool.go","sync.go","/sync/mutex.go","/sync/once.go","/sync/pool.go","/sync/runtime.go","/sync/rwmutex.go","/io/io.go","unicode.go","/unicode/digit.go","/unicode/graphic.go","/unicode/letter.go","/unicode/utf8/utf8.go","bytes.go","/bytes/buffer.go","/bytes/bytes.go","/bytes/reader.go","/bufio/bufio.go","math.go","/math/abs.go","syscall.go","syscall_unix.go","/syscall/dirent.go","/syscall/exec_unix.go","/syscall/route_bsd.go","/syscall/str.go","/syscall/syscall.go","/syscall/syscall_bsd.go","/syscall/syscall_darwin.go","/syscall/syscall_darwin_amd64.go","/syscall/syscall_unix.go","/syscall/zsyscall_darwin_amd64.go","/github.com/gopherjs/gopherjs/nosync/map.go","/github.com/gopherjs/gopherjs/nosync/mutex.go","/github.com/gopherjs/gopherjs/nosync/once.go","time.go","/time/format.go","/time/time.go","/time/zoneinfo.go","fd_poll_js.go","/internal/poll/fd.go","/internal/poll/fd_mutex.go","/internal/poll/fd_posix.go","/internal/poll/fd_unix.go","/internal/poll/sockopt.go","/internal/poll/sockopt_unix.go","/internal/poll/sockoptip.go","/internal/poll/sys_cloexec.go","/internal/poll/writev.go","/internal/testlog/log.go","os.go","/os/dir.go","/os/dir_unix.go","/os/error.go","/os/error_posix.go","/os/error_unix.go","/os/file.go","/os/file_posix.go","/os/file_unix.go","/os/getwd_darwin.go","/os/path_unix.go","/os/proc.go","/os/stat.go","/os/stat_darwin.go","/os/stat_unix.go","/os/types.go","/os/types_unix.go","/os/getwd.go","/math/bits/bits.go","/strconv/atof.go","/strconv/atoi.go","/strconv/decimal.go","/strconv/extfloat.go","/strconv/ftoa.go","/strconv/itoa.go","/strconv/quote.go","reflect.go","swapper.go","/reflect/type.go","/reflect/value.go","/fmt/format.go","/fmt/print.go","/fmt/scan.go","/sort/slice.go","/sort/sort.go","/sort/zfuncversion.go","/compress/flate/dict_decoder.go","/compress/flate/huffman_bit_writer.go","/compress/flate/huffman_code.go","/compress/flate/inflate.go","/encoding/binary/binary.go","/hash/crc32/crc32.go","/hash/crc32/crc32_generic.go","/hash/crc32/crc32_otherarch.go","/compress/gzip/gunzip.go","/encoding/base64/base64.go","strings.go","/strings/strings.go","/unicode/utf16/utf16.go","/encoding/json/decode.go","/encoding/json/encode.go","/encoding/json/fold.go","/encoding/json/scanner.go","/encoding/json/stream.go","/encoding/json/tags.go","/github.com/divan/graphx/graph/graph.go","/github.com/divan/graphx/graph/helpers.go","/github.com/divan/graphx/graph/link.go","/github.com/divan/graphx/graph/node.go","/log/log.go","/github.com/divan/graphx/layout/config.go","/github.com/divan/graphx/layout/force.go","/github.com/divan/graphx/layout/force_drag.go","/github.com/divan/graphx/layout/force_gravity.go","/github.com/divan/graphx/layout/force_spring.go","/github.com/divan/graphx/layout/integrate.go","/github.com/divan/graphx/layout/layout.go","/github.com/divan/graphx/layout/object.go","/github.com/divan/graphx/layout/octree.go","/github.com/divan/graphx/layout/force_rules.go","/github.com/divan/graphx/formats/d3json.go","/github.com/gopherjs/vecty/dom.go","/github.com/gopherjs/vecty/domutil.go","/github.com/gopherjs/vecty/markup.go","/github.com/gopherjs/vecty/elem/elem.gen.go","/github.com/gopherjs/vecty/event/event.gen.go","/github.com/gopherjs/vecty/prop/prop.go","/github.com/bep/gr/support/support.go","/github.com/fatih/structs/field.go","/github.com/fatih/structs/structs.go","/github.com/fatih/structs/tags.go","/github.com/lngramos/three/cameras_perspective_camera.go","/github.com/lngramos/three/core_face3.go","/github.com/lngramos/three/gen_geometry_basic_geometry.go","/github.com/lngramos/three/gen_material_line_basic_material.go","/github.com/lngramos/three/gen_material_mesh_phong_material.go","/github.com/lngramos/three/gen_object3d_ambient_light.go","/github.com/lngramos/three/gen_object3d_directional_light.go","/github.com/lngramos/three/gen_object3d_group.go","/github.com/lngramos/three/gen_object3d_line.go","/github.com/lngramos/three/gen_object3d_mesh.go","/github.com/lngramos/three/gen_object3d_scene.go","/github.com/lngramos/three/geometries_basic_geometry.go","/github.com/lngramos/three/lights_ambient_light.go","/github.com/lngramos/three/lights_directional_light.go","/github.com/lngramos/three/main.go","/github.com/lngramos/three/materials_line_basic_material.go","/github.com/lngramos/three/materials_material.go","/github.com/lngramos/three/materials_mesh_phong_material.go","/github.com/lngramos/three/math_color.go","/github.com/lngramos/three/math_vector3.go","/github.com/lngramos/three/objects_group.go","/github.com/lngramos/three/objects_line.go","/github.com/lngramos/three/objects_mesh.go","/github.com/lngramos/three/renderers_webgl_renderer.go","/github.com/lngramos/three/scenes_scene.go","/github.com/status-im/whispervis/jsapi/filereader.go","/github.com/status-im/whispervis/widgets/force_editor.go","/github.com/status-im/whispervis/widgets/force_input.go","/github.com/status-im/whispervis/widgets/loader.go","/github.com/status-im/whispervis/widgets/range.go","/github.com/status-im/whispervis/widgets/simulation.go","/github.com/status-im/whispervis/widgets/upload.go","/github.com/vecty/vthree/renderer.go","/io/ioutil/ioutil.go","/github.com/status-im/whispervis/animate.go","/github.com/status-im/whispervis/bindata.go","/github.com/status-im/whispervis/controls.go","/github.com/status-im/whispervis/geom_ethereum.go","/github.com/status-im/whispervis/graph.go","/github.com/status-im/whispervis/keys.go","/github.com/status-im/whispervis/main.go","/github.com/status-im/whispervis/material.go","/github.com/status-im/whispervis/network.go","/github.com/status-im/whispervis/network_selector.go","/github.com/status-im/whispervis/objects.go","/github.com/status-im/whispervis/page.go","/github.com/status-im/whispervis/scene.go","/github.com/status-im/whispervis/visibility.go"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B4C;A;;;;;AAGW;A;;;;;AAGhB;A;;;;;AAGN;A;;;;;AAGQ;A;;;;;AAGc;A;;;;;AAGY;A;;;;;AAGX;A;;;;;AAGH;A;;;;;AAGrB;A;;;;;AAGI;A;;;;;AAGN;A;;;;;AAGI;A;;;;;AAGE;A;;;;;AAGA;A;;;;;AAGQ;A;;;;;AAGP;A;;;;;AASnC;A;;;;;AAKA;A;;;;AAsBA;A;;;;AAkDA;AACA;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/IA;A;;;;;AAGA;A;;;;AAIA;AACA;AACA;AACA;AAEI;AACJ;AACA;A;;;AAIA;A;AAEC;A;AAED;A;AAEC;A;AAID;A;;;;;;;;AAQA;A;A;;;;;;;;;A;AAIA;A;;;;;;;;;A;;;AA6BA;AACA;A;;;;;;AAQA;AACA;AAAyD;A;AACzD;;A;;;;;;A;;;;A;;;;AAyHA;A;;A;;;;;AClMA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;A;AAIE;A;AAEA;A;A;AAGF;A;AAED;A;;;;;A;;;;;AAUA;A;;;;;;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;ACpDA;A;;;;;AASA;A;;;;;;;;;;;;;;;;A;;;;A;;;;A;;;A;;;A;;;;A;;;;A;;;;;;;;;;;;;;;;;;;;;;;;A;AC8BC;AACA;A;AAED;A;;;;A;AAqBC;AACA;A;AAED;A;;;;AAoBA;AACA;AACA;A;;;;AA4BA;A;;;;AAQA;A;;;;AAIA;A;;;;AAYA;A;;;;AAQA;A;;;;;;A;;A;;;;;A;AAqBC;A;A;AAGA;A;AAED;A;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxKA;;A;AACC;;A;AACC;;A;AAED;A;AAED;AACA;AACA;A;;;;;;A;AAKC;A;AAED;A;;;;A;;;;ACHA;;A;AACC;A;AAEC;A;AAEA;A;AAED;;AACA;A;AAEC;A;A;A;A;;;;;;A;AAUF;A;AAEC;A;AAGD;AACA;AACA;A;AAEC;A;AAGD;A;A;;;;;A;;;AAQA;A;;AAMA;A;;;AAKA;A;;;;;A;A;ACHE;A;AAED;A;AAGG;AACJ;AACA;AACA;AACA;AACA;AAGC;;A;A;AAME;A;AAED;AACA;AACA;AACA;A;AAED;A;AAGC;A;A;AAGA;A;A;AAOA;A;A;A;AAMC;A;AAED;A;AAED;;A;A;AAEE;A;AAGD;A;AAEC;A;AAED;AACA;AACA;A;A;AAOE;A;AAED;A;AAOC;A;AAED;AACA;A;AAED;AACA;A;;AAEA;A;A;A;AAKD;A;A;;;;;;;;A;AAYA;AACA;A;AAID;A;AAEC;A;AAED;;A;AACC;AACA;A;AAQE;A;AAGD;AACA;;A;AACC;AACA;A;AAED;A;A;;AAOD;A;A;;;;;;;;A;AC9KA;A;AAGD;AACA;AACA;;A;AACC;AACA;A;A;;;;;;ACqLD;;;;;;AACC;AACI;;;AACH;AACA;AACA;;;;;AACC;A;;AAED;AANiC;A;AAQlC;AACA;A;;AAED;A;;AASA;A;;;AAIA;AACA;A;;;ACxMI;AACJ;A;;;;;;;;A;ACRC;AACA;A;AAED;;A;AAEC;A;A;AAGA;AACA;A;A;;;;;;;;A;AAUA;AACA;AACA;A;AAEE;AAAH;;A;A;AAEE;AACA;A;AAGD;;A;AAEC;A;A;A;AAID;A;A;;;;;;;;A;AASA;AACA;A;AAGD;AAEA;AAEA;;A;AACC;A;A;AAGA;AACA;AACA;A;A;;;;;;;;A;AAYA;AACA;AACA;A;AAID;A;AAEC;AACA;A;AAGG;;;AACH;AADuB;A;AAIxB;A;AAEC;A;A;;;;;;;AAOD;A;;;;;;AAK4B;A;;;;;;;;AACA;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;;;;;A;ACkK5B;;AACK;AACJ;;;;AACA;A;A;AAGA;A;AAEA;A;AAED;A;;;;;;;;A;;;;;A;;;;;;;;A;;;;;A;;;;;;;;AAiEG;;;AAAH;;A;A;;;;;A;AAIG;;;AAAH;;A;A;;;;;A;A;AAIC;AACG;;;A;A;AAED;A;AAEA;A;A;AAGF;A;AAED;AACC;;;;AACA;;A;AACC;;;;A;AAEC;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;A;A;AAKA;A;AAED;A;A;A;;;;;A;;;;;;;;A;A;;;;;A;A;AAyBD;A;AAED;;;;AACA;AACA;A;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;;;;;A;ACzbA;AACA;AACA;;AACC;AACA;A;AAEC;A;A;;;;;A;A;;;;;A;A;AAOA;A;AAEA;A;A;A;;;;;A;;;A;ACdD;A;AAED;A;;;;A;ACgFC;A;AAED;A;;;;A;ACAC;;;;;AACC;A;AAEC;A;A;AAGA;A;A;;AAGF;A;AAID;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;A;AAMC;;;;;AACC;A;AAEC;A;A;AAGA;A;A;;AAGF;A;AAID;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;AAiBA;AACG;A;AACF;A;AAED;A;AAEC;A;AAED;A;;;AAqEA;;AACA;A;;;;A;A;AAOE;A;AAED;A;AAED;A;;;;A;A;AAOE;A;AAED;A;AAED;A;;;;A;AAsEC;A;A;AAIA;A;AAID;AACA;AACA;;AACC;A;AAEC;A;AAEA;A;A;A;AAID;A;AAME;A;AACF;A;AAED;A;;;;;;;;;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;AC1QA;A;AAEC;A;AAED;A;AAEC;A;AAGD;A;AAEC;A;AAEA;A;AAED;A;;;;;;AAgCA;A;A;;;;;A;AAIA;AACA;A;AAKC;A;;;;;A;AAGD;AACA;A;A;;;;;A;AAIA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;;;;;A;;;;;;AAgBA;A;A;;;;;A;AAIA;AACA;A;AAKC;A;;;;;A;AAGD;AACA;A;A;;;;;A;AAIA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;;;;;A;;;;A;AA4FC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;AAOO;A;AAEN;AACA;A;AAEA;AACA;AACA;AACA;A;AAEA;AAGA;AACA;AACA;AACA;AACA;A;AAJA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;A;A;;;;AAOD;AACI;AACA;;;AACH;AACA;A;AAGC;AACA;A;AAED;A;AAEC;AACA;A;AAED;A;AAEC;AACA;A;AAED;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;A;AAED;A;;;;;AAKA;AACI;;;AACH;A;AAGC;AAJkB;A;A;AAOnB;A;AAEC;AATkB;A;A;AAYnB;A;AAEC;AAdkB;A;A;AAiBnB;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;AA3BmB;A;A;;A;;;;AAuEpB;AACI;;;AACH;A;AAEC;AACA;A;AAED;A;AAEC;A;AAED;A;AAEC;A;AAED;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;A;AAED;A;;;;A;AAQC;A;AAEA;A;AAED;A;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClgBA;;;;;;A;AAEE;A;A;;AAGF;A;;;;A;AAKC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;;ACgCiC;A;;;;;A;AAShC;A;AAED;A;;;;;AAI+B;A;;;;;AAIH;A;;;;;AAIA;A;;;;;A;AAO3B;AACA;A;AAED;A;AAEC;A;AAED;A;;;;;AAOA;AACA;AACA;A;;;;;AAOG;A;AACF;AACA;A;AAED;A;;;;;AAOA;A;AAGC;A;AAGE;;;A;AACF;A;A;AAIA;AACA;A;AAED;A;AAMC;A;AAEA;A;AAGA;AACA;AACA;A;AAGD;AACA;AACA;A;;;;;A;AAUC;A;AAED;AACA;A;;;;;;;AAOA;AACA;;;A;AAEC;A;A;;;;;A;;;;;;;AASD;AACA;;;A;AAEC;A;A;;;;;A;;;;;;;;AAgBD;AACA;AACC;AACA;AACA;;;;A;AAEC;A;AAGD;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;;;AAcD;A;AAEE;A;A;AAGF;A;;;;;;;;AAQA;AACG;AAAH;;A;AACC;;;;A;AAEC;A;AAED;AACA;A;A;;;;;A;A;A;;;;;A;A;AAWD;A;;;;;A;;;;;;AASA;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;;;A;AASC;A;;;;;A;AAGD;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;A;;;;;;;AASA;A;AAGC;A;A;;;;;A;A;;;;;A;AAMD;AACA;A;AAEC;A;A;;;;;A;;;;;AAUD;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;A;AAQC;AACA;A;AAED;AACA;AACA;AACA;A;;;;;;;;A;AAWC;A;;;;;;;A;AAGD;A;AAEC;AACA;A;;;;;;;A;AAGD;;;AACA;AACA;A;;;;;;;A;;;;;A;AAWC;A;A;AAGA;A;AAED;AACA;A;;;;;A;AASC;A;AAED;A;AAEC;A;AAED;A;;;;;;;AAUA;;;AAGA;A;;;;;A;;;;;;;AAMA;AACA;A;AAEC;AACA;A;AAED;AACA;AACA;A;;;;;A;;;;;;;AAWA;;;A;;;;;A;;;;AAaoC;A;;;;AC0UpC;;AAEK;;;;A;AAEH;;;;A;AAEA;;;AACA;;;;A;A;AAGA;;;;A;AAEA;;;AACA;;;;A;A;AAOA;A;A;AAKA;;;;A;A;A;AAMC;A;AAED;A;AAKD;AACA;;AACC;A;A;AAGA;A;AAED;A;AAID;A;;;;;A;AClyBC;A;AAED;A;;;;;AAO+B;A;;;;;;;A;A;;;;;A;AAO/B;AACA;AACA;AACA;A;;;;;;;A;A;;;;;A;A;A;;;;;A;AAYA;A;AAEC;A;AAED;A;;;;;AAKA;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAKA;A;AAEC;A;AAED;AACA;A;;;;;;;;A;AAMC;A;;;;;;;A;AAGD;AACG;A;AACF;A;;;;;;;A;AAGD;;;AACA;AACA;A;;;;;A;AAMC;A;AAED;AACA;AACA;A;;;;;AAKA;AACI;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAGA;A;AAED;AACA;A;;;;;;;;AAKA;A;A;;;;;A;AAIA;AACA;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;;AAIkC;A;;;;AAGA;A;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5GlC;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;AAKA;A;;;;;AAI6B;A;;;;;AAK7B;A;;;;;AAIA;A;;;;;;A;AAcC;AACA;AACA;A;A;AAIA;A;AAIG;;;AACH;;;;A;AAEC;A;AAED;A;AAEC;AACA;A;A;AAGA;A;AAXwC;A;AAc1C;A;;;;;;;AAIA;AACA;AACA;A;;;;;;A;AASC;A;AAGD;;AACC;A;A;AAIA;A;AAIG;AACD;A;AAEF;AACA;A;AAEC;A;A;AAGF;A;;;;;;;;;A;A;;;;;A;A;AAaC;A;AAED;AACA;AACC;AACA;;A;AACC;AACA;A;A;AAGA;A;AAED;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;;;;;;AAgBD;A;A;;;;;A;AAIA;;A;A;A;;;;;A;AAIC;;A;AAGC;;;;A;AAEC;A;A;AAGA;AACA;A;A;;;;;A;AAMF;AACA;AACA;;;;A;AAEC;A;A;A;;;;;A;AAKD;A;AAID;AACA;AACA;AACA;A;;;;;A;;;;;;;AAOA;AACA;;A;AAEE;A;AAED;A;AAED;AACA;AACA;AACA;A;;;;;;A;AAMC;A;A;AAIA;A;AAGA;A;AAED;AACA;AACA;AACA;A;;;;;;;;;AAOA;;AACC;A;AAED;A;A;;;;;;;A;AAIA;;;;A;AAEC;;;A;AAED;AACA;AACA;A;;;;;;;A;;;;;;A;AAUC;A;AAED;AACA;AACA;AACA;A;;;;;AAIiC;A;;;;;;;;AAajC;AAEI;A;AACF;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;AAGD;A;AAIE;A;AACF;AACA;A;AAGD;A;;;;;;;;;;AAoBA;;;;A;A;A;AAQG;A;AAED;AACA;A;A;;;;;;;A;A;A;AAOA;A;AAED;A;AAED;A;AAGC;A;AAEC;A;AAED;A;AAED;A;;;;;;;AAaI;AACA;AACA;AACJ;AACK;AACJ;;;;A;AAEC;A;A;AAGA;AACA;A;AAID;AACA;AACA;A;AAID;AACA;;;;;AACC;A;;AAED;AAGA;AACA;AACA;;;;;AACC;A;;AAED;AACA;A;;;;;;;AAWA;;;;AACA;A;;;;;;;;;AAQA;;;;A;AAEC;A;AAGE;;;AAAH;;A;AACC;;;;AACA;A;;;;;A;AAIE;;;AAAH;;A;AACC;;;;AACA;A;;;;;A;AAID;;A;AACC;A;AAGD;;AAEC;;;;AACA;A;A;;;;;A;AAIA;A;A;AAIA;A;A;;;;;A;;;;;;;AAUD;;;;A;AAEC;A;AAED;AACA;A;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;ACvdA;A;;;;AAeA;A;;;;A;AA0CC;A;AAEA;A;A;;;AAuED;A;;;;AAmBA;A;;;;AAYA;A;;;;AAyBA;AACA;AACA;AACA;A;;;AAIA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;A;;;;ACjPA;A;;;;;A;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEA;A;AAEE;AACA;A;A;A;;A;AAOD;A;AAED;A;;;AAIA;A;AAEC;AACA;A;AAGD;AACA;AACC;A;AAEC;A;AAED;AACA;A;A;;;AASD;A;;;;AAKA;;;;;;A;AAEE;A;A;;AAGF;A;;;AClDA;A;AAEC;A;AAED;AACA;AACA;AACI;;;AACH;AACA;AAFiC;A;AAIlC;A;;;;AAwBA;AACC;A;A;A;AAKC;A;AAED;AACA;A;AAEC;A;AAED;A;AAED;A;;;;;;;AAIG;A;AACF;A;;;;;;;A;A;AAIA;AACA;AACA;AACA;A;;;;;;;A;A;AAIA;A;AAED;A;;;;;;;A;;;;;;;AAKG;A;AACF;A;;;;;;;A;A;AAIA;A;A;;;;;;;A;;;;AAiCD;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;AACA;A;;;;;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;A;A;AC3GC;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAGA;A;A;;;A;A;AAOA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAGA;A;A;;;;;;AASD;AACA;AACA;;AACC;;;A;A;;;;;;;A;AAIA;AACA;AACA;;;A;AAEC;A;A;AAGA;A;AAGD;;;A;AAEC;A;AAED;AACA;;;;;;A;AAEE;AACA;A;A;;A;AAKD;A;AAED;AACA;AACA;A;A;;;;;;;A;;;;ACHyB;A;;;;;AAG1B;;;A;A;;A;A;AAKC;A;AAEA;A;AAED;;A;;A;;;;A;;;A;;;ACvFA;A;AAIC;A;AAIA;A;A;AAOC;A;A;A;AAID;A;AAED;A;;;A;ACjCC;A;AAED;A;;;AAII;AACJ;AACA;;AACC;AACA;AACA;A;AAED;AACA;A;;;;;;A;;;;;A;;;;;ACuEA;A;;;;;;ACxBI;A;;;;A;;;;;A;AA8EH;A;AAED;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;;A;;;;;AAIA;AACA;A;AAEC;A;AAED;AACA;AACI;;;AACH;AADkB;A;AAGnB;;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AADiC;A;AAGlC;;A;;;;A;A;AAMC;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAGA;;;A;AAEC;A;AAED;AAMA;AACI;;;A;AAIF;AACA;A;AALiB;A;AAQnB;AACA;AACA;A;AAGA;;;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAGA;;;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAED;A;;;;;;AAII;AACA;AACJ;;;A;AAEC;A;A;AAOA;A;;;;;;;A;AAGD;;;A;AAEC;AACA;A;AAED;A;;;;;;;;;AAkEI;AACA;AACJ;;;AACA;AACI;A;AAEH;AACA;A;AAEG;A;A;AAIF;AACA;A;AAED;AACA;A;AAED;AACA;AACG;;;A;AACF;A;AAED;AACA;A;AAGC;;;A;AAED;A;;;;;;;;;;AAWI;AACA;AACJ;;A;AACC;;;;;A;A;;;;;A;A;AAKG;AACJ;AACA;AACI;A;AAEH;AACA;A;AAEG;A;A;AAIF;AACA;A;AAED;AACA;A;AAED;AACA;AACG;;;A;A;;;;;A;A;AAIF;A;A;;;;;A;;;;;ACjWD;A;;;AAIA;A;;;AAIA;A;;;;AC7CA;A;;;;;AAIA;A;;;;;;;;;A;A;;;;;A;ACaA;;;;A;A;;;;;A;AAMI;AAOJ;AAGA;AACA;AACA;AACA;A;;;;;A;;;;;;;;A;A;;A;AAUA;AACA;AACA;AACA;A;A;;A;AAMG;;A;A;;A;AAGH;A;;A;;;;;;A;AAeC;A;AAEC;A;A;AAGF;A;;;;;AAIA;A;;;;;AAIA;A;;;;A;A;AAgBC;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;AAoBA;;;A;A;AAGE;A;A;AAGA;A;A;A;AAID;A;AAED;A;;;;;;A;AAKC;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;AA8DI;AACA;AACD;;;A;AACF;A;A;AAGA;;;A;AAED;A;;;;;;AAIA;;;;;A;A;;A;A;;A;;;;;;A;;A;;;;;AAYI;A;;A;;;;;A;;A;;;;;A;;;;A;;;;;A;;;;A;;;;;A;;;;A;;;;;;AC/OJ;;;;;AACA;A;AAEC;A;AAED;A;;;;AA+CA;;A;AAEC;A;AAED;A;;;;AA0BA;;A;AAEC;A;AAED;A;;;;;;AAgBI;A;AAEH;A;AAEA;A;AAED;;;;;AACA;A;AAEC;A;AAED;A;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;A;AAEC;A;AAED;A;;;;;AAMA;;;;;AACA;A;AAEC;A;AAED;A;;;;;AAMA;;;;;AACA;A;AAEC;A;AAED;A;;;;;AA0DA;;;AACA;A;AAEC;A;AAED;A;;;;AA0IA;;A;AAEC;A;AAED;A;;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;;AAoCA;;A;AAEC;A;AAED;A;;;;;AAgBA;;A;AAEC;A;AAED;A;;;;;AAMA;;A;AAEC;A;AAED;A;;;;;AA2BA;;;;A;AAEC;A;AAED;A;;;;;AAgBA;;A;AAEC;A;AAED;A;;;;;AAMA;;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;AA2LI;AACJ;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;AAuJI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;AA8EA;;;AACA;A;AAEC;A;AAED;A;;;;;;AAwRI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClzCA;;;A;;;;;A;;;;;A;AAOC;A;AAED;A;;;;;;;AAOG;;;A;A;;;;;A;A;AAIF;A;AAED;A;;;;;A;;;;;A;AAOC;A;AAED;A;;;;;;AAcA;;;;;;A;A;;A;;;AACC;;;A;AACC;A;A;;A;;;;;;;A;ACrDD;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;;;A;ACOC;A;A;AAGA;A;AAED;AACA;AACC;AACA;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvBI;A;;;AAcJ;AACA;AACA;AACA;A;AAEC;AACA;A;AAED;AACA;A;;AAIA;A;;;;;;AAIA;A;;;;;;;A;;;AA6CA;A;;;A;AC8CC;A;AAED;AACA;A;;;;;;AAMI;;;AACI;A;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;AA2GL;AACA;AACA;;AACC;A;A;AAIA;A;AAEC;A;AAED;A;;;;;;;A;A;A;AAvHyB;A;A;;;;;;;A;;;AAqLzB;;;AACH;AACA;A;AAGC;AACA;A;AAEC;A;A;AARsB;A;AAYzB;A;;;AAIA;;;;;;A;AAEE;A;A;;AAGF;A;;;AAOA;A;AAEC;AACA;A;AAIG;AACJ;AACA;;AACC;AACA;AACA;AACA;A;AAED;AACA;AAGI;;;AACH;AADiC;A;AAIlC;A;;;;;AAQA;A;AAEC;AACA;A;AAED;;;;AACA;A;A;;;;;A;A;AAKC;A;A;;;;;A;;;AAQD;AACI;AACA;;;AACH;AACA;AACA;A;A;AAIA;A;A;AAGA;;AACC;A;A;AAGA;A;A;AAGF;AACA;A;;;;;AAcA;;A;AAIC;AACA;A;AAEC;AACA;A;AAED;;;;AACA;;;;AACI;AACJ;AACA;AACA;A;AAEC;AACA;A;AAED;AACA;AACA;AACA;A;AAED;A;;;;;;;AAqBI;AACJ;A;AAEK;AACJ;A;AAEA;A;AAED;;AACA;A;;;;;;;AAOC;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAGD;;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;A;AAIC;;;;A;A;AAKA;;;;A;AAGD;A;A;AAEC;A;AAEC;A;AAED;A;AAEA;A;AAEA;A;AAEA;AACA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;AACA;A;AAEA;A;A;AAGC;A;AAED;A;AAEA;A;AAEA;A;AAGA;A;AAEC;A;AAED;A;AAGA;A;AAEC;A;AAED;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAGC;A;AAEA;A;A;A;AAIA;A;AAEA;A;A;A;AAMA;AACA;A;AAED;AACA;A;AAEC;AACA;AACA;A;AAEA;A;AAED;A;AAEC;A;A;AAGA;A;A;A;AAMC;A;AAED;A;A;A;AAKA;AACA;A;AAID;A;AAEC;AACA;A;AAEA;A;AAED;AACA;A;AAEA;A;A;A;AAGF;A;;;;;AAeA;A;;;;A;AAMC;A;AAMD;A;;;;A;AAOC;A;AAED;AACA;A;;;A;AAQC;A;A;A;AAIC;A;AAED;A;AAED;A;;;AAIA;;AACC;A;AAED;A;;;AAMA;;A;A;AAGG;A;AAED;AACA;AACA;A;A;AAGA;A;AAED;AACA;A;AAED;A;;;;AA0CA;;A;;;;;;AAaA;;;;AACA;AACA;AACA;AAIC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAID;AACK;AACJ;;;;AACA;AACA;;;A;AAEC;A;A;A;AAIC;A;AAED;A;AAED;AACI;AACJ;A;A;A;AAGE;AACA;A;AAED;;;;AACA;;;A;AAEC;A;AAEA;A;A;A;AAIA;AACA;A;AAED;;;;AACA;;;A;AAEA;;;;AACA;A;AAEA;;;;AACA;A;AAEA;;;;A;AAEC;A;A;AAID;;;A;AAEA;;;A;A;AAGC;A;AAED;;;;A;AAGC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;AACA;A;A;AAKA;;AACA;A;AAGC;A;AAGD;AACA;;AAA2C;A;AAE3C;;;;AACA;A;A;A;AAIA;AACA;A;AAED;;;;A;A;AAGC;A;AAEA;A;AAEA;A;A;A;AAIA;AACA;A;AAED;;;;A;A;AAGC;A;AAEA;A;AAEA;A;A;A;AAIA;AACA;AACA;A;AAEG;;;;;;;;A;A;AAGF;AACA;A;A;AAGA;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;AAEG;;;;;;AACJ;;;A;AAEC;;;A;A;AAGA;;;A;AAED;A;A;A;AAIC;A;AAEA;A;A;A;AAKA;AACA;AACA;A;AAED;;;A;AAEC;AACA;A;AAED;;;;A;AAKA;A;AAEC;AACA;A;AAED;;;;AACA;A;A;AAKC;A;AAID;AACA;;AACC;A;AAED;;;;AACA;A;A;A;AAGA;A;A;AAGA;A;A;A;AAID;A;AAEA;A;A;AAKA;A;AAGD;;A;AACC;;A;AAGD;;A;AACC;;AACA;AAIA;;;;A;AAEC;AACA;A;AAID;AACA;A;AAGD;;A;AACC;;AAGA;;;;A;AAEC;AACA;AACA;A;A;AAKA;;AACA;A;AAED;AACA;A;AAID;;A;;;;;;A;A;;;;;A;A;A;;;;;A;A;AAuBC;A;;;;;A;A;AAKA;A;;;;;A;AAIG;AACA;;;A;AAEF;A;AAEE;A;AACF;A;AAL0B;A;A;A;A;;;;;A;A;A;;;;;A;A;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;AA8B5B;A;AAEC;A;AAGD;A;;;AAOA;A;AAEC;A;AAED;;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;AACA;A;AAEE;;;A;AACF;A;A;AAGA;AACA;A;AAKD;AACI;;;AACH;AAD4B;A;AAG7B;A;;;;;;AAOA;AACA;;AACC;A;AAEC;A;A;A;;;;;;;A;AAMD;A;A;;;;;;;A;AATiB;A;A;;;;;;;A;;;;AChiClB;A;;;;;A;AAMC;A;AAED;A;;;;;AAIgC;A;;;;;A;AAK/B;AACA;A;AAEC;AACA;A;AAID;A;AAID;A;;;;;A;AAMC;A;AAED;AACA;A;;;;;A;AAMC;AACA;A;A;;;;;A;AAkCA;A;AAED;AACA;AACA;A;;;;;A;AAMC;A;AAED;A;;;;;A;AAUC;A;AAED;A;;;;;A;AAuCC;A;AAED;AACA;AACA;A;;;;;A;AA6BC;A;AAED;AACA;AACA;A;;;;;AA2GA;A;;;;;;AAMA;AAEA;;A;AACC;;A;AAED;AACA;;A;AACC;;A;AACC;A;;AAEA;;;AACA;A;A;AAGF;A;;;;;;;;;;AAMA;AACA;;A;AACC;;A;AAGD;AACA;;A;AACC;;A;AACC;AACA;A;;AAEA;;;;A;AAED;A;;AAEA;A;AAED;AACA;A;;;;;;;;;;AAKA;;;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;A;;;;;AAMA;AACA;A;;;;;;;AAQA;;;;;;AACA;;AAgBA;AAMA;A;AAEC;A;A;AAMA;AACA;A;AAKC;A;A;A;AAQE;A;AACF;AACA;A;A;AAIF;A;;;;;;;;;;A;;;;;;;A;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAKA;;A;;;;;;;AAKA;;A;;;;;;;AAKA;;A;;;;;;AAMA;A;;;;;;AAMA;;;AACA;A;;;;;;AAuCI;AACJ;AAEA;AACA;A;AAEC;A;A;AAMI;AACJ;AACA;AACA;A;AAGC;A;AAGA;AACA;A;AAGA;AAEA;AACA;A;AAGA;AACA;A;AAED;;;AACA;A;AAEA;AACA;AAEA;;;AAGA;AACA;A;AAIC;AACA;AACA;AACA;A;AAKC;AACA;AACA;A;A;A;A;AAMF;AACA;A;AAGD;A;;;;;;AASA;AACA;AACI;;;AACH;AACA;A;AAEC;AACA;A;AAED;AAPqB;A;A;AAUrB;AACA;A;A;;;;;A;;;AAQD;A;AAEC;AACA;A;AAEA;;AACC;AACA;AACA;A;A;AAGF;A;;;;AAIuC;A;;;;;AAavC;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;A;AAOC;A;AAED;A;;;;AAMA;A;;;;A;AAWC;A;AAED;A;AAEC;A;AAEC;A;AAEE;A;AACF;A;AAED;A;A;AAGA;A;AAEE;A;AACF;A;AAED;A;;;;;AAKA;AACA;A;AAEC;AACA;A;AAEA;AACA;A;AAED;AACA;A;AAEC;A;AAGC;A;AAEA;A;A;AAGF;A;;;;;A;AASC;AACA;AACA;A;AAEC;A;A;AAGA;A;AAED;A;AAED;A;AAIC;A;AAEA;A;AAEA;A;A;;;;AAOD;A;;;;;;AAkBA;;;;;AACA;;;;;AACA;;A;;;;;;;;;;;A;;;;;;;;A;;;;;;;;;AAsBA;AAGA;AACA;AACA;AAMA;AACA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AACA;AAEA;AACA;A;AAGC;A;AAGD;A;A;AAME;A;AAGA;AACA;AACA;A;A;AAMF;AACA;AACI;A;AAEH;AACA;A;AAEA;A;AAGD;AACA;AACA;A;;;A;AAwBC;A;AAED;A;;;AAQA;;;;AACA;A;AAEC;A;AAED;A;;;;AAIA;A;;;;AAKA;AACA;A;;;;;AAKA;AACA;A;;;;;A;AAUC;A;AAED;AACA;A;;;;;AAKA;A;AAEC;A;AAED;A;;;;;;;;AAMA;;;;AACA;A;;;;;;AAOA;A;;;;;AAUA;A;;;;;;AAOI;AAEJ;;A;AACC;A;;AAEA;;;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAGD;AACA;AACA;AAkBA;A;;;;;;;AAKA;A;AAEC;A;A;AAIA;A;A;AAIA;A;AAGD;AACA;AAGA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;;A;AACC;A;;AACS;;;A;AACT;A;AAEA;A;A;AAGD;A;;;;;;;AASA;;A;;;;;;;AAKA;;A;;;;;;;AAMG;;A;AAGF;A;AAGD;AACA;AACA;;AACA;AACA;A;;;;;;;A;AAQC;A;AAGG;AACJ;;;;AACA;A;;;;;;;AAMG;;A;AACF;A;AAGD;AACA;;A;;;;;;;AAOI;AACJ;;;;AACA;A;;;;;A;AAUC;AACA;AACA;A;AAEC;AACA;A;A;AAGF;A;;;;AAIA;A;;;;;A;AAQC;AACA;AACA;A;A;AAGA;AACA;AACA;A;A;;;;;A;;;;A;AAuBA;A;AAID;AACA;;;AACA;AAGA;;;AACA;;;AACA;;;AACA;;;AAEA;AAKA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AAGA;A;AAEC;A;AAID;AAGA;AACA;AAEA;AAMA;;;;;AACA;;A;AACQ;AACP;;;A;AACC;;;A;A;AAEA;;;A;A;AAED;A;AAGD;AACA;AACA;A;;;;;;AAWA;A;AAEC;A;AAED;;AACA;A;;;;;AAYA;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;;AAOA;AACA;AACA;A;AAGC;AACA;AACA;A;AAEC;AACA;A;A;A;AAOD;AACA;A;AAIA;AACA;AACA;A;AAQA;AACA;AACA;AACA;AACA;AACA;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAKD;AACA;;AACC;A;AAED;AACA;AACC;A;AAGC;AACA;;;;A;AAEC;A;AAED;A;A;AAGA;A;AAED;AACA;AACA;A;AAED;A;A;AAUA;AACA;A;AAED;A;;;;;A;ACx6CC;A;AAED;;A;AACC;A;AAED;A;;;;;;;AAMA;;A;;;;;AAMA;AAOA;AACA;A;;;;;;;;;;AAWA;;A;AAGC;AACA;AACA;AACA;AACA;A;AAGE;A;AACF;AACA;AACA;AACA;AACA;A;A;AAIA;AACA;AACA;AACA;A;AAEC;A;AAEA;A;AAED;A;AAKD;AACA;AACA;AACA;AACA;;AACC;AACA;A;AAEC;AACA;A;AAEA;A;A;AAGF;AACA;AACA;AACA;AAEA;A;;;;;;A;AAqBC;A;A;AAKI;;;A;AAEF;A;AAFyC;A;A;AAQ5C;;;;;A;AAEE;A;A;;AAKF;A;;;;;AAMA;;;;;A;AAEE;A;A;;AAGF;A;;;;;;;;AAOA;;AAQA;;;;;AACC;AACA;;A;AACC;;;;A;A;;;;;A;A;A;;AAQF;;;;;AACC;A;A;;;;;A;A;;AAOD;A;;;;;;;;;;;;;;;;;;A;A;A;A;A;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3OwC;A;;;;;A;;;;;AAIX;A;;;;;A;AAI5B;A;AAED;A;;;;;AAGoD;A;;;;;AAEC;A;;;;;A;AAIpD;A;AAED;A;;;;;AAGiD;A;;;;;AAEC;A;;;AAIhB;A;;;;AAES;A;;;;AAEI;A;;;;AAEC;A;;;;;AAUhD;;A;AACC;AACA;AACA;;A;A;A;;;;;;A;AASD;A;AAEC;A;AAGD;AACA;AACA;A;AAEC;A;A;A;;;;;A;ACnDA;A;AAED;A;;;;AAUyC;A;;;;;AACA;A;;;;;AACA;A;;;;AAIzC;;AACC;A;AAEC;AACA;A;AAED;AACA;A;A;;;;ACFD;AACC;A;AAEC;A;AAED;A;AAEC;A;A;AAGA;A;A;A;;;;;;AAQF;AACC;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AACA;;A;AAGC;;AACC;AACA;A;AAED;;AACC;AACA;A;AAED;A;A;A;;;;;;;AAQF;AACC;A;AAEC;A;AAED;A;AAEC;A;A;A;;;;;;AAQE;;;;;;AACA;A;AAEH;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;A;AAED;AACC;A;AAEC;A;AAEG;A;AAGH;A;AAEC;A;A;AAID;A;AAEC;A;A;AAGF;;A;A;AAEE;A;AAED;A;A;A;;;;;;;;AASE;;;;;;AACA;A;AAEH;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;A;AAED;AACC;A;AAEC;A;AAGD;A;AAEC;A;AAED;;A;AACC;;A;AACC;A;AAED;A;A;A;;;;;;;A;AAaD;A;AAED;A;;;;;;AAOA;;A;AACC;;A;AAED;A;;;;;;;AAMA;;;A;AACC;A;AAED;A;;;;;;;AAOA;;;A;AACC;;A;A;;;;;;;;AAOD;;;A;AACC;A;AAED;A;;;;;;;AAOA;;;A;AACC;;A;A;;;;;;;A;ACxOA;A;AAED;A;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;A;ACCC;A;A;AAGA;AACA;A;AAED;A;AAIC;A;AAED;A;;;;;;AAQA;AACA;;AACA;AACA;AACA;A;;;;;;;AAMA;;;A;AACC;A;AAQD;AAIA;;AAQA;;A;AACC;A;AAGD;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AAIA;AACA;A;;;;;;;AAYG;;A;AACF;A;AAED;A;AAOC;A;AAEE;A;AACF;A;A;AAGA;A;AAED;AACC;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAOD;A;A;AAGF;AACA;A;A;;;;;;;;AASE;A;AACF;A;A;AAGA;A;AAED;;;A;AAEC;A;AAED;;AACA;AACA;A;;;;;;;AAKG;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAIH;AACA;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;;;A;A;AAIK;A;AACF;A;A;A;AAIH;AACA;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAEG;AACJ;AACC;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;A;AAGG;A;AACF;A;A;A;AAID;A;A;AAGA;A;A;A;;;;;;;;AAUC;A;AACF;A;AAED;AACI;AACJ;AACC;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;A;;;;;;;;AAOC;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;A;AAEI;A;AACF;A;A;A;AAID;A;AAED;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;A;AAEI;A;AACF;A;A;A;AAID;A;AAED;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AAEG;A;AACF;A;AAED;AACC;;;;;;A;AAEC;A;A;A;A;AAKI;A;AACF;A;A;A;AAOF;A;AAED;A;A;;;;;;;;AAME;A;AACF;A;AAED;AACA;A;;;;;;;AAOG;A;AACF;A;AAED;AACA;AACC;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAKH;A;A;;;;;;;;AAME;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;A;AAUC;;;A;A;AAGC;A;AAKA;A;AAEA;A;A;AAGF;;A;;;;;;AAMA;AACA;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;;AAKG;A;AACF;A;AAED;AACA;;A;;;;;;AAOA;A;;;;;;AAKG;;A;AACF;A;AAED;AACA;A;;;;;;;AAMG;A;AACF;A;AAED;AACA;AACA;A;;;;;;;AAKG;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;A;AACC;A;AAEE;A;AACF;A;A;A;;;;;;;;AAOC;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;A;AACC;A;AAEE;A;AACF;A;A;A;;;;;;;;AC5hBC;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;ACtBG;A;AACF;A;AAED;AACA;A;;;;;;;ACJG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;ACFA;;;;;A;AAEC;A;A;AAGA;A;AAEE;AAAH;;A;AACC;;AACA;A;AAED;A;;;;;;;AClBG;;A;AACF;A;AAED;AACG;A;AACF;A;AAGG;A;AAEH;A;AAKD;AAEI;AACA;AACJ;;AACC;AACA;;;;;A;AAEE;;A;AAED;A;AAEC;AACA;A;AAED;A;AAEC;A;A;;A;AAID;A;AAED;AAEA;;;A;AAKC;A;AAED;AACA;AACA;A;AAEI;A;AACF;A;A;AAGD;A;A;AAGA;A;A;AAGA;AACA;A;A;AAGF;A;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A;;;;;;;;;;;;;A;;;;;A;;;;;A;;;;;;;;;;;;;ACvCA;A;AAEC;A;AAED;A;;;;;AAmBG;AAAH;;A;AACC;A;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvDD;A;;;AAIG;A;AACF;AACA;AACI;;;AACH;AADgC;A;A;A;AAKjC;A;A;;A;;;;;A;ACAA;A;AAED;;A;;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;;;;ACLA;A;AAEC;A;AAED;;;;AACA;AACA;;;;;AACC;;;;A;AAIC;;A;A;A;;;;;A;AAKD;A;;A;AAKA;A;A;;;;;A;;;;;;;;;A;AAQA;AAEA;A;AAED;AAEA;A;AAEC;AACA;A;AAGD;AACA;;AAEC;;A;AACC;AACI;AACJ;;;;AACA;A;A;;;;;A;A;AAKC;A;A;AAKE;;;;AACJ;;;;AACA;AACA;A;A;A;;;;;A;A;;;;;A;;;;;;;ACjDmC;;A;;;;;;;AAIpC;;;AACA;;;;A;;;;;;;AASuC;;A;;;;;;;AAIvC;;;AACA;;;;A;;;;;A;AAQC;A;AAED;A;;;;AAcA;A;;;;AAmBA;A;A;AAEC;A;A;AAEA;A;A;AAEA;A;AAED;A;;;ACzFG;;A;AACF;A;AAED;A;;;ACAA;AACA;A;;;;ACgC8B;A;;;;;;AAgD9B;;A;;;;;;;;;AAOG;A;A;;;;;A;AAGH;;;;A;;;;;A;;;;;;;;;AASG;A;A;;;;;A;A;A;;;;;A;AAQH;;AACC;;;;A;AAEC;AACA;A;AAED;AACA;AACA;A;AAED;A;;;;;;;;;AAOG;A;A;;;;;A;AAGH;;;;A;AAEC;A;A;AAGA;A;AAGD;A;AAGC;A;A;;;;;A;;;;;;;;;AAUE;A;A;;;;;A;A;A;;;;;A;AAQH;;AACC;;;;A;AAEC;AACA;A;AAED;AACA;AACA;A;AAED;A;;;;;;;;;AASG;A;A;;;;;A;AAGH;;;;A;AAEC;A;A;A;;;;;A;A;;;;;A;;;;;;;;;A;;;;;A;;;;;;A;AAkHA;A;A;AAGA;A;AAED;A;;;;;;AAyF2C;;A;;;;;;AAyB3C;A;;;;;AAQA;A;;;;;AAUA;A;;;;;;;;AChaA;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAGD;A;;;;;AAaG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAoCG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAOG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAOG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAuBG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;A;AAOC;A;AAED;A;;;;;;A;ACpIC;A;AAQD;;A;AACC;;A;AAGD;A;;;;;AASA;AACG;;;A;AACF;A;AAED;A;;;;AAiBA;A;AAEC;A;AAED;AAUA;A;AASC;A;A;AAOI;AACD;A;AACF;A;A;AAIC;A;A;AAUC;A;AACF;A;A;AAIF;AACA;A;;;A;AAeC;A;A;;;;;A;AAsDA;A;AAED;;A;;;;;;;A;AAKC;A;AAEG;AACD;;A;A;AAED;A;AAED;A;AAID;AACA;A;;;;;;;;;AAMA;;;;AACA;A;;;;;A;;;;;;;;;AAQA;;;;AACA;A;;;;;A;;;;;;;;;AAOA;;;;AACA;A;;;;;A;;;;;;;;;AAOA;;;;AACA;A;;;;;A;;;;;;;;;AASA;;;;AACA;A;;;;;A;;;;ACnRA;A;;;AAIA;A;;;ACOA;AAEA;;AACC;AAD8B;A;AAI3B;A;;A;AAEF;AACA;A;AAHe;A;AAOjB;A;;A;ACdC;A;AAED;A;;;A;AAyCC;A;AAED;A;;;;;AC5CA;AACA;A;;;;;ACTA;AACA;AACA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAIA;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;;;AAKD;A;;;;;;A;AC5BC;A;AAEG;AACJ;;A;AAEC;A;AAED;AACA;A;;;;;AAgBI;AACJ;A;AAEC;A;AAED;AACA;A;;;;ACoBI;AACJ;AACA;;;;;;;A;AAEE;AACA;A;A;;A;AAID;AACA;A;AAGD;;;;;;;A;AAEE;A;AAEA;A;AAED;A;;AAED;A;;;;;AAMA;A;;;;;AAMA;A;;;;;AAKA;A;;;;;AAGmC;A;;;;;AACA;A;;;;;ACrFM;A;;;;;AACA;A;;;;;AACA;A;;;;;AACA;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A;A;A;A;A;A;A;;ACPJ;A;A;A;A;A;;;;;;;;;;ACWF;A;;;;A;AAwBlC;A;AAED;A;;;;A;AAoBC;A;AAGD;A;;;;A;AAMC;A;AAaD;A;;;;AAwHA;A;;;;AAKA;A;;;;;A;AA8FC;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;;A;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACpTA;A;AAEG;;;AACH;A;AAEC;A;AAED;A;AAEC;A;A;AAGA;A;AAVuB;A;AAazB;A;;;;;A;AAKC;A;A;A;A;A;;;;;A;A;A;A;;;;;A;A;A;A;;;;;A;A;A;A;;;;;A;A;AAIA;A;AAkBD;A;;;;;AAIA;AACA;AACA;A;AAIC;A;A;AAIA;A;AAEA;AACA;A;AAID;AACA;AACA;;A;A;AAIG;A;AAED;AACA;AAPgB;A;A;AAWhB;A;AAEC;AAbe;A;A;A;AAiBf;AACA;A;AAEA;A;AApBe;A;A;AAwBjB;A;A;AAGA;A;A;AAGA;A;A;AASA;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAGA;A;AAED;AACA;;A;AAEE;A;AAF8C;A;AAKhD;A;A;AAIA;A;AAGD;AACA;A;;;;;;;;;AAQA;A;AAIC;A;A;AAIA;A;AAEA;AACA;A;AAID;AACA;AACA;AACA;AACA;AACA;;AACQ;A;A;A;AAGL;A;AAED;AACA;AAPgB;A;A;AAWhB;A;AAEC;AAbe;A;A;AAgBhB;A;AAEC;AACA;AACA;A;AAEA;A;AAtBe;A;A;AA0BjB;A;A;AAGA;A;A;AAGA;A;A;AASA;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAGA;A;AAED;AACA;;A;AAEE;A;AAF8C;A;AAKhD;A;A;AAIA;A;A;AAIA;A;AAED;AACA;A;;;;;;;AAQI;AACA;AAGJ;;A;AACC;AACA;AACA;A;AAMD;;A;AACC;A;AAED;;A;AAEC;AACA;AACA;A;AAID;AACA;;AACK;A;AAEH;A;AAEA;A;AAED;AACA;A;AAED;;AACK;A;AAEH;A;AAEA;A;AAED;AACA;A;AAID;A;AAMC;AACA;AACA;A;AAGD;;A;AACC;A;AAID;AACA;AAGA;;A;AACC;AACA;AACA;;A;AACC;A;A;A;AAMD;A;AAED;AAED;AAEC;AACA;AACA;AAED;AAEC;AACA;A;AAEC;A;A;;;;;A;;;;;;;A;AAsBA;A;AAED;A;AAEC;A;A;A;;;;;A;A;AAYC;AACA;A;A;AAIA;A;A;;;;;A;A;;;;;A;AAMF;A;;;;;A;AAOC;A;AAED;A;AAEC;A;A;A;;;;;A;A;AAWC;AACA;A;A;AAIA;A;A;;;;;A;A;;;;;A;AAMF;A;;;;;AAMG;;;A;A;;;;;A;A;AAMF;;;;;;A;A;AAIK;;;A;A;;;;;A;A;AAKJ;AACG;A;AACF;;;AACA;A;AAEC;A;A;;;;;A;A;A;AAMA;A;A;;;;;A;AAIJ;;;AACA;A;AAEC;A;A;;;;;A;;;;;AAME;;;A;A;;;;;A;A;AAMF;;;;;;A;A;AAIK;;;A;A;;;;;A;A;AAKJ;AACG;A;AACF;;;AACA;A;AAEC;A;A;;;;;A;A;A;AAMA;A;A;;;;;A;AAIJ;;;AACA;A;AAEC;A;A;;;;;A;;;A;AAwBA;;;AACA;A;AAED;A;;;;;;ACngBA;;A;;;;;AAIA;A;;;AAIA;A;;;AAIA;A;;;AAIA;A;;;A;AAeC;A;AAGD;A;A;A;A;AAUG;A;AAED;AACA;A;AAEA;AACA;A;AAEA;A;A;AAID;A;A;AAIA;A;AAEA;A;AAKG;A;A;AAGH;A;AAEA;A;AAEA;A;AAGD;AAEI;AACJ;;;;;AACK;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAIA;A;A;AAKA;A;AAED;AAEA;A;AAGC;A;AAED;A;;AAGD;A;;;;;;A;A;;;;;A;AA+BA;AACA;A;AAEC;A;AAEA;AACA;A;AAIG;AACJ;;;A;AAEC;AACA;A;;;;;A;A;AAKA;A;AAGD;A;A;;;;;A;A;A;;;;;A;AAOA;A;AAEC;A;A;;;;;A;;;;;AC7KD;A;AAEC;A;A;AAGA;A;AAGD;AACA;A;AAGC;A;AAIA;AACA;AACA;AACA;AACA;AACA;A;AAIA;AACA;AACA;AACA;A;AAIA;AACA;A;AAED;A;;;;AAIA;;;;;AACC;A;;AAED;A;;;AAOA;;AACC;A;A;AAGA;A;A;;;;AAMG;AAGJ;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAID;AACI;A;;AACH;AACA;AAFgB;A;AAIjB;AACA;A;;;;AAUA;AACA;AAGI;AACJ;;A;A;AAIG;AACA;A;AAED;;AACC;AACA;A;AAED;A;AAED;AACA;AAdgB;A;AAgBjB;AAEI;AAGJ;;AACC;AACA;AACA;AACA;AACA;AACA;AANe;A;AAUhB;;AACC;AACA;A;AAEC;AACA;A;AAEA;A;AAED;A;AAGD;AACA;A;;;AAiGI;;;A;AAEF;A;A;AAGA;A;AALsB;A;AAQxB;A;;;AAKA;A;AAEC;A;AAGD;AACA;AAGI;AACA;A;;AACH;AACA;AACA;AACA;A;AAEC;A;AAEA;A;AAED;AAVgB;A;AAcjB;;AACC;AACA;AACA;A;AAEC;A;AAEA;A;AAED;A;AAGD;A;AAEC;A;AAED;AACA;A;;;;A;A;AASC;;AACC;AACA;A;AAED;A;AAEA;;AACC;AACA;A;AAED;A;A;;;;A;AAOA;A;A;A;AAKC;A;AAED;A;AAGD;A;;;;A;AASC;A;A;AAGA;A;AAEA;A;A;;;;;A;AAOA;A;AAED;AACA;A;;;;;A;AAMC;A;AAIG;;;AACH;A;AAEC;AACA;AACA;A;AALuB;A;AAWzB;AACA;AACA;A;;;;;A;AAOC;A;AAEG;AACJ;AACI;;;AACH;AADgC;A;AAGjC;;AACC;AADe;A;A;AAIf;A;AAED;A;;;;;;;ACzRA;AAEA;A;AAIC;AACA;AACA;A;AAID;A;AAGC;A;A;AAKA;AACA;A;A;AAMA;AACA;AACA;A;AAGA;A;AAGD;AACA;A;AAEC;A;AAED;A;;;;;;;AAQA;AACA;AACA;A;AAGC;AACA;A;;;;;A;AAGD;AAEA;A;AAEC;A;AAEA;A;AAED;A;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;A;;;;;AAMA;;;;AACA;;;;AAGA;AACA;AAGA;AACA;AAEA;AAEA;AACA;A;;;;;;AAeA;A;AAGC;A;AAGD;AACA;AACA;AAGA;A;A;;A;AAIA;A;AAKC;AACA;A;AAEA;AACA;AACA;A;AAID;A;AAEC;A;AAED;AAGA;AACA;AAQA;AACI;A;AAGH;A;AAEA;A;AAGD;AACA;A;A;;A;A;;A;;;;;;;AA0BA;AACA;AAEA;;AACC;A;AAGC;A;AAEA;A;AAEA;A;A;AAKF;A;;;;;A;;;;;AAOA;;;AACA;AACA;AACA;A;;;;A;AAQC;AACA;AACA;AACA;A;A;AAGA;A;AAID;AACA;;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AACI;;;;;;A;AAEF;AACA;A;AAED;AALmC;A;AAOpC;A;AAGC;AACA;AACA;A;AAEA;A;AAIG;AACJ;AACI;;;AACH;AACA;AACA;AACA;AACA;A;AAEG;;;AACH;AAD2B;A;AAG5B;AACA;AACA;AACA;A;A;AAIE;A;AAID;;AACC;AACA;A;AAGC;A;AAED;AACA;AACA;AACA;AACA;A;AAED;A;AAkBD;A;AAEC;A;AAGG;;;A;AAEF;AACA;A;AAHyB;A;AAM3B;A;;;;A;AAaC;A;A;AAGA;A;A;AAGA;A;A;AAIA;AACA;;A;AAEE;A;AAEA;A;AAJY;A;A;AAQb;AACA;AACA;A;AAEA;A;AAED;A;AAED;A;;;;A;AASC;AACA;AACA;AACA;A;A;AAII;AACJ;AACI;;;AACH;AACA;AACA;AACA;AACA;A;AAED;AACI;;;AACH;AADmB;A;AAGpB;;;;AACA;;AACC;A;A;AAGA;A;AAED;AACA;A;AAED;A;AAGC;AACA;A;A;AAGA;AACA;A;AAGD;AAEA;AACA;AAIA;AACA;AACA;AAGA;AAEA;AAGI;AACA;;;;;;A;AAEF;AACA;A;AAED;AALmC;A;AAOhC;;;AACH;AACA;AACA;AACA;AAEG;A;AACF;AACA;AACA;AAGA;A;AAZ6B;A;AAe/B;AACA;AACA;AAII;AACJ;AACA;AACC;AACA;AACA;AACA;AACA;AACA;A;AAKC;A;A;A;;;;A;AAcD;A;AAED;;A;AACC;AACA;A;A;AAIA;A;A;AAIA;A;A;AAIA;AACA;A;AAED;A;;;ACplBA;A;;;;AAII;AACA;A;A;AAGH;AACA;A;AAEA;AACA;A;AAEA;A;AAGD;AACA;AACA;A;A;AAKK;A;AAGH;A;AAEA;A;AAEA;A;AAED;A;AAIA;A;AAIA;A;AAED;A;AAIC;A;A;AAIA;A;AAGG;AACJ;AAEA;A;AAGC;AACA;;;AACI;AACJ;AACA;A;AAEC;A;A;A;AAKA;A;AAEA;A;AAEA;A;A;AAID;A;A;AAGC;A;A;AAGC;A;AAED;A;A;AAII;AACJ;AACA;AACA;A;A;A;AAID;A;AAED;A;;;AAKA;AACA;AACA;AACI;AACJ;A;AAEC;AACA;A;A;AAIC;A;AAEA;A;AAEA;A;A;A;A;AAMA;A;AAEA;A;A;AAGC;A;AAED;A;AAED;A;AAED;A;;;A;A;AAMC;A;AAEA;A;AAGA;A;AAEC;A;A;AAMA;A;AAED;A;A;AAGE;A;AAED;A;A;AAGA;A;AAED;A;AAID;A;;;A;AAQC;AACA;A;AAiBD;A;AAGC;A;AAMD;AACA;AACA;AAQI;AACA;A;AAEH;AACA;A;AAEA;AACA;A;AAED;AACA;AACA;AAKA;AAII;;;AACH;A;AAEC;A;AAED;AACA;A;AAEC;A;AAMD;AAIA;A;AAMC;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AA/BoB;A;A;;;A;AA8CrB;A;AAID;A;AAEC;A;AAED;A;AAIC;AACA;AACA;A;AAEC;AACA;A;AAED;;AACC;AADgB;A;A;AAMlB;AACA;A;AAEC;A;A;AAGA;AACA;A;AAEA;A;AAED;A;AAKC;A;AAEA;A;AAEA;A;AAGD;A;;;A;AAOC;A;A;AAKA;AACA;AACA;;AACC;AADe;A;A;AAIhB;A;A;AAKA;AACI;;;AACH;AACG;A;AACF;A;AAED;AALqB;A;A;AASvB;A;;;A;AAOC;A;AAID;;AAGA;AAGA;A;AAEC;A;AAED;;AAEA;A;;;A;AAKC;A;AAED;A;;;A;AAKC;A;AAED;A;;;A;AC1aC;A;AAED;;AACA;A;;;;AAKA;A;;;;A;AA0BC;A;AAED;A;;;;;A;AA4BC;A;AAIG;AACJ;A;AAGC;A;A;A;AAYC;;AAIC;AACA;AACI;;;AACH;AACA;AACA;AACA;AACA;AALkB;A;AAUnB;AACA;AAEA;A;A;AAMF;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;AAEC;AACA;A;A;AAOD;AACA;AACA;AACA;;AACC;AACA;AACA;A;AAGD;AACA;A;AAGA;AACA;;AACC;AAIA;AACA;AACA;A;AAGD;AACA;A;A;AAKA;AACA;A;A;AAIA;AACA;A;AAED;AACA;A;;;AAIA;A;;;AC3LA;A;;;AAQA;AACI;;;AACH;AACA;A;AAEC;;;A;A;AAGA;AACA;AACA;AAT0B;;A;AAY3B;AAZ2B;;AAc5B;AACA;A;;;AAIA;A;AAEC;A;AAED;AACA;AACA;A;;;AAII;A;AAEH;AACA;AACA;A;A;A;AAIC;AACA;A;A;AAGD;AACA;AACA;A;A;A;AAIA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAIC;AACA;AACA;A;AAEA;AAGA;AACI;;;AACH;AADoB;A;A;AADrB;AACI;;;AACH;AADoB;A;A;AAIrB;AACI;;;AACH;AADoB;A;A;A;AAKvB;A;;;AAQA;A;;;;AAMA;A;;;;AAaA;A;;;;AA0BA;A;;;;AAcA;A;;;;AAqBA;;AACC;;;AACA;A;A;AAGE;A;AAED;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;AAIA;A;A;;;;;A;A;;;;;A;A;;;;;A;AASA;A;;;;;;;A;AAoBC;AACA;A;AAEM;A;AAEN;AACA;A;AAEA;;;A;;;;;;;;;A;A;;;;;;;;;A;A;AAQA;AACA;A;AAED;AACA;AAEA;A;A;AAEC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEG;A;AAEH;AACA;A;AAEG;;;AACH;;;A;AAEC;AACA;A;AAED;AANkB;A;AAQnB;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;AACA;A;AAEA;A;AAEC;AACA;A;AAEG;;;AACH;A;AAEC;AACA;A;AAED;AANkB;A;AAQnB;A;AAEC;AACA;A;AAED;A;AAEA;A;A;AAGC;AACA;A;AAED;A;AAEA;AACA;A;A;AAED;AACA;A;;;;AASA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;A;AAIE;A;A;AAIA;AACI;;;A;AAEF;A;AAFsB;A;AAKxB;A;AAED;A;A;AAGA;A;A;AAGA;A;A;A;A;A;AAQE;A;A;AAGD;;;A;AAEC;A;A;A;AAKC;AACJ;AACA;;AACC;;;;;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAIA;A;A;AAGF;A;;;;AAKI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AAMA;;;;AACA;;AACC;A;AAEC;A;AAEA;A;A;AAGF;A;;;AAMA;;;;AACA;;AACC;A;AAEC;A;AAEA;A;A;AAGF;A;;;A;A;AAiBE;A;A;AAIA;A;AAED;A;A;AAUA;;;;;;AACA;A;AAEC;A;AAED;AACA;A;AAGD;;;;;;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;A;AAmBC;A;AAED;AACA;AACA;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxgBA;;A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;A;;;;;AAIA;A;;;A;AAKC;AAKA;AACA;AAEA;A;AAEC;A;AAEC;A;AAEG;AACA;;;AACH;AACA;A;AAFmC;A;A;AAMnC;AANmC;A;AAWpC;AACI;;;AACH;AACA;A;AAFmC;A;A;AAMnC;AANmC;A;AAWpC;AAMA;AACA;A;A;A;AAKA;A;AAKA;A;AAEC;A;A;AAGA;A;AAED;A;AAKA;AACA;AACA;;;;;AACC;A;;AAED;AACA;AACA;;;;;AACC;A;;AAED;A;AAEC;A;AAED;A;AAQA;AACA;AACA;;;;;AACC;AACA;A;;AAKD;A;AAMA;A;AAKA;A;AAIA;A;AAIA;AACA;AACA;;;;;AACC;AACA;A;AAEC;A;AAED;A;;AAMD;A;A;AAQF;A;;;AAIA;AACA;A;;;;AAaA;A;;;;;AAIA;A;;;;;AAMA;A;;;;;AAaA;A;;;;;AAIA;A;;;;;;A;;A;;;;;;A;;A;;;;;AAiBiC;A;;;;;AACA;A;;;;AAGjC;AACA;AAKA;A;;;;AAQA;A;;;;AAIA;AACA;AACA;A;;;;AAMA;A;;;;AAIA;AACA;AACA;A;;;AAII;AACJ;AACA;A;;;AAIA;A;;;AAIA;AACI;;;AACH;AACA;AAFgC;A;A;;;;AAOjC;;AACA;;;;;;;;;A;AACC;;A;AAED;;A;;;;;;AAIA;;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAGD;;;AAAgH;;;A;;;A;;;;;A;AAK/G;A;A;AAGA;A;AAED;A;;;;;A;AAKC;A;AAED;;A;;;;;;AAYA;;;;;;;A;AACC;A;AAGD;AACA;;;;;;AACC;A;;AAED;AACA;;;;;;AACC;A;;AAED;A;;;;;;AAaA;A;;;;AAIA;A;;;;;AA2CA;;A;;;;;A;A;AAMC;A;AAEA;A;AAEA;A;A;;;;AAKD;;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;AAoCA;A;;;;A;;A;;;AAiBA;A;AAEC;A;AAED;AACA;A;;;AAIA;;AACA;A;AAEC;A;AAED;A;;;;AAIA;;;AACA;AACA;AACA;;;A;AACC;AACA;AACA;A;AAED;AACA;AACA;AACA;A;;;;;AAIA;;AACA;A;;;AAWA;A;;;;AAIA;AACA;AACA;;;;A;;;;AAIA;AACA;A;;;AAIA;A;;;;AAII;AACJ;;A;AACC;;A;AAGG;AACG;;A;AACP;;;;;A;AACC;AACA;AACA;AACA;AACA;A;A;AAEA;;;;A;AACC;;;A;AACC;AACA;A;AAED;AACA;;;;;AACA;A;AAED;A;A;AAEA;AACA;A;A;AAEA;A;;AAEA;A;A;AAED;;;A;;;;;AAIA;A;AAEC;A;A;AAGA;A;AAED;AAEA;AACI;AACJ;;A;AACC;;;;A;AAEC;A;A;AAGF;AAEA;;A;AACC;A;AAGD;A;AAEC;A;AAGD;A;AAEC;A;A;AAIA;A;AAED;A;;;;;;;;AAII;A;AAEH;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAEA;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAED;A;AAEC;A;AAED;AACA;A;;;;A;AAKC;A;A;AAGA;A;AAED;;A;AACC;;A;A;AAIA;A;AAED;A;;;;AAIA;A;;AAIA;A;;;;;;A;AAKC;A;AAGD;;AACA;A;AAEC;A;AAED;;AACC;A;AAED;;A;;;;;A;A;AAMC;A;AAEA;A;A;;;;;;A;AAMD;;;;A;AACC;A;AAEA;;A;AAEI;;;AACH;;;A;AACC;A;AAF4B;A;A;A;AAM/B;A;;;;;;;;;A;AAKC;A;;A;AAGD;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACC;A;;AAED;AACA;;;;;AACC;A;;AAED;;AACA;AACA;AACA;;AACC;AACA;A;AAED;AAEA;A;;A;;;;;;A;AAMC;A;A;AAGA;A;AAEC;A;A;AAEC;A;AAEA;A;A;AAGC;AACA;A;AAED;AACA;AACA;AACA;AACA;A;A;A;AAGF;A;AAED;A;;;;;;AAIA;;A;AACC;;A;AAID;;;;A;AAGC;AACA;AACA;A;A;AAIC;A;AAKD;;A;AAEC;A;AAEA;A;AAED;A;A;AAID;A;;;;;;;;AAOC;AACA;AACA;A;AAGA;;;AACA;A;AAEC;A;A;AAGD;AACA;AACA;A;A;AAIA;A;AAGD;AACA;A;A;AAGE;A;A;AAGA;A;A;AAGA;A;A;A;AAIA;A;A;AAGA;A;A;AAGA;A;A;AAGF;;;;;A;AAEE;A;A;;AAGE;;;AACA;;;;AAAH;;;A;AACC;;;A;AAFiB;A;AAKnB;;A;AAEC;AACA;;AACA;;AACI;;;AACH;AACG;AAAH;;;A;AACC;;;A;AAED;;AALkB;A;AAOnB;AACA;AACA;AACA;A;AAGD;A;AAEC;A;AAED;AAEA;AACA;;;;;;AACC;;;;;;;;;A;;AAED;;A;AAGA;;;A;AACC;A;AAEA;;A;AAEA;AACA;;;;;AACC;;A;;AAED;A;A;A;;;;;;;AAKD;A;A;AAGC;A;AAEA;A;AAED;A;;;;A;AAOC;A;AAED;A;;;A;AAKC;A;AAED;A;;;;;AAIO;A;AACP;;;A;AACC;A;AAEC;A;AAED;AACA;;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;AAGA;A;A;A;;;;;;;;;;;;A;AAMA;A;AAED;A;AAEC;A;AAGD;AACA;AACA;AAEA;A;A;AAGE;A;AAEA;A;A;AAIC;AAAH;;A;AACI;AAAH;;A;AACC;;AACC;;AACA;;A;AACC;AACA;AACuC;A;;AACC;A;A;AAGzC;;A;AACC;;A;A;A;A;AAMJ;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;;;;;AAIA;;AAEC;AACA;;AACC;A;AAED;A;AAEC;A;AAKD;AACA;;AACC;A;A;AAGA;A;AAED;AACA;AAGA;AACA;;A;AAEE;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAGC;;AACA;A;A;AAGF;A;;;;;;;;;;;AAIO;A;AACP;;;;A;AACC;A;AAEC;A;AAED;AACA;AAEA;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;AAGA;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;AAGA;A;AAEC;A;AAED;AACA;AACA;A;AAGA;A;A;A;;;;;;;AAKD;A;;;;;AAIO;A;A;AAEN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AAKM;A;A;AAEN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AAKM;A;A;A;AAGL;A;AAED;A;A;AAGC;A;AAED;A;A;AAGC;A;AAED;A;AAEA;A;A;;;;;;AAKD;AACA;AACA;;AACA;;A;A;AAEC;;;;A;AACC;A;A;AAEA;;A;A;AAEA;A;;AAEA;A;A;AAED;A;AAED;A;;;;;;;;AAIA;AACA;AACA;;;A;AACC;A;AAED;AACA;;;;;A;AACC;AACA;AACA;AACA;AACA;A;AAED;A;;;;;;;AAIA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;AAIA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;;AAKC;AACA;AACA;AAEM;A;AACP;;;;A;A;AAEE;A;AAED;AACA;AACA;AACA;A;A;AAGA;AACA;AACA;A;A;AAGA;A;AAEC;A;AAED;;A;AAGA;A;A;A;AAIA;A;AAGD;;A;;;;;;;AAKC;AACA;AACA;AAEM;A;A;A;AAGL;A;AAED;AACA;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;A;A;AAIA;A;AAGD;;A;;;;;;AAIA;AACA;AACA;A;;;;;;;AAMA;A;AAEC;A;AAED;;A;A;;;;;A;AAIA;AACA;A;;;;;A;;;;;AAKA;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;AAoCA;AACA;A;AAEC;A;A;AAGA;A;AAED;;;;;;;A;;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;A;A;AAKA;;;;;A;AAEE;A;A;;AAGF;A;A;AAID;;;;;;;;A;A;A;AAGG;A;A;AAGA;A;A;AAGE;A;AAEH;A;AAEG;;;AACH;;;;;;;;A;AACC;A;AAFiB;A;AAKnB;A;A;AAGC;A;AAED;;;;;;;A;AAEA;;;;;;;A;AAEI;AACA;;;AACH;;;;;;;;A;AACC;A;AAFiB;A;AAKnB;A;A;AAGC;A;A;AAGA;A;AAEG;;A;AAEH;A;AAED;;;;;AACC;;AACA;;AACA;;;;;A;AACC;A;A;;AAGF;A;AAEA;A;AAEA;A;A;AAGD;;;A;;;;;;;;ACt9CA;;A;AAEC;A;AAGD;A;A;AAGC;;AAAwB;A;A;AAExB;;A;AAEE;A;A;A;AAIH;AACA;AACA;;A;AAEE;A;AAED;AACA;AACA;AACA;AACA;A;A;;;;;;AC2YD;A;;;;;AAIA;A;;;;;A;AAqKC;A;AAED;A;;;;;AAiKA;A;AAEC;A;AAED;A;;;;;AAGgC;A;;;;;A;AAI/B;A;AAED;A;AAEC;A;AAED;A;;;;;AAG6B;A;;;;;AAEK;A;;;;;AAEL;A;;;;;AAII;A;;;;;AAGjC;A;AAEC;A;AAED;A;;;;;A;AAKC;AACA;A;AAED;A;;;;;;;;A;AAuCC;A;;;;A;AAGD;A;A;;;;;A;AAKA;;;;;;AACC;;A;A;;;;;;A;A;;A;;;;;A;;;;;;A;AASA;A;AAED;A;AAEC;A;AAED;A;;;;;A;AASC;A;AAED;AACA;AACA;;A;AAEE;A;AAED;A;AAED;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;A;AAMC;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAED;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;A;AAwCC;A;AAEA;A;AAEA;A;AAED;A;;;;;;A;AAMC;A;AAED;AACA;AACA;A;AAEC;A;AAEC;A;A;AAGF;AACA;AACA;A;;;;;AAIyC;A;;;;;;;A;AAKxC;A;AAEG;AACJ;;;;;AACC;A;A;;;;;A;A;;AAKD;A;;;;;AAmCA;;AACA;A;;;;;;;AAaA;;AAEC;AACA;;AACC;A;AAED;A;AAEC;A;AAOD;AACA;;AACC;A;A;AAGA;A;AAED;AACA;AAGA;AACA;;A;AAEE;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAGC;;;A;AAEC;A;A;;;;;A;A;A;;;;;A;;;;;;A;AAWF;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAEE;A;AACF;A;AAED;AASA;AACA;A;;;;;;;AAQA;AACA;;;;;;AACC;;A;AACC;AACA;;;;;;;A;AACC;;A;AAED;A;AAED;;A;;AAED;A;;;;;;;;;AAoBA;AACA;AAQI;AAOJ;AAEA;;AACC;;;;AACA;AACA;AAMA;;;;;AACC;AACA;;A;AAIC;;A;AAED;AACA;;;;;AACC;AAEA;AACI;AACJ;;A;AAEC;AACA;;A;AACC;;A;A;AAKF;;;A;A;A;;;;;A;AAMC;AACA;AACA;AACA;AACA;AACA;;A;A;AAOA;;A;AAED;A;AAEC;AACA;;A;A;AAGA;A;AAED;A;AAEC;A;AAEG;AACJ;AACA;AACA;A;;A;;A;AAID;A;A;AAGF;A;;;;;;;;;;AAOA;A;AAEC;;;;;AACC;A;A;;;;;A;A;AAKC;A;A;;A;A;AAKF;A;A;;AAE8C;A;;;;;A;;;;;AAgB/C;A;;;;;;A;AAwDC;A;AAED;;;A;AACC;A;AAED;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;A;AAUC;A;AAED;A;AAEC;A;A;AAgBA;AACA;AACI;;;AACH;AACA;AACA;AACA;A;A;AAGE;A;AAEC;A;AAED;A;AAEC;A;A;AAb4B;A;A;A;AAmB3B;A;AACF;A;A;AApB6B;A;AAwBhC;A;AAGD;A;AAEC;A;AAED;AACA;AACI;;;AACH;AACA;AACA;AACA;A;A;AAGE;A;AAEC;A;AAED;A;AAEC;A;A;AAb2B;A;A;A;AAmB1B;A;AACF;A;A;AApB4B;A;AAwB/B;A;;;;A;AAWC;A;A;AAMA;A;AAID;;A;;;;;A;AAKC;A;AAGD;;;;;;;;A;AACC;A;AAGD;;;;;;A;;;;;A;AAKC;A;AAGD;A;AAEC;A;A;AAMA;A;A;AAKD;;;;;;;;A;AACC;;;;A;AAMA;;;;;A;AACC;A;AAID;;;;A;AAGA;AACA;A;AAEC;A;AAEG;;;AACH;;;A;AACC;A;AAFyB;A;AAKvB;;;AACH;;;A;AACC;A;AAF0B;A;AAK5B;A;AAGA;AACA;A;AAEC;A;AAID;A;AAGA;;;;;A;AAGA;;A;AAGA;AACA;A;AAEC;A;A;AAGA;A;AAED;;;;;AACC;AACA;A;AAEC;A;AAED;;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;;AAGF;A;A;AAGD;A;;;;A;AAwzCC;A;AAED;A;;;AA+GA;A;;;;AC5+FA;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAOC;A;A;AAGA;A;AAED;A;;;;;A;AAiEC;A;AAED;A;;;;;A;AAyCC;A;A;;;;;A;AAQA;A;A;AAGA;A;A;;;;;A;AASA;A;A;AAIA;A;A;AAGA;A;A;;;;;A;AAWA;A;AAED;A;;;;;AAMA;AACA;A;;;;;;AAMA;AACA;;;A;AACC;A;AAGD;A;;;;;;;AAMA;AACA;;;A;AACC;A;AAGD;A;;;;;;AASA;A;;;;;AASA;A;;;;;;AAYA;AACA;AACA;;A;;;;;;;AAWA;AACA;AACA;;A;;;;;;AAwZA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;;AA6EA;;A;AACC;;A;AAED;AACA;;;;;;AACC;;A;AACC;;;;;A;A;AAEE;A;AAED;;A;A;AAGF;;A;;AAED;A;;;;;;;AAOA;AACG;;;;AAAH;;A;AACC;;A;AAED;A;;;;;;;AAQG;;;;AAAH;;A;AACC;;A;AAED;A;;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAsDA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;;;A;;;A;;;;;;AAwFA;A;;;;;AAMA;A;;;;;;AA8BA;AACA;AASA;;AAEI;A;AAEH;A;AAEA;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;AAEC;A;AAID;AACA;AACA;A;;;;;;;AAQA;AACA;AACA;AAEA;AAEA;AACA;A;AAEC;A;AAED;AACA;AACI;AACA;;;AACH;;A;AAKC;A;A;AAKA;AACA;AACA;A;AAEA;A;AAED;AAjBsB;A;AAmBvB;A;;;;;;A;AASC;A;A;AAGA;A;A;AAGA;A;AAED;AACA;AACA;AACA;A;;;;;A;AAMC;A;A;AAGA;A;AAED;A;;;;;;A;AAUC;A;A;AAGA;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;AAMA;AACA;AACA;A;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;A;AAKC;A;AAED;A;;;;AAMA;A;A;AAGC;AACA;AACA;A;AAED;A;;;;;AAMA;A;A;AAGC;AACA;AACA;A;AAED;A;;;;;;;;AAsDA;AACA;A;;;;;A;;;;;;;;;AAOA;A;AAEC;A;AAED;AACA;AACI;A;AAEH;AACA;AACA;A;AAEA;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAOA;AACA;AACA;;A;;;;;;;;;AAMA;A;AAEC;A;AAED;AACA;;AACI;A;AAEH;A;AAEA;A;A;;;A;;;;;;AA0BD;AACA;AACA;A;;;;;;AAiBA;AACA;AACA;;;A;AACC;A;AAED;A;;;;;;;AAMA;AACO;A;A;AAIN;A;AAEA;A;AAJA;A;A;;;;;AAWD;AACO;A;A;AAIN;A;AAEA;A;AAJA;A;A;;;;;AAWD;AACO;A;A;AAIN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAVA;A;A;;;;;;AA+CD;AACA;AACA;AACA;AACA;;AACI;A;AAEH;A;AAEA;A;A;AAGA;AACA;A;AAED;AACA;;AACI;A;AAEH;A;AAEA;A;AAED;A;;;;;;;AAMA;AACO;A;A;AAIN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAZA;A;A;;;;;AAmBD;AACA;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;;AA4HO;A;A;AAEN;A;AAEA;A;AAID;;A;;;;;;;;;AASA;AACA;A;;;;;A;;;;;;;AASA;AACA;AACA;;A;;;;;;AAKA;A;AAEC;A;A;AAIA;A;AAKD;A;AAGC;A;AAEC;A;AAED;AACA;A;AAGD;A;AAEC;A;AAED;AACA;A;;;;;AAMA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;A;AASC;A;A;AAGA;A;AAED;A;;;;;AAwCA;;A;AACC;;;A;A;;;;;;AAuTD;;A;;;;;;AAMA;;;A;AACC;A;AAED;AACA;AACA;A;;;;;A;AAkDC;A;AAED;AACA;AACA;AACA;A;;;;;;AAsDA;;A;AACC;;A;AAED;;;AACA;;A;AACC;;A;AAED;;A;;;;;;A;AAOA;;;;;;;A;A;A;AAGE;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;A;A;AAID;;;;;A;A;;A;AAGE;A;AAEA;A;A;A;A;A;AAKF;;;;;A;A;;A;AAGE;A;AAEA;A;A;A;A;A;AAMH;;;A;AACC;A;AAID;;;;;;;;;A;AAGC;A;A;A;AAKC;A;AAED;A;AAGD;A;;;;;AAwBA;;AACA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAMA;;AACA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAUA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAoBA;;;AACA;;AACA;;;A;AACC;A;;AAEA;A;AAED;;A;;;;;AAKA;;A;AACC;;AACA;AACA;A;AAED;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC55EA;A;;;;;AAIA;AACA;A;;;;;A;AAMC;A;AAED;AACA;AACA;A;AAGC;AACA;A;AAGD;A;AAEC;A;AAGD;AACA;;;;;AACC;A;;AAED;A;;;;;A;AAMC;AACA;A;AAED;A;AAGC;AACA;A;AAGA;AACA;A;A;;;;;A;AAOA;AACA;A;AAED;A;AAGC;AACA;A;AAGA;AACA;A;A;;;;;A;AAOA;A;AAEA;A;A;;;;;AAMD;AAKA;A;AAEC;AAEA;A;AAEC;A;A;AAKF;A;AAIC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAGD;;AACC;AACA;AACA;AACA;A;AAED;AACA;AACA;AAEA;;AACC;AACA;AACA;A;AAGD;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;;AAKA;A;AAEC;A;AAGD;A;AAKC;A;AAGC;A;A;AAOF;A;AAEC;A;AAGC;AACA;AACA;AACA;AACA;A;A;AAGD;A;AAEC;A;A;AAOF;A;A;AAKC;;AACC;AACA;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;A;AAED;AACA;AACA;;AACC;AACA;A;A;A;A;A;AAQE;AACA;A;A;AAID;AACA;AACA;AACA;A;A;A;AAKD;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAKD;AACA;AACA;AACA;A;;;;;A;AAMC;AACA;;;;;;AACC;A;AAEC;A;A;;A;AAIH;A;;;;;AAKA;AACA;A;;;;;AAKA;A;AAGC;A;A;AAIA;A;AAGD;A;A;A;AAKG;A;AAGD;A;AAGA;A;A;A;AAIA;A;AAED;A;A;AAIA;A;AAGD;A;AAGC;A;AAEG;AACA;;;A;AAGF;A;AAGC;A;A;A;AAID;A;AAEA;A;AAGD;AAfuB;A;AAiBxB;A;AAGC;A;A;;;;;AAMD;A;;;;;AAKA;A;;;;;AAOA;A;AAEC;AACA;A;AAED;A;AAEC;A;AAEA;A;A;;;;;AAOD;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAMA;A;AAEC;A;AAED;A;AAEC;A;AAEA;A;A;;;;;A;AASA;A;AAGD;A;AAEC;A;AAEA;A;A;AAKA;A;A;AAKA;AACA;A;AAGC;A;AAED;AACA;AACA;A;A;AAKA;A;A;AAGC;A;AAGC;A;A;AAME;AACJ;AAEA;AAEI;;;A;A;AAGF;A;AAEA;AACA;A;AAEA;A;AARwB;A;A;AAYzB;A;AAED;;AACC;AACA;A;AAED;A;A;A;AAOC;AACA;AACA;AACA;A;AAED;AACA;A;AAGD;A;;;;;AC3cA;A;;;;AAIA;A;;;;AAIA;A;;;;A;AAKC;AACA;A;AAGD;AACA;AACA;;AACC;A;AAED;AACA;A;;;;AAgCA;;AACA;AACA;AACA;AACA;A;;;;;AAKA;AACA;AACA;AACA;A;;;;;;;A;;;;;A;;;;;;;A;;;;;A;;;;;A;A;AAUC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;;;AAMA;A;;;;;A;;;;;;;AAOA;A;;;;;A;;;;;;;AASA;;AACA;AACA;;;;AACA;AACA;A;;;;;;;;A;;;;;A;;;;;;AAWA;;AACA;AACA;AACA;AACA;A;;;;;;AAMA;;;A;;;;;;AA0BA;;AACA;AACA;AACA;AACA;A;;;;;;;;AAWA;;AACA;AACA;;;;AACA;AACA;A;;;;;;;;A;;;;;A;;;;;;AAaA;;AACA;AACA;AACA;AACA;A;;;;;;AAOA;;AACA;;A;AACC;;A;AAED;A;;;;AAOA;A;;;;;;A;A;;;;;;;A;AAQI;;;A;A;;;;;;;A;AAIH;AACA;AALiE;A;AAOlE;A;;;;;A;AAKC;AACA;A;AAED;AACA;;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;AAEA;;;A;AACC;;AACA;AACA;A;A;AAEA;;AACA;AACA;A;;AAEA;A;A;AAED;AACA;A;;;;;;;;A;AAKA;;A;AACC;A;;AAEA;A;A;A;;;;;;;AAOD;AACA;AACA;AACA;A;;;;;;A;AAMA;;;;;;;;;;A;A;AAEE;A;AAEA;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;;A;AACC;A;;AAEA;A;A;A;AAGD;A;;AAEA;A;A;A;;;;;;;;A;AAQD;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;A;AAWD;;A;AACC;AACA;AACA;AAEA;AACA;AACA;AACA;A;;AAEA;A;A;A;;;;;;;;A;AAMD;;;;;;A;A;AAEE;A;AAEA;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;A;AAMD;;;;;;A;A;AAEE;A;AAEC;AACA;A;AAED;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;A;AAEA;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;;A;A;A;;;;;;;;AAKG;A;AAEJ;;A;AACC;A;;AAEA;AACA;A;A;A;AAID;;;;A;AACC;;A;AACC;AACA;;AACA;A;AAEC;A;AAEA;A;AAED;A;;A;AAGC;A;AAEA;A;A;A;A;AAIF;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;AAKE;AAAH;;A;AAII;;A;AACF;AACA;A;A;AAMA;A;AAGD;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;A;;;;;;;;;A;AAMA;A;AAGE;;;AAAH;;A;AACC;AACA;AACA;AACA;A;AAID;;A;AACI;;;AAAH;;A;AACC;AACA;AAEA;;AACA;A;A;;A;AAOD;;A;AAKC;;;;A;A;AAEC;AACA;AACA;;AACA;A;A;AAGA;AACA;AACA;;AACA;A;A;A;A;A;;A;;;;;;;AAQH;AACA;AAEA;;A;A;AAEC;;A;AACC;A;;AAEA;A;A;AAED;A;A;AAMD;;;A;AACC;;AACA;A;AAEA;;AACA;A;A;AAID;;;;;;;;;;;;;;;;;;;;;A;A;AAEC;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAIA;;A;AACC;;AACA;;;A;AACC;A;A;AAGF;A;;A;AAGA;;;A;AAGC;;A;A;A;;;;;;;;AASF;;A;AACC;;AACA;;;A;AACC;A;A;AAGF;AACA;AAEO;A;AACP;;;;;;;;;;;;;;;;A;AACC;;A;AACC;A;;A;AAGA;;A;AACC;A;;AAEA;A;A;A;A;A;AAIF;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;;A;A;AAEA;;A;AACC;;A;AAEC;AACA;A;AAED;A;;AAEA;A;AAED;;AACA;;;;;;A;A;AAGG;A;AAEA;A;A;AAGF;AACA;AACA;;A;;A;AAGA;A;AAEA;A;A;A;AAGD;;A;AACC;;A;AAED;AACI;;;A;A;AAGD;A;AAEA;A;A;AAGF;;A;AACI;;A;AACF;AACA;A;A;AAGF;;AAd6B;A;AAgB9B;A;A;AAEA;;AACA;;A;AACC;;A;AACC;;AACA;A;;AAEA;A;A;;AAGD;A;A;A;A;AAID;;A;AAEC;AACA;;;;A;AACK;AACJ;;;A;AACC;;A;A;AAEA;;;A;;AAKA;AACA;;;;;AACC;;;A;;A;AAGF;;;;;AACA;A;A;A;AAGF;;A;AACC;;A;AAEC;AACA;A;AAED;AACI;;;A;AAEF;A;AAED;;AAJwB;A;AAMzB;A;;AAEA;AACI;;;A;AAEF;A;AAED;;AAJwB;A;AAMzB;A;A;A;AAKD;;A;AACQ;;A;AACP;;A;AACC;AACA;AACA;A;A;A;AAKF;A;A;AAAA;A;;AAEA;A;A;A;;;;;;;;;;AAMD;AACA;;A;AACC;;;AACA;;A;AAEQ;;A;A;AAEN;A;AAEC;AACA;A;A;AAGD;A;AAEC;AACA;A;A;A;A;AAMH;A;AAEC;AACA;A;A;AAGF;A;;;;;;;A;A;;;;;;;A;AAgBI;;;A;AAEF;;;;A;A;;;;;;;A;A;;;;;;;A;AAF2B;A;A;;;;;;;A;;;;;;;A;A;;;;;;;A;AAmB7B;AACA;;;;A;A;;;;;;;A;AAIA;A;;;;;;;A;;;;;AAKA;AACA;AACA;A;;;;;AAIA;AACA;AACA;A;;;;;;AAIA;AACA;AACA;AACA;AAEI;;;AACH;AACA;AACA;;AACC;A;A;AAGA;A;A;AAIA;A;AAID;AAGA;AAEA;;AACC;A;AAEA;;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;AACA;A;A;AAEA;A;;AAIA;;A;A;AAGE;AACA;AAEA;AACA;A;AAED;AACA;AACA;AACA;A;AAGD;A;A;AAhCa;A;AAqCf;;;;AAGA;;A;AACC;AACA;;;;;A;AAGC;A;A;AAMA;AACA;AACA;A;AAED;A;;AAEA;;;;A;AAEC;A;A;AAKF;;A;AACC;A;AAEC;A;AAED;;;;AACA;;A;AACC;AACA;;;;;A;AAGC;AACA;A;A;AAGA;A;AAED;A;;AAEA;;;;A;AAEC;AACA;A;A;A;A;AAMF;;;;A;A;AAIA;AACA;A;AAGD;;;;A;AAEC;;;A;AAED;AAGA;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAGA;AACA;AAEA;AACA;AAGA;AACA;A;;AADA;AACA;A;A;A;AAOF;;A;AACC;AACA;AACA;;;;;;A;AAEE;A;AAED;;A;AACC;A;;AAEA;;AACA;AACA;A;A;;AAGF;A;A;;;;;;;;AAKD;AACA;;;;;;AACC;;;;A;AAGC;A;AAED;AACA;A;;A;;;;;;;;AAOD;;;;;;A;AAEE;A;AAED;A;;AAED;A;;;;;;;;;A;;;;;A;;;;;;;;;A;ACn8BC;AACA;A;AAGD;;;;;A;AAEC;A;AAEC;A;A;AAGD;A;AAED;A;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAaA;;;;A;A;A;;A;AAKC;A;AAED;A;;;;;;;AAeA;;AACA;AACA;AACA;A;;;;;;AAIA;A;;;;;AAIA;A;;;;;;;;;AAIA;;AACI;A;AACC;;;A;AACF;A;AAEA;A;A;A;A;AAKF;A;AAED;AACA;;AACA;A;;;;;A;AAoBC;A;AAED;AACA;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;AAKA;A;;;;A;AA2GC;AACA;A;A;AAIA;A;AAED;AACA;AACA;A;;;;;;AAOA;AACC;;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;A;A;AAEE;A;AAED;AACA;A;AAED;;A;AACC;;AACA;A;A;A;;;;;;;;AASF;;A;AACC;A;AAGD;AACC;;A;AAEC;A;AAED;;;A;AACC;;AACA;A;AAED;A;AAED;A;;;;;AAOA;;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AAwBA;;AACA;;A;AACC;;A;AAED;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;ADtX0B;A;A;A;AC2PA;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;ACzW1B;;AACA;;AACA;AACA;A;;;;;;;ACKI;;;AACC;;;;;;AACH;AADuC;A;AADlB;A;A;;;;;;AAUvB;AACA;AACC;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;;A;AACC;A;AAED;AACA;A;A;;;;;;AAKD;AACA;AACA;AAGI;;;AACH;AAD8B;A;AAK3B;;;AACH;AACA;AAFwB;A;A;;;;;;AAYzB;;;A;AACC;A;AAGD;;;A;AACC;AAEA;;;A;AACC;A;A;A;;;;;;;;AAaF;AACA;;A;AAEC;AACA;AACA;AACA;A;AAED;AASA;AACA;;;;AAEA;;;;;AAAoC;A;AAEpC;AACA;AACC;;;;;AAAqC;A;AAErC;;;;;AAAsC;A;A;AAGrC;A;AAGD;AACA;AACA;A;AAID;AACA;;A;AAEC;AACA;;;A;AACC;AACA;AACA;A;AAED;;;A;AACC;AACA;A;AAKD;;;A;AACC;AACA;AACA;A;AAGD;A;AAED;;A;AAKC;AACC;;;;;AAAuC;A;AAEvC;;;;;AAAoC;A;A;AAGnC;A;AAGD;AACA;AACA;A;A;AAIF;A;;;;;A;;;;;AAKA;;AACC;;A;AACC;AACA;A;AAED;AACA;;;;AAGA;;A;AACC;AACA;A;;AAEA;AACA;A;A;AAGF;;A;AAGK;;;AACH;;;A;AACC;A;AAFqB;A;AAKvB;A;A;;;;;;AAQD;;AACA;A;;;;;;AAMI;AACA;;;AACH;AADkB;A;AAGnB;A;;;;ACzNI;;;AACC;;;;;;AACH;AADuC;A;AADlB;A;A;;;;;;AASvB;AACA;AACC;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;;A;AACC;A;AAED;AACA;A;A;;;;;;AAMD;AACA;AACA;AACI;;;AACH;AAD8B;A;AAG3B;;;AACH;AACA;AAFwB;A;A;;;;;;AAQzB;;;A;AACC;A;AAED;;;A;AACC;AACA;;;A;AACC;A;A;A;;;;;;;;AAcF;AACA;;A;AACC;AACA;AACA;AACA;A;AAED;AACA;AACA;;;;AACA;;;;;AAAoC;A;AAEpC;AACA;AACC;;;;;AAAqC;A;AAErC;;;;;AAAsC;A;A;AAGrC;A;AAED;AACA;AACA;A;AAED;AACA;;A;AACC;AACA;;;A;AACC;AACA;AACA;A;AAED;;;A;AACC;AACA;A;AAED;;;A;AACC;AACA;AACA;A;AAED;A;AAED;;A;AACC;AACC;;;;;AAAuC;A;AAEvC;;;;;AAAoC;A;A;AAGnC;A;AAED;AACA;AACA;A;A;AAGF;A;;;;;A;;;;;AAMA;;AACC;;A;AACC;AACA;A;AAED;AACA;;;;AACA;;A;AACC;AACA;A;;AAEA;AACA;A;A;AAGF;;A;AACK;;;AACH;;;A;AACC;A;AAFqB;A;AAKvB;A;A;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHD;A;AAGC;A;AAED;A;AAGC;A;AAED;A;AAEC;AACA;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;AAKA;A;;;;;AAKA;A;;;;;AAOA;A;;;;;AAOA;A;;;;;AAOA;AACA;A;;;;;AASA;AACA;AACA;AACA;A;AAEC;A;A;AAWA;AACA;AACA;A;AAiBD;;AACC;A;AAGD;AACA;A;;;;;;AAUA;AACA;A;AAEC;A;AAED;AACA;AAGD;AACC;AACA;;A;AACC;A;AAGD;AACA;A;;;;;;AAOA;AACA;A;AAEC;;;;AACA;A;AAED;A;;;;ACzFA;A;;;;AAsgBA;AACA;AACA;AACA;A;;;;;;ACljBA;AACA;A;;;AAG4B;A;;;AAG5B;A;;;AAKA;AACA;AACI;AACA;;;AACC;AACA;AACJ;A;AAGC;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;AACA;A;A;AAED;AAxB2B;A;AA0B5B;A;;;AAIA;AACA;AACA;;;;;AACC;A;;AAED;A;;;;A;AAiCC;A;AAED;AACA;AACA;A;AAKC;A;AAOG;AAKA;AAEA;;;AAGH;AAMA;A;AAEC;A;AAXuC;A;AAgBzC;AAEA;AACA;AACC;A;AAMC;AACA;AACA;AACA;A;AAGD;A;AAGC;AACA;AAEA;AACA;A;AAKA;AAEA;AACA;A;AAGE;A;A;AAOD;A;AAED;AACA;A;AAGA;;AACC;A;A;A;A;AAQF;A;AAGD;AACA;AACA;AACI;;;AAGH;AACA;AAJgC;A;AAMjC;A;;;;;;AAMA;AACA;;;;;;AACC;AACA;;A;AACC;;A;AAMD;AAEA;AACA;;;;;AACC;AACA;A;;AAED;A;;A;;;;;;;;A;AAaA;A;AAED;AAEA;AAEA;;;;;;A;AAEE;AACA;A;AAEA;AACA;A;A;;AAGF;AAEA;A;AAIC;;;;;;AAEC;A;;AAED;A;AAED;AAGA;AAEA;A;;;;;;;;AAMA;AACA;A;;;;;;AAG8B;A;;;;;AAG9B;A;;;;;AAGmC;;;;A;;;;;;AAKnC;AACA;A;;;;;;AAG2B;A;;;;;A;AAI1B;A;AAED;A;;;;;AAGgC;;;;A;;;;AAGhC;A;;;;ACxTA;A;;;;;AAMuC;A;;;;;A;AAiFtC;A;AAKG;AACA;;;;AACJ;;;;;A;AAEE;;A;A;AAGA;A;A;AAGA;A;AAED;A;;A;AAWA;A;AAGD;AACI;AACA;;;AACH;AACA;AACA;AAHuB;A;A;AAYvB;A;AAGD;A;AAEC;AACA;AAGA;AACA;AACI;;;AACH;AACA;AACA;A;AAEC;A;AAED;AACA;AAR0C;A;A;AAY5C;;;;;;A;AAEE;;A;AAED;AACA;AACA;AACA;AACA;A;AAEK;;;A;AAOF;A;AAED;AATwC;A;A;AAYzC;A;AAIC;A;AAED;AACA;AACA;AACI;;;A;AAEF;A;AAED;AAJuC;A;A;A;;A;AAazC;;;;;;A;A;AAMG;;A;AAED;A;A;;AAGF;;;;;AACC;;;;;A;AAEE;A;A;;A;;A;AAMJ;A;;;;;;AA+CA;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;AACA;AACA;A;AAEA;;;;A;AACC;A;A;AAGA;AACA;AACA;A;A;AAGG;;A;AACF;A;AAED;AACA;AACA;A;;AAGA;A;A;A;;;;;;;;AAKD;A;AAEE;AACA;A;AAEC;A;AAED;A;A;AAGA;A;AAED;A;AAEC;A;A;A;;;;;;;A;AAOD;A;AAED;A;;;;;;AAUA;;AACI;;A;AACF;A;A;AAGF;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;AACA;AAEA;AACA;AAGI;;;AACH;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;AARsB;A;AAUnB;;;AACH;AADmC;A;A;AAInC;A;AAKG;;;;;;AACH;;;;A;AAEC;A;AAED;;A;AAEC;AACA;AACA;A;AAGG;AACA;AACA;A;A;AAKH;AACA;A;AAEC;A;AAED;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAfA;A;AAiBD;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;A;AAEC;A;AAEG;;;AACH;AACA;AAFoB;A;A;A;AAOrB;A;A;AAQA;A;AAGD;A;;;;;;;A;AAcA;;;A;AACC;A;A;AAEA;A;A;AAGF;AAGE;;;;A;AAEC;AACA;A;AAEG;AACA;AAEJ;;;;;;;;;;A;AACC;A;AAEC;AACA;AACA;AACA;A;AAED;A;A;AAEA;AACA;A;AAGA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;;AAEA;AACA;A;A;AAED;;A;AACC;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;A;AAGG;AACJ;;A;AACC;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;A;;AAEG;;;;A;AACF;AACA;A;A;AAKF;;;A;AACC;A;A;AAEA;AAEA;AACA;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;AACA;A;;AAEA;AACA;A;A;A;AAKA;AACA;A;AAGD;;;;AACA;AAGF;AAGE;A;AAEC;A;AAED;A;AAGC;AACA;AACA;AACA;A;AAED;A;;;;;;;;AAQD;AACA;AAGA;;;;AACA;A;AAEC;AACA;A;AAED;AACA;A;AAEC;AACA;A;A;AAIA;AACA;AACA;A;AAGD;AACA;A;;;;;;;;AAMA;A;AAEC;A;AAGD;;;;AACA;AACA;AACA;A;AAEC;AACA;A;A;AAIA;AACA;AACA;A;AAED;A;;;;;;;A;A;AAME;A;AAED;A;AAED;A;;;;A;AAMC;A;AAED;A;;;;;AAIA;;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;;;AASA;AAIA;;;;AACA;AACC;;AACC;;;;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;A;AAED;AACA;A;AAEC;AACA;A;A;A;AAIC;AACA;AACA;AACA;A;AAED;AACA;AACA;A;A;A;;;;;;AAMC;;;A;AACF;A;AAED;A;;;;AAIA;;AAEK;AACA;;;AACH;AADoB;A;AAGjB;;;AACH;AADsB;A;AAGnB;;;AACH;AADsB;A;AAGnB;;;AACH;AADsB;A;AAGvB;A;A;;;;;;AAKD;AAOA;AACA;A;;;;;;AAYA;AAEI;AACJ;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjvBA;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAGqC;A;;;AAEE;A;;;;AAKvC;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAGkC;A;;;AAEE;A;;;;;;;;;A;A;A;A;;;A;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACnCpC;A;AAGC;AACA;A;AAGA;AACA;;AACC;A;A;A;;;;A;AA+FF;;;A;AACC;;A;AAIA;AACA;;A;AAEA;A;A;A;;;;;;;AAgCD;AACA;;A;;;;;AC1OA;AACA;AACA;A;;;AAMI;;;AACH;AACI;;;A;AAEF;A;AAEA;A;AAJiB;A;AAOnB;AAToB;A;A;;;AAgBrB;AACA;;;;;AACC;A;;AAED;A;;;AAYA;AACA;AACI;;;AACH;AACI;;;AACH;AACA;AAFkB;A;AAFC;A;AAOrB;A;;;A;AAOC;AACA;;AACC;AACA;AAGA;A;AAED;A;A;AAGA;A;AAED;A;;AC/EkD;A;;AACA;A;;;AACA;A;;;;;;A;A;A;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;AC+BjD;A;AAED;A;;;;AAiDA;AACG;;A;AACF;A;AAED;A;;;;;;;AAOA;AAIG;;;A;AACF;A;AAEA;A;AAED;;;;AACA;A;;;;;;AAoBA;A;;;;;;AAQI;AACJ;AACI;;A;AAEF;A;AAED;;;;A;AAEC;A;A;AAGA;A;AAED;;A;AAEC;;A;AAIC;AACA;;;;;AACC;A;;AAED;A;AAED;A;AAvBY;A;A;;;;;;;;;;AA+BX;;;A;A;;;;;A;A;A;;;;;A;AAaH;AACG;A;AAGF;A;AAGD;AACA;;AAEA;;A;AACI;;;A;A;;;;;A;AAGH;;AACA;AACG;;;A;A;;;;;A;AAGH;;AACA;A;AAGG;AACJ;;A;AACI;;;;A;A;;;;;A;AAGH;A;AAGD;;A;AACI;;;;A;A;;;;;A;AAGH;A;AAGD;;A;AACI;;;A;A;;;;;A;AAGH;A;A;;;;;A;A;AAMD;AACA;;A;AACC;;A;;AAEA;;A;A;;;;;A;;;;;;;;;A;A;;;;;A;AAWD;;;;AACA;;AACA;A;A;;;;;A;AAOG;;;A;AACF;A;;;;;A;AAGD;AACA;A;AAEC;A;;;;;A;AAGD;;;;A;A;;;;;A;AAMA;AAEG;;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;;;;;AAc6B;;A;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACvP/B;A;AAEG;;;A;AAEF;A;AAF4B;A;AAM9B;AACA;AACA;AAEI;;;AACH;AADiC;A;AAG9B;;;AACH;AAD6B;A;AAG9B;A;;;;;A;AAUC;A;AAGG;;;A;AAEF;A;AAF+B;A;AAMjC;AACA;A;;;;;AAOA;AACA;A;;;;;A;AAiCC;A;AAGD;;;;AACA;AACA;;AAEC;AAEA;AACA;AACA;AACA;AAEA;AACA;A;AAGD;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AACA;A;A;AAIC;A;AAEC;A;A;A;AAIA;AACA;A;A;A;;;;;AAOF;AACA;AACA;A;;;;;A;AAqFC;A;AAED;A;;;;;AAUA;A;;;;;;;;AAUI;AACJ;;;;AAEI;;;A;A;A;;;;;;;A;A;;;;;;;A;AAQF;;;;AACA;A;AAED;AACA;AAEA;A;AAEC;AAhByB;A;A;A;AAqBzB;AArByB;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;AAqCzB;;AACC;A;A;A;;;;;;;A;A;A;;;;;;;A;AAWD;A;AAID;;AACC;A;A;AAIA;A;AAED;;;;AACA;A;AAID;AACA;;;;;;A;A;AAGC;AACA;AAGA;A;A;;;;;;;A;AAIA;AAGA;A;A;;;;;;;A;A;AAPA;A;A;;;;;;;A;AAIA;AAGA;A;A;;;;;;;A;A;AAAA;A;A;;;;;;;A;A;AAKD;A;;;;;;;A;;;;;AAOA;AACA;;;AACA;A;;;;;;;A;A;;;;;A;AA0FA;AACA;AACA;AACA;;AACI;A;AACF;AACA;A;AAEI;AACJ;;;;AACA;A;A;;;;;A;A;A;AAOF;;AACI;A;AACF;AACA;A;AAEI;AACJ;;;;AACA;A;A;;;;;A;A;A;AAOF;;AACK;AACJ;;;;AACA;A;A;;;;;A;A;A;;;;;A;;;;;AAYG;;;;AACD;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AAEA;AACA;A;;;;;AAOI;;;;AACD;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AAEA;AACA;A;;;;;A;AAsCC;A;AAGD;A;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;AC3lBA;A;;;;AAIA;A;;;;AAQA;A;AAIC;A;AAEA;A;A;AAGC;A;AAED;A;AAGD;AACC;A;AAEC;A;AAED;AACA;A;AAED;A;;;;AC1BA;A;AAEC;A;AAED;AACI;;;AACH;;;AACA;AACA;A;AAEC;A;AALmB;A;A;AASpB;A;AAED;A;;;AAyEA;A;;;;A;AA+CC;A;AAEA;;;;;;;A;AAEE;A;A;;AAGF;A;AAEA;A;AAEA;A;A;;;;A;AA2EA;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;AACA;AACA;;AACC;A;AAEC;A;AAED;AACA;AACA;A;AAED;AACA;A;;;AAuCoC;A;;;;A;AAqiBnC;A;AAIE;A;AACF;A;AAEA;A;AAID;AACA;AACA;AACI;;;AACH;A;A;AAGE;;AACA;A;A;AAGD;A;AAED;AACA;AACA;AAZkB;A;AAcnB;AACA;A;;;;;A;A;A;A;A;A;;;;;;;;;;ACl1BA;A;;;;A;AAQC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4FA;;A;AACC;;A;AAED;;A;;;;;;;A;AAyBC;A;AAGD;;;A;AACC;;A;AAED;;A;;;;;;;AAIA;;A;AAEC;A;AAGD;AACA;AAGA;;A;AAEC;A;AAED;A;;;;;;AAOiC;A;;;;;AAIjC;A;;;;;AAKA;A;;;;A;AAUC;A;A;AAKA;A;AAEC;A;A;A;AAUD;A;AAGA;AACA;;AACC;A;A;AARD;A;A;AAcA;AACA;;AACC;A;A;A;AAOD;A;AAEC;A;AAEC;A;A;AAGF;;AACC;A;A;AAKF;A;;;;AAoBA;A;;;;;AASA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAOC;A;A;;;;;A;AAOA;A;A;AAEC;AACA;AACA;A;A;AAGF;A;;;;;;AAKA;;;;;;AACA;AACA;AACC;;AACA;A;AAEC;AACA;AACA;A;A;A;;;;;;;;AAOF;;;;;;AACA;;A;AACC;;AACA;A;;AAEA;;AACA;A;A;;;;;;;;AAOD;;;;;;AACA;;AACC;;AACA;A;AAEC;AACA;AACA;A;A;AAIF;AACA;;A;;;;;;;;A;AAWA;;;;A;AACC;;A;AACI;;A;AACF;A;A;;AAGD;A;AAED;A;A;AAGA;;A;AACI;;A;AACF;A;A;;AAGD;A;AAED;A;A;AAIA;AACA;AAEA;;A;AACI;;A;AACF;A;A;A;;AA7BF;A;A;AAiCD;A;;;;;;;A;AAcA;;;;A;AACC;AACA;A;A;AAGA;AACA;A;A;AAGA;;;;A;AAEC;A;AAED;A;AAEC;A;A;;AAjBD;A;A;AAoBD;A;;;;;;AAmBA;AACA;AAKA;;;;;A;AACC;AACA;A;AAED;AAGC;;A;AACC;;AACA;;;;;;;;A;AACC;AACA;AACA;A;A;A;AAKD;A;AAGD;;;;A;AACC;A;AAED;;A;AACC;;;A;AAED;;;A;AACI;;;;A;AACF;A;AAED;;A;AACI;;;;A;AACF;A;A;A;AAKH;;A;AACC;AACA;A;;AAEA;;A;A;AAGF;A;;;;;;AAOA;;;;;AACA;;A;AACC;AACA;AACA;;A;AAED;;A;AACC;AACA;AACA;A;AAED;A;AAIA;;;;A;AACC;;A;AAEC;;;;A;AAEC;A;AAED;;AACA;A;AAKD;AACA;AACA;A;A;A;AAGA;A;;AALA;AACA;AACA;A;A;AAMD;AACA;AAEC;A;AAEC;A;AAID;;A;AAEC;;A;AACC;A;AAEC;A;AAED;;AACA;;AACA;A;A;AAGA;A;A;AAIF;;A;AAEI;;;A;AACF;A;A;;AAIE;;A;AACF;A;A;AAGF;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAIF;;A;AACC;;A;AAEC;;;AACA;;AACC;;AADkB;A;A;;AAInB;A;A;AAGF;;A;AACC;;A;AAED;A;;;;;;;AAUA;;;;;AACA;;A;AACC;AACA;AACA;;A;AAED;;A;AACC;AACA;AACA;A;AAED;AAGA;;A;AACC;;;;A;AAEC;A;AAED;;AACA;A;A;AAQD;;;A;AAGC;A;;;AAEA;;;;;;A;A;A;AAKE;AACA;AACA;A;A;AAGF;;A;AACC;;A;A;A;A;;AAKD;AACA;AACA;A;A;AAGG;AAEJ;AAEC;A;AAGC;A;A;AAGA;A;AAID;AACA;AACA;AACA;;;A;AAEC;A;AAIG;AACJ;AAEA;;A;AACC;;AACA;;A;AACC;;A;;AAEA;;A;AAED;A;;AAEI;AACJ;;AACA;;;;;AACC;A;AAEC;AACA;A;AAED;;;;;A;AACC;A;A;;AAGF;;;A;AACC;AACA;AACA;;;;;AACC;;A;AACC;;A;AAMC;;A;AACC;;;;AAGA;AACA;AACA;A;AAED;;;A;AAED;;A;AAED;;A;;AAED;AACA;;A;A;AAEA;;A;A;AAKF;;A;AACC;A;A;AAGA;A;AAED;AAEA;;A;AACC;;;;A;AAEC;A;AAED;;;;A;A;AAEI;;A;AACF;A;A;A;A;AAGE;;A;AACF;A;A;;A;AAGD;;A;A;;AAGE;;A;AACF;A;A;AAMF;;A;AACC;;AACI;AAEJ;;;;;A;AACC;;;A;A;AAEA;;;AACG;;A;AACF;A;AAED;;A;;A;;AAGA;;;A;AACC;AACA;;;AACA;;;;;;A;AACC;AACA;A;AAED;;;A;A;AAEA;AACA;;;AACA;;;;;;A;AACC;AACA;A;AAED;;;A;;AAEA;A;A;A;A;AAGF;A;AAID;;A;AACC;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;A;AAED;A;;;;;;A;AAOC;A;AAED;;;A;AAEC;A;AAED;A;;;;;;AAYA;;A;AAEC;;AACA;A;AAED;AACA;;;;;AACA;;A;AACC;;A;AAED;;A;AACC;;A;AACC;;A;AACC;;A;;AAEI;A;A;AAGH;A;AAEA;A;AAEA;A;AAED;A;AAED;A;AAED;;;AACA;;A;AACC;;A;AACC;;A;AAED;A;AAED;;A;AAGD;AAEO;A;AACP;;;;A;AAGC;;A;AACC;;AACA;A;A;AAGD;;A;AACC;;A;A;A;A;AAID;AAGA;;A;AACC;;AACA;A;A;AASD;;;;A;AACC;A;A;AAEA;;A;AACC;;A;;AAEA;A;A;A;AAVA;;A;;AAEA;A;A;A;A;AAaF;;;AACA;;A;AACC;;A;AACC;;A;AAED;A;A;AAKD;;;;A;AACC;;;;A;AACC;AACA;A;AAED;AACA;;;A;AAEC;AACA;A;AAED;A;A;AAEA;A;A;AAEA;;A;AACC;;A;;AAEA;A;A;;AAnBD;A;A;A;;AAwBD;;A;AACC;;A;AACC;;A;AAED;A;AAED;A;AAcA;;;;;A;AACC;;;A;AAEC;AACA;A;A;AAGA;AACA;A;AAED;;A;A;AAGA;;;A;AAEC;AACA;A;AAED;A;A;AAGA;;;A;AAEC;AACA;A;AAED;A;A;AAGA;;;;;;;A;AAEC;AACA;A;AAED;A;;AA7CA;;A;AACC;AACA;;A;AACC;;A;AAED;A;AAED;;A;AACC;;A;AAED;A;A;A;A;AAsCF;A;;;;;;;;;A;AAYA;;;;A;AACC;;;;AACA;A;A;AAEA;;;;AACA;A;A;AAEA;;;;A;;AARA;A;A;AAUD;A;;;;;;;AAKI;AACJ;AAEC;A;AAEC;A;AAGD;;;;A;AAEC;A;AAED;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;;AAKA;AACA;AAEC;A;AAGC;A;A;AAGA;A;AAID;AACA;AACA;AACA;;;A;AAEC;A;AAID;;A;AACC;A;A;AAGA;A;AAED;AAGA;;;;A;AAEC;A;AAED;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;;AAQA;AACA;AAEA;AAEO;A;A;AAEN;A;AAGA;A;AAGA;;;A;AAEC;A;AAED;A;A;AAIC;A;AAED;;;A;AAEC;A;AAED;A;A;;;;;;A;AAQA;A;AAEG;AACJ;;;;;A;AAGE;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;AAED;A;;;;;AAMA;;;AACA;AACA;A;;;;;A;AAKC;A;AAED;AAKA;AACA;;AACC;A;AAEC;A;A;AAGA;AACA;A;AAED;;;A;AAEC;A;AAED;A;A;A;;;;;A;AAMD;AACA;AACA;;A;AAKE;AACA;AACA;A;AAEM;A;AAEN;A;AAEC;A;AAED;A;A;AAIC;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;A;AAEC;A;AAED;A;AAEC;AACG;A;AAEF;AACA;AACA;A;AAGD;A;AAED;A;AA3CA;A;A;A;AAgDD;A;AAIA;AACA;AACA;A;AAIA;;;AACA;AACA;A;A;A;;;;;A;;;A;ACjfD;A;AAED;;;;;;A;A;AAQG;A;A;;AAIH;A;;;AAwNA;AACA;AACA;A;;;;AAM4B;A;;;;;AAEK;;;;A;;;;;AAGjC;;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;;;;AAQA;AACA;AAGA;AACA;AAGA;AAGI;AAEJ;;AACC;;;;AACA;;;;AAEA;;;;;AACC;;A;AACC;;A;AAED;AAGI;;;;AACH;;AACA;AACA;;;A;AACC;AACA;;;A;AACC;;A;AAED;;;;;A;AARgC;A;A;A;A;AAAA;A;A;AAkBjC;AACA;;A;AAnBiC;A;A;AAsBjC;;;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;;;;;;A;AAEC;;A;AAID;AACA;;A;A;;A;AAOE;A;A;A;AAKF;;;;;A;AACC;A;AAEC;A;AAED;A;AAaC;A;AApE+B;A;A;AA0EjC;AACA;;A;AACC;;;A;AA5EgC;A;A;;A;AAkFpC;;AACC;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAED;A;AASD;AACI;;;;;;AAGH;AACA;AACI;;;AACH;A;AAEC;A;AAHwC;A;A;AAOzC;AAZuC;A;A;AAexC;;;A;AAEC;A;AAjBuC;A;AAqBzC;AACA;AAEA;A;;;;A;AAcC;A;AAED;A;;;;AAOG;;;A;AACF;A;AAED;;;;;;AACA;A;;;;ACvsCA;AACA;AACA;;;;;A;AAEE;A;AAED;A;AAEC;A;AAGA;A;A;;A;AAID;A;A;AAGA;A;AAED;A;;;AAQA;;;;;A;AAEE;A;AAED;A;A;AAGE;A;A;AAGE;A;A;AAGD;A;A;AAGF;AACA;;A;AAID;;;A;A;A;AAIE;A;A;A;AAIA;A;A;AAGD;A;AAED;A;;A;AAIA;A;AAED;A;;;A;AASC;A;AAED;;;;;;AACC;A;AAEC;;A;A;A;AAIC;A;A;AAGD;A;A;;AAGF;A;;;A;AASC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;ACjGsC;A;;;;;AAwEtC;AACA;AACA;AACA;A;;;;;;A;AAOC;A;A;AAGA;A;AAED;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AAKA;A;;;;;AAMA;AACA;A;AAEC;AACA;A;AAEA;A;A;;;;AAKD;A;;;A;AAMC;A;A;AAGA;A;AAED;A;;;A;AAMC;A;A;A;AAIA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAMC;A;A;AAGA;AACA;AACA;A;AAED;A;;;A;AAMC;A;A;AAGA;AACA;A;AAED;A;;;AAMA;A;AAGC;AACA;AACA;A;A;AAGA;AACA;A;AAED;A;A;A;AAIE;AACA;AACA;A;AAED;A;A;AAGC;AACA;AACA;A;A;AAGA;AACA;A;AAED;A;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;A;AAED;A;;;A;AASC;A;AAED;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;A;AAGA;A;AAED;A;;;A;A;AAOC;AACA;A;AAEA;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAOC;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAQC;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;AAMA;A;;;;AAKA;AACA;AACA;A;;;;A;AAOC;A;A;AAGA;A;AAID;AACA;A;;;AC5hBA;A;;;;;AAKiC;A;;;;;AAKY;A;;;;;;A;AAS5C;A;AAGE;;A;AACF;A;A;AAIA;A;AAID;;;;A;AAEC;A;AAED;AACA;AAKA;;AAGA;AAEA;A;;;;;;AAMA;A;;;;;;AAMA;AAEA;AACI;AAEJ;AAEC;;;;;;AACC;AACA;;A;AAEC;AACA;A;AAKD;;;;;A;AACC;AACA;A;A;AAGA;AACA;A;A;;AAGF;AAIA;;A;AACC;;A;AACC;;;A;AACC;A;A;AAGA;A;A;AAGF;AACA;A;AAGD;AACA;;AACA;A;AAED;A;;;;;;;A;AAOC;AACA;AACA;AACA;A;A;AAMA;AACA;AACA;A;AAID;;;;AACA;AAEA;A;;;;;AAIA;;;;;A;AAEE;A;A;;AAGF;A;;;;;A;AAsIA;;;A;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;A;A;AAEA;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;A;A;AAED;A;;;;;;A;A;AAMC;A;AAED;A;;;;;A;A;AAMC;A;AAEA;A;A;;;;;AAQD;A;;;;;;AAeA;;;AACC;;;;A;AAEC;A;A;AAGD;;;;;;;;A;A;AAEE;A;AAED;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;A;A;AAGA;;A;AACC;AACA;AACA;A;A;AAGA;AACA;AACA;A;AAED;A;AAGA;;A;AACK;AACJ;AACA;AACA;;AACA;A;AAEC;A;AAED;AACA;A;A;AAMA;A;AAEG;AACD;;A;AACF;A;AAED;A;A;AANC;A;AAEG;AACD;;A;AACF;A;AAED;A;A;A;A;;;;;;;AAME;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;;AAMA;;;;AACA;A;;;;;;;AAII;AACJ;AACK;;;AACH;A;AADqC;A;A;AAKrC;AACA;A;A;AAIA;A;AAED;;A;A;;;;;;;AAKD;A;;;;ACteG;A;AACF;A;AAED;A;;;;A;AAQC;A;AAED;AACA;;AACK;AACJ;A;AAEC;;;;A;A;AAGA;A;AAED;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;;A;A;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBA;A;;;;;AASA;A;;;;;AAKA;A;;;;;AAMA;AACA;;;;;AACC;AACA;A;;A;;;;;ACrCD;A;;;;;AAKA;A;;;;;AAKA;A;;;;;AAKA;;;;;A;AAGE;A;A;;AAGF;A;;;;;;AAKA;;;;;;AACC;;;A;AACC;A;A;;AAGF;;A;;;;;;;AAKA;;A;AACC;;A;AAGD;;A;;;;;AClCA;A;;;;;AAWA;AACA;AACA;A;;;;;AAI8B;A;;;;;AAGF;A;;;;;AAI5B;AACA;A;;;;;ACjBA;A;;;;;AAKA;A;;;;;AAWiC;A;;;;;AAGA;A;;;;;AAGC;A;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoBlC;A;;;;;;AAKA;AACA;AACA;A;;;;;AAQI;AACJ;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAGD;AACA;A;;;;;AAQA;AACA;;A;A;AAEE;A;AAED;;A;AACC;;;;;AACA;AACA;AACA;AACA;AACA;AACA;A;AAED;;A;AACC;;;;;AACA;AACA;AACA;AACA;AACA;A;AAEC;AACA;A;AAED;A;A;A;A;AAKA;AACI;;;A;AAEF;AACA;A;AAH6B;A;AAM/B;A;AAED;AACA;AACA;AACA;A;A;;;;;;;;AAWD;AACI;AACA;AACJ;AACA;A;AAGC;AACI;AACJ;;;;A;AAEC;AACA;A;AAED;A;AAED;AACA;AACA;A;AAEC;A;AAED;;;AACA;A;;;;;;;AAMA;;;;A;;;;;;;;AAK0C;;;;A;;;;;;;;AAIE;;;;A;;;;;;;;AAI5C;;;;AACA;A;;;;;;;;AAKA;;;;AACA;A;;;;;;;;AAKA;;;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;AA+CA;;;;A;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtRA;AACA;AACA;AAEA;;A;;;;ACP+B;A;;;;;;AAI/B;;A;;;;;;AAKA;AACA;AACA;AACA;A;;;;;AAKA;AACA;AACA;AACA;A;;;;;AAKA;A;;;;AClCA;A;;;;;AAWA;A;;;;;AASA;A;;;;;AAKA;A;;;;ACnBA;A;;;;;AAQA;AACA;AACA;AAEA;A;AAEC;A;AAGD;AACA;A;;;;;AASA;A;;;;;AAKA;A;;;;ACpCA;A;;;;;AASA;A;AAEC;A;AAGD;AACA;AAEA;A;;;;;AASA;A;;;;;AAKA;A;;;;;ACvBI;;;;;;AACJ;;;;;;A;A;;A;;AACC;AACA;;;;;;AACA;A;AAGC;AACA;AACA;A;AAGD;;;;AAGA;AACA;AACA;A;;AAGD;A;;;;;ACbA;AAOA;AAEA;A;;;;;;;AAKA;;;;;AACC;A;;AAGD;A;;;;;;;;AAKG;;;;A;AACF;A;AAED;AAEA;AACA;A;;;;;;;AAMA;AAIA;;;;AAEA;;;;;;;AAEA;;A;;;;;;;;;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;;AAQA;;AAEC;AACA;AACA;AAEG;;;AACH;AACA;;AACA;AACA;AACA;;A;AACC;AACA;;A;A;AAGF;;A;;;;;;;;AAKA;;AACI;;;AACH;;AADkB;A;A;;;;;;;;AASnB;AAEA;;;;;AACC;;AACA;A;;AAGD;A;;;;;;AAIA;;;;;;A;A;;A;;AACC;A;;A;;;;;AAMD;A;;;;;AAKA;A;;;;;AAKA;A;;;;ACjIA;A;;;;AAaA;AACA;AACA;A;;;;;;AAKA;;A;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;A;;;;;A;AAOC;A;AAGD;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;AAKA;AACA;AACA;AACA;A;;AAYA;A;;;;;;AAKA;;A;;;;;;AChEA;A;;;;;AAaA;A;;;;AAQA;A;;;;;AAQA;AACA;;;;;;A;A;;A;;AACC;A;;AAGD;A;;;;;AAKI;AACA;;;AACH;AADkB;A;AAGnB;A;;;AAOA;A;;;;;A;AAQC;AACA;A;AAGD;;A;;;;;;;;AAMA;;AACA;;AACA;AACA;A;;;;;;;A;AAOC;AACA;A;AAKD;AACA;AAEA;;AACA;;AACA;AACA;AACA;A;;;;;;;AAMI;AACJ;;;;;AACC;;A;;AAGD;A;;;;;;AAKC;;;;;;AACA;AAGD;;;;;A;AAEE;;A;AAED;AACA;AACA;AACA;A;;AAGD;AACA;AACA;A;;;;AAcA;;AAEI;A;AAEH;A;A;AAIA;A;A;AAIA;A;AAED;A;;;;;;AAKA;;A;;;;;;;AAGI;AACA;;;A;AAEF;A;AACS;;;A;A;AAER;A;AAEA;A;A;AAEQ;;A;AACT;A;A;A;AAViB;A;AAanB;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;AAKA;;;;A;AAEC;A;AAED;;A;;;;;;;A;AAKC;A;AAED;AACG;;;AAAH;;A;A;AAEE;A;AAED;;A;AACS;;;AAAH;;A;AAEN;;AAEA;;;;;AAEA;;A;AACC;;;;;A;AAGD;;;;;AACC;;AACA;A;;A;A;AAGF;A;;;;;;AAKG;;;AAAH;;A;A;AAEE;A;A;AAGA;A;A;;AAEQ;;;AAAH;;A;AACF;;;AACH;;;;A;AAEC;A;AAHiB;A;A;A;AAOpB;;A;;;;;;AAMI;;;AACH;;;;;A;AACK;;;AACH;;;;;A;AACC;;;;;;AAEA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;A;AAdgB;A;A;AAFF;A;AAsBnB;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;ACrRA;;;;;AACC;AACA;AAEA;AACA;AACA;;AAGA;AACA;A;;A;;;A;;;AA6BD;;;;;;A;A;;A;;;AACC;;AAEA;A;;A;;;A;;;AAUG;AACJ;;;;;;A;A;;A;;;AACC;AACA;AACA;AACA;A;;AAGD;;;;;;A;A;;A;;AACC;;;;;;A;A;;A;;AACC;;A;AACC;;A;AAGD;;AAGA;AACA;A;;A;;AAIF;;;;;;A;A;;A;;;AACC;AACA;AACA;A;;A;;;A;;;AAxDD;;AAEA;;;;;;A;A;;A;;;AACC;;;;AACA;;A;AACC;;AACA;A;AAGD;A;;A;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyCG;AAOJ;;A;AAEC;A;A;AAIA;A;AAID;AAEA;;;;;AACC;A;;AAGD;;;;;AACC;A;AAEC;A;A;;AAIF;AAEA;A;;;;;;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxGgC;A;;;;;A;AAyI/B;A;AAED;A;;;;;AAKA;A;;;;;;AAYA;;;;;A;AACC;A;A;AAEA;A;A;AAEA;;;A;A;AAEA;;;A;;AAEA;;;A;A;A;;;;;;;;AAMD;AAGA;;A;AACC;A;A;;;;;;;;AAOD;;;A;AAEC;AACA;A;AAGA;A;;A;AAIC;A;AAED;A;A;AAGD;;A;AAEC;A;;AAEA;A;AAGD;;A;;;;;;;AAOA;;A;AACC;A;AAID;;;;;;AACC;AACA;;;A;AAEE;A;A;AAGA;A;AAED;A;;;A;;AAKF;;;;;;A;A;;A;;;AACK;A;AAEJ;;;A;AACC;;;A;A;AAEA;;;A;;AAEA;A;A;AAED;;A;AACC;A;A;;AAKF;;;;;;A;A;;A;;;AACC;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;;AACC;;A;AACC;A;A;;AAKF;;AACA;;;;;;A;A;;A;;;AACC;AACA;;A;AACC;;A;A;;AAKF;;;;;AACC;;A;;AAID;;A;AACC;A;A;;;;;;;;AAQD;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;A;A;;AAKF;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;;;;AACC;;A;;A;;;;;;;;;AAOD;AACA;AACA;;;;;;AAEC;A;A;A;AAME;AACA;A;A;A;AAKD;AACA;A;AAQA;AACA;AAED;;;A;AAEC;A;AAED;;A;AACC;;A;AAEC;A;A;A;AAIC;A;AAEE;;A;AACF;A;AAGD;AACA;A;A;AAOF;;A;AACI;;;AAAH;;A;AACC;;;;AACA;;A;AAED;;;;;AACA;;A;AACC;;A;AAED;AACG;;;A;AACF;A;AAED;AAKA;AACA;;A;AAGG;A;AAEH;A;A;AAIG;;;A;AACF;AAGA;A;AAEA;A;A;AAIE;AAGD;;AAAH;;A;AACC;;A;AAMD;;A;AAIC;;A;AACC;;A;;AAEA;;A;A;AAKF;;A;AACC;;A;AAKE;;;AAAH;;A;AACC;;;;AACA;;A;AAKE;;;AAAH;;A;AACC;AACA;A;AAMA;AACA;AAED;;A;AACC;;A;AAIC;AACA;A;A;AAKF;;;;;A;AAEC;A;A;AAMA;A;AAOE;;;A;AACC;;;A;AACF;AACA;A;AAEC;A;A;A;AAIH;;A;AACC;;A;AAED;AAKA;;;;;A;AACC;;A;A;AAEG;;A;AACF;A;AAID;;A;AACC;AACA;;A;AAKD;;A;AAEC;AACA;;A;AAED;A;A;AAEA;A;A;AAEG;;;A;AACF;A;AAED;;A;AAEC;AACA;;A;AAED;A;;AAEA;A;A;A;;AAMF;;A;AAEC;AACA;AACA;;;;;;A;A;;A;;AACC;AACA;A;;AAED;A;;A;AAID;;A;AAEC;A;A;;A;;;;;;;AAQD;;;;;AACI;;;AAAH;;A;AAEC;AACA;;A;AAED;;AACA;;A;AACC;;A;AAED;A;;A;;;;;;;;A;AAOA;A;AAED;;A;;;;;;;A;AAMC;A;AAED;;A;;;;;;;AAQA;;A;AACC;;A;AAED;A;AAEC;A;AAID;;;A;;;;;;;;AAKA;;A;;;;;;;;AAMA;;A;AACC;AACA;A;AAED;;A;;;;;;;AAeA;A;;;;;AAsBA;A;;;;;;;AASA;AACA;AACA;AAEA;;;;A;A;AAEC;;A;A;A;AAEA;;A;AAGC;;A;;AAIA;AACG;;;AAAH;;;;;A;AACC;;A;AAED;;A;A;;A;AAGD;;A;A;AAOA;A;A;AAGA;A;A;;A;;;;;;;AASD;AACA;AACA;A;AAMC;A;A;;;;;;;AAQD;AAGA;;;;;AACC;A;;AAED;A;;;;;;AAOA;AAGA;;;;;AACC;A;;AAED;A;;;;;;A;AAeC;A;AAED;;;A;AACC;A;AAED;;;A;AACC;A;AAED;A;;;;;;;;AAgBG;;;A;AAEF;;;;;;AACC;A;;AAGD;AACA;AACA;A;AAGD;AACA;AAGA;;A;AACC;AACA;;A;A;;;;;;;;A;AASA;AACA;A;AAID;AACA;AACA;AAGA;;;;;;AAEC;;;A;AACC;;A;AAID;;A;AACC;;;;AACA;AACA;A;AAKC;AACA;;;;;;AACC;A;;AAED;A;A;AAKF;;;AACA;;;;;AACA;;A;AACC;;A;AAED;AACA;A;;AAID;;A;;;;;;;AAKA;;;;;A;A;AAEC;A;A;AAEA;A;A;AAEA;;;A;A;AAEA;;A;A;;;;;AAOD;A;;;;A;AAMC;A;AAKE;;;AAAH;;A;AACC;;A;AAEC;A;AAED;A;AAKD;;AACA;;;;;;A;AACC;;A;AAED;;;;AACA;;;AACA;;A;;;;;A;AASC;A;AAED;;AACA;;A;AAEC;A;A;AAGA;A;AAEG;;;;;AACH;;;AACA;;;;;;A;AACC;;;A;AAEC;A;AAED;A;AAPmC;A;A;;;;;;;;;AAyBrC;;;;;A;A;AAGC;;;A;;;;;;;A;A;A;;;;;;A;A;A;;;;;;;A;A;AAQA;;A;A;;;;;;;;;AAUE;;;AAAH;;A;AAKC;AAEA;A;AAKE;;;AAAH;;A;AACC;;AACA;;A;A;AAEE;A;AAED;;;A;A;;;;;;;A;A;A;AAOF;;AACA;;AACA;;A;AAEC;;A;AAGD;;;;A;A;AAEC;;;;;A;A;;;;;;;A;AAIG;;;A;AACF;A;A;A;A;AAGD;;A;AAEC;;A;AAED;AAEA;;;A;;A;AAEA;;A;AAGD;;A;AAEC;A;AAID;;AACA;;;AACA;;A;;;;;;;A;;;;;A;AASC;A;AAED;;A;AACC;;A;AACC;A;AAEE;;;A;AACF;A;AAED;A;AAEE;;AAAH;;A;AACI;;AAAH;;A;AACC;;;;;AACC;A;;A;A;AAIA;;;AAAH;;A;AACC;A;AAEE;;;A;AACF;A;AAED;A;;;;;AAKA;;;;;AACC;;A;AACC;;A;AAEE;;;AAAH;;A;AACC;;;A;AACC;;A;AAED;;AACA;;A;AAED;A;;A;;;;;;AAOE;;;AAAH;;A;AACC;;;A;AACC;A;AAED;;AACA;;AACG;;;;AAAH;;A;AACC;A;A;AAIC;;;AAAH;;A;AACC;;;;;AACC;A;;AAED;A;AAGE;;AAAH;;A;AACC;;;;;AACC;A;;A;AAIC;;;AAAH;;A;AACC;A;A;;;;;;AAMD;;;A;;;;;;;;;AAOA;AACA;;;AACC;;A;;;AAED;;;;;A;AAEC;A;A;AAGA;A;AAED;;AACA;;;;A;AACC;;;AACC;AACA;AACG;;;AAAH;;A;AACC;A;A;;;;AAGF;A;AAED;AACA;AACG;;;AAAH;;A;AACC;A;A;;;;;;;AAMD;;A;;;;;;;AAKA;;;AACA;AACA;AACA;;;;A;;;;;;A;AAqBC;A;A;AAGA;A;AAED;A;;;;AAQG;;;A;AACF;A;AAED;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;;;;;;AACI;;;A;AACF;A;A;;AAGF;A;;;;;AAIA;A;;;;;AAGA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;A;AAOC;A;A;AAGA;A;AAED;;;A;AACC;A;A;;;;;;A;AC1vCA;A;AAED;;;A;;;;;;ACgBA;AACA;A;;;;;AAQA;AACA;A;;;;;AAKA;A;;;;;AAyBA;;;;;A;A;AAEC;A;A;A;AAEA;A;A;A;AAEA;A;;A;AAEA;;A;A;;;;;;;AAamC;A;;;;;;AAMpC;;A;AAEE;A;AAED;A;A;;;;A;AAoBA;A;AAED;;A;AAEE;A;AAED;A;A;;;;AAWD;;A;AAEE;A;AAED;A;A;;;;AAkBD;AACA;;A;AAEE;A;AAED;;;;;AACC;A;;A;A;;;;AAQF;;;;;A;AAEE;A;A;;A;;;AAOF;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AA+BA;;;;;AACC;;A;AACC;;A;AAED;A;;A;;;;;;AAcD;A;;;;A;AAMC;A;AAED;A;;;;A;AAMC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;;A;A;A;A;;;;;;;;;;;;AC9HA;;A;;;;;;AAQA;;A;;;;;;AAQA;;A;;;;;;AAQA;;A;;;;;;AAwGA;;A;;;;;;AA6EA;;A;;;;;;AAQA;;A;;;;;;AAgBA;;A;;;;;;AAmDA;;A;;;;;;AAiCA;;A;;;;;;AAsBA;;A;;;;;;AAkIA;;A;;;;;;AAeA;;A;;;;;;AAqHA;;A;;;;;;A;;;;;;;;;;;ACxjBA;A;;;;AA+BA;A;;;;AA2TA;A;;;;AAeA;A;;;;AAitBA;A;;;;;A;;;;;;;;;;;ACzpCA;A;;;;AAYA;A;;;;AAIA;A;;;;;A;;;;;;;;;;;;;;;ACxCA;A;AAGC;A;AAGG;AAEJ;;;;;A;AAEE;A;AAEA;A;A;;AAIF;;A;AACC;;A;AAGD;A;;;;;;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzBA;A;;;;;;AAMA;;A;;;;;;AAKA;A;;;;;AAKA;A;;;;;;AAMA;;;AACA;;AAEA;;A;;;;;;AAKA;A;;;;;AAKA;A;;;;;;A;AASC;A;A;AAKA;A;AAGD;;AAEA;;A;AACC;;A;AAGD;AACA;A;;;;;;;AAMA;;;AACA;;A;;;;;;;AAYA;;A;;;;;;;AAMA;;;;A;AAEC;A;AAGD;A;;;;;;;;AAMA;A;AAMC;AACA;A;AAED;;;AACA;AAEA;;;;A;AAEC;A;AAGD;;A;;;;;;AC7GA;;A;;;;;;;AAsDA;AACA;AACA;A;;;;;;;A;AAOC;A;AAGD;;AAEA;;;;;AACC;AACA;;AACA;AACI;AAEJ;;;A;AAEC;A;AAKD;;A;AACC;;;AACA;;AAEA;;;A;AACC;;A;A;AAIF;;A;AACC;;AAEA;;;AACA;;A;AACC;;A;A;A;AAKA;A;A;;AAGD;;A;AAGD;;A;AACC;;;;AACA;;A;AACC;;A;AAED;;A;A;AAIA;;;;;;A;A;;A;;AACC;A;;A;AAGD;A;A;;A;;;;;;;;AA4BF;;AAEI;AAEJ;;;;;AACC;;AAEA;;AAIA;;A;AACC;;;AACA;;AAEA;;;A;AACC;;A;A;AAIF;;A;AACC;;;;AACA;;A;AACC;;A;AAED;;A;AAGD;;;;A;AAGC;;;;;A;;AAEA;;A;A;;AAIF;A;;;;;;;AAWA;;A;;;;;;;AAWA;;AAEA;AAEA;;;;;;AACC;A;;AAGD;A;;;;;;AAIA;;A;AACC;;A;AAGD;AAEI;AAEA;;;;AACH;;AAEG;A;AAH0B;A;A;AAO7B;;AAKA;AAZ6B;A;AAgB9B;A;;;;;;AAMA;;;;A;AAEC;A;AAGD;A;;;;;;;AAOA;AAEA;;;;A;AAEC;A;AAGD;;A;;;;;;;AAwBA;;AAEA;;;;;AACC;;AAEA;;AAEA;;;;A;AACC;;;A;AAEC;A;AAGD;;A;AAID;;;AAGA;;AAEA;;;A;AACC;A;A;;AAIF;A;;;;;;;AAoBA;;AAEA;;;;;AACC;;AAEA;;AAEA;;;;A;AACC;;;A;AAEC;A;AAGD;;A;AAID;;;AAGA;;AAEA;;;A;AACC;A;A;;AAIF;A;;;;;;;AAMA;;A;;;;;;;AAOA;AAEI;AAEA;;;;AACH;;A;AAD6B;A;A;AAQ1B;A;AAR0B;A;A;AAY7B;AAZ6B;A;AAe9B;A;;;;;;AAIA;;AAGA;;AACC;;A;A;AAIA;A;AAGD;A;;;;;AAMA;;;A;;;;;;AAYA;;;A;;;;;;AAkBA;;;A;;;;;;AAMA;;;A;;;;;;AAMA;;AACA;;A;AACC;;A;A;AAKA;A;AAGD;A;;;;;;;AAYI;AAEJ;;;AACA;;A;AACC;;A;A;AAID;;;;A;AACC;;;AACA;AACA;;AAIA;;A;AACC;;A;;AAEA;A;A;A;AAID;A;;AAEA;;A;AAEC;;AACA;;;A;AACC;;A;A;A;AAMF;;;;;;;;;;A;AAGC;AACA;;;;;;AACC;;;;A;;AAED;AACA;A;AAID;;A;A;AAEA;;;A;AACC;;AACA;A;AAOD;;;;;;;;;;;;;A;AAGC;;AACA;A;AAGD;AACI;;;AACH;;;AAD0B;A;AAG3B;A;;AAEA;;A;A;AAGD;A;;;;;;AC7jBA;;;;;A;AAEE;A;A;;AAIF;A;;;;AAcA;AACA;A;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;AC7CA;A;;;;;ACCA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;AACA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;AAQA;;A;;;;;;AAIA;A;;;;;AAIA;A;;;;;AClGA;A;;;;;;AAIA;;A;;;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;ACxBA;A;;;;;;AAIA;;A;;;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AC3BA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;ACXA;A;;;;;AAMA;AACA;A;;;;;AAIA;AACA;A;;;;ACdA;A;;;;ACAA;A;;;;;ACAA;;A;AAEI;;;AAAH;;A;AACC;;A;A;A;;;;;ACJF;A;;;ACqBA;A;;;;ACrBA;A;;;;ACHA;A;;;;ACAA;A;;;;;AAMA;AACA;A;;;;;AAIA;AACA;A;;;ACLA;A;;;;ACFA;A;;;;;ACCA;;;A;;;;;;AAMA;A;;;;;AAIA;A;;;;;ACNA;A;;;;;AAIA;A;;;;;AAIA;A;;;ACbA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;ACJA;A;;;;;;;;AAOA;AACA;;;A;A;;;AAGA;AACA;;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACKA;;;;;;;A;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAWA;A;;;;ACxCA;A;;;;;;AAQA;;AACA;;;;;;;;;;A;;;;;;AAwBA;AAEA;AACA;A;;;;;AAKA;A;;;;;A;AAMC;AACA;A;AAGD;A;;;;;;ACpDA;;AACA;;;;;;A;;;;AAcA;A;;;;;;AAKA;A;AAEC;A;AAED;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKI;AACJ;;AACA;;A;AACC;A;;AAEA;;A;AAED;A;;;;;AC/DA;A;;;;;;AAOA;;AACA;;;;;;;;;;;;A;;;;;;AAqCA;A;;;;;A;AAMC;AACA;A;AAGD;A;;;;;;AAIA;AAEA;AACA;AACA;A;;;;;;A;AC/DC;A;AAED;A;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;A;;;;;;AAsCA;AAEA;A;;;;;AAKA;A;;;;;;AAKA;;A;;;;;;AC5DA;A;;;;;;AAMA;;;;;;A;;;;;;AAgBA;;;AACC;AACA;;AAEA;;AACA;A;;;A;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BD;AACA;A;;;;;;;;AAKA;;A;AACC;A;A;;;;;;;;AAMD;;AACA;A;;;;;A;AA2BC;A;AAED;A;;;;AAaA;A;;;;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;;AC4DC;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;AClIA;A;AAGD;AAEA;A;AAGC;AACA;A;AAGD;A;;;;;AAKA;A;;;;;;ACHA;;;;AACA;;A;AACC;;A;AAGG;AACJ;;;AACA;;AAEA;;A;AACC;;A;A;AAGA;A;AAGD;A;;;;;AAgBA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAOA;AACG;;;AAAH;;A;AACC;;;;AACA;;A;AACC;;A;AAED;A;AAED;;A;;;;;;AA2DA;AACA;;A;AACC;AACA;AACA;;;;;AACC;AACA;;A;AACC;;A;A;;A;AAIH;;A;AACC;;A;AAED;AACA;;;;;;A;A;;A;;AACC;A;;AAED;A;;;;;ACjNA;AACA;A;;;;;AAMA;A;;;;ACZI;AACJ;AAWA;;;;;AACC;A;;AAGD;AAaA;;;;;AACC;A;;AAGD;AACA;AAEA;A;;;;;;ACjCA;AACA;AACA;AAEA;AACA;AACI;;;AACH;;AACA;AACA;AACA;AAJ6B;A;AAM9B;AAEA;AACA;A;;;;;;;ACjBA;A;A;AAGC;A;A;;;;;ACJD;;AAEA;AACA;AACA;AACA;A;;;;;ACNA;AACA;AACA;A;;;;AAKA;AACA;AACA;A;;;;;ACQA;;;;AACA;;A;AACC;;A;AAGD;AAEA;;;;AACA;;A;AACC;;A;AAED;AACA;A;;;;;;AAKA;;;;AACA;;A;AACC;;A;AAGD;AACA;A;;;;;;;AAQA;;A;;;;;;A;AAMC;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;AC1CA;AACA;;;;AACA;;A;AACC;;A;;AAEA;A;AAGD;AAKA;AACA;AACA;A;;;;;;;AAKA;;;;;;;;;;;;;;;;;;A;;;;;;;AAqBA;;;;;A;;;;;;AAYA;;;;A;AAEC;A;AAGD;AACA;;;;;AACC;;;;AACA;;A;AACC;;A;AAGD;A;;AAED;A;;;;;;;AAII;AACJ;;;;;;A;A;;A;;AACC;;AACA;;;;;A;;AAQD;A;;;;;;;AAKA;AAEA;;A;AACC;AACA;AACA;A;AAGD;AAEA;AACA;AAEA;A;;;;;;;;AAKA;AACA;;;;AACA;;A;AACC;;A;AAGD;;AAEA;AACA;AAEA;A;;;;;;;AAKA;A;AAGC;A;A;;;;;;AC7ID;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;;;;;;A;A;;A;;AACC;;AACA;AACA;A;;A;;;;;;;;AAKD;AACA;;;;;AACC;AACA;AACA;AACA;AAEI;AACJ;AACA;AAEA;AACA;A;;A;;;;;;;AAOD;;;;;;A;;;;;ACxBA;AAKA;;AACA;AACA;A;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;AAqDA;;;;;;A;;;;;;A;AAgBC;A;AAED;A;;;;;;AAIA;;AACA;AACA;AACA;;AACA;A;;;;;;ACjGA;AACA;AAIA;A;;;;;;AAIA;;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;A;;;;;;;;AAIA;;AACA;AACA;AACA;AACA;A;;;;;;;;AAKA;;AACA;AACA;A;AAEC;A;A;;;;;;;;AAMD;AAEA;AAEA;AACA;AACA;A;;;;;;;;AAKA;AACA;AAEA;AAEA;A;;;;;;;AAKA;A;;;;;;AC9EA;AACA;AACA;;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A"} +{"version":3,"file":"whispervis.js","sources":["/github.com/gopherjs/gopherjs/js/js.go","/internal/bytealg/index_generic.go","runtime.go","/runtime/error.go","/errors/errors.go","atomic.go","cond.go","pool.go","sync.go","waitgroup.go","/sync/cond.go","/sync/map.go","/sync/mutex.go","/sync/once.go","/sync/pool.go","/sync/runtime.go","/sync/rwmutex.go","/sync/waitgroup.go","/io/io.go","/io/multi.go","unicode.go","/unicode/digit.go","/unicode/graphic.go","/unicode/letter.go","/unicode/utf8/utf8.go","bytes.go","/bytes/buffer.go","/bytes/bytes.go","/bytes/reader.go","/bufio/bufio.go","/bufio/scan.go","math.go","/math/abs.go","/math/frexp.go","/math/ldexp.go","/math/log10.go","syscall.go","syscall_unix.go","/syscall/dirent.go","/syscall/env_unix.go","/syscall/exec_unix.go","/syscall/route_bsd.go","/syscall/str.go","/syscall/syscall.go","/syscall/syscall_bsd.go","/syscall/syscall_darwin.go","/syscall/syscall_darwin_amd64.go","/syscall/syscall_unix.go","/syscall/zsyscall_darwin_amd64.go","/github.com/gopherjs/gopherjs/nosync/map.go","/github.com/gopherjs/gopherjs/nosync/mutex.go","/github.com/gopherjs/gopherjs/nosync/once.go","/github.com/gopherjs/gopherjs/nosync/pool.go","time.go","/time/format.go","/time/sleep.go","/time/tick.go","/time/time.go","/time/zoneinfo.go","fd_poll_js.go","/internal/poll/fd.go","/internal/poll/fd_mutex.go","/internal/poll/fd_posix.go","/internal/poll/fd_unix.go","/internal/poll/sockopt.go","/internal/poll/sockopt_unix.go","/internal/poll/sockoptip.go","/internal/poll/sys_cloexec.go","/internal/poll/writev.go","/internal/testlog/log.go","os.go","/os/dir.go","/os/dir_unix.go","/os/env.go","/os/error.go","/os/error_posix.go","/os/error_unix.go","/os/exec.go","/os/file.go","/os/file_posix.go","/os/file_unix.go","/os/getwd_darwin.go","/os/path_unix.go","/os/proc.go","/os/stat.go","/os/stat_darwin.go","/os/stat_unix.go","/os/sys_bsd.go","/os/types.go","/os/types_unix.go","/os/getwd.go","/math/bits/bits.go","/strconv/atof.go","/strconv/atoi.go","/strconv/decimal.go","/strconv/extfloat.go","/strconv/ftoa.go","/strconv/itoa.go","/strconv/quote.go","reflect.go","swapper.go","/reflect/type.go","/reflect/value.go","/fmt/format.go","/fmt/print.go","/fmt/scan.go","/sort/search.go","/sort/slice.go","/sort/sort.go","/sort/zfuncversion.go","/compress/flate/dict_decoder.go","/compress/flate/huffman_bit_writer.go","/compress/flate/huffman_code.go","/compress/flate/inflate.go","/encoding/binary/binary.go","/hash/crc32/crc32.go","/hash/crc32/crc32_generic.go","/hash/crc32/crc32_otherarch.go","/compress/gzip/gunzip.go","/encoding/base64/base64.go","strings.go","/strings/builder.go","/strings/reader.go","/strings/replace.go","/strings/search.go","/strings/strings.go","/unicode/utf16/utf16.go","/encoding/json/decode.go","/encoding/json/encode.go","/encoding/json/fold.go","/encoding/json/indent.go","/encoding/json/scanner.go","/encoding/json/stream.go","/encoding/json/tags.go","/github.com/divan/graphx/graph/graph.go","/github.com/divan/graphx/graph/helpers.go","/github.com/divan/graphx/graph/link.go","/github.com/divan/graphx/graph/node.go","/log/log.go","/github.com/divan/graphx/layout/config.go","/github.com/divan/graphx/layout/force.go","/github.com/divan/graphx/layout/force_drag.go","/github.com/divan/graphx/layout/force_gravity.go","/github.com/divan/graphx/layout/force_spring.go","/github.com/divan/graphx/layout/integrate.go","/github.com/divan/graphx/layout/layout.go","/github.com/divan/graphx/layout/object.go","/github.com/divan/graphx/layout/octree.go","/github.com/divan/graphx/layout/force_rules.go","/path/filepath/path.go","/path/filepath/path_unix.go","/github.com/divan/graphx/formats/d3json.go","/github.com/gopherjs/vecty/dom.go","/github.com/gopherjs/vecty/domutil.go","/github.com/gopherjs/vecty/markup.go","/github.com/gopherjs/vecty/elem/elem.gen.go","/github.com/gopherjs/vecty/event/event.gen.go","/github.com/gopherjs/vecty/prop/prop.go","/github.com/bep/gr/support/support.go","/github.com/fatih/structs/field.go","/github.com/fatih/structs/structs.go","/github.com/fatih/structs/tags.go","/github.com/lngramos/three/cameras_perspective_camera.go","/github.com/lngramos/three/core_face3.go","/github.com/lngramos/three/gen_geometry_basic_geometry.go","/github.com/lngramos/three/gen_material_line_basic_material.go","/github.com/lngramos/three/gen_material_mesh_phong_material.go","/github.com/lngramos/three/gen_object3d_ambient_light.go","/github.com/lngramos/three/gen_object3d_directional_light.go","/github.com/lngramos/three/gen_object3d_group.go","/github.com/lngramos/three/gen_object3d_line.go","/github.com/lngramos/three/gen_object3d_mesh.go","/github.com/lngramos/three/gen_object3d_scene.go","/github.com/lngramos/three/geometries_basic_geometry.go","/github.com/lngramos/three/lights_ambient_light.go","/github.com/lngramos/three/lights_directional_light.go","/github.com/lngramos/three/main.go","/github.com/lngramos/three/materials_line_basic_material.go","/github.com/lngramos/three/materials_material.go","/github.com/lngramos/three/materials_mesh_phong_material.go","/github.com/lngramos/three/math_color.go","/github.com/lngramos/three/math_vector3.go","/github.com/lngramos/three/objects_group.go","/github.com/lngramos/three/objects_line.go","/github.com/lngramos/three/objects_mesh.go","/github.com/lngramos/three/renderers_webgl_renderer.go","/github.com/lngramos/three/scenes_scene.go","/github.com/status-im/whispervis/jsapi/filereader.go","/container/list/list.go","/context/context.go","/math/rand/exp.go","/math/rand/normal.go","/math/rand/rand.go","/math/rand/rng.go","/math/big/accuracy_string.go","/math/big/arith.go","/math/big/decimal.go","/math/big/float.go","/math/big/floatconv.go","/math/big/floatmarsh.go","/math/big/ftoa.go","/math/big/int.go","/math/big/intconv.go","/math/big/intmarsh.go","/math/big/nat.go","/math/big/natconv.go","/math/big/prime.go","/math/big/rat.go","/math/big/ratconv.go","/math/big/ratmarsh.go","/math/big/roundingmode_string.go","/math/big/sqrt.go","rand.go","/crypto/rand/util.go","/crypto/crypto.go","aliasing.go","/crypto/internal/subtle/aliasing.go","/crypto/subtle/constant_time.go","/crypto/cipher/cbc.go","/crypto/cipher/cipher.go","/crypto/cipher/ctr.go","/crypto/cipher/gcm.go","/crypto/cipher/io.go","/crypto/cipher/xor.go","/crypto/aes/block.go","/crypto/aes/cipher.go","/crypto/aes/cipher_generic.go","/crypto/des/block.go","/crypto/des/cipher.go","/crypto/elliptic/elliptic.go","/crypto/elliptic/p224.go","/crypto/elliptic/p256.go","/crypto/elliptic/p256_generic.go","/crypto/internal/randutil/randutil.go","/crypto/sha512/sha512.go","/crypto/sha512/sha512block.go","/encoding/asn1/asn1.go","/encoding/asn1/common.go","/encoding/asn1/marshal.go","/crypto/ecdsa/ecdsa.go","/crypto/hmac/hmac.go","/crypto/md5/md5.go","/crypto/md5/md5block.go","/crypto/rc4/rc4.go","/crypto/rc4/rc4_ref.go","/crypto/rsa/pkcs1v15.go","/crypto/rsa/pss.go","/crypto/rsa/rsa.go","/crypto/sha1/sha1.go","/crypto/sha1/sha1block.go","/crypto/sha256/sha256.go","/crypto/sha256/sha256block.go","/crypto/dsa/dsa.go","/encoding/hex/hex.go","/crypto/x509/pkix/pkix.go","/encoding/pem/pem.go","/io/ioutil/ioutil.go","/io/ioutil/tempfile.go","/internal/singleflight/singleflight.go","/vendor/golang_org/x/net/dns/dnsmessage/message.go","/vendor/golang_org/x/net/route/address.go","/vendor/golang_org/x/net/route/binary.go","/vendor/golang_org/x/net/route/interface.go","/vendor/golang_org/x/net/route/interface_classic.go","/vendor/golang_org/x/net/route/interface_multicast.go","/vendor/golang_org/x/net/route/message.go","/vendor/golang_org/x/net/route/route.go","/vendor/golang_org/x/net/route/route_classic.go","/vendor/golang_org/x/net/route/sys.go","/vendor/golang_org/x/net/route/sys_darwin.go","/vendor/golang_org/x/net/route/syscall.go","net.go","/net/addrselect.go","/net/cgo_stub.go","/net/conf.go","/net/dial.go","/net/dnsclient.go","/net/dnsclient_unix.go","/net/dnsconfig_unix.go","/net/error_posix.go","/net/error_unix.go","/net/fd_unix.go","/net/hosts.go","/net/interface.go","/net/interface_bsd.go","/net/interface_darwin.go","/net/ip.go","/net/iprawsock.go","/net/iprawsock_posix.go","/net/ipsock.go","/net/ipsock_posix.go","/net/lookup.go","/net/lookup_unix.go","/net/mac.go","/net/net.go","/net/nss.go","/net/parse.go","/net/port.go","/net/port_unix.go","/net/rawconn.go","/net/sock_posix.go","/net/sockopt_bsd.go","/net/sockopt_posix.go","/net/splice_stub.go","/net/sys_cloexec.go","/net/tcpsock.go","/net/tcpsock_posix.go","/net/tcpsockopt_darwin.go","/net/tcpsockopt_posix.go","/net/udpsock.go","/net/udpsock_posix.go","/net/unixsock.go","/net/unixsock_posix.go","/net/writev_unix.go","/net/hook.go","/net/url/url.go","/os/exec/exec_unix.go","/os/user/lookup_stubs.go","/os/user/lookup_unix.go","/vendor/golang_org/x/crypto/cryptobyte/asn1/asn1.go","/vendor/golang_org/x/crypto/cryptobyte/asn1.go","/vendor/golang_org/x/crypto/cryptobyte/string.go","x509.go","/crypto/x509/cert_pool.go","/crypto/x509/pkcs1.go","/crypto/x509/pkcs8.go","/crypto/x509/root.go","/crypto/x509/sec1.go","/crypto/x509/verify.go","/crypto/x509/x509.go","/vendor/golang_org/x/crypto/internal/chacha20/chacha_generic.go","/vendor/golang_org/x/crypto/internal/chacha20/chacha_noasm.go","/vendor/golang_org/x/crypto/internal/chacha20/xor.go","/vendor/golang_org/x/crypto/poly1305/poly1305.go","/vendor/golang_org/x/crypto/poly1305/sum_noasm.go","/vendor/golang_org/x/crypto/poly1305/sum_ref.go","/vendor/golang_org/x/crypto/chacha20poly1305/chacha20poly1305.go","/vendor/golang_org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go","/vendor/golang_org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go","/vendor/golang_org/x/crypto/curve25519/curve25519.go","/vendor/golang_org/x/crypto/curve25519/doc.go","/crypto/tls/alert.go","/crypto/tls/auth.go","/crypto/tls/cipher_suites.go","/crypto/tls/common.go","/crypto/tls/conn.go","/crypto/tls/handshake_client.go","/crypto/tls/handshake_messages.go","/crypto/tls/handshake_server.go","/crypto/tls/key_agreement.go","/crypto/tls/prf.go","/crypto/tls/ticket.go","/crypto/tls/tls.go","/mime/grammar.go","/mime/mediatype.go","/mime/type.go","/mime/type_unix.go","/mime/quotedprintable/reader.go","/net/textproto/header.go","/net/textproto/reader.go","/net/textproto/textproto.go","/mime/multipart/formdata.go","/mime/multipart/multipart.go","/net/http/httptrace/trace.go","/net/http/internal/chunked.go","/path/path.go","/vendor/golang_org/x/text/unicode/bidi/prop.go","/vendor/golang_org/x/text/unicode/bidi/tables.go","/vendor/golang_org/x/text/secure/bidirule/bidirule.go","/vendor/golang_org/x/text/unicode/norm/composition.go","/vendor/golang_org/x/text/unicode/norm/forminfo.go","/vendor/golang_org/x/text/unicode/norm/input.go","/vendor/golang_org/x/text/unicode/norm/iter.go","/vendor/golang_org/x/text/unicode/norm/normalize.go","/vendor/golang_org/x/text/unicode/norm/readwriter.go","/vendor/golang_org/x/text/unicode/norm/tables.go","/vendor/golang_org/x/text/unicode/norm/transform.go","/vendor/golang_org/x/text/unicode/norm/trie.go","/vendor/golang_org/x/net/idna/idna.go","/vendor/golang_org/x/net/idna/punycode.go","/vendor/golang_org/x/net/idna/tables.go","/vendor/golang_org/x/net/idna/trie.go","/vendor/golang_org/x/net/idna/trieval.go","/vendor/golang_org/x/net/http/httpguts/guts.go","/vendor/golang_org/x/net/http/httpguts/httplex.go","/vendor/golang_org/x/net/http2/hpack/encode.go","/vendor/golang_org/x/net/http2/hpack/hpack.go","/vendor/golang_org/x/net/http2/hpack/huffman.go","/vendor/golang_org/x/net/http2/hpack/tables.go","fetch.go","http.go","/net/http/client.go","/net/http/cookie.go","/net/http/h2_bundle.go","/net/http/header.go","/net/http/http.go","/net/http/request.go","/net/http/response.go","/net/http/roundtrip.go","/net/http/server.go","/net/http/sniff.go","/net/http/socks_bundle.go","/net/http/status.go","/net/http/transfer.go","/net/http/transport.go","/github.com/status-im/whispervis/widgets/force_editor.go","/github.com/status-im/whispervis/widgets/force_input.go","/github.com/status-im/whispervis/widgets/loader.go","/github.com/status-im/whispervis/widgets/range.go","/github.com/status-im/whispervis/widgets/simulation.go","/github.com/status-im/whispervis/widgets/upload.go","/github.com/vecty/vthree/renderer.go","/github.com/status-im/whispervis/animate.go","/github.com/status-im/whispervis/bindata.go","/github.com/status-im/whispervis/controls.go","/github.com/status-im/whispervis/geom_ethereum.go","/github.com/status-im/whispervis/graph.go","/github.com/status-im/whispervis/keys.go","/github.com/status-im/whispervis/main.go","/github.com/status-im/whispervis/material.go","/github.com/status-im/whispervis/network.go","/github.com/status-im/whispervis/network_selector.go","/github.com/status-im/whispervis/objects.go","/github.com/status-im/whispervis/page.go","/github.com/status-im/whispervis/scene.go","/github.com/status-im/whispervis/visibility.go"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B4C;A;;;;;AAGW;A;;;;;AAGhB;A;;;;;AAGN;A;;;;;AAGQ;A;;;;;AAGc;A;;;;;AAGY;A;;;;;AAGX;A;;;;;AAGH;A;;;;;AAGrB;A;;;;;AAGI;A;;;;;AAGN;A;;;;;AAGI;A;;;;;AAGE;A;;;;;AAGA;A;;;;;AAGQ;A;;;;;AAGP;A;;;;;AASnC;A;;;;;AAKA;A;;;;AAsBA;A;;;;AAkDA;AACA;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzJA;A;;;;AAcA;A;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJA;A;;;;;AAGA;A;;;;AAIA;AACA;AACA;AACA;AAEI;AACJ;AACA;A;;;AAIA;A;AAEC;A;AAED;A;AAEC;A;AAID;A;;;;;;;;AAQA;A;A;;;;;;;;;A;AAIA;A;;;;;;;;;A;;;AA6BA;AACA;A;;;;;;AAQA;AACA;AAAyD;A;AACzD;;A;;;;;;A;;;;AA0FA;A;AAEC;A;AAED;A;;;;A;;;;AA2BA;A;;A;;;;;AClMA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;A;AAIE;A;AAEA;A;A;AAGF;A;AAED;A;;;;;A;;;;;AAUA;A;;;;;;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;ACpDA;A;;;;;AASA;A;;;;;;;;;;;;;;;;A;;;;A;;;;A;;;A;;;A;;;;A;;;;A;;;;;;;;;;;;;;;;;;;;;;;;A;AC8BC;AACA;A;AAED;A;;;;A;AAqBC;AACA;A;AAED;A;;;;A;AAaC;AACA;A;AAED;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAsBA;A;;;;AAQA;A;;;;AAIA;A;;;;AAQA;A;;;;AAIA;A;;;;AAQA;A;;;;AAIA;A;;;;AAQA;A;;;;;;A;;A;;;;;A;AASC;A;A;AAGA;A;AAED;A;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtKA;A;AAEC;A;AAED;AACA;;AACA;A;;;;;;;;A;AAKC;A;AAED;A;A;;;;;;;;AAKA;AACA;AACI;;;A;AAAe;A;A;;;;;;;;ACtBnB;;A;AACC;;A;AACC;;A;AAED;A;AAED;AACA;AACA;A;;;;;;A;AAKC;A;AAED;A;;;;A;;;;ACHA;;A;AACC;A;AAEC;A;AAEA;A;AAED;;AACA;A;AAEC;A;A;A;A;;;;;;A;AAUF;A;AAEC;A;AAGD;AACA;AACA;A;AAEC;A;AAGD;A;A;;;;;A;;;AAQA;A;;AAMA;A;;;AAKA;A;;;;AClEA;A;AAEC;A;A;AAGA;A;A;AAGA;AACA;A;A;;;;;;AAKD;;A;AACC;;A;A;;;;;;ACKD;A;;;A;;;A;;;;AC+DA;A;;;;;;;AAOA;;AACA;;;AACA;;A;AACC;AAIA;;AACA;;;A;AAEC;;;AAIA;A;AAED;A;A;A;;;;;A;A;;;;A;;;;;;;;AASD;A;A;;;;;A;A;;;;;A;;;;;;;AASA;;AACG;;;A;AACF;A;AAGD;AACA;;AACG;;;A;A;AAID;A;AAED;A;AACS;;;A;AACT;A;A;AAKC;AACA;A;AAED;A;A;AAED;A;;;;;;;AAQA;A;AAEC;A;AAED;A;AAEE;A;AAED;A;AAEC;A;A;A;;;;;;A;;A;;;;;AAiBF;A;;;;;;;;AAQA;;AACG;;;A;AACF;;;;A;A;;;;;A;A;AAMD;AACA;;AACG;;;A;A;AAED;A;AAED;;;A;AACS;;;A;AACT;;;AACA;A;A;AAKC;AACA;A;AAED;AACA;;;;A;A;AAED;A;;;;;A;;;;;;;;;AAWA;A;A;;;;;;;A;A;A;;;;;;;A;AAWA;AACA;A;A;;;;;;;A;AAIC;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;AAYD;;AACA;;;AACA;;A;AACC;AACA;;AACA;;;A;AAEC;A;AAED;A;A;AAGA;A;A;;;;;;;;AAKD;AACC;A;A;;A;A;A;;A;A;A;;;;;;AAyBD;;AACA;;A;AAKC;AACA;;A;AAEC;AACA;AACA;AACA;A;AAED;A;AAGD;;;;;;A;A;;A;;;AACC;;;AACA;;A;AACC;;A;AAED;;;A;AACC;A;A;;A;;;;;;;AAMF;A;AAEC;A;AAED;AACA;AACA;A;;;;;A;AAKC;A;AAGD;;AACA;AACA;;;;;;A;A;;A;;;A;AAEE;A;A;;A;;;;;;AAMF;AACA;;A;A;;A;AAIC;A;A;;A;;;;;;A;A;ACzSC;A;AAED;A;AAGG;AACJ;AACA;AACA;AACA;AACA;AAGC;;A;A;AAME;A;AAED;AACA;AACA;AACA;A;AAED;A;AAGC;A;A;AAGA;A;A;AAOA;A;A;A;AAMC;A;AAED;A;AAED;;A;A;AAEE;A;AAGD;A;AAEC;A;AAED;AACA;AACA;A;A;AAOE;A;AAED;A;AAOC;A;AAED;AACA;A;AAED;AACA;A;;AAEA;A;A;A;AAKD;A;A;;;;;;;;A;AAYA;AACA;A;AAID;A;AAEC;A;AAED;;A;AACC;AACA;A;AAQE;A;AAGD;AACA;;A;AACC;AACA;A;AAED;A;A;;AAOD;A;A;;;;;;;;A;AC9KA;A;AAGD;AACA;AACA;;A;AACC;AACA;A;A;;;;;;ACqLD;;;;;;AACC;AACI;;;AACH;AACA;AACA;;;;;AACC;A;;AAED;AANiC;A;AAQlC;AACA;A;;AAED;A;;AASA;A;;;AAIA;AACA;A;;;ACxMI;AACJ;A;;;;;;;;A;ACRC;AACA;A;AAED;;A;AAEC;A;A;AAGA;AACA;A;A;;;;;;;;A;AAUA;AACA;AACA;A;AAEE;AAAH;;A;A;AAEE;AACA;A;AAGD;;A;AAEC;A;A;A;AAID;A;A;;;;;;;;A;AASA;AACA;A;AAGD;AAEA;AAEA;;A;AACC;A;A;AAGA;AACA;AACA;A;A;;;;;;;;A;AAYA;AACA;AACA;A;AAID;A;AAEC;AACA;A;AAGG;;;AACH;AADuB;A;AAIxB;A;AAEC;A;A;;;;;;;AAOD;A;;;;;;AAK4B;A;;;;;;;;AACA;A;;;;;;;AC/C5B;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC+LG;;;AAAH;;A;A;;;;;A;A;;;;;A;;;;;;;;A;A;;;;;A;AAkBA;;AACK;AACJ;;;;AACA;A;A;AAGA;A;AAEA;A;AAED;A;;;;;;;;A;;;;;A;;;;;;;;AAsBA;;;;A;A;;;;;A;A;AAMC;A;AAED;A;;;;;;;;A;;;;;A;;;;;;;;A;AAyBC;A;A;;;;;A;;;;;;;;AAUE;;;AAAH;;A;A;;;;;A;AAIG;;;AAAH;;A;A;;;;;A;A;AAIC;AACG;;;A;A;AAED;A;AAEA;A;A;AAGF;A;AAED;AACC;;;;AACA;;A;AACC;;;;A;AAEC;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;A;A;AAKA;A;AAED;A;A;A;;;;;A;;;;AAS0C;A;;;;;;;;A;A;;;;;A;A;AAgB3C;A;AAED;;;;AACA;AACA;A;;;;;AAMA;A;;;;;;;;A;A;;;;;A;AAgBG;A;AACF;A;AAED;;;;AACA;AACA;A;;;;;;A;A;AAWC;A;AAEA;A;AAEA;A;AANA;A;A;AASA;A;AAED;AACA;A;;;;;;;;A;A;;;;;A;AAOA;AACG;AAAH;;A;AACC;AACA;;;;A;AAEC;A;A;;;;;A;A;;;;;A;;;;;;AAQoC;A;;;;AC5ftC;A;;;;;;;;AAQA;;AAEC;;A;AACI;;;A;AACF;AACA;A;A;AAGF;;;;A;AAIC;AACA;A;A;A;AAKC;A;AAED;A;A;A;;;;;A;;;;;AAWF;AACA;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;;;;;A;AC1CA;AACA;AACA;;AACC;AACA;A;AAEC;A;A;;;;;A;A;;;;;A;A;AAOA;A;AAEA;A;A;A;;;;;A;;;A;ACdD;A;AAED;A;;;;A;ACgFC;A;AAED;A;;;;A;A;A;AAqCE;A;AAED;A;AAED;A;;;;A;ACzCC;;;;;AACC;A;AAEC;A;A;AAGA;A;A;;AAGF;A;AAID;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;A;AAMC;;;;;AACC;A;AAEC;A;A;AAGA;A;A;;AAGF;A;AAID;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;AAiBA;AACG;A;AACF;A;AAED;A;AAEC;A;AAED;A;;;AAqEA;;AACA;A;;;;A;A;AAOE;A;AAED;A;AAED;A;;;;A;A;AAOE;A;AAED;A;AAED;A;;;;A;AAsEC;A;A;AAIA;A;AAID;AACA;AACA;;AACC;A;AAEC;A;AAEA;A;A;A;AAID;A;AAME;A;AACF;A;AAED;A;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;AC1QA;A;AAEC;A;AAED;A;AAEC;A;AAGD;A;AAEC;A;AAEA;A;AAED;A;;;;;;AAgCA;A;A;;;;;A;AAIA;AACA;A;AAKC;A;;;;;A;AAGD;AACA;A;A;;;;;A;AAIA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;;;;;A;;;;;;AAgBA;A;A;;;;;A;AAIA;AACA;A;AAKC;A;;;;;A;AAGD;AACA;A;A;;;;;A;AAIA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;A;;;;;A;AAOA;A;A;;;;;A;A;;;;;A;;;;;;AAgBA;A;A;;;;;A;AAIA;AACA;A;A;;;;;A;AAOA;A;AAEC;A;AAEG;A;;A;AAEF;A;AAFyB;A;A;AAM1B;A;AAED;;;A;A;;;;;A;A;;;;;A;;;;;;AAgBA;A;A;;;;;A;AAIA;AACA;A;A;;;;;A;AAOA;A;AAEC;A;AAEG;A;;A;AAEF;A;AAFyB;A;A;AAM1B;A;AAED;;;A;A;;;;;A;A;;;;;A;;;;A;AAYC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;AAOO;A;AAEN;AACA;A;AAEA;AACA;AACA;AACA;A;AAEA;AAGA;AACA;AACA;AACA;AACA;A;AAJA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;A;A;;;;AAOD;AACI;AACA;;;AACH;AACA;A;AAGC;AACA;A;AAED;A;AAEC;AACA;A;AAED;A;AAEC;AACA;A;AAED;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;A;AAED;A;;;;;AAKA;AACI;;;AACH;A;AAGC;AAJkB;A;A;AAOnB;A;AAEC;AATkB;A;A;AAYnB;A;AAEC;AAdkB;A;A;AAiBnB;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;AA3BmB;A;A;;A;;;;AAmCS;A;;;;AAI7B;AACI;;;AACH;A;AAEC;AACA;A;AAED;A;AAEC;A;AAED;A;AAEC;A;AAED;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;A;AAED;A;;;;AAKA;AACI;;;AACH;A;AAEC;AACA;A;AAED;A;AAEC;A;AAED;A;AAEC;A;AAED;AACG;A;AACF;A;A;AAES;A;AACT;A;A;AAES;A;AACT;A;A;A;AAED;A;AAED;A;;;;A;AAQC;A;AAEA;A;AAED;A;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClgBA;;;;;;A;AAEE;A;A;;AAGF;A;;;;A;AAKC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;;ACgCiC;A;;;;;A;AAShC;A;AAED;A;;;;;AAI+B;A;;;;;AAIH;A;;;;;AAIA;A;;;;;A;AAO3B;AACA;A;AAED;A;AAEC;A;AAED;A;;;;;AAOA;AACA;AACA;A;;;;;AAOG;A;AACF;AACA;A;AAED;A;;;;;AAOA;A;AAGC;A;AAGE;;;A;AACF;A;A;AAIA;AACA;A;AAED;A;AAMC;A;AAEA;A;AAGA;AACA;AACA;A;AAGD;AACA;AACA;A;;;;;A;AAUC;A;AAED;AACA;A;;;;;;;AAOA;AACA;;;A;AAEC;A;A;;;;;A;;;;;;;AASD;AACA;;;A;AAEC;A;A;;;;;A;;;;;;;;AAgBD;AACA;AACC;AACA;AACA;;;;A;AAEC;A;AAGD;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;;;AAcD;A;AAEE;A;A;AAGF;A;;;;;;;;AAQA;AACG;AAAH;;A;AACC;;;;A;AAEC;A;AAED;AACA;A;A;;;;;A;A;A;;;;;A;A;AAWD;A;;;;;A;;;;;;AASA;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;;;A;AASC;A;;;;;A;AAGD;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;A;;;;;;;AASA;A;AAGC;A;A;;;;;A;A;;;;;A;AAMD;AACA;A;AAEC;A;A;;;;;A;;;;;AAUD;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;A;AAQC;AACA;A;AAED;AACA;AACA;AACA;A;;;;;;;;A;AAWC;A;;;;;;;A;AAGD;A;AAEC;AACA;A;;;;;;;A;AAGD;;;AACA;AACA;A;;;;;;;A;;;;;A;AAWC;A;A;AAGA;A;AAED;AACA;A;;;;;A;AASC;A;AAED;A;AAEC;A;AAED;A;;;;;;;AAUA;;;AAGA;A;;;;;A;;;;;;;AAMA;AACA;A;AAEC;AACA;A;AAED;AACA;AACA;A;;;;;A;;;;;;;AAWA;;;A;;;;;A;;;;AAaoC;A;;;;ACzXpC;A;;;;AAuCI;;;A;AAEF;A;AAF2B;A;AAK7B;A;;;;AAsSA;A;;;;AAKA;A;;;;;AA4IA;;A;AAEC;A;AAED;A;;;;;;AAMA;;A;AAEC;;AACA;A;AAEA;A;AAED;A;;;;;;AAMA;;;A;;;;;A;AAOC;A;AAED;A;;;;;AA8BA;AACA;;AACC;AACA;A;AAEC;;;A;AAED;;;A;AACC;A;AAED;A;AAED;A;;;;;AAOI;;;AACH;;;;A;AAEC;;;A;AAED;AACA;;;A;AACC;A;A;AAGF;A;;;;;;AAcI;;;AACH;A;A;;;;;A;A;AAIA;AAL2B;A;A;;;;;A;;;;AAY5B;A;;;;A;AAKC;;AACC;A;A;AAGC;;;A;AACF;;AACC;A;A;AAGF;;AACC;;;;;;A;AAEE;A;A;;AAGF;A;A;;;;AAmBD;;A;;;;;;AAMA;;A;;;;;AA8DA;;AAEK;;;;A;AAEH;;;;A;AAEA;;;AACA;;;;A;A;AAGA;;;;A;AAEA;;;AACA;;;;A;A;AAOA;A;A;AAKA;;;;A;A;A;AAMC;A;AAED;A;AAKD;AACA;;AACC;A;A;AAGA;A;AAED;A;AAID;A;;;;AAKA;A;AAGC;A;AAEA;A;A;AAGC;A;AAED;A;AAEA;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;;A;AAIE;A;AAEC;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAGC;A;AAEC;A;AAED;A;A;AAGF;A;AAED;AACA;AACA;AACA;AACA;;A;AAEE;A;AAEC;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAUC;A;AAEC;A;AAED;A;A;AAGF;A;;;;AAKA;;;AACA;AACI;AACA;;;AACH;AADkB;A;A;AAIlB;A;AAEG;;;AACH;AACA;AACA;AACA;A;AAEC;A;A;AAGF;A;;;AASA;AACI;;;AACH;AADyB;A;AAGtB;;;;AACA;;;A;AAEF;A;AAED;AAJyB;A;AAM1B;A;;;;A;ACn6BC;A;AAED;A;;;;;AAO+B;A;;;;;;;A;A;;;;;A;AAO/B;AACA;AACA;AACA;A;;;;;;;A;A;;;;;A;A;A;;;;;A;AAYA;A;AAEC;A;AAED;A;;;;;AAKA;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAKA;A;AAEC;A;AAED;AACA;A;;;;;;;;A;AAMC;A;;;;;;;A;AAGD;AACG;A;AACF;A;;;;;;;A;AAGD;;;AACA;AACA;A;;;;;A;AAMC;A;AAED;AACA;AACA;A;;;;;AAKA;AACI;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAGA;A;AAED;AACA;A;;;;;;;;AAKA;A;A;;;;;A;AAIA;AACA;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;;AAIkC;A;;;;AAGA;A;;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5GlC;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;AAKA;A;;;;;AAI6B;A;;;;;AAK7B;A;;;;;AAIA;A;;;;;;A;AAcC;AACA;AACA;A;A;AAIA;A;AAIG;;;AACH;;;;A;AAEC;A;AAED;A;AAEC;AACA;A;A;AAGA;A;AAXwC;A;AAc1C;A;;;;;;;AAIA;AACA;AACA;A;;;;;;A;AASC;A;AAGD;;AACC;A;A;AAIA;A;AAIG;AACD;A;AAEF;AACA;A;AAEC;A;A;AAGF;A;;;;;;;;;A;A;;;;;A;A;AAaC;A;AAED;AACA;AACC;AACA;;A;AACC;AACA;A;A;AAGA;A;AAED;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;;;;;;AAgBD;A;A;;;;;A;AAIA;;A;A;A;;;;;A;AAIC;;A;AAGC;;;;A;AAEC;A;A;AAGA;AACA;A;A;;;;;A;AAMF;AACA;AACA;;;;A;AAEC;A;A;A;;;;;A;AAKD;A;AAID;AACA;AACA;AACA;A;;;;;A;;;;;;;AAOA;AACA;;A;AAEE;A;AAED;A;AAED;AACA;AACA;AACA;A;;;;;;A;AAMC;A;A;AAIA;A;AAGA;A;AAED;AACA;AACA;AACA;A;;;;;;;;;AAOA;;AACC;A;AAED;A;A;;;;;;;A;AAIA;;;;A;AAEC;;;A;AAED;AACA;AACA;A;;;;;;;A;;;;;;A;AAUC;A;AAED;AACA;AACA;AACA;A;;;;;AAIiC;A;;;;;;;;AAajC;AAEI;A;AACF;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;AAGD;A;AAIE;A;AACF;AACA;A;AAGD;A;;;;;;;;;;AAoBA;;;;A;A;A;AAQG;A;AAED;AACA;A;A;;;;;;;A;A;A;AAOA;A;AAED;A;AAED;A;AAGC;A;AAEC;A;AAED;A;AAED;A;;;;;;;AAaI;AACA;AACA;AACJ;AACK;AACJ;;;;A;AAEC;A;A;AAGA;AACA;A;AAID;AACA;AACA;A;AAID;AACA;;;;;AACC;A;;AAED;AAGA;AACA;AACA;;;;;AACC;A;;AAED;AACA;A;;;;;;;AAWA;;;;AACA;A;;;;;;;;;AAQA;;;;A;AAEC;A;AAGE;;;AAAH;;A;AACC;;;;AACA;A;;;;;A;AAIE;;;AAAH;;A;AACC;;;;AACA;A;;;;;A;AAID;;A;AACC;A;AAGD;;AAEC;;;;AACA;A;A;;;;;A;AAIA;A;A;AAIA;A;A;;;;;A;;;;;;;AAUD;;;;A;AAEC;A;AAED;AACA;A;;;;;AAuBA;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;AAQA;A;;;;;AAI6B;A;;;;;AAK7B;AACA;AACA;A;;;;;;A;AAMC;A;A;AAGA;A;AAED;;;;A;AAEC;A;A;A;AAIC;A;AAED;AACA;AACA;A;AAED;AACA;A;;;;;;AAIkC;A;;;;;AAGD;A;;;;;;;;AAOjC;;AACK;AACJ;;A;AAGC;;;;A;;AAEA;AACA;AACA;;A;AAED;AACA;A;A;A;;;;;A;AAKD;AACA;AACA;A;;;;;A;;;;;;;A;AAOC;A;AAED;;;;;A;AACC;A;AAED;AACA;AACA;A;;;;;;;;;AAMA;;A;AACC;;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASD;AACA;;A;AACI;;A;A;;;;;A;AAGH;AACA;;A;A;;;;;A;A;AAKD;AACA;A;;;;;A;;;;;;;AASA;AACA;;AACC;AACA;AACA;AACA;AACA;;A;A;AAGA;A;AAED;AACA;AACA;AACA;A;;;;;;;;;AAOA;;A;AACI;;;AAAH;;A;A;;;;;A;A;AAIG;AACJ;AACC;;A;AACI;;A;A;;;;;A;A;AAIJ;AACA;;AACC;;;;A;AAEC;A;AAED;A;A;A;;;;;A;AAKD;AACA;A;AAEC;A;A;AAGF;;A;AAEC;;A;AACC;;A;;AAEA;A;A;A;;;;;A;;;;;AAiBF;A;;;;ACjpBA;A;;;;;A;AAUC;A;AAED;A;;;;;AAOA;A;;;;;AAMA;A;;;;;;A;AAwBC;A;AAED;AAEA;AAIC;;A;AACC;;;;;A;A;AAGE;AACA;AACA;A;AAED;AACA;A;A;AAGA;A;AAED;A;A;AAGE;A;AAGA;A;AAEC;A;A;AAGF;A;A;A;AAOD;AACA;AACA;A;A;AAMA;AACA;AACA;A;A;A;AAOC;AACA;A;AAED;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;AACA;AACA;A;AAKG;;AACH;;;;AACA;A;AAEC;AACA;A;A;AAGA;AACA;A;AAED;A;AAEC;AACA;A;A;A;A;;;;;;;A;AASF;AACA;A;A;AAGA;AACA;A;AAED;AACA;A;;;;;A;AAMC;A;A;;;;;A;AAeA;A;AAED;AACA;A;;;;;A;AASC;A;AAED;A;;;;A;AAwDC;A;AAED;A;;;;;;A;A;;;;;;;A;AAaG;A;A;;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;ACjTH;A;;;;A;AASC;A;AAED;A;;;;AAIA;A;;;;AAgBA;A;;;;;;A;;;;A;;;;A;AA0BC;A;AAEA;A;A;;;;A;AAMA;A;A;AAGA;A;AAED;A;;;;;A;;A;;;;A;A;AAUE;A;AAED;A;AAED;A;;;;A;AAKC;A;AAED;A;;;;AAYA;A;;;AA2BA;A;;;;AAeA;A;;;;AAIA;A;;;;AAYA;A;;;;AAyBA;AACA;AACA;AACA;A;;;AAIA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;A;;;;ACjPA;A;;;;;;A;A;;;;;A;A;;;;;A;;;;;A;A;;;;;A;A;;;;;A;ACaA;;;AACA;AACA;AACA;AACA;AACA;AACA;A;;;A;ACZC;A;AAEA;A;AAED;;;AACA;AACA;AACA;A;AAEC;A;A;A;AAIC;A;AAED;A;AAEG;A;AAEH;AACA;A;AAED;AACA;AACA;A;;;ACxBA;;;A;AAIC;A;AAED;A;;;;A;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA;A;AAEE;AACA;A;A;A;;A;AAOD;A;AAED;A;;;AAIA;A;AAEC;AACA;A;AAGD;AACA;AACC;A;AAEC;A;AAED;AACA;A;A;;;AASD;A;;;;AAKA;;;;;;A;AAEE;A;A;;AAGF;A;;;AClDA;A;AAEC;A;AAED;AACA;AACA;AACI;;;AACH;AACA;AAFiC;A;AAIlC;A;;;;AAwBA;AACC;A;A;A;AAKC;A;AAED;AACA;A;AAEC;A;AAED;A;AAED;A;;;;;;;AAIG;A;AACF;A;;;;;;;A;A;AAIA;AACA;AACA;AACA;A;;;;;;;A;A;AAIA;A;AAED;A;;;;;;;A;;;;;;;AAKG;A;AACF;A;;;;;;;A;A;AAIA;A;A;;;;;;;A;;;;;;;AAME;A;AACF;A;;;;;;;A;AAGD;A;;;;;;;A;;;;AAuBA;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;AACA;A;;;;;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;A;A;AC3GC;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAGA;A;A;;;A;A;AAOA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAGA;A;A;;;;;;AASD;AACA;AACA;;AACC;;;A;A;;;;;;;A;AAIA;AACA;AACA;;;A;AAEC;A;A;AAGA;A;AAGD;;;A;AAEC;A;AAED;AACA;;;;;;A;AAEE;AACA;A;A;;A;AAKD;A;AAED;AACA;AACA;A;A;;;;;;;A;;;;AC9DD;AACA;;;;;;AACK;;;A;AAEF;AACG;;A;AACF;A;AAMA;A;AAED;A;AAZsB;A;A;;A;;;;;;AAiCzB;A;A;;;;;A;AAKA;AACA;AAEA;;;A;A;;;;;A;AAIA;AACI;;;A;A;;;;;A;AAAoB;A;A;;;;;A;;;;;ACWE;A;;;;;AAG1B;;;A;A;;A;A;AAKC;A;AAEA;A;AAED;;A;;A;;;;A;;;A;;;ACvFA;A;AAIC;A;AAIA;A;A;AAOC;A;A;A;AAID;A;AAED;A;;;A;ACjCC;A;AAED;A;;;AAII;AACJ;AACA;;AACC;AACA;AACA;A;AAED;AACA;A;;;ACyBI;;;A;AAEF;A;AAFsB;A;AAKxB;AACA;AACA;A;;;;;;;A;;;;;A;;;;;AAuCA;A;;;;;;ACxBI;A;;;;A;;;;;A;AA8EH;A;AAED;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;;A;;;;;AAIA;AACA;A;AAEC;A;AAED;AACA;AACI;;;AACH;AADkB;A;AAGnB;;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AADiC;A;AAGlC;;A;;;;A;A;AAMC;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAGA;;;A;AAEC;A;AAED;AAMA;AACI;;;A;AAIF;AACA;A;AALiB;A;AAQnB;AACA;AACA;A;AAGA;;;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAGA;;;AACA;AACA;AACA;AACA;AACI;;;AACH;AAD6B;A;AAG9B;A;AAED;A;;;;;;AAII;AACA;AACJ;;;A;AAEC;A;A;AAOA;A;;;;;;;A;AAGD;;;A;AAEC;AACA;A;AAED;A;;;;;;AAII;AACA;AACD;A;AACF;A;A;AAKA;AACA;A;A;;;;A;;;;;;;;;AAqDG;AACA;AACJ;;;AACA;AACI;A;AAEH;AACA;A;AAEG;A;A;AAIF;AACA;A;AAED;AACA;A;AAED;AACA;AACG;;;A;AACF;A;AAED;AACA;A;AAGC;;;A;AAED;A;;;;;;;;;;AAWI;AACA;AACJ;;A;AACC;;;;;A;A;;;;;A;A;AAKG;AACJ;AACA;AACI;A;AAEH;AACA;A;AAEG;A;A;AAIF;AACA;A;AAED;AACA;A;AAED;AACA;AACG;;;A;A;;;;;A;A;AAIF;A;A;;;;;A;;;;;;;AAsBD;;;A;A;;;;;A;AAMA;AACG;A;A;;;;;A;A;A;;;;;A;AAQH;AACG;A;A;;;;;A;A;AAMF;A;A;;;;;A;;;;;;AC/ZG;AACJ;AAEA;AACA;;;A;A;;;;;A;AAOG;A;A;;;;;A;A;;;;;A;;;AAOH;A;;;AAIA;A;;;AAIA;A;;;;AC7CA;A;;;;;AAIA;A;;;;;;;;;A;A;;;;;A;ACaA;;;;A;A;;;;;A;AAMI;AAOJ;AAGA;AACA;AACA;AACA;A;;;;;A;;;;;;;;A;A;;A;AAUA;AACA;AACA;AACA;A;A;;A;AAMG;;A;A;;A;AAGH;A;;A;;;;;;A;AAeC;A;AAEC;A;A;AAGF;A;;;;;AAIA;A;;;;;AAIA;A;;;;A;A;AAgBC;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;AAoBA;;;A;A;AAGE;A;A;AAGA;A;A;A;AAID;A;AAED;A;;;;;;A;AAKC;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AA8BA;;;;;A;A;;A;A;;A;;;;;;;AAQA;;;;;A;A;;A;A;;A;;;;;;;AAQI;AACA;AACD;A;AACF;A;A;;;;A;;;;;;AAMG;AACJ;AACA;A;;;;;A;;;;;;;AAKI;AACA;AACD;;;A;AACF;A;A;AAGA;;;A;AAED;A;;;;;;AAIA;;;;;A;A;;A;A;;A;;;;;;A;;A;;;;;AAYI;A;;A;;;;;A;;A;;;;;A;;;;A;;;;;A;;;;A;;;;;A;;;;A;;;;;;A;A;;;;;A;AAoCJ;;;AACA;A;;;;;;ACpRA;;;;;AACA;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;AAMA;;;;A;AAEC;A;AAED;A;;;;AAMA;;;;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;;;AAgBI;A;AAEH;A;AAEA;A;AAED;;;;;AACA;A;AAEC;A;AAED;A;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;A;AAEC;A;AAED;A;;;;;AAMA;;;;;AACA;A;AAEC;A;AAED;A;;;;;AAMA;;;;;AACA;A;AAEC;A;AAED;A;;;;AAiBI;A;AAEH;A;AAEA;A;AAED;;A;AAEC;A;AAED;A;;;;;AA+BA;;;AACA;A;AAEC;A;AAED;A;;;;AA6FI;AACJ;;;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;AAoCA;;A;AAEC;A;AAED;A;;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;;AAoCA;;A;AAEC;A;AAED;A;;;;;AAgBA;;A;AAEC;A;AAED;A;;;;;AAMA;;A;AAEC;A;AAED;A;;;;;AA2BA;;;;A;AAEC;A;AAED;A;;;;;AAgBA;;A;AAEC;A;AAED;A;;;;;AAMA;;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;AAyDA;;AACA;AACA;A;;;;;AAsHA;;A;AAEC;A;AAED;A;;;;;AAMI;AACJ;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;AAuHI;AACJ;;;A;AAEC;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;;AAsBI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;;AAMI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;AA+DI;AACJ;;;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;;AAwJI;AACJ;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;AAyFI;AACJ;;;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;;AAqBI;A;AAEH;A;AAEA;A;AAED;;;AACA;A;AAEC;A;AAED;A;;;;;AAMA;;;AACA;A;AAEC;A;AAED;A;;;;AAMA;;A;AAEC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClzCA;;;A;;;;;A;;;;;A;AAOC;A;AAED;A;;;;;;;AAOG;;;A;A;;;;;A;A;AAIF;A;AAED;A;;;;;A;;;;;A;AAOC;A;AAED;A;;;;;;AAcA;;;;;;A;A;;A;;;AACC;;;A;AACC;A;A;;A;;;;;;;A;ACrDD;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;AAgDA;A;AAEC;A;A;;;;;AAMD;A;;;;;A;AAMC;A;A;;;;;;;A;ACvDA;A;A;AAGA;A;AAED;AACA;AACC;AACA;A;AAED;A;;;;;;;;ACQA;;A;AACC;;A;AACC;;A;AAED;A;AAED;AACA;AACA;A;;;;;;A;AAMC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/CI;A;;;AAcJ;AACA;AACA;AACA;A;AAEC;AACA;A;AAED;AACA;A;;AAIA;A;;;;;;AAIA;A;;;;;;;A;;;;;AAKA;AACA;AAAyD;A;AACzD;;A;;;;;;AAIA;AACA;A;AAEC;A;A;AAGA;A;AAED;;AACC;A;AAEC;AACA;A;AAED;A;A;;;AAKD;AACA;AACA;AACA;A;;;AAYA;A;;;A;AC8CC;A;AAED;AACA;A;;;;;;AAMI;;;AACI;A;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;AA2GL;AACA;AACA;;AACC;A;A;AAIA;A;AAEC;A;AAED;A;;;;;;;A;A;A;AAvHyB;A;A;;;;;;;A;;;AAqLzB;;;AACH;AACA;A;AAGC;AACA;A;AAEC;A;A;AARsB;A;AAYzB;A;;;AAIA;;;;;;A;AAEE;A;A;;AAGF;A;;;AAOA;A;AAEC;AACA;A;AAIG;AACJ;AACA;;AACC;AACA;AACA;AACA;A;AAED;AACA;AAGI;;;AACH;AADiC;A;AAIlC;A;;;;;AAQA;A;AAEC;AACA;A;AAED;;;;AACA;A;A;;;;;A;A;AAKC;A;A;;;;;A;;;AAQD;AACI;AACA;;;AACH;AACA;AACA;A;A;AAIA;A;A;AAGA;;AACC;A;A;AAGA;A;A;AAGF;AACA;A;;;;;AAcA;;A;AAIC;AACA;A;AAEC;AACA;A;AAED;;;;AACA;;;;AACI;AACJ;AACA;AACA;A;AAEC;AACA;A;AAED;AACA;AACA;AACA;A;AAED;A;;;;;;;AAqBI;AACJ;A;AAEK;AACJ;A;AAEA;A;AAED;;AACA;A;;;;;;;AAOC;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAGD;;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;A;AAIC;;;;A;A;AAKA;;;;A;AAGD;A;A;AAEC;A;AAEC;A;AAED;A;AAEA;A;AAEA;A;AAEA;AACA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;AACA;A;AAEA;A;A;AAGC;A;AAED;A;AAEA;A;AAEA;A;AAGA;A;AAEC;A;AAED;A;AAGA;A;AAEC;A;AAED;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAGC;A;AAEA;A;A;A;AAIA;A;AAEA;A;A;A;AAMA;AACA;A;AAED;AACA;A;AAEC;AACA;AACA;A;AAEA;A;AAED;A;AAEC;A;A;AAGA;A;A;A;AAMC;A;AAED;A;A;A;AAKA;AACA;A;AAID;A;AAEC;AACA;A;AAEA;A;AAED;AACA;A;AAEA;A;A;A;AAGF;A;;;;;AAeA;A;;;;A;AAMC;A;AAMD;A;;;;A;AAOC;A;AAED;AACA;A;;;A;AAQC;A;A;A;AAIC;A;AAED;A;AAED;A;;;AAIA;;AACC;A;AAED;A;;;AAMA;;A;A;AAGG;A;AAED;AACA;AACA;A;A;AAGA;A;AAED;AACA;A;AAED;A;;;;AA0CA;;A;;;;;;AAaA;;;;AACA;AACA;AACA;AAIC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAID;AACK;AACJ;;;;AACA;AACA;;;A;AAEC;A;A;A;AAIC;A;AAED;A;AAED;AACI;AACJ;A;A;A;AAGE;AACA;A;AAED;;;;AACA;;;A;AAEC;A;AAEA;A;A;A;AAIA;AACA;A;AAED;;;;AACA;;;A;AAEA;;;;AACA;A;AAEA;;;;AACA;A;AAEA;;;;A;AAEC;A;A;AAID;;;A;AAEA;;;A;A;AAGC;A;AAED;;;;A;AAGC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;A;A;AAGD;;;;A;AAEC;AACA;A;A;AAKA;;AACA;A;AAGC;A;AAGD;AACA;;AAA2C;A;AAE3C;;;;AACA;A;A;A;AAIA;AACA;A;AAED;;;;A;A;AAGC;A;AAEA;A;AAEA;A;A;A;AAIA;AACA;A;AAED;;;;A;A;AAGC;A;AAEA;A;AAEA;A;A;A;AAIA;AACA;AACA;A;AAEG;;;;;;;;A;A;AAGF;AACA;A;A;AAGA;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;A;AAGC;AACA;A;AAED;;;;;;;;;;A;AAEG;;;;;;AACJ;;;A;AAEC;;;A;A;AAGA;;;A;AAED;A;A;A;AAIC;A;AAEA;A;A;A;AAKA;AACA;AACA;A;AAED;;;A;AAEC;AACA;A;AAED;;;;A;AAKA;A;AAEC;AACA;A;AAED;;;;AACA;A;A;AAKC;A;AAID;AACA;;AACC;A;AAED;;;;AACA;A;A;A;AAGA;A;A;AAGA;A;A;A;AAID;A;AAEA;A;A;AAKA;A;AAGD;;A;AACC;;A;AAGD;;A;AACC;;AACA;AAIA;;;;A;AAEC;AACA;A;AAID;AACA;A;AAGD;;A;AACC;;AAGA;;;;A;AAEC;AACA;AACA;A;A;AAKA;;AACA;A;AAED;AACA;A;AAID;;A;;;;;;A;A;;;;;A;A;A;;;;;A;A;AAuBC;A;;;;;A;A;AAKA;A;;;;;A;AAIG;AACA;;;A;AAEF;A;AAEE;A;AACF;A;AAL0B;A;A;A;A;;;;;A;A;A;;;;;A;A;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;AA8B5B;A;AAEC;A;AAGD;A;;;AAOA;A;AAEC;A;AAED;;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;AACA;A;AAEE;;;A;AACF;A;A;AAGA;AACA;A;AAKD;AACI;;;AACH;AAD4B;A;AAG7B;A;;;;;;AAOA;AACA;;AACC;A;AAEC;A;A;A;;;;;;;A;AAMD;A;A;;;;;;;A;AATiB;A;A;;;;;;;A;;;A;AC5pCjB;A;AAED;A;AAEC;A;AAED;A;;;;A;AAuCC;A;AAED;A;;;;AAMA;AACA;AAQA;AACA;A;;;;;A;AA6BC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;AASA;A;A;A;A;;;;AAaA;A;;;;AAOA;AAOA;AACA;A;;;;AAIA;A;;;A;ACrJC;A;AAKD;AACA;AASA;AACA;A;;;;;AAOA;A;;;;;AC+GA;A;;;;;A;AAMC;A;AAED;A;;;;;AAIgC;A;;;;;A;AAK/B;AACA;A;AAEC;AACA;A;AAID;A;AAID;A;;;;;A;AAMC;A;AAED;AACA;A;;;;;A;AAMC;AACA;A;A;;;;;A;AAkCA;A;AAED;AACA;AACA;A;;;;;A;AAMC;A;AAED;A;;;;;A;AAUC;A;AAED;A;;;;;A;AAuCC;A;AAED;AACA;AACA;A;;;;;A;AA6BC;A;AAED;AACA;AACA;A;;;;;AA2GA;A;;;;;;AAMA;AAEA;;A;AACC;;A;AAED;AACA;;A;AACC;;A;AACC;A;;AAEA;;;AACA;A;A;AAGF;A;;;;;;;;;;AAMA;AACA;;A;AACC;;A;AAGD;AACA;;A;AACC;;A;AACC;AACA;A;;AAEA;;;;A;AAED;A;;AAEA;A;AAED;AACA;A;;;;;;;;;;AAKA;;;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;AACA;A;;;;;;;AAKA;;;A;;;;;AAMA;AACA;A;;;;;;;AAQA;;;;;;AACA;;AAgBA;AAMA;A;AAEC;A;A;AAMA;AACA;A;AAKC;A;A;A;AAQE;A;AACF;AACA;A;A;AAIF;A;;;;;;;;;;A;;;;;;;A;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAKA;;A;;;;;;;AAKA;;A;;;;;;;AAKA;;A;;;;;;AAMA;A;;;;;;AAMA;;;AACA;A;;;;;;AAuCI;AACJ;AAEA;AACA;A;AAEC;A;A;AAMI;AACJ;AACA;AACA;A;AAGC;A;AAGA;AACA;A;AAGA;AAEA;AACA;A;AAGA;AACA;A;AAED;;;AACA;A;AAEA;AACA;AAEA;;;AAGA;AACA;A;AAIC;AACA;AACA;AACA;A;AAKC;AACA;AACA;A;A;A;A;AAMF;AACA;A;AAGD;A;;;;;;AASA;AACA;AACI;;;AACH;AACA;A;AAEC;AACA;A;AAED;AAPqB;A;A;AAUrB;AACA;A;A;;;;;A;;;AAQD;A;AAEC;AACA;A;AAEA;;AACC;AACA;AACA;A;A;AAGF;A;;;;AAIuC;A;;;;;AAavC;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;A;AAOC;A;AAED;A;;;;AAMA;A;;;;A;AAWC;A;AAED;A;AAEC;A;AAEC;A;AAEE;A;AACF;A;AAED;A;A;AAGA;A;AAEE;A;AACF;A;AAED;A;;;;;AAKA;AACA;A;AAEC;AACA;A;AAEA;AACA;A;AAED;AACA;A;AAEC;A;AAGC;A;AAEA;A;A;AAGF;A;;;;;A;AASC;AACA;AACA;A;AAEC;A;A;AAGA;A;AAED;A;AAED;A;AAIC;A;AAEA;A;AAEA;A;A;;;;AAOD;A;;;;AAMA;A;;;;;;AAYA;;;;;AACA;;;;;AACA;;A;;;;;;;;;;;A;;;;;;;;A;;;;;;;;;AAsBA;AAGA;AACA;AACA;AAMA;AACA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AACA;AAEA;AACA;A;AAGC;A;AAGD;A;A;AAME;A;AAGA;AACA;AACA;A;A;AAMF;AACA;AACI;A;AAEH;AACA;A;AAEA;A;AAGD;AACA;AACA;A;;;A;AAwBC;A;AAED;A;;;AAQA;;;;AACA;A;AAEC;A;AAED;A;;;;AAIA;A;;;;AAKA;AACA;A;;;;;AAKA;AACA;A;;;;;A;AAUC;A;AAED;AACA;A;;;;;AAKA;A;AAEC;A;AAED;A;;;;;;;;AAMA;;;;AACA;A;;;;;;AAOA;A;;;;;AAUA;A;;;;;;AAOI;AAEJ;;A;AACC;A;;AAEA;;;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAGD;AACA;AACA;AAkBA;A;;;;;;;AAKA;A;AAEC;A;A;AAIA;A;A;AAIA;A;AAGD;AACA;AAGA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;;A;AACC;A;;AACS;;;A;AACT;A;AAEA;A;A;AAGD;A;;;;;;;AASA;;A;;;;;;;AAKA;;A;;;;;;;AAMG;;A;AAGF;A;AAGD;AACA;AACA;;AACA;AACA;A;;;;;;;A;AAQC;A;AAGG;AACJ;;;;AACA;A;;;;;;;AAMG;;A;AACF;A;AAGD;AACA;;A;;;;;;;AAOI;AACJ;;;;AACA;A;;;;;A;AAUC;AACA;AACA;A;AAEC;AACA;A;A;AAGF;A;;;;AAIA;A;;;;;A;AAQC;AACA;AACA;A;A;AAGA;AACA;AACA;A;A;;;;;A;;;;A;AAuBA;A;AAID;AACA;;;AACA;AAGA;;;AACA;;;AACA;;;AACA;;;AAEA;AAKA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AAGA;A;AAEC;A;AAID;AAGA;AACA;AAEA;AAMA;;;;;AACA;;A;AACQ;AACP;;;A;AACC;;;A;A;AAEA;;;A;A;AAED;A;AAGD;AACA;AACA;A;;;;;;AAWA;A;AAEC;A;AAED;;AACA;A;;;;;AAYA;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;;AAOA;AACA;AACA;A;AAGC;AACA;AACA;A;AAEC;AACA;A;A;A;AAOD;AACA;A;AAIA;AACA;AACA;A;AAQA;AACA;AACA;AACA;AACA;AACA;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAKD;AACA;;AACC;A;AAED;AACA;AACC;A;AAGC;AACA;;;;A;AAEC;A;AAED;A;A;AAGA;A;AAED;AACA;AACA;A;AAED;A;A;AAUA;AACA;A;AAED;A;;;;;A;ACx6CC;A;AAED;;A;AACC;A;AAED;A;;;;;;;AAMA;;A;;;;;AAMA;AAOA;AACA;A;;;;;;;;;;AAWA;;A;AAGC;AACA;AACA;AACA;AACA;A;AAGE;A;AACF;AACA;AACA;AACA;AACA;A;A;AAIA;AACA;AACA;AACA;A;AAEC;A;AAEA;A;AAED;A;AAKD;AACA;AACA;AACA;AACA;;AACC;AACA;A;AAEC;AACA;A;AAEA;A;A;AAGF;AACA;AACA;AACA;AAEA;A;;;;;;A;AAqBC;A;A;AAKI;;;A;AAEF;A;AAFyC;A;A;AAQ5C;;;;;A;AAEE;A;A;;AAKF;A;;;;;AAMA;;;;;A;AAEE;A;A;;AAGF;A;;;;;;;;AAOA;;AAQA;;;;;AACC;AACA;;A;AACC;;;;A;A;;;;;A;A;A;;AAQF;;;;;AACC;A;A;;;;;A;A;;AAOD;A;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3OwC;A;;;;;A;;;;;AAIX;A;;;;;A;AAI5B;A;AAED;A;;;;;AAGoD;A;;;;;AAEC;A;;;;;A;AAIpD;A;AAED;A;;;;;AAGiD;A;;;;;AAEC;A;;;AAIhB;A;;;;AAES;A;;;;AAEI;A;;;;AAEC;A;;;;;AAUhD;;A;AACC;AACA;AACA;;A;A;A;;;;;;A;AASD;A;AAEC;A;AAGD;AACA;AACA;A;AAEC;A;A;A;;;;;A;ACnDA;A;AAED;A;;;;AAUyC;A;;;;;AACA;A;;;;;AACA;A;;;;AAIzC;;AACC;A;AAEC;AACA;A;AAED;AACA;A;A;;;;ACFD;AACC;A;AAEC;A;AAED;A;AAEC;A;A;AAGA;A;A;A;;;;;;AAQF;AACC;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AACA;;A;AAGC;;AACC;AACA;A;AAED;;AACC;AACA;A;AAED;A;A;A;;;;;;;AAQF;AACC;A;AAEC;A;AAED;A;AAEC;A;A;A;;;;;;AAQE;;;;;;AACA;A;AAEH;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;A;AAED;AACC;A;AAEC;A;AAEG;A;AAGH;A;AAEC;A;A;AAID;A;AAEC;A;A;AAGF;;A;A;AAEE;A;AAED;A;A;A;;;;;;;;AASE;;;;;;AACA;A;AAEH;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;A;AAED;AACC;A;AAEC;A;AAGD;A;AAEC;A;AAED;;A;AACC;;A;AACC;A;AAED;A;A;A;;;;;;;A;AAaD;A;AAED;A;;;;;;AAOA;;A;AACC;;A;AAED;A;;;;;;;AAMA;;;A;AACC;A;AAED;A;;;;;;;AAOA;;;A;AACC;;A;A;;;;;;;;AAOD;;;A;AACC;A;AAED;A;;;;;;;AAOA;;;A;AACC;;A;A;;;;;;;A;ACxOA;A;AAED;A;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;A;ACCC;A;A;AAGA;AACA;A;AAED;A;AAIC;A;AAED;A;;;;;;AAQA;AACA;;AACA;AACA;AACA;A;;;;;;;AAMA;;;A;AACC;A;AAQD;AAIA;;AAQA;;A;AACC;A;AAGD;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AAIA;AACA;A;;;;;;;AAYG;;A;AACF;A;AAED;A;AAOC;A;AAEE;A;AACF;A;A;AAGA;A;AAED;AACC;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAOD;A;A;AAGF;AACA;A;A;;;;;;;;AASE;A;AACF;A;A;AAGA;A;AAED;;;A;AAEC;A;AAED;;AACA;AACA;A;;;;;;;AAKG;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAIH;AACA;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;;;A;A;AAIK;A;AACF;A;A;A;AAIH;AACA;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAEG;AACJ;AACC;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;A;AAGG;A;AACF;A;A;A;AAID;A;A;AAGA;A;A;A;;;;;;;;AAUC;A;AACF;A;AAED;AACI;AACJ;AACC;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;A;;;;;;;;AAOC;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;A;AAEI;A;AACF;A;A;A;AAID;A;AAED;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;;A;AAEI;A;AACF;A;A;A;AAID;A;AAED;A;A;;;;;;;;AAME;;A;AACF;A;AAED;AAEG;A;AACF;A;AAED;AACC;;;;;;A;AAEC;A;A;A;A;AAKI;A;AACF;A;A;A;AAOF;A;AAED;A;A;;;;;;;;AAME;A;AACF;A;AAED;AACA;A;;;;;;;AAOG;A;AACF;A;AAED;AACA;AACC;;;A;AAEC;A;AAEI;A;AACF;A;A;A;AAKH;A;A;;;;;;;;AAME;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;A;AAUC;;;A;A;AAGC;A;AAKA;A;AAEA;A;A;AAGF;;A;;;;;;AAMA;AACA;AACA;;;A;AAEC;A;AAED;AACA;A;;;;;;AAKG;A;AACF;A;AAED;AACA;;A;;;;;;AAOA;A;;;;;;AAKG;;A;AACF;A;AAED;AACA;A;;;;;;;AAMG;A;AACF;A;AAED;AACA;AACA;A;;;;;;;AAKG;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;A;AACC;A;AAEE;A;AACF;A;A;A;;;;;;;;AAOC;;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACC;;;A;AACC;A;AAEE;A;AACF;A;A;A;;;;;;;;AC5hBC;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;;ACtBG;A;AACF;A;AAED;AACA;A;;;;;;;ACJG;A;AACF;A;AAED;AACA;A;;;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;;ACFA;;;;;A;AAEC;A;A;AAGA;A;AAEE;AAAH;;A;AACC;;AACA;A;AAED;A;;;;;;;AClBG;;A;AACF;A;AAED;AACG;A;AACF;A;AAGG;A;AAEH;A;AAKD;AAEI;AACA;AACJ;;AACC;AACA;;;;;A;AAEE;;A;AAED;A;AAEC;AACA;A;AAED;A;AAEC;A;A;;A;AAID;A;AAED;AAEA;;;A;AAKC;A;AAED;AACA;AACA;A;AAEI;A;AACF;A;A;AAGD;A;A;AAGA;A;A;AAGA;AACA;A;A;AAGF;A;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A;;;;;;;;;;;;;A;;;;;A;;;;;A;;;;;;;;;;;;;ACvCA;A;AAEC;A;AAED;A;;;;;AAKG;AAAH;;A;AACC;A;A;;;;;;;AAME;AAAH;;A;AACC;A;A;;;;;;;AAME;AAAH;;A;AACC;A;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvDD;A;;;AAIG;A;AACF;AACA;AACI;;;AACH;AADgC;A;A;A;AAKjC;A;A;;A;;;;;A;ACAA;A;AAED;;A;;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;;;;ACLA;A;AAEC;A;AAED;;;;AACA;AACA;;;;;AACC;;;;A;AAIC;;A;A;A;;;;;A;AAKD;A;;A;AAKA;A;A;;;;;A;;;;;;;;;A;AAQA;AAEA;A;AAED;AAEA;A;AAEC;AACA;A;AAGD;AACA;;AAEC;;A;AACC;AACI;AACJ;;;;AACA;A;A;;;;;A;A;AAKC;A;A;AAKE;;;;AACJ;;;;AACA;AACA;A;A;A;;;;;A;A;;;;;A;;;;;;ACoBD;AACA;;;AACA;A;;;;;;;ACvEoC;;A;;;;;;;AAIpC;;;AACA;;;;A;;;;;;;AASuC;;A;;;;;;;AAIvC;;;AACA;;;;A;;;;;A;AAQC;A;AAED;A;;;;AAOA;A;;;;AAOA;A;;;;AAOA;A;;;;AAYA;A;A;AAEC;A;A;AAEA;A;A;AAEA;A;AAED;A;;;ACzFG;;A;AACF;A;AAED;A;;;ACLA;AACA;A;;;AAIA;AACA;A;;;AAIA;AACA;A;;ACgDmB;A;;;;;ACrBW;A;;;;;;AAgD9B;;A;;;;;;;;;AAOG;A;A;;;;;A;AAGH;;;;A;;;;;A;;;;;;;;;AASG;A;A;;;;;A;A;A;;;;;A;AAQH;;AACC;;;;A;AAEC;AACA;A;AAED;AACA;AACA;A;AAED;A;;;;;;;;;AAOG;A;A;;;;;A;AAGH;;;;A;AAEC;A;A;AAGA;A;AAGD;A;AAGC;A;A;;;;;A;;;;;;;;;AAUE;A;A;;;;;A;A;A;;;;;A;AAQH;;AACC;;;;A;AAEC;AACA;A;AAED;AACA;AACA;A;AAED;A;;;;;;;;;AASG;A;A;;;;;A;AAGH;;;;A;AAEC;A;A;A;;;;;A;A;;;;;A;;;;;;;;;A;;;;;A;;;;;;AAuCD;;;;A;AAEC;A;AAED;;;;;A;;;;;AAwBA;;A;;;;;;AAkBA;AACA;;A;;;;;;A;AA4BC;A;A;AAGA;A;AAED;A;;;;;AAaA;;A;;;;;AAwE8C;A;;;;;;AAIH;;A;;;;;;AAyB3C;A;;;;;AAQA;A;;;;;AAUA;A;;;;;;;;AChaA;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAGD;A;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAoCG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAOG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAOG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;;AAuBG;A;AACF;A;AAEE;;A;AACF;A;AAED;A;;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;A;AAOC;A;AAED;A;;;;AC/KA;A;;;;;A;AA2CC;A;AAQD;;A;AACC;;A;AAGD;A;;;;;AASA;AACG;;;A;AACF;A;AAED;A;;;;AAiBA;A;AAEC;A;AAED;AAUA;A;AASC;A;A;AAOI;AACD;A;AACF;A;A;AAIC;A;A;AAUC;A;AACF;A;A;AAIF;AACA;A;;;A;AAeC;A;A;;;;AAUD;AACA;;A;AACI;;;A;AACF;A;A;AAIE;AACJ;AACK;AACJ;;;A;AAEC;A;A;AAOA;A;AAGD;A;AAID;;A;AACC;;A;A;AAMA;A;AAGD;A;;;;;;A;AAQC;A;AAED;;A;;;;;;;A;AAKC;A;AAEG;AACD;;A;A;AAED;A;AAED;A;AAID;AACA;A;;;;;;;;;AAMA;;;;AACA;A;;;;;A;;;;;;;;;AAQA;;;;AACA;A;;;;;A;;;;;;;;;AAOA;;;;AACA;A;;;;;A;;;;;;;;;AAOA;;;;AACA;A;;;;;A;;;;;;;;;AASA;;;;AACA;A;;;;;A;;;;;AAqBA;A;AAEC;A;AAED;A;AAEC;A;A;AAaA;A;AAED;A;;;;;AAIA;;A;A;AAGE;A;AAEA;A;A;AAGF;A;;;ACzUA;A;;;AAIA;A;;;ACEA;A;;;;AAKA;AAEA;;AACC;AAD8B;A;AAI3B;A;;A;AAEF;AACA;A;AAHe;A;AAOjB;A;;A;ACdC;A;AAED;A;;;A;AAyCC;A;AAED;A;;;;;ACrDA;AACA;A;;;;;;AAQA;AACA;A;;;;;ACTA;AACA;AACA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAIA;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;;;AAKD;A;;;;;;A;AC5BC;A;AAEG;AACJ;;A;AAEC;A;AAED;AACA;A;;;;;AAKI;AACJ;A;AAEC;A;AAED;AACA;A;;;AAKI;AACJ;A;AAEC;A;AAED;AACA;A;;;;;A;;;;A;;;;;;ACnCA;;;A;A;;;;;A;A;;;;;A;;;;ACuDI;AACJ;AACA;;;;;;;A;AAEE;AACA;A;A;;A;AAID;AACA;A;AAGD;;;;;;;A;AAEE;A;AAEA;A;AAED;A;;AAED;A;;;;;AAMA;A;;;;;AAMA;A;;;;;AAKA;A;;;;;AAGmC;A;;;;;AACA;A;;;;;ACrFM;A;;;;;AACA;A;;;;;AACA;A;;;;;AACA;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A;A;A;A;A;A;A;;ACPJ;A;A;A;A;A;;;;;;;;;;ACDN;A;;;;AAYI;A;;;;A;AAwBlC;A;AAED;A;;;;A;AAoBC;A;AAGD;A;;;;A;AAMC;A;AAaD;A;;;;AAwHA;A;;;;AAKA;A;;;;A;AA2DC;A;AAED;A;;;;;A;AAoBC;AACA;A;A;AAGA;AACA;A;A;;A;;;;;A;AAQA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;;A;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACpTA;A;AAEG;;;AACH;A;AAEC;A;AAED;A;AAEC;A;A;AAGA;A;AAVuB;A;AAazB;A;;;;;A;AAKC;A;A;A;A;A;;;;;A;A;A;A;;;;;A;A;A;A;;;;;A;A;A;A;;;;;A;A;AAIA;A;AAkBD;A;;;;;AAIA;AACA;AACA;A;AAIC;A;A;AAIA;A;AAEA;AACA;A;AAID;AACA;AACA;;A;A;AAIG;A;AAED;AACA;AAPgB;A;A;AAWhB;A;AAEC;AAbe;A;A;A;AAiBf;AACA;A;AAEA;A;AApBe;A;A;AAwBjB;A;A;AAGA;A;A;AAGA;A;A;AASA;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAGA;A;AAED;AACA;;A;AAEE;A;AAF8C;A;AAKhD;A;A;AAIA;A;AAGD;AACA;A;;;;;;;;;AAQA;A;AAIC;A;A;AAIA;A;AAEA;AACA;A;AAID;AACA;AACA;AACA;AACA;AACA;;AACQ;A;A;A;AAGL;A;AAED;AACA;AAPgB;A;A;AAWhB;A;AAEC;AAbe;A;A;AAgBhB;A;AAEC;AACA;AACA;A;AAEA;A;AAtBe;A;A;AA0BjB;A;A;AAGA;A;A;AAGA;A;A;AASA;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAGA;A;AAED;AACA;;A;AAEE;A;AAF8C;A;AAKhD;A;A;AAIA;A;A;AAIA;A;AAED;AACA;A;;;;;;;AAQI;AACA;AAGJ;;A;AACC;AACA;AACA;A;AAMD;;A;AACC;A;AAED;;A;AAEC;AACA;AACA;A;AAID;AACA;;AACK;A;AAEH;A;AAEA;A;AAED;AACA;A;AAED;;AACK;A;AAEH;A;AAEA;A;AAED;AACA;A;AAID;A;AAMC;AACA;AACA;A;AAGD;;A;AACC;A;AAID;AACA;AAGA;;A;AACC;AACA;AACA;;A;AACC;A;A;A;AAMD;A;AAED;AAED;AAEC;AACA;AACA;AAED;AAEC;AACA;A;AAEC;A;A;;;;;A;;;;;;;A;AAsBA;A;AAED;A;AAEC;A;A;A;;;;;A;A;AAYC;AACA;A;A;AAIA;A;A;;;;;A;A;;;;;A;AAMF;A;;;;;A;AAOC;A;AAED;A;AAEC;A;A;A;;;;;A;A;AAWC;AACA;A;A;AAIA;A;A;;;;;A;A;;;;;A;AAMF;A;;;;;AAMG;;;A;A;;;;;A;A;AAMF;;;;;;A;A;AAIK;;;A;A;;;;;A;A;AAKJ;AACG;A;AACF;;;AACA;A;AAEC;A;A;;;;;A;A;A;AAMA;A;A;;;;;A;AAIJ;;;AACA;A;AAEC;A;A;;;;;A;;;;;AAME;;;A;A;;;;;A;A;AAMF;;;;;;A;A;AAIK;;;A;A;;;;;A;A;AAKJ;AACG;A;AACF;;;AACA;A;AAEC;A;A;;;;;A;A;A;AAMA;A;A;;;;;A;AAIJ;;;AACA;A;AAEC;A;A;;;;;A;;;A;AAwBA;;;AACA;A;AAED;A;;;;;;ACngBA;;A;;;;;AAIA;A;;;AAIA;A;;;AAIA;A;;;AAIA;A;;;A;AAeC;A;AAGD;A;A;A;A;AAUG;A;AAED;AACA;A;AAEA;AACA;A;AAEA;A;A;AAID;A;A;AAIA;A;AAEA;A;AAKG;A;A;AAGH;A;AAEA;A;AAEA;A;AAGD;AAEI;AACJ;;;;;AACK;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAIA;A;A;AAKA;A;AAED;AAEA;A;AAGC;A;AAED;A;;AAGD;A;;;;;;A;A;;;;;A;AA+BA;AACA;A;AAEC;A;AAEA;AACA;A;AAIG;AACJ;;;A;AAEC;AACA;A;;;;;A;A;AAKA;A;AAGD;A;A;;;;;A;A;A;;;;;A;AAOA;A;AAEC;A;A;;;;;A;;;;AASD;A;AAIC;A;AAEC;A;AAEC;A;A;AAIF;AACA;;;;;AACC;A;AAEC;A;AAED;A;;A;AAGA;A;AAED;A;AAID;;;AACG;;;A;AACF;A;AAED;A;;;;;ACrNA;A;AAEC;A;A;AAGA;A;AAGD;AACA;A;AAGC;A;AAIA;AACA;AACA;AACA;AACA;AACA;A;AAIA;AACA;AACA;AACA;A;AAIA;AACA;A;AAED;A;;;;AAIA;;;;;AACC;A;;AAED;A;;;AAOA;;AACC;A;A;AAGA;A;A;;;;AAMG;AAGJ;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAID;AACI;A;;AACH;AACA;AAFgB;A;AAIjB;AACA;A;;;;AAUA;AACA;AAGI;AACJ;;A;A;AAIG;AACA;A;AAED;;AACC;AACA;A;AAED;A;AAED;AACA;AAdgB;A;AAgBjB;AAEI;AAGJ;;AACC;AACA;AACA;AACA;AACA;AACA;AANe;A;AAUhB;;AACC;AACA;A;AAEC;AACA;A;AAEA;A;AAED;A;AAGD;AACA;A;;;AAiGI;;;A;AAEF;A;A;AAGA;A;AALsB;A;AAQxB;A;;;AAKA;A;AAEC;A;AAGD;AACA;AAGI;AACA;A;;AACH;AACA;AACA;AACA;A;AAEC;A;AAEA;A;AAED;AAVgB;A;AAcjB;;AACC;AACA;AACA;A;AAEC;A;AAEA;A;AAED;A;AAGD;A;AAEC;A;AAED;AACA;A;;;;A;A;AASC;;AACC;AACA;A;AAED;A;AAEA;;AACC;AACA;A;AAED;A;A;;;;A;AAOA;A;A;A;AAKC;A;AAED;A;AAGD;A;;;;A;AASC;A;A;AAGA;A;AAEA;A;A;;;;;A;AAOA;A;AAED;AACA;A;;;;;A;AAMC;A;AAIG;;;AACH;A;AAEC;AACA;AACA;A;AALuB;A;AAWzB;AACA;AACA;A;;;;;A;AAOC;A;AAEG;AACJ;AACI;;;AACH;AADgC;A;AAGjC;;AACC;AADe;A;A;AAIf;A;AAED;A;;;;;;;ACzRA;AAEA;A;AAIC;AACA;AACA;A;AAID;A;AAGC;A;A;AAKA;AACA;A;A;AAMA;AACA;AACA;A;AAGA;A;AAGD;AACA;A;AAEC;A;AAED;A;;;;;;;AAQA;AACA;AACA;A;AAGC;AACA;A;;;;;A;AAGD;AAEA;A;AAEC;A;AAEA;A;AAED;A;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;A;;;;;AAMA;;;;AACA;;;;AAGA;AACA;AAGA;AACA;AAEA;AAEA;AACA;A;;;;;;AAeA;A;AAGC;A;AAGD;AACA;AACA;AAGA;A;A;;A;AAIA;A;AAKC;AACA;A;AAEA;AACA;AACA;A;AAID;A;AAEC;A;AAED;AAGA;AACA;AAQA;AACI;A;AAGH;A;AAEA;A;AAGD;AACA;A;A;;A;A;;A;;;;;;;AA0BA;AACA;AAEA;;AACC;A;AAGC;A;AAEA;A;AAEA;A;A;AAKF;A;;;;;A;;;;;AAOA;;;AACA;AACA;AACA;A;;;;A;AAQC;AACA;AACA;AACA;A;A;AAGA;A;AAID;AACA;;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AACI;;;;;;A;AAEF;AACA;A;AAED;AALmC;A;AAOpC;A;AAGC;AACA;AACA;A;AAEA;A;AAIG;AACJ;AACI;;;AACH;AACA;AACA;AACA;AACA;A;AAEG;;;AACH;AAD2B;A;AAG5B;AACA;AACA;AACA;A;A;AAIE;A;AAID;;AACC;AACA;A;AAGC;A;AAED;AACA;AACA;AACA;AACA;A;AAED;A;AAkBD;A;AAEC;A;AAGG;;;A;AAEF;AACA;A;AAHyB;A;AAM3B;A;;;;A;AAaC;A;A;AAGA;A;A;AAGA;A;A;AAIA;AACA;;A;AAEE;A;AAEA;A;AAJY;A;A;AAQb;AACA;AACA;A;AAEA;A;AAED;A;AAED;A;;;;A;AASC;AACA;AACA;AACA;A;A;AAII;AACJ;AACI;;;AACH;AACA;AACA;AACA;AACA;A;AAED;AACI;;;AACH;AADmB;A;AAGpB;;;;AACA;;AACC;A;A;AAGA;A;AAED;AACA;A;AAED;A;AAGC;AACA;A;A;AAGA;AACA;A;AAGD;AAEA;AACA;AAIA;AACA;AACA;AAGA;AAEA;AAGI;AACA;;;;;;A;AAEF;AACA;A;AAED;AALmC;A;AAOhC;;;AACH;AACA;AACA;AACA;AAEG;A;AACF;AACA;AACA;AAGA;A;AAZ6B;A;AAe/B;AACA;AACA;AAII;AACJ;AACA;AACC;AACA;AACA;AACA;AACA;AACA;A;AAKC;A;A;A;;;;A;AAcD;A;AAED;;A;AACC;AACA;A;A;AAIA;A;A;AAIA;A;A;AAIA;AACA;A;AAED;A;;;AC1lBA;A;;;;AAMA;A;;;;AAII;AACA;A;A;AAGH;AACA;A;AAEA;AACA;A;AAEA;A;AAGD;AACA;AACA;A;A;AAKK;A;AAGH;A;AAEA;A;AAEA;A;AAED;A;AAIA;A;AAIA;A;AAED;A;AAIC;A;A;AAIA;A;AAGG;AACJ;AAEA;A;AAGC;AACA;;;AACI;AACJ;AACA;A;AAEC;A;A;A;AAKA;A;AAEA;A;AAEA;A;A;AAID;A;A;AAGC;A;A;AAGC;A;AAED;A;A;AAII;AACJ;AACA;AACA;A;A;A;AAID;A;AAED;A;;;AAKA;AACA;AACA;AACI;AACJ;A;AAEC;AACA;A;A;AAIC;A;AAEA;A;AAEA;A;A;A;A;AAMA;A;AAEA;A;A;AAGC;A;AAED;A;AAED;A;AAED;A;;;A;A;AAMC;A;AAEA;A;AAGA;A;AAEC;A;A;AAMA;A;AAED;A;A;AAGE;A;AAED;A;A;AAGA;A;AAED;A;AAID;A;;;A;AAQC;AACA;A;AAiBD;A;AAGC;A;AAMD;AACA;AACA;AAQI;AACA;A;AAEH;AACA;A;AAEA;AACA;A;AAED;AACA;AACA;AAKA;AAII;;;AACH;A;AAEC;A;AAED;AACA;A;AAEC;A;AAMD;AAIA;A;AAMC;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AA/BoB;A;A;;;A;AA8CrB;A;AAID;A;AAEC;A;AAED;A;AAIC;AACA;AACA;A;AAEC;AACA;A;AAED;;AACC;AADgB;A;A;AAMlB;AACA;A;AAEC;A;A;AAGA;AACA;A;AAEA;A;AAED;A;AAKC;A;AAEA;A;AAEA;A;AAGD;A;;;A;AAOC;A;A;AAKA;AACA;AACA;;AACC;AADe;A;A;AAIhB;A;A;AAKA;AACI;;;AACH;AACG;A;AACF;A;AAED;AALqB;A;A;AASvB;A;;;A;AAOC;A;AAID;;AAGA;AAGA;A;AAEC;A;AAED;;AAEA;A;;;A;AAKC;A;AAED;A;;;A;AAKC;A;AAED;A;;;A;ACrbC;A;AAED;;AACA;A;;;;A;AAQC;A;AAED;;AACA;A;;;;AAKA;A;;;;A;AAOC;A;AAED;;AACA;A;;;;A;AAOC;A;AAED;;AACA;A;;;;A;AAMC;A;AAED;A;;;;;A;AA4BC;A;AAIG;AACJ;A;AAGC;A;A;A;AAYC;;AAIC;AACA;AACI;;;AACH;AACA;AACA;AACA;AACA;AALkB;A;AAUnB;AACA;AAEA;A;A;AAMF;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;AAEC;AACA;A;A;AAOD;AACA;AACA;AACA;;AACC;AACA;AACA;A;AAGD;AACA;A;AAGA;AACA;;AACC;AAIA;AACA;AACA;A;AAGD;AACA;A;A;AAKA;AACA;A;A;AAIA;AACA;A;AAED;AACA;A;;;AAIA;A;;;AC3LA;A;;;AAQA;AACI;;;AACH;AACA;A;AAEC;;;A;A;AAGA;AACA;AACA;AAT0B;;A;AAY3B;AAZ2B;;AAc5B;AACA;A;;;AAIA;A;AAEC;A;AAED;AACA;AACA;A;;;AAII;A;AAEH;AACA;AACA;A;A;A;AAIC;AACA;A;A;AAGD;AACA;AACA;A;A;A;AAIA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAIC;AACA;AACA;A;AAEA;AAGA;AACI;;;AACH;AADoB;A;A;AADrB;AACI;;;AACH;AADoB;A;A;AAIrB;AACI;;;AACH;AADoB;A;A;A;AAKvB;A;;;AAQA;A;;;;AAMA;A;;;;AAaA;A;;;;AA0BA;A;;;;AAcA;A;;;;AAqBA;;AACC;;;AACA;A;A;AAGE;A;AAED;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;AAIA;A;A;;;;;A;A;;;;;A;A;;;;;A;AASA;A;;;;;;;A;AAoBC;AACA;A;AAEM;A;AAEN;AACA;A;AAEA;;;A;;;;;;;;;A;A;;;;;;;;;A;A;AAQA;AACA;A;AAED;AACA;AAEA;A;A;AAEC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEG;A;AAEH;AACA;A;AAEG;;;AACH;;;A;AAEC;AACA;A;AAED;AANkB;A;AAQnB;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;AACA;A;AAEA;A;AAEC;AACA;A;AAEG;;;AACH;A;AAEC;AACA;A;AAED;AANkB;A;AAQnB;A;AAEC;AACA;A;AAED;A;AAEA;A;A;AAGC;AACA;A;AAED;A;AAEA;AACA;A;A;AAED;AACA;A;;;;AASA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;A;AAIE;A;A;AAIA;AACI;;;A;AAEF;A;AAFsB;A;AAKxB;A;AAED;A;A;AAGA;A;A;AAGA;A;A;A;A;A;AAQE;A;A;AAGD;;;A;AAEC;A;A;A;AAKC;AACJ;AACA;;AACC;;;;;A;AAEC;A;AAED;A;AAEC;A;AAEA;AACA;A;A;AAIA;A;A;AAGF;A;;;;AAKI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AAMA;;;;AACA;;AACC;A;AAEC;A;AAEA;A;A;AAGF;A;;;AAMA;;;;AACA;;AACC;A;AAEC;A;AAEA;A;A;AAGF;A;;;A;A;AAiBE;A;A;AAIA;A;AAED;A;A;AAUA;;;;;;AACA;A;AAEC;A;AAED;AACA;A;AAGD;;;;;;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;A;AAmBC;A;AAED;AACA;AACA;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxgBA;;A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;A;;;;;AAIA;A;;;A;AAKC;AAKA;AACA;AAEA;A;AAEC;A;AAEC;A;AAEG;AACA;;;AACH;AACA;A;AAFmC;A;A;AAMnC;AANmC;A;AAWpC;AACI;;;AACH;AACA;A;AAFmC;A;A;AAMnC;AANmC;A;AAWpC;AAMA;AACA;A;A;A;AAKA;A;AAKA;A;AAEC;A;A;AAGA;A;AAED;A;AAKA;AACA;AACA;;;;;AACC;A;;AAED;AACA;AACA;;;;;AACC;A;;AAED;A;AAEC;A;AAED;A;AAQA;AACA;AACA;;;;;AACC;AACA;A;;AAKD;A;AAMA;A;AAKA;A;AAIA;A;AAIA;AACA;AACA;;;;;AACC;AACA;A;AAEC;A;AAED;A;;AAMD;A;A;AAQF;A;;;AAIA;AACA;A;;;;AAaA;A;;;;;AAIA;A;;;;;AAMA;A;;;;;AAaA;A;;;;;AAIA;A;;;;;;A;;A;;;;;;A;;A;;;;;AAiBiC;A;;;;;AACA;A;;;;AAGjC;AACA;AAKA;A;;;;AAQA;A;;;;AAIA;AACA;AACA;A;;;;AAMA;A;;;;AAIA;AACA;AACA;A;;;AAII;AACJ;AACA;A;;;AAIA;A;;;AAIA;AACI;;;AACH;AACA;AAFgC;A;A;;;;AAOjC;;AACA;;;;;;;;;A;AACC;;A;AAED;;A;;;;;;AAIA;;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAGD;;;AAAgH;;;A;;;A;;;;;A;AAK/G;A;A;AAGA;A;AAED;A;;;;;A;AAKC;A;AAED;;A;;;;;;AAYA;;;;;;;A;AACC;A;AAGD;AACA;;;;;;AACC;A;;AAED;AACA;;;;;;AACC;A;;AAED;A;;;;;;AAaA;A;;;;AAIA;A;;;;;AA2CA;;A;;;;;A;A;AAMC;A;AAEA;A;AAEA;A;A;;;;AAKD;;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;AAoCA;A;;;;A;;A;;;AAiBA;A;AAEC;A;AAED;AACA;A;;;AAIA;;AACA;A;AAEC;A;AAED;A;;;;AAIA;;;AACA;AACA;AACA;;;A;AACC;AACA;AACA;A;AAED;AACA;AACA;AACA;A;;;;;AAIA;;AACA;A;;;AAWA;A;;;;AAIA;AACA;AACA;;;;A;;;;AAIA;AACA;A;;;AAIA;A;;;;AAII;AACJ;;A;AACC;;A;AAGG;AACG;;A;AACP;;;;;A;AACC;AACA;AACA;AACA;AACA;A;A;AAEA;;;;A;AACC;;;A;AACC;AACA;A;AAED;AACA;;;;;AACA;A;AAED;A;A;AAEA;AACA;A;A;AAEA;A;;AAEA;A;A;AAED;;;A;;;;;AAIA;A;AAEC;A;A;AAGA;A;AAED;AAEA;AACI;AACJ;;A;AACC;;;;A;AAEC;A;A;AAGF;AAEA;;A;AACC;A;AAGD;A;AAEC;A;AAGD;A;AAEC;A;A;AAIA;A;AAED;A;;;;;;;;AAII;A;AAEH;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAEA;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAED;A;AAEC;A;AAED;AACA;A;;;;A;AAKC;A;A;AAGA;A;AAED;;A;AACC;;A;A;AAIA;A;AAED;A;;;;AAIA;A;;AAIA;A;;;;;;A;AAKC;A;AAGD;;AACA;A;AAEC;A;AAED;;AACC;A;AAED;;A;;;;;A;A;AAMC;A;AAEA;A;A;;;;;;A;AAMD;;;;A;AACC;A;AAEA;;A;AAEI;;;AACH;;;A;AACC;A;AAF4B;A;A;A;AAM/B;A;;;;;;;;;A;AAKC;A;;A;AAGD;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACC;A;;AAED;AACA;;;;;AACC;A;;AAED;;AACA;AACA;AACA;;AACC;AACA;A;AAED;AAEA;A;;A;;;;;;A;AAMC;A;A;AAGA;A;AAEC;A;A;AAEC;A;AAEA;A;A;AAGC;AACA;A;AAED;AACA;AACA;AACA;AACA;A;A;A;AAGF;A;AAED;A;;;;;;AAIA;;A;AACC;;A;AAID;;;;A;AAGC;AACA;AACA;A;A;AAIC;A;AAKD;;A;AAEC;A;AAEA;A;AAED;A;A;AAID;A;;;;;;;;AAOC;AACA;AACA;A;AAGA;;;AACA;A;AAEC;A;A;AAGD;AACA;AACA;A;A;AAIA;A;AAGD;AACA;A;A;AAGE;A;A;AAGA;A;A;AAGA;A;A;A;AAIA;A;A;AAGA;A;A;AAGA;A;A;AAGF;;;;;A;AAEE;A;A;;AAGE;;;AACA;;;;AAAH;;;A;AACC;;;A;AAFiB;A;AAKnB;;A;AAEC;AACA;;AACA;;AACI;;;AACH;AACG;AAAH;;;A;AACC;;;A;AAED;;AALkB;A;AAOnB;AACA;AACA;AACA;A;AAGD;A;AAEC;A;AAED;AAEA;AACA;;;;;;AACC;;;;;;;;;A;;AAED;;A;AAGA;;;A;AACC;A;AAEA;;A;AAEA;AACA;;;;;AACC;;A;;AAED;A;A;A;;;;;;;AAKD;A;A;AAGC;A;AAEA;A;AAED;A;;;;A;AAOC;A;AAED;A;;;A;AAKC;A;AAED;A;;;;;AAIO;A;AACP;;;A;AACC;A;AAEC;A;AAED;AACA;;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;AAGA;A;A;A;;;;;;;;;;;;A;AAMA;A;AAED;A;AAEC;A;AAGD;AACA;AACA;AAEA;A;A;AAGE;A;AAEA;A;A;AAIC;AAAH;;A;AACI;AAAH;;A;AACC;;AACC;;AACA;;A;AACC;AACA;AACuC;A;;AACC;A;A;AAGzC;;A;AACC;;A;A;A;A;AAMJ;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;;;;;AAIA;;AAEC;AACA;;AACC;A;AAED;A;AAEC;A;AAKD;AACA;;AACC;A;A;AAGA;A;AAED;AACA;AAGA;AACA;;A;AAEE;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAGC;;AACA;A;A;AAGF;A;;;;;;;;;;;AAIO;A;AACP;;;;A;AACC;A;AAEC;A;AAED;AACA;AAEA;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;AAGA;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;AACA;;A;AACC;AACuC;A;;AACC;A;A;AAGzC;;A;AAGA;A;AAEC;A;AAED;AACA;AACA;A;AAGA;A;A;A;;;;;;;AAKD;A;;;;;AAIO;A;A;AAEN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AAKM;A;A;AAEN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AAKM;A;A;A;AAGL;A;AAED;A;A;AAGC;A;AAED;A;A;AAGC;A;AAED;A;AAEA;A;A;;;;;;AAKD;AACA;AACA;;AACA;;A;A;AAEC;;;;A;AACC;A;A;AAEA;;A;A;AAEA;A;;AAEA;A;A;AAED;A;AAED;A;;;;;;;;AAIA;AACA;AACA;;;A;AACC;A;AAED;AACA;;;;;A;AACC;AACA;AACA;AACA;AACA;A;AAED;A;;;;;;;AAIA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;AAIA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;;AAKC;AACA;AACA;AAEM;A;AACP;;;;A;A;AAEE;A;AAED;AACA;AACA;AACA;A;A;AAGA;AACA;AACA;A;A;AAGA;A;AAEC;A;AAED;;A;AAGA;A;A;A;AAIA;A;AAGD;;A;;;;;;;AAKC;AACA;AACA;AAEM;A;A;A;AAGL;A;AAED;AACA;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;A;A;AAIA;A;AAGD;;A;;;;;;AAIA;AACA;AACA;A;;;;;;;AAMA;A;AAEC;A;AAED;;A;A;;;;;A;AAIA;AACA;A;;;;;A;;;;;AAKA;A;AAEC;A;AAED;;A;AAEC;A;AAED;A;;;;;AAoCA;AACA;A;AAEC;A;A;AAGA;A;AAED;;;;;;;A;;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;A;A;AAKA;;;;;A;AAEE;A;A;;AAGF;A;A;AAID;;;;;;;;A;A;A;AAGG;A;A;AAGA;A;A;AAGE;A;AAEH;A;AAEG;;;AACH;;;;;;;;A;AACC;A;AAFiB;A;AAKnB;A;A;AAGC;A;AAED;;;;;;;A;AAEA;;;;;;;A;AAEI;AACA;;;AACH;;;;;;;;A;AACC;A;AAFiB;A;AAKnB;A;A;AAGC;A;A;AAGA;A;AAEG;;A;AAEH;A;AAED;;;;;AACC;;AACA;;AACA;;;;;A;AACC;A;A;;AAGF;A;AAEA;A;AAEA;A;A;AAGD;;;A;;;;;;;;ACt9CA;;A;AAEC;A;AAGD;A;A;AAGC;;AAAwB;A;A;AAExB;;A;AAEE;A;A;A;AAIH;AACA;AACA;;A;AAEE;A;AAED;AACA;AACA;AACA;AACA;A;A;;;;;;AC2YD;A;;;;;AAIA;A;;;;;A;AAqKC;A;AAED;A;;;;;AAiKA;A;AAEC;A;AAED;A;;;;;AAGgC;A;;;;;A;AAI/B;A;AAED;A;AAEC;A;AAED;A;;;;;AAG6B;A;;;;;AAEK;A;;;;;AAEL;A;;;;;AAII;A;;;;;AAGjC;A;AAEC;A;AAED;A;;;;;A;AAKC;AACA;A;AAED;A;;;;;;;;A;AAuCC;A;;;;A;AAGD;A;A;;;;;A;AAKA;;;;;;AACC;;A;A;;;;;;A;A;;A;;;;;A;;;;;;A;AASA;A;AAED;A;AAEC;A;AAED;A;;;;;A;AASC;A;AAED;AACA;AACA;;A;AAEE;A;AAED;A;AAED;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;A;AAMC;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAED;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;AACA;A;;;;;A;A;AAwCC;A;AAEA;A;AAEA;A;AAED;A;;;;;;A;AAMC;A;AAED;AACA;AACA;A;AAEC;A;AAEC;A;A;AAGF;AACA;AACA;A;;;;;AAIyC;A;;;;;;;A;AAKxC;A;AAEG;AACJ;;;;;AACC;A;A;;;;;A;A;;AAKD;A;;;;;AAmCA;;AACA;A;;;;;;;AAaA;;AAEC;AACA;;AACC;A;AAED;A;AAEC;A;AAOD;AACA;;AACC;A;A;AAGA;A;AAED;AACA;AAGA;AACA;;A;AAEE;A;AAED;A;A;AAGA;A;AAED;AACA;A;AAGC;;;A;AAEC;A;A;;;;;A;A;A;;;;;A;;;;;;A;AAWF;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAEE;A;AACF;A;AAED;AASA;AACA;A;;;;;;;AAQA;AACA;;;;;;AACC;;A;AACC;AACA;;;;;;;A;AACC;;A;AAED;A;AAED;;A;;AAED;A;;;;;;;;;AAoBA;AACA;AAQI;AAOJ;AAEA;;AACC;;;;AACA;AACA;AAMA;;;;;AACC;AACA;;A;AAIC;;A;AAED;AACA;;;;;AACC;AAEA;AACI;AACJ;;A;AAEC;AACA;;A;AACC;;A;A;AAKF;;;A;A;A;;;;;A;AAMC;AACA;AACA;AACA;AACA;AACA;;A;A;AAOA;;A;AAED;A;AAEC;AACA;;A;A;AAGA;A;AAED;A;AAEC;A;AAEG;AACJ;AACA;AACA;A;;A;;A;AAID;A;A;AAGF;A;;;;;;;;;;AAOA;A;AAEC;;;;;AACC;A;A;;;;;A;A;AAKC;A;A;;A;A;AAKF;A;A;;AAE8C;A;;;;;A;;;;;AAgB/C;A;;;;;;A;AAwDC;A;AAED;;;A;AACC;A;AAED;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;A;AAUC;A;AAED;A;AAEC;A;A;AAgBA;AACA;AACI;;;AACH;AACA;AACA;AACA;A;A;AAGE;A;AAEC;A;AAED;A;AAEC;A;A;AAb4B;A;A;A;AAmB3B;A;AACF;A;A;AApB6B;A;AAwBhC;A;AAGD;A;AAEC;A;AAED;AACA;AACI;;;AACH;AACA;AACA;AACA;A;A;AAGE;A;AAEC;A;AAED;A;AAEC;A;A;AAb2B;A;A;A;AAmB1B;A;AACF;A;A;AApB4B;A;AAwB/B;A;;;;A;AAWC;A;A;AAMA;A;AAID;;A;;;;;A;AAKC;A;AAGD;;;;;;;;A;AACC;A;AAGD;;;;;;A;;;;;A;AAKC;A;AAGD;A;AAEC;A;A;AAMA;A;A;AAKD;;;;;;;;A;AACC;;;;A;AAMA;;;;;A;AACC;A;AAID;;;;A;AAGA;AACA;A;AAEC;A;AAEG;;;AACH;;;A;AACC;A;AAFyB;A;AAKvB;;;AACH;;;A;AACC;A;AAF0B;A;AAK5B;A;AAGA;AACA;A;AAEC;A;AAID;A;AAGA;;;;;A;AAGA;;A;AAGA;AACA;A;AAEC;A;A;AAGA;A;AAED;;;;;AACC;AACA;A;AAEC;A;AAED;;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;;AAGF;A;A;AAGD;A;;;;A;AAwzCC;A;AAED;A;;;AA+GA;A;;;;AC5+FA;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAOC;A;A;AAGA;A;AAED;A;;;;;A;AAiEC;A;AAED;A;;;;;A;AAyCC;A;A;;;;;A;AAQA;A;A;AAGA;A;A;;;;;A;AASA;A;A;AAIA;A;A;AAGA;A;A;;;;;A;AAWA;A;AAED;A;;;;;AAMA;AACA;A;;;;;;AAMA;AACA;;;A;AACC;A;AAGD;A;;;;;;;AAMA;AACA;;;A;AACC;A;AAGD;A;;;;;;AASA;A;;;;;AASA;A;;;;;;AAYA;AACA;AACA;;A;;;;;;;AAWA;AACA;AACA;;A;;;;;;AAwZA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;;AA6EA;;A;AACC;;A;AAED;AACA;;;;;;AACC;;A;AACC;;;;;A;A;AAEE;A;AAED;;A;A;AAGF;;A;;AAED;A;;;;;;;AAOA;AACG;;;;AAAH;;A;AACC;;A;AAED;A;;;;;;;AAQG;;;;AAAH;;A;AACC;;A;AAED;A;;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAsDA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;;;A;;;A;;;;;;AAwFA;A;;;;;AAMA;A;;;;;;AA8BA;AACA;AASA;;AAEI;A;AAEH;A;AAEA;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;AAEC;A;AAID;AACA;AACA;A;;;;;;;AAQA;AACA;AACA;AAEA;AAEA;AACA;A;AAEC;A;AAED;AACA;AACI;AACA;;;AACH;;A;AAKC;A;A;AAKA;AACA;AACA;A;AAEA;A;AAED;AAjBsB;A;AAmBvB;A;;;;;;A;AASC;A;A;AAGA;A;A;AAGA;A;AAED;AACA;AACA;AACA;A;;;;;A;AAMC;A;A;AAGA;A;AAED;A;;;;;;A;AAUC;A;A;AAGA;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;AAMA;AACA;AACA;A;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAMA;A;A;AAGC;A;AAEA;A;AAED;A;;;;A;AAKC;A;AAED;A;;;;AAMA;A;A;AAGC;AACA;AACA;A;AAED;A;;;;;AAMA;A;A;AAGC;AACA;AACA;A;AAED;A;;;;;;;;AAsDA;AACA;A;;;;;A;;;;;;;;;AAOA;A;AAEC;A;AAED;AACA;AACI;A;AAEH;AACA;AACA;A;AAEA;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAOA;AACA;AACA;;A;;;;;;;;;AAMA;A;AAEC;A;AAED;AACA;;AACI;A;AAEH;A;AAEA;A;A;;;A;;;;;;AA0BD;AACA;AACA;A;;;;;;AAiBA;AACA;AACA;;;A;AACC;A;AAED;A;;;;;;;AAMA;AACO;A;A;AAIN;A;AAEA;A;AAJA;A;A;;;;;AAWD;AACO;A;A;AAIN;A;AAEA;A;AAJA;A;A;;;;;AAWD;AACO;A;A;AAIN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAVA;A;A;;;;;;AA+CD;AACA;AACA;AACA;AACA;;AACI;A;AAEH;A;AAEA;A;A;AAGA;AACA;A;AAED;AACA;;AACI;A;AAEH;A;AAEA;A;AAED;A;;;;;;;AAMA;AACO;A;A;AAIN;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAZA;A;A;;;;;AAmBD;AACA;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;;AA4HO;A;A;AAEN;A;AAEA;A;AAID;;A;;;;;;;;;AASA;AACA;A;;;;;A;;;;;;;AASA;AACA;AACA;;A;;;;;;AAKA;A;AAEC;A;A;AAIA;A;AAKD;A;AAGC;A;AAEC;A;AAED;AACA;A;AAGD;A;AAEC;A;AAED;AACA;A;;;;;AAMA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;A;AASC;A;A;AAGA;A;AAED;A;;;;;AAwCA;;A;AACC;;;A;A;;;;;;AAuTD;;A;;;;;;AAMA;;;A;AACC;A;AAED;AACA;AACA;A;;;;;A;AAkDC;A;AAED;AACA;AACA;AACA;A;;;;;;AAsDA;;A;AACC;;A;AAED;;;AACA;;A;AACC;;A;AAED;;A;;;;;;A;AAOA;;;;;;;A;A;A;AAGE;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;AAEA;A;AAEA;A;A;A;A;A;AAMA;A;A;A;AAID;;;;;A;A;;A;AAGE;A;AAEA;A;A;A;A;A;AAKF;;;;;A;A;;A;AAGE;A;AAEA;A;A;A;A;A;AAMH;;;A;AACC;A;AAID;;;;;;;;;A;AAGC;A;A;A;AAKC;A;AAED;A;AAGD;A;;;;;AAwBA;;AACA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAMA;;AACA;A;A;AAGC;A;AAEA;A;AAED;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAIA;;AACA;AACA;AACA;A;;;;;AAUA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAKA;;;;;;A;;;;;AAoBA;;;AACA;;AACA;;;A;AACC;A;;AAEA;A;AAED;;A;;;;;AAKA;;A;AACC;;AACA;AACA;A;AAED;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC55EA;A;;;;;AAIA;AACA;A;;;;;A;AAMC;A;AAED;AACA;AACA;A;AAGC;AACA;A;AAGD;A;AAEC;A;AAGD;AACA;;;;;AACC;A;;AAED;A;;;;;A;AAMC;AACA;A;AAED;A;AAGC;AACA;A;AAGA;AACA;A;A;;;;;A;AAOA;AACA;A;AAED;A;AAGC;AACA;A;AAGA;AACA;A;A;;;;;A;AAOA;A;AAEA;A;A;;;;;AAMD;AAKA;A;AAEC;AAEA;A;AAEC;A;A;AAKF;A;AAIC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAGD;;AACC;AACA;AACA;AACA;A;AAED;AACA;AACA;AAEA;;AACC;AACA;AACA;A;AAGD;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;;AAKA;A;AAEC;A;AAGD;A;AAKC;A;AAGC;A;A;AAOF;A;AAEC;A;AAGC;AACA;AACA;AACA;AACA;A;A;AAGD;A;AAEC;A;A;AAOF;A;A;AAKC;;AACC;AACA;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;;AACC;AACA;AACA;A;A;AAGD;A;AAED;AACA;AACA;;AACC;AACA;A;A;A;A;A;AAQE;AACA;A;A;AAID;AACA;AACA;AACA;A;A;A;AAKD;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAKD;AACA;AACA;AACA;A;;;;;A;AAMC;AACA;;;;;;AACC;A;AAEC;A;A;;A;AAIH;A;;;;;AAKA;AACA;A;;;;;AAKA;A;AAGC;A;A;AAIA;A;AAGD;A;A;A;AAKG;A;AAGD;A;AAGA;A;A;A;AAIA;A;AAED;A;A;AAIA;A;AAGD;A;AAGC;A;AAEG;AACA;;;A;AAGF;A;AAGC;A;A;A;AAID;A;AAEA;A;AAGD;AAfuB;A;AAiBxB;A;AAGC;A;A;;;;;AAMD;A;;;;;AAKA;A;;;;;AAOA;A;AAEC;AACA;A;AAED;A;AAEC;A;AAEA;A;A;;;;;AAOD;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAMA;A;AAEC;A;AAED;A;AAEC;A;AAEA;A;A;;;;;A;AASA;A;AAGD;A;AAEC;A;AAEA;A;A;AAKA;A;A;AAKA;AACA;A;AAGC;A;AAED;AACA;AACA;A;A;AAKA;A;A;AAGC;A;AAGC;A;A;AAME;AACJ;AAEA;AAEI;;;A;A;AAGF;A;AAEA;AACA;A;AAEA;A;AARwB;A;A;AAYzB;A;AAED;;AACC;AACA;A;AAED;A;A;A;AAOC;AACA;AACA;AACA;A;AAED;AACA;A;AAGD;A;;;;;AC3cA;A;;;;AAIA;A;;;;AAIA;A;;;;A;AAKC;AACA;A;AAGD;AACA;AACA;;AACC;A;AAED;AACA;A;;;;AAgCA;;AACA;AACA;AACA;AACA;A;;;;;AAKA;AACA;AACA;AACA;A;;;;;;;A;;;;;A;;;;;;;A;;;;;A;;;;;A;A;AAUC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;;;AAMA;A;;;;;A;;;;;;;AAOA;A;;;;;A;;;;;;;AASA;;AACA;AACA;;;;AACA;AACA;A;;;;;;;;A;;;;;A;;;;;;AAWA;;AACA;AACA;AACA;AACA;A;;;;;;AAMA;;;A;;;;;;;;AASA;;AACA;AACA;;;;AACA;AACA;A;;;;;;AAaA;;AACA;AACA;AACA;AACA;A;;;;;;;;AAWA;;AACA;AACA;;;;AACA;AACA;A;;;;;;;;A;;;;;A;;;;;;AAaA;;AACA;AACA;AACA;AACA;A;;;;;;AAOA;;AACA;;A;AACC;;A;AAED;A;;;;AAOA;A;;;;;;A;A;;;;;;;A;AAQI;;;A;A;;;;;;;A;AAIH;AACA;AALiE;A;AAOlE;A;;;;;A;AAKC;AACA;A;AAED;AACA;;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;AAEA;;;A;AACC;;AACA;AACA;A;A;AAEA;;AACA;AACA;A;;AAEA;A;A;AAED;AACA;A;;;;;;;;A;AAKA;;A;AACC;A;;AAEA;A;A;A;;;;;;;AAOD;AACA;AACA;AACA;A;;;;;;A;AAMA;;;;;;;;;;A;A;AAEE;A;AAEA;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;;A;AACC;A;;AAEA;A;A;A;AAGD;A;;AAEA;A;A;A;;;;;;;;A;AAQD;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;A;AAWD;;A;AACC;AACA;AACA;AAEA;AACA;AACA;AACA;A;;AAEA;A;A;A;;;;;;;;A;AAMD;;;;;;A;A;AAEE;A;AAEA;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;A;AAMD;;;;;;A;A;AAEE;A;AAEC;AACA;A;AAED;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;A;AAEA;AACA;;;;;;A;AAEE;A;AAED;A;;AAED;A;A;A;AAGD;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAEA;;A;A;A;;;;;;;;AAKG;A;AAEJ;;A;AACC;A;;AAEA;AACA;A;A;A;AAID;;;;A;AACC;;A;AACC;AACA;;AACA;A;AAEC;A;AAEA;A;AAED;A;;A;AAGC;A;AAEA;A;A;A;A;AAIF;A;A;AAEA;A;;AAEA;A;A;A;;;;;;;;AAKE;AAAH;;A;AAII;;A;AACF;AACA;A;A;AAMA;A;AAGD;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;A;;;;;;;;;A;AAMA;A;AAGE;;;AAAH;;A;AACC;AACA;AACA;AACA;A;AAID;;A;AACI;;;AAAH;;A;AACC;AACA;AAEA;;AACA;A;A;;A;AAOD;;A;AAKC;;;;A;A;AAEC;AACA;AACA;;AACA;A;A;AAGA;AACA;AACA;;AACA;A;A;A;A;A;;A;;;;;;;AAQH;AACA;AAEA;;A;A;AAEC;;A;AACC;A;;AAEA;A;A;AAED;A;A;AAMD;;;A;AACC;;AACA;A;AAEA;;AACA;A;A;AAID;;;;;;;;;;;;;;;;;;;;;A;A;AAEC;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAEA;A;A;A;AAIA;;A;AACC;;AACA;;;A;AACC;A;A;AAGF;A;;A;AAGA;;;A;AAGC;;A;A;A;;;;;;;;AASF;;A;AACC;;AACA;;;A;AACC;A;A;AAGF;AACA;AAEO;A;AACP;;;;;;;;;;;;;;;;A;AACC;;A;AACC;A;;A;AAGA;;A;AACC;A;;AAEA;A;A;A;A;A;AAIF;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;;A;A;AAEA;;A;AACC;;A;AAEC;AACA;A;AAED;A;;AAEA;A;AAED;;AACA;;;;;;A;A;AAGG;A;AAEA;A;A;AAGF;AACA;AACA;;A;;A;AAGA;A;AAEA;A;A;A;AAGD;;A;AACC;;A;AAED;AACI;;;A;A;AAGD;A;AAEA;A;A;AAGF;;A;AACI;;A;AACF;AACA;A;A;AAGF;;AAd6B;A;AAgB9B;A;A;AAEA;;AACA;;A;AACC;;A;AACC;;AACA;A;;AAEA;A;A;;AAGD;A;A;A;A;AAID;;A;AAEC;AACA;;;;A;AACK;AACJ;;;A;AACC;;A;A;AAEA;;;A;;AAKA;AACA;;;;;AACC;;;A;;A;AAGF;;;;;AACA;A;A;A;AAGF;;A;AACC;;A;AAEC;AACA;A;AAED;AACI;;;A;AAEF;A;AAED;;AAJwB;A;AAMzB;A;;AAEA;AACI;;;A;AAEF;A;AAED;;AAJwB;A;AAMzB;A;A;A;AAKD;;A;AACQ;;A;AACP;;A;AACC;AACA;AACA;A;A;A;AAKF;A;A;AAAA;A;;AAEA;A;A;A;;;;;;;;;;AAMD;AACA;;A;AACC;;;AACA;;A;AAEQ;;A;A;AAEN;A;AAEC;AACA;A;A;AAGD;A;AAEC;AACA;A;A;A;A;AAMH;A;AAEC;AACA;A;A;AAGF;A;;;;;;;A;A;;;;;;;A;AAgBI;;;A;AAEF;;;;A;A;;;;;;;A;A;;;;;;;A;AAF2B;A;A;;;;;;;A;;;;;;;A;A;;;;;;;A;AAmB7B;AACA;;;;A;A;;;;;;;A;AAIA;A;;;;;;;A;;;;;AAKA;AACA;AACA;A;;;;;AAIA;AACA;AACA;A;;;;;;AAIA;AACA;AACA;AACA;AAEI;;;AACH;AACA;AACA;;AACC;A;A;AAGA;A;A;AAIA;A;AAID;AAGA;AAEA;;AACC;A;AAEA;;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;AACA;A;A;AAEA;A;;AAIA;;A;A;AAGE;AACA;AAEA;AACA;A;AAED;AACA;AACA;AACA;A;AAGD;A;A;AAhCa;A;AAqCf;;;;AAGA;;A;AACC;AACA;;;;;A;AAGC;A;A;AAMA;AACA;AACA;A;AAED;A;;AAEA;;;;A;AAEC;A;A;AAKF;;A;AACC;A;AAEC;A;AAED;;;;AACA;;A;AACC;AACA;;;;;A;AAGC;AACA;A;A;AAGA;A;AAED;A;;AAEA;;;;A;AAEC;AACA;A;A;A;A;AAMF;;;;A;A;AAIA;AACA;A;AAGD;;;;A;AAEC;;;A;AAED;AAGA;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAGA;AACA;AAEA;AACA;AAGA;AACA;A;;AADA;AACA;A;A;A;AAOF;;A;AACC;AACA;AACA;;;;;;A;AAEE;A;AAED;;A;AACC;A;;AAEA;;AACA;AACA;A;A;;AAGF;A;A;;;;;;;;AAKD;AACA;;;;;;AACC;;;;A;AAGC;A;AAED;AACA;A;;A;;;;;;;;AAOD;;;;;;A;AAEE;A;AAED;A;;AAED;A;;;;;;;;;A;;;;;A;;;;;;;;;A;ACn8BC;AACA;A;AAGD;;;;;A;AAEC;A;AAEC;A;A;AAGD;A;AAED;A;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAaA;;;;A;A;A;;A;AAKC;A;AAED;A;;;;;;;AAeA;;AACA;AACA;AACA;A;;;;;;AAIA;A;;;;;AAIA;A;;;;;;;;;AAIA;;AACI;A;AACC;;;A;AACF;A;AAEA;A;A;A;A;AAKF;A;AAED;AACA;;AACA;A;;;;;A;AAoBC;A;AAED;AACA;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;AAKA;A;;;;A;AA2GC;AACA;A;A;AAIA;A;AAED;AACA;AACA;A;;;;;;AAOA;AACC;;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;A;A;AAEE;A;AAED;AACA;A;AAED;;A;AACC;;AACA;A;A;A;;;;;;;;AASF;;A;AACC;A;AAGD;AACC;;A;AAEC;A;AAED;;;A;AACC;;AACA;A;AAED;A;AAED;A;;;;;AAOA;;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AAwBA;;AACA;;A;AACC;;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;ADtX0B;A;A;A;AC2PA;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7T1B;;;;AACA;;AACC;AAEA;;;A;AACC;A;;AAEA;A;A;AAIF;A;;;;;;;;AA6BA;;AAAyC;A;;A;;;;;;;AAUE;;A;;;;;;AC9F3C;;AACA;;AACA;AACA;A;;;;;;;ACKI;;;AACC;;;;;;AACH;AADuC;A;AADlB;A;A;;;;;;AAUvB;AACA;AACC;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;;A;AACC;A;AAED;AACA;A;A;;;;;;AAKD;AACA;AACA;AAGI;;;AACH;AAD8B;A;AAK3B;;;AACH;AACA;AAFwB;A;A;;;;;;AAYzB;;;A;AACC;A;AAGD;;;A;AACC;AAEA;;;A;AACC;A;A;A;;;;;;AAOE;;;AACH;AADkB;A;A;;;;;;;;AAMnB;AACA;;A;AAEC;AACA;AACA;AACA;A;AAED;AASA;AACA;;;;AAEA;;;;;AAAoC;A;AAEpC;AACA;AACC;;;;;AAAqC;A;AAErC;;;;;AAAsC;A;A;AAGrC;A;AAGD;AACA;AACA;A;AAID;AACA;;A;AAEC;AACA;;;A;AACC;AACA;AACA;A;AAED;;;A;AACC;AACA;A;AAKD;;;A;AACC;AACA;AACA;A;AAGD;A;AAED;;A;AAKC;AACC;;;;;AAAuC;A;AAEvC;;;;;AAAoC;A;A;AAGnC;A;AAGD;AACA;AACA;A;A;AAIF;A;;;;;A;;;;;AAKA;;AACC;;A;AACC;AACA;A;AAED;AACA;;;;AAGA;;A;AACC;AACA;A;;AAEA;AACA;A;A;AAGF;;A;AAGK;;;AACH;;;A;AACC;A;AAFqB;A;AAKvB;A;A;;;;;;AAQD;;AACA;A;;;;;;AAMI;AACA;;;AACH;AADkB;A;AAGnB;A;;;;;AAmBA;;A;;;;;AAKA;A;;;;;AA6C0C;A;;;;;AACA;A;;;;;AACA;;;;A;;;;;;AAGb;A;;;;;;;AAYH;A;;;;;;;AA2C1B;;;;A;;;;;;;AAIA;AACA;;;;AACA;;AACC;AACA;AACA;A;AAED;AAEA;;AACC;;;;AACA;;AACC;AACA;AACA;A;AAEE;AAAH;;A;AACC;A;AAED;A;A;;;;;;AA2BD;;A;AAIC;AACA;AACA;;AACC;AACA;;;A;AACC;A;;AAEA;A;A;AAIE;;;AACH;AADoB;A;AAGrB;A;AAMD;;A;AAIC;AACA;AACA;;AACC;AACA;;;A;AACC;A;;AAEA;A;A;AAIE;;;AACH;AADkB;A;AAGnB;A;AAGD;AACA;AACI;;;;A;AAEH;AACA;A;AAEA;AACA;A;AAED;AAEA;;AACC;AACA;;;A;AACC;A;;AAEA;A;A;AAIF;AACA;;A;AACC;A;AAED;;A;AACC;A;AAED;;A;AACC;A;A;;;;;;AASD;AACA;AAEA;;AACC;;A;AACC;AACA;A;;AAEA;AACA;A;A;AAIF;A;;;;;;AC5eI;;;AACC;;;;;;AACH;AADuC;A;AADlB;A;A;;;;;;AASvB;AACA;AACC;A;AAEC;A;AAED;;;;;A;AACC;A;AAED;;;A;AACC;A;AAED;AACA;A;A;;;;;;AAMD;AACA;AACA;AACI;;;AACH;AAD8B;A;AAG3B;;;AACH;AACA;AAFwB;A;A;;;;;;AAQzB;;;A;AACC;A;AAED;;;A;AACC;AACA;;;A;AACC;A;A;A;;;;;;;;AAcF;AACA;;A;AACC;AACA;AACA;AACA;A;AAED;AACA;AACA;;;;AACA;;;;;AAAoC;A;AAEpC;AACA;AACC;;;;;AAAqC;A;AAErC;;;;;AAAsC;A;A;AAGrC;A;AAED;AACA;AACA;A;AAED;AACA;;A;AACC;AACA;;;A;AACC;AACA;AACA;A;AAED;;;A;AACC;AACA;A;AAED;;;A;AACC;AACA;AACA;A;AAED;A;AAED;;A;AACC;AACC;;;;;AAAuC;A;AAEvC;;;;;AAAoC;A;A;AAGnC;A;AAED;AACA;AACA;A;A;AAGF;A;;;;;A;;;;;AAMA;;AACC;;A;AACC;AACA;A;AAED;AACA;;;;AACA;;A;AACC;AACA;A;;AAEA;AACA;A;A;AAGF;;A;AACK;;;AACH;;;A;AACC;A;AAFqB;A;AAKvB;A;A;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHD;A;AAGC;A;AAED;A;AAGC;A;AAED;A;AAEC;AACA;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;AAKA;A;;;;;AAKA;A;;;;;AAOA;A;;;;;AAOA;A;;;;;AAOA;AACA;A;;;;;AASA;AACA;AACA;AACA;A;AAEC;A;A;AAWA;AACA;AACA;A;AAiBD;;AACC;A;AAGD;AACA;A;;;;;;AAUA;AACA;A;AAEC;A;AAED;AACA;AAGD;AACC;AACA;;A;AACC;A;AAGD;AACA;A;;;;;;AAOA;AACA;A;AAEC;;;;AACA;A;AAED;A;;;;ACzFA;A;;;;AAsgBA;AACA;AACA;AACA;A;;;;;;ACljBA;AACA;A;;;AAG4B;A;;;AAG5B;A;;;AAKA;AACA;AACI;AACA;;;AACC;AACA;AACJ;A;AAGC;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;AACA;AACA;A;AAGA;AACA;A;A;AAED;AAxB2B;A;AA0B5B;A;;;AAIA;AACA;AACA;;;;;AACC;A;;AAED;A;;;;A;AAiCC;A;AAED;AACA;AACA;A;AAKC;A;AAOG;AAKA;AAEA;;;AAGH;AAMA;A;AAEC;A;AAXuC;A;AAgBzC;AAEA;AACA;AACC;A;AAMC;AACA;AACA;AACA;A;AAGD;A;AAGC;AACA;AAEA;AACA;A;AAKA;AAEA;AACA;A;AAGE;A;A;AAOD;A;AAED;AACA;A;AAGA;;AACC;A;A;A;A;AAQF;A;AAGD;AACA;AACA;AACI;;;AAGH;AACA;AAJgC;A;AAMjC;A;;;;;;AAMA;AACA;;;;;;AACC;AACA;;A;AACC;;A;AAMD;AAEA;AACA;;;;;AACC;AACA;A;;AAED;A;;A;;;;;;;;A;AAaA;A;AAED;AAEA;AAEA;;;;;;A;AAEE;AACA;A;AAEA;AACA;A;A;;AAGF;AAEA;A;AAIC;;;;;;AAEC;A;;AAED;A;AAED;AAGA;AAEA;A;;;;;;;;AAMA;AACA;A;;;;;;AAG8B;A;;;;;AAG9B;A;;;;;AAGmC;;;;A;;;;;;AAKnC;AACA;A;;;;;;AAG2B;A;;;;;A;AAI1B;A;AAED;A;;;;;AAGgC;;;;A;;;;AAGhC;A;;;;ACxTA;A;;;;;AAMuC;A;;;;;A;AAiFtC;A;AAKG;AACA;;;;AACJ;;;;;A;AAEE;;A;A;AAGA;A;A;AAGA;A;AAED;A;;A;AAWA;A;AAGD;AACI;AACA;;;AACH;AACA;AACA;AAHuB;A;A;AAYvB;A;AAGD;A;AAEC;AACA;AAGA;AACA;AACI;;;AACH;AACA;AACA;A;AAEC;A;AAED;AACA;AAR0C;A;A;AAY5C;;;;;;A;AAEE;;A;AAED;AACA;AACA;AACA;AACA;A;AAEK;;;A;AAOF;A;AAED;AATwC;A;A;AAYzC;A;AAIC;A;AAED;AACA;AACA;AACI;;;A;AAEF;A;AAED;AAJuC;A;A;A;;A;AAazC;;;;;;A;A;AAMG;;A;AAED;A;A;;AAGF;;;;;AACC;;;;;A;AAEE;A;A;;A;;A;AAMJ;A;;;;;;AA+CA;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;AACA;AACA;A;AAEA;;;;A;AACC;A;A;AAGA;AACA;AACA;A;A;AAGG;;A;AACF;A;AAED;AACA;AACA;A;;AAGA;A;A;A;;;;;;;;AAKD;A;AAEE;AACA;A;AAEC;A;AAED;A;A;AAGA;A;AAED;A;AAEC;A;A;A;;;;;;;A;AAOD;A;AAED;A;;;;;;AAUA;;AACI;;A;AACF;A;A;AAGF;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;AACA;AAEA;AACA;AAGI;;;AACH;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;AARsB;A;AAUnB;;;AACH;AADmC;A;A;AAInC;A;AAKG;;;;;;AACH;;;;A;AAEC;A;AAED;;A;AAEC;AACA;AACA;A;AAGG;AACA;AACA;A;A;AAKH;AACA;A;AAEC;A;AAED;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAfA;A;AAiBD;;AACI;;A;AACF;A;A;AAGF;AACA;AACA;A;AAEC;A;AAEG;;;AACH;AACA;AAFoB;A;A;A;AAOrB;A;A;AAQA;A;AAGD;A;;;;;;;A;AAcA;;;A;AACC;A;A;AAEA;A;A;AAGF;AAGE;;;;A;AAEC;AACA;A;AAEG;AACA;AAEJ;;;;;;;;;;A;AACC;A;AAEC;AACA;AACA;AACA;A;AAED;A;A;AAEA;AACA;A;AAGA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;;AAEA;AACA;A;A;AAED;;A;AACC;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;A;AAGG;AACJ;;A;AACC;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;A;;AAEG;;;;A;AACF;AACA;A;A;AAKF;;;A;AACC;A;A;AAEA;AAEA;AACA;;AACI;;A;AACF;AACA;A;A;AAGF;AACA;AACA;AACA;A;;AAEA;AACA;A;A;A;AAKA;AACA;A;AAGD;;;;AACA;AAGF;AAGE;A;AAEC;A;AAED;A;AAGC;AACA;AACA;AACA;A;AAED;A;;;;;;;;AAQD;AACA;AAGA;;;;AACA;A;AAEC;AACA;A;AAED;AACA;A;AAEC;AACA;A;A;AAIA;AACA;AACA;A;AAGD;AACA;A;;;;;;;;AAMA;A;AAEC;A;AAGD;;;;AACA;AACA;AACA;A;AAEC;AACA;A;A;AAIA;AACA;AACA;A;AAED;A;;;;;;;A;A;AAME;A;AAED;A;AAED;A;;;;A;AAMC;A;AAED;A;;;;;AAIA;;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;;;AASA;AAIA;;;;AACA;AACC;;AACC;;;;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;A;AAED;AACA;A;AAEC;AACA;A;A;A;AAIC;AACA;AACA;AACA;A;AAED;AACA;AACA;A;A;A;;;;;;AAMC;;;A;AACF;A;AAED;A;;;;AAIA;;AAEK;AACA;;;AACH;AADoB;A;AAGjB;;;AACH;AADsB;A;AAGnB;;;AACH;AADsB;A;AAGnB;;;AACH;AADsB;A;AAGvB;A;A;;;;;;AAKD;AAOA;AACA;A;;;;;;AAYA;AAEI;AACJ;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjvBA;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAGqC;A;;;AAEE;A;;;;AAKvC;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAGkC;A;;;AAEE;A;;;;;;;;;A;A;A;A;;;A;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACnCpC;A;AAGC;AACA;A;AAGA;AACA;;AACC;A;A;A;;;;A;AA+FF;;;A;AACC;;A;AAIA;AACA;;A;AAEA;A;A;A;;;;;;;AAgCD;AACA;;A;;;;;AC1OA;AACA;AACA;A;;;AAMI;;;AACH;AACI;;;A;AAEF;A;AAEA;A;AAJiB;A;AAOnB;AAToB;A;A;;;AAgBrB;AACA;;;;;AACC;A;;AAED;A;;;AAYA;AACA;AACI;;;AACH;AACI;;;AACH;AACA;AAFkB;A;AAFC;A;AAOrB;A;;;A;AAOC;AACA;;AACC;AACA;AAGA;A;AAED;A;A;AAGA;A;AAED;A;;AC/EkD;A;;AACA;A;;;AACA;A;;;;;;A;A;A;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;AC+BjD;A;AAED;A;;;;AAiDA;AACG;;A;AACF;A;AAED;A;;;;;;;AAOA;AAIG;;;A;AACF;A;AAEA;A;AAED;;;;AACA;A;;;;;;AAoBA;A;;;;;;AAQI;AACJ;AACI;;A;AAEF;A;AAED;;;;A;AAEC;A;A;AAGA;A;AAED;;A;AAEC;;A;AAIC;AACA;;;;;AACC;A;;AAED;A;AAED;A;AAvBY;A;A;;;;;;;;;;AA+BX;;;A;A;;;;;A;A;A;;;;;A;AAaH;AACG;A;AAGF;A;AAGD;AACA;;AAEA;;A;AACI;;;A;A;;;;;A;AAGH;;AACA;AACG;;;A;A;;;;;A;AAGH;;AACA;A;AAGG;AACJ;;A;AACI;;;;A;A;;;;;A;AAGH;A;AAGD;;A;AACI;;;;A;A;;;;;A;AAGH;A;AAGD;;A;AACI;;;A;A;;;;;A;AAGH;A;A;;;;;A;A;AAMD;AACA;;A;AACC;;A;;AAEA;;A;A;;;;;A;;;;;;;;;A;A;;;;;A;AAWD;;;;AACA;;AACA;A;A;;;;;A;AAOG;;;A;AACF;A;;;;;A;AAGD;AACA;A;AAEC;A;;;;;A;AAGD;;;;A;A;;;;;A;AAMA;AAEG;;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;;;;;AAc6B;;A;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACvP/B;A;AAEG;;;A;AAEF;A;AAF4B;A;AAM9B;AACA;AACA;AAEI;;;AACH;AADiC;A;AAG9B;;;AACH;AAD6B;A;AAG9B;A;;;;;A;AAUC;A;AAGG;;;A;AAEF;A;AAF+B;A;AAMjC;AACA;A;;;;;AAOA;AACA;A;;;;;A;AAiCC;A;AAGD;;;;AACA;AACA;;AAEC;AAEA;AACA;AACA;AACA;AAEA;AACA;A;AAGD;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AACA;A;A;AAIC;A;AAEC;A;A;A;AAIA;AACA;A;A;A;;;;;AAOF;AACA;AACA;A;;;;;;;;A;A;;;;;A;AAkBA;;A;AACK;AACA;;;AACH;AACA;AAFoC;A;AAIrC;AACA;A;AAEC;A;AAED;AACG;;;A;A;;;;;A;AAGH;A;AAID;;AACC;A;AAEC;AACA;A;AAED;AACG;;;A;A;;;;;A;AAGH;AACA;A;AAIG;;;AACH;AADuB;A;AAGxB;AACA;AACA;A;;;;;;;AAOA;;A;AACC;AACA;;;AACA;A;AAED;A;;;;;AASA;A;;;;;A;AAOC;A;AAED;A;;;;;AAUA;A;;;;;;;;AAUI;AACJ;;;;AAEI;;;A;A;A;;;;;;;A;A;;;;;;;A;AAQF;;;;AACA;A;AAED;AACA;AAEA;A;AAEC;AAhByB;A;A;A;AAqBzB;AArByB;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;AAqCzB;;AACC;A;A;A;;;;;;;A;A;A;;;;;;;A;AAWD;A;AAID;;AACC;A;A;AAIA;A;AAED;;;;AACA;A;AAID;AACA;;;;;;A;A;AAGC;AACA;AAGA;A;A;;;;;;;A;AAIA;AAGA;A;A;;;;;;;A;A;AAPA;A;A;;;;;;;A;AAIA;AAGA;A;A;;;;;;;A;A;AAAA;A;A;;;;;;;A;A;AAKD;A;;;;;;;A;;;;;AAOA;AACA;;;AACA;A;;;;;;;A;A;;;;;A;AA0FA;AACA;AACA;AACA;;AACI;A;AACF;AACA;A;AAEI;AACJ;;;;AACA;A;A;;;;;A;A;A;AAOF;;AACI;A;AACF;AACA;A;AAEI;AACJ;;;;AACA;A;A;;;;;A;A;A;AAOF;;AACK;AACJ;;;;AACA;A;A;;;;;A;A;A;;;;;A;;;;;AAYG;;;;AACD;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AAEA;AACA;A;;;;;AAOI;;;;AACD;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AACG;A;AACF;A;AAED;AAEA;AACA;A;;;;;A;AAsCC;A;AAGD;A;;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3lBA;A;;;;AAIA;A;;;;AAIA;A;;;;AAIA;A;AAIC;A;AAEA;A;A;AAGC;A;AAED;A;AAGD;AACC;A;AAEC;A;AAED;AACA;A;AAED;A;;;;;AAUA;A;;;;;A;AAOC;A;AAEA;A;A;;;;;ACd4B;A;;;;;AAI7B;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;AAOA;A;AAEC;A;A;AAGA;A;A;;;;;AAOD;AACA;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;AAMA;A;AAEC;AACA;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;A;AC5FC;A;AAED;A;;;;;AAO+B;A;;;;;;;A;A;;;;;A;AAM/B;AACA;AACA;AACA;A;;;;;;;A;A;;;;;A;A;A;;;;;A;AAWA;A;AAEC;A;AAED;A;;;;;AAIA;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAIA;A;AAEC;A;AAED;AACA;A;;;;;;;;A;AAKC;A;;;;;;;A;AAGD;AACG;A;AACF;A;;;;;;;A;AAGD;;;AACA;AACA;A;;;;;A;AAKC;A;AAED;AACA;AACA;A;;;;;AAKA;AACI;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAGA;A;AAED;AACA;A;;;;;;;;AAKA;A;A;;;;;A;AAIA;AACA;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;;AAIkC;A;;;;AAIA;A;;;;A;AC5HjC;A;A;AAIA;A;AAGD;AACI;;;A;AAEF;A;A;AAGA;A;AAL2B;A;A;AAU5B;AACA;;;;;AACC;A;;AAIG;;;AACH;AACA;AACA;AAHiC;A;AAKlC;A;AAGD;AAGI;;;AACH;AACA;A;AAMC;A;AAED;AAViC;A;AAalC;A;;;;;;AAKA;;A;;;;;;;;;A;;;;;A;;;;;;A;A;AA+DE;AACA;A;AAED;A;A;AAKI;AACJ;;A;AAEE;A;AAFuC;A;A;AAMxC;A;AAKI;A;AAEH;A;AAEA;A;AAKD;AACA;AACA;AACA;AACA;AACA;AACA;A;AAGA;AAIA;AACA;AACA;A;A;AAID;A;AAEC;A;AAED;A;AAEA;AACA;AACA;A;A;;;;;;;;AAOD;AACA;AACA;AACA;;A;AAEE;AACA;AACA;AACA;A;A;AAIA;A;A;AAGA;A;AAEC;A;AAED;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;A;A;AAGF;A;;;;AAeA;AAEI;;;AACH;AACI;;;AACH;AADyB;A;AAFE;A;AAO7B;;;;;AACC;A;;AAGG;AACJ;;;;;;A;AAEE;A;AAEA;AACA;A;A;;AAIF;AAEI;;;AACH;AAD4B;A;AAG7B;A;;;;AAOA;AACA;A;;;;AAKA;AACA;A;;;;;AAYA;;A;;;;;AAIA;;;A;AAEC;A;AAED;A;;;;;;AAIA;AACA;;AACA;A;;;;;;;;;AAIA;AACI;;;;AACA;AACA;;;AAEH;;A;AACC;A;AAEC;AACA;A;A;AAKF;;;;AACA;AACA;;A;AACC;;;;AACA;A;AAEC;A;AAED;;;;AACA;A;AAEC;A;AAED;AACA;AACA;A;AAED;A;AAED;;A;AACC;;;;AACA;A;AAED;A;;;;;AAYA;A;;;;AAII;AACJ;;;;AACA;AACC;A;AAEC;A;AAED;AACA;AACA;AACA;A;A;AAGA;A;AAED;AACA;A;;;;;;;;AAIA;AACI;;;;AACJ;AACC;A;AAEC;A;AAED;;;;AACA;A;AAEC;A;AAED;;;;AACA;A;AAEC;A;AAED;A;AAED;;;;AACA;AACA;A;;;;;;AASI;AACA;;;AACH;A;A;AAGE;A;AAED;A;AANsB;A;A;AAUvB;A;AAED;A;;;;;;;;AAKA;A;AAEC;A;AAED;AAEA;;AACC;AACA;AACA;;;;;;AACC;A;;AAED;;;;AACA;A;A;;;;;A;A;A;;;;;A;;;;;;AA8BD;AACA;A;AAGC;;;;;AACI;A;AAEF;AACA;A;A;;A;AAKE;;;AACH;A;AAGC;AACA;A;AALsB;A;A;A;AAUxB;A;AAED;AACA;AACI;;;AACH;A;AAEC;A;AAEA;AACA;A;AANsB;A;AASxB;A;;;;;;;;AAIA;AACA;AACI;;;AACH;AACA;;A;AAFuB;A;A;AAKvB;;A;AACC;;;;AACA;A;A;;;;;A;A;AAKD;AACA;;;;AACA;A;A;;;;;A;AAduB;A;AAmBxB;;A;AACK;AACJ;;;;AACA;A;AAED;A;;;;;ACvfA;AAKA;AAIA;;;;;AACC;A;;AAKG;;;AACH;AADqB;A;AAOtB;AACI;;;A;AAEF;A;AAGD;AALsB;A;AAQnB;;;AACH;A;AAGC;A;AAJoB;A;AAQtB;A;;;;AAIA;;A;AAEE;A;AAF8B;A;AAKhC;A;;;;AAMA;AACA;;AAEC;AACA;;AACC;AACA;A;A;AAGA;A;AAED;A;AAED;A;;;;A;AAKC;A;AAED;A;;;ACvGA;A;AAEC;A;AAED;AACI;;;AACH;;;AACA;AACA;A;AAEC;A;AALmB;A;A;AASpB;A;AAED;A;;;AA+DA;A;;;;AAUA;A;;;;A;AA+CC;A;AAEA;;;;;;;A;AAEE;A;A;;AAGF;A;AAEA;A;AAEA;A;A;;;;A;AASA;A;A;AAGG;;;A;AACE;;;A;AAEF;A;AAFsB;A;AAKxB;A;A;AAGF;;;;;;;AACC;;;;;;A;AAEE;A;A;;A;;AAIH;A;;;;AAmCI;;;A;AAEF;A;AAF2B;A;AAK7B;A;;;;A;AAOC;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;AACA;AACA;;AACC;A;AAEC;A;AAED;AACA;AACA;A;AAED;AACA;A;;;AAa4C;A;;;;AA0BR;A;;;;;AAwBpC;AACA;AAEA;AACI;;;AACH;AACA;AACA;AACA;AACA;AALuB;A;AAQxB;;A;AACC;AACA;AACA;AACA;AAEA;;AACC;A;AAED;AACA;;A;AAEE;AACA;A;AAED;AACA;AACA;AAEA;;AACC;A;AAED;A;A;AAGA;A;AAED;A;AAID;;A;;;;;;AAeA;AAGA;AACA;AACA;;;;;;;AACC;;;A;A;AAEE;AACA;A;A;;A;AAIA;AACA;A;A;A;;A;AAOF;A;AAID;AACA;;;;;;AACC;A;;AAGD;A;;;;;A;A;AAQC;A;AAEA;A;AAIA;A;AAIA;A;AAED;AACI;;;AACH;AADuB;A;AAIxB;AACA;AACA;;;;;AACC;AACA;A;;AAED;A;;;;AAKA;A;;;;AAKA;A;;;;;AAaI;AAEA;AAEJ;;;;;;;AACC;;A;AAEC;;A;AAGD;AACA;A;A;AAGE;AACA;A;AAEA;A;A;A;AAQD;;AACA;A;AAEA;A;AAGD;AACA;A;A;AAIA;A;AAGD;;;;;;AACC;;A;AAIC;AACA;AACA;;A;A;A;AAOC;AACA;AACA;A;AAED;A;A;;AAIF;A;;;;;;AA0DA;;;;AACI;;;AACH;A;AAEC;AACA;A;AAED;AANuB;A;A;A;AAWtB;A;AAED;AACI;;;AACH;A;AAEC;A;AAED;AALuB;A;AAOxB;A;AAED;;A;;;;;;AAyEA;;A;AAEC;A;AAED;A;;;;;;AAMA;;A;AAEC;;AACA;A;AAEA;A;AAED;A;;;;;;AAMA;;;A;;;;;;AAMA;;A;;;;;;AAaA;;;;;;;AACC;;;A;AACC;A;A;;AAGF;A;;;;;AAOI;;;AACH;;;AACA;AACA;;;A;AACC;A;A;AAGF;A;;;;;;AAcI;;;AACH;A;A;;;;;A;A;AAIA;AAL2B;A;A;;;;;A;;;;AAY5B;A;;;;A;AAKC;;AACC;A;A;AAGC;;;A;AACF;;AACC;A;A;AAGF;;AAA2B;A;A;;;;A;AAkB1B;A;AAED;;A;;;;;;A;AASC;A;AAED;;A;;;;;;AAMA;;A;;;;;A;AAOC;A;AAED;A;;;;A;AAOC;A;AAED;A;;;;A;AAWC;A;AAIE;A;AACF;A;AAEA;A;AAID;AACA;AACA;AACI;;;AACH;A;A;AAGE;;AACA;A;A;AAGD;A;AAED;AACA;AACA;AAZkB;A;AAcnB;AACA;A;;;;AAMA;;AAEK;;;;A;AAEH;;;;A;AAEA;;;AACA;;;;A;A;AAGA;;;;A;AAEA;;;AACA;;;;A;A;AAOA;A;A;AAKA;;;;A;A;A;AAMC;A;AAED;A;AAKD;AACA;;AACC;A;A;AAGA;A;AAED;A;AAID;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;ACz4BA;A;;;;A;AAQC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4FA;;A;AACC;;A;AAED;;A;;;;;;;A;AAyBC;A;AAGD;;;A;AACC;;A;AAED;;A;;;;;;;AAIA;;A;AAEC;A;AAGD;AACA;AAGA;;A;AAEC;A;AAED;A;;;;;;AAOiC;A;;;;;AAIjC;A;;;;;AAKA;A;;;;A;AAUC;A;A;AAKA;A;AAEC;A;A;A;AAUD;A;AAGA;AACA;;AACC;A;A;AARD;A;A;AAcA;AACA;;AACC;A;A;A;AAOD;A;AAEC;A;AAEC;A;A;AAGF;;AACC;A;A;AAKF;A;;;;AAoBA;A;;;;;AASA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAOC;A;A;;;;;A;AAOA;A;A;AAEC;AACA;AACA;A;A;AAGF;A;;;;;;AAKA;;;;;;AACA;AACA;AACC;;AACA;A;AAEC;AACA;AACA;A;A;A;;;;;;;;AAOF;;;;;;AACA;;A;AACC;;AACA;A;;AAEA;;AACA;A;A;;;;;;;;AAOD;;;;;;AACA;;AACC;;AACA;A;AAEC;AACA;AACA;A;A;AAIF;AACA;;A;;;;;;;;A;AAWA;;;;A;AACC;;A;AACI;;A;AACF;A;A;;AAGD;A;AAED;A;A;AAGA;;A;AACI;;A;AACF;A;A;;AAGD;A;AAED;A;A;AAIA;AACA;AAEA;;A;AACI;;A;AACF;A;A;A;;AA7BF;A;A;AAiCD;A;;;;;;;A;AAcA;;;;A;AACC;AACA;A;A;AAGA;AACA;A;A;AAGA;;;;A;AAEC;A;AAED;A;AAEC;A;A;;AAjBD;A;A;AAoBD;A;;;;;;AAmBA;AACA;AAKA;;;;;A;AACC;AACA;A;AAED;AAGC;;A;AACC;;AACA;;;;;;;;A;AACC;AACA;AACA;A;A;A;AAKD;A;AAGD;;;;A;AACC;A;AAED;;A;AACC;;;A;AAED;;;A;AACI;;;;A;AACF;A;AAED;;A;AACI;;;;A;AACF;A;A;A;AAKH;;A;AACC;AACA;A;;AAEA;;A;A;AAGF;A;;;;;;AAOA;;;;;AACA;;A;AACC;AACA;AACA;;A;AAED;;A;AACC;AACA;AACA;A;AAED;A;AAIA;;;;A;AACC;;A;AAEC;;;;A;AAEC;A;AAED;;AACA;A;AAKD;AACA;AACA;A;A;A;AAGA;A;;AALA;AACA;AACA;A;A;AAMD;AACA;AAEC;A;AAEC;A;AAID;;A;AAEC;;A;AACC;A;AAEC;A;AAED;;AACA;;AACA;A;A;AAGA;A;A;AAIF;;A;AAEI;;;A;AACF;A;A;;AAIE;;A;AACF;A;A;AAGF;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAIF;;A;AACC;;A;AAEC;;;AACA;;AACC;;AADkB;A;A;;AAInB;A;A;AAGF;;A;AACC;;A;AAED;A;;;;;;;AAUA;;;;;AACA;;A;AACC;AACA;AACA;;A;AAED;;A;AACC;AACA;AACA;A;AAED;AAGA;;A;AACC;;;;A;AAEC;A;AAED;;AACA;A;A;AAQD;;;A;AAGC;A;;;AAEA;;;;;;A;A;A;AAKE;AACA;AACA;A;A;AAGF;;A;AACC;;A;A;A;A;;AAKD;AACA;AACA;A;A;AAGG;AAEJ;AAEC;A;AAGC;A;A;AAGA;A;AAID;AACA;AACA;AACA;;;A;AAEC;A;AAIG;AACJ;AAEA;;A;AACC;;AACA;;A;AACC;;A;;AAEA;;A;AAED;A;;AAEI;AACJ;;AACA;;;;;AACC;A;AAEC;AACA;A;AAED;;;;;A;AACC;A;A;;AAGF;;;A;AACC;AACA;AACA;;;;;AACC;;A;AACC;;A;AAMC;;A;AACC;;;;AAGA;AACA;AACA;A;AAED;;;A;AAED;;A;AAED;;A;;AAED;AACA;;A;A;AAEA;;A;A;AAKF;;A;AACC;A;A;AAGA;A;AAED;AAEA;;A;AACC;;;;A;AAEC;A;AAED;;;;A;A;AAEI;;A;AACF;A;A;A;A;AAGE;;A;AACF;A;A;;A;AAGD;;A;A;;AAGE;;A;AACF;A;A;AAMF;;A;AACC;;AACI;AAEJ;;;;;A;AACC;;;A;A;AAEA;;;AACG;;A;AACF;A;AAED;;A;;A;;AAGA;;;A;AACC;AACA;;;AACA;;;;;;A;AACC;AACA;A;AAED;;;A;A;AAEA;AACA;;;AACA;;;;;;A;AACC;AACA;A;AAED;;;A;;AAEA;A;A;A;A;AAGF;A;AAID;;A;AACC;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;A;AAED;A;;;;;;A;AAOC;A;AAED;;;A;AAEC;A;AAED;A;;;;;;AAYA;;A;AAEC;;AACA;A;AAED;AACA;;;;;AACA;;A;AACC;;A;AAED;;A;AACC;;A;AACC;;A;AACC;;A;;AAEI;A;A;AAGH;A;AAEA;A;AAEA;A;AAED;A;AAED;A;AAED;;;AACA;;A;AACC;;A;AACC;;A;AAED;A;AAED;;A;AAGD;AAEO;A;AACP;;;;A;AAGC;;A;AACC;;AACA;A;A;AAGD;;A;AACC;;A;A;A;A;AAID;AAGA;;A;AACC;;AACA;A;A;AASD;;;;A;AACC;A;A;AAEA;;A;AACC;;A;;AAEA;A;A;A;AAVA;;A;;AAEA;A;A;A;A;AAaF;;;AACA;;A;AACC;;A;AACC;;A;AAED;A;A;AAKD;;;;A;AACC;;;;A;AACC;AACA;A;AAED;AACA;;;A;AAEC;AACA;A;AAED;A;A;AAEA;A;A;AAEA;;A;AACC;;A;;AAEA;A;A;;AAnBD;A;A;A;;AAwBD;;A;AACC;;A;AACC;;A;AAED;A;AAED;A;AAcA;;;;;A;AACC;;;A;AAEC;AACA;A;A;AAGA;AACA;A;AAED;;A;A;AAGA;;;A;AAEC;AACA;A;AAED;A;A;AAGA;;;A;AAEC;AACA;A;AAED;A;A;AAGA;;;;;;;A;AAEC;AACA;A;AAED;A;;AA7CA;;A;AACC;AACA;;A;AACC;;A;AAED;A;AAED;;A;AACC;;A;AAED;A;A;A;A;AAsCF;A;;;;;;;;;A;AAYA;;;;A;AACC;;;;AACA;A;A;AAEA;;;;AACA;A;A;AAEA;;;;A;;AARA;A;A;AAUD;A;;;;;;;AAKI;AACJ;AAEC;A;AAEC;A;AAGD;;;;A;AAEC;A;AAED;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;;AAKA;AACA;AAEC;A;AAGC;A;A;AAGA;A;AAID;AACA;AACA;AACA;;;A;AAEC;A;AAID;;A;AACC;A;A;AAGA;A;AAED;AAGA;;;;A;AAEC;A;AAED;AAGA;;A;AACC;A;A;AAGA;A;A;AAGA;A;A;AAGF;A;;;;;;;AAQA;AACA;AAEA;AAEO;A;A;AAEN;A;AAGA;A;AAGA;;;A;AAEC;A;AAED;A;A;AAIC;A;AAED;;;A;AAEC;A;AAED;A;A;;;;;;A;AAQA;A;AAEG;AACJ;;;;;A;AAGE;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;AAED;A;;;;;AAMA;;;AACA;AACA;A;;;;;A;AAKC;A;AAED;AAKA;AACA;;AACC;A;AAEC;A;A;AAGA;AACA;A;AAED;;;A;AAEC;A;AAED;A;A;A;;;;;A;AAMD;AACA;AACA;;A;AAKE;AACA;AACA;A;AAEM;A;AAEN;A;AAEC;A;AAED;A;A;AAIC;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;A;AAEC;A;AAED;A;AAEC;AACG;A;AAEF;AACA;AACA;A;AAGD;A;AAED;A;AA3CA;A;A;A;AAgDD;A;AAIA;AACA;AACA;A;AAIA;;;AACA;AACA;A;A;A;;;;;A;;;;ACpoCF;;AAEA;;A;AAEC;A;AAED;AAEA;AACA;AAEA;A;;;;;;;AAmEA;;A;;;;;;AASA;A;;;;;;AAuBA;;;A;;;;;;AAcG;;A;AACF;AACA;AACA;A;AAED;A;;;;;;;;AASA;;AACI;A;AACC;;;A;AACF;A;AAEA;A;A;A;AAIH;;A;;A;;;;;;AAMA;A;;;;A;A;AAMC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;AAIA;;A;;;;;;;A;AAgBC;A;AAED;;A;;;;;;;AAIG;;;A;AACF;A;AAQA;AACA;AAED;AACA;;;AACC;AACA;A;;;;;A;AAGA;A;AAID;;AACA;AACA;AACA;A;;;;;AAWA;;;A;AACC;A;AAED;;;A;AACC;;;A;AACC;;;;;A;A;AAIF;;;A;AACC;A;AAED;;;A;AACC;;;A;AACC;;;;;A;A;A;;AAKF;;;;;;;;;;;;;A;AACC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;;A;AAEA;;A;AAEA;;A;AAEA;;A;AAEA;;A;AAEA;A;A;A;;;;;AAKD;A;;;;A;AAKC;AACA;A;AAED;;;;A;AAEC;AACA;A;AAED;;;;AACA;;A;AAEC;;A;A;AAGA;A;A;;;;;;AAKD;A;AAEC;AACA;A;AAED;;AACA;;;;AACA;;A;AAEC;;A;A;AAGA;A;A;;;;;;A;AAMA;AACA;A;AAED;;AACA;;;;A;AAEC;A;AAED;A;;;;;;AAIA;A;AAEC;AACA;A;AAED;;AACA;;;;A;AAEC;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;AAEA;A;A;AAGA;A;A;;;AAKD;A;AAEC;A;AAED;A;AAEC;A;A;;;AAKD;A;AAEC;A;AAED;A;AAEC;A;A;;;;AAOD;A;AAEC;A;AAQD;AACA;AACA;A;A;AAIE;A;A;AAGF;A;AAGC;A;AAEC;AACA;A;A;A;AAKD;A;AAED;A;AAEC;A;A;;;;;AAUD;;A;AACC;;A;AAIC;A;AAED;;A;AACC;;A;AAED;AACA;A;AAED;;A;AACC;;;;;A;AAEC;A;AAED;A;;AAEA;;A;A;;;;;;A;AAMA;AACA;A;AAED;;A;;;;;AAIA;A;;;;;AASA;AACA;AACA;;;;;;AACC;;AACA;;A;AACC;;A;A;AAGA;A;AAEA;A;AAED;AACA;AACA;AACA;A;;AAED;A;;;;;;;AAIA;;AACA;AAIA;;;;;;AACC;;;A;;AAED;A;;;;;;;A;AASC;AACA;A;AAED;AAGA;;AACA;AACA;;;;;;AACC;AACG;;A;AACF;A;A;;AAGF;;AAAqC;A;AAErC;;;;;;A;AAEE;A;AAED;AACA;AACA;;;;;A;;AAED;A;;;;;;;A;;;AAKA;;;;;A;A;A;AAKE;A;A;AAGF;;;AACA;A;;;;;A;AAKC;AACA;A;AAED;;AACA;AACA;;A;AAEC;AACA;AACA;A;;AAIA;AACA;;AACA;;A;AAED;A;;;;;;;A;AAUC;AACA;A;AAED;A;;;;;;;AAKA;;;;A;AACC;;;AACA;;;;;;A;AACC;A;A;AAGF;;AACA;A;;;;;;AAQA;AACA;AACI;;;A;AAEF;A;AAED;;;;;AAJkB;A;AAMnB;A;;;;;;;AAIA;;;AACA;A;;;;;;A;AASC;AACA;A;AAED;;;;;A;;;;;;;AAIA;;;AACA;A;;;;;;AAQA;;A;AACC;A;;AAEA;A;A;;;;;;AAOD;AACA;A;;;A;AAKC;A;AAED;;;;;;A;A;AAQG;A;A;;AAIH;A;;;;AAIA;;;;;AACC;;A;A;AAEE;A;AAED;;A;AAED;;A;;AAED;A;;;;;AAIA;;;;;AACC;;;A;AACC;;A;AAED;;A;;AAED;A;;;;;;AASA;;A;AACC;;AACA;A;AAEE;;;;AAAH;;A;AACC;;;;AACA;AACA;A;A;A;AAIA;AACA;A;AAEA;AACA;A;AAED;A;;;;;;;AAKA;AACA;AACI;;;AACA;A;A;AAED;AACA;A;A;AAGA;A;A;A;AAIA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAOA;AACA;AACA;A;AAED;AACA;AACA;A;AAED;;;A;A;AAGE;A;AAED;AACA;AACA;AACA;A;A;A;AAWC;A;AAED;AACA;AACA;AACA;AACA;A;AAED;A;A;AAGA;A;AAED;A;;;;;AAKA;AACA;AACI;;;AACA;A;A;AAED;AACA;A;A;AAGA;A;A;A;AAIA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAOA;AACA;AACA;A;AAED;AACA;AACA;A;AAED;;;A;A;AAGE;A;AAED;AACA;AACA;AACA;A;A;A;AAWC;A;AAED;AACA;AACA;AACA;AACA;A;AAED;A;A;AAGA;A;AAED;A;;;;AAiBA;AACA;AACA;A;;;;AAM4B;A;;;;;AAEK;;;;A;;;;;AAGjC;;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;;;;AAQA;AACA;AAGA;AACA;AAGA;AAGI;AAEJ;;AACC;;;;AACA;;;;AAEA;;;;;AACC;;A;AACC;;A;AAED;AAGI;;;;AACH;;AACA;AACA;;;A;AACC;AACA;;;A;AACC;;A;AAED;;;;;A;AARgC;A;A;A;A;AAAA;A;A;AAkBjC;AACA;;A;AAnBiC;A;A;AAsBjC;;;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;;;;;;A;AAEC;;A;AAID;AACA;;A;A;;A;AAOE;A;A;A;AAKF;;;;;A;AACC;A;AAEC;A;AAED;A;AAaC;A;AApE+B;A;A;AA0EjC;AACA;;A;AACC;;;A;AA5EgC;A;A;;A;AAkFpC;;AACC;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAED;A;AASD;AACI;;;;;;AAGH;AACA;AACI;;;AACH;A;AAEC;A;AAHwC;A;A;AAOzC;AAZuC;A;A;AAexC;;;A;AAEC;A;AAjBuC;A;AAqBzC;AACA;AAEA;A;;;;A;AAcC;A;AAED;A;;;;AAOG;;;A;AACF;A;AAED;;;;;;AACA;A;;;;ACvsCA;AACA;AACA;;;;;A;AAEE;A;AAED;A;AAEC;A;AAGA;A;A;;A;AAID;A;A;AAGA;A;AAED;A;;;AAQA;;;;;A;AAEE;A;AAED;A;A;AAGE;A;A;AAGE;A;A;AAGD;A;A;AAGF;AACA;;A;AAID;;;A;A;A;AAIE;A;A;A;AAIA;A;A;AAGD;A;AAED;A;;A;AAIA;A;AAED;A;;;A;AASC;A;AAED;;;;;;AACC;A;AAEC;;A;A;A;AAIC;A;A;AAGD;A;A;;AAGF;A;;;A;AASC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AC9HA;AACI;AACJ;AACA;AACA;;;;;;A;A;AAGG;A;AAED;AACA;AACA;AACA;A;A;A;AAKC;A;AAED;AACA;AACA;A;AAED;;A;A;AAGE;A;A;AAGA;A;AAED;A;A;;AAGF;;;A;AACC;AACA;A;A;AAGA;A;AAED;A;;;;AAIA;AACA;AACI;;;AACH;AADsB;A;A;;;;;AAiBvB;AACI;AACJ;AACA;AACA;AACA;;;;;AACC;AACA;;A;AAEC;;A;A;AAGA;A;A;AAGA;AACA;AACA;A;A;AAMA;AACA;;A;A;A;AAOA;AACA;A;AAGA;AACA;A;AAGA;AACA;A;A;AAKC;A;AAEA;AACA;A;AAED;A;AAGA;A;A;;AAGF;;;A;AACC;AACA;A;AAED;A;;;;;;AC/FsC;A;;;;;AAwEtC;AACA;AACA;AACA;A;;;;;;A;AAOC;A;A;AAGA;A;AAED;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AAKA;A;;;;;AAMA;AACA;A;AAEC;AACA;A;AAEA;A;A;;;;AAKD;A;;;A;AAMC;A;A;AAGA;A;AAED;A;;;A;AAMC;A;A;A;AAIA;AACA;AACA;A;AAEA;AACA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAMC;A;A;AAGA;AACA;AACA;A;AAED;A;;;A;AAMC;A;A;AAGA;AACA;A;AAED;A;;;AAMA;A;AAGC;AACA;AACA;A;A;AAGA;AACA;A;AAED;A;A;A;AAIE;AACA;AACA;A;AAED;A;A;AAGC;AACA;AACA;A;A;AAGA;AACA;A;AAED;A;A;AAGC;AACA;A;A;AAGA;AACA;A;AAED;A;AAED;A;;;A;AASC;A;AAED;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;A;AAGA;A;AAED;A;;;A;A;AAOC;AACA;A;AAEA;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;AAGD;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAMC;AACA;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAOC;A;A;AAGA;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAOC;AACA;A;AAED;A;;;A;AAQC;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;A;AAMC;AACA;A;AAED;A;;;AAMA;A;;;;AAKA;AACA;AACA;A;;;;A;AAOC;A;A;AAGA;A;AAID;AACA;A;;;AC5hBA;A;;;;;AAKiC;A;;;;;AAKY;A;;;;;;A;AAS5C;A;AAGE;;A;AACF;A;A;AAIA;A;AAID;;;;A;AAEC;A;AAED;AACA;AAKA;;AAGA;AAEA;A;;;;;;AAMA;A;;;;;;AAMA;AAEA;AACI;AAEJ;AAEC;;;;;;AACC;AACA;;A;AAEC;AACA;A;AAKD;;;;;A;AACC;AACA;A;A;AAGA;AACA;A;A;;AAGF;AAIA;;A;AACC;;A;AACC;;;A;AACC;A;A;AAGA;A;A;AAGF;AACA;A;AAGD;AACA;;AACA;A;AAED;A;;;;;;;A;AAOC;AACA;AACA;AACA;A;A;AAMA;AACA;AACA;A;AAID;;;;AACA;AAEA;A;;;;;AAIA;;;;;A;AAEE;A;A;;AAGF;A;;;AAgBA;A;;;;;;A;AAUC;A;AAED;;AACA;;A;AAEC;A;AASD;AAEA;AACA;;A;A;AAEE;A;AAED;AACA;;A;AAEC;A;AAED;A;AAEE;;;A;AACF;A;AAED;AACA;A;;;;;;AAOA;AACA;A;;;;;AAWA;A;;;;;;A;AAyDA;;;A;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;A;A;AAEA;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;A;A;AAED;A;;;;;;A;A;AAMC;A;AAED;A;;;;;A;A;AAMC;A;AAEA;A;A;;;;;AAQD;A;;;;;;AAeA;;;AACC;;;;A;AAEC;A;A;AAGD;;;;;;;;A;A;AAEE;A;AAED;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;A;A;AAIC;A;AAED;AACA;AACA;A;A;AAGA;;A;AACC;AACA;AACA;A;A;AAGA;AACA;AACA;A;AAED;A;AAGA;;A;AACK;AACJ;AACA;AACA;;AACA;A;AAEC;A;AAED;AACA;A;A;AAMA;A;AAEG;AACD;;A;AACF;A;AAED;A;A;AANC;A;AAEG;AACD;;A;AACF;A;AAED;A;A;A;A;;;;;;;AAME;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;;AAMA;;;;AACA;A;;;;;;;AAII;AACJ;AACK;;;AACH;A;AADqC;A;A;AAKrC;AACA;A;A;AAIA;A;AAED;;A;A;;;;;;;AAKD;A;;;;ACteG;A;AACF;A;AAED;A;;;;A;AAQC;A;AAED;AACA;;AACK;AACJ;A;AAEC;;;;A;A;AAGA;A;AAED;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;A;A;A;;A;A;A;;A;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBA;A;;;;;AASA;A;;;;;AAKA;A;;;;;AAMA;AACA;;;;;AACC;AACA;A;;A;;;;;ACrCD;A;;;;;AAKA;A;;;;;AAKA;A;;;;;AAKA;;;;;A;AAGE;A;A;;AAGF;A;;;;;;AAKA;;;;;;A;AAGE;A;A;;AAIF;;A;;;;;;;AAKA;;;;;;A;AAGE;A;A;;AAIF;;A;;;;;;;AAKA;;;;;;AACC;;;A;AACC;A;A;;AAGF;;A;;;;;;;AAKA;;A;AACC;;A;AAGD;;A;;;;;ACvDA;A;;;;;;AAWA;AAEI;AACJ;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAGD;AACA;A;;;;;;AAI8B;A;;;;;AAGF;A;;;;;AAGE;A;;;;;AAGF;A;;;;;AAI5B;AACA;A;;;;;ACrCA;A;;;;;AAKA;A;;;;;AAWiC;A;;;;;AAGA;A;;;;;AAGC;A;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoBlC;A;;;;;;AAKA;AACA;AACA;A;;;;;AAQI;AACJ;AACA;;AACC;AACA;AACA;AACA;AACA;A;AAGD;AACA;A;;;;;AAQA;AACA;;A;A;AAEE;A;AAED;;A;AACC;;;;;AACA;AACA;AACA;AACA;AACA;AACA;A;AAED;;A;AACC;;;;;AACA;AACA;AACA;AACA;AACA;A;AAEC;AACA;A;AAED;A;A;A;A;AAKA;AACI;;;A;AAEF;AACA;A;AAH6B;A;AAM/B;A;AAED;AACA;AACA;AACA;A;A;;;;;;;;AAWD;AACI;AACA;AACJ;AACA;A;AAGC;AACI;AACJ;;;;A;AAEC;AACA;A;AAED;A;AAED;AACA;AACA;A;AAEC;A;AAED;;;AACA;A;;;;;;;AAMA;;;;A;;;;;;;;AAK0C;;;;A;;;;;;;;AAIE;;;;A;;;;;;;;AAI5C;;;;AACA;A;;;;;;;;AAKA;;;;AACA;A;;;;;;;;AAKA;;;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;;AACA;;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;AAyCA;;;;A;;;;;;;AAMA;;;;A;;;;;;;AAWA;;;;AACA;A;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClSA;AACA;AACA;AAEA;;A;;;;ACP+B;A;;;;;;AAI/B;;A;;;;;;AAKA;AACA;AACA;AACA;A;;;;;AAKA;AACA;AACA;AACA;A;;;;;AAKA;A;;;;AClCA;A;;;;;AAWA;A;;;;;AASA;A;;;;;AAKA;A;;;;ACnBA;A;;;;;AAQA;AACA;AACA;AAEA;A;AAEC;A;AAGD;AACA;A;;;;;AASA;A;;;;;AAKA;A;;;;ACpCA;A;;;;;AASA;A;AAEC;A;AAGD;AACA;AAEA;A;;;;;AASA;A;;;;;AAKA;A;;;;;ACvBI;;;;;;AACJ;;;;;;A;A;;A;;AACC;AACA;;;;;;AACA;A;AAGC;AACA;AACA;A;AAGD;;;;AAGA;AACA;AACA;A;;AAGD;A;;;;;ACbA;AAOA;AAEA;A;;;;;;;AAKA;;;;;AACC;A;;AAGD;A;;;;;;;;AAKG;;;;A;AACF;A;AAED;AAEA;AACA;A;;;;;;;AAMA;AAIA;;;;AAEA;;;;;;;AAEA;;A;;;;;;;;;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;;AAQA;;AAEC;AACA;AACA;AAEG;;;AACH;AACA;;AACA;AACA;AACA;;A;AACC;AACA;;A;A;AAGF;;A;;;;;;;;AAKA;;AACI;;;AACH;;AADkB;A;A;;;;;;;;AASnB;AAEA;;;;;AACC;;AACA;A;;AAGD;A;;;;;;AAIA;;;;;;A;A;;A;;AACC;A;;A;;;;;AAMD;A;;;;;AAKA;A;;;;;AAKA;A;;;;ACjIA;A;;;;AAaA;AACA;AACA;A;;;;;;AAKA;;A;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;A;;;;;A;AAOC;A;AAGD;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;AAKA;AACA;AACA;AACA;A;;AAYA;A;;;;;;AAKA;;A;;;;;;AChEA;A;;;;;AAaA;A;;;;AAQA;A;;;;;AAQA;AACA;;;;;;A;A;;A;;AACC;A;;AAGD;A;;;;;AAKI;AACA;;;AACH;AADkB;A;AAGnB;A;;;AAOA;A;;;;;A;AAQC;AACA;A;AAGD;;A;;;;;;;;AAMA;;AACA;;AACA;AACA;A;;;;;;;A;AAOC;AACA;A;AAKD;AACA;AAEA;;AACA;;AACA;AACA;AACA;A;;;;;;;AAMI;AACJ;;;;;AACC;;A;;AAGD;A;;;;;;AAKC;;;;;;AACA;AAGD;;;;;A;AAEE;;A;AAED;AACA;AACA;AACA;A;;AAGD;AACA;AACA;A;;;;AAcA;;AAEI;A;AAEH;A;A;AAIA;A;A;AAIA;A;AAED;A;;;;;;AAKA;;A;;;;;;;AAGI;AACA;;;A;AAEF;A;AACS;;;A;A;AAER;A;AAEA;A;A;AAEQ;;A;AACT;A;A;A;AAViB;A;AAanB;;A;;;;;;;A;AAKC;A;AAED;AACA;;A;;;;;;;AAKA;;;;A;AAEC;A;AAED;;A;;;;;;;A;AAKC;A;AAED;AACG;;;AAAH;;A;A;AAEE;A;AAED;;A;AACS;;;AAAH;;A;AAEN;;AAEA;;;;;AAEA;;A;AACC;;;;;A;AAGD;;;;;AACC;;AACA;A;;A;A;AAGF;A;;;;;;AAKG;;;AAAH;;A;A;AAEE;A;A;AAGA;A;A;;AAEQ;;;AAAH;;A;AACF;;;AACH;;;;A;AAEC;A;AAHiB;A;A;A;AAOpB;;A;;;;;;AAMI;;;AACH;;;;;A;AACK;;;AACH;;;;;A;AACC;;;;;;AAEA;A;AAEC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;A;AAdgB;A;A;AAFF;A;AAsBnB;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;ACrRA;;;;;AACC;AACA;AAEA;AACA;AACA;;AAGA;AACA;A;;A;;;A;;;AA6BD;;;;;;A;A;;A;;;AACC;;AAEA;A;;A;;;A;;;AAUG;AACJ;;;;;;A;A;;A;;;AACC;AACA;AACA;AACA;A;;AAGD;;;;;;A;A;;A;;AACC;;;;;;A;A;;A;;AACC;;A;AACC;;A;AAGD;;AAGA;AACA;A;;A;;AAIF;;;;;;A;A;;A;;;AACC;AACA;AACA;A;;A;;;A;;;AAxDD;;AAEA;;;;;;A;A;;A;;;AACC;;;;AACA;;A;AACC;;AACA;A;AAGD;A;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACjBA;A;AAED;A;;;;;A;A;AAME;AACA;A;AAED;AACA;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;A;;;;AAgCA;AACA;AACA;A;A;AAIE;A;AAED;A;AAED;AAOA;AACA;AACA;;;;A;AAEC;AACA;;;;A;AAGD;;A;AAIE;A;AAGA;A;AAGA;A;AAIC;AACA;;AACC;A;A;A;AAKA;A;AAED;AACA;AACA;A;A;A;AAMA;A;AAGD;;AACC;AAD4C;A;A;A;A;AAQ9C;A;AAGD;A;;;;A;AAkBC;A;AAED;A;;;;AA+BA;A;;;;AC/LA;A;;;AAwBA;;;;;;A;AAEE;A;A;;AAGF;A;;;;;;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLA;A;;;;;;AAYI;AAKJ;AACA;AACA;;;;;;AACC;A;;AAMD;A;AAEC;A;AAGD;;A;;;;;;;AAmBI;AAOJ;;A;AAEC;A;A;AAIA;A;AAID;AAEA;;;;;AACC;A;;AAGD;;;;;AACC;;A;AAEC;A;A;;AAIF;AAEA;A;;;;;;;;;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxGgC;A;;;;;A;AAyI/B;A;AAED;A;;;;;AAKA;A;;;;;;AAYA;;;;;A;AACC;A;A;AAEA;A;A;AAEA;;;A;A;AAEA;;;A;;AAEA;;;A;A;A;;;;;;;;AAMD;AAGA;;A;AACC;A;A;;;;;;;;AAOD;;;A;AAEC;AACA;A;AAGA;A;;A;AAIC;A;AAED;A;A;AAGD;;A;AAEC;A;;AAEA;A;AAGD;;A;;;;;;;AAOA;;A;AACC;A;AAID;;;;;;AACC;AACA;;;A;AAEE;A;A;AAGA;A;AAED;A;;;A;;AAKF;;;;;;A;A;;A;;;AACK;A;AAEJ;;;A;AACC;;;A;A;AAEA;;;A;;AAEA;A;A;AAED;;A;AACC;A;A;;AAKF;;;;;;A;A;;A;;;AACC;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;;AACC;;A;AACC;A;A;;AAKF;;AACA;;;;;;A;A;;A;;;AACC;AACA;;A;AACC;;A;A;;AAKF;;;;;AACC;;A;;AAID;;A;AACC;A;A;;;;;;;;AAQD;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;A;A;;AAKF;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;A;A;;AAKF;;AACA;;;;;;A;A;;A;;AACI;;AAAH;;A;AACC;;A;A;;AAKF;;;;;AACC;;A;;A;;;;;;;;;AAOD;AACA;AACA;;;;;;AAEC;A;A;A;AAME;AACA;A;A;A;AAKD;AACA;A;AAQA;AACA;AAED;;;A;AAEC;A;AAED;;A;AACC;;A;AAEC;A;A;A;AAIC;A;AAEE;;A;AACF;A;AAGD;AACA;A;A;AAOF;;A;AACI;;;AAAH;;A;AACC;;;;AACA;;A;AAED;;;;;AACA;;A;AACC;;A;AAED;AACG;;;A;AACF;A;AAED;AAKA;AACA;;A;AAGG;A;AAEH;A;A;AAIG;;;A;AACF;AAGA;A;AAEA;A;A;AAIE;AAGD;;AAAH;;A;AACC;;A;AAMD;;A;AAIC;;A;AACC;;A;;AAEA;;A;A;AAKF;;A;AACC;;A;AAKE;;;AAAH;;A;AACC;;;;AACA;;A;AAKE;;;AAAH;;A;AACC;AACA;A;AAMA;AACA;AAED;;A;AACC;;A;AAIC;AACA;A;A;AAKF;;;;;A;AAEC;A;A;AAMA;A;AAOE;;;A;AACC;;;A;AACF;AACA;A;AAEC;A;A;A;AAIH;;A;AACC;;A;AAED;AAKA;;;;;A;AACC;;A;A;AAEG;;A;AACF;A;AAID;;A;AACC;AACA;;A;AAKD;;A;AAEC;AACA;;A;AAED;A;A;AAEA;A;A;AAEG;;;A;AACF;A;AAED;;A;AAEC;AACA;;A;AAED;A;;AAEA;A;A;A;;AAMF;;A;AAEC;AACA;AACA;;;;;;A;A;;A;;AACC;AACA;A;;AAED;A;;A;AAID;;A;AAEC;A;A;;A;;;;;;;AAQD;;;;;AACI;;;AAAH;;A;AAEC;AACA;;A;AAED;;AACA;;A;AACC;;A;AAED;A;;A;;;;;;;;A;AAOA;A;AAED;;A;;;;;;;A;AAMC;A;AAED;;A;;;;;;;AAQA;;A;AACC;;A;AAED;A;AAEC;A;AAID;;;A;;;;;;;;AAKA;;A;;;;;;;;AAMA;;A;AACC;AACA;A;AAED;;A;;;;;;;AAeA;A;;;;;AAsBA;A;;;;;;;AASA;AACA;AACA;AAEA;;;;A;A;AAEC;;A;A;A;AAEA;;A;AAGC;;A;;AAIA;AACG;;;AAAH;;;;;A;AACC;;A;AAED;;A;A;;A;AAGD;;A;A;AAOA;A;A;AAGA;A;A;;A;;;;;;;AASD;AACA;AACA;A;AAMC;A;A;;;;;;;AAQD;AAGA;;;;;AACC;A;;AAED;A;;;;;;AAOA;AAGA;;;;;AACC;A;;AAED;A;;;;;;A;AAeC;A;AAED;;;A;AACC;A;AAED;;;A;AACC;A;AAED;A;;;;;;;;AAgBG;;;A;AAEF;;;;;;AACC;A;;AAGD;AACA;AACA;A;AAGD;AACA;AAGA;;A;AACC;AACA;;A;A;;;;;;;;A;AASA;AACA;A;AAID;AACA;AACA;AAGA;;;;;;AAEC;;;A;AACC;;A;AAID;;A;AACC;;;;AACA;AACA;A;AAKC;AACA;;;;;;AACC;A;;AAED;A;A;AAKF;;;AACA;;;;;AACA;;A;AACC;;A;AAED;AACA;A;;AAID;;A;;;;;;;AAKA;;;;;A;A;AAEC;A;A;AAEA;A;A;AAEA;;;A;A;AAEA;;A;A;;;;;AAOD;A;;;;A;AAMC;A;AAKE;;;AAAH;;A;AACC;;A;AAEC;A;AAED;A;AAKD;;AACA;;;;;;A;AACC;;A;AAED;;;;AACA;;;AACA;;A;;;;;A;AASC;A;AAED;;AACA;;A;AAEC;A;A;AAGA;A;AAEG;;;;;AACH;;;AACA;;;;;;A;AACC;;;A;AAEC;A;AAED;A;AAPmC;A;A;;;;;;;;;AAyBrC;;;;;A;A;AAGC;;;A;;;;;;;A;A;A;;;;;;A;A;A;;;;;;;A;A;AAQA;;A;A;;;;;;;;;AAUE;;;AAAH;;A;AAKC;AAEA;A;AAKE;;;AAAH;;A;AACC;;AACA;;A;A;AAEE;A;AAED;;;A;A;;;;;;;A;A;A;AAOF;;AACA;;AACA;;A;AAEC;;A;AAGD;;;;A;A;AAEC;;;;;A;A;;;;;;;A;AAIG;;;A;AACF;A;A;A;A;AAGD;;A;AAEC;;A;AAED;AAEA;;;A;;A;AAEA;;A;AAGD;;A;AAEC;A;AAID;;AACA;;;AACA;;A;;;;;;;A;;;;;A;AASC;A;AAED;;A;AACC;;A;AACC;A;AAEE;;;A;AACF;A;AAED;A;AAEE;;AAAH;;A;AACI;;AAAH;;A;AACC;;;;;AACC;A;;A;A;AAIA;;;AAAH;;A;AACC;A;AAEE;;;A;AACF;A;AAED;A;;;;;AAKA;;;;;AACC;;A;AACC;;A;AAEE;;;AAAH;;A;AACC;;;A;AACC;;A;AAED;;AACA;;A;AAED;A;;A;;;;;;AAOE;;;AAAH;;A;AACC;;;A;AACC;A;AAED;;AACA;;AACG;;;;AAAH;;A;AACC;A;A;AAIC;;;AAAH;;A;AACC;;;;;AACC;A;;AAED;A;AAGE;;AAAH;;A;AACC;;;;;AACC;A;;A;AAIC;;;AAAH;;A;AACC;A;A;;;;;;AAMD;;;A;;;;;;;;;AAOA;AACA;;;AACC;;A;;;AAED;;;;;A;AAEC;A;A;AAGA;A;AAED;;AACA;;;;A;AACC;;;AACC;AACA;AACG;;;AAAH;;A;AACC;A;A;;;;AAGF;A;AAED;AACA;AACG;;;AAAH;;A;AACC;A;A;;;;;;;AAMD;;A;;;;;;;AAKA;;;AACA;AACA;AACA;;;;A;;;;;;A;AAqBC;A;A;AAGA;A;AAED;A;;;;AAQG;;;A;AACF;A;AAED;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;;;;;;AACI;;;A;AACF;A;A;;AAGF;A;;;;;AAIA;A;;;;;AAGA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;A;AAOC;A;A;AAGA;A;AAED;;;A;AACC;A;A;;;;;;A;AC1vCA;A;AAED;;;A;;;;;;ACgBA;AACA;A;;;;;AAQA;AACA;A;;;;;AAKA;A;;;;;AAyBA;;;;;A;A;AAEC;A;A;A;AAEA;A;A;A;AAEA;A;;A;AAEA;;A;A;;;;;;;AAamC;A;;;;;;AAMpC;;A;AAEE;A;AAED;A;A;;;;A;AAoBA;A;AAED;;A;AAEE;A;AAED;A;A;;;;AAWD;;A;AAEE;A;AAED;A;A;;;;AAkBD;AACA;;A;AAEE;A;AAED;;;;;AACC;A;;A;A;;;;AAQF;;;;;A;AAEE;A;A;;A;;;AAOF;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AA+BA;;;;;AACC;;A;AACC;;A;AAED;A;;A;;;;;;AAcD;A;;;;A;AAMC;A;AAED;A;;;;A;AAMC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;;A;A;A;A;;;;;;;;;;;;AC9HA;;A;;;;;;AAQA;;A;;;;;;AAQA;;A;;;;;;AAQA;;A;;;;;;AAwGA;;A;;;;;;AA6EA;;A;;;;;;AAQA;;A;;;;;;AAgBA;;A;;;;;;AAmDA;;A;;;;;;AAiCA;;A;;;;;;AAsBA;;A;;;;;;AAkIA;;A;;;;;;AAeA;;A;;;;;;AAqHA;;A;;;;;;A;;;;;;;;;;;ACxjBA;A;;;;AA+BA;A;;;;AA2TA;A;;;;AAeA;A;;;;AAitBA;A;;;;;A;;;;;;;;;;;ACzpCA;A;;;;AAYA;A;;;;AAIA;A;;;;;A;;;;;;;;;;;;;;;ACxCA;A;AAGC;A;AAGG;AAEJ;;;;;A;AAEE;A;AAEA;A;A;;AAIF;;A;AACC;;A;AAGD;A;;;;;;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzBA;A;;;;;;AAMA;;A;;;;;;AAKA;A;;;;;AAKA;A;;;;;;AAMA;;;AACA;;AAEA;;A;;;;;;AAKA;A;;;;;AAKA;A;;;;;;A;AASC;A;A;AAKA;A;AAGD;;AAEA;;A;AACC;;A;AAGD;AACA;A;;;;;;;AAMA;;;AACA;;A;;;;;;;AAYA;;A;;;;;;;AAMA;;;;A;AAEC;A;AAGD;A;;;;;;;;AAMA;A;AAMC;AACA;A;AAED;;;AACA;AAEA;;;;A;AAEC;A;AAGD;;A;;;;;;AC7GA;;A;;;;;;;AAsDA;AACA;AACA;A;;;;;;;A;AAOC;A;AAGD;;AAEA;;;;;AACC;AACA;;AACA;AACI;AAEJ;;;A;AAEC;A;AAKD;;A;AACC;;;AACA;;AAEA;;;A;AACC;;A;A;AAIF;;A;AACC;;AAEA;;;AACA;;A;AACC;;A;A;A;AAKA;A;A;;AAGD;;A;AAGD;;A;AACC;;;;AACA;;A;AACC;;A;AAED;;A;A;AAIA;;;;;;A;A;;A;;AACC;A;;A;AAGD;A;A;;A;;;;;;;;AA4BF;;AAEI;AAEJ;;;;;AACC;;AAEA;;AAIA;;A;AACC;;;AACA;;AAEA;;;A;AACC;;A;A;AAIF;;A;AACC;;;;AACA;;A;AACC;;A;AAED;;A;AAGD;;;;A;AAGC;;;;;A;;AAEA;;A;A;;AAIF;A;;;;;;;AAWA;;A;;;;;;;AAWA;;AAEA;AAEA;;;;;;AACC;A;;AAGD;A;;;;;;AAIA;;A;AACC;;A;AAGD;AAEI;AAEA;;;;AACH;;AAEG;A;AAH0B;A;A;AAO7B;;AAKA;AAZ6B;A;AAgB9B;A;;;;;;AAMA;;;;A;AAEC;A;AAGD;A;;;;;;;AAOA;AAEA;;;;A;AAEC;A;AAGD;;A;;;;;;;AAwBA;;AAEA;;;;;AACC;;AAEA;;AAEA;;;;A;AACC;;;A;AAEC;A;AAGD;;A;AAID;;;AAGA;;AAEA;;;A;AACC;A;A;;AAIF;A;;;;;;;AAoBA;;AAEA;;;;;AACC;;AAEA;;AAEA;;;;A;AACC;;;A;AAEC;A;AAGD;;A;AAID;;;AAGA;;AAEA;;;A;AACC;A;A;;AAIF;A;;;;;;;AAMA;;A;;;;;;;AAOA;AAEI;AAEA;;;;AACH;;A;AAD6B;A;A;AAQ1B;A;AAR0B;A;A;AAY7B;AAZ6B;A;AAe9B;A;;;;;;AAIA;;AAGA;;AACC;;A;A;AAIA;A;AAGD;A;;;;;AAMA;;;A;;;;;;AAYA;;;A;;;;;;AAkBA;;;A;;;;;;AAMA;;;A;;;;;;AAMA;;AACA;;A;AACC;;A;A;AAKA;A;AAGD;A;;;;;;;AAYI;AAEJ;;;AACA;;A;AACC;;A;A;AAID;;;;A;AACC;;;AACA;AACA;;AAIA;;A;AACC;;A;;AAEA;A;A;A;AAID;A;;AAEA;;A;AAEC;;AACA;;;A;AACC;;A;A;A;AAMF;;;;;;;;;;A;AAGC;AACA;;;;;;AACC;;;;A;;AAED;AACA;A;AAID;;A;A;AAEA;;;A;AACC;;AACA;A;AAOD;;;;;;;;;;;;;A;AAGC;;AACA;A;AAGD;AACI;;;AACH;;;AAD0B;A;AAG3B;A;;AAEA;;A;A;AAGD;A;;;;;;AC7jBA;;;;;A;AAEE;A;A;;AAIF;A;;;;AAcA;AACA;A;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;AC7CA;A;;;;;ACCA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;AACA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;AAQA;;A;;;;;;AAIA;A;;;;;AAIA;A;;;;;AClGA;A;;;;;;AAIA;;A;;;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;ACxBA;A;;;;;;AAIA;;A;;;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AC3BA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;;AChBA;A;;;;;;AAIA;;A;;;;;;;AAQA;A;;;;;AAIA;A;;;;ACXA;A;;;;;AAMA;AACA;A;;;;;AAIA;AACA;A;;;;ACdA;A;;;;ACAA;A;;;;;ACAA;;A;AAEI;;;AAAH;;A;AACC;;A;A;A;;;;;ACJF;A;;;ACqBA;A;;;;ACrBA;A;;;;ACHA;A;;;;ACAA;A;;;;;AAMA;AACA;A;;;;;AAIA;AACA;A;;;ACLA;A;;;;ACFA;A;;;;;ACCA;;;A;;;;;;AAMA;A;;;;;AAIA;A;;;;;ACNA;A;;;;;AAIA;A;;;;;AAIA;A;;;ACbA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJA;A;;;;;;;;AAOA;AACA;;;A;A;;;AAGA;AACA;;A;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACQG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAYA;AACA;AACA;AACA;A;;;AAIkB;A;;;;;AAIQ;A;;;;;A;AAKzB;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;A;AAMC;A;A;;;;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAKA;A;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAUC;A;AAED;A;;;;;AAKA;AACA;A;;;;;AAKA;AACA;A;;;;;A;AAQC;A;AAGD;A;;;;;A;AAQC;A;AAGD;A;;;;;A;AAQC;A;AAGD;A;;;;;A;AAQC;A;AAGD;A;;;;;A;AAQC;A;AAED;A;;;;;A;AAQC;A;AAED;A;;;;;AAMA;AACI;;;;;;AACH;AAD8C;;;;;A;;;;;AAQ/C;AACI;;;;;;AACH;AAD6C;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzDC;A;;;AACA;A;;;AACA;A;;;;;;AAO/C;A;;AAIA;A;;AAIA;A;;;AAIA;A;;;;A;A;AAMC;A;AAEA;A;AAED;A;;AAaA;A;;;;;;;;AAwBA;AACA;A;;;;AACoB;A;;;;;;A;;;;;AAKpB;A;;;;;;AAKA;;;A;AACC;A;AAEE;;;AAAH;;A;AACC;AACA;;A;AAEC;A;;A;AAGC;A;AAED;A;AAED;A;;AAEA;;;AACC;;;;;;;A;AAEC;;;A;A;A;A;;;A;A;;;;;AAWH;AACC;A;A;AAEC;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;A;;;;AAOF;;;A;AAEC;A;AAED;A;AAEC;A;AAED;A;;;;AAcA;A;;;;;AAeA;A;AAEC;A;AAED;AACA;AACA;A;;;;;;;AAIA;AACA;AACA;AACA;A;;;;;;;AAIA;;A;;;;;;;A;AAOC;A;AAED;AACA;;A;AACC;AACA;A;AAED;A;AAEC;A;AAEA;A;AAED;;;;;;A;A;;A;;AAEC;A;;AAED;AACA;AAEA;;A;AACC;A;A;;;;;;;;AAcE;;;;AAAH;;A;AAEC;;A;AAED;AAIA;AACA;AACA;;A;AACC;AACA;;;AAAmB;A;;;A;AAEpB;AACA;A;AAEC;;;AACC;A;;;A;AAGF;;;AAAmB;A;;;A;;;;;;;;A;;;;;A;;;;;;AAkBnB;;A;;;;;;;AAIA;AACA;;A;AAEC;A;AAED;A;AAEC;AACA;A;AAED;A;;;;;;;A;AAgCC;A;AAED;;;A;AACC;A;AAED;A;;;;;;;AAWA;;A;;;;;;;A;AAKC;A;AAED;;A;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7cA;AACC;;AACA;AACA;A;AAEC;A;AAED;;A;AACC;;;A;AAED;;;A;AACC;A;A;A;;;;;;A;AClBD;A;AAED;A;;;;;AAYA;AACC;;AACA;AACA;A;AAGC;A;AAGD;;A;AAEC;AACC;;;AACA;;;A;AAEC;A;A;A;AAID;A;AAED;A;AAED;;;A;AACC;A;A;A;;;;;;AClBE;AACJ;AACA;A;;;;AAqBA;;AACA;A;;;;;;AAMG;;;AAAH;;A;AACC;AACA;A;AAGD;AACA;A;;;;;;;;AAI8B;;A;;;;;;;AAGE;;A;;;;;;;AAIhC;;A;AACC;;A;AAED;;;A;;;;;;;AAI8B;;A;;;;;;;AAI9B;;AACA;A;;;;;;;A;AAOC;A;AAED;;A;AACC;;A;AAED;AACA;;AACA;;AACC;;A;AAED;A;;;;;;;A;AAOC;A;AAED;;A;AACC;;A;AAED;AACA;;AACA;;AACC;;A;AAED;A;;;;;;;AAaA;;AACA;AACA;AACA;;A;AACC;AACA;;AACC;;AACA;AACA;A;A;AAGF;A;;;;;;;A;AAOC;A;AAED;;A;AACC;;A;AAED;;A;;;;;;;AAqBD;AACC;;AACA;;A;AACC;A;AAED;A;;;;;;;AAQD;AACC;;AACA;;A;AACC;A;AAED;A;;;;;;;AAKA;AAMI;;;AACH;;AACA;AACA;AAHkB;A;AAKnB;A;;;;;;;A;AAQC;A;AASD;AACA;;AACC;;AACA;AAFoB;A;AAIrB;;AACC;;AACA;AAFY;A;A;;;;;;;;;;AAUV;;;AAAH;;A;A;;;;;A;A;;;;;A;;;;;;;;AAOA;AACA;AACI;;;AACH;;A;AACC;;AACA;A;AAED;AACA;AACA;AAPsB;A;AASvB;AACA;AACA;A;;;;;AAiCgB;;A;;;;;;AAeM;;A;;;;;;AAIE;;A;;;;;;;;AA+CxB;AACA;;AACA;AACA;A;;;;;;;;AAIA;AACA;;AACA;AACA;A;;;;;;;AAIA;AACA;AACA;A;;;;;;;;AAKA;AACA;AACA;AACA;A;;;;;;;;;;AAKA;AACA;;;;AACA;AACA;A;;;;;AC1NA;AACA;AACA;A;AAEC;A;AAED;A;;;;AAKA;AACA;AAEA;A;AAEC;A;A;AAGA;A;AAGD;AACI;;;AACH;A;AAEK;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;A;AAVwB;A;A;;;;;AAiB1B;A;;;;;AAKA;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AACA;AACA;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/OA;A;AAEC;A;AAED;A;;;;;;ACmBA;AACA;A;AAEC;A;AAED;A;;;;;AAKA;AACA;A;AAEC;A;AAED;A;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAKA;;;AACG;A;AACF;A;AAED;A;;;AAMA;A;;;;;A;A;;;;;A;AAUA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AACC;AACA;A;AAEC;A;A;AAIF;AACA;AACA;AAEA;;AACC;AACA;A;AAEC;A;A;A;;;;;A;;;;A;AAcD;;;;;AACC;;;A;;AAED;A;AAGD;;;;;;AACC;AACA;AACA;AAEA;A;;AAED;A;;;;A;AAMC;;;;;AACC;;;A;;AAED;A;AAGD;;;;;;AACC;AACA;AACA;AAEA;A;;AAED;A;;;;A;AAMC;AACA;;;;;AACC;;;A;;AAED;A;AAGD;AACA;;;;;;AACC;AACA;AACA;A;;AAED;A;;;;A;AAKC;AACA;;;;;AACC;;;A;;AAED;A;AAGD;AACA;;;;;;AACC;AACA;AACA;A;;AAED;A;;;;AAIG;A;AACF;AACA;AACA;AACI;;;AACH;AACA;AACA;AAHsB;A;AAKvB;A;AAED;A;;;;AAIG;A;AACF;AACA;AACA;AACI;;;AACH;AACA;AACA;AAHoB;A;AAKrB;A;AAED;A;;;;AAIA;AACA;;;;;AACC;;;A;;AAED;A;;;;AAKA;;;;;AACC;;;AACA;;;AACA;A;;AAED;A;;;;AAIA;AACI;;;AACH;;;AAD4B;A;AAG7B;A;;;;;A;;;;A;;;;;A;;;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;;A;;;;A;AChOC;A;AAED;A;;;;;;A;AAqBC;AACA;AACA;A;A;AAOA;AACA;A;AAEC;A;AAED;AACA;A;A;AAKA;AACA;A;AAID;;AACA;AACA;AAGA;;AACC;A;AAED;A;AAIC;;AACC;AACA;A;AAED;A;A;;;;;;AASD;AACI;AACJ;;AACC;AACA;AACA;A;A;AAIA;AACA;A;AAED;;AACC;AACA;A;AAED;AAGA;AACA;AACA;;AACC;AACA;AACA;AACA;AACA;AACA;AACA;A;AAID;;AACC;AACA;AACA;AACA;AACA;A;AAED;AAGA;;AACC;AACA;AACA;AACA;A;AAGD;A;;;;A;AAKC;A;AAGG;A;AAIH;AACA;AACA;A;AAIA;AACA;AACA;A;AAIA;AACA;A;AAGD;A;;;;AAKA;;AACC;AADY;A;AAGb;A;;;A;AASC;A;AAGD;A;;;;A;AAQC;A;A;AAIA;A;AAEA;A;A;;;;;A;AAMA;A;AAKD;;AACC;A;A;AAKA;AACA;AACA;AACA;A;A;AAID;AACA;A;;;;;A;AAMC;A;AAED;AACA;A;;;;AAMA;AACA;;AACC;A;AAED;A;AAEC;A;A;;;;AC7LD;A;;;;;A;AAQC;A;AAED;;A;;;;;;;AAyEA;A;AAIC;A;AAGC;AACA;A;AAED;A;A;AAKA;A;AAED;AACA;AACA;;A;AACC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;AAOA;AACA;AACA;A;;;;;AAMA;A;;;;;A;AAQC;A;AAED;A;;;;;AAKA;A;;;;;AAKA;A;;;;;;AAUA;;A;AACC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;;;AAmBA;;A;AACC;A;A;AAGA;A;AAED;;A;AACC;;A;AAEC;A;A;AAGF;A;;;;;;;A;AAMC;AACA;AACA;A;A;AAKA;AACA;AACA;A;AAGD;AACA;AACA;A;;;;;;;;AAmBA;;A;AACC;AACA;A;AAED;;A;AAEC;A;AAED;AACA;A;;;;;;AAKA;A;;;;;AAKA;A;;;;;;AAMA;;A;AACC;A;A;AAIA;A;A;AAIA;A;AAGD;A;;;;;;;A;AAOC;A;A;AAGA;A;AAED;A;AAEC;A;AAGD;;A;AACC;;;;;A;A;AAGA;A;A;;;;;;;;AAaD;;A;AACC;A;AAGD;A;AAGC;A;AAKD;AACA;A;AAGC;A;AAiBD;AACA;A;AAIC;A;AAED;AAGA;A;AAEC;AACA;A;AAID;AACA;A;AAOC;A;A;AAGC;A;A;AAIA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAMD;A;A;A;AAQG;AACA;A;AAED;AAEA;A;AAGA;A;A;A;AAMH;AAEA;;A;AACC;A;A;;;;;;;;A;AAMA;A;AAED;AACA;A;AAEC;AACA;A;AAGD;AACA;AACA;AACA;AACA;;A;AACC;A;AAED;A;;;;;;;AAOA;;A;;;;;;;AAOA;A;AAEC;A;AAID;;A;;;;;;;A;AAQC;A;A;AAGA;A;AAED;AACA;A;AAEC;AACA;A;A;AAGA;AACA;A;AAGD;AACA;;;AACA;AACA;AACA;;A;AACC;A;AAED;A;;;;;A;AAQC;A;AAED;A;AAEC;A;AAEC;A;A;AAGF;A;;;;;AAUA;A;AAEC;A;AAED;AACA;A;AAEC;AACA;A;AAGD;AACA;AACA;AACA;A;;;;;;;;;AAOA;;A;AACC;;A;AAEG;;;;AACJ;;AACA;;A;AAEC;A;AAED;;A;;;;;;AAQA;AACA;AACA;AACA;A;;;;;;AAUA;;A;AACC;A;AAED;AACA;;A;AACC;AACA;A;AAEC;AACA;A;AAED;;;A;AACC;A;A;AAEA;A;A;AAGF;A;;;;;;;AAOA;;A;AACC;A;A;AAGA;AACA;AACA;AACA;AACA;A;AAEC;AACA;A;A;AAGF;A;;;;;AAKA;A;AAEC;A;A;AAGA;A;A;A;AAIA;A;AAEA;A;AAED;A;;;AAKA;A;AAEC;A;A;AAGA;A;A;A;AAIA;A;AAEC;A;AAED;A;AAEA;A;AAED;A;;;;;AASA;;A;AACC;A;A;A;A;AAMC;A;A;AAKA;A;A;AAKA;A;AAEC;A;AAED;A;AAGD;A;AAGA;A;A;AAIC;A;AAED;A;AAGD;A;;;;;;;;AASA;;A;AACC;A;A;A;AAMA;A;AAGC;A;A;AAOA;A;AAEC;A;A;AAGA;A;AAED;A;A;A;AAKC;A;AAED;A;AAGD;A;AAGA;A;A;AAIC;A;AAED;A;AAGD;A;;;;;;;;AASA;;A;AACC;A;A;AAID;;;;A;AAcC;AAMA;A;AAGC;A;A;AAWM;AACJ;A;AAED;A;A;A;AAOC;A;AAED;A;A;AAME;AACJ;AACA;;AACA;A;A;AAQE;A;AAED;A;AAKG;;;;;;A;AAEH;A;A;AAUA;AACA;A;AAGA;AACA;A;AAGD;A;A;AAIK;AACJ;A;AAED;A;A;AAIC;A;AAED;A;A;AAGD;A;;;;;;;;AASA;;A;AACC;A;A;AAID;;;;A;AAcC;AAMA;A;AAGC;A;A;AAWM;AACJ;A;AAED;A;A;A;AAOC;A;AAED;A;A;AAME;AACJ;AACA;;AACA;A;A;AAQE;A;AAED;A;AAKG;;;;;;A;AAEH;A;A;AAUA;AACA;A;AAGA;AACA;A;AAGD;A;A;AAIK;AACJ;A;AAED;A;A;AAIC;A;AAED;A;A;AAGD;A;;;;;;;;AAUA;;A;AACC;A;A;AAIA;A;A;A;AAMA;A;AAGC;A;AAMD;AACA;A;AAEC;A;A;AAIA;A;AAED;A;AAGC;A;AAIA;A;AAFA;A;AAID;A;AAGA;A;AAGA;A;AAGD;A;;;;;;;;AASA;;A;AACC;A;A;AAIA;A;A;AAID;;;;A;AAEC;AAEA;AAEA;;;A;AACC;AACA;A;A;AAOA;AACA;AACA;AACA;;A;;AAPA;AACA;A;A;AAQD;A;AAGA;A;AAGA;A;A;AAGD;A;;;;;;;;AAMA;;AACA;AACA;A;;;;;;;AAMA;;AACA;AACA;A;;;;;A;AAMC;A;A;AAGA;A;A;AAGA;A;A;;;;;A;AAmBA;A;AAKD;AACA;AAEA;A;A;AAOE;AACA;A;AAEA;AACA;A;A;A;AAOA;AACA;A;AAEA;AACA;A;AAED;A;AATA;A;AAaD;A;;;;;;;;A;AAaC;A;AAGD;AACA;AAEA;A;A;AAKE;AACA;A;AAEA;AACA;A;A;A;AAOA;AACA;A;AAEA;AACA;A;AAED;A;AATA;A;A;AAcA;AACA;AACA;AACA;A;AAID;A;;;;;;;;A;AAQC;A;AASD;A;AAEC;A;AAEA;A;AAED;A;;;;;;;;A;AAQC;A;AAMD;AAGA;AACG;A;AAEF;AACA;A;AAQD;AAGI;AACJ;;;;AACA;AAMI;A;AAEH;A;AAGD;A;;;;;;;A;AAQC;A;A;AAKA;A;AAEA;A;AAKD;AACA;AACA;;AACK;;;;A;AAEH;AACA;A;A;AAGA;AACA;A;A;AAIA;A;AAEA;A;A;AAIF;A;;;;;;AA6BA;;A;AACC;AACA;A;A;AAIA;A;AAGD;;A;AAQC;AAEA;AACA;;A;AAGC;A;;AAIA;;A;AACC;A;;AAEA;AACA;A;A;A;AAID;A;AAED;A;A;AAOA;AACA;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;AAGD;;A;AAGC;;A;AAKD;;A;;;;;;;AAQA;;A;AACC;AACA;A;A;AAIA;A;AAGD;;A;AAEC;AACA;AACA;;A;AAGC;A;;AAIA;;A;AACC;A;;AAEA;AACA;A;A;A;AAID;A;AAED;A;A;AAOA;AACA;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;AAGD;;A;AAGC;;A;AAKD;;A;;;;;;;AAQA;;A;AACC;AACA;A;A;AAIA;A;AAGD;AAEA;;A;AAEC;AACA;A;AAGD;A;AAKC;AACA;AACA;A;A;AAMA;AACA;A;AAKD;AACA;A;;;;;;;AAQA;;A;AACC;AACA;A;A;AAIA;A;AAGD;AAEA;;A;AAEC;AACA;A;AAGD;A;AAKC;AACA;AACA;A;A;AAMA;AACA;A;AAKD;AACA;A;;;;;;;AAUA;;A;AACC;AACA;A;AAGD;AACA;A;AAGC;A;AAEA;A;A;A;AAOA;A;AAEA;A;AAGD;A;;;;;;AAYI;A;A;AAGH;A;AAEA;A;AAEA;A;A;AAGA;A;AAED;A;;;;A;AAKC;A;AAED;A;;;;;ACjqDG;;;;A;AACF;A;AAED;A;;;;;;;;;;AAQA;A;AAEC;A;AAID;AAGA;;;;A;AAEC;A;AAIG;AACJ;;;;;;A;AAEC;A;AAIG;AACA;AACJ;;;;;A;AAEC;A;A;AAKA;AACA;AACA;AACA;AACA;A;AAgBD;AACA;A;AAOC;A;A;AAGC;AAGA;A;AAAA;A;AAEA;A;AAEA;A;A;A;A;AAQD;AAGA;A;AAAA;A;AAEA;A;AAKD;;A;AACC;AACA;AACA;AACA;A;;AAEA;;AACA;A;AAGD;;A;AAEC;AACA;A;AAKD;;AACA;;A;AACC;;;;;A;;AAEA;;;;;A;AAGD;A;;;;;;;AA4CA;;A;AACC;;A;AAID;;AACA;AAIA;;;AAEA;;AACC;;A;AACC;;A;AAED;;AACA;A;AAGD;A;;;;;;;;;;A;AA2CC;AACA;A;A;AAGA;AACA;A;AAGD;AACG;;;;;A;AACF;A;AAIE;;;AAAH;;;A;AACC;;A;A;AAEA;A;AAGD;A;;;;;;;AAiBA;AACA;;;AACA;A;;;;;;A;AC9QC;A;AAID;AACA;A;AAGC;A;AAOC;A;AAGD;A;AAED;AAEA;AACA;A;AAEC;A;AAED;AACA;A;AAGC;AACA;A;AAGD;A;;;;;;A;AAUC;AACA;A;AAGD;;A;AACC;;A;AAGD;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;A;AAGC;AACA;A;AAGD;;A;AACC;AACA;;A;AAGD;A;;;;;;;;;A;A;;;;;A;AAUI;A;;;;;;A;;;;;;;AAUJ;;;AACA;;A;AACC;;A;AAED;A;;;;;;;AC3EA;A;AAEC;A;AAED;;A;;;;;;;AAMA;;A;;;;;;;;A;AAQC;A;A;A;AAMC;A;AAED;A;A;AAKD;;;A;AACC;;A;AAEA;;A;A;AASG;AACJ;;A;AAEC;A;AAID;AACA;;A;AACC;AACA;A;A;AAIC;A;AAEA;A;AAEA;A;A;;A;A;AAOA;A;AAGA;A;A;AAGC;A;AAED;A;A;A;A;AAOD;A;AAEA;A;AAGA;A;AAEC;A;A;AAOA;A;AAED;A;A;AAGE;A;AAED;A;A;AAGA;A;AAED;A;A;AAKA;A;AAED;A;;;;;;A;AAMC;A;AAcD;AACA;AACA;A;AAGC;A;AAEA;A;AAED;AAII;AACA;AACJ;AAGI;AACJ;AAKA;AAIA;;;;;;AACC;AACA;AAKA;AAIA;A;AAMC;AACA;A;AAEA;AACA;A;AAEA;AACA;A;A;;A;;;;;AAQF;A;AAEC;A;AAED;A;AAIC;AACA;AACA;A;AAEC;AACA;A;AAED;;AACC;AADgB;A;A;AAMlB;AACI;A;AAEH;A;A;AAGA;AACA;A;AAEA;A;AAED;A;AAIC;A;AAED;A;;;A;AAOC;AACA;AACA;;AACC;AADgB;A;A;AAIjB;A;A;AAKA;AACI;;;AACH;AADqB;A;A;AAKvB;A;;;;;A;AAWC;A;A;AAIA;A;AAKD;AACO;A;AAEN;A;AAEA;A;AAGD;;;;AACA;AACA;A;AAEC;A;AAED;A;;;;;;;A;AAUC;A;A;AAIA;A;AAMD;AACA;AACA;;AACC;A;AAED;AAEA;AACA;;;;;AACA;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;AAeA;;;;A;AAEC;A;A;AAID;;;;;A;A;A;AAIC;A;A;AAGA;A;AAIC;A;A;A;A;AAAA;A;A;;AAGD;;;;;;AACA;A;A;AAEG;AACJ;;A;AAEC;A;AAIG;AAEJ;;;;;;;A;AACC;AACA;A;A;AAGA;AACA;;;A;AACC;A;AAED;A;A;AAEA;A;A;AAEA;A;A;AAGG;AACD;;;;A;AACF;A;AAID;;;;;A;AAEC;AACA;AACA;;A;A;AAGA;AACA;;AACA;A;;AAGA;AACA;AACA;;A;A;A;;;;;;;A;AC1aA;A;A;AAGA;A;AAED;A;;;;;AAKA;A;AAEC;AACA;A;AAED;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;AAKA;A;;;;;A;AAMC;AACA;A;AAED;A;;;;;AASA;A;;;;;AASA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;A;AAIC;A;A;AAKC;A;AAEA;AACA;A;A;AAGF;AACA;A;;;;;AAKA;A;AAIC;A;A;AAKC;A;AAEA;AACA;A;A;AAGF;AACA;A;;;;;A;AAUC;AACA;AACA;A;AAED;AACA;AACA;A;;;;;A;AASC;A;AAEA;A;AAID;A;AAEC;AACA;;;;A;AAGD;AACA;AACA;A;;;;;;;;A;AAOC;A;AAEG;;;;AACJ;AACA;AACA;;A;;;;;;;AAOA;;;AACA;AACA;A;;;;;;;AAOA;;;AACA;AACA;A;;;;;;;AAgBA;;;;AACA;;;;AACA;A;;;;;;;;AAOA;AACI;AACJ;;A;A;AAGE;A;AAEA;A;A;AAGF;A;;;;;;;AAOA;A;AAEC;A;AAEG;AACJ;;A;A;AAGE;A;AAEA;A;A;AAGF;A;;;;;;;AAmBA;A;AAEC;A;AAED;;A;A;AAGE;AACA;A;AAEA;AACA;A;A;AAGF;A;;;;;;;A;AAgBC;A;AAEC;A;A;AAGD;A;AAEA;A;AAED;A;;;;;AAUA;A;;;;A;AAMC;A;AAED;A;;;A;AAMC;A;AAED;A;AAEC;A;AAED;A;;;;AAMA;A;AAEC;A;AAED;A;;;;;AAMA;A;;;;;A;AAMC;AACA;A;AAED;A;;;;;AAKA;A;;;;;;AAmBA;;A;;;;;;;AAMG;;;A;AACF;A;AAGE;;;A;AACF;A;AAED;A;;;;;;AAMA;AACA;AACA;A;;;;;AAKA;AACA;A;;;;;AAMA;A;;;;;;AAUA;AACA;;A;A;AAEE;A;AAGD;;A;AAED;AAEI;A;AAEH;A;AAGD;;AACA;A;AAGC;AACA;A;AAGD;A;;;;;;;A;AASC;A;AAEC;A;A;AAGA;A;AAED;A;AAGD;;A;;;;;;;;;;AAeI;;;;;;;;AAEJ;AACA;AAGA;AACA;A;AAIC;A;AAEA;A;AAEA;A;AAQD;AAEA;;;;;;AACA;;;;;;AAMA;;AACC;;;;AACA;;;;AACA;;;;;;AACA;;;;;;AACA;A;AAED;A;;;AAYA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;A;;;;AAMA;;;;AAEA;;;;;;A;AAIC;AACA;AACA;AACA;A;A;;;;;;;AAeG;;;;;;;;AAEJ;AACA;AAEA;A;AAIC;AACA;A;AAID;AACA;AACA;AACA;A;AAIC;;;;AACA;;;;A;AAID;;AAEC;;;;;;AAGA;;A;AAIC;A;AAKC;A;A;;AAMD;A;A;AAIF;;A;AAEC;;A;AAEC;A;A;AAIA;;;;A;AAEK;;;;;;;;AACJ;;;;AACA;;;;AACA;AACA;;AACC;;;;AACA;;;;AACA;;;;AACA;;;;AACA;A;AAGD;AACA;AACA;AACA;AAEA;AACA;AAEA;A;AAEA;;AACC;;;;A;A;AAGF;A;A;A;AAKD;A;AAGD;;A;AAEC;AACA;AACA;;A;AAGD;AAEA;A;;;;;;;AAQA;A;AAEC;AACA;A;AAED;;AACA;A;;;;;;;;A;AAUK;AACJ;A;AAED;;A;AACK;AACJ;;A;AAEG;;;;AACJ;;A;AAIC;A;A;AAMA;A;AAEA;A;AAED;A;;;;;;;;;AAMA;;A;AACC;;A;AAOG;;;;;;AACJ;AACA;AACA;A;A;AAIE;A;AAED;A;AAGD;A;AAEE;A;A;AAGA;A;AAED;;A;AAEC;A;AAKD;A;AAEC;A;AAEC;A;A;AAGF;A;AAIC;A;AAED;AACA;A;A;;;;;;;;AAWD;AACA;AACA;;AACA;A;;;;;;;AAYA;AACA;AACA;;AACA;AACA;;AACA;AACA;;AACA;AACA;AACA;;AACA;AACA;;AACA;A;;;;;;;;;;;;;AAOI;AACJ;AACA;AACA;AAGI;AACJ;AACA;;;AACC;A;AAOG;;;;;;;;AACJ;AACA;AACA;;AACA;;AACA;;AACA;AACA;AAEK;AACJ;AACA;;AACC;;AACA;A;A;AAIA;A;AAGD;;AAEA;;AACA;;AACA;;AACA;A;A;;;;;;;;A;;A;AAWA;A;AAEA;A;AAEA;A;A;AAED;;A;AACC;;A;AAID;;;A;AAEC;;A;AAGA;;A;AAGA;;A;A;A;;;;;;;AAMD;AACA;AACA;A;;;;;A;AAOC;AACA;AACA;AACA;AACA;A;AAGD;AACA;AACA;A;;;;;A;A;AASE;A;AAED;A;A;AAGA;A;A;AAGA;AACA;A;AAGD;A;;;;;A;AASC;A;A;AAGA;AACA;AACA;AACA;AACA;A;AAED;AACA;AACA;A;;;;;A;A;AAQE;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;A;AAKA;;;;A;AAID;AACA;AACA;AACA;A;;;;;A;A;AAQE;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;A;AAKA;AACA;AACA;AACA;A;AAID;AACA;AACA;AACA;A;;;;;A;A;AAQE;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;A;AAKA;;;;A;AAID;AACA;AACA;AACA;A;;;;;A;A;AAQE;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;A;A;AAKA;;;;A;AAID;AACA;AACA;AACA;A;;;;;A;AAOC;AACA;AACA;A;AAID;AACA;AACA;A;;;;;;A;AAOC;A;AAED;AACA;;AACA;A;;;;;;;A;AC7lCC;A;AAED;;A;;;;;;;A;AAOC;A;AAED;;;;A;;;;;;;AAIA;;A;;;;;;AAKA;;A;AACC;AACA;;AACC;;AADgB;A;A;A;;;;;;;AAqBd;A;AAEJ;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;;AAGA;;;;;;AACA;A;A;AAGD;;A;AACC;;AACA;A;AAID;AAEA;;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAID;AACA;;;A;A;A;AAGE;A;AAEA;A;AAEA;A;A;AAIF;;A;AAGC;;;;;;A;AAEE;A;A;;A;AAMC;AACA;AACA;AAGJ;;;;A;A;AAIE;A;AAEA;A;A;AAKF;AACG;;;;AAAH;;A;AACQ;AACP;;;;;A;AAEC;A;A;AAGA;A;;AAGA;A;A;A;AAKF;AACA;AACA;AACA;AACA;;AACA;A;;;;;;;;AAgBA;;;;A;AAEC;A;AAID;;;;;A;AAEC;A;AAED;AAEA;A;;;;;;;;AAII;AACD;;;;A;A;;;;;A;A;AAIH;;;A;AACC;A;A;A;;AAIA;;A;A;AAED;A;;;;;;AAUA;;;;;AACA;;A;AACC;;A;AAED;A;;;;;;;AAIA;;A;;;;;;;AASA;AACA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;A;AAIA;A;AAED;;;AACA;A;;;;;;A;AClOC;A;AAED;AACA;AACA;A;AAEC;A;AAED;AACA;A;;;;;;A;AAOC;AACA;A;AAED;AACA;;A;AACC;;A;AAED;AACA;AACA;A;;;;;;;;;A;A;;;;;A;A;;;;;;A;;;;;;;AAaG;;;AAAH;;A;AACC;;A;AAED;A;;;;;;;AASA;;A;;;;;;;A;AAOC;A;AAED;;A;;;;;;ACnCA;;;;;AACC;A;;A;;;;;AAKD;AACA;;AACC;A;AAED;A;;;;;A;AAKC;A;AAKD;A;;;;;A;AAKC;A;AAED;AACA;AACA;A;;;;;AAKG;A;AACF;A;AAGD;AACA;AACA;AACA;A;;;;;AAIA;AACA;AACA;A;;;;;AAIA;AACA;A;AAIC;A;AAGA;A;AAGA;A;AAID;AACA;A;AAEC;A;AAED;AAEA;A;;;;;AAIA;AACA;A;AAIC;A;AAGA;A;AAGA;A;AAID;AACA;A;AAEC;A;A;AAGA;A;AAGD;A;;;;;;AAIA;AACA;A;A;AAIE;A;AAEA;A;AAED;A;AAGD;AACA;;AACC;A;A;AAKA;A;AAEA;A;AAED;A;;;;;AAIA;A;AAEC;A;AAID;AACA;AAEA;A;;;;AAMA;AACA;;;;;;A;AAEE;A;A;;A;;;;A;AAoBD;A;AAED;AACA;AACI;AACA;;;AACH;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEC;A;AAEA;A;AAXiB;A;A;AAelB;A;AAEA;A;AAED;A;;;;AAMG;A;AACF;A;A;;;AAME;A;AACF;A;A;;;AAcD;A;AAMC;AACA;A;AA4BD;AACA;;;;AACA;;;;AAYA;AACA;AAGA;AACA;A;AAEC;AACA;A;AAID;A;AAEC;AACA;A;AAKD;AACA;AAIA;AACA;AAUA;AACA;A;AAEC;A;AAEA;A;A;;;AAUD;A;;;AAOG;A;AACC;A;AACF;A;AAEC;A;A;A;A;;;A;AAQF;A;AAED;A;;;AAQA;AACA;;AACC;AACA;A;AAED;A;;;;AAIA;AACA;A;AAIC;A;AAEA;A;AAEA;A;A;AAMA;A;A;AAKA;AACA;AACA;A;AAUD;AAIA;AACA;AACA;AACA;AACA;AACA;A;AAgBK;AAGJ;AACA;AACA;AACA;AAGA;AACI;;;AACH;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AATuB;A;A;AAazB;A;;;;AAQA;AACA;AACA;;;AACI;;;AACH;AAEA;;;AAEA;AALkB;A;AAOnB;AACA;A;;;AASA;A;AAGC;AACA;A;AAGD;AACA;;;;AAEA;AACA;AAGA;A;AAEC;A;AAGD;AACA;AAEA;AACA;AAEA;AACA;AACA;A;;;;AAWA;A;AAGC;A;AAEA;AACA;AACA;;;AACA;A;A;AAIA;A;A;AAIA;AACA;AACA;A;A;AAGA;AACA;AACA;A;AAQD;AAEA;AACA;AACA;AACA;AACA;A;AAGK;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;A;AAGD;A;;;;;A;AASC;A;AAEA;A;AAEA;A;AAEA;A;AAED;AACA;A;;;;;;;AAKA;A;AAGC;A;AAEA;AACA;A;AAEA;AACA;A;AAGD;AACA;AACA;AACA;A;;;;;;;;A;AAKC;A;A;AAIA;AACA;AACA;A;A;AAII;AACJ;;;AACA;AACA;A;AAGD;;;;AACA;A;;;;;;AAMI;AACD;;A;AACF;A;A;AAGA;A;AAED;AACA;A;;;;AAIA;A;;;;;;;AAYA;AACA;A;AAMC;A;AAED;AAEA;;AACA;A;AAEC;A;AAED;AACA;AAGI;AACJ;AACA;;A;AAEC;;AACA;AACA;AACA;A;AAED;AAGA;AACI;;;AAEH;AACG;A;AACE;AACJ;;;AAGA;AACA;;;AAEA;AACA;;AACC;AACA;AACA;A;AAGC;A;AAED;;;A;A;AAKF;AAEA;A;AAEC;A;AACA;AACA;A;AAGD;AAlCmB;A;A;AAqCnB;A;AAED;AAEA;AACA;AACA;A;;;;;A;;;;;;AAOG;A;AACF;A;AAED;A;;;;;A;AAOC;A;AAEG;AACJ;;AACC;A;AAGD;A;;;;AAIA;A;;;;A;A;AAOE;A;A;AAGA;A;A;AAIF;A;AAEC;A;AAID;AACA;AACA;AACA;AAEA;A;;;;;A;A;AAOE;A;A;AAGA;A;A;AAIF;AACA;A;AAEC;A;AAID;AACA;AAEA;A;;;;;AAIA;AACA;AACA;A;A;AAGC;AACA;A;AAGC;A;AAED;AACA;A;A;AAGC;AACA;A;AAEA;A;AAED;AACA;AAEA;A;AAED;A;;;;;AAKA;A;AAEC;A;AAGD;A;;;;;AAMA;A;A;AAGE;A;AAED;A;AAGD;;;;;A;AAEE;A;A;;A;AAID;A;AAED;A;;;;;AAIA;AACA;A;AAEC;A;AAID;AACI;;;AACH;AADkB;A;AAInB;A;;;;;AAIA;AACA;A;AAEC;A;AAID;AACI;;;AACH;AADkB;A;AAGnB;AAEA;A;;;;;AAIA;AACA;AACA;A;AAEC;;;;AACA;A;AAID;AACI;;;AACH;AADkB;A;AAGnB;AAEA;A;;;;;AAIA;AACA;AACA;A;AAEC;;;;AACA;A;AAID;AACI;;;AACH;AADkB;A;AAGnB;AAEA;A;;;;AAKA;A;;;;;AAMI;AACJ;A;;A;;;;;;A;AAQC;A;AAED;AAEA;A;AAEC;A;AAED;AAEA;A;AAEC;;;A;AACC;;;;;AACC;;A;;A;A;AAGD;;;;;AACC;;A;;A;;AAGD;A;A;A;AAED;A;AAEC;A;A;AAIF;A;;;;;;;A;AAQC;A;A;AAKA;A;A;AAMA;A;AAKD;;A;AACC;;;AACA;A;A;AAMA;A;AAED;AAOA;;A;AACC;;A;AACC;;A;AAED;;A;AAGD;AACA;AACA;AACI;AAQJ;AAGI;;;;AACA;;;AACH;AACA;;;;A;AAGC;AACA;;;;A;AAGD;;A;AACC;;;;AACA;;;;;;;;A;AAGD;AAdkB;A;AAiBf;;;AACH;AAEI;;;AACH;AACA;;;;A;AAGC;AACA;;;;A;AAGD;;A;AACC;;;;AACA;;;;;;;;A;AAGD;AAdmB;A;AAHQ;A;AAqB7B;A;;;;;;;AAOI;;;;AAIA;AACJ;AACA;AACI;;;AACH;;;;;;AACA;AACA;;;;AACA;;;;AACA;AACA;;;;AACA;;;;AAPqB;A;AAUtB;AAEI;;;AACH;AACI;;;AACH;;A;AAIC;AACA;;;;AACA;;;;AACA;;;;AAEA;AACA;;;;AACA;;;;AACA;;;;AAEA;AACA;;;;AACA;;;;AACA;;;;AAEA;AACA;;;;AACA;;;;AACA;;;;A;AAGD;AACA;;;;AACA;;;;AACA;;;;AAEA;AA/BmB;A;AAFQ;A;AAqC7B;A;;;;;;;AAMA;AAIA;;A;AACC;;;A;A;AAIA;AACA;AACA;A;AAMD;AACA;AACI;;;AACH;AACA;AAFmB;A;AAIpB;AAGA;AACA;AACA;;;A;AAEC;AACA;AACA;A;AAGD;AACA;AAII;AACJ;AACA;AACI;;;AACH;AADqB;A;AAKtB;AACA;AAEA;AAGI;;;AACH;AACI;;;A;AAEF;AACA;AACA;AACA;A;AAED;AACA;;;;AACA;AATmB;A;AAFQ;A;AAe7B;AAIA;;A;AAQC;AACA;;A;AACC;;;A;A;AAIF;A;;;;;;;AAQA;AACA;;;;;AACK;;;AACH;AACA;AACA;AAHmB;A;A;;AAOrB;;AACC;A;AAGD;A;;;;A;AAMC;A;AAED;A;;;;AAMA;AAEA;AACI;;;AACH;AACA;AAFoB;A;A;AAKhB;AACA;;;AACH;AACA;AAFwB;A;AAIzB;A;AAGD;A;;;;;;A;AAMC;A;A;AAGA;A;AAQG;;;;AACJ;AACA;AACA;AACI;;AACH;;;AACA;AACA;A;A;AAKE;A;AAED;A;AAED;;;;AAZa;A;A;;;;;;;;ACzyCd;;;;AACI;;;AAEH;AACA;A;AAGD;A;;;;AAQA;AACA;;A;AAEE;A;AAED;AACA;A;AAED;A;;;;;;;;;AAyCA;AAGA;;A;AACC;;A;AAID;;;;A;AAEC;A;AAID;AACA;;A;AAEC;AACA;;A;AACC;AACO;;;;A;AACP;;;A;A;AAGE;A;A;A;AAIA;A;AAEA;A;A;AAGD;;;A;AACC;AACG;;;;A;AAEF;A;A;A;AAGD;A;A;A;A;AAID;AACA;AACA;A;AAGA;A;A;A;A;AASH;AACA;AACA;;;AACA;AACA;AACA;AACA;AACC;;A;AACC;AACA;AAEG;;;;A;A;AAED;AACA;A;AAED;A;A;AAKE;A;AAGH;A;AAEA;A;A;AAGC;A;AAEA;A;A;AAGD;A;AAED;;A;AACC;;AACA;A;AAED;AAGA;AACA;A;AAIC;AACA;AACA;A;AAIE;;;;A;A;AAED;AACA;A;AAED;A;A;A;A;AAUA;AACA;A;AAGA;A;AAED;A;A;AAMA;A;AAED;A;AAKC;A;AAGD;A;;;;;;;AAMA;;A;;;;;;;A;AAMC;A;A;AAKA;A;AAKD;A;AAEC;A;AAED;AAGG;AAAH;;A;AAEC;AACA;AACA;AACA;AAGI;;;AAEH;;AACC;AACA;AACA;AACA;A;A;AAMA;AACA;A;AAGA;AACA;AACA;AAGA;AACA;A;AAtBsB;A;AA2BxB;;AACC;AACA;AACA;A;A;;AAID;;;AAIA;;AAGA;AAGA;AAKA;AACA;;AACC;A;A;A;AAKD;AACA;A;AAGD;A;;;;;;;AAqBA;;A;AAEK;AACJ;AACA;;AAEC;AACA;AACA;;AACC;A;A;AAGA;A;AAEC;A;A;AAKF;;;;AAGA;AACA;AACA;A;A;AAKF;AACI;A;AAGH;;AAEC;;;AACI;;;AACH;AAIA;AACA;AACA;AAPiC;A;A;A;AAWnC;;AAEC;;;AACI;;;AACH;AACA;AACA;AAHiC;A;A;A;AASpC;;AACC;AACA;A;A;;;;;;;;AAuBD;;A;;;;;;A;AAOC;A;AAID;AACI;;;AACH;AADkE;A;AAK/D;A;AAEH;AACA;A;AAEA;A;AAID;;A;AAEK;AACA;;;AACH;;A;AACC;;A;AACC;;AACA;A;;AAEA;AACA;A;AAID;AACA;;AACC;AACA;A;AAGD;A;AAjBiB;A;A;A;AAuBnB;A;AAGD;A;;;;;;A;ACjdC;A;A;AAGA;A;AAQD;A;AAEC;A;A;AAIA;A;AAMG;;;;A;A;AAGH;AACA;A;AAEA;AACA;AACA;A;AAEA;A;A;AAKA;A;AAGD;;;;;A;;;;;;;AASA;AAEA;AACA;AAEA;AACA;AAEI;;;;;;AACJ;AAGI;;;AACH;;A;AACC;A;;AAEA;;AACA;A;AAED;;AACA;;A;AARqB;A;A;AAWjB;;;AACH;AACA;;;;A;AAboB;A;A;A;AAkBnB;A;AAPuB;A;AAUzB;A;AAGD;A;;;;;;;A;AA8BC;A;A;AAKA;A;AAUD;AACA;AACA;AACA;AACA;AACA;AACC;;A;AAGC;;A;AAED;AACA;;A;AAEC;A;A;AAQA;A;AAED;;A;AAIC;;AACA;A;AAEC;A;A;AA1BK;A;AA2CR;AACA;AACA;AACA;AA8BA;AACA;AACA;AACA;AACI;;;AACH;;A;AAGC;AACA;AACA;AACA;;;;AAEA;AACA;AACA;;;;A;;AAIA;AACA;AACA;AACA;;;;AAEA;AACA;AACA;;;;A;AAtBgC;A;AA2BlC;;A;AAQC;AACA;A;AAEC;;;;A;AAED;AACA;AACA;AACA;AACA;;;;A;AAEC;A;A;AAKE;;;A;AAEF;A;A;AAKA;A;AAID;AACA;AACA;;;;AAboB;A;AAerB;A;;;;;;;AC/RA;AACA;AACA;A;A;AAGC;A;AAEA;A;AAEA;AACA;A;AAGD;AAGA;;AACC;AACA;A;AAGD;AACA;AACA;A;AAEC;A;AAEA;A;AAED;;A;;;;;;;;AAyBA;A;A;;;;;A;AAIA;A;AAEC;A;AASD;AACI;;;;AACJ;AACA;AACG;A;AACF;A;AAEA;A;AAMG;AACJ;;;;AACA;AACA;A;A;AAME;A;AAED;AACA;A;AAED;;A;AACC;;A;A;AAMA;AACA;AACA;AACA;AACA;A;AAGD;A;AAEC;A;AAEI;A;AAEF;AACA;A;A;A;AAIH;AAEA;A;AAEC;A;AAED;A;;;;;;;AAyBA;A;A;;;;;A;AAIA;A;AAEC;A;AASD;AACI;;;;AACJ;AACA;AACG;A;AACF;A;AAEA;A;AAMG;AACJ;;;;AACA;AACA;A;A;AAME;A;AAED;AACA;A;AAED;;A;AACC;;A;A;AAMA;AACA;AACA;AACA;AACA;A;AAGD;A;AAEC;A;AAEI;A;AAEF;AACA;A;A;A;AAIH;AAEA;A;AAEC;A;AAED;A;;;;;;;;AAQA;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;;;AAQA;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAKA;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;;A;;;;;;;AAKA;A;AAEC;A;A;AAGA;AACA;A;AAED;AACA;;A;;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;A;AAMC;AACA;A;AAED;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;A;AAMC;A;AAED;AACA;A;AAEC;A;AAED;A;AAEC;A;AAED;;;;AACA;A;;;;;AAUA;A;;;;;AAKA;A;;;;;AAQA;A;;;;;AAOA;A;AAEC;A;AAED;A;;;;;;AAKA;;;;A;AAEC;AACA;A;A;A;A;AAKA;A;;AAEA;AACA;AACA;AACG;;AAAH;;A;AACC;;;AACA;;;A;AAGC;A;A;AAGF;A;A;AAED;A;;;;;A;AASC;A;AAEA;A;AAED;A;;;AAMI;A;AAEH;A;AAED;AACA;AACA;A;;;;AAUA;A;;;;;;AAKA;AACA;AACA;AACA;AACA;;A;;;;;;;AAKA;AACA;AACA;AACA;AACA;;A;;;;;;;A;AAOC;AACA;AACA;AACA;A;AAED;AACA;AACA;;A;;;;;;;A;AAOC;A;AAED;AACA;AACA;AACA;AACA;AACA;;A;;;;;AClfA;A;;;;;AASA;;;;A;AAEC;A;A;AAGA;A;AAEE;;;A;AACF;A;AAED;A;;;;;;;A;AAUC;A;AAKE;AAAH;;A;AACI;;;A;AACF;A;AAED;AACI;AACD;;;;A;AACF;A;AAGE;;A;AACF;A;A;AAGA;A;AAED;;A;AAID;AAGA;;;;A;AAEC;A;AAIG;AACJ;;;;;A;AAEC;A;AAIG;AACJ;;;;A;AAEC;A;AAIE;;A;AACF;A;A;AAKA;A;A;AAMA;A;AAID;A;AAEC;A;AAED;;AAGA;;A;AACC;AACA;;A;;AAEA;AACA;A;AAGD;AAEA;A;;;;;;;;;AAcA;AAEI;AACD;;;;A;A;AAED;A;AAED;A;A;AAID;;;A;A;A;A;AAIE;AACA;A;AAID;;AACA;A;AADA;;AACA;A;A;AAGG;AACD;;;;A;AACF;A;AAGG;A;AAEH;A;AAMG;;AACA;;;;A;A;AAED;A;AAED;AACA;A;AAED;;A;AACC;;A;AACC;;AACA;;AACA;A;AAED;A;AAED;AAhBa;A;AAoBd;;;AACA;A;;;;;;AAKA;;A;;;;;;;AAKI;AACJ;;AACA;AACA;;A;AACC;;A;;AAEA;A;AAED;A;;;;;;;AAMA;;A;AACC;;A;AAED;;A;;;;;;;AAOI;AAEJ;;A;AACC;;A;AAEC;AACI;;;AACH;AADqB;A;A;AAIvB;A;AAID;;;;AAEA;AACA;;A;AACC;;A;AAGD;AACA;;;;AAGA;A;AAEC;A;AAEC;AACA;A;A;A;AAKD;A;AAED;;;;AAEA;;A;AACC;AACA;;AACI;;;AACH;AAD+B;A;AAGhC;A;AAGD;A;;;;;;A;ACrQC;A;AAED;AACA;AACA;AACA;A;AAGC;A;AAED;AACA;AACA;A;AAEC;A;AAED;AACA;A;;;;;;A;AAOC;AACA;A;AAED;AACA;;A;AACC;;A;AAGD;AACA;AACA;AACA;AACA;A;;;;;;;;;AAKA;;A;A;;;;;A;A;;;;;;A;;;;;;;AASG;;;AAAH;;A;AACC;;A;AAED;A;;;;;;A;AC7DC;A;AAED;A;;;;;;ACSA;;A;AACC;A;A;AAIA;A;AAGD;;;A;AAEC;A;A;AAKA;AACA;AACA;AACA;A;AAMD;AACA;;AACA;A;AAOA;;;;A;A;A;AAGC;;A;A;AAEA;;A;A;AAWD;;A;AACC;A;;AAEA;A;AAID;;A;;;;;;;;;AAcA;AACA;;;AACC;AACA;;AACA;;AACA;;AACA;;A;;AAGD;;;AACA;;AAGA;;;A;AACC;A;A;AAEA;AACA;;AAGA;AACA;;A;;AADA;AACA;;A;A;AAGD;;A;;;;;;;;;;;AAaA;AACA;AACA;;;AACC;AACA;AACA;;AACA;;AACA;;AACA;;AACA;;A;;AAGD;;;AACA;AACA;;AACI;;;AACH;AACA;;A;AAKD;;A;;;;;;AAMA;AAEA;AACA;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;;;A;A;A;A;A;A;A;A;A;A;A;A;;A;;A;;;;;;;;;;;;;;;;;;;;;;;ACtJA;A;;;;;;AAMA;AACA;AAGA;A;AAEC;A;A;A;AAIC;A;AAKC;A;AAED;A;;;;;A;A;AAMC;A;AACC;A;AACF;A;;;;;A;A;A;;;;;A;;;;;;;A;;;;;A;;;;;;;;A;ACiED;A;AAED;AACA;AAEA;A;AAGC;A;AAGD;AAEA;A;AAEC;A;AAGD;AAEA;AACC;;;A;A;;;;;A;AAOA;AAEA;A;AAEC;A;A;A;;;;;;;;;A;A;A;A;;A;A;;;;;;;;;;;;;;;;;;;;;;;;ACxHF;A;;;;;A;AAqDC;A;AAED;A;;;;;;AAQA;;A;AACC;AACA;;A;AACC;;A;A;AAGF;A;;;;;;;AAKA;A;;;;A;AAQC;A;AAED;A;;;;;;;;;;;;A;A;A;A;A;;;;;;;;;;;;AC7FA;A;;;;A;ACoBC;A;AAED;A;;;;;A;;;;;;;;;;A;ACnBC;A;AAGG;AAEA;;;AACH;AADuB;A;AAIxB;A;;;;AAK0C;A;;;;AAI1C;A;;;;AAKA;A;;;;A;AAQC;A;AAGD;AACA;AACI;;;AACH;AADuB;A;A;;;;AAQxB;AACA;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpCA;;;A;;;;;AAsBA;;;A;AACC;A;AAEE;;;AAAH;;A;AACC;;A;AAED;;A;;;;;;AAGwC;A;;;;;;A;AAIvC;A;A;AAGA;A;A;AAGA;A;AAGD;AAEA;;AAEC;AACA;AAGA;AACA;AACA;A;AAID;A;;;;;;;A;AAKC;A;AAED;A;;;;;AAiBA;;;A;AACC;A;AAEE;;;AAAH;;A;AACC;;A;AAED;;A;;;;;;AAGwC;A;;;;;;A;AAIvC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAKD;AACA;AACA;AAGA;AAGA;;AACC;AACA;AAEA;AACA;AACA;A;AAID;AACA;AAGA;;;;A;;;;;;;A;AAKC;A;AAED;A;;;;AChGA;AACA;AACA;A;;;;AChCG;;;AAAH;;A;AACC;;A;AAED;;;A;AACC;A;AAED;AACA;;;A;AACC;;A;AAED;A;;;;;;;AASA;AACA;AACA;AACA;;AACA;;AACC;AACA;AAGI;;;AACH;A;AAEC;A;AAH+B;A;A;AAOlC;AACA;A;;;;;;;;A;AAKC;A;A;AAGA;A;AAED;;AACC;;;A;AACC;A;AAED;AACA;AACA;AACA;A;A;;;;;;;ACLD;;A;;;;;;;A;AA2BC;A;AAGE;;;AAAH;;A;AACC;;A;AAGD;;;A;AACC;A;AAGG;AACJ;AAEA;AAOA;AAIA;AAEI;;;AACH;AACA;AAFmB;A;AAKpB;A;;;;;AAWA;A;;;;;AAIA;A;;;;;;;;A;AAKC;A;AAED;;;A;AACC;A;AAGD;;;A;AAEC;A;AAGG;;;;AACJ;AAEA;AACA;AAEA;AAEI;AACJ;AACA;AAEA;A;;;;;;;;;A;AAOC;A;A;AAKA;A;A;AAIA;A;AAED;;;A;AACC;A;AAGD;AACA;AAEI;;;;AACJ;AAEA;AACA;AAEI;AACJ;AAEA;;;A;AAEC;A;A;AAQA;;;;;AACC;A;;AAED;A;AAGD;AAEA;A;;;;;AAKA;AACA;AACA;A;;;AAMA;A;;;;AAKA;AAGA;AACA;AACA;A;AAUC;A;AAGD;A;;;;AAUI;AAEA;;;AACH;A;AAEC;A;AAKG;;;AACH;AACA;AACA;AACA;AACA;AAKA;AAEA;AACA;AACA;AAdmB;A;AARF;A;AA0BnB;A;;;;;AAMA;;AACC;AACA;AACA;AACA;A;A;;;;;AAOD;AACA;A;AAGK;AACJ;AACA;A;A;;;;AAOG;;;AACH;A;AAEC;A;AAH8C;A;A;;;;;AAa7C;A;AACF;A;AAEA;AACA;A;AAED;AACA;A;;;;;AAKI;AAEJ;;AACC;AACA;AAEA;AACA;AACA;A;AAGD;;A;AACC;AACA;AACA;A;A;;;;;;;A;AAeA;AACA;A;AAEI;AACJ;AACA;AACA;AACA;AACA;A;A;;;;;AAOG;AACJ;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;A;;;;AAIA;AACA;AAQA;A;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;AC5aA;;;;AACA;AACA;A;;;;;ACJA;A;AAEC;A;A;AAGA;A;AAGD;AAEA;A;AAEC;AACA;AACA;AACI;;;AACH;AADkB;A;A;AAKhB;;;AACH;AADiC;A;AAIlC;A;;;AAIA;A;AAEC;A;AAEG;;;AACH;AADkB;A;AAGnB;A;;;A;AAOC;A;AAOA;A;A;;;AAOD;AACA;AACA;AACA;AACI;;;AACH;AADkB;A;A;;;A;AAOlB;A;AAEA;A;A;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9CG;;;;;;;;;;;;;;;;AAEJ;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAIA;AACA;AACI;;;AACH;AACA;AACA;AACA;AACA;AACA;;;;;;;;AANmB;A;AAUpB;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;AACA;;;;;;;;AACA;;;;;;;;AACA;;;;;;;;A;;;AAKI;;;;;;;;;;;;;;;;AAEJ;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAIA;AACA;AACI;;;AACH;AACA;AACA;AACA;AACA;AACA;;;;;;;;AANmB;A;AAUpB;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;AACA;;;;;;;;AACA;;;;;;;;AACA;;;;;;;;A;;;AAKA;A;;;AAO4B;A;;;AAMxB;AACJ;AACI;;;AACH;AADkB;A;AAGnB;;AACC;A;AAEC;A;AAEA;A;AAED;AAPmB;A;A;AAcnB;A;AAED;AACI;;;AACH;AACI;;;AACH;A;AAEC;A;AAED;AALkB;A;AAFD;A;A;;;;AC7InB;A;;;;AAQA;AACA;A;A;AAIC;A;AAFA;A;A;AAID;A;;;;AAMA;AACA;AACA;AACA;A;;;;AAGqC;A;;;;;A;AAIpC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AC1DA;A;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTA;AACA;AACA;;;;AAEA;AACA;A;AAGK;;;AACH;;;AADkB;A;A;AAIf;;;AACH;;;AADkB;A;A;AAKpB;AACA;AAGA;AACA;A;;;AAKA;A;;;AAKA;A;;;;;AAKI;AAEJ;AACA;AAKA;AACA;AAKA;AACA;AAKA;AACA;A;;;;;A;;;;AAcA;;;;;;AACC;AACA;A;;AAED;A;;;AAIA;;;;;AACK;;;AACC;;;AACH;AACA;AAIA;AACA;AACA;AAGA;AAEA;AAbmB;A;AADF;A;A;;A;;;AAwBpB;AACA;AACA;AAGA;AACA;AACA;AAaA;AACA;AACA;AAYA;AACA;AACA;AAaA;AACA;AAWA;A;;;AAQA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;AAMA;AACA;AACI;;;AAEH;AACA;AACA;AACA;AALmB;A;AAOpB;A;;;;AAMA;AACA;AAGA;AACA;AAGI;;;AAEH;AAEA;AAJmB;A;A;;;;AAYhB;AAEJ;AASA;A;;;;AC1OA;A;;;;;AAmBqC;A;;;;;A;AAIpC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;A;AAWC;A;AAGD;AACA;AACA;AACA;AACA;A;;;;;AAG2C;A;;;;;A;AAI1C;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;AACA;;;;AAEA;AACA;AAEI;;;AACH;;;AADkB;A;AAGf;;;AACH;;;AADkB;A;AAGf;;;AACH;;;AADkB;A;AAInB;AACA;AAEA;AACA;A;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAGD;AACA;AACA;;;;AAEA;AACA;AAEI;;;AACH;;;AADkB;A;AAGf;;;AACH;;;AADkB;A;AAGf;;;AACH;;;AADkB;A;AAInB;AACA;AAEA;AACA;A;;;;;;;;;;A;A;A;A;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtGA;A;;;;;;AAKA;AACA;;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;;AAEA;A;;;;;AAOA;A;AAEC;A;AAED;A;;;;;;;A;A;;;;;A;AAUA;;AACA;AAEA;AACA;;AACA;AACA;AACA;;AACA;A;;;;;;;AAIA;AACA;AACA;;;;A;;;;;;;AAOA;;;;;;A;AAEC;AACA;AACA;AACA;A;A;AAGA;AACA;AACA;AACA;A;AAGD;AACA;;AACA;AACA;;AAEA;AACA;;AACA;AACA;;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;AACA;;AACA;AACA;AACA;;AACA;A;AAEC;A;AAED;AACA;;A;AACC;;A;AAED;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;A;;;;;;;AAIA;AACA;;;;A;;;;;;;AAOA;AACA;;AACA;AACA;;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;;AACC;A;AAED;;AAEA;AACA;AACA;A;AAEC;A;AAED;A;AAEC;A;AAED;;AAEA;AACA;A;AAEC;A;AAED;AAEA;AACA;AACA;;AAEA;A;AAEC;A;AAED;;AAEA;A;;;;;;;AAIA;AACA;;;;;;AAEA;;;;;AACK;;;AACH;;;;;AACA;;A;AACC;;;;;A;AAED;AAL4B;A;A;;AAS9B;;A;;;;;;;AAIA;;A;;;;;;;;;;AAQA;;AACA;AACA;AACA;AAEA;;AACC;;;A;AAEC;A;AAID;AAGA;AAGA;;A;AACC;A;AAGD;;;;A;AAED;A;;;;;;AAKA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;;;;;;AAOA;;A;AAEC;A;A;AAGA;A;AAED;;AACA;AACA;A;A;;;;;A;AAIA;;;A;A;;;;;A;AAGA;A;;;;;;AAQA;AACA;AACA;AACA;A;;;;;;AAKA;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;A;;;;;;AAKA;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;A;;;;;;AAOA;AACA;A;;;;;;AAOA;AACA;A;;;;;;AAOA;AACA;A;;;;;;AClXA;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AAEA;AACA;AACA;A;;;;;;AAOA;AACA;A;;;;;;AAIA;A;;;;;AAII;;;;AACJ;AACA;AAGI;AACA;AACJ;AACA;AAEI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AAEA;AACA;AAEI;;;A;AAEF;A;AAFiB;A;AAKnB;A;;;;;;AAII;;;;;;;;;;;;;;;;;;AAEJ;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAGD;A;;;;A;;;;;;AAKI;;;;;;;;;;;;AAEJ;AACA;AACA;AAEA;A;;;;A;;;;;;AAKI;;;;;;;;;;;;AAEJ;AACA;AACA;AAEA;A;;;;A;;;;;;;AAKI;;;;;;;;AAEJ;AACA;A;;;;A;;;;AA0BI;AACJ;AAEI;;;;AACJ;;;;;;AACC;AACA;A;;AAID;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;A;;;AAOI;;;AACH;AADkB;A;A;;;AAmBf;;;AACH;AADkB;A;A;;;AA0Bf;;;AACH;AADmB;A;AAIhB;;;AACC;;;A;AACH;AADkB;A;AADD;A;AAMnB;A;;;AAQI;;;AACH;AADmB;A;AAIhB;;;AACC;;;AACH;A;A;AAEC;A;A;AAEA;A;AALkB;A;AADF;A;AAWnB;A;;;AAOI;;;AACH;AADkB;A;AAKf;;;A;AACH;A;AACA;A;AACA;AAHoB;A;AAKrB;AAKI;;;A;AACH;AACA;AAFkB;A;AAInB;AACA;AACA;AAMA;AACA;AACA;A;;;AAWI;;;A;AACH;AACA;AAFkB;A;AAInB;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;A;;;AAMI;;;;;;;;AACA;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACI;;;AACH;AADmB;A;AAGpB;A;;;AAQA;AAEI;;;A;AACH;AACA;AAFkB;A;AAInB;AACA;AAEA;AACA;AAKI;;;AACH;AACA;A;AACA;AAHkB;A;AAQf;;;A;AACH;AACA;AAFkB;A;AAInB;AACA;AAGA;AACA;AAgBI;;;AACH;AACA;A;AACA;AAHkB;A;AAYnB;AACI;;;AACH;AADkB;A;AAGnB;AAEA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAWI;;;;;;;;;;;;;;;;;;;;;;AACA;AAEJ;AACA;AAGA;AAEA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEI;;;AACH;AADkB;A;AAGnB;AACA;AAEA;AAEA;AACA;AACA;A;AAEC;AACA;A;AAEG;;;AACH;AADkB;A;AAGnB;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AACA;AAEI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;A;;;AAKI;;;;;;;;;;AACA;AAEJ;AACA;AACA;AAGA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAGI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AAGI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;A;;;AAMA;AACA;AAEI;;;AACH;AADkB;A;A;;;AAMf;;;;;;AACA;;;AACH;AACA;AACA;AAHkB;A;AAMnB;;;;;AACK;;;AACH;AACA;AACA;AACA;AACA;AACA;AANkC;A;A;;A;;;AAahC;;;;;;;;AACA;AAED;A;AACF;A;AAGD;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;A;;;AAMI;AAEA;;;AACC;AACD;A;AACF;A;AAIC;A;A;AAGF;AAVwB;A;AAYzB;AACA;A;;;AAKA;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;A;;;AAKI;AACJ;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;A;;;;ACjuBA;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AAEA;;;AAGA;A;;;;;;AAIA;A;;;;;AAOA;AACI;AAEJ;;A;AACC;;AACA;A;;AAEA;A;AAGD;;;;;;AACC;A;;A;;;;;;;;;;;;AAKG;AACJ;AAEI;;;;;;AACJ;A;;;;;A;;;;;;;;;;;;;;AAKI;AACJ;AAEI;;;;;;;;;;AACJ;AACA;AACA;A;;;;;A;;;;;AAsIA;A;;;AASA;AAEA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;A;;;AAQA;AACI;;AACH;AACA;AACA;AACA;AAEA;A;AAEC;A;AAGD;AACA;AACA;AACA;AAda;A;AAiBd;A;;;AAoBI;AAEA;;AACH;AACA;AACA;AACA;AACA;AAEA;A;AAEC;A;AAGD;AACA;AACA;AACA;AACA;AAhBa;A;AAmBd;A;;;AAoBI;AACA;;;;;;AAMJ;AAEA;AACA;AACA;AACA;AACA;AAEI;;;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAnBmB;A;AAsBpB;AACA;AACA;AACA;AAYI;;A;AACH;AACA;AACA;AACA;A;AA6CA;A;AACA;A;AAEA;A;AACA;A;AAIA;A;AACA;A;AACA;A;AACA;A;AAEA;A;AACA;A;AACA;A;AACA;A;AAGC;A;A;AAED;AACA;AACA;AACA;A;AAEA;A;AACA;A;AAEA;A;AACA;A;AAMA;A;AACA;A;AACA;A;AACA;A;AAEA;A;AACA;A;AACA;AA5Fa;A;AAiGd;AACI;;;AAIH;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAdkB;A;AAiBnB;AACA;AACA;AACA;AAEA;A;;;AAQI;AAEJ;AACA;AACA;AAEA;AAEA;AAGA;AAGA;AAIA;AAMA;AAKA;AAIA;AAIA;AAGA;AAGA;AAEA;AAEA;AACA;AAEA;A;;;AASI;AAEJ;AACA;AAEA;AAGA;AAIA;AAKA;AAMA;AAOA;AAUA;AASA;AAQA;AAOA;AAMA;AAKA;AAIA;AAGA;AAEA;AAEA;A;;;AAIA;A;;;AAUI;;;;AAGA;;;;;;;;;;;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADoB;A;AAIrB;AACI;;;AACH;AADmB;A;AAGpB;AACI;;;AACH;AADkB;A;AAGnB;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;;;AAQI;AAEA;;AACH;AACA;AACA;AACA;AAEA;A;AAEC;A;AAGD;AACA;AACA;AACA;AAda;A;AAiBd;A;;;AAQI;;;;AAEA;;AACH;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AAjBa;A;AAoBd;A;;;AAQI;;;;AAEA;;AACH;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AAjBa;A;AAoBd;A;;;AAaI;;;;;;;;;;;;AAEJ;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;AAWI;;;;;;;;;;;;;;;;;;;;;;AAEJ;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;AAUI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEJ;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;AAOI;;;AACH;AACA;AAF0B;A;A;;;AAS3B;;;;;AACC;A;;AAED;;;;;AACC;A;;AAGG;;;AACH;AACA;AACA;AACA;AACA;AACA;;;;;AACC;AACA;A;;AAED;;;;;AACC;AACA;A;;AAZ0B;A;A;;;AAqB5B;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;;;;;AACC;A;;AAKG;;;AACH;AACA;AACA;AACA;AACA;AACA;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;;;;;AACC;A;;AAb0B;A;A;;;AAoB5B;A;;;AAOA;AACI;;;;;;AACA;;;;;;;;;;AAEJ;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;;;;;AACC;A;;AAKG;;;A;AAEF;A;AAED;AACI;;;AACH;AACA;AACA;AACA;AACA;AAEA;AACA;AAKA;AAIA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AA9B0B;A;AALF;A;A;;;AA2CtB;;;;AAEJ;AACA;AACA;AACA;AACA;A;;;;;;;;AAMI;;;;AACJ;A;;;;;;;A;;;;AAMI;;;;;;;;;;;;AACA;AACA;;;;;;;;AAGJ;AACA;AACA;AAEI;;;AACH;AACA;AAFmB;A;AAKpB;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;AAGI;;;A;AAEF;AACA;AACA;AACA;A;AAGD;A;AAEC;A;AAEA;A;AAID;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AA3BmB;A;A;;;;AAiCpB;AACA;;AAEI;;;AACA;A;AACF;A;AAEA;A;AAED;AAEA;A;AAEC;A;AAGE;A;AACF;A;AAEA;A;AAED;AAlB0B;A;A;;;;;;AAwB3B;;;;AAEA;AACI;;;A;AAEF;A;AAEA;A;AAED;AACA;AAP+B;A;AAUhC;AACA;;AACA;A;;;ACxpCA;A;;;;;;;;;;;;A;A;A;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;ACWA;AACC;AACA;A;AAGD;;;;;A;AAEC;A;AAEI;AACJ;;A;A;;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChBD;AACA;AACA;AACA;A;;;;A;A;AAqEC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAED;AACA;A;;;;;AAYA;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAKC;A;A;A;A;A;A;AAQA;A;A;AAGA;A;AAED;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AACA;;;AACA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAII;AACJ;AACA;A;;;AAIA;AACA;AAEA;A;;;AAKA;AACA;AACA;A;;;;AAKA;AACA;AACA;A;;;;AAKA;AACA;AACA;A;;;;AAKA;AACA;AACA;A;;;;;A;A;AAMC;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AAIiC;A;;;;;;;;AAGlC;AACA;AACA;;A;AACC;AACA;AACA;;A;AACC;AACA;A;AAED;A;AAED;;A;AACC;AACA;AACA;A;A;AAGA;A;AAED;A;;;;;;;AAKA;AACA;AACA;;A;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;;;;AAMD;AACI;AACJ;AACA;;A;AACC;;A;;AAEA;;A;AAID;AACA;AACA;AACA;;A;AAGC;A;AAGG;AACJ;AACA;AACA;AACA;AACA;AACA;A;AAEC;AACA;A;AAGD;A;;;;;;AAKA;AACA;AACA;;AACA;;A;;;;;AC5PI;AACJ;;;;;;;;;;;;;;;;AACA;;AACK;;;AACH;AACA;AAFmB;A;AAKhB;;;AACH;AACA;AACA;AACA;AAEA;AANoB;A;AASrB;;;;;;;;;;;;;;;;AAEI;;;AACH;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZmB;A;AAepB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAGD;;;;;;;;;;;;;;;;A;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtGyC;A;;;;;AAOJ;A;;;;;;A;AAQpC;AACA;A;A;A;AAQA;A;AAEA;A;AAEA;A;AAGD;A;;;A;AASC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;AAMA;A;AAEC;A;A;AAIA;AACA;A;AAEG;;;AACH;AACA;AAF2C;A;AAM5C;AACA;AACA;A;;;AAMG;A;AACF;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;A;;;AAQG;A;AACF;A;AAED;A;AAGC;AACA;;;;;AACC;A;;AAED;AACA;AACA;AACA;A;AAED;AACA;A;;;;A;AAiBC;A;AAED;AACA;AACA;A;;;;;AAMA;A;AAEC;A;AAGD;AACA;AACI;;;AACH;AACA;AAF6B;A;AAK9B;A;;;;;;A;AAMC;AACA;A;AAED;A;AAIC;AACA;A;AAED;AACA;AACA;A;;;;A;AAmBC;A;AAEG;;;A;AAEF;A;AAFuB;A;AAMzB;A;;;;;AAII;AAEJ;;;;;;A;AAEE;A;AAED;A;;AAGD;A;;;;;;A;AAQC;AACA;A;AAKD;AAMA;;;;A;AAEC;A;A;AAGA;AACA;A;AAEA;AACA;A;AAGD;AACA;;AACC;;;;A;AAEC;A;AAED;AAL0B;A;AAO3B;AACA;A;;;;;;AAgBA;AACI;AACA;;;A;AAIF;AACA;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAGC;A;AAED;A;AAjBqC;A;AAoBvC;AACA;A;;;;;;AAMA;AAEA;AACA;;;;AACA;;A;AACC;AACA;;;;A;A;AAGA;A;AAGE;;AAAH;;A;AACC;;AACA;A;AAGD;;;A;AAEC;;A;AAGD;A;;;;;;;AAOA;AAEG;;;;A;AACF;A;AAGE;;AAAH;;A;AACC;;A;AAGD;A;;;;;;AAQA;;;;;A;A;;;;;A;A;;A;;;;;A;;;AAUA;A;;;;;AASA;;;;;A;AAEE;AACA;A;A;;AAGF;AACA;A;;;AAkBA;A;;;;;AAyBA;;;;;A;AAEE;AACA;A;A;;AAGF;AACA;A;;;;;A;;;;;A;;;;;A;A;;;;;A;A;;;;;A;;;;;;AA0CA;A;AAIC;AACA;A;AAED;AACA;AACA;AACA;AACA;A;AAKC;;;;A;AAEC;A;A;AAIA;AACA;A;A;A;AAID;AACA;A;AAED;AACA;A;AAGC;A;AAGA;A;AAEC;AACA;A;AAED;AACI;;;A;AAEF;AACA;A;AAED;AACA;A;AAIC;AACA;A;AAED;AACA;A;AAGC;AACA;A;AAlBwB;A;A;AAuBzB;AACA;A;A;AAIF;A;;;;;;AAOA;;;;;;A;AAEC;AACA;A;AAKD;AACI;;;AACC;AACJ;;;;A;AAEC;A;A;A;AAOA;A;AAGA;A;A;AAIA;AACA;A;A;AAGA;AACA;A;AAED;AACA;A;AAED;;AACA;AACA;AACI;;;AACH;;;;;A;AAEC;A;AAH2B;A;AAM7B;A;;;;AAiBA;A;;;;;;AAOA;AACA;A;A;AAKE;A;AAED;A;AAIE;AAAH;;;;;;A;AACK;AACJ;;;;A;AAEC;A;A;AAGA;AACA;A;AAEG;AACJ;;A;AACC;A;AAEA;;;;;;;;;;;;A;AACC;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;;A;A;AAEA;;;;A;A;AAEA;A;A;A;AAKF;A;AAEC;A;AAED;;A;AACC;;A;AAED;A;AAGD;;;;A;AAEC;A;A;AAGA;A;AAEC;A;A;AAGA;AACA;A;A;A;A;AAMC;;;;A;AAEC;A;A;A;AAIA;AACA;A;AAED;AACA;A;A;AAID;A;AAEC;A;AAEA;A;AAED;A;A;AAIF;;;;;;AACA;;A;AACC;;AACA;A;A;A;A;A;AAWE;A;A;AAGD;A;A;A;AAOD;A;A;AAIA;A;AAGD;AACA;AACA;A;AAGC;AACA;AACA;A;A;AAIA;AACA;AACA;A;A;AAIA;AACA;AACA;A;AAID;;A;AAGC;AACA;;A;AACC;A;;AAEA;;;;;;;;A;AAED;A;A;AAGA;AACA;A;AAED;AACA;A;AAIA;;;;;;;;A;AACC;AACA;;AACA;A;AAEA;;;AACA;;AACA;;A;AACC;;;;;A;AAED;AACA;A;AAEA;;;AACA;;A;AACC;;A;AAED;AACA;A;AAEI;AACA;AACJ;;A;AACC;;;;A;;AAEA;;;;A;AAED;;A;AACC;;A;AAED;AACA;A;AAEA;;;A;AAEC;A;AAED;AACA;A;AAEA;AACA;A;AAEA;;;AACA;;A;AACC;;A;AAED;AACA;A;A;AAEM;A;AACP;;;;;;A;AACC;;;A;AAEC;A;AAED;AACA;A;AAEA;;;A;AACC;;;A;AAEC;A;AAED;A;;AAEA;;;A;AAEC;A;AAED;A;AAED;A;AAGA;AAEI;;;;AACH;;;A;AACC;AACA;A;AAHqC;A;AAOvC;;;;;;A;AAEC;AACA;;;A;AAGD;AACI;;;;AACH;;AACA;;A;AAFsC;A;A;AAKtC;;;;;A;AAEC;A;AAPqC;A;AAavC;A;AAEA;AACA;;;;A;AACC;;AACA;;;;;AACA;A;AAED;;;;;;;;AACA;;A;AACC;A;AAED;AACA;A;AAEI;A;AAEJ;;;;;;;A;AACC;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAEA;;;A;A;AAMA;;;A;;AAEA;;A;A;A;AAGA;A;AAED;A;A;AAED;;AACA;A;;;;A;A;AAQC;A;AAGD;A;;;;A;AAQC;A;AAED;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;A;;;;;A;;;;;;;;AA+DA;;;AACA;;;;A;A;;;;;A;A;;;;;A;;;;;;ACv8BA;;;;;A;AAGE;A;AAEA;A;AAEC;A;A;AAGD;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;;;A;AAEC;AACA;A;A;AAGD;;;A;AAEC;AACA;A;A;AAGD;A;AAEA;A;AAEC;A;A;AAGD;A;AAEC;A;A;AAGD;A;A;;AAGF;A;;;;;;;;A;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;AAqBA;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;AAOC;;;;A;A;;;;;;;;;A;AAGA;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;;;;;;;;;A;A;A;;;;;;;;;A;;;;;AC9ID;A;;;;;AAIA;A;;;;;AAMA;A;;;;;A;AAKC;A;A;;;;;AAOD;A;;;;;A;AAKC;A;A;;;;;;AAOG;AACJ;;;;;AACC;;A;;AAED;A;;;;;;;AAII;AACJ;;;;;AACC;AACA;;A;;A;;;;;;;;AAaD;;;A;;;;;;;AAIA;AACA;;A;;;;;;;AAMA;AAEA;;AACC;AACA;A;AAGD;;AACC;AACA;A;AAGD;A;;;;;AAIA;AAEI;;;AACH;AADkB;A;A;;;;A;AAOlB;A;AAGD;AACI;;;AACH;AADkB;A;AAInB;A;;;AAIA;AAEI;;;AACH;AACA;A;AAEC;A;AAGD;AAPuB;A;AAUxB;A;;;A;AAKC;A;A;AAQA;AACA;AACA;AACA;;;;;AACC;A;;A;AAGA;A;AAED;A;AAGA;A;AAEA;A;AAIC;A;AAED;A;A;;;AAKD;AAEA;;AACC;AADY;A;AAIb;A;;;;AAIA;AACA;;AACC;AACA;A;AAED;A;;;AAIA;A;AAEC;A;A;AAGA;AACA;AACA;A;AAEA;AACA;A;A;AAIA;AACA;AACA;A;AAEA;A;AAGD;A;;;;AAMA;A;;;;;AAIA;A;AAEC;A;A;;;;;AAOD;AACI;;;AACH;AADyB;A;AAG1B;A;;;;;AAIA;AACI;;;AACH;AADyB;A;A;;;;;;A;A;;;;;A;A;;;;;A;;;;;AActB;;;A;A;;;;;A;AAAoB;A;A;;;;;A;;;;;AAgBpB;;;A;A;;;;;A;AAAoB;A;A;;;;;A;;;;;AAUpB;;;A;A;;;;;A;AAAoB;A;A;;;;;A;;;AAUxB;A;;;AAIA;A;;;AAII;AACJ;;;;;AACC;AACA;A;;AAED;A;;;;AAIA;;AACA;A;;;;;;;AAIA;AAEA;;;;A;A;;;;;A;A;;;;;A;;;;;;;AASA;AAEA;;;;A;A;;;;;A;A;;;;;A;;;;;;;AASA;;A;AAIC;A;AAEA;A;A;;;;;A;A;;;;;;A;;;;;;;AASD;;A;A;;;;;A;AAKA;A;;;;;;A;;;;;AAMA;;;;AAEA;AACA;AAEA;;;;;AAEA;AACA;AACA;AAEA;;;A;AAIC;A;AAEA;A;AAEA;A;AAGD;A;AAEC;A;AAGD;AACA;AAEA;A;;;;AAIA;;;A;AAEC;A;AAED;A;;;;;;A;AAKA;;;;;;A;A;;;;;A;AAGC;;AACA;;;;;A;A;;;;;A;A;;;;;A;A;;;;;;A;A;;;;;;A;A;;;;;;A;A;AAYM;A;AACP;;;;;;A;A;A;;;;;A;A;;;;;A;A;;;;;A;AAQC;AAEI;;;;AACH;;;A;A;;;;;A;AAD6B;A;AAM9B;AAEA;;A;A;;;;;A;AAOA;;;A;AACC;;AACA;;A;AACC;;A;;;;;A;AAQD;A;AAGM;A;AACP;;;A;A;;;;;A;A;;;;;;;;;;;A;AAKC;AACI;;;AACH;;;;;;;;;;A;A;;;;;A;AADmB;A;A;;;;;A;A;A;A;AAUrB;AACA;;;;A;A;;;;;;A;AAII;AAEG;A;AACP;;;A;A;;;;;A;A;;;;;;A;AAKC;AAEI;;;AACH;;;;;A;A;;;;;A;AADkB;A;A;;;;;A;A;A;A;A;AAWpB;;;;A;A;;;;;;A;A;;;;;;A;A;;;;;;A;A;;;;;;;A;A;A;A;A;;;;;A;;;;;;;AAeD;;A;A;;;;;;A;AAIA;;;;;A;A;;;;;;A;A;A;;;;;A;AAQA;;A;AACC;;AACA;AAEA;;;;;;;A;A;;;;;A;A;AAQD;;A;AACC;;;;;;;;A;A;;;;;A;A;AAKD;;A;AACC;;A;A;;;;;A;AAKA;AAEA;AACA;A;;;;;A;AAKD;;;;;;AACA;;A;A;;;;;;A;A;A;;;;;A;A;A;;;;;A;A;AAaA;;;A;AACC;;A;AAIC;;;;;;;AACC;;A;AACC;;;;A;A;;;;;A;AAGA;AACA;A;A;;A;;AAIF;A;A;A;AAGD;;;;;;A;AACC;A;A;A;A;A;A;;;;;A;AAQD;A;AAGD;AAEA;;;;A;A;;;;;A;AAKA;;AAEA;AACA;;A;A;AAEE;A;AAEA;A;AAEA;A;AAGD;;A;AACC;AAEA;AAEA;AAEA;;;;;A;;;;;A;AAWD;A;AAGD;A;;;;;A;;;;;AAiBA;;A;;;;;;AAMA;;;;;A;AAEC;A;AAED;;AACA;AACA;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChnBA;A;;;;;;AAWA;;;;;A;AAEC;A;AAGD;;A;;;;;;;;AAQA;;AACA;AACA;;;A;AAEC;A;AAGD;AACA;AACA;;AACA;AACA;A;;;;;AAwBA;;;AACA;A;AAEC;A;AAGD;AACA;A;AAEC;A;AAED;A;;;;;AAQA;AACA;AACA;;A;;;;;;;;AAWA;AAGA;;A;AAEC;A;AAED;AACA;;;A;AAEC;A;AAID;AACA;;AACA;;AACA;;AACA;;AAIA;;;A;A;;;;;;;A;AAOA;;AAMA;AACA;;A;A;;;;;;;A;AAII;;;;AACJ;AACC;AACC;;;;A;AAEC;AACA;A;AAGE;;;AAAH;;A;AACC;;A;;AAEA;;A;AAGD;;;AACA;;A;AAEC;A;A;AAIF;;AACA;AACA;AACA;AACA;;A;AAEC;A;A;AAIF;A;;;;;;AAOA;AACA;;A;AAGC;A;A;AAGA;A;AAED;;AAEI;AACD;;;AAAH;;A;AACC;;A;;AAEA;;A;AAGD;AACA;;AACA;AACA;;AAGI;;;;AACD;;;AAAH;;A;AACC;;;;A;;AAEA;;;;AACA;;;;AACA;;;;A;A;AAIA;A;AAED;;AACA;A;;;;;;;;AASA;;;;;AACC;A;;A;;;;;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9OD;AACA;;AACA;AACA;;AACA;;AACA;;A;;;;;;;;;A;;;;;A;;;;;;AAO2B;A;;;;;AAEK;A;;;;;;AAGhC;AACA;;A;;;;;;;AAQA;AACA;;AACA;;AACA;;AACA;;AACA;AACA;AACA;;A;AAEC;;AACA;;A;AAED;AACA;AACA;;;;;AACC;A;;AAED;;;;;AACC;A;;AAED;;AACA;A;;;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxEA;A;;;;AA0BA;AACA;AACA;AACA;AACA;AACA;A;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AACA;;;AACA;AACA;A;;;;AAIA;AAUA;A;;;AAIA;AAMA;A;;;AAIA;AACA;AAEA;A;;;AAIA;AACA;AACA;A;;;AAOA;AACA;AACA;A;;;;;AAG6B;A;;;;;AAEK;A;;;;;;;;AAGlC;AACA;AACA;;A;AACC;AACA;AACA;;A;AACC;AACA;A;AAED;A;AAED;;A;AACC;AACA;AACA;A;A;AAGA;A;AAED;A;;;;;;;AAKA;AACA;;AACA;A;;;;;;;AAKA;AACI;AACJ;AACA;;A;AACC;;A;;AAEA;;A;AAID;AACI;;;AACH;AADwB;A;AAGzB;;A;AAGC;A;AAGG;AACJ;;;;;;AACC;AACA;AACA;AACA;A;;AAGD;A;;;;;ACrLA;AACA;AACA;A;;;AAIA;AACA;AACA;AACA;AACI;AACA;AACJ;;AACC;;;;;;;;A;AAQC;A;AAEA;A;AAEA;AACA;AACI;;;AACH;AACA;AAFmB;A;A;AAQrB;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;A;AAGD;AACA;AACA;AACA;A;;;;;;A;A;A;A;;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7OA;A;;;;AAMA;A;AAEC;A;AAEG;AACA;;;AACH;AADoB;A;AAGjB;AACA;;;AACH;AACA;;;;AAFoB;A;AAIrB;A;;;;;AAMA;;;;;AACC;A;;AAED;;;;A;;;;;A;AAUC;A;A;AAGA;A;AAED;;;;AACA;AACA;AACA;;;;;;AACC;AACA;AACA;AACA;AACA;;;;AACA;A;;AAED;;;;A;;;;;ACpEA;A;;;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BA;AAEG;A;AACF;A;AAED;A;AAEC;A;AAID;AACA;AACA;;;;AACA;;A;AAEC;A;AAED;AACA;AAEA;AACA;;AAEA;AACA;A;;;;;;AAYG;A;AACF;A;AAED;;;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AAuBG;A;AACF;A;AAED;A;AAEC;A;AAGD;;;;;;A;AAEC;A;A;AAMA;A;AAGD;AACA;AACA;A;;;;;;;;;;AAUA;A;AAEC;AACA;A;AAGD;AACA;;;;A;AAEC;A;AAGD;AACA;AACA;AAMA;AAEI;;;AACH;AACA;AACA;AAHwB;A;AAQzB;AAEA;AACA;A;;;;;;;;;A;;;;;;AAMA;;;A;AAEC;A;AAGG;;;AACH;;AACC;;;A;AAEC;A;AAID;A;AARsB;A;AAYxB;A;;;;;AAoCA;;;;A;AAEC;A;AAGD;AACA;A;AAEC;A;AAID;AACA;AACI;;;AACH;AADyB;A;AAG1B;AACA;AAEA;AACA;;;;A;AAEC;A;AAGD;AACA;A;;;;;;AASA;;;;A;AAEC;A;AAGD;AACA;A;AAEC;A;AAGD;AACA;;AACA;AAGA;AACA;AACA;AACA;AACA;AAEI;;;AACH;AADyB;A;A;AAKzB;A;AAGD;A;;;;;;;;A;A;;;;;;;A;AAUA;A;A;;;;;;;A;AAIA;;;A;A;;;;;;;A;AAIA;A;;;AAMA;AACI;;;AACH;AADgC;A;AAGjC;A;;;;ACjTA;;AACA;AACA;A;AASC;A;A;AAMA;A;AAGD;AACA;AACA;AAaI;AAEJ;;AACA;;AACA;;AAEA;;AACA;AAQA;AACA;AAMA;AAKA;AAGA;AAGA;A;;;;;AASA;;A;AAEC;A;AAID;A;AAEC;A;A;AAMA;A;AAKD;AACA;A;AAMC;A;AAMD;AAIA;AAEA;;A;AAEK;;;;A;A;AAGF;A;AAHwC;A;A;AAOxC;A;AAPwC;A;A;AAWzC;A;A;;AAOD;;;;;A;AAEE;A;A;;A;AAID;A;A;AAKF;AAQI;AACJ;;AACA;;AACA;;AAEA;;A;AAIC;A;AAED;A;;;;;;;AAQA;AACA;;;;;;;;;A;AAEC;A;AAED;AACA;;;;A;AAEC;A;AAED;AACA;AACA;A;;;;;AA4BA;A;;;;;A;AAKC;A;AAED;A;;;;;AAQA;A;A;AAGC;A;AAEA;A;A;AAIA;A;AAGD;AACG;;;A;AACF;A;AAED;;A;;;;;;AASA;;A;;;;;;AAKA;A;AAEC;A;AAED;AACA;;AACA;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;;;;;;;;A;;;;;ACtPA;A;;;;A;AA0BC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AAgBA;A;;;;;;AAWG;;;AAAH;;A;AACC;;A;AAGD;;;;;;;A;;;;;;;;;AAOA;;A;A;;;;;A;AAIA;;;;A;A;A;;;;;;A;A;AAKI;AAAH;;A;AACC;AACG;;;A;A;;;;;A;AAGA;;A;A;;;;;A;A;;;;;A;A;;;;;A;A;;A;A;;;;;A;A;;;;;;;;AAkCF;A;AACF;A;AAID;AACA;;;;;A;AAGE;A;AAED;A;;A;AAGA;A;AAQD;AACA;AACA;AACA;;;;;AACC;AACA;;A;AAEC;A;A;;AAGF;A;;;;;AAkHG;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;A;;;;;AAMI;AACA;AAEJ;AACA;;AACC;;AACA;;AACA;;AACA;AAEI;;;AACH;AACA;AAF+C;A;AAIhD;A;A;;;;;;AASD;AACA;;AACA;A;;;;;;A;AA6EC;A;AAGD;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACI;;;AACH;AACA;AAEA;AACA;;AAEA;AACA;;AAEA;AAViC;A;A;;;;;;;;;A;AAmBjC;AACA;A;A;A;;;;;A;AAMG;AACJ;;A;AACC;AAOI;AACJ;AACA;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;;A;AAEC;A;A;AAGF;AACA;;AACA;AACA;AACA;;AACA;A;AAGD;;A;AACC;;A;;AAGA;;AACA;;AACA;A;AAEC;A;AAED;AACA;;AACA;AACA;AAEA;;;;;;AACC;AACA;;AACA;AACA;AACA;;A;AAEC;A;AAED;AACA;A;;A;AAIF;;A;AAEC;AACA;;A;AAGD;A;;;;;;;AAIA;;;;A;A;;;;;A;AAOA;;A;A;;;;;A;A;;;;;A;;;;;AAoBG;A;AACF;A;AAED;AACA;;;;;A;AAEC;A;AAGD;AAEA;;;;A;AAEC;A;AAGD;;AACA;;AACA;AAOA;AAEA;AAEA;;AACA;;AAEA;AACA;AAEA;;AAMA;AAOI;;;;;;AACJ;AACA;;AAEI;;;AACH;AACA;AACA;AACA;AACA;AAL0B;A;A;AAS1B;A;AAGD;A;;;;;;AAMA;A;AAEC;A;AAED;AACA;AACA;A;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpnBA;A;;;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AACA;;;AACA;AACA;A;;;;AAII;AACJ;AACA;A;;;AAII;AACJ;AACA;A;;;AAIA;AACA;AAEA;A;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AAOA;AACA;AACA;A;;;;;AAG6B;A;;;;;AAEK;A;;;;;;;;AAGlC;AACA;AACA;;A;AACC;AACA;AACA;;A;AACC;AACA;A;AAED;A;AAED;;A;AACC;AACA;AACA;A;A;AAGA;A;AAED;A;;;;;;;AAKA;AACA;;AACA;A;;;;;;;AAIA;AAEI;AACJ;AACA;;A;AACC;;A;;AAEA;;A;AAID;AACA;AACA;;A;AAGC;A;AAGG;AAEJ;AACA;AACA;AACA;AACA;AAEA;A;;;;;;;AAKA;AACA;;AACA;A;;;;;;;AAII;AACJ;AACI;;;AACH;AADwB;A;AAIzB;AACA;AACA;AAEA;AACI;;;AACH;AAGA;AAGA;A;AAIC;A;AAX2B;A;AAgB7B;AAEI;AACJ;;;;;;AACC;AACA;AACA;AACA;A;;AAGG;;;A;AAGF;AACA;A;AAEA;A;AAN2B;A;AAW7B;AAEA;;;;;;A;AACC;A;AACA;A;AACA;A;AACA;A;;AAGD;A;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAIA;AACA;AACA;AACA;AACA;A;;;AC3QI;AAEJ;;;;;;;;;;AACA;;AAGK;;;AACH;AACA;AAFmB;A;AAKpB;;;;;;;;;;AAKA;AACA;;AACC;AACA;AACA;AACA;AACA;;;;;;;;;;AALa;A;AAOd;;AACC;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;AARa;A;AAUd;;AACC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAPa;A;AASd;;AACC;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;;;AARa;A;AAUd;;AACC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAPa;A;AAUd;AACA;AACA;AACA;AACA;AAEA;A;AAGD;;;;;;;;;;A;;;;;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzEA;AACA;A;;;;AAgDA;A;AAEC;A;AAEA;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;AACA;;;AACA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAII;AACJ;AACA;A;;;AAII;AACJ;AACA;A;;;AAIA;AACA;AAEA;A;;;AAIA;AACA;AACA;A;;;;A;AAKC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAED;AACA;A;;;;AAQA;AACA;AACA;A;;;;AAKA;AACA;AACA;AACA;A;;;;;A;AAKC;A;AAED;A;;;;;AAGkC;A;;;;;;;;AAGlC;AACA;AACA;;A;AACC;AACA;AACA;;A;AACC;AACA;A;AAED;A;AAED;;A;AACC;AACA;AACA;A;A;AAGA;A;AAED;A;;;;;;;AAKA;AACA;;A;AAEC;A;AAED;A;;;;;;;AAIA;AAEI;AACJ;AACA;;A;AACC;;A;;AAEA;;A;AAID;AACA;AACA;;A;AAGC;A;AAGG;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEC;A;AAGD;A;;;;;AC9LI;AACJ;;;;;;;;;;;;;;;;AACA;;AAGK;;;AACH;AACA;AAFmB;A;AAIhB;;;AACH;AACA;AACA;AACA;AACA;AALoB;A;AAQrB;;;;;;;;;;;;;;;;AAEI;;;AACH;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZmB;A;AAepB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAGD;;;;;;;;;;;;;;;;A;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACkJC;A;A;AAIA;A;A;AAGA;A;AAGD;;AAEA;A;AAEC;A;AAED;AAEA;AACA;;AACA;AACA;;AACA;;AACA;;AACA;AACA;;AACA;;AAEA;A;;;;;;;;A;A;A;A;A;;;;;;;;;;;;;;;ACxR4B;A;;;;AAO5B;;;;;;AACC;AACA;A;;AAGD;A;;;;AAkEA;AACA;AACA;A;;;;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1DA;AACI;;;AACH;A;AAEC;A;AAED;;;;;;A;AAEE;A;AAGD;AACA;;;AACA;;A;AACC;;;;A;AAEC;AACA;;A;AAGD;A;AAGD;;AACA;AAEA;;;;;;;AACC;A;A;AAIC;A;AAGA;A;AAGA;A;A;AAIA;A;AAEA;A;A;;AAIF;A;;AA9CsB;A;AAkDxB;A;;;;;;AA0CA;;;;;A;AAEE;;A;AAGD;;;;;AACC;AACA;;;A;AAEC;;A;AAGD;A;A;A;AAIE;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;A;;A;;A;;;;;A;AAyBH;A;AAGD;AACA;;;;;;AACC;AACA;A;;AAGD;A;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEC;A;A;AAGA;A;AAED;;;;;AACC;A;;A;;A;;;;;;AASD;;A;;;;;AAMA;;;;;A;AAEE;A;A;;AAGF;A;;;;AAcA;A;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrNA;AACI;A;AAEH;AACA;A;AAEA;A;AAEC;A;A;A;;;;;;A;;;;AASF;AACA;AAEA;;;;;A;AAEE;;A;AAED;AACA;A;;AAGD;A;;;;;;AAcA;A;AAEC;A;AACS;A;AACT;A;A;;;;;A;A;AAKD;;;;AACA;;A;A;;;;;A;AAGA;AAEA;AAKA;A;A;;;;;A;AAMC;;;;AAEA;A;AAEC;A;AAID;;;;AACA;;AACA;;AACA;AACA;A;AAGG;;;;A;AAKH;AACA;A;AAEA;AACA;A;AAGD;;A;A;;;;;A;AAMA;AACA;AACA;;A;A;;;;;A;AAIA;AACA;AACA;;A;A;;;;;A;AAMG;;;AAAH;;A;A;;;;;A;AAIA;AACA;AACA;;;AACA;;A;A;;;;;A;AAGA;AAIA;;;AAEA;A;;;;;;AAwBA;;;;A;AAEC;A;AAED;A;;;;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnLI;AAGJ;;AACC;A;AAEC;A;AAEE;;;A;AACF;A;AAEA;A;A;A;AAID;A;AAED;;;A;;;;;A;;;;;AASA;;A;;;;;;AAQA;;;;A;AAEC;A;AAED;AAGI;AAED;;;;AAAH;;A;AAOI;;A;AACF;A;A;AAGF;;A;;;;AAyCgC;A;;;;AAKhC;A;;;;AAUA;A;;;;AAIA;A;;;;;;;AAWA;;AACA;AACA;AACC;;;;AACA;A;AAEC;A;A;;;;;A;AAIA;A;A;A;;;;;;AClIF;A;;;;AAIA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;;;AAeA;;A;AACC;;A;AAGG;;;;AACD;A;AACF;;;;A;AAEA;A;AAGD;AACI;;;AACH;;;;;AACA;;;;AACA;;A;AACI;AAAH;;A;AACC;AACA;AACA;A;AAPoB;A;A;AAWtB;A;AAED;A;;;;;;;;;A;A;A;A;A;A;A;A;A;;;A;;AD8DC;AACA;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AE3FD;A;AAEC;A;AAEE;;;AAAH;;A;AACC;AACA;AACA;A;;;;;;;A;AAGD;AACA;AACA;AACA;AAEA;A;;;;;;;A;;;;;;;AASA;AACA;A;AAEC;A;AAEE;;;AAAH;;A;AACC;AACA;AACA;AACA;A;AAED;AACA;AACA;AACA;AAEA;AAEA;A;;;;;;;AAKA;;;;AACA;AAEA;AACA;AACA;;;;;A;A;;AAGA;A;;;;;;;;AASA;AACA;AACA;;;A;AAEC;A;A;AAGA;AACA;A;AAED;A;;;;;;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACMA;;A;;;;;;;;AAgBA;AACA;A;AAEC;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;A;A;AAmDC;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAIA;AACI;AACD;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAED;A;;;;;AAIA;A;;;;;;A;AA+BC;A;AAED;AACA;;AACA;;;;A;AAEC;A;AAED;AACA;;;;A;AAEC;A;AAEE;A;AACF;A;AAED;A;;;;;;A;AA6BC;A;AAED;AACI;AACD;;;A;AACF;A;AAED;AACA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;AAEC;AACA;AACA;A;AAED;A;;;;;AAII;AACA;AACJ;;;A;AAEC;A;AAED;AACA;;;;A;AAEC;A;AAED;AACA;A;;;;;A;AAKC;A;AAEE;A;AACF;A;AAEG;AACJ;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AAKC;A;AAEC;A;AAED;AACA;AACA;AACA;A;AAEE;A;AACF;A;AAEG;AACJ;;;A;AAEC;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAEG;AACJ;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;AACA;AACA;A;;;;;AAWA;AACA;AACC;;;A;AAEC;A;A;AAGA;A;AAED;A;A;;;;;AAME;A;AACF;A;AAED;;;A;AAEC;A;AAEE;;;A;AACF;A;AAEE;;;A;AACF;A;AAED;AACA;AACA;A;;;;;AAKA;AACI;A;AACF;A;AAEA;A;A;A;;;;;AAOF;A;;;;;AAKA;A;;;;;AAUA;A;AAEC;A;AAED;AACA;AACC;;;A;AAEC;A;A;AAGA;A;AAED;A;A;;;;;AAMD;A;;;;;AAKA;AACI;A;AACF;A;AAEA;A;A;A;;;;;AAOF;A;;;;;AAKA;A;;;;;AAUA;A;AAEC;A;AAED;AACA;AACC;;;A;AAEC;A;A;AAGA;A;AAED;A;A;;;;;AAMD;A;;;;;AAKA;AACI;A;AACF;A;AAEA;A;A;A;;;;;AAOF;A;;;;;AAKA;A;;;;;AAUA;A;AAEC;A;AAED;AACA;AACC;;;A;AAEC;A;A;AAGA;A;AAED;A;A;;;;;AAMD;A;;;;;AAKA;AACI;A;AACF;A;AAEA;A;A;A;;;;;A;AAWD;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;A;AA2IC;A;AAED;AACA;;;AACI;AACJ;AACA;AACA;A;;;;;AAeA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;A;;;;;AAII;AACA;A;A;AAGH;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;AACA;A;A;AAGA;A;A;AAGD;A;;;;;A;AAMC;A;A;AAGA;A;AAED;;;A;AAEC;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;AAKG;A;AACF;A;AAED;AACA;;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;AAEE;A;AACF;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;A;AAMC;A;AAED;AAEA;AACA;A;;;;;;;;AAkCA;AACG;;;A;A;;;;;;;A;AAGH;AACA;AACA;AACA;AACA;A;;;;;;;A;;;;;AAKA;AACI;AACD;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAED;A;;;;;AAIA;A;AAEC;A;AAID;AACA;AAEA;A;;;;AAIA;;;A;AAEC;A;AAEE;;;A;AACF;A;AAEE;;;A;AACF;A;AAEE;;;A;AACF;A;AAED;;;;A;AAEC;A;AAEE;A;AACF;A;AAED;A;;;AAKA;A;;;A;AAKC;A;AAED;A;;;A;AAKC;A;AAED;A;;;AAKA;A;;;AAIA;;;;AACA;A;;;AAIA;A;;;AAKA;A;;;AAIA;;;;AACA;A;;;AAIA;A;;;AAKA;A;;;A;AAWC;A;AAED;AACA;A;;;A;AAKC;A;AAED;A;;;AAKA;A;AAEC;A;AAED;AACA;AAEA;A;;;A;AAKC;A;AAED;AACA;A;AAEC;A;AAED;A;;;AAgBA;A;;;AAIA;A;AAEC;A;AAED;AACA;A;;;A;AAuBC;A;AAED;AACA;AACA;A;;;;;AAIA;A;;;;;AAWA;A;AAIC;A;A;AAKA;A;AAIG;;;;;;A;A;AAOD;A;A;AAKA;A;AAGD;AAEI;;;AACH;AADsB;A;AAIvB;AArBuC;A;A;A;AA6BpC;;;A;AAGF;A;A;AAMA;A;A;AAtCsC;A;AA0CzC;A;;;;;AAKA;A;;;;;AAKA;AAKA;AAGI;AAGJ;AAGA;;A;AAEE;A;AAED;AACA;A;A;A;AAKE;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;A;AAGC;A;A;AAGA;A;AAED;AACA;A;AAEC;A;AAGE;A;AACF;A;AAED;A;AAGA;A;A;A;AAID;A;A;AAGA;A;AAED;A;AAEC;A;AAED;A;;;;AAOA;AAGA;;A;AAEE;A;AAED;AACA;A;A;A;AAKE;A;AAGD;A;AAEC;A;A;AAMD;AAGA;A;AAGA;A;A;AAIF;A;;;;AAYA;;;A;AAEC;A;AAED;AACA;A;;;;AAKC;AACA;AACA;A;A;AAII;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;AAEI;AACJ;;;AACA;AACA;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AASA;A;;;;;AAKA;A;;;;AAII;AACD;;A;AACF;A;AAED;A;;;;AAUA;A;;;;;AAKA;AACA;AACA;;;A;AAEC;A;AAED;A;;;;AAIA;;;;A;AAEC;A;AAEG;AACD;;A;AACF;A;AAED;A;;;;AASA;A;;;;;AAKA;A;;;;AAII;AACD;;A;AACF;A;AAED;A;;;;AASA;A;;;;;AAKA;A;;;;AAII;AACD;;A;AACF;A;AAED;A;;;;AAmBA;A;;;;;AAKA;AACA;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;;AAII;AACJ;;;A;AAEC;A;AAEG;AACD;;;A;AACF;A;AAED;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;;;;AASA;A;;;;;AAKA;AACA;;;;;AACK;AACJ;;;A;AAEC;A;A;;AAGF;A;;;;AAIA;AACI;;;AACC;AACA;AACD;;;;A;AACF;A;A;AAIA;A;AAED;AACA;A;AAED;A;;;;AAYA;A;;;;;AAKA;AACA;AACA;AACA;AACA;;;A;AAEC;A;AAED;A;;;;AAIA;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAEG;AACD;;A;AACF;A;AAED;A;;;;AASA;A;;;;;AAKA;A;;;;AAII;AACD;;A;AACF;A;AAED;A;;;;AASA;A;;;;;AAKA;A;;;;AAII;AACD;;A;AACF;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7hEiC;A;;;;;AAGjC;AACA;A;;;;;;AAIA;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;AACA;AACA;;A;AACC;A;AAED;A;AAEC;AACA;AACA;A;A;AAGA;AACA;AACA;A;AAED;A;;;;;;A;AAKC;A;AAED;;;A;AAEC;A;AAED;;AACA;A;;;;AAqBA;;;;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;A;AAEC;A;AAED;AACI;AACA;A;AAEH;AACA;A;A;AAGA;AACA;A;AAED;A;;;;AASkC;A;;;;;AAGlC;A;;;;;AAIA;;;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;AAUkC;A;;;;;AAGlC;A;;;;;;AAIA;;;A;AAEC;A;AAED;AACA;AACA;AACA;;A;AACC;A;AAED;A;;;;;;A;AAMA;;;A;A;AAEE;A;AAED;AACA;AACA;A;A;AAGC;A;AAED;;AACA;A;AAMC;A;AAEC;AACA;;;;A;A;AAGF;A;AAEA;A;A;A;;;;;AA0BD;A;A;AAKE;A;A;AAGD;A;A;AAGA;A;A;AAUA;AACA;AACA;A;AAEA;A;AAEC;A;AAEA;A;AAED;A;AAEA;AACA;AACA;A;AAEA;A;AAEC;A;AAEA;A;AAED;A;A;;;;AAYmC;A;;;;;AAGpC;AACA;A;;;;;AAIA;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;A;AAKC;A;AAED;AACA;A;;;AAII;AACJ;;;;;AACC;A;A;AAEC;;AACA;A;A;AAEA;;AACA;A;A;AAEA;;AACA;A;A;AAEA;;AACA;A;A;;AAGF;A;;;;AAMI;AACJ;;;;;;AACC;;;;;;A;A;AAEC;;;;A;AAEC;A;AAED;AACA;A;A;A;AAEA;;;A;AAEC;A;AAED;AACA;A;A;A;AAEA;;;;A;AAEC;A;AAED;AACA;A;A;A;AAEA;;;A;AAEC;A;AAED;AACA;A;A;;AAGF;A;;;;;AAII;AACJ;AACI;;;AACH;;A;AAD0D;A;A;AAI1D;;A;A;AAEC;;;A;AACC;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;A;AAEA;AACA;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;;AAEA;;;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAEA;A;A;A;A;;AAIF;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;AApDyD;A;AAuD3D;A;;;;ACzYA;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAOA;AACA;A;;;;AAIA;AACA;AACA;A;;;;AAIA;AACA;A;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;AAIA;AACA;A;;;;;ACtD4C;A;;;;;AAeS;A;;;;;;A;ACpCpD;A;AAED;;A;AAEC;A;AAED;;A;AAEC;A;AAED;;;AASA;;;;A;AAEC;A;AAED;AACA;AACA;A;;;;;;;A;AAKC;A;AAED;;A;AAEC;A;AAED;;AAMA;;A;AACC;;A;;AAEA;;A;AAEG;AACJ;;;;;A;AAEC;A;AAED;A;;;;;;;A;ACtDC;A;AAED;;A;AAEC;A;AAED;;;AAOI;AACJ;;;;;A;AAEC;A;AAED;A;;;;;;A;ACMC;A;AAEG;AACJ;;;;AACA;;AACC;AACA;;A;AAEC;A;A;AAGA;A;AAED;;A;AACC;AACA;A;AAEE;;;AAAH;;A;AACC;A;;AAEA;;;;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;A;AAIA;A;AAED;A;;;;;;;ACiBA;;A;;;;;AAsBA;AACA;AACG;A;AACF;A;A;AAGA;A;AAED;AACG;A;AACF;A;AAED;A;;;;;;AC3GA;;;A;AAEC;A;AAED;A;AAIC;A;AAED;AACA;A;AAEC;A;AAEA;A;AAED;AACA;AACA;AACA;AACA;AACA;;;;A;AAEC;A;AAED;;A;AACC;A;AAED;A;;;;;;;A;AAKC;A;AAED;;A;AAEC;A;AAED;;;;;AAUA;;A;AAEC;A;AAEG;AACJ;;;;;A;AAEC;A;AAED;A;;;;;ACxDA;AACA;A;AAEC;A;AAEA;A;AAED;;;A;;;A;AAKC;A;AAED;A;;;;A;A;ACtBC;A;AAEA;A;A;;;;;AAU2C;A;;;;;;AAI5C;;A;;;;;;AAcgD;A;;;;;;AAIhD;;A;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;;;ACnDI;A;AAEH;A;AAEA;A;AAED;;A;AAEC;A;AAED;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdA;A;;;;;AAIA;A;;;AAmBA;A;;;AAKA;A;;;A;AAMC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;AAKA;;;;;;A;AAEE;A;A;;AAGF;A;;;;A;ACjDC;A;AAED;;;;A;;;;;;A;AAKC;A;AAED;AACA;AACA;;;;;;AACC;AACA;A;;AAED;A;;;;;;;AAYA;AACA;AACA;;;;;AACC;AACA;AACA;;;;AACA;;A;AACI;;;A;AACF;A;AAED;;A;A;;AAGF;A;;;;A;AAWC;A;AAED;AACA;A;;;;AAc+B;A;;;;;AAG/B;;;;AACA;;;;AACA;;;;AACA;;;;A;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAUC;A;A;AAGA;A;A;AAGA;A;A;AAQA;A;A;AAGA;A;A;AAwBA;A;A;AAIA;A;A;AAOA;A;A;AAGA;A;A;AAcA;A;A;AAGA;A;A;AAaA;AACA;A;AAGC;A;A;AAGA;A;A;AAOF;A;;;;;AAgEA;A;;;;;;AAOsC;A;;;;;AACA;;;;A;;;;;AAEtC;;AACA;;AACA;A;;;;;AAMA;;;;AACA;;A;AACC;;A;A;AAGA;A;AAED;A;;;;;AAOA;;;;;A;AAEE;A;A;;AAGF;A;;;;A;AAiBC;A;AAED;A;AAEC;A;A;AAKA;A;AAED;A;;;;AAcG;A;AACF;A;AAEE;A;AACF;A;A;A;;A;A;AAOA;AACA;A;AAED;;A;AAEE;AACA;AACA;AACA;A;AAED;AACA;;;;AACA;AACC;AACA;AACA;A;AAEC;AACA;A;A;A;AAIH;A;;AC1Xa;A;;;;;;A;;;;;;;A;;;;;;A;;;;;;;A;;;;;;A;;;;;;;A;;;;;;A;;;;;;;A;;;;;;A;;;;;;;A;;;;AC8Bb;AACA;A;;;;;AAIA;;;;AACA;AACA;AACA;AAEA;;A;AACC;A;A;AAIG;A;AAEA;A;A;AAGD;A;AAEA;A;A;A;A;AASF;AACA;A;AAMD;;;AACA;;;;;;A;AAIC;AACA;A;AAKD;;;;;A;AACC;AACA;A;AAGD;;A;AACC;;A;AAGD;;A;AAOC;A;AAGE;;;A;AACF;A;A;;;;;;;AAOD;;A;;;;;;;;;;AAMA;;A;AACC;AACC;A;A;AAGF;A;AAEC;A;A;A;;A;A;A;;A;A;A;A;;A;AAoBA;A;A;;A;A;A;;A;A;A;A;A;A;;A;A;;A;A;;A;A;A;A;;A;A;;A;A;;A;A;;A;A;A;AAmCA;A;A;A;;A;AAUD;AACA;A;A;A;;A;A;A;;A;A;;A;A;A;;A;AAsBI;;;;;;AACA;AACJ;;;;;AACC;;A;A;A;;A;AAIC;;;;A;A;;A;AAIA;;A;A;A;A;;A;A;AAOC;A;AAEA;A;A;AAGA;A;AAED;;A;A;AAMA;AACA;;A;A;;A;A;A;;A;A;A;A;;A;A;;A;A;A;;A;A;;A;A;;A;;;;;;;;;;AA2CF;;AACA;;A;AAEE;A;A;AAGA;;A;AAEA;A;A;AAGC;AAAH;;A;AACC;AACA;AACA;A;AAED;AACA;A;;;;AAMA;A;;;AAMA;A;;;A;AC5OC;A;A;AAGA;A;AAED;A;;;;;;A;AAUC;A;AAEE;;;;A;AACF;A;A;;A;;;;;;A;AAOA;A;AAED;A;;;;A;AAOC;A;AAED;A;AAEC;A;AAGD;A;A;AAKE;A;AAEA;A;A;AAGF;A;;;;A;AAKC;A;AAEA;A;A;;;;;;;;AAKD;A;A;A;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;AAeA;A;AAEA;;A;AACC;AACA;;;;AACA;;A;AACC;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;;;;;;AAcF;;;;A;AAEC;A;A;AAGA;A;A;AAGD;;A;AACC;;;A;AAEC;A;AAED;;;;;A;AACC;;A;AAED;A;A;AAED;;;;A;AAEC;A;AAGA;AACA;AACA;AACA;AAED;A;A;AAEC;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;AAED;AACA;;;;;AACC;;;;A;AACC;;A;AAED;;;;;A;A;A;AAGE;;A;AAED;A;A;A;A;AAGC;;A;AAED;A;A;A;A;AAGC;;A;AAED;A;A;;AAGF;;A;AACC;;;A;AAED;A;;;;;AAkDI;AACJ;A;;;;;;;;;;A;AAoDC;A;AAED;;AACA;;A;AACI;;;;AAAH;;A;AACC;;;;AACA;AACA;A;A;AAGC;AAAH;;A;AACC;;;;AACA;AACA;;;AACC;;;;;;A;AAEC;A;A;A;A;;;AAIF;A;AAID;AACG;;;AAAH;;A;AACC;AACA;AACA;AACA;;A;AAGD;;;;A;AAEC;A;AAGD;AAMI;;;;AACJ;;A;AACC;;;;A;;AAEA;A;AAGG;AACJ;;A;AACC;;;;A;;AAEA;;;;A;A;AAGA;A;AAGE;;;AAAH;;A;AACC;;AACA;;AACA;A;AAED;A;;;;;;;;;;;;AAQA;;A;AACC;;A;AAGD;AACA;AAQA;AAEA;;;AACC;A;AAEC;A;AAED;;;;AACA;;;;;A;A;A;AAGC;;A;AACC;;A;A;A;;;AAKC;;;;AAGJ;;;;AACA;AACA;AAGA;AACA;AAEA;AACC;;;;;A;AAEC;;;;AACA;AACA;A;A;AAEI;A;AAEH;A;A;AAGA;A;AAEA;A;A;AAGA;A;A;AAOA;A;A;A;A;;;;;;;;AASC;AAEJ;;;;;;AACC;;;;;A;AAEC;;;A;A;AAID;;;AACA;;;A;A;AAIE;A;AAED;A;AAED;AACA;;A;AACK;AACJ;;;;AACA;A;AAGD;;;;A;AAEC;A;A;AAGA;A;A;;A;AAKD;A;AAED;A;;;;;;;;;;;;;AAMA;;;AACA;;A;AACC;;AACA;;A;AACC;A;AAED;;A;AACC;;;AAAe;A;;;A;A;AAGjB;AACA;;;;;;A;A;AAEC;;AACA;;;;A;A;A;AAEA;;AACA;;;;A;A;A;AAEA;;AACA;;;;A;A;A;AAEA;;AACA;;;;A;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;;;;;ACniBD;A;A;;;;;A;A;A;;;;;A;AAQA;AAEI;;;AACH;AACA;AACA;AACA;AACA;AAL6B;A;AAQ9B;A;;;;;A;;;A;AAMC;A;AAEG;;;AACH;AACA;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAV6B;A;AAa/B;A;;;AAeA;A;AAEC;A;AAGD;AACA;AACA;AACI;;;AACH;A;AAKC;AACA;A;AAGA;A;A;AAIC;A;AAED;A;A;AAIC;A;A;AAGA;A;AAED;A;AArBA;A;AAuBD;AA3BuB;A;A;AA8BvB;A;AAGD;A;;;AAYA;AACA;;;;;A;AAEE;AACA;A;A;;A;AAID;A;AAED;A;;;;AAcqC;A;;;;;AAErC;A;;;;;AAE0C;;;;A;;;;;;AAK1C;AACA;;;;;AACC;A;;AAED;;AACC;AACA;;AACA;;;;;AACC;A;A;AAGE;;;;A;AAED;A;A;;AAGF;AACA;A;A;;;;;;;;AAMD;AACA;AACI;;;AACH;;A;AACC;AACA;A;AAH0B;A;AAM5B;A;;;;;;;AAYqC;A;;;;;AACA;A;;;;;AACA;;;;A;;;;;;AAIrC;;;;;AACC;;AACA;;;;A;;AAED;A;;;;;;;;;;;ACpLA;;AACA;AACA;AACG;A;A;;;;;;;;;A;AAGA;A;A;;;;;;;;;A;AAGH;;;AACA;AACA;AACA;AACA;A;;;;;;;;;A;;;;A;AAMC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AAIG;;;A;AACF;A;AAGD;AACA;AACC;;;;A;AAEC;A;AAEG;AAIJ;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;A;;;;;;AAKE;;;A;AACF;A;AAGD;AACG;;;A;AACF;A;AAED;A;AAEC;A;AAED;;;;A;AAEC;A;AAEG;AACJ;;;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AAKA;AACA;;;;;;A;AAEC;A;AAED;;;;;AACC;;;;AACA;AAEA;;;;A;AAEC;A;AAEE;;;;AAAH;;A;AACC;;A;AAEG;AACA;AACD;;AAAH;;A;AACC;;;;;A;;AAEA;;;;;A;AAED;;A;AAEC;A;AAEE;A;AACF;A;A;AAGA;;A;AAED;A;AAED;A;;;;;AAKA;;A;AAEC;A;A;AAUA;A;A;AASA;A;AAEC;A;AAED;A;AAGD;A;;;;AAIA;AACC;;;AACA;;A;AACC;;A;A;AAOA;A;A;AAOA;A;AAEE;A;AACF;A;A;A;;;;;;;AAYE;AACJ;AACA;AAEA;;;A;AAEC;A;AAED;AAMI;;;AACC;;;;AACH;AAEA;;;;;AACA;;A;AACC;;AAKG;;;AAAH;;;;;A;AACC;A;AAIE;;A;AACF;A;AAhB2B;A;A;AAwB7B;;A;AACC;;A;AAGD;AACA;;A;AA7B6B;A;A;AAiC7B;;A;AAEC;A;AAnC4B;A;AADD;A;AAwC9B;A;;;;;;;AAsBA;;AACA;;A;AACC;;A;AAED;AAIA;A;;;;;;;;AAOA;A;AAIC;A;AAED;AAEA;A;AAEC;A;AAED;AAEI;AACD;;;;AAAH;;A;AACC;;A;A;AAGA;A;AAGD;;AACA;AACA;AACA;A;;;;;;;;AAIA;A;AAEC;A;AAEA;A;A;;;;;;;AAKD;;A;;;;;;;;AAIA;;A;AAMC;;A;AAED;AACA;AACA;AACA;AAEC;AACA;AACA;AAED;;;;;AACC;;;;;A;AAEC;A;AAEE;;;AAAH;;;;;A;AAGC;A;A;;A;AAID;A;AAEE;;;A;AAIF;A;AAED;A;;;;;A;AASC;A;A;AAGA;A;AAED;A;;;;A;AAMC;A;AAID;AACA;A;AAEC;A;A;AAKA;A;AAGD;AACA;AACA;AAGA;A;AAGC;A;AAGD;;;;;A;AAEE;A;A;;A;AAKD;A;AAED;A;;;;;AA0BG;;;A;AACF;A;AAED;A;;;;;;;;AAcA;;A;AAEC;;A;AAEC;A;A;AAGF;;;;A;AAEC;A;AAED;AACA;;;;;AACC;A;;AAED;A;;;;;;;AAKA;;;;;;AACC;;;AACG;A;AACF;AACA;A;A;;AAGF;AACA;A;;;;;;;;AAMA;;;AACA;;;;AACA;A;;;;;;;;;;;;;;;AAIA;;A;AACC;;A;A;;;;;;;A;A;AAKD;;A;A;;;;;;;;A;AAIA;AACA;AACA;AACA;AAMA;AACA;AACI;AACJ;;;;;AACC;;;;;AACC;AACA;;;AACC;;;;;A;AAEA;A;;;A;;AAGF;AACA;;;;AACC;;AACA;;A;AACI;;;AAAH;;;;;;A;AAEC;AACA;A;A;AAGA;A;AAED;;A;AAmBD;;AACC;;;A;AAEC;A;A;AAOA;A;A;A;AAIA;;;A;AAEC;AAKA;A;AAED;A;AAGA;;;A;AAEC;AAKA;A;AAED;A;AAGG;A;AACF;AAKA;A;AAED;A;A;AAGA;A;A;A;;A;AAQF;AACA;A;A;AAGA;A;A;;AAGC;;;A;AAIF;A;AAED;AACA;;A;AACC;;A;AACC;;A;A;A;;;;;;;A;A;A;;;;;;;A;;;;;;;AAWF;;;AACA;;;;AACA;A;;;;;;;AASA;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;;;;;A;AAEC;A;AAEG;AACJ;AACC;;;A;AAEC;A;A;AAGA;A;A;AAOA;A;AAED;;;A;AAEC;A;AAMD;A;AAGD;A;;;;;;ACprBA;AAKA;;;;AACA;;A;AACC;AACA;;AACA;AACA;A;AAED;AACG;;;;AAAH;;A;AACC;;A;;AAEA;AACA;;AACA;AACA;A;AAEG;;;;;;AACH;;A;AADoC;;;;;A;AAKpC;AACA;;A;AANoC;;;;;A;A;A;A;A;AAgBjC;A;AACS;;A;AACT;A;A;A;A;A;AAMD;A;A;AAID;AACI;;;AACH;AADiC;A;A;AAKlC;;;;;A;AAGE;;A;AAEC;A;AAEA;A;AAED;A;AAEA;;A;AAEC;A;AAED;A;AAEA;;A;AAEC;A;AAED;A;AAEA;A;AAEA;A;A;;A;AAQF;A;AAGA;A;AAtEmC;;;;;A;AA0EpC;A;AAED;;A;AACC;;A;AAED;A;;;;;A;AASC;A;AAED;A;;;;;AAIA;;;;A;AAGC;A;AAEE;A;AACF;A;AAED;A;;;;AAIA;A;;;A;AAKC;A;AAED;A;;;AC3JG;;A;AACF;A;AAED;A;;;ACRG;;;A;AACF;A;AAED;A;;;ACiBA;AAUA;A;;;;AAIA;A;;;;;AAIA;AACA;AACA;A;;;;;;AAII;;;;AACJ;;A;AACC;;A;AAED;;A;AACC;;A;AAED;A;;;;;;;;;;;;;;AAOO;;A;AACP;;;;A;A;A;AAEC;;;;;A;A;;;;;;;A;A;AAKG;A;A;;;;;A;AAGH;A;;;;;A;A;A;;;;;A;A;;;;;A;A;;;;;A;A;AAeE;A;A;;;;;A;AAGA;;;A;AACF;AACA;A;AASD;;A;AAGC;AACA;AACA;;;AACC;AACG;;AAAH;;A;AAOC;AACA;;A;A;;;AAGF;;;AACC;;;;;;A;AAKC;AACA;AACA;A;A;A;A;A;A;;;A;AAOH;AASI;AAAH;;A;AACC;;;;;A;A;;;;;;;A;A;A;;;;;A;AAOD;;;;A;A;;;;;A;AAIO;A;A;A;A;;;;;A;AAQH;;;A;A;;;;;A;A;A;;;;;A;AAMJ;A;A;;;;;;;;AAKD;AACA;;A;;;;;;;AAIA;;AACA;AACA;A;;;;;;;AAIA;;A;;;;;;;AAIA;;A;;;;;;;;;AAIA;;;;AACA;A;;;;;A;;;;;;;;;;AAKA;;;;;AACA;A;;;;;;;A;;;;;;;;;;;;AAKA;;;;;;;AACA;A;;;;;;;;;;;A;;;;;;;;;AAKA;;;;AACA;A;;;;;A;;;;;;;;;AAKA;;;;AACA;A;;;;;A;;;;;;;;;;AAKA;;;;;AACA;A;;;;;;;A;;;;;;;;;AAKA;;;;;;A;A;AAGE;A;A;;;;;A;AAKC;;;AAAH;;A;AACC;;A;;;;;A;AAGE;AAAH;;A;AACC;;A;;;;;A;AAGD;;AACA;;;;;A;;;;;A;;;;;;;;;AAKA;;;;;A;A;AAGE;A;A;;;;;A;A;;;;;;;;;A;;;;;;AASF;A;;;;;AAIA;A;;;;;AAIA;A;;;;ACzQI;AACA;AACJ;A;AAEC;;;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AAyBA;AACA;A;AAGC;A;AAED;;;;;A;AAEC;AACA;A;AAGD;AACA;AACI;AACD;;;A;AACF;A;AAEG;;;;;;AACA;A;AAEF;A;AAED;AACA;;A;AANoC;;;;;A;AASpC;AACA;;A;AAVoC;;;;;A;AAahC;;;AACH;AACA;AACA;AACA;AACA;AACA;AANuB;A;AAbY;;;;;AAuBrC;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AAKA;AACA;AACA;A;AAIC;AACA;AACG;;;A;AACF;AACA;AACA;A;A;AAGF;A;;;;;AAKA;AACA;AACA;AACA;A;AAEC;A;A;AAGG;;;A;AACF;AACA;AACA;A;A;AAGF;A;;;;;AChFA;AACA;;;;;;A;A;AAGG;A;AAED;A;A;;A;AAID;A;AAED;A;;;;;;A;AAOC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAOC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAgGA;AACA;AACA;A;AAEC;A;AAED;AACA;;A;AACK;AACD;;;;A;AACF;A;A;AAGF;AACA;AACA;;;;;AACC;AACG;;A;AACF;A;A;;A;;;;;;;;A;AAOD;A;AAED;AACA;AACA;AACA;;;A;AAEC;A;AAED;A;;;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;;;A;AAEC;;A;AAED;A;;;;;;AC5NA;;;;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;AACA;;;;;AACC;;;A;A;AAEC;;A;AACC;;A;AAED;AACA;AACA;AACG;;;A;AACF;AACA;A;AAED;;;;;;AACI;;;A;AACF;AACA;A;A;;AAGF;A;AAEC;A;A;A;;AAIH;A;;;;AAII;A;AAEH;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;AAOA;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;AACA;;;;;AACC;A;A;A;AAGE;;A;AAEG;AACJ;A;A;AAEC;A;A;AAEA;AACA;A;AAEG;AACJ;A;A;AAEC;A;A;AAEA;AACA;A;A;AAGA;A;A;A;;AAIH;A;;;;;ACvGA;;;A;AAEC;A;AAED;;A;;;;;AAMA;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;AACA;;;;;AACC;A;A;A;AAGE;;A;AAEG;AACJ;A;A;AAEC;A;A;AAEA;AACA;A;A;AAGA;A;A;A;;AAIH;A;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AAQA;AACA;AACA;AACA;AACA;AACA;A;;;;A;AAQC;A;A;AAGA;A;AAED;AACA;AACA;AACI;;;A;AAEF;AACA;AAHiB;A;A;AAMlB;AACA;AAPkB;A;AASnB;A;;;;;AAwBA;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAMA;A;;;;;AAMG;A;AACF;A;AAED;A;;;;;AAMG;A;AACF;A;AAED;A;;;;;AAYA;A;;;;AAUI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;;A;AAOC;A;A;AAMA;A;AAED;A;;;;;A;AAOC;A;A;AAGA;A;AAED;A;;;;;AAcG;A;AACF;A;A;A;AAIA;A;AAEA;A;AAEA;A;A;;;;AAKD;;;;;A;AAEE;A;A;;AAGF;A;;;;A;AAMC;A;A;AAGA;A;AAED;A;AAEC;A;AAED;AACI;;;AACH;AADkB;A;AAGnB;A;;;;A;AAQC;AACA;A;AAEA;AACA;AACA;A;AAGD;AACA;AACA;AACA;A;;;;AAUA;A;AAGC;A;AAIE;A;AAEF;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;A;A;AAGA;A;AAID;AACA;AACI;;;AACH;AACA;;AACC;A;A;AAGA;AACA;AACA;A;AARuB;A;A;AAaxB;AACA;A;AAID;AAGI;;;A;AAEF;AACA;A;AAEC;A;A;AAGD;A;AAED;AAVwB;A;AAYzB;A;;;;AAIA;AACA;;;;;;AACC;;;;A;;AAED;A;;;A;AAOC;A;AAED;A;;;;A;AAQC;A;A;AAGA;A;AAED;A;;;;;A;AAOC;AACA;A;AAED;AACA;A;AAEC;A;AAED;AACA;A;;;;A;AAQC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;AAQA;A;;;;AAMI;AACJ;;;;;;A;AAEE;AACA;;A;AAID;;AACC;AACA;A;A;AAIA;A;AAEG;A;;A;AAEF;A;AAFsB;A;AAKxB;A;AAED;A;;;;;;AAOA;;;;A;A;;;;;A;AAIA;A;;;;;A;AAMC;A;AAED;A;;;;;;AAIG;A;AACF;A;A;;;;;A;A;AAKD;A;A;A;A;;;;;A;A;A;AAQE;A;A;A;;;;;A;AAKF;A;;;;AAKA;;;AACG;A;AACF;A;AAED;A;AAEC;A;AAEG;;;A;AAEF;A;AAFiB;A;AAKnB;A;;;;;AAIkC;A;;;;;AASlC;;;A;AAEC;A;AAED;A;AAEC;A;AAED;A;;;;AAKI;AACA;;;A;AAGF;A;A;A;AAIC;A;AAED;A;AAED;;;;A;AAEC;A;AAED;AACA;AAhBwB;A;A;AAmBxB;A;AAED;A;;;AAMA;;;AACA;A;;;;AAMA;AACA;A;AAIC;AACA;A;A;;A;A;AAQD;AACA;;AAEC;;;;A;A;;A;A;A;A;;A;A;A;;A;AAeC;A;A;;A;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAID;AACA;AACA;AAGA;A;AAEC;A;A;A;;A;AAOD;A;A;A;;A;AAOC;AACA;A;AAEC;A;A;A;A;A;;A;A;A;A;;A;AAeF;AACI;;;AACH;AAD8B;A;AAG3B;;;AACH;AADyC;A;A;A;;A;A;;A;;;AAgBvC;;;A;A;AAGF;A;AAEA;A;AALsB;A;AAQxB;A;;;;AAMI;;;A;A;AAGF;A;AAEA;A;AALsB;A;AAQxB;A;;;AAYA;A;AAEC;A;AAED;;;;AACA;AACA;A;AAEC;AACA;A;AAED;;;;A;AAEC;A;AAED;AACA;A;;;;;ACrrBmC;A;;;;;A;AAIlC;A;AAED;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AA8CC;A;AAED;;A;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;;;;;;A;A;;;;;;;;;;;A;AAcA;;;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;;;;A;A;;;;;;;A;AAaA;;;;;A;AAEC;A;AAED;A;;;;;AAGmC;A;;;;AC3LnC;;;;A;A;AAEC;A;A;AAEA;;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;A;AAED;;A;;;;;;AAIA;A;;;;;;AAMI;AACJ;;;;;AACA;;;;A;A;AAEC;AACA;A;A;A;AAEA;;A;AAED;A;;;;;A;AAKC;A;AAED;A;AAEC;A;A;AAGA;A;AAED;AACA;A;;;;;;;;;;AAII;AACJ;;;;;;;AACA;;;;A;A;AAEC;A;A;A;AAEA;;A;AAED;A;;;;;;;A;AAKC;A;A;AAGA;A;AAED;;;;A;AAEC;A;AAED;;A;;;;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;AAUA;;;;A;A;;;;;;;A;A;;;;;;A;;;;;;;AAQA;;;;;A;AAEC;A;A;A;A;AAKA;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;AClGA;AACA;A;;;;;AAcA;AACA;A;;;;AAQA;A;A;AAEC;A;A;AAEA;A;A;AAEA;A;AAED;A;;;;;;;AA2CI;AACJ;;;;;;AACC;;A;AAEC;AACA;A;AAEA;A;A;;AAGF;A;;;;;;AAQI;AACJ;;;;;AACC;;;;;A;AACC;;A;A;;AAGF;;A;AACC;;A;AAED;A;;;;AAKA;A;;;AAKA;A;;;;;;;AAiBA;;;;;A;;;;;;;A;AAGA;;;;AAGA;AACA;;A;A;;;;;;A;AAIA;;A;AAEC;AACA;;A;A;;;;;;A;A;AAIA;;;A;A;;;;;;A;A;;AAQC;;A;A;;;;;;A;A;;;;;;A;A;AAKD;AACA;;;;A;;AAEA;AACA;;A;A;;;;;;A;A;AAID;;A;A;;;;;;A;AAGA;;A;A;;;;;;A;AAIA;A;;;;;;;A;;;;;;;AAOG;A;AACF;;;;A;AAEA;A;AAED;A;;;A;AAYC;A;AAED;A;;;;;;;;AASC;AACA;;;;AACA;A;AAGD;;;A;AACC;;A;AACI;;;;;A;AACF;A;AAEE;;;;A;AACF;A;A;A;A;A;AAKD;A;A;;AAGD;A;A;AAED;;A;A;AAGE;A;AAEA;A;AAEA;A;AAEA;A;A;AAGF;;A;AACC;;A;AAID;;;;A;AAEC;A;A;AAOA;A;AAGG;A;AAEH;A;A;AAGA;A;AAED;;A;;;;;A;AAKC;A;AAED;A;;;;;ACtRA;;;;A;AAEA;;;A;A;A;AAEC;;AACA;A;A;AAEG;A;A;AAcH;A;AAED;;;;;AACC;;;;AACA;;A;AACC;;A;AAED;AACA;AACA;;;;AACA;;A;AACC;;A;AAEE;;A;AACF;;A;A;AAGA;A;AAEA;A;A;;A;;;;;;;;;A;A;A;;;;;A;A;;;;;A;AAoDF;;;;;;;A;AACC;;;;;;A;A;;;;;A;A;A;;;;;A;A;;;;;;A;AASD;;;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAQA;;;;;A;AACC;;A;AAED;;;;A;;;;;A;;;;;A;AAMA;;;A;A;AAEE;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;A;AAaC;A;AAID;A;AAEC;A;AAED;;AACA;AACA;A;A;AAED;A;;;;ACrHI;AACJ;AACA;AACA;;;A;AAEC;A;AAED;A;;;;;A;A;AAaC;A;AAEA;A;AAGE;;;A;AACE;AACJ;AACA;AACG;;;A;A;;;;;A;A;A;;;;;A;;;;AAoDoC;A;;;;;AACA;A;;;;;A;AAIvC;A;AAED;A;;;;;;;;AAcA;;A;A;;;;;;A;AAGG;;A;A;;;;;A;A;;;;;A;;;;;;;;;;;;AAyBH;;A;AACC;;A;AAEE;;;A;AACF;A;AAED;;;AACA;;A;AACC;A;AAKD;AACG;;;A;AACF;A;AAOD;;;;AAEA;AACA;;;AACC;AACA;;;A;;;;;A;AAGA;A;AAGD;;;;;;A;AASC;;;A;AACC;A;;AAEA;;;AACC;;AACA;A;;;A;AAGF;;;AACA;;A;AACC;A;AAED;A;AACI;AACJ;AACA;;A;AACC;;AACA;A;AAED;A;A;;;;;;A;AAQA;A;AAED;A;AAEC;AACA;AACA;A;AAED;A;;;AAKA;AACA;;;;;;AACC;A;;AAED;A;;;;;;;AAUA;;;AACA;;A;AACC;;;;A;A;;;;;A;A;A;A;;;;;A;A;;;;;A;;;;;;;;;A;;;;;A;;;;;;;;;;A;;;;;;A;;;;;;;AAwED;;A;;;;;;;AAUA;;A;;;;;;;AAUA;;A;;;;;;;;;A;;;;;A;;;;;;AC1WA;;;;A;AAEC;A;AAED;AAEI;;;;;;AAEA;A;AACF;A;AAED;AACA;;A;AANoC;;;;;A;AASjC;;;A;AACC;;A;AACF;A;AAED;;;;;AACI;;A;AACF;A;A;;A;AAfiC;;;;;A;;;;;;AAyBrC;AACA;A;;;;;;AASI;AACA;AACJ;;A;AACC;;;;A;;AAEI;AACJ;;;;A;A;AAGA;A;AAED;A;;;;;;;;;AAIA;;;A;AAEI;;;;A;A;;;;;A;AAIH;A;A;;;;;A;;;;;;;;;AAMD;;A;A;;;;;A;AAGA;;;A;AAEI;;;;A;A;;;;;A;AAIH;A;AAED;;;;A;;;;;A;;;;;;;AAKA;;;;;;A;AACI;;;;AAAH;;A;AACC;;A;AAGI;;;;A;AACF;A;A;AAGF;A;A;AAGF;;A;;;;;;;AAIA;;;;;;A;AACI;;;;A;AACF;A;A;AAGF;;A;;;;;;;AAII;A;AAEH;A;AAEA;A;AAED;;;;;A;AAEC;A;AAEG;AACA;AACJ;AACC;;;A;AAEC;A;A;AAGA;A;A;AAOG;A;AACF;A;AAMD;A;A;AAGA;A;AAED;;;A;AAEC;A;AAMD;A;AAED;AACA;A;;;;;;;AAIA;;;;;A;AAEC;A;AAEG;AACJ;AACC;;;A;AAEC;A;A;AAGA;A;A;AAOG;A;AACF;A;AAMD;A;AAED;;;A;AAEC;A;AAMD;A;AAGD;AACA;A;;;;;;;AAIA;;;;;A;AAEC;A;AAEG;AACJ;AACC;;;A;AAEC;A;A;AAGA;A;A;AAOG;A;AACF;A;AAMD;A;AAED;;;A;AAEC;A;AAMD;A;AAED;A;;;;;;;AAIA;;;;;A;AAEC;A;AAEG;AACJ;AACC;;;A;AAEC;A;A;AAGA;A;A;AAOG;A;AACF;A;AAMD;A;AAED;;;A;AAEC;A;A;AAOA;A;AAEA;A;A;AAGF;A;;;;;;;AAIA;;;;;;A;AACI;;;;A;AACF;A;A;AAGF;;A;;;;;;A;AC/SC;A;AAED;AACA;;;;;;A;AAEE;A;AAED;AACA;A;;AAED;A;;;;;ACgJ0B;A;;;;;;A;AAOzB;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;A;AAEC;A;AAED;A;;;;;;A;AAQC;A;AAED;A;;;;;A;AAQC;A;AAED;A;;;;;A;AAMC;A;AAEE;A;AACF;A;AAED;A;;;;;A;AAMC;A;AAEE;A;AACF;A;AAED;A;;;;;A;AAMC;A;AAEE;A;AACF;A;AAED;A;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;;;AAWA;;;;A;AAEC;A;AAED;A;;;;;A;A;AA4GC;A;AAEA;A;AAEA;A;A;;;;;A;AAmCA;A;AAED;A;AAEC;A;AAED;;A;AACC;;A;AAED;;A;A;AAEE;A;AAEA;A;AAED;;A;AAED;;AACA;A;;;;;;;AAmBG;;;AAAH;;A;AACC;;;AACA;;;;A;AAED;;;AACA;;;;A;;;;;;;A;AAWC;A;AAGE;;;AAAH;;A;AACC;;;AACA;;;;A;AAED;;;AACA;;;;A;;;;;;AAaqC;A;;;;;A;AASpC;A;AAED;A;AAEC;A;AAED;A;;;;;AAGsC;A;;;;;AACA;A;;;;;AAIS;A;;;;;AACA;A;;;;;AACA;A;;;;;A;AAkC9C;A;AAED;A;AAEC;A;AAED;AACA;A;;;;;AAMmC;A;;;;;AAKE;A;;;;;;;A;;;;;A;;;;;;;;AAuDlC;;;AAAH;;A;A;;;;;A;AAGA;;;;;AACC;;;;AACA;A;AAEC;A;;;;;A;A;;AAIF;A;;;;;A;;;;;;;AAKA;;AACC;AACA;AACA;AACA;A;A;AAGA;A;AAED;A;;;;AAIA;;AACC;A;AAEC;AACA;A;AAED;AACA;A;A;;;;ACjpBD;;;;;;A;AAEE;A;A;;AAGF;A;;;;;A;AAgBC;A;AAEG;A;A;AAGH;A;AAEA;A;AAGA;A;A;AAGA;A;AAED;A;;;;;AAIA;;;;A;AAEC;A;AAED;AACA;;A;;;;;;AAIA;;;;A;AAEC;A;AAED;AACA;;;AACC;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;AACA;AACC;A;AAEC;A;AAED;AACI;A;AAEH;AACA;A;AAEA;AACA;A;AAEG;AAEJ;;A;AACC;A;AAEC;A;AAEG;AACJ;;;;A;AAEC;A;AAED;A;A;AAGA;A;AAED;A;AAKD;A;;;AAED;A;;;;;;;;AAKA;;AACC;A;AAEC;AACA;A;A;AAGA;A;AAED;A;AAEC;A;AAED;AACA;AAKA;A;;AAED;A;;;;;;ACvIwB;;A;;;;;;;;;AAGxB;AACA;AACI;;;A;AAEF;AACA;AAEA;AACA;AACA;AACA;AACA;A;AATwB;A;A;AAczB;AACA;AACA;A;AAED;A;;;;;;;;AAIG;;;A;AACF;A;AAED;;A;AACC;AACA;;;;A;AAEC;A;A;AAGA;A;A;AAGF;;;AACA;A;;;;;;AAIA;;;;A;AAEC;A;AAED;A;;;;;;;;AAIA;;;;A;A;;;;;;;A;A;;;;;;;;;A;;;;AAeA;AACI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AAKA;AACA;AACA;AACI;;;A;A;AAGD;AACA;A;AAED;A;AANsB;A;A;AAUvB;AACA;A;AAED;A;;;AAGmC;A;;;;;;AAQnC;AACI;;;AACH;A;A;;;;;;;A;AADoD;A;A;A;;;;;;;A;A;;;;;;;A;;;;;;AAerD;AACI;;;A;AAEF;AACA;A;AAEA;AACA;A;AAEA;AACA;A;AAEA;A;A;A;;;;;;;A;AAXqB;A;A;A;;;;;;;A;A;;;;;;;A;;;A;AAsCtB;A;AAED;A;;;A;AAMC;A;AAEG;AACJ;AACA;;AACC;AACA;AACA;AACA;A;AAGD;AACA;A;;;A;AAMC;A;AAEG;;;AACH;A;AAEC;A;AAHkB;A;AAMpB;A;;;AAKA;AACI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AAKA;AACI;A;;A;AAEF;A;AAFe;A;AAKjB;A;;;AAKA;;;;;;A;AAEE;A;A;;A;;;A;AAQD;A;AAED;A;;;AAKA;;AACC;A;AAED;;AACC;A;AAED;A;;;AAKA;A;;;AAMG;A;AACF;A;AAED;A;;;;AAOA;;AACC;AACA;;A;AACC;;A;AAED;AACA;AACG;;A;AACF;A;A;AAGF;A;;;;;AAMA;AACA;;AACC;AACA;;A;AACC;;A;AAEE;AAAH;;A;AACI;;A;AACF;A;A;AAGF;A;AAED;A;;;;AAYA;A;;;AAMA;A;;;AAKA;A;;;A;AAOC;A;AAEG;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;;;;AAIA;AACA;AACC;;;;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;;AAaD;;AACI;;;A;AAA+B;A;A;AAIlC;A;AAJkC;A;A;AAQlC;AACA;;;;;;;A;AAEE;A;A;;AAGF;A;AAED;A;;;;;;A;A;;;;;A;AChXA;A;AAEC;A;AAEA;AACA;A;AAEG;AACJ;;;;;;A;AAEE;A;A;;;;;A;A;AAKA;AACA;A;AAED;AACA;A;AAEC;AACA;A;AAED;A;;A;AAGA;A;AAEA;A;AAEA;A;A;AAGA;A;A;;;;;A;;;;AC3CD;;;;A;AAEC;A;AAED;AAEI;;;;;;AAEA;A;AACF;A;AAED;AACA;;A;AANoC;;;;;A;AASpC;AACA;;;;AACA;;A;AAXoC;;;;;A;AAcpC;AACA;;;A;AAEC;AACA;A;AAEG;;;A;AAEF;A;AAFsB;A;AApBY;;;;;A;;;;;;;;AA8BrC;A;;;;A;;;;;AC3B6B;A;;;;;;A;AAI5B;A;AAED;;AACA;A;AAEC;A;AAED;A;;;;;;;A;AAKC;A;AAED;;AACA;A;AAEC;A;AAED;A;;;;;;;A;AAKC;A;AAED;;AACA;A;AAEC;A;AAED;A;;;;;AAIA;A;;;;AAQA;A;;;;;AAIA;A;;;;AAIA;A;;;;;;A;;;;;;;A;;;;;;AC7DA;;;;A;A;;;;;A;AAIG;;AAAH;;A;AACC;;A;;;;;A;AAGE;;;AAAH;;A;AACC;;A;;;;;A;AA0BD;;A;A;AAEC;;;A;AACI;;AAAH;;A;AACC;;A;;;;;A;A;;;;;A;AAKE;;AAAH;;A;AACC;;A;;;;;A;A;;;;;A;A;A;AAMA;;AAAH;;A;AACC;;A;;;;;A;A;;;;;A;;;;;A;A;AASA;A;A;A;AAIA;A;A;AAGA;A;AAED;A;;;;;A;A;A;A;AAQE;A;AAEA;A;AAEA;A;A;A;A;AAKA;A;AAEA;A;AAEA;A;A;AAGF;;AAAqC;A;A;;;;;;AAIrC;;A;AACC;;;A;AAEC;A;AAEG;AACJ;;;A;AACC;;A;A;AAEA;;A;AAEE;;A;AACF;A;A;AAGE;AACA;AACJ;;A;AACI;;;;AAAH;;;A;AACC;A;AAEG;;A;AACF;A;A;A;AAIC;AACA;AACJ;;A;AACI;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAED;A;;AAEG;A;AACF;A;A;AASF;;AACA;;A;AACC;;;;;A;;AACS;;AAAH;;A;AACN;;;;;A;;AAEA;;A;A;AAED;A;;;;;;;AAII;AACD;A;AACF;A;AAEG;AACD;;;;A;AACF;A;AAED;;A;AACC;;;A;AAEC;A;AAEE;;;;;;A;AACF;A;A;AAGC;;A;AACF;A;AAEE;;A;AACF;A;AAEE;A;AACF;A;AAED;;AACA;;AACA;A;;;;;;;;AAIA;A;A;A;AAUK;A;AACF;A;AAED;A;A;AAGC;A;AAEA;A;AAED;A;A;AAGE;AACA;AACD;;;;A;AACF;A;AAED;;A;AACC;;;A;AAEC;A;AAEE;;;;;;A;AACF;A;A;AAGC;;A;AACF;A;AAEE;A;AACF;A;AAED;;AACA;;AACA;A;;;;;;A;A;A;ACtOE;A;AAEA;A;A;AAGF;;;A;AAIC;A;AAGD;A;;;;AAKA;A;;;AAMG;A;AACF;A;AAMD;A;;;A;ACpCC;A;AAED;A;;;;AAqFA;;AACA;AACA;A;;;;;AAIA;;AACA;AACA;A;;;;;AAIA;;AACA;AACA;A;;;;;;AAII;A;AAEH;AACA;A;AAEA;AACA;A;AAED;;AACA;AACA;A;;;;ACxHA;A;;;;ACUA;AACA;;;;A;AAEC;A;AAED;A;AAEC;A;AAEE;AAAH;;A;AACC;;AACA;A;AAED;A;;;;;ACToC;A;;;;;A;AAInC;A;AAED;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AA2CC;A;AAED;;A;;;;;;A;AAMC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAiBC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAMC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AASC;A;AAEE;;A;AACF;A;AAED;A;;;;;;AAIA;AACA;;AACA;A;;;;;A;AAwCC;A;AAED;;A;;;;;;A;AAOC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAOC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;AAMmC;A;;;;;A;AAMlC;A;AAEE;A;AACF;A;AAED;A;;;;;;;;A;A;;;;;A;AAcA;;;;A;A;;;;;A;AAIA;A;;;;;;ACtSA;;;;A;A;AAEC;A;A;AAEA;;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;A;AAED;;A;;;;;;AAIA;A;;;;;;AAIG;;;;A;AACF;A;AAEE;;;;A;AACF;A;AAED;;A;;;;;;;AAIA;;A;AACC;;A;AAED;;A;;;;;;;AAIA;;;;AA0BI;;;AACH;;A;AACC;;A;AAED;;;;AAJ2G;A;A;AAQ3G;A;AAED;;A;;;;;A;AAMC;A;A;AAYA;A;AAED;AACA;AACA;A;;;AAIG;;;A;AACF;A;AAEE;;;A;AACF;A;AAED;A;;;;AAGkC;A;;;;;;AAGlC;;;;A;AAEC;A;AAED;;A;;;;;;;AAIA;;A;;;;;;;AAIA;;;;A;AAEC;A;AAED;A;;;;;;AC1IA;AACA;AACG;;A;AACF;A;AAED;;AACA;AACA;A;;;;;ACTA;;AACA;AACA;A;;;;;ACeoC;A;;;;;A;AAInC;A;AAED;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AA2CC;A;AAED;;A;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;;;;;;A;A;;;;;;;;;;;A;AAcA;;;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;;;;A;A;;;;;;;A;AAeA;;;;;A;AAEC;A;AAED;A;;;;;AAGqC;A;;;;A;A;A;AAapC;A;A;AAGA;A;AAED;AACA;;;;A;AAEC;A;AAED;A;;;;;;AC5MA;;;;A;A;AAEC;A;A;AAEA;;A;AAED;A;;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;A;AAED;;A;;;;;;AAIA;A;;;;;;AAII;AACJ;;;;;AACA;;;;A;A;AAEC;A;A;A;AAEA;;A;AAED;A;;;;;;;;;;;;AAII;AACJ;;;;;;;AACA;;;;A;A;AAEC;A;A;A;AAEA;;A;AAED;A;;;;;;;A;AAKC;A;A;AAGA;A;AAED;;;;A;AAEC;A;AAED;;A;;;;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;AAUA;;;;A;A;;;;;;;A;A;;;;;;A;;;;;;;AAQA;;;;A;AAEC;A;AAED;A;;;;;;AC3EA;A;;;;;A;AAKC;A;AAED;A;;;;;AAIA;A;;;;;A;AAKC;A;AAED;A;;;;A;A;AAYC;A;AAEA;A;A;;;;;A;AAcA;A;AAED;;A;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAOC;A;AAEE;;A;AACF;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;;;;;;A;A;;;;;;;;;;;A;AAcA;;;;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;A;AAMC;A;AAED;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;;;;A;A;;;;;;;A;AAaA;;;;;A;AAEC;A;AAED;A;;;;;AAGuC;A;;;;AC/KnC;A;A;AAGH;A;AAEA;A;AAEA;A;AAEA;A;A;AAID;;;A;AACC;;;;;A;AACC;A;AAED;;;;;A;AACC;A;A;AAGA;A;A;A;A;;AAID;A;A;AAGD;;;;A;AAEC;A;AAED;A;;;;AAIG;;;A;AACF;A;AAED;A;;;AAIG;;;A;AACF;A;AAED;A;;;AAIG;;;A;AACF;A;AAED;A;;;A;A;AAMC;A;AAEA;A;AAEA;A;AAEA;A;A;;;;AAKD;A;;;;;A;AAKC;A;AAED;A;;;;;AAIA;A;;;;;;AAII;AACJ;;;;;AACA;A;A;A;AAGE;A;A;AAGF;A;;;;;;;;;;;;AAII;AACJ;;;;;;;AACA;A;A;A;AAGE;A;A;AAGF;A;;;;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;AAED;AACA;;A;;;;;;;;;;A;A;;;;;;;A;AAOI;A;A;A;;;;;;;A;AAKH;A;A;;;;;;A;;;;;;;AAMD;;;;A;AAEC;A;AAED;A;;;;;;;A;AC9IC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;;;AAIA;;;;AACA;A;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;A;A;A;A;A;A;;;ACRC;;A;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACS+B;;A;;;;;;;AAOhC;;;AACA;;;;A;;;;;;;AAQA;;;AACA;;;;A;;;;;A;AAMC;A;AAEA;A;AAEA;A;AAED;A;;;A;AAMC;A;AAEA;A;AAEA;A;AAED;A;;;;AAkBA;A;;;;;AAMA;A;;;;A;AAWC;A;A;A;A;AAeC;A;A;A;A;AAMD;A;A;A;AAWC;A;AAKA;A;AAOA;A;AAIA;A;AAKA;A;A;A;A;A;AAaA;A;A;AAKF;A;;;AASA;A;;;;AAkBA;AACA;AACI;;;A;A;AAGF;A;AAEC;A;AAEC;A;AAED;A;A;AASA;A;A;AAUA;A;AAEC;A;A;AAGF;A;AAEA;AACA;A;A;AAGC;A;AAED;A;A;A;AAKD;A;AAGD;AACA;AACI;;;A;A;AAGF;AACA;AACA;A;A;AAGC;A;AAEA;A;AAED;AACA;A;AAEA;AACA;AACA;A;A;AAGF;A;;;AAMA;A;;;;AAUA;;;;AACI;;;AACH;A;A;AAGE;A;AAEA;A;A;AANqB;A;A;AAYvB;A;AAGD;AACA;AACI;;;AACI;A;AAEN;AACA;A;AAEA;AACA;AACA;AACA;A;AAEA;AACA;A;AAZsB;A;AAexB;A;;;AAmCA;A;;;;AAYA;A;;;;;A;AAgBC;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;A;AAOC;A;AAED;A;AAEC;A;AAED;A;;;;;;;AAOI;;;AACH;A;A;A;A;;;;;;;A;A;A;A;;;;;;;A;A;;;;;;;A;A;;;;;;;A;AAD4B;A;A;;;;;;;A;;;AA2B7B;A;AAEC;A;A;AAGA;A;AAED;A;;;;AAWA;;;AACA;;;;A;AAEC;A;A;AAGA;A;AAEE;;;A;AACF;A;AAED;A;;;;;;AASA;;;;A;AAEC;A;AAED;A;;;;;;AAQI;AACA;A;AAGH;A;AAED;A;AAGC;AACA;A;AAKE;;;;A;AACF;A;AAED;;A;AAGC;AACA;A;AAEA;;;A;A;A;AAMC;AACA;A;A;AAGA;A;AASD;AACA;A;AAGC;A;A;AAIF;;A;AACK;AACJ;;;AACA;;;;;A;AAEC;A;A;AAOC;A;AACF;A;AAED;A;;;;;;;;AAIA;AACA;;A;AACC;;;;A;;AAEA;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;AAQD;A;A;;;;;;;A;A;AAKI;;;A;A;;;;;;;A;AAGH;A;AAEA;;;AACG;;;A;A;;;;;;;A;AAGA;;;A;A;;;;;;;A;AAGH;A;A;;;;;;;A;;;;;AAQD;;A;AAGC;A;AAEC;A;AAED;AACA;;A;AACC;;A;AASD;A;AAEC;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;A;AAIE;AACD;;;A;AACF;A;AAED;A;;;;;AAYA;;;A;AAEC;A;AAED;AACG;A;AAEF;A;AAEA;A;AAED;A;;;;;A;AAcC;;;A;AAEC;A;A;A;AAID;A;AAED;A;;;;AAMI;;;A;A;A;A;A;AAeD;A;AAfqB;A;AAmBxB;A;;;A;AAOC;A;A;AAGA;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;AAwBI;A;AAEH;AACA;A;A;AAGA;A;A;A;AAIE;A;AAEE;A;AACF;AACA;A;AAEE;A;AACF;A;A;AAGF;A;AAEC;A;A;AASG;A;AACF;A;A;AAGF;A;A;AAGA;AACA;A;A;AAGA;AACA;A;AAED;A;;;;;A;AAeC;A;AAED;A;AAEC;A;AAED;A;;;;;AAMA;A;;;;;AAMA;A;;;;;AAKA;A;;;;AAaA;AACA;AACA;A;;;;;AAIA;;AACC;AACG;A;AACF;;;;A;AAEA;A;A;AAGA;A;AAED;AACG;A;AACF;;;;A;AAED;;;A;A;AAGE;A;AAED;A;AAED;;;A;A;AAGE;A;AAED;A;AAED;A;A;;A;;;;;A;AASA;A;AAEG;AACJ;AACA;;;;;;A;A;;A;;AACC;A;;AAED;AACA;;;;;AACC;AACA;AACA;;;;;A;AAEE;A;AAED;AACA;AACA;A;;A;;AAGF;A;;;;;AAMI;A;AAEH;A;AAEA;AACA;A;AAEA;A;A;AAGA;A;AAEG;AACJ;AACA;;;;;A;A;A;A;AAMG;A;A;AAGD;A;A;;AAGC;A;AAEF;A;AAED;A;;;;AAMA;A;;;;;;AAOA;;;;A;AAEC;A;AAED;A;;;;;;AAUA;A;AAEC;A;A;AAMA;AACA;A;A;AAGA;AACA;AACA;AACA;A;A;AAGA;A;AAEC;A;A;AAIF;AACA;AACA;AACA;A;;;;;AAOA;;AACA;A;;;;;AAMA;A;AAEC;A;AAEC;A;A;A;AAIA;A;A;A;AAID;A;AAED;A;;;;;AASA;A;;;;;AAMA;A;;;;AAIA;A;AAEC;A;AAEE;A;AACF;A;AAED;A;;;AAIA;A;AAEC;A;AAEE;A;AACF;A;A;AAGA;A;AAED;A;;;;;;A;;;;;A;;;;;;AAWA;;;;A;AAEC;A;AAED;AACA;A;;;;;AAYA;;;;;;A;AAEE;;A;A;AAGA;;A;A;AAGA;;A;A;A;AAKA;;A;AAEA;A;A;;AAGF;A;;;;;;;;;;;;;;;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;AC5kCA;;AAIC;;;AACA;A;A;;;;A;A;A;A;A;A;A;A;A;A;A;;A;A;;;;;;;;;;;;;;;;;;;ACFD;A;;ACQA;A;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;ACHgC;A;;;;;AAGI;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmNhC;A;AAEH;A;A;A;AAKA;A;AAEA;A;AAEA;A;AAGD;A;;;;;;;AASA;;;A;AACC;A;A;;;;AAGD;;;;A;AACK;AACJ;;;;;;;A;AACC;A;AAED;;;AACA;A;AAEI;AACJ;;;;;;;A;AACC;A;AAED;;;AACA;A;AAEA;;;A;AACC;A;A;A;AAGF;A;;;;;A;AAMC;A;A;AAGA;A;A;AAIA;A;AAED;A;;;;AAMI;A;AAEH;A;A;AAIA;AACA;;;;;;AACC;A;;AAED;AACA;AACA;A;AAEA;A;AAED;A;;;;AAII;A;AAEH;A;AAED;A;;;AAIA;A;AAEC;A;AAEG;;;A;A;AAAoB;A;A;A;AAOxB;A;;;;AAII;A;AAEH;A;AAED;A;;;AAIA;A;AAGC;A;A;AAIA;A;AAEG;;;A;A;AAAoB;A;AAIxB;A;;;;AAOI;AACJ;A;;;;AAMI;AACA;A;AAEH;A;A;AAGA;A;AAED;AACA;A;;;;AAIA;AACI;;;A;AAEF;A;AAED;AACA;AACA;A;AAEC;AACA;A;AATuB;A;AAYzB;A;;;;AAMI;A;AAEH;A;AAKD;AAMI;A;AAEH;A;A;AAGA;AACA;A;AAEA;AACA;A;AAGD;AACA;;A;AAEE;A;AAED;AAJqB;A;AAMtB;AACA;A;;;;;;AAMI;A;AAEH;A;AAED;AACA;;;;A;AAEC;A;AAEE;;A;AACF;A;AAED;AACA;A;;;;;AAMI;A;AAEH;A;AAGD;AACA;A;AAIC;A;AAGD;AACA;AACA;A;;;;AAOI;A;AAEH;A;AAGD;A;AAEC;A;AAED;AACA;A;;;;AAOA;A;;;;AASI;A;AAEH;A;AAED;A;;;;AASI;A;AAEH;A;AAED;A;;;;AASA;A;;;;AASA;A;;;;A;AAOC;A;AAED;A;;;;;AAMI;AACJ;A;;;;AAQA;A;AAEC;A;A;AAGA;A;AAED;A;;;;A;AAOC;A;AAEG;AACJ;A;;;;;;;AASA;;;A;AACC;A;AAEG;AACA;A;AAEH;A;AAED;;A;A;;;;AAEC;;;A;AAEC;;;;A;A;AAEA;;;A;AACC;A;AAED;;;;;;A;AAEC;A;AAED;A;;AAEA;A;A;AAED;A;AAED;;;A;AACC;A;AAED;A;;;;;AAQI;AACA;A;AAEH;A;A;AAGA;A;A;AAGI;A;AAEH;A;AAED;A;AAEA;A;AAED;A;;;;AAOI;AACA;A;AAEH;A;A;AAIA;AACA;A;AAGD;A;;;;A;AAKC;A;AAED;;;;A;AAQC;A;A;AAIA;A;AAOG;;;;A;AAGH;AACA;A;AAIA;AACI;A;AAGH;A;AAGD;A;AAEC;A;A;AAOA;A;A;AAIA;A;AAGD;A;AAGC;A;AAED;A;A;AAIA;A;A;AAGA;A;AAGD;A;;;;A;ACltBC;A;AAED;AACA;AACA;A;;;;AAKA;A;;;;AAMA;A;AAEC;A;AAED;AACA;A;;;;AAMA;A;AAEC;A;AAED;AACA;A;;;;AAMA;A;AAEC;A;AAED;AACA;A;;;;AAMA;A;AAEC;A;AAED;AACA;A;;;;AAIA;A;AAEC;A;AAEG;AACA;;;AACH;AACA;AAFuB;A;AAIxB;AACA;A;;;;AAIA;A;AAEC;A;AAEG;AACJ;;;;;AACC;AACA;A;;A;AAKA;A;AAED;A;AAEC;A;AAED;AACA;A;;;;AAMA;A;;;;AAOA;A;;;;AAOA;A;;;;AAMA;A;AAEC;A;AAED;AACA;A;;;;AAMA;AACA;A;AAEC;A;AAED;A;;;;AAKA;A;;;;;;;;A;A;A;A;A;A;A;A;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7JA;A;;ACcA;A;;;;;;;;;A;AAoDC;A;AAEG;A;AAGH;A;A;AAGA;A;AAGD;;;;;AACI;;A;AACF;A;AAEA;A;A;;AAIF;A;;;;;;A;AAKC;A;AAGD;AACA;;;;;A;AAEE;A;A;;AAIF;A;;;;;A;AAMC;A;A;AAKA;A;AAGD;AACA;A;AAGC;AACA;A;AAED;AACA;A;;;;;;;AAUA;;AACK;AACJ;;;;A;AAEC;A;AAED;;A;AACC;A;AAGD;;;;A;AAEC;A;AAGD;AACA;A;AAGD;A;;;;;;AAMA;AACA;;;;;;AACC;A;;AAED;A;;;;;;AC3HI;AACJ;;;;A;AAEC;A;A;AAGA;A;A;AAIA;A;A;AAIA;A;AAGD;AACA;AAKA;AACA;AACA;AACA;AACA;;;;;;A;AAEE;A;AAED;A;;AAKD;;A;AAEC;A;AAED;AAEA;A;;;;;;;;;AC3DI;AACD;;;A;A;;;;;A;AAIH;;;A;AACC;;;;AACA;;A;A;;;;;;;A;A;;;;;A;AAMA;AACA;AACG;;;A;AACF;A;AAED;;;;AACA;;A;A;;;;;;;A;A;;;;;A;A;;;;;;A;A;A;;;;;;;AChCD;AACA;A;;;;AAIA;;;A;AAEC;A;A;;;;;;A;;;;;A;;;;;ACUD;;A;;;;;;;;;AAiCI;AACD;;;AAAH;;A;A;;;;;;;A;AAGA;;A;A;;;;;;A;AAII;AACJ;;A;AACC;;A;;AAEA;;A;A;A;;;;;A;AAMD;AACA;;A;A;;;;;A;AAIA;AACA;AACA;AAEA;AAIA;;A;A;;;;;A;AAIC;A;AAMD;AACA;;;;A;;;;;A;;;;;A;A;AC3BC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;;;AAWA;A;AAKC;A;AAGG;AACD;A;A;AAGD;A;AAED;;;;;A;AAEE;A;AAED;A;;A;A;AAIA;A;AAEA;A;A;A;AAKD;A;AAED;A;;;;;;AAeA;AACA;;A;AACC;AACA;;A;AACC;;A;AACC;A;;AAEA;;A;A;AAGF;;A;AAED;A;;;;;;;AASA;AACA;;A;AACC;;A;AAED;A;;;;;;;A;A;;;;;A;AAqDA;A;AAcC;AAEA;;A;A;;;;;A;AAIC;AACA;A;AAIC;A;A;A;;;;;A;A;AAWC;AACA;A;A;;;;;A;A;AAoBD;A;A;;;;;A;A;A;AASF;;;AAEC;A;AASC;A;A;;;;;A;AAcA;AACA;A;AADA;AACA;A;AAGA;A;A;A;A;;;;;A;AAYF;A;A;;;;;A;A;A;A;;;;;A;AAWD;AAKG;;A;A;;;;;A;AAIH;AACA;A;;;;;A;;;;;AAOA;;AACI;A;AACF;AACA;A;AAEA;AACA;A;A;A;A;;;;;A;AASF;;;;;A;A;;;;;A;AAMC;;;;;;A;A;;;;;A;A;;A;;A;;;;;A;;;;AAcD;;A;AACC;;;AACA;;A;AACC;;A;AAED;A;AAKD;;A;;;;;AAYA;AACA;;A;AACC;;A;AAGD;;A;AACK;AACJ;;;;A;AAEC;A;A;AAIF;;A;AAEC;;A;AAGD;;A;;;;A;AAKC;A;AAGD;;;;;AACI;A;AACF;A;A;;AAIF;A;;;;A;AAOC;A;AAGD;;;AACA;;A;AACC;;A;AAQD;A;AAEC;AACA;A;AAGD;;;AACA;;A;AACC;;A;A;AAKA;A;AAGD;;;;;;A;AAEE;A;A;;AAIF;A;;;;;;AAgBA;;A;A;AAIC;A;AAGG;;;AACH;;;AACA;;;;AACA;;A;AACC;;A;AAGD;;A;AACC;;A;AARmC;A;AAYrC;;A;A;AAIC;A;AAGD;AACI;;;AACH;;;AAEI;AACD;;;;AAAH;;A;AACC;;A;A;AAIA;A;AAToC;A;AAatC;;A;AACC;;A;AAGD;A;;;;;;;;;;A;AAOC;A;A;AAIA;A;AAEC;A;A;AAIF;A;AAEC;A;A;AAGA;A;AAGD;A;AAEC;A;AAED;AAEI;A;A;AAGF;A;AAED;A;AAGD;AACA;;;A;AAMC;A;AAEA;;;A;AAEC;;;;;A;AACC;AACA;;;AACA;;A;AACC;;A;AAGE;;;AAED;;A;;;A;AAED;A;A;A;AAID;AACG;;AAAH;;A;AACC;;A;AAGE;;;AAED;;A;;;A;AAED;A;A;A;AAID;AACA;;;;AACA;;A;AACC;;A;AAGE;;;AAED;;A;;;A;AAED;A;A;A;AAID;AACG;AAAH;;A;AACC;;A;AAGE;;AAED;A;;A;AAED;A;A;A;AAOF;A;;;A;AAIA;A;A;A;AAsBD;A;A;AAIA;A;AAEC;A;A;AAIF;A;;;;;;;;;;A;A;;;;;A;A;AA6BC;;;;;A;A;;;;;A;A;;A;A;A;;;;A;AAYD;;A;AACC;;A;A;;;;;A;A;AAMD;;A;AAEC;A;A;AAIA;A;AAEC;A;A;AAIE;AACJ;;A;AACC;A;;AAEG;;;;A;A;;;;;A;A;AAKJ;A;AAEC;A;AAID;;;;;A;A;;;;;A;A;;AAMA;;;;;A;AAEE;A;A;;A;A;;;;;A;A;;;;;A;;;;;AAYF;AACA;AACA;AACA;A;;;;;;;AAIA;;;;;AAEA;;;;;AACC;AAEA;;;;;A;AAEE;;A;A;;AAIF;;A;AAEC;;A;AAED;A;;AAGD;;;;;AAEA;;;;;AACC;AACA;;;;;A;AAEE;;A;A;;AAGF;;AACA;;A;AACC;;A;AAEG;AACJ;;;AACA;;A;AACC;;;;AACA;A;AAED;A;;A;AAIA;A;A;AAIA;AACA;A;AAEC;AACA;A;AAED;A;AAGD;A;;;;;AAOA;A;AAGC;A;AAGD;;;;;;A;AAGE;A;A;AAMA;;A;AAED;;;;;;;A;AAEE;;A;A;AAGA;;A;A;AAGA;;A;A;AAGA;;A;A;AAKA;;A;AAED;A;A;;AAIF;A;;;;AAYA;A;;;;AAIA;AACA;A;AAGC;A;AAGD;AACA;A;AAGC;A;AAGD;;;;;;A;AAEE;;A;A;AAGA;A;A;;AAIF;A;;;AAQA;AACA;;;;;;A;AAIE;AACA;A;A;AAGA;AACA;A;A;;A;AAKD;A;AAGD;AACA;;;;;;A;AAEE;A;A;;AAGF;A;;;;AAOA;A;AAEC;A;AAEE;A;AAGF;;;;;A;AAEE;A;A;;AAGF;A;AAGD;A;A;AAIE;A;A;AAGD;;;;;A;AAEE;A;A;;A;AAKH;A;;;;AAIA;AACA;A;AAGC;A;AAGD;AAOI;;;;AACH;A;AADgC;A;A;AAOhC;;;;;A;AAPgC;A;A;A;;AAiBhC;;;;;;;A;AAEE;;A;AAGD;;;;;A;AAEE;;A;AAQA;;A;A;;AAIF;AACA;A;AAEC;A;A;;AAvC8B;A;AA4CjC;A;;;;A;A;AC92BC;A;AAEA;A;A;;;;;AAKD;;;;;A;AAEE;A;A;;AAGF;A;;;;;A;AAoBC;A;AAED;A;;;;;AAwHI;A;A;AAIH;A;AAEA;A;AAEA;A;AAGD;AAYA;AAKI;AACJ;;;;A;AAEC;A;AAGD;;;;A;AAEC;A;AAGD;A;;;;;;;A;AAKC;;;;;A;AAEE;A;A;;AAGF;A;AAMG;AACD;;;A;AACF;A;AAGG;AACD;;;A;AACF;A;A;AAeA;A;A;AAKA;A;AAEA;A;AAEA;A;AAGD;A;;;;A;AA0BC;A;AAEA;A;AAEA;A;AAED;A;;;;AA4BA;;;;;A;AACC;;A;AAEA;;A;AAEA;;A;AAEA;;A;A;AAED;A;;;;;;AA0GA;;;;;A;A;;;;;A;A;;AAKA;A;;;;;AA0HA;;A;;;;AASA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;A;AAgEC;A;A;AAIA;A;A;AAIA;A;AAKD;;A;;;;;;;AAMA;;A;;;;;;AAIA;A;;;;;AAIA;;;;;A;AAEE;A;A;;AAGF;A;;;;;AAIA;;A;;;;;;AAMI;AACA;AAEJ;;;;;A;AAEE;AACA;A;A;;A;A;A;;A;A;;A;A;A;;A;AAcF;;AAEA;;AACA;;AAEA;;;;;A;A;AAEC;;A;A;;;A;AAGA;;A;A;;;A;A;;;A;A;A;A;AAMA;;A;A;;;A;AAGA;AACG;;;;A;A;;A;A;;A;A;A;;A;AAQH;;;A;A;;A;AAGA;A;A;AAEA;;A;A;;;A;AAGA;AACG;;;;A;A;;A;A;;A;A;A;;A;AAQH;;;A;A;;A;AAGA;A;A;;A;;;;;;AAOD;;AACA;;A;;;;;;AAMA;A;;;;;;AAwCA;A;AAEA;;;;A;A;AAIE;A;AAGD;AACA;;;;A;AAEC;A;A;AAGA;A;A;AAIA;A;A;AAGA;A;AAGD;AAIA;A;AAEI;AACJ;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;AAQA;A;AAEA;AACA;AACA;;;;A;AAEC;A;A;AAGA;A;AAED;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;AAKA;A;AAEA;A;A;A;;;;;;;AAqBG;AACJ;;;;A;AAEC;A;AAEA;A;A;AAGA;A;AAGD;AACA;;;AACK;AACJ;;;;A;AAEC;A;AAGE;;A;AACF;A;A;AAIF;A;;;;;;;;;;;;;;AAIA;;;A;AAEC;;;;;A;AACC;A;A;AAEA;A;A;AAEA;;;;AACA;;A;AACC;;A;AAED;;A;AACI;;AAAH;;A;AACC;;A;A;AAGF;A;A;A;A;AAIC;A;AAEA;A;A;A;AAIF;A;;;AAGD;A;;;;AAKA;AAEA;;;;;A;A;AAGG;A;AAGD;;A;A;A;AAKA;A;A;AAGA;A;A;;AAIF;A;;;;;;;;;;;;AAmBA;AACI;;;;;;AACA;;;;A;A;;;;;A;A;A;;;;;A;AAiBJ;;;;;;;;AACC;;;;;AACK;;;;AACA;AACJ;;A;A;;;;;;;;;;;;A;AAMC;AACA;AACA;AACA;A;AAID;;;;;A;AACC;AACG;;AAAH;;A;A;;;;;;;;;;;;;A;AAIA;A;AAMC;A;AAEE;;AAAH;;A;A;;;;;;;;;;;;A;AAGA;A;A;AAGA;AACI;;;;A;AAGJ;;;A;AACC;AACA;A;A;AAGA;AACA;A;;A;;;;;;;;;;;;A;A;AAMD;;A;A;;;;;;;;;;;;A;AAIA;A;A;AAGA;AACG;;AAAH;;A;A;;;;;;;;;;;;;A;AAMA;;A;AACI;;AAAH;;A;A;;;;;;;;;;;;A;A;;AAKA;A;AAEC;A;AAEE;;AAAH;;A;A;;;;;;;;;;;;A;A;AAID;A;A;AAGA;AACG;;AAAH;;A;A;;;;;;;;;;;;;A;AAIA;;A;A;;;;;;;;;;;;A;AAIA;A;AAMC;A;AAEE;;AAAH;;A;A;;;;;;;;;;;;A;AAGA;A;;AAGA;A;A;A;A;;;;;;;;;;;A;;AAOA;;;;;;;A;A;;;;;A;AAGA;;;;;;;A;A;;;;;A;AAGH;A;;;;;A;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAGA;AAEI;AACJ;;;;A;AAEC;A;AAGD;AACA;AAEI;;;;AACD;;;;A;AACF;A;AAEA;A;AAEE;;;;A;AACF;A;AAEA;A;AAGD;AACA;AAEA;AACA;AAEA;;;;;;;;;;;;;AACC;AACA;AAEA;;;A;A;AAEC;;;;;;;;;;A;AAEK;AACD;;;;A;AACF;A;AAEA;A;AAGG;AACA;;;A;AAEF;A;AAFiB;A;AAKnB;A;A;AAII;AACD;;;;A;AACF;A;AAEA;A;AAGD;AACA;AACA;AACA;A;A;AAGA;;;;;;;A;AAEC;A;A;AAKA;A;A;A;AAID;;;;A;AAEC;A;A;A;AAiBG;AACD;;;;A;AACF;A;AAEA;A;AAGD;;;;;A;AAGE;;A;AAGD;;;;;A;AAEE;A;A;;A;;A;A;AAOC;AACD;;;;A;AACF;A;AAEA;A;AAED;A;A;AAWI;AACD;;;;A;AACF;A;AAEA;A;AAGD;;;;;AACI;;;A;AACF;A;AAEA;A;A;;A;A;AAME;AACD;;;;A;AACF;A;AAEA;A;AAED;A;A;AAII;AACD;;;;A;AACF;A;AAEA;A;AAED;AACA;;;;;;AACC;A;;A;;AAKD;A;A;A;A;AAIG;AACD;;;;A;AACF;A;AAEA;A;AAGD;;;;;A;AAGE;;A;A;AAGA;A;AAEA;A;A;;A;;AAKF;A;A;AAIA;A;A;;AAIF;A;;;;;;AAKI;AACJ;;;;A;AAEC;A;A;AAGA;A;AAGD;;A;;;;;AA8EA;;;;;A;AAEE;A;A;;AAGF;A;;;;AA4BA;;;;;;AACC;;A;AACC;;A;A;;AAIF;A;;;;;;;;AAqRI;AAEJ;;;;A;A;AAEC;AACA;AACA;AACA;A;A;A;AAGA;A;AAGA;;;;;;;;;;A;AACC;AACA;A;A;AAEA;AACA;A;A;AAEA;AACA;A;;AAEA;A;A;A;;A;AAID;A;A;AAIA;A;A;AAIA;A;AAGD;AACA;;;;;AACC;;A;A;AAEE;AACA;A;AAED;;;;A;AAEC;AACA;A;AAED;;A;AACC;;A;AAED;AACA;A;A;;A;AAKD;A;AAGD;A;;;;;;;;AA+KA;;;A;A;;;;;A;AAKA;;;;;;A;A;;;;;A;AAMA;AACA;;;;;;AACC;AACA;A;;AAGD;AAUA;;A;AACK;AACJ;AACA;;;;A;AAEC;A;AAED;A;AAGD;;;;A;AAEC;A;AAGD;;AACA;;AACA;;AAEI;AACJ;;;;A;AAEC;A;A;;;;;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;A;A;;;A;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9qED;A;;;;;;A;AAgBC;A;AAEC;A;AAED;;;;AACA;;;;;;AACC;A;;AAED;A;AAEC;A;AAED;AACA;AACA;A;A;AAIA;A;A;AAGA;AACA;A;AAKD;AACA;A;AAEC;A;AAID;;AACC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAYD;;;;;;AACA;;;;;;AACA;;;;;;AAEA;AACA;;;;AACI;;;AAEH;;;;;;AAGA;;;;;;AACA;;;;;;AACA;;;;;;AACA;;;;;;AAGI;;;AACH;;;;;;AACA;;;;;;AACA;;;;;;AACA;;;;;;AAEA;;;;;;AACA;;;;;;AACA;;;;;;AACA;;;;;;AATkB;A;AAYnB;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;A;AAEC;A;AAID;;;;A;AAIC;;;;A;AAED;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzEkB;A;A;AA6ElB;AACA;A;A;;;;;;;AASD;A;AAEC;A;A;;;;ACzLD;A;;;;ACMA;;A;AAOC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEA;AACA;AACA;AACA;A;A;;;;;;A;A;A;;;;;;;;;;;;;;ACXG;AACJ;AACA;A;;;;ACnBA;A;;;;ACCC;;;;;;;;;;AACA;;;;;;;;;;AAGD;AACA;AACA;AACA;AACA;AAEA;;;;;;;;AAEA;;AAEC;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;A;A;AAII;AACJ;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;A;AAID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;A;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;AC9GC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;A;AAKC;A;A;AAIA;A;AAGD;;A;;;;;;;A;AAOC;A;A;AAGA;A;A;AAGA;A;AAGD;;A;;;;;;;AAQG;A;AACF;A;AAEA;AACA;A;AAED;AACA;A;;;AC3EA;A;;;;;;;AAIA;;;AAEI;AACJ;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEI;AACJ;AACA;AAEA;A;;;;;;;;;AAII;AACJ;AACA;AAEI;AACJ;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;A;AAEC;;;;;AACC;A;;AAED;A;AAGD;AACA;A;;;;;;;AC/DA;;A;;;;;;;AAIA;;A;;;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;ACWA;;;;;AACC;A;;A;;;AAKD;AACA;A;;;AAIA;;;;;AACC;A;;A;;;AAKD;;;;;AACC;A;;A;;;AAKD;;;;;AACC;A;;A;;;AAQD;AACA;;;;;AACC;AACA;AACA;A;;A;;;AAMG;AACJ;AACA;AACA;AACA;A;;;AAKA;A;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEI;AACJ;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AA2BI;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;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;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;AAOJ;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAIA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;AAEJ;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;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;AAEJ;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;AAKI;;;;;;;;AACA;AAEJ;AACI;;;AACH;AADiB;A;AAGlB;AACI;;;AACH;AADiB;A;AAGlB;AACA;AACA;AACI;;;AACH;AADiB;A;AAGlB;AACA;AACI;;;AACH;AADiB;A;AAGlB;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADmB;A;AAGpB;AACA;AACI;;;AACH;AADkB;A;AAGnB;AACA;AACI;;;AACH;AADiB;A;AAGlB;A;;;AAII;AAEJ;AACA;AACA;AACA;AAEI;;;;;;;;;;;;;;AACJ;AACA;AACA;AACA;AAEA;AACI;;;AACH;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzByB;A;AA4B1B;AACA;AAEA;AACA;AACA;A;;;AClzBA;A;;;;AAOA;A;;;;;;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACkDA;;;A;AAEC;A;AAED;A;;;;;AAIA;A;;;;;;;;;ACxDA;;A;AAMC;;;;A;A;A;;;;;;;;;A;A;;;;;;;;;A;A;A;A;;;;;;;;;A;A;;;;;;;;;;A;A;AAaD;;;;;AACC;;A;AACC;;A;AAED;;;;A;AAEC;A;AAED;AACA;;;;A;A;A;;;;;;;;;A;A;A;A;A;;;;;;;;;A;A;;A;;;;;;;;;;A;A;;A;;;;;;;;;A;;;;;A;AAoBD;;;;A;AACC;;;A;AAEC;A;AAED;AACG;;;A;AACF;A;A;AAGA;A;AAED;;;A;AACC;A;A;A;AAGD;;;A;AAEC;A;AAEE;;A;AACF;A;A;A;AAGD;;;A;AAEC;A;AAED;AACG;;A;AACF;A;A;;AAGD;A;A;AAED;A;;;;ACCA;;AACA;A;;;;AAIA;;AACA;;A;AACC;;A;AAED;;A;;;;;AAIA;;AACA;;A;AACC;;A;AAED;;A;;;;;A;AAMC;AAIA;AACA;A;AAED;;A;;;;;AAMA;;A;;;;;AAyBiD;A;;;;;;AACA;;A;;;;;;AACA;A;;;;;;AAGjD;AACA;;A;;;;;;;AAIA;AACA;;A;;;;;;AAU+C;A;;;;;;AACA;;A;;;;;;AACA;A;;;;;;AAG/C;;;;;;A;AACC;A;;AAED;;AACA;;;;;;A;AACC;A;;AAGD;A;;;;;;;AAIA;;;;;;A;AACC;A;;AAED;;;;AACA;;;;;;A;AACC;A;;AAGD;A;;;;;;AAIA;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;AAIA;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAWA;;A;;;;;;;AAUA;AACA;;;A;AACC;A;AAGD;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;AACA;;AACA;;AACA;;AACA;;A;;;;;;;AAcmD;;A;;;;;;;AACA;;A;;;;;;;AACA;A;;;;;;;;AACA;;A;;;;;;;AACA;;A;;;;;AAGnD;;;AACC;;A;;A;;;;;AAUD;;A;;;;;;;AAOA;AACA;;AACA;;AACA;;AACA;;AACA;;A;AACC;;A;AAED;A;;;;;AAIA;A;;;AAIA;A;;;AAOA;A;;;AASA;;;;;A;AAEE;;;;;A;AAEE;A;A;;AAGF;A;A;;AAGF;A;;;;;ACjLA;;A;;;;;;;AA2WA;;AACA;AACA;AACA;A;;A;;;;;;;AASA;;;AAA6B;A;;;AAEzB;AACJ;AACA;AACA;AAEA;A;;;;;;;AAkCA;;;;;A;AACC;A;AAGD;AACA;;;;;A;AAEE;AACA;A;A;;AAIF;;A;AACC;;A;AACC;A;;AACS;;;A;AACT;AACA;A;A;A;AAIF;;A;AACC;AACA;AACA;A;;AAEA;;A;A;;;;;;;;AAKD;AAGA;AACA;AACA;A;;;;;;;A;AAUC;A;AAGD;AACA;;;;;;AACC;;A;;AAGD;AACA;AACA;A;;;;;;;AAIA;A;AAEC;A;AAED;A;;;;;;AAIA;A;AAEC;A;AAED;;A;;;;;;;AAIA;AACA;;A;AACC;;A;AAED;A;;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAOC;A;AAED;A;;;;;AAMA;AACA;A;AAGC;A;A;AAGA;A;AAED;A;;;;;;AAMA;;A;AAEC;;;;A;AAEC;A;A;A;AAKD;A;A;AAKA;A;AAGD;;AACA;;AACC;A;AAGE;;;A;AACF;A;AAKD;AACA;;;;;AACC;AACA;AACG;;;A;AACF;A;A;;AAKF;A;;;;;;;AAOA;AACA;;;;;AACC;AACA;;;;A;AAEC;;A;A;AAGA;A;AAED;;;;;AACC;A;;A;;A;;;;;;;;A;AASD;A;AAGD;;AAEA;AACA;;;AACA;AAEA;A;;;;AAmHA;A;;;;AASA;AACA;A;;;;AAII;AAIJ;AAEA;AAGA;AAEA;A;AAKC;A;AAWA;A;AAUD;AACA;AAGA;;;;;;A;AAEE;;A;AAED;;;;;A;AAEE;;A;A;;AAGF;A;;A;;;;AAKD;;A;;;;AAIA;;;;;A;AAEE;A;A;;AAGF;A;;;A;A;AAQC;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AC33BD;;A;;;;;;;AAKA;;A;;;;;;;AAOA;;A;;;;;;;AAMA;;A;;;;;;;AAOA;;A;;;;;;AAwBA;AACA;A;;;;;AAMA;AACA;AACA;A;;;;;A;AAOC;A;AAED;AACA;AACA;AACA;AACA;;;;;AACC;A;;AAED;A;;;;;AAKI;;;AACH;A;AAEC;A;AAHkB;A;AAUpB;A;;;;;;A;A;;;;;A;AAWA;AACA;AAEA;AAGA;A;AAGC;A;AAGG;;;AACH;AAEA;AACA;AACA;AALwB;A;AAUzB;AACA;AACA;AACA;AAEA;AACA;A;;;;;A;A;;;;;A;AAWA;A;A;;;;;A;A;;;;;A;;;AASA;A;;;;;;;;AAcA;AAEA;AACA;;A;AACC;;A;AAGD;AACA;AACA;AAGA;;A;AACC;;;;;A;A;AAEC;A;A;A;AAEA;;A;A;;;;;;;A;AAIA;AACA;A;AAGC;A;AAGD;AACA;AACA;;AACA;AACA;AACI;AACJ;;;;A;A;;;;;;;A;AAIA;A;A;A;AAEA;;A;AAEC;A;A;A;;;;;;;A;AAOD;;A;AACC;AACA;A;AAED;A;AAEC;;;A;AAEA;;;A;A;;A;AAUD;A;A;AAKF;;A;A;A;;;;;;;A;AAMC;AACA;AACA;AACA;AACA;AACA;;A;A;;;;;;;A;AAKA;AAEA;A;AAED;A;;;;;;;A;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACI;;;AACH;AADgC;A;AAGjC;A;;;;;AAMA;;A;AACC;;AAEA;AACA;AACA;AACA;A;AAGD;AAGA;;A;AACC;;;;;A;A;AAEC;A;A;A;AAEA;AACA;;AACA;A;AAEC;A;AAED;AACA;AAEA;AACA;AACA;AACA;AAEA;;A;A;A;AAEA;;AACA;;A;AACC;AACA;A;AAED;;;AACA;AACA;AACA;A;;A;AAEA;A;A;AAKF;AACA;AACA;AACA;AAEA;A;;;;;;A;AAaC;A;AAED;A;;;;;A;AAMC;A;AAED;A;AAEC;A;AAED;;AACC;A;AAED;AACA;AACA;A;;;;;;A;AAQC;A;AAID;AACA;AACC;;;;AACA;A;AAIC;A;A;AAGA;A;A;AAGF;A;;;;;;;;AAIA;AACA;AACA;A;;;;;AAKA;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;AAQA;AACA;A;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;AAY2C;A;;;;;;AAG3C;AACA;A;;A;;;;;;A;AAcA;;;A;AACC;;A;AACC;;AACA;A;A;A;AAGD;;A;AACC;;AACA;A;A;;AAVD;;AACA;A;A;AAaF;A;AAEE;A;AAED;AAGG;;AAAH;;A;AAOI;;;AAAH;;;;;A;AACC;A;AAED;A;AAED;AAMA;;A;AACC;;AACA;A;AAGD;AACA;AACA;;A;AACC;;AACA;;AACA;A;AAED;;A;AACC;;AACA;;AACA;A;AAED;;A;AAKC;;A;AACC;;AACA;A;A;AAGC;;AAAH;;A;A;AAEE;A;AAEE;;;AAAH;;;;;A;AACC;A;AAED;A;AAID;;;AACA;;;;;AACA;;A;AACC;AACA;;;A;AAED;AACA;AACA;;A;AACC;;AACA;AACA;A;A;AAKA;A;A;AAOD;;;;;A;AACC;;A;AACC;;;AACA;A;A;AAGA;AACA;A;A;AAGD;;;A;AAEC;AAEA;AACA;;A;AACC;;AACA;A;AAGD;A;A;AAEA;A;;AAEA;;;A;A;A;A;AAID;;A;AACC;;;AACA;A;AAGD;;A;AACC;;;AACA;A;AAED;AACA;;A;AACC;;;A;A;A;AAID;;A;AACC;;;AACA;A;AAED;AACA;A;A;AAIA;;A;AACC;;;A;AAED;A;;AAzDA;;;A;A;A;AA6DA;A;AAED;A;;;;;;;A;A;AAOC;A;AAEA;A;AAED;AAEA;;;A;AAGC;A;AAGD;A;;;;;;;AAKA;AACA;AACA;;A;;;;;;;A;AAmCC;A;A;AAIA;A;AAID;AACA;;A;AACC;;A;AAGD;AACA;;A;AACC;;;;;A;A;AAEC;A;A;A;AAEA;;A;A;A;AAEA;;AAGA;AAGA;A;;A;AAEA;A;A;AAKF;AACA;A;AAEC;A;AAGD;A;AAEC;A;AAED;A;;;;;;;A;AAKC;AACA;A;AAGD;;;;AACA;AACA;A;;;;;;;A;AAKC;A;AAGD;;;;AACA;AACA;AACA;AACA;A;;;;;;;AAMA;AACA;AAEI;AACJ;;AACC;AACA;AAEI;AACJ;;A;AACK;AACD;;;AAAH;;A;AACC;;A;A;AAGF;;A;AACI;;;AAAH;;A;AACC;;AAQA;A;A;AAGF;AACG;;A;AACF;A;AAED;AACA;AACA;A;AAIC;A;AAED;AACA;AACA;AACA;AACA;;A;AACC;AACA;;A;AACC;A;;AAEG;;;A;AACF;A;A;A;AAIH;AACA;;AACG;;;A;AACF;A;AAED;AACA;A;AAGD;;A;AACI;AAAH;;A;AACC;;A;A;AAIF;A;;;;;;;AAMA;AACA;AAEA;;A;;;;;;;AAMA;;AACI;A;AACF;A;AAEE;;A;AACF;A;A;AAIF;AACA;AACA;;A;AACC;;AACA;;;A;AAED;;AACI;A;AACF;A;AAEE;;A;AACF;A;A;AAGF;AACI;A;AAEJ;;;;;;;;;;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAIA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAEA;A;A;AAIA;A;A;AAEA;A;;AAEA;;;A;A;AAMD;AAEA;;;A;AACC;;;A;AAED;A;;;;;;;AAWA;AACC;A;AAEC;A;A;AAGA;AACA;A;A;AAIC;;A;AACF;A;AAGD;AACA;AAEG;A;AACF;A;A;AAIA;A;A;AAIA;A;AAYG;AACJ;;A;AACI;;AAAH;;A;AACC;;;;A;AAEC;A;AAED;;;;A;A;AAIF;;;;AACA;A;;;;;;;AAKA;;;;A;AAEC;A;AAGD;;AACA;;A;AACC;;AACA;A;AAGD;;A;AACC;;A;A;AAID;;;;A;AACC;;A;AAEA;;A;AACC;;A;A;A;A;;AAKD;;AACA;A;A;AAGD;AACA;AAEA;AACG;;A;AACF;A;AAED;A;;;;;;;;;AAMG;;A;AACF;A;A;AAKA;A;AAGD;AACA;AAKI;;;AACH;;AACI;;A;A;;;;;A;AAIH;;A;AAGI;;A;A;;;;;A;A;A;AAKF;A;A;;;;;A;AAIH;;;A;AAEC;AACA;A;AAcE;AAAH;;A;AAGI;;A;AACF;A;A;A;A;;;;;A;AAvCwE;A;A;;;;;A;;;;;;;AAsDvE;AACJ;AACC;A;AAEC;A;A;AAGA;A;A;AAGF;;A;AAOC;;A;AAGG;AAEJ;;A;AACC;;A;AAGE;;A;AACF;A;AAED;A;;;;;;;A;AAUC;A;AAGD;;A;;;;;;;AAIA;AACA;AAEA;;A;AACC;;AACA;A;AAED;A;;;;;;;AAQA;AACA;AAEG;A;AACF;A;A;AAGA;A;AAGD;AACA;AAEA;;A;AACC;;A;;AAEA;;A;AAED;;A;AACC;A;;AAIA;;A;A;AAIA;A;AAGD;A;;;;;;;AAKA;AACA;AAEI;AACJ;AACA;A;AAGC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;A;AAGE;A;AAEA;A;A;A;AAID;A;AAEA;A;A;AAIF;A;;;;;;;AAMA;AACA;AAEA;A;;;;;;;AAOA;AACA;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;AAIA;A;;;;;A;ACxyCC;A;AAGD;AACA;;;;;AACI;A;AACF;A;AAEA;A;A;;A;AAKD;A;AAGD;AAaA;;AACA;AAGA;;;;;AACC;;;;;A;AAEE;;A;A;AAKA;;A;AAED;AACA;;A;A;;AAIF;;;AACA;;A;AACC;;;A;A;AAIA;A;AAGD;A;;;;;;A;AAKC;A;AAKD;AAEA;;;;A;AAEC;A;A;AAIA;A;AAGG;AACA;AACJ;A;AAEC;A;A;AAIA;A;AAMD;;A;AAGC;;;AACA;;;;A;AAIC;AACA;;;;;A;AAEE;AACA;A;A;;AAIF;A;AAGC;A;A;A;AAKH;;A;AACC;AAIA;AACG;;;AAAH;;A;AACC;;;A;A;AAIF;AAMG;;A;AACF;A;AAKD;;A;AACC;A;AAGD;A;;;;;;;AAMA;AAGG;;;A;AACF;A;AAGD;;;;A;AAEC;A;AAGG;AACD;;;AAAH;;A;AACC;;AACA;;A;AAGE;;A;AACF;A;AAGE;;A;AACF;A;AAGD;;;;A;AAEC;A;AAGD;;A;AAOC;A;AAGD;;AACA;;AAEA;AACA;;A;AACI;;A;AACF;A;AAEE;;A;AACF;A;AAEE;;A;AACF;A;AAED;AACG;;A;AACF;A;AAEE;;;A;AACF;A;A;;AAGE;;A;AACF;A;AAEE;;A;AACF;A;AAEE;;A;AACF;A;AAEE;;;A;AACF;A;AAED;AACG;;A;AACF;A;AAEE;;A;AACF;A;A;AAIF;AACA;AACA;AAEA;A;;;;;;;AAIA;;;AACA;;A;AAEC;;AACA;;A;AAGD;AACA;AAEA;A;;;;;;;AAIG;AAAH;;A;AACC;;AACA;A;AAGD;AACA;A;;;;;;;AAIA;AAEA;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAED;;AAEA;;A;AAGC;AACA;;;;;;AACC;;;;AACA;;A;AACC;;AACA;;;A;AAED;A;;AAGD;;A;AACC;;AAOA;;;;;;A;AAEE;;A;AAED;A;;AAED;;;;AACA;;A;AACC;;AACA;A;A;AAIF;;A;AACI;;AAAH;;A;AACC;;AACA;A;A;AAIF;;;A;AAEC;A;;AAEA;;AACA;;A;AAGD;A;;AAQA;;A;AACC;;AACA;A;A;AAIF;;;;A;AAEC;A;AAGD;;;AACA;;A;AAIC;;A;AAKC;;AACA;A;AAED;;A;AAGC;A;AAGD;;;;A;AAEC;A;A;AAIF;;AAEA;;;AACA;;A;AACC;;AACA;;AACA;;A;AACC;;AACA;A;AAGD;;;;A;AAEC;A;A;AAIE;AACA;AACJ;;;AACA;;A;AACC;AACA;;AAEG;;;;AAAH;;A;AACC;;AACA;A;AAGD;;;;A;AAEC;A;A;AAIF;;;AACA;;A;AACC;;AACA;;A;AAED;;AAKA;;A;AACC;AACA;AACA;;AACG;;;A;AACF;A;A;AAIF;;;;;AACA;;A;AACC;;AACA;A;AAED;;A;AACC;;AACG;;;A;AACF;A;A;AAIF;;A;AACC;AAIA;;;AACA;;A;AACC;;AACA;;A;AAGD;;;;;;;AACA;;A;AACC;;AACA;A;A;AAIA;A;AAED;;;;AACA;;A;AACC;;AACA;A;AAED;A;AAEC;A;AAED;;;;AACA;;A;AACC;;AACA;A;AAGD;;AACG;;;A;AACF;A;A;AAIF;;AACG;;AAAH;;A;AACC;;AACA;;;A;AAGD;AAEA;A;;;;;;;AAIA;AAEA;;;;;;;;AAEI;;;;AACA;;;;AACJ;;A;AACC;;AACA;;AACA;;AACA;;A;;AAEA;;AACA;;A;AAGD;AACA;AACA;A;;;;;;AAMA;A;;;;;;AAKA;AAEA;;A;AACC;;AACA;A;AAGD;;A;AACC;AACA;;A;AACC;;AACA;A;A;AAIF;;A;AACK;AACJ;AACA;AACA;;A;AACC;;AACA;A;A;AAIF;AACA;AACA;AACA;AAEA;;A;AACC;;AACA;A;AAGD;;A;AACC;;AACA;A;AAGD;;A;AACC;;AACA;A;A;AAIA;AACA;A;AAED;A;AAGC;A;AAGD;;A;AACC;;AACA;A;AAGD;;A;AACC;;AACA;A;AAID;AACA;AACA;AACA;A;;;;;;;AAIA;AAEA;;A;AAEC;A;AAGD;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAGD;;AACA;;A;AAEC;;AACA;A;AAED;;AACA;AACA;A;;;;;;;A;AAKC;A;AAGD;AACA;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAED;;AAEA;AASA;A;;;;;;;AAIA;AAEG;;;A;AACF;A;AAED;;A;AACC;AACA;;;AACA;AACA;AACA;AAEA;;AACG;;;A;AACF;A;A;AAIF;AACA;;AACA;;AACG;;;A;AACF;A;AAED;AACA;A;;;;;;;;AAiBA;AAEI;;;;AACJ;;;;;A;A;AAGE;A;AAEA;A;A;;AAIF;;A;AACK;A;AAOH;A;AAEC;A;A;AAGA;A;A;AAGD;A;AAGD;;A;AAqBD;;;;;;AACC;;A;AACC;;A;AAGD;;;;;;AACC;AAGA;;A;AACK;AACD;;;;AAAH;;A;AACC;;AACA;;;A;A;A;A;A;AAQD;;A;A;AAMA;A;AAGD;;;;;A;AAEE;A;A;;A;;A;;AAOJ;A;;;;;;A;AAOC;A;AAED;;A;;;;AAQA;;;;;AACC;;;;;A;AAEE;A;A;;A;;AAKH;A;;;AAOA;A;AAEC;A;AAEE;A;AACF;A;A;AAGA;A;AAED;;AACC;A;AAED;A;;;;A;AClyBC;A;AAGD;AACA;AACA;A;AAEC;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;A;A;AAGA;AACA;;;;;AACI;A;AACF;A;AAED;AACA;A;;AAED;A;A;AAGA;A;A;AAGA;AACA;A;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AACC;AACA;A;;AAED;AACA;AACA;AAEA;A;AAEC;AACA;AACA;A;A;AAGA;AACA;AAEA;A;A;AAGA;AACA;AACA;AACA;AACA;AACA;AAqBA;AACA;AACA;AACA;AACA;AACA;A;A;AAIA;AACA;AACA;AACA;AACA;AAEA;A;A;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACC;AACA;AACA;A;;A;A;AAKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACC;AACA;A;;A;A;AAKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;A;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;AACC;AACA;AACA;A;;A;A;AAID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;A;AAGA;AACA;AACA;AACA;AAEA;AACA;;;;;AACC;AACA;AACA;AACA;AACA;A;;AAGD;AACA;AACA;AACA;AACA;A;A;AAIA;AACA;AAEA;A;AAGD;AAEA;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAID;A;AAEC;A;AAED;AACA;AACI;;;AACH;A;AAEC;A;AAH+B;A;AAMjC;A;AAEC;A;AAED;A;AAEC;A;AAED;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAIC;A;A;AAGA;A;AAGD;AACA;A;AAEC;A;AAGD;;A;AAEE;A;AAED;AACA;AACA;A;AAEC;A;A;A;AAKA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;;A;AAEE;A;AAED;AACA;AACA;A;AAEC;A;A;AAGA;A;AAKC;A;AAED;A;AAED;A;A;A;AAIA;A;AAED;A;AAEA;A;A;AAIC;A;AAED;A;AAEC;A;AAED;AACA;AACA;AACI;;;AACH;AACA;AAF0B;A;A;A;AAO1B;A;AAED;A;AAEC;A;AAED;AACA;A;AAGA;AACA;A;A;AAIC;A;AAED;A;AAEC;A;AAED;AACA;AACA;AACA;;;;;AACC;AACA;A;;A;A;AAIA;A;AAED;AACA;AACA;A;AAEC;A;AAGD;AACA;A;A;AAGC;A;AAED;A;AAEC;A;AAED;AACA;;AACC;AACA;A;AAEC;A;AAED;AACA;A;A;AAGD;A;AAEC;A;A;AAGF;A;AAGD;A;;;;;A;AAoDC;A;AAGD;AACA;AACA;AAEA;A;AAEC;AACA;;;;;AACC;A;;AAED;AACA;A;A;AAGA;A;A;AAGA;A;A;AAGA;AACA;A;AAEE;A;A;AAED;A;AAED;AACA;A;AAED;A;AAEC;;;;;AACC;A;;AAED;AACA;A;A;AAIA;AACA;A;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;A;AAEC;AACA;AACA;A;A;AAGA;AACA;AACA;AACA;AACA;AAEA;;;;;AACC;A;AAEC;A;AAED;AACA;AACA;A;;A;A;AAID;AACA;AACA;A;A;AAGA;AACA;AACA;A;A;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AAEE;A;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;A;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;AACC;AACA;AACA;AACA;A;;A;AAIF;AAEA;A;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;A;AAIC;A;A;AAGA;A;AAGD;AACA;A;AAEC;A;AAGD;;A;AAEE;A;AAED;AACA;AACA;A;AAEC;A;A;A;AAKA;AACA;AACA;;AACC;AACA;A;AAEC;A;AAED;AACA;A;A;A;AAIA;A;AAED;A;A;AAGC;A;AAED;A;A;AAGC;A;AAED;AACA;AACA;A;AAEC;A;AAGD;AACA;A;AAEA;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;AAGC;A;AAED;A;AAEA;A;AAGC;A;AAED;AACA;A;AAEC;A;AAGD;AACA;;A;AAEE;A;AAED;AACA;A;AAEC;A;AAED;AACA;A;A;AAGF;A;AAGD;A;;;;;;A;A;;A;AAuBI;AACJ;;;;;AACC;A;;AAGD;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;;;;;AACC;AACA;AACA;AACA;AACA;A;;AAGD;AACA;A;;;;;A;AAKC;A;AAGD;AACA;A;AAEC;A;AAGD;AACA;AACA;;A;AAEE;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;AAGD;AACA;AACI;;;AACH;AACA;AACA;AAHyB;A;AAM1B;A;;;;;A;AAoBC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;A;;;;;AAIA;A;AAEC;A;AAED;AACA;A;;;;;A;AAsBC;A;AAGG;A;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;A;AAEA;A;AAGD;AACA;A;;;;;AAIA;A;AAEC;A;AAED;AAEA;A;A;AAGE;A;AAED;A;AAEC;A;AAED;A;AAED;A;;;;;AAWA;AACA;AACA;A;;;;;AAIA;A;;;;;A;AAoBC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;A;;;;;AAIA;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;;;;;;A;A;;A;AAuBA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAIA;A;AAEC;A;AAED;AACA;A;;;;;A;AAoBC;A;AAED;A;AAEC;A;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;A;;;;;AAIA;A;AAGC;A;AAED;AACA;AACA;A;AAEC;A;AAED;AACA;A;AAGC;A;AAED;AACA;A;AAEC;A;AAGD;A;;;;;;A;A;;A;AAiCA;AACA;AACA;;;;;AACC;A;;AAED;A;AAGC;A;AAGD;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;A;AAGC;AACA;AACA;AACA;AACA;;;;;AACC;AACA;AACA;A;;A;AAIF;AACA;AACA;AACA;;;;;AACC;AACA;AACA;AACA;AACA;A;;AAGD;AACA;A;;;;;AAIA;A;AAGC;A;AAGD;A;AAEC;A;AAGD;AACA;A;AAEC;A;AAGD;A;AAEC;A;AAGD;A;A;AAIE;A;AAED;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;;;;;AACC;AACA;A;;A;A;AAKD;A;AAED;AACA;A;AAEC;A;AAED;AACA;AACA;AAEA;AACA;;A;AAEE;A;AAED;AACA;A;AAGC;A;AAGD;AACA;A;AAGD;A;;;;;;A;A;;A;AA4BA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;AAEA;AAEA;A;;;;;AAIA;A;AAGC;A;AAGD;A;AAEC;A;AAGD;A;AAEC;AACA;A;A;AAIA;A;AAED;AACA;A;AAEC;A;AAGD;AAEA;A;;;;;;A;A;;A;AAwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;A;;;;;AAIA;A;AAGC;A;AAGD;A;AAEC;A;AAGD;A;AAEC;A;AAGD;AAEA;A;;;AAOA;A;;;;AAIA;A;;;;;;;ACp7CA;;;AAAoC;A;;;AAEpC;AAGA;;;;A;AAEC;A;AAID;AACA;;A;AAEI;;A;AACF;A;AAEE;;A;AACF;A;AAKD;;A;AACI;;A;AACF;A;A;AAGC;;A;AACF;A;AAEE;;;A;AACF;A;AAED;AACG;;A;AACF;A;AAED;A;;AAIG;;A;AACF;A;AAEE;;A;AACF;A;AAEE;;A;AACF;A;AAED;AACA;AACG;;A;AACF;A;AAEE;;A;AACF;A;AAEE;;;A;AACF;A;A;AAIF;AACA;AAEA;A;;;;;;;;;;;AAMA;AAEA;;;;A;A;;;;;A;AAII;AACJ;;;AACA;;A;AACC;;A;;;;;;A;AAID;;A;AACI;;;;AAAH;;;A;AACC;;A;;;;;A;AAGA;;;AAAqC;A;;;AACrC;A;A;AAIF;;;AACA;;A;AACC;;A;;;;;;A;AAGD;AAEA;AAEA;AACA;AAEA;;;;;;AACC;;;;;A;AAEE;AACA;A;A;;A;;AAKH;AACA;;;;;A;AAEE;AACA;A;A;;AAGF;AAEA;AAEA;;;;;A;AAEE;AACA;A;A;;AAIF;;A;AACC;;A;;;;;A;AAID;AACA;AACA;;;AACA;;A;AACC;;A;;;;;A;AAID;;A;AACC;;A;;;;;A;AAID;AACA;A;AAEC;A;A;AAIG;;;A;AACF;AACA;A;A;A;AAQA;AACA;A;A;AAIF;;;;AACA;;A;AACC;;A;;;;;A;A;AAIA;A;AAGE;;;AAAH;;A;AACC;;;;;A;AAEC;A;A;AAEA;A;;AAEA;;A;;;;;;;;A;A;AAIC;;;AAAH;;A;AACC;;;;A;AAEC;A;;AAEA;;A;;;;;;;;A;A;AAKF;;;A;A;;;;;A;AAII;;;;AACJ;;A;AACC;;AACA;A;;AAEA;AACA;;A;AAGD;;;;;A;AAEE;A;A;;AAIF;;A;AACC;;A;;;;;A;AAKD;;;;;AACC;;A;AAEC;;A;AACC;;A;;;;;A;AAGD;A;A;;A;;;;;A;;;;;;;AASF;A;AAGC;A;AAGG;AACA;AACD;;;;A;AACF;A;A;AAKA;A;AAGD;AAEA;;;;;A;AAEE;AACA;A;A;;A;AAID;A;AAID;;;;;;;A;AACC;A;AAGD;AACA;A;AAEC;A;A;AAGA;A;AAGD;A;;;;;;;AAIA;AAEA;AAGA;AACA;AACA;;AACA;AACA;;AACA;;AACG;;;A;AACF;A;AAGD;;A;AACI;;;A;AACF;A;A;AAIF;AAEA;A;;;;;;;AAIA;A;AAGC;A;AAGD;AACA;AAEA;;A;AAIC;A;AAED;;AACA;;AACG;;;A;AACF;A;AAGD;AACA;AACA;;AACG;;;A;AACF;A;AAGD;;A;AACC;AACA;AACA;AACA;;AACG;;;A;AACF;A;A;AAIF;;AACA;;;;AACA;;A;AACC;;AACA;A;AAED;;A;AACC;;AACG;;;A;AACF;A;A;AAIF;;A;AAEC;AACA;A;AAKC;AACA;A;A;AASA;A;AAED;;AACG;;;A;AACF;A;A;AAIF;AACA;;AACG;;;A;AACF;A;AAGE;;;A;AACF;A;AAGG;AAEJ;;;;A;AAEC;A;AAGG;AAGJ;;A;AACI;;;AAAH;;A;AACC;;AACA;;A;AAED;;AAEA;;A;A;AAGC;;A;AACC;;AACA;A;A;A;AAIF;;;;A;AAEC;A;AAGD;;;;A;AAEC;A;A;AAKF;;;AACA;;A;AACC;;AACA;;A;AAED;;AAEA;;;;AACA;;A;AACC;;AACA;A;AAED;;AACG;;AAAH;;A;AACC;;AACA;A;AASD;;A;AACC;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAID;;;;;AACA;;A;AACC;;AACA;A;AAGG;AACD;;;;AAAH;;A;AACC;;A;AAED;;A;AACC;;AACA;;;A;AAGD;;A;AAGD;AAEA;A;;;;;;;AAIA;AAEA;;;;;;;;AAGI;;;;AACA;;;;AAEJ;;A;AACC;;AACA;;AACA;;AACA;;A;;AAEA;;AACA;;A;AAGD;AACA;AAEA;A;;;;;;;AAIA;AAEA;;A;AAEC;A;AAGD;;A;AACC;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAED;;AACA;A;AAGD;;;;A;AAEC;A;AAED;;;AACA;;A;AACC;;AACA;;A;AAGD;;AACA;;A;AAEC;;AACA;A;AAGD;;AACA;AACA;A;;;;;;;;A;AAKC;A;AAGD;AACA;AAEI;AACJ;AAMA;;;;A;AAEC;A;AAGD;;AACG;;;A;AACF;A;AAGD;A;;;;;;;AAIA;AAEG;;;A;AACF;A;AAGD;AACA;;AACA;;AACG;;;A;AACF;A;AAGD;AACA;AAEA;A;;;;;;;AAOA;AAEA;AACA;AACI;AACJ;;;;;;AACI;;;;AAAH;;A;AACC;;AACA;;;A;A;;AAIF;;A;AACC;;AAOA;;;;;AACC;A;;AAGD;;;;AACA;;A;AACC;;AACA;;;A;AAGD;A;AAGD;;A;AACI;;AAAH;;A;AACC;;AACA;A;A;A;AAKD;A;AAGG;AACJ;;;A;A;AAEC;A;;A;AAEA;;AACA;;A;AAED;AACA;A;;;;;;AAOA;;;;;A;AAEM;AAEJ;;;;;A;AAEE;AACA;A;A;;A;AAID;;A;A;A;AAMC;;A;A;A;AAIC;;A;A;AAGD;;A;A;AAGD;;A;A;AAGA;;A;AAED;AACA;A;A;;AAGF;A;;;;;A;AAQC;A;AAGG;A;AAEH;A;AAEA;A;AAGD;AAWA;A;;;;;AC3vBA;A;;;;;;A;AAKC;A;AAGD;A;AAEC;A;AAEC;A;AAED;A;AAED;;;A;AAEC;A;AAGD;;;;A;AAEC;A;AAQD;A;;;;;;AAIA;A;;;;;;AAIA;AACA;AACA;AACA;;;A;AAEC;A;AAGD;;;;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;A;;;;;;AAKA;AACA;;;;;AACC;;A;;AAED;;A;;;;;AAMA;AACA;AACA;;;;;AACC;;A;;AAED;;AACA;;AACA;A;;;;;AAOA;;A;AACC;;AACA;;;;;AACC;;A;;AAED;;AACA;A;AAED;;A;AACC;;A;AAED;;A;;;;;A;AAKA;;;;A;AACC;;A;AAEA;;A;AAEA;;A;AAEA;A;A;A;;;;;;;;;AAwBD;AAGA;;;;;;AACC;;;;;A;AAEE;AACA;A;A;;A;;A;AAMF;A;AAGG;AAEJ;;A;AACK;;;;AACD;;;A;AACF;A;AAGD;AACA;AACA;A;;AAEA;;;;A;AAEC;A;AAGG;;;;AACA;AACJ;;;;;;A;AAEC;A;AAED;;A;AAID;AACA;AACA;AACA;AACA;AACA;AAEA;;;A;AAEC;A;AAGD;;;;;;;A;AAEC;A;A;AAGA;A;AAGD;;;;A;AAEC;A;AAGD;A;AAEC;A;AAED;;;;AACA;;A;AACC;;;A;AAGD;AACA;A;AAEC;A;AAED;AACA;AACA;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;AAEA;A;;;;;;;;;;A;AAKC;A;A;A;AAKC;A;AAGG;;;;;;AACJ;AACA;AACA;AACA;A;AAGD;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;;AACA;;AACA;AACA;AAEA;A;;;;;;;A;AAKC;A;A;AAGA;A;AAED;AAEA;A;AAEC;A;AAED;AACA;AAEA;A;AAEC;A;AAGD;;A;A;AAEE;A;AAED;A;;AAEA;;;;A;AAEC;A;AAED;;;;A;AAEC;A;A;AAIE;A;AAGH;AACA;A;AAEC;A;A;AAGF;;;;;A;AAEC;A;A;AAGA;A;AAGD;A;AAEC;A;AAED;AAEA;;;;A;AAEC;A;AAED;;A;;;;;;;;;;;A;AAKC;A;AAGG;;;;AAEJ;;A;AACK;;;;;;;;AAED;;;A;AACF;A;AAGD;AACA;AACA;AACA;AACA;A;;AAEA;;;;A;AAEC;A;AAED;;;;;;A;AAEC;A;AAED;;;AACA;;AACA;AACA;AAEA;;A;AAGD;AACA;AACA;AACA;AAEA;A;;;;;;;AC1XA;AACA;AACA;A;;;;AAKA;;AACA;;AACA;;AAEA;AACA;;AACC;AACA;;AACA;;AACA;;AACA;AACA;AAEA;AACA;;AACA;;A;A;;;;;;AAMD;AACA;AAEA;AACA;AACA;AAEA;;;AACA;AACA;AACA;AAEA;;;;;;AACC;A;;A;;;;;AAMD;;;AACC;AACA;AACA;AAEA;A;;;A;;;;AAOD;AACA;AAEA;AACA;AAKI;AACJ;;AACK;;;AACH;AADmB;A;AAIpB;AACA;;AACA;;AACA;;AACA;;AAEA;AACA;;AACA;;AAEA;;AACA;A;A;;;;;A;A;AAkBA;A;AAEA;A;A;AAGC;A;AAED;A;AAEA;A;A;;;AAKD;;AACA;A;;;;AAMA;AACA;AACA;AAEA;AACA;AACA;A;;;;;;;;;;;AAOA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;A;AAOA;;;;;A;AACC;A;AAEA;A;AAEA;A;AAEA;A;AAEA;;A;A;A;;;;;;AAKG;A;AAEH;A;AAGD;;;AACA;;A;AACC;;;A;AAGD;A;;;;;;;;AAqBA;;AACA;;AAEA;;A;AACC;;AACA;;A;A;AAIA;A;A;;;;;A;;;;;;;AAOD;;A;AACC;;A;AAGD;AACA;;AACA;;A;;;;;;AAOA;;AACA;;AACA;;AACA;;AAEA;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAEA;AACA;;AACA;;AACA;;AACA;;AAEA;AACA;AACA;AACA;A;;;;;;AASA;;A;AACC;;A;AAGD;AACA;;;;;;AACA;A;;;;;;;AAMA;;A;AACC;;A;AAGD;AACA;;;;;;AACA;A;;;;;;;A;AAOC;A;AAGD;;A;A;AAEE;A;AAGD;AACA;;AACA;AACA;;AACA;;A;AAED;;A;AACC;;AACA;;AACA;;A;AAGD;;A;AACC;;A;AAGD;;A;;;;;;AAMA;A;;;;AAOA;A;;;AAMA;;;A;AAEC;;A;AAEC;;A;A;AAGD;A;AAEC;A;AAED;AAEA;AACA;AAEA;;A;AACC;;A;AACC;;A;AAED;AACA;A;AAGD;AACA;AACA;A;;A;;;;ACzUD;AACA;;;;;AACC;A;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;;;AACC;AACA;AACA;AACA;AACA;AACA;A;;AAGD;A;;;;;A;AAKC;A;AAGD;AACA;AACA;AACA;A;AAEC;A;AAGD;AACA;A;AAGC;A;AAGD;AACA;AAEA;AACA;;;;;A;AAEE;A;AAED;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;A;;AAGD;A;;;;;;AAIA;AACA;AACA;AACA;AACA;AAEG;;;A;AACF;A;AAED;;AACA;AACA;;;AACA;;A;AACC;;;A;AAED;;AAEA;;AACA;;AACA;;AAEA;A;;;;;;;A;AAMC;A;AAGD;AACA;AACA;AAEA;;AACA;AACA;;;;;;A;AAEE;AACA;A;A;;A;AAKD;A;AAED;AAEA;;AACA;;AACA;;A;AAGC;A;AAGD;;;A;AAEC;A;AAED;AACA;AACA;;AAEA;AACA;AACA;A;;;;;ACvKA;A;;;;AAQA;A;;;;;;AAYA;;;;A;AAEC;A;AAED;A;;;;;AAQA;AACA;AACA;AACA;A;;;AAoBsC;A;;;AACA;A;;;AACA;A;;;;;;;AAatC;A;AAGC;A;AAEC;A;A;AAIE;AAEJ;;A;AACC;AACA;;;A;A;;;A;AAKD;;;A;AAEC;A;AAGD;A;AAEC;A;AAED;A;AAGC;A;AAID;;A;AAEC;;AACA;AACA;A;AAGD;AAEA;;A;AACC;;A;;AAEA;;;AACC;A;A;;;AAGD;;A;AAGD;;A;AACC;;AACA;A;AAGD;A;;;;;;AAUA;;A;;;;;;AASA;;;;A;AAEC;A;AAED;;;;A;AAEC;A;AAED;;A;;;;;;AAOA;;AAA+C;A;AAE3C;AACA;AACJ;AACK;AACJ;;;;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAIF;;A;AACC;;A;AACC;;A;AAED;;A;AACC;;A;AAED;;;A;AAGD;AACI;AACJ;AACC;;;;AACA;;A;AACC;;A;AACC;;A;AAED;;A;AACC;;A;AAED;;;A;A;AAGA;A;AAED;A;AAKD;;;;AACA;;A;AACC;;A;AAGD;;;;AACA;;A;AACC;;A;AAGD;;;;A;A;AAEC;;;AACA;;A;AACC;;A;AAED;;A;AACC;;A;A;A;A;AAGD;;;AACA;;A;AACC;;A;AAED;;A;AACC;;A;A;;A;AAGD;;A;AAGD;A;;;;;;AAOG;;;;A;AACF;A;AAEE;;;;A;AACF;A;A;AAEC;A;A;AAEA;A;A;AAGC;;;;A;AACF;A;AAGD;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;ACzRA;A;;;AAQA;A;;;;A;AAOC;A;AAED;;A;;;;;ACVI;AACD;AAAH;;A;AACC;;;A;AACC;A;AAED;;;A;;AAEA;;;;AACA;;;;;;A;AACC;A;AAED;;;AACA;AACA;;;A;AAGD;AACA;;;;;;A;A;;A;;AACC;A;;AAED;AAEA;;;;;AACC;AACA;AACA;AACA;;;A;AACC;A;AAED;;;AACA;AACA;;;A;AACC;AACA;;A;AAGD;AACA;AACA;;;;;;;A;AAEE;AACA;AACA;A;A;AAGA;A;A;;AAGF;AACA;A;;AAED;A;;;;;;AAIA;;;;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;;AAmBA;A;AAEC;A;AAED;;;AAEA;;A;A;;;;;;;A;AAKA;AAKI;AAEJ;AACA;;AACC;;A;AAEC;A;AAED;;;;;AACA;;A;AACC;;;A;AAGC;A;A;;;;;;;A;AAMF;AACG;A;AACF;A;AAEC;A;AAEG;AACD;;;A;AACF;AACA;A;A;AAGC;;A;A;;;;;;;A;AAIH;AACA;A;AAKG;AACJ;;;;;;A;A;;A;;;AACC;AACG;;;AAAH;;A;AACI;;;;A;AACF;A;AAED;;A;AAGD;AACA;AACI;;AACH;;AACG;;;A;AACF;AACA;AAJY;A;A;AAOb;AACA;;;A;AAEC;A;AAED;AACA;;A;AACI;;;;A;AACF;A;A;;AAGD;;;AACA;A;AAnBY;A;A;AAuBb;A;A;;AAIF;A;;;;;;AAIA;A;AAEC;A;AAKD;;A;AAEC;A;A;AAIA;A;AAED;;;;A;AAEC;A;AAED;A;;;;AAIA;A;;;;;;AAQA;;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;;;;;A;AAiBC;A;AAED;;A;A;;;;;A;AAKA;AACI;;;AACH;A;A;;;;;A;A;AAeC;AACA;AAjBsB;A;A;A;A;;;;;A;AAuBvB;AAvBuB;A;A;;;;;A;;;;;;;;AA8BxB;;A;A;;;;;;;A;AAKA;AACA;;AACA;;;;AACA;;A;A;;;;;;;A;AAKA;;A;A;;;;;;;A;AAIA;AACA;;AACA;;;;A;A;;;;;;;A;AAIA;A;;;;;;;A;;;;;AAMA;AACI;;;AACH;;A;AACC;AACA;A;AAED;AACA;;A;AACC;A;AAEC;A;AAED;;A;AAED;A;A;AAGA;A;AAGD;AACA;AACI;;;A;A;AAGF;AACA;AACA;A;AAEA;AACA;AACA;A;A;AAGF;A;;;;A;AAMC;A;AAEA;A;AAEA;A;AAED;A;;;A;AAMC;A;AAEA;A;AAEA;A;AAED;A;;;;AC3NA;;;;;A;AAEC;A;AAED;;A;AACC;AACA;;A;AAED;;AAEA;AACA;AAEA;AACA;AACI;AACD;;;;A;AACF;A;AAED;;;;;A;AAEE;A;A;;AAGF;AACA;A;;;AC/KA;A;;;;AAUA;;;;A;AAEC;A;AAED;AAEA;AACA;;;AACC;;AACA;;A;AACC;A;AAED;AACA;;;;;A;AAEE;A;AAED;;A;;A;AAGC;A;AACF;A;A;;;;;;AAKD;;;;;AACC;A;;A;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5BD;A;;;;;A;AAQC;A;AAEA;A;AAGA;A;AAED;;A;;;;;;;A;A;;;;;A;AAOI;;;;AACD;;;;A;A;;;;;A;AAGA;;;;A;A;;;;;A;A;;;;;A;;;;A;A;AASF;A;AAED;A;;;;;;;AAoBA;;AACC;;A;A;A;;;;;A;AAIC;;;;AAGA;AACA;AACA;AACA;;AACA;;;A;AACC;AACA;AACA;;A;AAEC;;A;A;A;A;AAIA;A;AAEA;A;A;AAGF;A;AAED;AAGA;;;;;A;AACC;;;;A;A;AAIE;AACA;A;A;;;;;A;AAIF;A;A;AAEA;A;A;AAIA;A;A;A;;;;;;A;A;AAID;AACA;AACA;AACA;A;A;;;;;A;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1HD;AACA;A;;;;;AAOA;A;;;;;A;AAWC;A;AAED;A;AAEC;A;AAED;A;;;;;AAKA;A;;;;ACdA;A;;;;;;AAMA;;;;AACA;A;;;;;;;AAKA;;;;A;AAEC;AACA;AACA;A;AAED;A;;;;;;;AAIA;AACI;AACJ;AACC;;;;;A;AAEC;A;A;AAIA;A;AAED;A;AAEC;A;A;AAGF;A;;;;;;;AAuBA;;;;AACA;A;;;;;AAMA;AACA;;AACC;A;AAED;AACA;;AACC;A;AAED;A;;;;;AAMA;;;;A;AAEC;AACA;AACA;A;AAED;A;;;;;;;AAKA;;;;A;AAEC;A;A;AAGA;A;AAOD;;A;AACC;;;;A;AAEC;A;A;AAMF;AAGA;;;AACC;;;;A;AAEC;A;AAED;AACA;A;AAED;A;;;;;;;AAKA;AACA;AACC;;;;A;AAGC;A;A;AAGA;AACA;A;AAED;A;AAED;A;;;;;;;;;;;AAIA;;;;A;AAEC;A;A;;;;;;A;;;;;;;;;A;AAOA;AACA;A;AAED;AACA;;;A;AAEC;AACA;A;AAED;A;AAIC;A;AAED;A;;;;;;;;AAmBA;;;;;;A;AAEC;A;AAED;A;;;;;;;;;;AA+BA;;;;;;AACA;AACA;;AACC;;;;A;A;;;;;;;A;AAKI;AACA;AACJ;;;;;AACA;;A;AACC;;AACA;AACA;A;AAED;A;A;AAIA;A;AAED;A;;;;;;;AAoBA;AACA;AACA;A;;;;;;;;;AAqBA;AACA;;AACK;AACJ;;;;A;A;AAGE;A;AAED;A;AAED;A;A;A;AAGE;AACA;A;A;AAGA;AACA;A;AAED;A;A;AAIC;AACA;A;A;AAGA;AACA;A;AAED;A;A;AAIC;AACA;A;AAID;AACA;AACA;A;A;AAIC;AACA;A;AAGD;AACA;AACA;A;A;AAIC;AACA;A;A;AAGA;A;A;A;AAGF;AACA;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;;A;AAOC;A;AAED;AACA;;AAGC;;A;A;;;;;;;;AAQD;;;A;;;;;;;AAWI;AACA;AACJ;AACK;AACJ;;;;A;A;AAGE;A;AAED;A;A;A;AAMC;A;AAED;A;AAED;A;AAED;A;;;;;;;AA2BI;AACJ;;A;AAEC;A;AAGD;AAGG;;;;AAAH;;A;AACC;;;;A;AAEC;A;AAED;A;AAGD;AACC;;;;A;AAEC;A;AAMD;A;AAEC;A;AAED;AACA;;AACC;A;AAED;A;AAMC;A;AAID;AACA;;AACC;A;AAED;AAEA;A;AAMC;;;;AACA;AACA;A;AAEA;A;A;AAIA;A;A;A;;;;;;;;;AASF;;AACA;A;AAEC;A;AAED;;;AACA;;AACC;A;AAIC;A;AAED;AACA;A;AAED;A;;;;;AAaA;AACI;;;AACH;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;AAXuB;A;AAaxB;A;;;;AAaA;A;;;AAWA;;;;;A;AAEE;;A;AAGD;A;AAGD;AACA;;;;;;A;AAME;A;AAEA;A;AAED;AACA;A;;AAKE;A;AACF;A;AAED;A;;;AAOA;;;;;AAyCC;A;;A;;;;;ACtoBD;;A;;;;;;AAQA;A;;;;AA6EA;;AACC;A;AAED;;AACC;A;AAED;A;;;;AAeA;A;;;AAIA;AACA;A;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1HA;;A;;;;;;;;;;;AAIA;AACA;A;AAEE;A;A;AAKF;AACA;;AACC;;;;A;AAEC;A;A;A;;;;;A;AAMD;;AACA;;A;AACC;A;AAED;;AAEI;AAEJ;;A;AAEC;;;;A;A;;;;;A;AAIA;A;A;;;;;A;AAIA;AACA;A;AAID;AAIA;;;;A;A;;;;;A;AAIA;;A;AAEC;;;;A;A;;;;;A;AAIA;;;;AACG;;A;AACF;A;A;AAGA;A;;;;;A;AAGD;AACA;A;;AAEA;AACA;AACA;AACA;A;AAED;A;A;;;;;A;;;;;;AAkBG;AACJ;;;;;;A;A;;A;;AACC;;;;;A;AAEE;A;AAEC;A;A;A;;A;;AAKJ;A;;;;;;AAeG;A;AACF;AACA;A;AAED;;;A;;;;;;AAoBA;A;;;;;;AC5GA;;A;AACC;A;A;AAGA;A;AAED;A;;;;;;;AAMA;;A;AACC;A;AAED;A;;;;;;;AAIA;AACI;AACJ;;;;;A;AAEC;A;A;;;;;;AAWD;AACA;A;;;;;;;;A;A;;;;;A;AAuBA;;;;A;;;;;A;;;;;;AAKA;AAIG;;A;AACF;A;AAED;A;AAGC;AACA;A;AAED;A;;;;;;AAIA;AACA;;;;A;AAEC;A;AAED;A;;;;;;;;;A;;;;;A;;;;;;;AAgBA;AACA;AAIA;;AACC;;;AACA;;;AACA;;A;AAEC;;;A;AAEC;A;A;A;A;AAOF;A;AAED;A;AAEC;A;AAED;;;AACA;AACA;A;AAEC;A;AAED;A;;;;;A;A;A;A;AAmBG;A;AAEA;A;AAEA;A;A;A;AAID;A;A;AAKC;A;A;A;AAGD;A;AAEA;A;AAEA;A;A;A;AAID;A;AAOD;A;AAEC;A;AAED;A;;;A;A;AAiBE;A;AAED;A;AAED;A;AAEC;A;AAED;A;;;;;AAIA;;AACA;A;;;;;;;AAqBA;;A;AACC;;A;AAED;;A;AACC;;A;AAED;AACA;AACC;;;;A;AAQC;A;AAED;;A;AACC;;A;AAGD;;A;AACC;AACA;;;;A;AAEC;A;AAED;AACA;A;A;AAKA;A;AAGD;;A;AACC;;A;AAGD;;A;AAEC;A;AAOD;;A;AACC;AACA;A;AAGD;;A;A;;;;;;;A;AASA;A;AAED;AACA;AACA;A;;;;;;A;A;;A;AAaA;AACA;A;AAMC;AACA;A;A;;A;;;;AASD;;AACC;A;AAED;A;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3XA;;;AACA;A;;;;;;;;;;;;;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIA;;;A;AAEC;A;AAED;A;;;;;;AAaI;AACJ;;;;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;A;;;;;;;;AAKD;AACA;;A;AACC;;;AACA;A;AAED;A;;;;;;;;;AAIA;;AACC;;A;A;AAKE;A;AAEE;;;A;A;AAED;AACA;A;A;AAGF;A;AAED;;A;AACC;;;;;A;AAGC;A;AAED;AACA;A;A;AAGA;A;AAED;A;AAEC;A;AAEG;AACJ;;;;AACA;AACA;AACA;A;AAIC;A;A;A;;;;;A;;;;;;AAWF;;;;A;A;AAKE;A;AAEA;A;AAED;A;A;AAGA;A;AAED;AACA;;;A;AAEC;A;AAED;A;;;;AAIA;;AACC;A;AAED;A;;;AAIA;A;;;AAUA;A;AAEC;A;AAKD;A;;;AAeA;A;;;;;;;;A;A;;;;;A;AAmBG;;;A;A;;;;;A;AAGA;;;;A;AACF;A;A;AAGA;AACA;A;AAEE;;;A;AACF;A;AAEE;;;AAAH;;A;AACC;;A;AAED;A;;;;;;;AAIA;;;AACA;A;;;;;;;AAaA;;;;;;A;AAGE;A;AAEA;A;AAEA;A;A;;;;;A;A;A;;;;;A;AAOD;AACA;A;;AAED;A;;;;;;;;;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;AChOC;A;AAED;A;;;;;A;A;AAME;AACA;A;AAED;AACA;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;A;;;;A;AAwBC;A;AAGD;AACA;AAOA;AACA;;;;A;AAEC;AACA;;;;A;AAGD;;A;AAIE;A;AAGA;A;AAGA;A;AAIC;AACA;;AACC;A;A;A;AAKA;A;AAED;AACA;AACA;A;A;A;AAMA;A;AAGD;;AACC;AAD8B;A;A;A;A;AAQhC;A;AAGD;A;;;;;;AASA;A;;;;;A;;;;;;;A;A;A;A;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrHA;A;AAEC;A;AAED;A;;;;;AAIsC;A;;;;;AAIO;A;;;;;;AAqBzC;AACJ;A;;;;A;;;;;;AAuBA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;;;AAcD;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;ACVD;A;;;;AAOC;A;;;;;;;;;;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzCG;;;AACH;;;A;AAEC;AACA;A;AAED;A;AAEC;A;AAED;A;AAED;A;;;;AAcI;AACD;;;A;AACF;A;AAED;A;;;;;AAmBA;A;;;;;AAIA;A;;;;;AAI+B;A;;;;;;;;A;AAM9B;AACA;AACA;A;AAED;;;AACA;A;AAEC;A;A;;;;;;;A;;;;;;;A;A;;;;;A;AAUD;;;AACA;A;AAEC;A;A;AAGC;AACA;A;AAED;A;AAEA;A;A;A;;;;;A;;;;AAUD;;;;;AACC;;AACA;A;;A;;;;;;AAKG;AACA;AACJ;;A;AAEE;;;;A;AAEA;;;A;A;A;;;;;A;A;;;;;A;A;AAaD;AACA;A;AAEC;A;;;;;A;AAGM;A;AAEN;A;AAEA;A;AAEA;A;A;;;;;A;A;AAKD;A;A;;;;;A;;;;;;;AAMG;AACA;AACJ;;A;AAEE;;;;A;AAEA;;;A;A;A;;;;;A;A;;;;;A;A;AAUD;AACA;A;AAEC;A;;;;;A;AAGM;A;AAEN;A;AAEA;A;AAEA;A;A;;;;;A;A;AAKD;A;A;;;;;A;;;;;;;;A;A;A;A;;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1SD;A;;;;A;AAOC;A;AAED;A;A;AAEC;AACA;A;A;AAUA;AACA;A;AAED;A;;;;A;AASC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;AAED;A;;;;AAIA;A;;;;;AA4BA;AACA;AACA;AACA;A;;;;;AAIA;AACA;AACA;AACA;A;;;;;AAIA;AACA;A;;;;;AAKA;AACA;A;;;;;;A;AAKC;A;AAED;;AACA;AACA;A;;;;;AAKI;;;AACH;AACA;AACA;AAHyB;A;AAK1B;A;;;;AAiBA;AACI;;;AACH;AACA;AAFyB;A;AAI1B;AACA;A;;;;;AAOA;AACA;AACA;A;AAGC;;A;AAEE;A;AAED;AAJY;A;A;AAOd;AACA;AACA;AACA;AACA;A;;;;;;AAkBG;A;AACF;AACA;A;AAED;;A;AACC;;A;AAED;AACA;A;;;;;;;AAQG;A;AACF;A;AAED;;A;AAEC;;A;;AAEA;A;A;;;;;;;;AAQD;AAII;;;AACH;;AACA;;;;;A;AACC;A;AAED;AACA;A;AAED;A;;;;;;AAMA;AACA;A;;;;;AAKA;A;;;;;AAKA;AACA;AACA;AACA;AACA;A;;;;;AAKA;AACA;AACA;A;;;;;AAKA;AACA;;AACA;A;;;;;AAMA;AACA;A;;;;A;AAkCC;A;AAED;A;AAEC;A;AAED;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;A;AAKC;A;AAED;A;AAEC;A;AAED;A;AAGC;A;AAEA;A;AAEA;A;AAEA;A;AAED;A;;;AAMA;A;;;AAaA;AACA;AACA;AACA;AACA;A;AAEC;AACA;A;AAED;A;;;;AAOA;AACA;AACA;AACA;AACA;A;AAEC;A;A;;;;;AAOD;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAIA;AACA;A;AAEA;AACA;A;AAKC;A;AAMA;A;AAEA;AACA;A;A;AA1BW;A;AA8Bd;A;;;;;AAYA;A;AAEC;A;AAED;AACA;AACI;;;;;;A;AAIF;AACA;A;AAED;A;AAMC;AACA;AACA;A;AAEC;A;AAEA;A;A;AAGA;A;AAEC;AAxBsB;A;A;A;A;AA6BzB;AACA;AA9ByB;A;AAgC1B;A;;;;;A;AC5ZC;A;AAKD;A;;;;;AAOA;A;;;;;AAamC;A;;;;;AACA;A;;;;;AAGU;A;;;;;AACA;A;;;;;AAG7C;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;A;;;;;AAKA;A;;;;;A;AAMC;A;AAED;A;;;;;AAMA;A;;;;;AAMA;A;;;;AAYA;AACA;A;;;AAIA;;;AACA;A;;;AAIA;;;AACA;A;;;;A;AAMC;;A;AAED;;A;;;;;A;AAMC;;A;AAED;;A;;;;A;AAQC;A;AAEA;A;AAOC;A;AAED;A;AAGD;AACA;AACA;A;AAEC;AACA;AACA;AACA;A;AAEC;A;AAGC;AACA;AACA;A;AAED;A;A;AAGF;A;;;ACnPA;A;;;AAIA;A;;;;AAIA;AACA;A;;;;;AAIA;AACA;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;;AAA4C;A;A;AAG5C;;AAA8C;A;A;AAG/C;A;;;;;A;AAKC;;AAAqD;A;A;AAGrD;;AAAyD;A;A;AAG1D;A;;;;;A;AAKC;A;AAEG;;;AACH;AADkB;A;AAGnB;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;;AAII;A;A;A;;A;AAKH;;;A;A;A;;A;AAKA;;;A;A;A;;A;A;;A;;;;;;ACtED;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;AACA;AACA;;AACA;A;;;;;;;;AAKA;A;AAEC;AACA;AACA;A;AAED;AACA;AACA;AACA;AACA;;AACA;A;;;;;;;;AAOI;A;AAEJ;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;;AAEA;;A;A;AAED;;A;AACC;;A;A;AAGA;AACA;A;AAED;AACA;AACA;AACA;;AACA;AACA;A;;;;;;A;AASC;A;AAED;A;;;;;AAKA;A;;;;;AAIA;AACA;A;;;;;AAKA;A;;;;;;AASA;;A;;;;;;AAIA;A;AAEC;AACA;A;A;AAGA;AACA;AACA;A;AAED;;AACA;AACA;;A;;;;;AAIA;A;AAEC;AACA;AACA;A;A;AAGA;AACA;AACA;A;AAED;;AACA;AACA;;A;;;;;AAIA;AACA;AACA;;;A;AACC;A;A;AAEA;AACA;;AACA;AACA;;A;AAED;AACA;A;;;;AAIA;A;;;;AAMA;AACA;AAEI;;;AAA4C;A;AAEhD;;AACC;;A;AAEC;AACA;A;AAED;A;AAGD;AACA;;A;;;;;AAMA;AACA;AACA;;AACC;;AACA;;A;AACC;AACA;AACA;AACA;AACA;A;AAED;AACA;A;AAED;AACA;AACA;;A;;;;;;AAKA;AACA;;;;AACA;AACI;AAAH;;A;AACC;AACA;AACA;A;AAEC;A;;A;AAGA;A;;A;AAGD;A;;AACS;AAAH;;A;AAKN;AACA;;;A;AACC;A;A;;A;A;A;AASA;;A;AACC;AACA;A;;;A;AAID;AACA;AACA;A;AAED;AACG;AAAH;;A;AACC;AACA;A;;AAEA;;A;A;A;AAIA;A;AAIC;A;;A;A;;A;A;AAAA;A;;A;A;;A;AAKF;AACA;AACA;;;;AACA;;A;AACC;A;AAED;A;;AACS;A;AACT;AACA;AACA;;;;A;AAEC;AACA;A;AAEA;A;;A;A;AAID;A;AAEC;A;AAED;AACA;A;A;A;A;AAGA;AACA;A;AAED;AACA;;AACG;A;AACF;A;AAEA;AACA;A;AAED;;A;AACC;A;A;A;A;;A;AAMD;A;A;;AAGF;AAGC;AACA;;A;;;A;;;;;AAKA;AACC;AACG;A;AACF;AACA;A;AAED;;A;AAEC;A;AAEE;A;AACF;AACA;A;A;AAIF;A;;;;;AAIA;AACA;AACA;AACA;AACA;;AACA;A;;;;;AAKA;;;;AACI;AACJ;AACC;;A;AACC;A;AAED;AACA;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;A;AAEC;AACA;A;AAEA;AACA;AACA;A;AAED;;AACG;A;AACF;A;AAEA;AACA;A;AAED;;A;AACC;A;A;AAGF;AACD;AAEC;AACA;;AACA;AACA;;A;AACC;AACA;;AACA;AACA;AACA;AACA;;A;AAED;AACA;AACA;;A;;;;;AAKA;AACI;A;AACF;AACA;A;AAED;;AACG;A;AACF;A;AAEA;AACA;A;AAED;A;AAED;AACA;AACA;A;;;;;AAIA;AACA;AACA;AAIA;AACA;AACA;;A;;;;;;;AC7ZA;AACA;AACA;;;;A;AAEC;A;AAED;AACA;AACA;AACA;;A;;;;;;;;AAKA;AACA;AACA;;;;A;AAEC;A;AAED;AACA;AACA;AACA;;A;;;;;;;;AAKA;AACA;AACA;;;;A;AAEC;A;AAED;AACA;AACA;;AACC;AACG;;A;AACF;A;AAED;;;A;AAED;A;;;;;AAIA;AACI;;;AACH;A;AAEC;A;AAED;AACA;AACA;;A;AAEE;A;AAED;AAJa;A;AAPW;A;AAc1B;A;;;;;;;;AAKA;AACA;AACA;;;;A;AAEC;A;AAED;AACA;;AACK;;;AACH;A;AAEC;A;AAED;AACA;AACA;;A;AAEE;A;AAED;AAJa;A;AAPW;A;AAc1B;A;AAED;;AACI;;A;AACF;A;AAED;;;A;AAED;A;;;;;;AAOA;;;;A;AAEC;A;AAED;AACA;AACA;;A;AAGC;AACA;AACA;AACA;AACA;;AACA;AACA;A;AAED;AACA;AACA;AACG;AAAH;;;A;AACC;;AACA;A;A;AAEA;;AACA;AACA;A;AAED;AACA;A;;;;;A;AAKC;A;AAED;;;AACA;AACA;A;;;;;;AAMA;;A;;;;;;;;;A;AAKC;A;AAED;AAEA;;A;AACC;;;AACA;A;AAEC;A;AAED;AACA;;A;AAED;AACA;;A;;;;;;AAIA;AACA;;;;AACA;AACG;AAAH;;A;AAEC;AACA;AACA;;A;AAED;AACA;;A;AACK;AACJ;;A;AACC;;AACA;;A;AACC;;A;AACC;A;AAED;;A;A;AAGF;;A;AACC;;AAEA;A;AAED;;A;AACC;;A;A;AAGF;;AACA;;A;;;;;AAII;;;AACH;;AACA;;A;AAED;A;;;;;;AAMA;;A;;;;;;;AAMA;;;AACA;A;;;;;;;;;AAMA;;;;A;A;AAGE;A;AAEA;A;A;A;;;;;A;;;;;;;;;AASF;;;;A;A;AAGE;A;AAEA;A;A;A;;;;;A;;;;;;;;;AAWE;AACJ;AACA;AACI;;;AACA;A;AACF;AACA;AACA;AACA;AACA;A;AAED;;A;A;A;;;;;A;A;;;;;A;A;A;AAYC;A;A;;;;;A;A;A;;;;;A;A;A;A;AAUC;A;A;A;AAIA;A;A;AAGF;AACA;A;A;A;AAIC;A;A;;;;;A;A;;;;;A;;;;;;;AAUF;;;AACA;A;;;;;;;AAMA;;A;;;;;;;AAIA;A;AAEC;A;AAED;AACA;AAIA;AACC;;A;AAEC;A;AAEE;A;AACF;A;AAED;A;A;AAGE;A;AAED;A;A;A;;;;;;;;AAQF;;A;;;;;;;AAOA;;A;;;;;;;AAOA;;A;;;;;;;A;A;AAME;A;AAED;A;AAED;AACA;;A;A;AAGE;A;AAED;A;AAED;AACA;AAEI;;;AACH;;A;A;AAGE;A;AAED;A;AAIE;A;AACF;A;AAXiC;A;A;AAelC;A;AAED;A;;;;;;;AAMA;;A;;;;;;AAIA;AACA;;;;A;AAEC;A;AAED;;A;A;AAEE;A;AAED;AACA;;;;A;AAEC;A;A;A;AAID;A;A;AAGA;A;AAED;AACA;AACI;;;AACH;;;;AACG;A;AACF;A;A;A;AAIC;A;AAED;A;AATmC;;AAYrC;A;;;;;AAQA;;A;AAEC;A;AAEE;AAAH;;;A;AAEC;;A;AACC;A;A;A;AAGD;AACA;A;AAEE;;A;AACF;A;AAED;AACC;A;A;AAGE;A;AAED;A;AAED;;A;A;AAGE;A;AAED;A;AAEE;A;AACF;A;AAEA;AACA;A;AAEE;;A;AACF;A;A;AAGH;AACC;;;A;AACC;A;AAED;A;;;;;AAMA;AACA;;AAAyC;A;A;AAGxC;A;AAED;;A;;;;;AAMA;AACA;;;;A;AAGC;A;A;AAGA;A;AAEG;AACJ;AACA;AACA;AACA;AACC;AACA;A;AAIC;A;AAED;AACA;A;AAEC;A;AAED;;;;A;AAEC;A;A;AAGF;AAEI;AACJ;AACA;AACI;A;;AACH;AACA;AACA;AAHsB;A;A;;;;;;;;;ACpkBvB;;AAEC;A;AAEC;A;AAED;AACA;AACA;;AACA;AACA;AAIA;;A;AAEC;A;AAED;;A;AACI;;;A;AACF;A;AAED;AACA;A;A;A;;;;;A;;;;;;;AAQF;;A;AACC;;;A;AAEC;A;A;AAGF;A;;;;;;AAQA;AACA;AACA;A;;;;;;AAeA;A;AAEE;AACA;A;AAEC;A;AAED;A;A;AAGA;A;AAED;AACA;AACA;AAEA;;;;AACA;AACA;;;;AACA;;A;AACC;;A;AAED;;A;AACC;A;;AAEA;;A;AAEC;A;A;A;A;;;;;;;AAUH;AACA;AACA;AACA;A;;;;;;;ACijFA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAoCD;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;AAoCD;A;;;;A;AAOC;A;AAEA;AACA;A;A;;;;;;;AA26CD;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAoCD;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;AAoCD;A;;;;A;AAOC;A;AAEA;AACA;A;A;;;A;;;;;;;;;AC36ID;AAEA;AACA;AACG;A;AACF;AACA;AACA;A;AAED;;;;AACA;AACA;;A;AACC;;;;;A;;;;;;;A;A;AAIA;A;A;;;;;;;A;;;;;A;AAQA;A;AAED;AACA;A;;;;;;;;;AASA;AACA;AACA;AAEC;AACA;;A;A;;;;;;;A;AAIA;AACA;AAGA;AACA;AACG;A;AACF;AACA;AACA;A;AAED;;;;AACA;AACA;AACA;A;A;AAGE;A;A;;;;;;;A;A;A;;;;;;;AC9CH;AACA;AACA;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;;A;;;;;;;AA2JA;;A;;;;;;;AAQA;AACA;AACA;;A;;;;;;AAMA;A;AAEC;A;AAEA;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;AA0DA;;A;;;;;;;AAOA;;A;;;;;;;AAMI;AACA;AACJ;;A;AACC;;;;;A;A;AAIA;;AAAiC;;A;A;AAOjC;A;AAED;AACA;;AACC;AACA;;A;A;AAIE;A;AANmB;;A;AAUrB;;;A;AACC;;;AACA;;A;A;AAEE;A;AAdkB;;A;AAmBpB;AACA;AACA;;A;AACC;;A;A;AAMA;A;A;A;AAGD;A;AA/BoB;;AAkCtB;;A;AACK;;;AACH;;;A;AACC;AACA;A;AAHkC;;A;A;AAQhC;;;AACH;A;AAEC;;;A;AAEC;A;AAED;AACA;A;AAED;A;AAEC;A;AAZkC;;A;AAgBrC;A;AAGC;A;AAEC;A;A;AAGA;A;A;AAGF;A;;;;;;A;AAuCC;A;AAID;;A;A;AAGC;A;AAED;A;;;;;;;;AAKC;AACA;AAMG;AACA;;;AACH;;;A;AAEC;AACA;AACA;A;AAEC;A;AAED;A;AAED;AACA;AACA;AACA;A;A;AAIC;A;A;AAGC;;AACA;A;AAED;A;AAEA;AACA;A;AAEA;A;AAGA;AACA;A;AAED;A;AAED;;A;AAEC;;A;AACC;;A;A;;AAGD;AACA;;;A;AACC;;A;AAGD;A;A;;;;;;;A;;;;;AAeD;AACA;AACA;A;;;;;AAIA;A;;;;;A;AAKC;A;AAED;A;;;;;A;AAKC;A;AAED;AACA;A;AAEC;A;AAED;A;;;;;AAKA;A;A;AAGE;A;A;AAGD;A;AAEC;A;A;A;;;;;A;AAOD;A;AAED;A;;;;;A;A;A;AAUE;A;AAEA;A;A;A;AAIA;A;AAEA;A;A;A;AAIA;A;A;AAID;A;AAED;A;;;;;AAIA;;;A;AACC;A;AAIG;;;AACH;;;A;AAEC;A;AAEE;A;AACF;A;AAED;A;AAED;A;;;;;;A;A;A;;A;A;;A;A;A;;A;AA6EA;A;A;;A;A;A;;A;AAQA;;;AACA;A;A;;A;A;A;;A;AAQA;AACI;;AACH;A;AAEC;A;AAEA;A;AAED;A;AAEC;A;AAEE;A;AACF;A;AAED;;;AACA;A;A;A;;A;A;;A;;;;AASG;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AC5rBgC;A;;;A;AAK/B;A;AAED;A;AAEC;A;A;AAGA;A;AAED;A;AAEC;;;;;;AACC;A;;A;AAGF;;;;;;AACA;;AACC;;;;AACI;;A;AAEF;A;AAED;;;A;AAEC;A;AAED;AACA;A;AAEC;A;AAED;A;AAEC;A;AAEA;A;A;AAGA;A;AAED;A;AAEC;A;AAxBe;A;AA2BjB;AACA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;AACA;A;AAED;A;;;AASA;AACA;AACA;;;;;;AACA;;;;AACA;;;;;;A;AAEE;AACA;A;AAEA;A;A;;AAGF;A;AAEC;A;AAED;;AACC;AACA;;;;;;A;AAEE;A;A;;AAGF;A;AAEC;A;AAED;AACA;;;;;;A;AAEE;A;AAEC;A;AAED;;A;A;AAGA;;A;AAED;AACI;;AACH;A;AAEC;A;AAEA;A;A;AAGA;A;AAED;AACA;AAXgB;A;AAajB;AACA;AACA;AACA;AACA;A;;AAED;AACA;A;AAED;A;;;;;A;A;;;;;A;A;;;;;A;A;;;;;A;A;;;;;A;;;A;AAkBC;A;AAEA;A;AAED;A;;;A;AAMC;A;AAEA;A;AAED;AACA;AACA;;AACC;AACA;A;AAED;A;;;;;;ACqLA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;;;;AAoCD;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAUC;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AASA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;AAIA;AACA;AACA;A;A;;;;;A;A;;;;;A;A;;;;;A;;;;;A;AA2CA;A;AAEA;AACA;A;A;;;;;ACviBD;A;AAEC;AACA;A;AAED;A;A;AAGC;A;AAEI;;;AACH;AACA;AAFkD;A;A;AAKpD;A;;;;;AA4BA;AACA;AACA;AACA;AACA;;AACC;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;;;AC0BA;A;;;;;AAIA;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;ACnGA;A;AAEC;A;AAED;A;;;;ACuEA;AACA;A;;;;AAUA;;;;;A;AAEE;A;A;;AAGF;A;;;;AAKyB;A;;;AASzB;;AACC;A;AAED;;AACC;A;AAED;A;;;AAQA;AACG;A;AACF;A;AAED;A;;;A;AAMC;A;AAED;A;;;A;AAMC;A;AAED;;;;;;;A;AAGE;A;A;AAGA;A;A;;AAGF;A;;;AAMyB;A;;;AAQzB;A;;;A;AAeC;A;AAED;;;;;;A;AAEE;A;A;;AAGF;A;;;;AAgBI;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;;AA6EI;;;AACH;A;AAEC;A;AAHsB;A;AAMxB;A;;;;AAII;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;;A;AAOC;A;AAGD;;;;;A;AAKC;AACA;A;AAED;;;;A;AAIC;A;A;AAGA;A;AAED;A;;;;;;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrTA;AAMA;AACA;AACA;A;;;;;;;AAOA;A;AAGC;A;AAEC;A;AAED;AACA;A;AAGD;;;;AACA;;A;AACC;A;;AAEA;AACA;;A;AACC;A;A;AAIA;A;AAEA;A;A;AAGF;;;;A;AAEC;A;AAED;A;;;;;;;;;AAWA;;;;A;A;;;;;A;AAKA;;;;A;A;;;;;A;A;;;;;A;;;;;;;A;AAaC;A;A;AAGA;A;AAED;AACA;A;;;;;;;;AAWA;AACA;;A;AACC;AACA;A;A;;;;;;;AAMD;A;;;;AAMA;AACA;AACA;AACA;A;;;AAWA;AACA;AACA;A;;;AAWA;AACI;A;AAEH;A;AAEA;A;AAED;AACA;AACA;A;;;AAMA;AACA;AACA;AACA;A;;;AASA;A;AAEC;A;AAED;AACA;AACA;;AACC;AADe;A;AAGhB;A;;;AASA;A;AAEC;AACA;AACA;AACA;A;AAEA;AACA;A;AAED;A;;;A;AAUC;A;A;AAGA;A;AAED;A;;;;;ACxNA;;A;;;;;;;AAQA;;A;;;;;;AAkBA;A;;;;;;AAII;A;AAEH;A;AAED;;A;;;;;;AAiBA;A;;;;;AA2BA;AAIA;AACA;AACA;AACA;A;;;;;;AAYA;A;;;;;AAOA;A;;;;;AAU0C;A;;;;;AAIJ;A;;;;;;AAMtC;A;;;;;;;AAOA;A;;;;;;AAYA;AACA;A;;;;;;;;AAIA;AACA;AACA;A;;;;;;;;AAKI;AACJ;;AACC;AACA;A;AAED;A;;;;;;;AAOA;A;;;;;;;A;AAMC;A;A;A;;;;;A;A;AAMA;A;AAKD;A;;;;;A;;;;;;;;;AASI;AACJ;AACA;AAAe;A;AACf;;AAA+B;A;AAC5B;;;A;AACF;A;AAEE;A;AACF;A;AAED;A;;;;;;A;AAKC;AACA;A;AAED;A;;;;;;;;A;AAQC;A;A;AAKA;A;AAEA;AACA;AACA;A;AAGD;;AACC;;A;A;A;;;;;A;AAWC;A;;;;;A;A;AAIA;A;A;A;;;;;A;;;;;;AAmBmC;A;;;;;AACA;A;;;;;;AAOrC;AAEA;;;;;;A;AAIC;;A;AAKA;;A;AAKA;;A;AAKA;;A;AAKA;;A;A;AAGD;A;;;;;;;AAKA;AACA;;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;AACA;;A;;;;;;;AAKA;AACA;;;;A;AAEC;A;AAGG;AACJ;AACA;;A;AACC;;;A;AAEC;A;AAED;A;;AAEA;;;;;A;AAEC;A;A;AAGF;;;;;A;AAEC;A;AAED;AACA;;A;AACC;A;AAED;AACA;;A;;;;;;;A;A;AAME;A;A;AAGF;;A;AACC;A;AAED;A;;;;;;;A;AAQC;A;AAGD;AACA;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;;;;;A;AAeC;A;A;A;;;;;;;A;AAKD;A;AAEC;A;A;A;;;;;;;A;AAMD;AACA;AACI;AACJ;;AACC;AACA;AACA;A;A;;;;;;;A;AAIA;A;A;;;;;;;A;A;A;;;;;;;A;;;;;;;;A;A;;;;;;;A;AAoBD;AACA;;;;A;A;;;;;;;A;A;A;;;;;;;A;A;A;;;;;;;A;A;A;AAYE;A;A;;;;;;;A;AAKF;;A;AACC;;AACA;AACA;AACG;;A;AACF;A;;;;;;;A;AAGD;AACA;A;A;;;;;;;A;;;;;;AC3bD;;AACA;AAIA;;;;;;AACA;;;;;AACC;AACA;AACA;AACA;;AACC;AACA;A;AAEC;A;A;A;AAIC;A;AAED;AACA;AACA;AACA;A;AAEA;A;A;A;;AAIH;;AACC;A;AAEC;A;A;AAGA;A;A;AAGA;A;AAED;AACA;AACA;AACA;A;A;AAKA;A;AAEE;A;AAEF;A;AAGD;A;;;AAaA;A;;;;AASA;AACA;A;;;;A;AAKC;A;AAED;AACA;;;;;;AACC;A;;A;;;AAKD;AACA;;AACC;AACA;A;AAEC;A;AAED;A;AAED;AACA;;;;AACI;;;AACH;AAD8B;A;A;;;AAQ/B;AAEI;;;A;AAEF;A;AAED;;;AAJuB;A;A;AASvB;AACA;AAEA;A;AACA;A;AAGD;A;;;;AAMA;AACI;;;AACH;AADuB;A;AAGxB;A;;;;AAQA;AACA;AAEA;A;AAEE;A;AACA;AACA;AACA;A;AAGD;A;AACA;AAEA;AACA;A;AAGC;A;AAGD;A;AAGD;A;;;;AC/KA;AACA;A;;;;;AAKA;A;;;;;AAKA;AACA;AACA;AACA;A;;;;;;AAKA;;A;AACC;;A;AAEG;;;AACH;AACA;A;AAEC;A;AAEE;A;AACF;A;AAPiB;A;AAUnB;AACI;;;AACH;AADkC;A;AAGnC;A;AAEC;A;AAED;A;;;;;;;;;;AAkBA;;A;AACI;AAAH;;A;A;;;;;;A;A;AAIE;AAAH;;A;A;;;;;;A;A;;;;;A;;;;;;;AASA;;A;AACC;;A;AAED;A;AAEC;A;AAED;A;;;;;AAsEA;AACA;AACA;;;;;AACC;A;;AAED;A;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;;;A;A;A;A;ADzL0B;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEO1B;;A;AAEE;AACA;AAED;;;AAEE;;A;A;AAEC;A;A;A;;;;;A;A;;;AASH;;A;AACK;AACJ;A;AACI;A;;;;;A;A;AAIN;AACA;A;;;;;A;;;;;;AAQA;AACA;A;;;;;;;;;AAQA;AACA;;;;;;A;A;;A;;;AACC;;;;;AACC;A;;A;;AAGF;AAKA;;A;AAGC;;;;AACA;;A;AACC;;AACA;A;AAED;;AACA;A;AAED;AAGC;AACA;AAED;;;;AAEE;AACA;;AACC;AACA;A;AAGD;AACG;;;A;AACF;A;AAGD;;;;;;A;A;A;A;A;;;;;AAaA;;;;;;;A;A;A;A;A;;;AAMF;;;;;;;A;AAGC;A;AACI;AACJ;A;AACI;AACJ;A;A;;;;;;ACrGD;A;;;;;;;;;;AAQA;A;AAGC;A;AAED;AACA;AAEA;AACA;AAEA;;;AACC;;;AACA;AAEA;A;A;AAGI;;;A;AACF;A;A;AAGD;A;A;A;;;AAaF;;;A;A;;;AAIA;;;A;A;;;AAIA;AACA;AACA;;;;;;A;A;;A;;;AACC;;;;;AACC;A;;A;;AAGF;;A;AACC;A;;AAEA;;;;AACA;;A;AACC;;AACA;A;AAED;;AACA;A;AAGD;;A;AACK;AACJ;A;AACI;AACJ;A;A;;;;;;;AAKE;;;A;AACF;A;A;;;;A;ACwCA;A;AAED;A;AAQC;AACA;A;AAED;A;;;;;;;;AAKA;;A;AACC;;;;;;AACC;A;;A;AAGF;;;;;A;A;;;;;;;A;AAIA;;A;AACI;;AAAH;;A;AACC;A;A;A;;;;;;;A;;;;;;A;AAQD;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;;;;;;AAMA;AAEA;;A;AACC;A;;;;;;;A;AAID;;A;AACC;A;;;;;;;A;AAID;;A;AACC;A;;;;;;;A;AAMD;A;AAEE;AACA;A;A;AAOF;;A;AACC;AACA;A;AAGE;AAAH;;A;AACC;AACA;;AACA;AACA;AACA;A;AAGD;;A;AACC;A;AAED;;;AAEA;;;;AACA;;A;AACC;AACA;;A;AACC;A;AAEE;;;A;A;AAKD;A;A;A;;;;;;;A;A;AAMF;A;A;;;;;;;A;;;;;;A;A;;;;;A;AAsBD;AAEA;AACA;AAEA;;;AAEC;AAQA;;;;A;A;A;A;A;AAKC;A;A;;;AAIF;AACI;AACJ;;;AAAqB;AAAiB;A;A;;;AAEtC;AACI;AAEJ;;;AACC;;;;;;A;AAEC;AACA;A;A;AAEA;AACA;A;A;AAEA;A;A;;;A;;;;;A;;;AAaF;AACA;A;;;;;;;AAmDA;;;;A;A;;;;;A;A;;;;;A;;;;AAOyB;A;;;;;AAWzB;A;AAEC;A;AAED;;A;;;;;;;;AAMA;A;A;AAEC;AACA;AACA;A;AAOC;A;A;AAGD;AACA;AACA;A;AAUC;AACA;A;A;AAOA;A;A;A;A;;;;;;;A;;;;A;AAUD;A;AAED;;A;;;;;;AAyCA;;A;;;;;;;;;;;;;;;AAMA;;A;AACC;;;AAAe;A;;;A;AAEhB;;A;AACC;A;;;;;;A;AAQA;AACA;AACA;AACA;;AACA;AAGA;AACA;AAED;;;AAEC;;A;AACC;A;AAEG;A;AAEH;A;AAEA;A;AAED;;A;;AAMD;AAGC;;A;AACC;AACA;;A;AACC;A;;;;;;;A;AAGD;;;;AACA;;A;AACC;A;;;;;;;A;AAGD;AACA;;A;AAII;;;A;AACF;A;A;AAGF;AACA;AASA;;A;AACC;;;;AACA;;A;AACC;A;;;;;;A;AAGD;A;AAOD;AAIG;A;AACF;A;AAED;;A;A;;;;;A;AAeA;;A;AACC;;A;AAED;;AAEA;;A;AAKC;;AACA;A;;;;;A;A;AAKF;AACI;AACA;AACD;;;;;AAAH;;A;AAEC;AACA;;;;;A;AACC;;A;A;;;;;;A;AASE;AACJ;;;;A;A;;;;;A;AAKA;A;A;;;;;;;;;;;;AAWA;AACA;AAED;;A;AACC;AACA;;;;;;AACC;A;;A;AAIF;AACA;;;AAYC;;A;AACK;AACJ;AACA;;;;;;AACI;;A;AACF;AACA;A;A;;AAGF;;A;AACC;AACI;AACJ;;;;;;A;A;;A;;AACC;;;;;AACC;A;;A;;AAGF;AACA;A;A;AAMF;;;;;;A;A;;A;;;AACC;;;A;AACC;A;A;;AAIF;A;;;A;;;;;A;AAMA;A;AAED;A;;;;;;A;;;;;A;;;;;;;;;AAgCA;;;;A;A;;;;;A;AAIA;A;;;;;A;;;;;;;;;A;;;;;;;;;A;;;;;;;;;AA6DA;;;;A;A;;;;;A;A;;;;;A;;;;;;;;;AAkBA;;;;A;A;;;;;A;AAIA;A;A;;;;;A;AAIA;;;A;AACC;;A;A;;;;;A;;;;;;;AAUD;;AACA;AACA;A;;;;;;A;AAKA;;A;AAcC;;AACA;;AACA;A;A;AAGD;A;;;;A;AASC;A;A;AAMA;A;AAED;A;;;AAIA;;;A;AAEC;A;AAGD;A;;;;AC91BA;A;AAEC;A;AAED;AACA;;;;;AACC;;;AACA;;A;AACC;;A;AAED;;AACA;AACA;;A;AACC;;A;AAED;;;;AACA;;;A;AACC;;A;AAED;;;AACA;;A;AACC;;A;AAED;AAKI;;;AACH;;AACA;;A;AAF2B;A;A;AAM3B;;;;AACG;A;AACF;;;;A;AAED;;AACA;;;AACA;;A;AACC;AAb0B;A;A;A;AAiB3B;;;;;;;;A;AACC;;A;A;AAGC;A;AAEA;A;AAEA;A;AAzByB;A;A;A;AA6B1B;AA7B0B;A;A;A;AAgC1B;AAhC0B;A;A;A;AAmC1B;AAnC0B;A;A;A;AAsC1B;;;A;AAEC;A;A;AAGA;A;AAED;AA7C0B;A;A;A;AAgD1B;AACA;;;;AACA;;A;AACC;;;;A;AAEC;AACA;A;A;AAGF;AAzD0B;A;A;A;AA4D1B;AA5D0B;A;A;A;AA+D3B;AA/D2B;A;AAiE5B;A;;AAED;A;;;;;;AAiBA;;;;;A;AACC;A;AAEG;AACJ;;;AACA;AACA;;;AAEA;;A;AACC;AACA;;;A;AAED;;A;AACC;;A;AAKC;A;AAEC;A;AAED;AACA;A;;AAEA;A;A;AAGE;AACJ;;;A;AACC;AACA;;;A;A;AAGA;AACA;A;AAEA;A;A;AAGA;A;A;AAGA;A;A;A;AAIA;A;AAEA;A;AAEA;A;AAED;A;;;;;;AAQA;;;A;AAEC;A;AAGD;AACA;;;;;AACC;;;AACA;;A;AACC;;A;AAGG;;;AACH;;AACA;;A;AAF2B;A;A;AAK3B;;;;AACG;A;AACF;;;;A;AAED;;;A;AAT2B;A;A;A;AAAA;A;A;AAe3B;;;A;AAf2B;A;A;AAmB3B;AAnB2B;A;A;;AAsB7B;A;;;;A;AAMC;A;A;AAGA;A;AAED;A;;;;AAMA;;A;;;;A;AAQC;A;A;AAGA;A;A;AAKA;A;AAED;AACA;AACA;AACI;;;AACH;A;AAMC;AACA;A;AAGA;A;A;AAIC;A;AAED;A;A;AAIC;A;A;AAGA;A;AAED;A;AAtBA;A;AAwBD;AA5BuB;A;A;AA+BvB;A;AAGD;A;;;;AAMA;;A;;;;;AAcA;;A;AAEC;A;A;AAGA;A;AAED;A;;;;AAIA;A;;;;AAMA;;A;;;;AAIA;A;;;;AAIA;AACI;;;AACH;;;A;AADuB;A;A;AAIvB;AACA;AACA;A;A;AAGA;A;AAED;AACI;;;AACA;AAAH;;;A;AACC;A;AAFsB;A;AAKxB;A;;;;A;AAMC;A;AAEG;;;A;AAEF;A;AAFwB;A;AAK1B;A;;;;A;AAKC;A;AAED;;A;;;;A;A;ACwQC;A;AAEA;A;A;;;;;AAoCD;;A;;;;;;AAoBG;;A;AACF;A;AAKD;A;;;;;;AAIA;;A;AAEC;AAEA;;;;A;AAEC;A;AAED;A;AAED;AACA;;;;;AACI;;AAAH;;A;AACC;;A;AACC;A;AAED;AACA;A;A;;AAGF;;A;AACC;AACA;A;AAED;AACA;AACA;AACA;;AACA;A;;;;;;AAaG;;;A;AAEF;A;AAED;A;AAEC;A;AAED;AACA;AACA;A;;;;;;AAMA;;;;AACA;AAEA;AACA;A;AAEC;A;AAED;A;;;;;;;;;;AAYA;AACA;;;;;AACC;;;A;AACC;A;;;;;A;A;;AAIF;;;AACA;;A;A;AAEE;A;AAED;AAIA;AACA;A;AAED;AAEA;;A;A;;;;;A;A;;;;;A;;;;;;;AAcA;;;;AAEA;AACA;A;AAEC;A;AAEA;A;AAED;AACA;AACA;A;;;;;;;AAWA;;;;;A;AAEE;A;A;;A;AAID;A;A;AAGA;A;AAED;AACA;A;;;;;;AAIA;AACA;AACA;;;;;AACC;;;A;AAEC;;A;AAED;A;AAEC;A;AAEA;A;A;;AAGF;A;;;;;;;;AAIA;AACA;AAOA;;;;;;A;A;;A;;AACC;;;;;AACC;A;;A;;A;;;;;;AAMF;AACA;;;;;A;AAEE;A;A;;A;AAMD;A;AAED;A;;;;;AASA;;A;;;;;;;;AAIA;AACA;AAIA;AACG;;A;AACF;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAED;;;AACC;;AACG;;;;A;AACF;AACA;A;AAMA;A;AAED;A;;AAEE;A;AACF;A;AAIA;A;AAED;A;;;;;;;AAMA;;;AACI;AAAH;;A;AACC;;A;A;;;AAGF;A;;A;;;;;;AAWA;;;;A;AAEC;A;AAED;A;;;;;;AA+BA;AACA;;A;AAEE;A;AAF0C;A;AAK5C;;A;;;;;AAIA;;;;;;A;AAEE;AACA;A;A;;AAGF;;A;;;;;;;A;AAsBC;A;AAEG;AACJ;;AACC;AACA;AACA;AACA;AACA;AACA;AAEA;;A;AACC;AACA;AACA;AACA;AACA;AACA;A;A;AAGF;A;;;;;;A;AAKC;A;AAED;A;;;;;AAKA;A;;;;;;AAKA;AACA;;AAIC;A;AAEC;A;AAED;;AACA;AACA;AACA;AACA;AACA;A;AAED;A;;;;;;;A;AAKC;A;AAEC;A;A;AAGF;;AACA;AACA;AACA;A;;;;;;;AAyCG;;;A;AACF;A;AAED;;A;;;;;;;AAQA;;A;;;;;AAYA;A;;;;;AAIA;;A;AACC;;A;AAED;;A;;;;AAU4C;A;;;;;;AAe5C;;A;;;;;;;AAMA;;A;;;;;;;AAMA;;A;;;;;;;AAMA;;A;;;;;;;AAMA;;A;;;;;;AAoBgD;A;;;;;AAGhD;A;AAEC;A;AAED;A;;;;;A;AAKC;A;AAED;A;AAEC;A;A;;;;;AAOD;A;AAEC;AACA;A;AAED;A;;;;;;AAsCG;;;A;AACF;A;AAED;;A;;;;;;AASA;A;;;;AAyEG;A;AACF;A;AAED;A;;;;AA8BqD;A;;;;;;;AAGjD;AACJ;AACA;AACA;AACA;A;;;;;;;AAIA;;;AACA;;A;AACC;AACA;AACI;;;AACH;;A;AADyB;A;A;AAIzB;A;AAEC;A;AAED;AACA;;A;AACC;A;;AAEA;;A;AAZwB;A;A;AAgB3B;;A;AACC;;A;AAED;;A;;;;;;;A;AAKC;A;A;;;;;AAIwC;A;;;;;AAoBzC;;;A;AAEC;A;AAED;A;;;;;A;AA2FC;A;AAED;A;;;;;AAKA;A;;;;;;AAeA;A;AAEC;A;AAED;AAIA;;A;AACC;A;AAGD;;;;A;AAEC;A;AAED;A;;;;;;;A;AAKC;AACA;AACA;AAGA;A;AAED;AACA;;;;AACA;;A;AACC;AACA;A;AAED;;;;A;;;;;;;AAGyC;A;;;;;AAEG;A;;;;;AAEC;A;;;;;AAG7C;A;;;;;A;AAaC;A;AAED;A;;;;;A;AASC;A;AAED;A;;;;AAKA;AAQA;;A;AAEE;A;AAED;AACA;A;AAED;AACA;A;;;;A;AASC;A;AAED;A;;;;;AAWA;A;;;;AAUG;;A;AACF;A;AAED;A;;;;;AAWA;AACA;;A;AACC;A;AAED;;;;A;AAEC;A;A;AAGA;A;AAED;;AACG;;;A;AACF;A;AAED;;;;A;AAEI;;;A;AACF;A;AAED;A;AAEE;;A;AACF;A;AAED;;A;AACC;;;;A;AAED;;A;AACC;;;A;AAED;A;;;;;;AAQA;AACA;A;;;;;;AAOA;AACA;A;AAEC;A;AAGD;;AACA;;;A;AACC;;A;AACC;;;;;;;;;A;AAKD;;A;AACC;;;;A;A;A;AAKD;;;;A;A;A;A;AAMC;A;AAEA;A;A;AAIF;A;;;;;;AAYA;A;;;;;AAQA;AACA;A;;;;A;AAUC;A;AAED;AACA;AAEI;A;AAEC;AACJ;;;;A;AAEC;A;A;A;AAQD;A;AAED;AACA;A;;;AAWA;A;;;AAIA;A;;;;;AASA;;A;;;;;;;A;AAcC;A;A;A;AAIC;A;A;AAGA;;;;;A;AAGE;A;A;;A;A;AAKA;A;AAEH;A;A;AAGA;A;AAED;A;AAEC;A;AAED;AACA;AACA;;A;;;;;A;AAqBC;A;A;AAUA;A;A;AAIA;A;AAED;AACG;;;A;AAIF;A;AAED;A;;;;AAIA;A;;;;;;;AAIA;AACI;;;AACA;A;A;;;;;A;AAD6B;A;A;;;;;A;;;;;AAWjC;AACA;A;;;;;AAMgD;A;;;;;AAIhD;A;AAEC;A;A;AAKI;;;AACH;AACI;;;AACH;A;AAEC;A;AAHuB;A;AAFL;A;AASrB;A;AAED;AACI;;;AACH;A;AAEC;A;AAED;AALoB;A;AAOrB;A;;;;;;AAMA;AACI;;;AACA;;A;AACF;A;AAF+B;A;AAKjC;A;;;;;;;AASA;AACA;;;;;AACC;AACA;A;;AAED;;A;;;;;;;AAQA;AACA;;A;;;;;;AAYuC;A;;;;A;AAItC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;;AAII;A;AAEH;A;AAED;AACA;AACA;;A;;;;;;AAiBA;AACA;A;;;;A;AAKC;A;A;AAGA;A;AAED;A;;;;;AASA;AACA;AACA;AACA;AACA;;A;;;;;;AAgBA;AACA;A;;;;AAIA;A;;;A;AAYC;A;AAED;A;A;AASE;A;AAED;A;AAED;A;;;;;A;AAaC;A;AAED;AACA;AACA;;A;;;;;;AAeA;AACA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;AAIA;A;;;;;;AAIA;A;A;;;;;A;AAUI;A;AAEA;;;;A;AACF;A;A;A;AAIG;AACJ;;;;A;A;;;;;A;AAIA;AACA;AACA;;;;A;A;;;;;A;A;A;A;;;;;A;AAQD;A;;;;;A;;;;;A;AAyCC;A;AAEG;A;AAEH;A;A;AAGA;A;A;AAGA;A;A;AAGA;A;AAED;A;AAEC;A;A;AAGA;A;AAEC;A;A;AAGA;A;AAED;AACA;A;AAED;AACA;AACA;;A;;;;;;AA4BA;A;;;;;A;AAKC;A;AAED;;A;AACC;;A;AAED;AACA;AACA;A;;;;;;A;AAgBC;A;A;AAGA;A;AAED;AACA;A;AAEC;A;AAED;AACA;AACA;;A;;;;;A;AAYC;A;A;AAGA;A;AAED;A;;;;;A;AASC;A;AAED;AACA;AACA;;A;;;;;A;AAYC;A;AAED;A;;;;AAIA;AACA;A;;;;;AAIA;A;;;;;;A;AASC;A;AAEG;A;AAEH;A;AAED;AACA;AACA;;A;;;;;;AAYA;AACA;A;;;;;AAIA;A;;;;;;AAIA;A;A;;;;;A;AAcI;A;AAEA;;;;A;AACF;A;A;AAIF;;;;A;AAEC;A;AAED;A;A;;;;;A;AAMA;A;;;;;A;;;;;A;AAmCC;A;AAEG;A;AAEH;A;A;AAGA;A;AAED;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;AACA;;A;;;;;;;AAMA;AACA;AACA;;A;;;;;;;;A;A;;;;;;;A;A;;;;;;;A;;;;;;A;A;;;;;;;A;A;;;;;;;A;;;;AA4DA;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;;;AAMA;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AAMA;;;;;;A;AAEE;A;A;;AAGF;A;;;;;AAII;;;;AACJ;AACA;;;;;;A;A;AAGE;A;AAEA;A;AAEA;A;AAKD;;;;;A;AAEE;A;A;;A;;A;AAKF;A;AAED;A;;;;;AAIA;A;AAEC;A;AAID;A;;;;;;;;;;;;A;AAQC;A;AAED;AAGI;AACA;AAEA;AACJ;AACA;AACA;AACA;;;AACC;;A;AACC;A;A;AAGA;A;AAED;A;A;AAGE;A;A;AAGD;A;AAEC;A;A;A;AAKD;AACA;A;AAGD;A;AAEC;AACA;AACA;A;AAED;AAEA;A;;;AAGD;;A;AAEI;AACJ;AACC;;AACG;;;A;AACF;A;AAGD;;;A;AACC;A;AAEE;;;;A;AACF;A;AAEA;A;A;AAIF;AACA;AAEG;A;AACF;A;AAED;;A;AACC;AACA;;A;AACC;A;AAED;A;AAEE;AAAH;;A;AACC;AACA;;A;AACC;A;AAED;A;AAED;A;;;;;;;;AAII;AACJ;;AACA;;;;;;;;A;A;AAEC;AACA;;;AACC;A;AAEC;A;AAED;;AACA;A;;;A;AAGA;A;A;A;A;AAGD;A;AAGC;A;AAED;;AACA;;A;AACC;;A;A;A;A;A;AAIA;A;AAED;;A;A;A;AAEA;;A;A;A;AAEA;;A;A;A;AAGA;;A;AAED;A;;;;AAIA;A;;;;AAIA;;A;AACC;A;A;;;;;A;AAMA;A;AAED;A;;;AAIA;A;;;;;;AAUA;;;;AACA;;;;;;AACG;AAAH;;A;AACC;;A;AAED;A;;;;;;;A;;;;;A;;;;AAQA;A;;;AAKkD;A;;;;A;AAIjD;A;AAED;A;;;;AAGkD;A;;;;AAGlD;;A;AAEC;A;AAED;A;;;;;;AAIA;;A;AAEC;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAED;AAEA;A;;;;;;AAIA;;A;AACC;A;A;;;;;;AAKD;;A;AACC;A;A;;;;;;AAKD;;A;AACC;A;A;;;;;;AAKD;;A;AACC;A;A;;;;;;AAKD;;A;AACC;A;A;;;;;;AAKD;;AACA;A;;;;;;AAKA;;A;;;;;;;AAKA;;A;;;;;;AAIA;;AACA;AACA;A;;;;;;AAOA;A;AAEC;AACA;A;AAED;;A;;;;;A;A;AAME;A;AAEA;A;A;AAGF;A;;;AAIA;A;;;AAIA;A;;;AAIA;A;;;;AAMA;AACA;A;;;;;A;AASC;A;AAED;;A;;;;;;A;AAKC;A;AAED;;;A;AACC;A;A;;;;;;;;A;AAMA;A;AAED;;;A;AACC;A;A;;;;;;;AAOD;;AACA;AACA;AACA;AAEA;AACA;AACA;;A;AACC;;A;AAED;AACA;;;AACA;;A;AACC;;A;AAED;A;;;;;;;AAYI;;;;A;AAGH;A;AAGD;AAEA;;;;A;AACC;AACA;A;A;A;A;AAQA;;;A;AACC;AACA;AACA;;A;AACC;AACA;A;A;A;AAGD;A;;AAEA;A;A;A;;AAID;AACA;A;A;AAGD;AACA;AACA;AAEI;;;AACC;AACJ;AAEA;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;;AAEA;AACA;AACA;A;A;AAED;;A;AACC;AACA;AACA;A;AAGD;;A;AAEC;AACA;AACA;A;AAED;AAEA;AACA;;A;AAEC;AACA;AACA;A;AAED;AApCuB;A;A;;;;;AAyCzB;A;;;;;A;;;;;A;AAOE;A;AAED;A;;;AASA;;;;;AAiDC;AACA;AACA;A;;A;;;;AAKE;;;A;AACF;A;AAED;;A;;;;;AAWA;;A;AAEC;A;A;AAGA;AACA;AACA;A;A;;;;;;AA4DD;A;;;;;;AAcA;;A;;;;;;A;A;A;AASE;A;A;A;AAIA;A;A;A;AAIA;A;A;AAGF;A;;;;;;AA0BG;;;A;AACF;A;AAED;;A;;;;;A;AAkBC;A;AAED;;;;;;A;AAEE;A;A;AAGA;A;A;;AAGF;A;;;AAMI;;;AACA;A;AACF;A;AAFsB;A;A;;;AAQrB;;;A;AACF;A;AAED;A;;;;;A;A;;;;;;;;AAa2B;;A;;;;;;;AAU3B;A;;;;AAKA;A;;;;;;AAKA;;A;;;;;;AAYA;A;;;;A;AAmBC;A;AAED;A;;;;;;;;AAIA;;A;AACC;;AACA;AACA;A;A;;;;;A;;;;;;;AAMD;A;AAEC;A;AAED;;AACA;AACA;AACA;AACA;A;;;;;A;AAKC;A;AAED;A;;;A;AAQC;A;AAEA;A;AAEA;A;AAED;A;;;;AAQyC;A;;;;;AAEA;A;;;;;AAEE;A;;;;;AAcV;A;;;;;AAEK;;;;A;;;;;AAEK;A;;;;;;AAO3C;AACA;;;;;;A;A;;A;;AACC;A;;AAED;AACA;AACA;A;;;;;;;AAMA;AACA;AACA;AACA;A;;;;;;AAiBA;A;;;;;AAuBA;AACA;A;AAEC;A;AAED;;A;;;;;;;;;AAMA;AACA;A;AAEC;A;AAED;A;A;;;;;A;AAIC;;;;;A;A;;;;;A;AAGA;;A;AACC;;A;AACC;AACA;A;AAED;A;;;;;A;AAGD;A;A;;;;;;;;;;AASD;AACA;A;AAEC;A;AAED;A;A;;;;;A;A;A;;;;;A;A;;;;;A;;;;;;;AAe+C;A;;;;;;;;AAKA;A;;;;;;;;AAIkB;A;;;;;;;;A;AAIhE;A;AAED;AACA;A;AAEC;A;AAED;A;AAGC;A;AAED;A;AAEC;A;AAED;AACA;A;;;;;;;;A;AAMC;A;AAID;A;A;AAGC;A;A;;;;;;;AAMD;AACA;A;AAEC;A;AAED;A;;;;;;;AAMA;AACA;A;AAEC;A;AAGC;A;A;AAGF;A;;;;;;A;AAyFC;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;AAIG;A;AACF;A;AAED;A;;;;;AAIG;A;AACF;A;AAED;A;;;;;;A;AAUC;A;AAED;AACA;AACA;A;;;;;;;;A;AAKC;A;AAED;AACA;AACA;A;;;;;;;;A;AAKC;A;AAED;AACA;;;;;;A;A;;A;;AACC;A;;AAED;A;;;;;;;;A;AAUC;A;A;AAGA;A;AAED;AACG;A;AACF;A;AAEE;;A;AACF;A;AAGD;;;A;AACC;A;A;AAKA;AACA;AACA;;;;;;A;A;AAME;A;AAED;;;A;AACC;A;A;AAEA;;A;A;;AAGF;;A;AACC;;A;A;AAWF;AAEA;AACA;;;;;A;AAEE;AACA;A;A;;A;AAID;A;A;AAIA;A;AAED;;;AACC;;A;AACC;A;AAED;A;;;AAKD;AACA;A;;;;;A;AAiBC;A;AAED;A;;;;;A;A;AAME;A;A;AAGA;A;A;AAGF;A;;;;;;AAkBA;;;;AACA;AAEA;;;;AAwBA;AACA;AAOA;;A;AACC;;A;AAGD;;A;AACC;;A;;AAEA;A;AAMD;AACA;AACA;;AAEA;AACA;;AACA;AACA;AACA;AAEG;;;AAAH;;A;AACC;AACA;;AAWA;;A;AACC;AACA;A;A;A;AAeD;;A;AAWC;;;AACA;A;A;AAIC;AAAH;;A;AACC;A;AAED;A;;;;;;;;AAIA;AAEA;;AACA;;AACA;;A;;;;;;;AA6DA;A;AAEC;A;AAMD;A;;;;;;AAIA;AACA;A;;;;;;AAqCkD;A;;;;;;AAEJ;;A;;;;;;;AAEJ;;A;;;;;;AAG1C;A;;;;;;AAIA;AAEG;;;A;AACF;A;A;A;AAUC;A;A;A;AAIA;A;A;AAGF;A;;;;;;;AAOA;;A;AACC;A;A;;;;;;;;AAKD;;A;AACC;A;A;;;;;;;;AAKE;AAAH;;A;AACC;A;;AAEA;A;A;;;;;;;AASE;;A;AACF;A;AAED;A;;;;;A;AAOC;A;AAMD;;A;AAEC;A;AAOD;;A;AACI;;;AAAH;;A;AACI;;;AAAH;;A;AAGI;;A;AACF;A;A;A;A;AAKJ;A;;;;;;A;AAKC;A;AAED;;;;;A;AAEC;A;;AAEA;A;A;;;;;;;;AAKD;AACA;;;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;AACA;AACA;A;;;;;;;AAkBA;AACA;AACA;AACC;;;;AACA;;A;A;AAGC;A;AAED;;A;A;AAGC;A;A;AAGA;A;A;A;;;;;;;;AAgBF;;A;A;;;;;;;;AAKA;AACA;;;;;;A;A;;A;;AACC;A;;A;;;;;;;;AAKD;AACG;A;AACF;A;A;;;;;;;;AAMD;;A;AACC;AACA;A;AAED;;A;AACI;AAAH;;A;AACC;;;A;AACC;A;A;A;A;;;;;;;;AAOH;AACA;AACA;AACA;AACA;AACA;AAEA;;A;AACC;;;;A;AAGD;AAQA;AAIG;AAAH;;A;AACC;A;AAGE;;AAAH;;A;AACC;;;;;AACA;A;AAMD;AACA;A;AAGC;AACA;A;AAGD;AAEA;AACA;AAEA;AACA;AACC;AACA;;;;;;;;A;AACK;AACD;;;AAAH;;A;AACC;AACA;A;AAED;A;A;AACI;AACJ;A;A;AACI;AACJ;;;A;AACC;A;AAED;A;AAEC;AACA;A;A;A;AAEG;AACJ;A;A;AACI;AACJ;;;;;A;A;AAEC;A;A;A;A;AAGA;;;;;A;AACC;;;AACA;A;AAEA;AACA;A;A;AAEA;;;AACA;A;AAEA;A;;AAEA;A;A;A;A;A;AAGD;A;;A;AAEA;;A;A;AAOF;AACA;;;;AACA;;A;AACC;A;A;A;;;;;;;;AAuB4C;A;;;;;;;;AAEJ;A;;;;;;;;AAEI;A;;;;;;;;AAG9C;AACA;;A;A;A;A;;;;;;;;;;AAYA;AACA;;;AAEC;AACG;;;AAAH;;;A;A;A;A;AAGC;A;A;;A;A;A;;;AAKF;AACA;AACA;;;;;A;AAEC;A;AACI;AACJ;;A;AACC;;A;AACC;;;A;A;AAGF;A;A;;;;;;;;AAeD;;AACA;;AACA;AACA;;A;AAMC;A;AAEG;AACJ;;A;AACK;AACJ;A;AAEA;A;AASA;A;AACK;AACJ;A;AAEA;A;A;AAGF;A;AAEC;A;AAED;A;;;;;;;AAWA;AACA;;A;AAEC;A;AAIA;A;A;;;;;;;;AAaD;AAGI;AAoBJ;;A;AACC;;AACG;;;A;AACF;A;A;AAMF;A;AAEC;A;A;A;AAME;A;AAED;A;A;AAIF;;A;AACC;A;AAED;A;;;;;;;;AAOA;A;AAEC;A;AAGD;AACA;;A;A;AAEC;;;A;AACC;;;A;A;;AAKC;;A;A;A;AAGD;;A;A;A;AAGC;;;AAAH;;A;AACK;AACJ;;;;AACA;;A;AACC;AACA;AACA;A;A;AAIF;AACA;AACA;;;A;AACC;AACA;;AACA;A;;AAEA;AACA;A;A;;;;;;;;AAYD;A;AAEC;A;AAED;AACA;AAEA;AAEA;;A;AACC;A;AAEC;A;A;AAGD;;;A;AAWC;AAKA;A;A;AAEA;A;A;A;;AAGD;;;;A;A;AAGI;;;AAAH;;A;AACC;A;A;A;A;AAGD;A;A;AAKF;AAEA;A;;;;;;;;AAgBA;A;AAEC;A;AAED;AACA;;AACC;;A;AACC;AACA;AAMA;A;AAED;;A;AACC;AACA;AACA;A;AAED;;A;AACI;;;;AAAH;;A;AACC;AACA;A;A;AAGF;;A;AACC;AACA;AACA;A;AAED;A;AAED;A;;;;;;;;;AAWA;AACA;;;AAA4B;A;;;A;;;;;;;;AAoB5B;A;;;;;;;;AAIA;A;AAEC;A;AAED;AACA;AACA;AACA;A;;;;;;;;AAIA;AACA;A;;;;;;;;AAIA;AACA;AACG;;;A;AACF;A;A;;;;;;;;AAQD;AACA;AACA;;A;AACC;;A;AACC;AACA;A;AAED;;;;A;AAUC;A;A;;AAGD;AACA;;A;AACC;;;A;AAED;;A;AAEC;A;A;AAIF;;;;;A;A;AAEC;AACA;A;A;AAEA;AACA;A;A;AAEA;;;;AACA;AACA;A;A;AAEA;;A;AACC;;;;A;;AAEA;A;AAED;A;A;;;;;;;;AAKD;A;AAII;;A;AACF;A;AAED;A;AAGD;;;;;;;;;;;A;A;AAEC;;A;A;AAEA;;A;A;AAEA;;A;A;AAEA;;A;A;AAEA;;A;A;AAEA;;A;A;AAEA;;A;A;AAEA;;A;A;AAIA;A;A;AAEA;;;AACA;A;A;;;;;;;;AAKD;A;AAIC;A;A;AAQA;A;A;AAGA;A;AAED;AACA;A;;;;;;;AAIA;AAEA;;;A;AACC;;;;A;AAMC;A;A;AAQA;A;A;AAGA;A;A;A;AAIA;A;A;AAGF;AACA;A;;;;;;;AAIA;AAEA;;;;A;AAOC;A;AAED;;A;AACC;AACA;A;AAED;A;;;;;;;AAIA;AACA;;A;AACC;;A;AAED;A;AAEC;A;A;AAGA;A;AAEA;A;AAED;AACA;;A;AACC;A;AAEC;A;AAED;;;A;AACC;A;A;AAGC;AAAH;;A;AAGC;;;;AAEA;A;AAED;AACA;A;;;;;;;;AAIA;A;AAEC;A;AAKC;A;AAED;A;A;AAMA;A;AAEE;;A;AACF;A;AAED;AACA;AACA;A;;;;;;;AAIA;AACG;A;AACF;A;AAED;;A;AACC;A;A;AAGD;;;;;;;;A;AACC;AACA;A;A;AAEA;A;A;AAEA;A;A;AAEA;;A;AAEA;A;A;AAEA;A;A;AAMC;A;A;AAGF;A;;;;;;;AAIA;AAUA;AACA;AACA;AACA;;;;;;A;A;;A;;A;AAQE;A;A;;AAGF;A;;;;;;;AAIA;A;AAEC;A;AAED;AAKA;AACA;;;;A;AAMC;A;A;AAMA;A;AAED;;A;A;AAWE;A;AAMD;AACA;A;AAIC;A;AAED;A;A;AAGA;A;AAID;;A;AACC;;AAIA;A;AAED;;A;A;AAGE;A;AAED;AAEA;;A;AACC;;;;A;AAEC;A;A;AAGA;A;AAED;A;AAKE;AAAH;;A;AACC;AACA;A;A;AAGF;;A;AACC;A;AAED;A;;;;;;;AAIA;AACA;;A;AACC;A;;AAEA;A;AAED;AAGA;AACA;A;;;;;;AAKA;A;;;;;;AAMA;AACA;AAEA;;A;AACC;;A;;AAGA;AACA;A;AAED;A;;;;;;;AAMA;;;;;;A;A;;A;;;AACI;;A;AAEF;A;A;;A;;;;;;AAQF;;A;;;;;;;;AAIA;AACA;A;AAGC;A;A;AAQA;A;AAME;AAAH;;A;A;AAIE;A;A;AAOA;A;AAED;;A;A;AASA;A;AAED;A;AAGC;A;A;A;AAYC;A;AAOD;A;AAGD;A;AAEC;A;AAED;;AAEA;;A;AACI;A;AACF;A;AAED;A;AAGD;;;;;A;AAEC;A;AAED;A;AAEC;A;AAED;AACA;AAEA;AACA;;A;AAEC;A;;AACS;;A;AACT;A;A;AAUD;;A;AACC;;A;AAGD;AACA;A;;;;;;;AAIA;AACA;A;AAEC;A;AAED;A;AAEC;A;A;AAIA;A;AAED;;A;AACC;;;;;AACC;;A;AAKC;A;AAED;A;;A;AAGF;AACA;A;;;;;A;AASC;A;AAED;A;;;;;A;AAKC;A;AAEE;A;AACF;A;AAED;AACA;A;;;;;;;AAIA;A;AAEC;A;AAGD;;;;AACA;AAOA;AACA;AACA;AACA;AACA;A;AAEC;A;AAGD;AACA;A;AAEC;A;AAEA;A;AAED;;;A;AACC;A;AAGD;A;;;;;;;AAIA;AAEA;AAOA;A;A;AAGE;A;A;AAaD;A;AAGD;A;AAGC;A;AAGD;AACA;;;;;AACC;;A;;A;AAGA;A;AAGD;;;;;A;AAEC;A;A;AAGG;;;A;AACF;;A;AAEA;A;AAED;A;AAID;A;;;;;;;AAUA;AAEI;A;AAEH;A;AAGD;A;AAEC;A;AAGE;A;AACF;A;AAIG;AACJ;;;;;AACC;;;;;AACC;;;A;A;A;A;AAOE;A;AAED;A;A;;A;;AAIH;AAEI;AACA;AACJ;;A;AACC;AACA;A;;AAEI;AACJ;;;;A;AAEC;A;AAED;A;AAGD;AAKA;AAcA;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;A;;;;;;;;;;AAKA;AACA;;;AACC;AACA;;A;AACC;AACA;;AAKA;;A;AAEC;AACA;AACA;;;;;A;AAED;A;AAED;A;;;AAED;AACA;A;;;;;;;AASA;AACA;;A;;;;;;;AAMA;AACI;AACJ;;A;AAKC;;A;AAEE;;A;AAKF;A;AAED;;A;AACC;;A;AACK;AACJ;AACA;A;AAEA;A;AAEA;A;A;AAGF;A;;;;;;;AAKA;;A;;;;;;;;AAiBA;AACA;;A;AACC;;A;A;A;A;A;;;;;;;;AAQD;AACA;AACA;;A;AAGC;A;A;;;;;;;;AAMD;AAOA;;AACC;AACA;A;AAED;A;;;;;;;;AAKA;A;AAEC;A;A;AAGA;A;AAEG;A;AAEH;A;AAED;AAII;A;AAEH;A;AAEA;A;A;AAGA;A;A;;;;;;;;AAgBD;;A;AACC;A;AAED;AACA;A;;;;;;;;;AAIA;;A;AACC;AACA;A;A;A;;;;;A;AAKD;;;;A;AAEC;A;A;AAGA;A;AAED;AACA;A;;;;;;;;;A;;;;;A;;;;;;AAmDyD;A;;;;;;AAMzD;AACA;;A;AAEC;AACA;A;A;AAGA;A;A;;;;;;;;;;AAWD;;A;AACC;A;AAGD;AACA;;A;AACC;AACI;;;;AACD;A;AACF;AACA;;;A;AAEC;A;AAEA;A;A;A;AAID;A;AAED;;AACA;;A;AACC;;A;AAEG;AACD;;AAAH;;A;AAEC;;A;AAGD;;;;;AACC;A;;AAQE;;AAAH;;A;AACC;AACA;AACA;;A;AACC;A;A;AAIF;AACA;;A;AAUC;A;;;;;A;A;A;;;;;A;A;A;A;;;;;A;A;A;;;;;A;AAcF;;A;AACC;A;AAGD;AACA;;A;AAEI;;A;AACF;A;;;;;A;A;AAKF;;A;AACC;;A;AAOC;A;A;;;;;A;A;;;;;A;;;;;;;AA2CF;;;;;;A;A;;A;;;AACC;;A;AACC;;A;AAED;AACA;AACA;A;;AAGD;;A;AACC;;AACA;AACA;A;A;;;;;;;;AAKD;A;AAEC;A;AAED;;A;AACI;;A;AAEF;A;A;;AAOD;;A;A;;;;;;;;;;AAKD;A;AAEC;A;AAED;AACA;AACA;;A;AACC;AACA;AACA;AACA;;;AACC;A;A;;;A;AAIF;AACA;A;;;;;;AAIA;A;AAEC;A;A;AAGA;A;AAED;A;;;;;AAgBA;;A;AACC;;A;A;;;;;;;AAKD;A;AAEC;A;AAED;A;;;;;;;;AAIA;;A;AACC;AACA;AACA;A;AAEC;A;A;A;;;;;;AAMF;AACA;;;;;;A;A;;A;;;AACC;AACA;AACA;A;;AAED;A;;;;;;;A;;;;;A;;;;;;;;;A;;;;;A;;;;;;;;;AAqBA;A;AAEC;A;AAED;;A;AACC;A;A;A;;;;;A;AAKD;A;A;;;;;A;AAMA;;A;A;;;;;A;A;;;;;A;A;;;;;;;;AAQA;AACA;AACA;AACA;AACA;A;AAQC;A;A;;;;;;;;AAkBD;AACA;AACA;A;AAKC;A;A;AAKA;A;A;AAGA;A;AAED;A;AAEC;A;AAID;;;;A;AAEC;A;AAED;;A;AACC;;A;AACC;;A;AAED;AACA;A;;AAEA;;A;AACC;;A;A;AAGA;A;A;AAGF;;;;;;A;A;;A;;AACC;;A;AACC;;A;A;;AAOD;;A;AACC;;A;A;A;;AAGC;;A;AACF;A;AAMD;;A;AACC;;A;AAGD;;AAQA;;;;;;A;AAEC;A;AAEA;A;A;AAID;;A;AAEC;A;AAEA;A;AACI;AACJ;AACA;A;A;;;;;;;;;;AAaD;AAKA;;A;A;AAGC;A;AAID;;A;A;AAEC;A;AAMD;;;AACC;A;AAKC;A;A;AAIA;A;AAOD;;A;AACC;AACA;A;AAED;AACA;AAOA;;AACA;;;;;AAOA;;A;AAEC;;A;AAGD;AACA;A;;AAGD;A;;;;;;;AAgBA;A;AAEC;A;AAED;;A;AACC;AACA;A;AAED;;;;;AACI;AAAH;;A;AACC;A;A;;A;;;;;;AAkBF;;;;;AACI;;AAAH;;A;AACC;;A;A;;AAGF;A;AAEC;A;AAED;A;;;;AAIA;;;AACC;;;;A;;;A;;;;AAQG;AAID;;;AAAH;;A;AACC;;A;AAED;A;;;;;A;AA4EC;A;A;AAGA;A;AAED;A;;;;;AAIA;A;;;;;;AAcA;AACA;A;;;;;;A;AAKC;A;AAEA;A;A;;;;;AAyFD;AACA;;;;;A;AACC;A;AAED;;;;;;;A;AAEC;A;AAEA;;A;AAEA;A;A;;;;;;AASE;A;AACF;A;AAED;A;;;;;;AAQG;;AAAH;;A;AACC;AACA;A;A;;;;;;;;AAKD;AACA;AACA;AACA;AACA;AAEA;;A;AACC;AACA;A;A;;;;;;;;AAOD;A;AAEC;A;AAEA;A;AAEA;A;A;;;;;;;AAKD;AACA;AACA;AACA;A;;;;;;;A;AAKC;A;AAED;AACA;AACA;AACA;AACA;A;;;;;;;;;;A;A;;;;;A;AAYA;;;;AACA;AACA;A;;;;A;;;AAa8C;A;;;;AAM9C;;AACA;A;;;;;AAeA;;A;;;;;;;AAMA;;;;;A;AAEC;A;AAEC;A;AAED;A;AAEE;;;;A;AACF;A;A;A;;A;A;;A;;;;;;A;AAYA;A;AAGD;;AACI;;AACH;;;;;AACA;;A;AACC;AACA;A;AAED;AACA;;;;;AACA;;A;AACI;;;;AAAH;;A;AAEC;;A;AAXe;A;A;AAcf;AACA;;AACA;;;;;;A;AAhBe;A;A;A;AAoBd;;A;A;A;AAIH;;A;AACC;AACA;A;AAED;A;A;;;;;;;;AAQE;;;;AAAH;;A;AACC;A;A;;;;;;;;A;AAgBA;A;A;AAKA;A;AAKD;AACA;;A;AAEC;;;;A;AAEC;A;AAED;AACA;AACA;A;A;AASA;A;AAGD;;A;;;;A;AAKC;A;AAEE;;;A;AACF;A;AAED;A;;;;;AAIA;;;;A;AAEC;A;AAED;;;;;;;A;AAEC;A;AAED;;A;;;;;;;AAIA;AACA;;A;AACC;;A;A;AAGA;A;A;AAGA;A;AAED;A;;;;;;A;AAKC;A;AAED;A;;;;;;AAIA;;;;A;AAEC;A;AAEE;;A;AACF;A;AAED;;A;AACI;;A;AACF;A;A;AAGF;;AACG;AAAH;;A;AACC;;A;A;AAGA;A;AAED;A;;;;;;AAMA;A;;;;;A;AAKC;A;AAED;A;;;;;;AAIA;;A;;;;;;;;AAIA;AAcG;A;AACF;AACA;A;AAED;;A;AACC;;;;A;AAGD;AACA;AAIA;AACA;AACA;AACA;;AACA;AAIA;;A;AAGC;A;AAGE;;;AAAH;;A;AACC;;AACA;A;AAGD;AAIG;A;AACF;A;AAGD;;AACA;;AACA;;AACA;AACA;;A;AAEC;A;AAGD;AACA;A;;;;;;;AAIA;AACA;AAEA;AACA;A;AAIC;A;A;AAGA;A;AAED;AACA;;;;;;A;A;;A;;;A;AAEE;A;A;A;A;A;;A;;;;;;;;AAWF;AACA;AACA;A;;;;;;;AAWA;AACA;AACA;A;;;;;;;A;AAKC;A;AAED;AAEA;AACA;A;;;;;AAIA;AACA;A;;;;;;AAUA;A;;;;;;;;AAIA;AACA;;A;AACC;AACA;A;AAED;AACA;AAEA;AAEA;;A;AACC;A;AAED;;A;;;;;;;;;;;AAQG;;A;AACF;A;AAGD;AACA;AACA;;;AACC;AACA;AACA;AACC;;A;AACC;AACA;A;AACA;A;A;AAGA;A;AAED;A;A;;;AAGF;AACA;;;;;;A;AACK;AACJ;A;AAEA;AAEA;AACA;AACA;AACA;;A;A;;;;;;;;AAKD;AACA;AACA;AACA;A;AAGC;A;AAGD;AACG;;A;AACF;A;AAEE;;A;AACF;A;AAGD;AACA;A;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;A;A;;A;;;AACC;A;A;A;AAIA;AACA;A;;AAED;AACA;;A;;;;;;;AAUA;AACA;A;AAEC;A;AAED;;;;;;AACC;;A;AACC;AACA;AACA;A;A;;AAGF;AACA;A;;;;;;;AAIA;AACA;A;AAGC;AACA;A;AAED;;;;;;A;AAEE;AACA;A;A;;A;;;;;;;AAWF;AACA;;;;;;A;A;;A;;AACC;A;A;AAGC;A;AAED;A;;AAED;;A;AACC;AACA;A;AAED;A;;;;;A;AAKC;A;AAMD;A;;;;;AAOG;AAAH;;A;AACC;;A;AAEE;AAAH;;A;AACC;;A;AAEE;AAAH;;A;AACC;;A;AAED;A;;;;A;AAQC;A;A;AAGA;A;AAED;A;;;;;AAIA;;;;AACA;A;;;;;;;;;;;;;;AAIG;;A;A;;;;;;;A;A;AAIF;A;AAGD;;;;A;A;;;;;;;A;AAIA;AAEA;AACG;;AAAH;;A;AACC;A;;;;;;;A;AAID;AACA;AACA;AAGI;A;AAiBH;A;AAMD;;;;AACA;;A;AACC;A;;;;;;;A;AAID;AACA;AACA;;AACA;AACA;AACA;AAEA;AACA;AACA;;AACA;AACA;AACA;AAEA;;A;AACC;;A;AACC;;AACA;A;AAED;AAGA;A;;;;;;;A;AAIG;AACJ;;A;AACC;A;;AAEA;AACG;A;AACF;AACA;AACA;A;A;AAIF;AACA;AACA;AAEA;;;AACC;AACA;;A;AAUC;AACA;A;AAED;;A;AACC;AACA;;A;AAED;AACA;AACA;A;;AAGD;AACC;;;;;;;;;;A;AACK;A;;;;;;A;AAGJ;;A;AACC;A;;AAEA;AACA;A;AAED;A;;;;;;;;A;AAGA;;A;AACC;A;;AAEA;AACA;A;AAED;A;;;;;;;;;A;AAGA;;A;AACC;A;;AAEA;AACA;A;AAED;A;;;;;;;;A;A;;;;;;;;A;AAOI;AAEJ;;;;A;AACK;A;;;;;;A;A;AAIL;;A;A;;;;;;;;A;AAGA;AACG;A;AACF;AACA;AACA;A;A;A;A;;;;;;;;;;;;AASC;AACA;AACJ;AACC;A;A;AAGE;A;AAED;A;A;A;AAIC;A;AAED;A;AAKD;;A;AACC;AACA;;;AACI;;AAAH;;A;AACC;AACA;AACA;AACA;A;A;;;A;AAIH;AACA;AACA;A;AAEC;A;A;A;;;;;;;;AAOF;AACA;;AACC;A;AAEC;A;AAED;AACA;AACA;;A;AACC;;AAMA;A;;AAEA;;A;A;AAOF;;AACA;A;;;;;;;;;;;AAaA;AACA;AACA;;AACA;AAEA;;;AACC;AAKA;;A;AAEC;A;A;;;AAIF;AACA;AAEI;AACJ;;AACC;;;;A;AAEC;AACA;A;A;;A;AAKD;AACA;;AACK;AACJ;;;;AAEA;;;;A;A;;A;AAGC;A;;A;A;;A;A;AAKD;AACA;AACA;AACA;AACA;;AACA;;A;AAOC;;A;AAED;A;A;A;;A;A;A;A;;A;AAcE;AACJ;;A;AACC;AACA;;;;AACA;AACA;;A;AACC;AACA;A;;A;A;AAKF;AACA;AACA;AAEA;AACA;AAIA;;A;AACC;;A;;AAEA;;A;AAEE;;A;AACF;A;A;;A;;;;;;;;;AAUD;AACA;AACA;AACA;A;A;;;;;A;A;A;;;;;A;AAOI;A;A;;;;;A;AAGA;A;AACF;A;AAGC;A;A;AAGA;A;AAED;A;;;;;A;AAGD;A;A;;;;;;;;AAS6C;;A;;;;;;;;;;;;;;;;;AAI9C;AAEA;A;AAEC;A;AAED;;;;A;AAEC;A;AAGG;AACJ;;A;AACC;AACA;;A;AACC;AACA;AACA;;A;AACC;;A;AACC;;A;AAEA;;A;A;A;A;AASJ;;;;;;A;A;;A;;;AACC;;A;AACC;;A;AAED;;;;;AACC;;A;AACC;;A;A;;A;;AAKH;;;AAMC;AACA;AACA;;A;AACC;AACA;A;AAED;;A;AACC;A;AAGG;AACJ;;;;;;A;A;;A;;;AACC;;;;A;AAGC;;A;A;AAQA;;A;A;AAMA;A;AAEC;;A;AAED;A;AAEC;;A;A;AAKF;;;;;AACC;A;;A;;AAGF;;A;AACC;A;AAED;;A;AACC;A;AAED;;A;AACC;A;A;;;AAQF;AACA;;AACC;AACA;A;A;AAIA;A;AAGD;;AACA;AAGA;;;AACC;;AACA;AACA;;A;AACC;A;A;;;AAIF;A;;;;;A;AAUC;A;A;AAGA;A;A;A;AAMA;A;AAEA;A;A;;;;;AAMD;AAEA;AACA;;;;;;A;A;;A;;;AACC;;;;;AACC;AACA;A;;A;;A;AAID;A;AAGD;;;;;;A;A;;A;;;AAGC;;AACA;;;;;AACC;A;;A;;AAGF;A;;;;;;;AAIA;;A;AACC;A;AAED;;A;;;;;;;AAUA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AAIA;;A;;;;;;;;AAIA;AACA;AACA;AACA;;A;AACC;AACA;A;AAEC;A;AAED;AAGA;A;AAED;A;;;;;;;AAWA;AACA;AACA;;AACG;;;AAAH;;A;AACC;AACA;;AACA;A;A;;;;;;;;AAaD;;A;;;;;A;AAMC;A;AAED;;;AACA;A;;;;;AAIA;AACA;AACA;;AACA;A;AAGC;A;AAMD;AACA;A;AAEC;A;AAMA;A;AAED;;;;;;A;A;;A;;AACC;AACA;A;A;A;AAIA;A;;AAED;AACA;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACC;;;;AACA;;A;AACC;A;AAEE;;;AAAH;;;A;AACI;;AAAH;;A;AACC;AACA;A;AAEC;A;AAED;A;AAED;A;A;AAEA;A;AAED;;A;AACC;;;A;AAED;;A;AACI;;AAAH;;A;AACC;AACA;A;AAED;A;AAED;AAEA;;;;;;;;;;A;A;AAEC;;AACA;AACA;A;A;A;AAEA;;AACA;A;A;A;AAEA;;AACA;A;A;A;AAEA;;AACA;A;A;A;AAEA;;A;A;A;AAEA;A;A;A;AAEA;;A;A;A;AAEA;;A;;A;AAEA;A;AAED;;A;AACC;;A;AACC;;;;;A;AAED;A;AAED;;A;AACC;A;A;A;;;;;;;;AAMF;AACA;;A;AAKC;A;AAED;;A;AAYC;;A;AACC;A;;AAEA;A;A;AAGF;;A;AACC;;A;AAKC;A;AAED;A;AAED;;A;AACC;A;;AAEA;;A;AAGD;;;;AACA;;A;AACI;;A;AACF;A;AAGD;AACA;A;AAEA;A;A;AAIA;A;AAED;A;AAEA;A;;;;;;;A;AAWC;A;AAGD;A;AAEC;A;AAED;;;A;AAEC;A;AAGD;AACA;AAOA;;;;;;AACC;AACA;;A;AACC;A;AAEC;AACA;A;AAED;;AACC;A;A;;AAGD;A;A;;AAIF;;A;AACC;A;AAGC;A;AAEE;AAAH;;A;AACI;;A;AACF;A;A;AAGF;;A;AACC;AACA;;A;AACC;A;A;AAGF;AACA;A;AAGD;AACA;A;AAEC;AACG;A;AACC;;;A;AACF;A;A;A;A;A;A;AAYF;AACA;A;AAGD;AACA;AACA;AACA;A;AAGC;AACA;AACA;AACA;AACA;A;AAED;A;;;;;;;A;AAMC;A;AAED;A;AAIC;A;A;AAKA;A;AAGD;AACA;;;;;AACC;AACA;A;;AAED;AAEA;AACA;A;;;;;;;;;AAWA;AACA;A;A;;;;;A;AAKA;;;;AACA;;A;AACC;;A;AACC;AACA;;A;AACC;AACA;A;AAED;A;;;;;A;AAGD;A;AAEC;AACA;A;;;;;A;A;A;AAMD;A;AAGD;AACA;AAEI;;;;AAED;A;AACF;AACA;A;AAED;;A;AAIC;;A;AAEC;AACA;A;A;AAGF;;A;AACC;AACA;AACA;;A;AACC;;A;AAED;;A;AACC;;A;AAED;;A;AAED;A;;;;;;;AAMA;AACA;AAEA;;AACA;;AAEA;;A;AACC;AACA;AACA;;A;AACC;;AACA;A;AAGD;;A;AACC;AACA;;A;AAED;;AACA;AACA;A;AAGD;AACA;AACA;A;;;;;;;AAIA;AACA;;AACA;AACA;;A;AACC;AACA;AACA;AACA;;A;AAEC;AACA;A;AAQD;;A;AACC;AACA;AACA;AAEA;AACA;;AACA;;AACA;A;AAED;A;AAED;;A;AACC;AACA;AAIA;A;AAED;;A;AACC;;A;AACC;AACA;AAIA;A;AAGD;AACA;;A;AACC;A;;AAEA;AACA;A;AAIG;AACD;A;AACF;A;AAID;A;AAEC;A;AAED;;A;AACC;AACA;AACA;;AACA;;A;AACC;AACA;;A;AAED;;AACA;A;AAED;AAEA;;A;AACI;;;AAAH;;A;AACC;AACA;A;A;A;AAKH;;A;AACC;A;AAED;A;;;;;;;AAQA;A;;;;;;;;AAII;A;AAEH;AACA;A;A;AAGA;A;AAED;AAEA;A;A;A;A;;;;;;;AAOA;;;;;;A;A;;A;;;AACC;A;AAEC;A;AAED;A;;A;;;;;;AAKD;AACA;;AACA;;A;AAEC;A;AAED;AACA;A;;;;;;;;AAIA;AACA;AACA;A;A;AAIE;AACA;A;AAED;A;AAGD;;;A;AAEC;;;;;A;AACC;A;A;AAEA;A;A;AAEA;A;A;A;AAOC;A;AAMD;AACA;;;;;;A;A;;A;;AACC;A;;AAED;AAEA;A;;AAGA;A;A;AAED;A;;;A;AAGA;A;AAGD;AACA;AAEA;;AACA;;AACA;A;;;;;;;AAIA;AACA;;A;AAEC;A;AAGD;AACA;AAEA;A;AAEC;A;A;AAGA;A;AAED;AACA;A;;;;;;;AAIA;;A;AAGC;A;AAED;;;;A;A;A;AAOC;AACA;AACA;AACA;AACA;A;AAED;A;;;;;;;AAMA;AAEI;AACJ;AACI;;;A;AACF;A;AAED;AAEG;;AAAH;;A;AACC;AACA;AACA;A;AAED;A;AAED;AACG;;AAAH;;A;AACC;AACA;A;AAEE;;AAAH;;A;AACC;AACA;A;AAED;AACA;;;;;;;A;AAEC;A;AAEA;;A;AAGA;A;A;;;;;;;;AAKD;;A;AACC;AACA;AACA;AAEG;;;A;AACF;AACA;A;AAED;A;AAED;AACA;AACA;AACG;;A;AACF;A;AAED;;A;;;;;;AAWA;A;;;;;;AAQA;AACA;;AACA;;AACA;A;;;;;;;;AAUA;A;;;;;;;;AAIA;A;;;;;;;;AAIA;;A;AACC;A;A;;;;;;;;AAKD;A;;;;;;AAMA;;;;;A;AAEE;A;A;;AAGF;A;;;;AAK0E;A;;;;;;;;A;A;;;;;A;AAc1E;;A;AACC;;;;A;AAEC;A;;;;;A;A;A;;;;;A;;;;;;;AAQF;;A;;;;;;;AAoBA;A;AAEC;A;AAED;AACA;AACA;;;AACC;AACA;AACA;AACA;A;A;;;AAED;A;AAKC;A;AAED;AAQA;;;AACC;A;;;AAED;A;;;;;A;AAKC;A;A;;;;;A;AAQA;A;AAED;AACA;;;AAAY;A;;;A;;;;;;AAOZ;;A;AAIC;AACA;A;AAED;A;AAEC;A;A;;;;;;AAOD;A;;;AAoCA;A;A;AAEC;A;A;AAEA;A;A;AAKA;A;AAED;A;;;;AAMA;;A;;;;;AAG8D;A;;;;;AAM9D;A;;;;;;AAKA;;;A;;;;;;;AASA;;;AACA;;AACA;A;;;;;AAG0D;A;;;;;;AAS1D;;A;;;;;;;AAIA;;;A;;;;;;AAIA;A;;;;;;AAUA;;;A;;;;;;AAGgE;A;;;;;;AAGhE;;;A;;;;;;AAG4D;A;;;;;;AAK5D;;;A;;;;;;AAIA;A;;;;;AAMA;;;A;;;;;AAG8D;A;;;;;AAc9D;AACA;;AACC;A;AAEC;A;AAED;AACG;;A;AACF;A;AAED;A;AAED;A;;;;;AAkBA;;A;AACC;A;AAED;;A;;;;;;AAWA;A;;;;;;AAIA;;;;AACA;AAEA;;A;AACC;A;AAGD;AAEA;;A;AACC;A;AAED;;A;AACC;A;AAED;;A;AACC;A;AAGD;A;AAEC;A;AAGD;;A;;;;;;;AAIA;;A;AACC;;;A;AAOA;;;A;A;;;;;;;AAmBD;A;;;;;;AAIA;;;;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;A;AAEC;A;AAGD;;A;;;;;;;AAIA;;A;AACC;;;A;AAOA;;;A;A;;;;;;;;AASD;;;;AACA;AACA;AACA;;;A;;;;;;AAUA;A;;;;;AAQkE;A;;;;;;AAGlE;;;A;;;;;;AAMA;;A;AACC;;AAIA;AACA;;A;AAED;;;;;AACC;AACA;;AACA;;A;AAIC;;A;AAED;AACA;;;;;AACC;;A;AAGC;;A;AAGD;;A;AACC;;A;AAED;A;;A;;A;;;;;;A;AA+DE;;;A;AAKF;A;AAED;A;AAED;A;;;;;AAMG;;;A;AACF;A;AAED;A;;;;;AAcI;AAGJ;;;A;AAEC;A;AAID;A;AAEC;A;A;AAGA;A;A;AAGA;A;A;AAGA;AACA;AAcA;AASA;A;AAKD;AACA;A;;;;;;AAKI;AACD;;;AAAH;;A;AACC;;A;;AAEA;;A;AAED;;A;;;;;;;A;AAOC;A;AAED;;;;A;A;A;AAGC;;A;AAED;A;;;;;;;AAQwC;A;;;;;AAGxC;A;;;;;A;AAKC;A;AAED;AAEA;AACA;AACA;AACA;A;;;;;A;AASC;A;AAED;;;;A;A;AAGC;A;AAEA;A;AAEA;A;AAED;A;;;;;AASA;;;;;AACC;A;;AAED;AACA;A;;;;AAKA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;A;;;A;AAoDC;A;AAOD;AAMA;A;AAEC;A;AAEA;A;AAED;A;;;;A;AA8BC;A;A;AAGA;A;AAGE;A;A;AAED;A;AAEA;A;A;AAGA;A;A;AAMF;A;AAEC;AACA;A;AAEA;AACA;A;AAEC;A;AAED;A;A;;;;;AAKD;AACA;;AACC;AADe;;A;;;;;;AAYhB;;;;;A;AACC;A;A;AAGA;A;A;AAMA;A;AAMD;AACA;AACI;;;A;AAEF;AACA;A;AAH8B;;AAMhC;;A;AACK;;;AACH;;;A;AACC;A;AAFyB;;AAK3B;A;AAKD;AACA;;AACC;AACA;A;AAED;AACI;;;AACH;AAD+B;A;AAG5B;;;AACH;;;A;AACC;A;AAFyB;;AAK3B;A;;;;;;AAKkD;A;;;;;AAEK;;;;A;;;;;AAKvD;;;;AACA;;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;AAkCG;AAAH;;A;AACC;;A;AACC;;A;AAED;AACA;A;AAOD;A;AAEC;A;AAED;AAMA;AACA;A;AAEC;A;A;;;;;;;;;A;AAMA;A;AAED;;A;AACC;;A;AAED;;A;AACC;;A;AAGD;AACA;AACA;AAEA;AACA;AACA;A;AAEC;A;AAEA;A;A;;;;;;;A;AAMA;A;AAMD;A;A;AAGE;A;AAED;AACA;AAMA;AACA;AACA;A;AAKD;A;AAEC;AACA;AACA;A;A;AAKA;A;AAUG;;;A;AAEF;AACA;A;AAHgC;;A;AAWjC;AACA;;AACC;A;AAEC;A;AAED;A;A;AAIF;AACA;A;;;;;AAII;AACD;A;AACF;A;AAEA;A;A;AAQE;A;AAED;A;A;AAGF;A;;;;;;;;;;;AAIA;;AACC;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;AAKC;A;AAEC;A;A;AAGD;A;AAED;A;;A;;;;;A;;;;;;A;AAOA;A;A;AAIA;AACA;AACA;AACA;A;AAED;A;;;;;AAII;;;AACH;AAD0B;;AAG3B;AACA;A;;;AAQA;A;;;;A;;;;;AAoBA;;;A;AAEC;A;AAED;AACA;A;;;;;A;;;;;AAQA;A;AAEC;AACA;A;AAED;;;A;AAEC;AACA;A;AAED;A;;;;;A;AAMC;A;AAGD;;;;;;A;A;;A;;AACI;;;A;AACF;A;A;;AAGF;A;;;;;ACx7TA;A;;;;;AAOA;A;;;;;AAUA;A;;;;;AAKG;A;AACF;A;AAED;A;;;;;AAKA;A;;;;;;AAKA;;A;;;;;;;AAIA;;A;;;;;;AAIA;AACA;;;;;;A;A;;A;;;AACC;AACA;AACA;A;;AAED;A;;;;;;;;A;;;;;A;;;;;;AAiD4C;A;;;;;AACA;;;;A;;;;;AACA;A;;;;;;;;AAU5C;;A;AAEC;A;AAED;AACA;;;;;;A;A;;A;;;A;AAEE;A;A;;AAGF;AACA;A;;;;;A;;;;;;;AAOA;;A;;;;;;;AAIA;;;A;AAEC;A;AAED;;;;AACI;AACJ;;;;;AACC;;;;;AACC;;AACA;AACA;;;;;AACI;;;A;AACF;AACA;A;A;;A;AAID;A;A;;AAGF;;A;AACC;AACA;A;A;;AAGF;AACA;A;;;;;AAU0C;A;;;;A;AAQzC;A;A;AAGA;A;AAEG;;;AAOA;A;AAPkC;A;A;A;AAAA;A;A;AAelC;A;AAfkC;A;A;A;AAmBpC;A;AAnBoC;A;AAsBtC;A;;;AAIA;A;;;AAIA;AACA;;;;;;A;A;;A;;;AACC;AACA;AACA;A;;AAED;A;;;;AChNsC;A;;;;AAIT;A;;;A;AAM5B;A;AAED;A;;;AAIA;A;;;AAII;;;A;AAEF;A;AAFsB;A;AAKxB;A;;;AAIA;AACI;;;A;AAEF;A;AAEA;A;AAJsB;A;A;AAQvB;A;AAED;AACI;;;A;AAEF;AACA;A;AAEA;A;AALsB;A;AAQxB;A;;;AAWiD;A;;;AACA;A;;;;AACA;A;;;;;AChDR;A;;;;;;AAyCA;;A;;;;;;A;AAsPxC;A;AAED;A;;;;;A;AAWC;A;AAED;AACA;AACA;A;AAMC;AACA;AACA;A;AAGD;A;;;;;AAMA;A;;;;;AAMA;A;;;;;;AAKA;;A;;;;;;;AAWA;;;;;;AACC;A;AAED;A;;;;;;;AAQA;;;;;;AACG;A;AACF;A;AAEA;A;A;;;;;;;AAaD;A;;;;;;A;AAiBC;A;A;AAGA;A;AAED;AACA;;A;;;;;;;AAIA;A;AAEC;A;AAED;;;;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;;;;;;AAMA;A;;;;A;AAMC;A;AAED;A;;;;;AAuBA;;A;;;;;;;AAUA;;A;;;;;;;;;;AAUA;;AACA;;A;AACC;;;AACC;A;;;A;AAUF;;AACA;;A;A;A;;A;AAIC;;A;AAMD;AAEA;A;AAEC;A;AAGA;A;AAQG;AACD;;A;AACF;AACA;A;AAGD;;;A;A;;A;AAMA;;;A;A;;A;AAIA;;A;AACC;A;AAKD;AACG;;A;AACF;A;AAED;;A;AACC;;;A;A;;A;AAIA;;A;AACC;A;A;AAKF;;;;A;A;;A;AAIA;;A;A;;A;AAKA;;A;A;;A;AAKA;;A;AACC;;A;A;;A;A;AAMD;;;A;A;;A;AAKA;;A;AACC;A;AAID;;A;AACI;;;AAAH;;A;AACC;;A;A;;A;A;AAKD;;A;AACC;A;AAED;;;A;AACC;A;;A;A;AAKC;;;AAAH;;A;AACI;;A;A;;A;A;AAMJ;;A;A;AAGE;A;A;;A;AAKF;;A;A;;;A;A;;A;;;;;;A;AAsBC;A;AAED;;A;;;;;AAiBG;A;AACF;A;AAED;;;;;AACA;;A;AACC;;;;A;AAEC;A;AAED;A;AAED;;;;A;AAEC;A;AAED;A;;;;A;AAOC;A;AAED;A;AAEC;A;AAED;A;AAEC;A;AAED;A;;;;;;A;A;A;;;;;;;A;A;;;;;;;A;A;A;;;;;;;A;AAgBA;A;A;;;;;;;A;AAIA;;;A;A;;;;;;;A;AAIA;;;A;A;;;;;;;A;A;;;;;;;A;;;;;AAqBA;;;;A;;;;;;;;A;AA0BC;A;AAED;;;A;AACC;;A;AAED;;;;A;AAEC;A;AAED;;;A;AAEC;A;AAGD;AACA;A;AAWC;A;A;AAEC;AACA;AACA;;AACC;AACA;A;A;A;AAGD;AACA;AACA;;AACC;AACA;A;A;A;AAGD;AACA;AACA;;AACC;AACA;A;A;A;A;A;AAkBD;AACA;AAA8C;A;A;A;AAIhD;A;;;;;;;;;AAOA;A;AAEC;A;A;;;;;A;;;;;;;A;AAWA;A;AAED;;;A;AAEC;A;AAED;AACA;A;AAEC;A;A;;;;;;;A;;;;AAWD;A;;;;;;;;AAKA;AACA;A;AAEC;A;AAED;A;;;;;;;;;A;;;;AAOG;;A;AACF;AACA;AACA;A;AAED;A;;;;AAIA;AACA;A;;;;;;;;AAoBA;;AACA;AAGI;AACD;;;;A;A;;;;;A;AAGH;AACC;A;AAEC;A;A;AAIE;AACJ;;;;;A;A;;;;;A;AAIA;;;A;A;;;;;A;AAGA;AACG;;;;A;A;;;;;A;AAaH;A;AAEC;A;AAGE;;;;A;A;;;;;A;A;AAMF;A;AAID;;;;A;A;;;;;A;AAIA;AASA;A;AAEC;A;A;AAGA;A;AAGD;AAEA;AAEA;;A;A;;;;;A;A;AAOC;AAMA;A;A;;;;;A;;;;AAcD;A;;;;;;;;A;A;;;;;A;A;A;;;;;A;A;AAqBC;A;AAED;;;;A;AAGC;AACA;A;;;;;A;AAID;AACA;AAYG;;;AAAH;;A;AACC;A;AAED;A;;;;;A;;;;;;;AAKA;;A;;;;;AAIA;;;;;;A;A;;A;;;AACC;;;;;AACC;A;;A;;A;;;;;;A;AAOD;AACA;A;AAED;A;AAIC;A;AAED;;;;AAEA;;;A;AACK;AACJ;AACG;;A;AACF;AACA;A;AAED;;;;A;A;AAGE;A;AAED;A;A;AAGA;AACA;A;AAED;;;A;AAEC;A;A;A;A;A;AAUF;A;;;;;;AAsBI;AACJ;;A;AACC;;A;AACC;;;;A;A;AAGA;A;A;A;A;AAKA;AACA;A;AAEG;A;AAEC;AACJ;;;A;AAEC;A;A;A;AAID;A;A;AAGA;A;AAEA;A;A;AAGF;A;;;;;;;A;AAWC;A;AAED;;A;AACC;;A;AAEC;A;A;A;AAID;A;AAGD;;;;A;AAEC;A;AAGD;;;;A;AAEC;A;A;AAIA;A;AAED;;;;;;A;A;;A;;;AACC;AAEA;A;;AAGD;AAEA;A;;;;;;;AAWA;;A;AACC;;A;AAEE;A;AACF;A;AAED;A;;;;;;;AASA;;A;AACC;;A;AAEE;A;AACF;A;AAED;A;;;;;;;A;AAOC;A;AAED;;A;AACC;;A;AAEC;A;A;AAGF;;A;AACI;AAAH;;A;AACC;;;;AACA;A;A;AAGF;A;;;;;;AAIA;A;;;;;A;AAKC;A;AAED;A;;;;;AAIA;A;;;;;;AAIA;;A;AACC;;A;A;;;;;;;A;A;A;AAQC;A;A;AAGF;A;;;;;A;AAOC;A;A;AAGA;A;AAED;A;;;;A;A;AAaC;A;AAED;A;;;;;ACnuCA;;A;;;;;;;AAYA;A;AAEC;A;AAED;;A;AACC;;A;AAED;;A;;;;;;AAUA;AACA;AAKA;;;;A;A;AAGE;A;AAED;A;AAEE;AAAH;;A;AACC;A;AAEA;AACA;;A;AAED;AACG;A;AACF;A;A;AAGA;A;AAED;;;A;AAEC;A;AAEG;AACD;;;;A;AACF;A;AAID;;;;A;A;AAGE;A;AAED;A;AAED;AAEA;AAEA;;A;AAEC;A;AAGD;A;;;;;AAQG;;;A;AACC;;A;AACF;A;A;A;;;;AAQF;A;;;;;;AAsBA;A;AAEK;AACJ;;;A;AAEC;A;A;AAKD;A;AAGE;;;A;AACF;A;AAID;AACA;AACA;;A;AAEK;AACJ;;;;A;AAEC;A;A;AAKA;A;AAEA;AACA;A;A;A;AAcD;A;AAID;;;;A;AAEC;A;AAED;;A;AAEC;A;AAID;;A;AAEC;A;AAKD;AACA;;A;AACI;;;A;AACF;A;A;AAKC;;;A;AACF;A;AAID;;A;AAEC;A;AAID;A;;;;;;;AAIA;;A;AACC;;A;A;;;;;;;;AC5TD;;A;;;;;;;AC8RA;AACA;AACA;A;;;;;;;;;;A;A;;;;;;;A;AAQA;AAEA;AACA;AACA;;AAEA;AACA;;A;AACI;;;AAAH;;A;A;;;;;;;;A;A;AAID;AACA;A;;;;;;;;;AAyCA;;A;AACC;A;A;A;;;;;A;AAMD;;A;AACC;;;AACA;;A;AACC;;AACA;A;A;AAGF;;;;AACA;;A;AACC;;;A;AAED;;A;AACC;;A;AAED;A;;;;;;;AAIA;;A;AACC;A;AAED;;A;;;;;;;;AAIA;;A;AACC;A;AAED;;A;AACC;AAEA;;AACG;AAAH;;A;AACC;;A;AAID;;A;A;;;;;;;AAiFG;AACJ;;;;;;A;A;;A;;;A;A;AAGG;A;AAED;A;A;;AAGF;;;;;A;AAEE;A;AAED;;;;;AACC;A;;A;;AAGF;A;;;;;AAKmC;A;;;;AACA;A;;;;AAMnC;A;AAGC;A;AAED;A;;;;;AAMA;AACA;A;AAEC;A;A;;;;;AAMD;;AACA;A;;;;;;;AAUA;;;;A;A;AAEC;;;;A;A;;;;;A;A;;;;;;;A;A;A;;;;;A;A;AAQA;A;A;;;;;;;;;AAUD;;;AACA;;;;A;A;;;;;A;AAIA;;A;AACC;;AACA;A;;;;;A;AAMD;;A;AACC;A;AAGD;;A;AACC;;;;AACA;A;A;;;;;A;A;AAMD;;AACA;AAGA;;A;AACC;;;;AACA;AACA;A;;;;;A;AAID;;;;AACA;A;;;;;A;;;;;;;AAUA;AAIA;;A;AACC;;A;AAED;A;;;;;;;AA2BA;A;AAEC;A;A;;;;;;;;AAI+B;A;;;;;;;;AAGhC;AACA;A;AAEC;A;A;AAGA;A;AAED;AACA;;AACA;A;;;;;;;;AAIA;;;;AACA;A;AAEC;A;AAwBE;;;AAAH;;;;;;A;A;A;AAIC;A;AAED;AACA;AACA;AACA;A;;;;;;;;AAIA;AACA;A;AAEC;A;AAED;AACA;;AACA;;AACC;A;AAED;;A;;;;;;;AAGkD;A;;;;;AACA;A;;;;;AACA;A;;;;;;AAalD;AACA;A;;;;;;;;AAKA;;AACA;;A;AACC;;A;A;A;A;A;;;;;;;;;;AAOD;AACA;;A;AACC;AACA;;;A;AACC;A;AAED;A;AAED;;A;AACC;A;;;;;A;AAGD;;A;AACC;A;;;;;A;A;AAIA;A;AAED;;A;AACC;AACA;AACA;A;;;;;A;AAGD;AACA;AACA;;;;AAEA;AACA;AACA;;A;AACC;A;AAED;AACA;AAEA;A;;;;;A;;;;;A;A;AAoBC;A;AAEA;A;AAED;A;;;;AAIG;;A;AACF;AACA;AACA;A;AAID;A;;;;AAIA;AACA;A;;;;AAIA;AACA;;A;AACI;;A;AACF;AACA;AACA;A;A;AAGF;A;;;;AAIA;AACG;A;AACF;A;A;;;;A;AAWA;A;AAED;A;;;;;AAIA;A;;;;;;;;A;A;;;;;A;AAgBA;;;;;A;AACC;AACA;;AACA;;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAIA;AACA;;A;;;;;;AAgBA;AACA;;;;;AACA;;;;;AACA;;AACA;AAEA;A;;;;;;;;;;AAeA;;;A;A;;;;;A;AAKC;AACA;AAED;AACG;A;AACF;A;AAEE;A;AACF;A;AAED;;AACG;AAAH;;A;AACC;;;AACC;;A;;;A;AAIF;AACA;;A;AAEC;;;AACA;;A;AAED;;;;A;A;A;;;;;A;A;;;;;A;A;A;;;;;A;AAYA;AACA;AAEA;;;AACA;A;A;;;;;A;A;A;;;;;A;A;A;;;;;A;AAUA;;;;;;A;A;;A;;;A;A;;;;;A;AAIC;;;;;A;A;;;;;A;A;;A;;AAMD;AAEA;;;;AACA;AACA;AACA;AACG;;;A;AACF;A;AAID;;A;AACC;;A;AAGD;A;AAgBC;A;AAED;AACA;;A;;;;;A;;;;;A;AAQC;A;A;AAMA;A;AAID;A;;;;A;AAQC;A;AAED;AACA;A;;;;;AA0BA;;A;AACC;;A;A;;;;;;;AAKD;;;A;AACC;AACA;A;AAED;;A;AACC;AACA;A;AAED;AACA;AACA;A;AAGC;A;AAGE;AAAH;;A;AACC;;;AACA;;A;AACC;A;;AAEA;AACA;A;A;A;;;;;;;;AAkCF;;A;AACC;;AACA;;AACA;;A;AAED;;A;AACC;;AACA;;AACA;;A;AAED;;;;;;AACC;;A;AACC;;AACA;;AACA;;AACA;;A;A;;A;;;;;;;;;;;A;AAeD;A;AAED;AAEA;AACA;AACA;AAOA;AACA;A;AAEC;A;AAEG;AACJ;;A;AAEE;AACA;A;AAEE;;A;AACF;A;A;AAGA;A;AAED;A;AAEG;AAGJ;AACA;;;;;;A;A;;A;;A;A;AAGG;A;AAED;AACA;A;A;;AAGF;;;;;AACC;AACA;A;;AAGD;AACA;A;AAiBC;AACA;A;A;AAMA;A;AAEC;A;A;AAKF;A;AAGC;;A;AAEC;A;A;AAGD;A;A;AAIA;A;AAeE;;;A;AACF;A;AAUD;;A;AACK;;;;AAEJ;;;;A;A;A;AAGE;A;A;A;A;AAGD;A;A;AAKE;A;A;AAGD;A;AAEA;A;AAED;A;;A;AAEA;A;AAGD;;A;AACC;;;A;AAEA;;;;A;AAEC;A;A;A;A;AAKA;;A;AAEC;A;A;;AAMD;A;A;A;AAIF;;A;AACC;AACA;AACA;A;A;AAIF;AACA;;A;AAEC;;AACA;;A;AACC;;A;A;;AAGD;;;;;AACC;A;;A;AAIC;;AAAH;;A;AACC;;A;AAGD;;A;AAGC;AAEA;AACA;A;AAGD;;;;;A;A;A;AAGC;A;A;AAEA;A;A;AAOA;;A;AACC;AACA;A;;AAIA;AACA;AACA;;A;AAEC;A;A;A;;AAOF;AACA;A;AAID;;A;AACC;A;A;AAGA;A;AAGD;;A;AACC;A;AAEC;A;A;AAIF;AACA;;AACA;AACA;;A;;;;;;;AAMA;A;AAEC;A;AAED;;A;AACC;AACA;A;AAED;;;;;AACI;AAAH;;A;AACC;A;A;;A;;;;;;AAUF;;A;AACC;;A;;AAEA;;A;AAEE;;;AAAH;;A;AACC;;AACA;;AACA;;AACA;;A;;AAGA;;A;A;;;;;;A;AAQA;A;AAED;A;;;;;;;;A;;;;;A;;;;;;;;;A;;;;;A;;;;;;;;;AA+CA;;;A;AACC;;A;AACC;A;A;;;;;A;AAIF;;A;AACC;A;A;A;;;;;A;A;A;;;;;A;AASD;A;A;;;;;A;AAIA;;A;A;;;;;A;A;;;;;A;A;;;;;;;;AAQA;AAEA;;A;AACC;A;AAGD;;AACA;AACA;AACA;;AAEA;AAIA;;A;AAGC;A;A;;;;;;;;A;AAWA;A;A;AAKA;A;A;AAMA;A;AAGD;;;A;AACC;A;AAGD;A;;;;;;;AAIA;;;AACA;;;;A;;;;;;;AAIA;;A;AACC;A;AAED;;AACA;A;;;;;;;;A;AAOC;AACA;A;AAGD;;A;AACC;;AAGA;AACA;A;A;;;;;;;;AAMD;AACA;;A;;;;;;;;AAyBA;AACG;;;AAAH;;A;AACC;;A;AAED;A;;;;;;A;A;AAUC;A;AAED;A;;;;;AAIA;A;AAEA;;;A;AACC;A;A;AAEA;A;A;A;AAGA;A;AAED;AACA;AACG;AAAH;;A;AACC;A;A;;;;;;;;;AAKD;A;;;;;A;;;;;AASyC;A;;;;;A;AAcxC;A;AAEE;;;AAAH;;;;;A;AACC;A;AAEE;;;A;AACF;A;AAED;A;;;;;;;AAKA;;;AACA;;;;;;AACA;;;AACI;AAAH;;A;AAEC;AACA;AACA;A;AAED;;;A;AACC;AACA;A;A;;;AAIC;;;AAAH;;A;AACI;AAAH;;A;AACC;;A;AAEE;AAAH;;A;AACC;;A;AAEE;;AAAH;;A;AACC;;;;AACA;A;AAED;AACA;;AACG;AAAH;;A;AACI;AAAH;;A;AACC;AACA;A;AAED;A;A;AAMF;;;;AACA;AACA;AAEA;AACA;;AACA;;AAEA;AACC;;;;AACA;;A;AAEC;A;AAED;;A;AAGC;;A;AAOC;;AACA;AACA;A;AAED;;;A;AACC;A;AAGD;AACG;;;A;AACF;A;AAGD;;AACA;A;AAID;AACA;;;A;A;AAGE;A;A;A;AAGD;AACA;A;AAGD;AAEA;;;A;AACC;A;;AAEA;A;AAUD;AACA;AACA;;;A;AACC;A;AAED;AACA;;;A;AACC;;;;;A;AACC;A;AAED;A;AAED;AACA;A;AAOC;A;AAGE;AAAH;;A;AACC;;AACG;;;A;AACF;A;A;AAGF;;A;A;;;;;;;;AAiBD;AACA;AACA;A;;;;;;;;;;;A;AAOC;A;AAED;;A;AACC;A;AAGD;AACA;AACA;AAIA;;;;;A;AAEC;AACA;A;A;;;;;;;A;;;;;;A;AAOA;A;AAED;A;;;;;AAIA;;;;A;A;AAEC;A;A;A;AAEA;A;;A;AAEA;;A;A;;;;;;A;AAQA;A;AAED;;;;A;A;AAEC;;A;A;AAEA;;A;A;AAEA;;A;A;;;;;;;AAYD;A;;;;;;;AAUA;;AACA;;AACA;AACA;;A;;;;;;;AAI6C;A;;;;;AAIb;A;;;;;AAqC7B;;;;A;A;AAOD;A;AAEC;A;A;AAMA;;AACA;A;AAGG;AACD;A;AACF;;;;A;AAID;AACA;A;AAEC;A;AAED;A;A;AAIF;;AAKA;;AAEA;A;AAEC;A;AAED;AAGA;;A;AACC;;AACA;;A;A;;;;;;;AAmBD;;A;;;;;;AAUA;A;;;;;;AAUA;A;;;;A;AA6DC;A;AAED;A;AAEC;A;AAED;A;;;A;AAMC;A;A;AAGA;A;AAED;A;A;AAME;A;AAEA;A;A;AAGF;A;;;;A;AAOC;A;AAED;;;;A;AAEC;A;AAED;A;;;;;;;AAOA;;;A;A;;;;;A;AAMI;AACJ;;;;;;A;A;;A;;;A;AAEE;;A;A;AAGA;AACA;AACA;A;A;;AAGF;A;;;;;;AAQA;AACA;AACA;A;AAEC;A;AAED;AACA;AACA;A;;;;;;AAOA;AAEA;;;;;AACI;;A;AACF;A;A;;AAIF;A;AAEC;A;AAED;;;;;AACI;;A;AACF;A;A;;AAIF;A;;;;;;;;AAqBA;;A;AAII;;;;A;A;;;;;A;A;;;;;A;AASJ;;AACA;AAIG;;;;A;A;;;;;A;AAIH;;A;AACC;;;AACA;AACA;A;;;;;A;A;;;;;A;;;;;;;;;AAUD;AACA;A;AAIC;;;A;A;AAGA;;;A;A;AAGA;;;;A;AAED;A;;;;;;;AAMA;;A;AACC;;A;AACC;;A;AAED;AACA;A;AAED;;;AACA;A;;;;;;;;AAMA;AACA;A;AAGC;A;A;AAGA;A;AAEE;;A;AACF;A;A;AAIA;A;AAED;A;AAGC;A;A;;;;;;;;A;AAOA;A;AAED;A;;;;;;;;AAoIA;AACA;AACA;A;;;;;;A;AAKC;A;AAED;A;;;;;;AAIA;AACA;A;A;AAMC;A;A;;;;;;;AAcD;AACA;AACA;AACA;AACA;;AACA;;;;;;A;A;;A;;AACC;;AACA;A;;AAED;A;;;;;;;AAiCA;AAEA;AACA;;AACA;AACA;;;;;AACC;A;;AAED;AAEA;AACA;AACA;AACC;;;A;AACC;A;AAED;;;;;;A;AAEC;;A;A;A;A;;;;;;;;AAYF;AACA;AACA;A;;;;;;;;AAMA;AACA;AACA;AACA;;;;;;A;A;;A;;AACC;;;A;AAKC;A;AAED;;A;AAGC;AACA;;A;AAED;;AACA;A;;AAED;A;;;;;;;AAII;AACJ;;;;;;A;A;;A;;AACI;;A;AACF;A;AAED;A;;AAED;A;;;;;;AAoDA;A;;;;;;AAUA;A;AAEC;A;A;AAGA;A;AAED;A;;;;;;;;A;AAaC;A;AAED;A;AAEC;A;AAED;;;A;AAEC;A;AAED;;A;;;;;;A;AAeC;A;AASD;A;;;;;;;AAkBG;AAAH;;A;AACC;A;AAGD;AACA;AAEG;;A;AACF;A;AAGD;;;A;AACC;A;AAED;AAEI;AACJ;AACA;;AACA;AACC;;;;AACA;;A;AACC;;;;;A;AAEC;A;A;AAGE;;;AAAH;;;;;A;A;AAEE;A;AAEA;A;AAEE;A;AACF;A;AAED;AACA;AACA;A;AAED;A;AAED;AACA;;AACA;AACA;A;A;;;;;;;;AAoBE;;A;AACF;A;AAGD;;A;AAEC;A;AAGD;AACA;;A;AACK;AACJ;AACA;;;;A;AAEC;A;A;AAIF;AACA;;A;;;;;;;AAcA;AACA;A;AAEC;A;A;A;AAIC;A;AAED;A;AAEA;A;AAED;A;;;;;;;AAIA;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;;;;;;;A;AAMA;A;AAED;A;;;;;A;AAKC;A;AAED;A;;;;;AAIA;A;;;;;AAMA;A;;;;;;A;AASC;AACA;A;AAED;AAGA;;A;;;;;;;;AAMA;;A;AACC;A;;AAEA;A;A;;;;;;;;A;AAuDA;A;AAED;A;AAEC;A;AAGD;;;A;AAEC;A;AAGD;AAEA;;A;;;;;;;AAOA;AACA;A;;;;;;;AAYA;AACA;A;;;;;;;AAIA;;A;AACC;A;A;;;;;;;;AAQD;;;;A;AACC;A;AAID;;A;AACC;AACiD;A;AAEjD;;A;A;;;;;;;;AA6ID;;;;A;AAEC;A;AAED;;AACA;;AACA;A;;;;;;;AAYA;AACA;A;;;;;;;AAGsC;;A;;;;;;;AAMtC;;AACA;;A;AAMC;AACA;;A;A;;;;;;;;AAaD;;A;AACC;AACA;;A;A;AAGA;A;AAED;;A;AACC;;;A;AAED;A;;;;;;;AAeA;AACA;AACA;AACA;;A;;;;;;;;AAOA;AACA;;;;AACA;AACA;A;;;;;;;;;AAIA;AACA;;;;AACA;AACA;A;;;;;;;;AAIA;AACA;;AACA;AACA;A;;;;;;;;;AAWA;;;;AACA;;A;AACC;AACA;A;AAED;A;;;;;;AAIA;;;;;A;AAEE;AACA;;A;AAED;A;AAED;A;;;AAKA;;;;;A;AAEE;A;A;;AAGF;A;;;;A;ACnxGC;A;AAID;AACA;;AAAwD;A;AAGxD;;;;;AACI;;A;AACF;A;A;;AAIF;A;;;;;A;A;AAMC;A;AAED;A;;;;A;AAuHC;A;AAED;A;;;;;A;AAcC;A;A;AAGA;A;A;AAGA;A;AAED;;;;;;AACC;A;AAEC;A;A;;AAGF;A;;;;;AAMA;A;AAEC;A;AAED;;;;;;AACC;A;AAEC;A;A;AAGA;A;A;;AAIC;A;AACF;A;AAED;A;;;;A;AAYC;A;AAED;A;AAEC;A;A;AAGA;A;AAEG;;;A;AAAuB;A;A;A;AAMzB;A;AANyB;A;AAS3B;A;;;;AAOA;;;;;A;AAME;A;A;;AAGF;A;;;;;;;;;;;;;;AC3OA;;;;;A;A;;;;;A;AAIG;;;;AAAH;;A;AACC;;AACA;A;AAED;;A;AACC;AACA;AACA;;;AACC;AACA;;A;AACC;;A;A;;;AAGF;;;AACC;;;;;;A;AAEC;;AACA;A;A;A;A;A;A;;;A;AAOH;AACA;A;AAEC;A;AAEA;A;A;;;;;A;AAIA;AACA;;;;;AACC;A;;A;AAGC;;;A;AACF;A;AAGE;;;A;AACF;A;A;A;;;;;A;AAKD;A;A;;;;;A;AAIA;;A;AACI;;A;AACF;A;A;AAIF;AACA;AACG;A;AACC;A;AACF;AACA;A;AACS;A;AACT;AACA;A;A;;;;;A;A;A;A;A;;;;;A;AAQD;AACA;AACA;A;AAED;AACG;;;A;AACF;A;AAGE;;;A;AACF;A;A;A;;;;;A;AAKE;A;A;;;;;A;A;A;;;;;A;AAMH;AACI;A;AAEJ;;;;A;AACC;AACA;A;A;AAEA;AACA;A;A;AAEG;;;A;A;;;;;A;AAGH;A;;A;;;;;A;A;A;AAKA;A;AAEA;A;AAEE;;;A;AACF;A;A;AAGA;A;AAEA;A;AAED;A;;;;;A;;;;;;AAKA;;;;;A;AAEC;A;AAED;;;A;AAEC;A;A;AAGA;A;AAED;A;;;;;A;A;AASC;A;AAEA;A;AAEA;A;A;;;;;A;A;AAaA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;AAEA;A;A;;;;;AA8BqC;A;;;;;A;AAIrC;A;AAED;A;AAEC;A;AAED;A;;;;;A;AAcC;A;AAED;A;;;;;;AAmCG;AAAH;;A;AACC;;;;AACA;A;AAED;;A;AACC;;;;AACA;A;AAEG;AACA;AACJ;;A;AACC;;;;A;;AAEI;AACJ;;;;A;AAED;;A;AACC;;;;AACA;A;AAED;;;;AACA;;A;AACC;;AACA;;;;AACA;A;AAED;A;;;;;;;AAUG;AAAH;;A;AACC;;;;AACA;A;AAED;;A;AACC;;;;AACA;A;AAED;;;;AACA;;A;AACC;;;;AACA;A;AAED;A;;;;;;;AAUG;AAAH;;A;AACC;;;;AACA;A;AAEG;AACA;AACJ;;A;AACC;;;;A;;AAEA;;;A;AAED;;A;AACC;;;;AACA;A;AAEE;;;A;AACF;A;AAED;A;;;;;;A;A;A;AAOC;A;A;A;A;AAKA;A;AAED;A;;;;;;;;;AAIA;;;;;;AACC;;;;;A;A;;;;;;;A;AAIA;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;;AAGF;A;;;;;AAMA;A;;;;;A;AAmBA;;;A;AACC;A;A;AAGC;A;AAED;AACA;AACA;AACA;AACA;AAGG;;;A;AACF;A;AAEE;;;A;AACF;A;A;AAGA;A;A;AAGA;A;AAED;A;A;AAED;A;;;;;ACpUA;A;;;;;;;A;;;;;A;;;;;;;A;A;;;;;A;A;A;;;;;A;AChGA;AACA;A;;;;;A;;;;;;;;AAUA;;;;A;AAEC;A;AAED;A;;;;;;;;AAwBA;AAGA;AACA;;;;A;A;AAEC;;A;A;;;;;;A;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A;AACC;A;AASD;;;;;A;AACC;A;AAGD;A;A;A;AAEA;A;AAEC;A;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;A;AAKA;A;AAEC;A;A;A;AAIA;A;A;AAGA;A;AAEA;A;A;A;AAMD;A;A;;;;;A;;;;;;A;AA4BA;A;AAED;;A;AAIC;AACA;A;AAMD;A;;;;;;;;AAkBA;AACA;;;AACK;AACA;AACJ;;;;A;AAEC;A;A;A;;;AAIF;AACA;;A;AACK;AACJ;A;AAGC;AACA;A;A;AAGC;A;AAEA;A;A;AAGD;A;A;AAOD;AAIA;A;A;;;;;;AAKD;A;;;;A;AAKC;A;A;AAGA;A;A;AAGA;A;A;AAIA;A;A;A;AAIC;A;AAED;A;AAGD;A;;;;;;AAIA;;A;AACI;;;A;AACF;A;AAED;;A;AACC;A;A;AAOF;;;A;AACI;;;A;AACF;A;AAEE;;;A;AACF;A;AAED;;A;AACC;A;A;A;AAGE;;;A;AACF;A;AAED;;A;AACC;A;A;AAKF;;A;AACC;AACA;;;;;;A;A;;A;;AACC;A;A;AAGC;A;AAED;A;;AAED;;A;AACC;AAGG;;;A;AACF;A;AAED;;A;AACC;A;A;A;AAKH;A;;;;;;;AAII;AACA;AAGJ;;A;AACK;AACJ;;;A;AACI;;;A;AACF;A;AAED;AACA;;;AACA;;A;AACC;;A;A;A;AAGD;;;;A;;AAEA;;;;A;AAEC;A;AAEG;AACJ;;;;AACA;A;A;AAGA;A;A;AAGF;;A;AACI;;A;AACF;A;A;AAIF;;A;AACC;;A;AAID;;A;AAEC;;A;AACI;;A;AACF;A;A;AAIF;;;A;AAED;A;;;;;;AAmBA;A;;;;A;AAQC;A;AAEA;A;AAEA;A;AAED;A;;;A;AAYC;A;AAEA;A;AAED;A;;;;;AAKA;AAGA;AACA;A;A;AAEC;AACA;AACA;AACA;AACA;AACA;A;AAEC;A;A;A;AAGD;AACA;AACA;AACA;AAGA;AACA;A;A;AAEA;A;A;AAKA;;;;A;AAID;;A;A;;A;AAKA;;;;A;A;;A;AAIA;;A;AACI;;;;A;A;;A;AAGF;A;A;;AAGD;A;AAID;;;;A;A;;A;AAQA;A;A;AAME;A;A;A;A;AASA;A;AAEA;A;A;AAGD;A;AAEA;A;AAKC;A;AAGA;A;AAKF;A;A;AAEC;AACA;AACA;AACA;AACA;A;A;AAEA;AACA;AACA;AACA;AACA;A;A;;A;;;;AAO+B;A;;;AAGG;A;;;;;AAInC;;;A;AAEC;A;AAED;A;AAIC;A;AAGD;AACA;AAKA;;;;;AACC;;;A;AAGC;A;A;AAGA;A;AAED;AACA;A;;A;AAGA;A;A;AAmBA;AACA;AACA;A;AAGD;A;;;;;;AAOA;AACA;AAGA;;A;AAKC;;AACA;;;;;AACC;;;A;AACC;;A;A;;AAKF;AACA;AAEA;A;AAID;;A;AAKC;;A;AACC;;A;AAED;A;A;AAGA;A;A;A;AAIA;A;A;AAKA;A;AAIG;AACJ;;A;AACC;;A;AAED;;A;AACC;;;;A;AAEC;A;AAED;A;AAED;A;AAUC;A;AAID;A;;;;A;AAQC;A;AAGD;AACA;A;AAEC;A;A;AAIA;A;AAGD;A;;;;;;AAKA;;;A;AAEC;A;AAED;AAEA;AACI;AACJ;;;;;AACC;;AACC;A;A;A;AAIE;AACA;A;A;AAGF;A;A;;A;AAID;A;A;AAGA;A;A;AAIA;A;AAED;A;;;;;;;;AA2BA;AACA;A;A;;;;;A;A;;;;;A;;;;;;;;;A;A;;;;;A;AAYA;;;;AAEA;;A;AACC;AAEA;;A;AACI;;A;AACF;AAKA;AACA;A;AAED;A;;AAIG;;;A;AACF;A;A;A;A;AAWC;;;A;AACF;AACA;A;A;AAIF;;A;AACC;A;A;;;;;A;;;;;;AAYG;;AAGH;;;;A;AAEC;A;A;AAGA;A;AARmB;A;AAWrB;A;;;;;;AAOA;;;;AACA;;A;AACC;;AACA;A;A;AAGA;A;A;AAGA;A;AAWD;;;A;AACC;A;AAGD;;;;A;A;AAGE;A;AAED;A;AAED;A;A;AAEC;A;A;AAEA;A;AAED;A;;;;;A;AAKC;AACA;A;AAED;;;;;;A;A;;A;;;AACC;A;;A;;;;AAQE;;;A;AACF;A;AAED;A;;;;;;AAIA;AACA;A;AAEC;A;AAEG;AAEJ;;;;A;A;A;A;A;AAQI;;;AAAH;;A;AAGC;A;;AAEI;AAGJ;;;;A;AAEC;A;A;AAGA;A;A;A;;AAMF;;;A;A;AAED;AACA;A;;;;;;;AAIA;AACA;AACA;A;;;;;;;AAMA;AACA;AACA;A;;;;;;;AAIA;AACA;AACA;A;;;;;;;;;;A;A;;;;;A;A;;;;;A;;;;;;AAmBA;;A;AAEC;A;AAED;;;A;AAEC;A;AAED;A;;;;;;;;A;AAYC;A;AAED;;AACA;;;;A;AAEC;A;AAED;A;;;;;;AASA;A;AAEC;A;AAED;;A;AACC;;;;;A;AAED;A;;;AC19BA;A;;;;;AAkNA;;;;A;AACC;A;AAQD;;AACG;;AAAH;;;;;;;;A;AACI;;AAAH;;A;AACI;;;;A;AACF;A;A;A;A;AAQF;A;A;AAQA;A;AAED;;;;AACA;;A;AACC;AACA;A;AAED;AAQG;A;A;AAGD;A;AAEA;A;A;A;;;;;;;A;AA+CD;A;AAED;A;;;;;;AAIA;A;AAEC;A;AAED;A;;;;;;;;AAKA;AACA;AACA;;AAEA;;A;AACC;AACA;A;AAED;;A;AACC;AACA;A;AAED;AACA;AACA;;A;AACC;;;;;;A;A;;A;;;AACC;;A;AACC;;A;AAED;;;;;AACC;;A;AACC;;A;A;;A;;A;AAMJ;;AACG;AAAH;;A;AACI;;;;A;AACF;A;A;AAGF;;A;AACC;AACA;A;AAED;;;;;A;AACC;;A;AAED;;A;AACC;AACA;A;AAGD;;AACC;;;;;A;AAEC;AACA;;A;A;AAKD;AACA;;;;AACA;;A;AACC;AACA;A;AAOD;;;;AACA;;A;AACC;AACA;AACA;A;AAGG;AACJ;;A;AAEC;AACA;AACA;;;;A;;AAEA;;;;A;A;AAGA;A;AAED;;;A;AAGI;;;A;AACF;A;AAED;A;AAED;AAIA;;A;AACC;AACI;AACJ;;;;A;AAEC;A;AAED;A;A;A;;;;;;;;A;AAgBD;A;A;AAIA;A;AAED;;;A;AAQC;A;AAEE;;A;AAGF;A;A;AAIA;A;AAEE;;A;AAGF;A;A;AAMA;A;AAED;A;;;;;;;AAiBA;AACA;AACA;;AACG;;A;AACF;A;AAED;AACA;;;;;;A;A;;A;;;AACC;A;;AAED;AACA;A;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;A;A;;A;;AACC;;;;;AACC;A;;A;;AAGC;AAAH;;A;AACC;A;A;;;;;;;;AAWD;A;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;A;AACC;A;A;;;;;;;;;;AA+BE;AAAH;;A;A;;;;;;A;AAGA;AACA;;AACA;;A;AACC;;;;AACA;;A;AACI;AAAH;;A;A;;;;;;A;A;A;A;;;;;A;;;;;;A;AAYD;A;AAEE;A;AACF;AACA;;AACA;A;AAED;A;;;;;;AAmCA;;A;;;;;;;AAIG;;AAAH;;A;AACC;A;A;;;;;;;AAKE;A;AACF;A;AAED;A;;;;;;A;AAUC;A;AAED;;;A;AACC;A;A;AAGA;A;AAED;AACA;AAEA;AACA;AAEA;AACA;A;AAOC;A;A;AAKC;A;A;A;AAID;A;A;AAGA;A;AAED;A;AAEC;A;AAED;;;;;AACC;;A;AACC;A;A;;AAGF;AACA;AACA;;A;AACC;AACA;AACA;A;A;A;AAIC;A;AAEA;A;A;AAGF;AACA;A;;;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;A;AAEC;A;AAED;;;A;AAEC;AACA;A;AAED;A;;;;;;;;;AAIA;AACA;AACA;AACA;AACC;;;A;A;;;;;A;A;AAKC;AACA;A;AAIA;AACA;A;AAED;AACA;;;A;AAMC;A;A;;;;;A;A;;;;;;;;AAQF;AACA;AACA;A;;;;;;;A;AAMC;A;AAED;AACA;AACA;A;A;A;A;AAME;A;A;AAGD;;;;;;A;AAEE;;A;AAID;AACA;AACA;A;A;A;;;;;;AAMF;AACA;A;AAEC;A;A;AAGA;A;AAEA;A;A;;;;;;;;AASD;AACA;AACA;;A;AAEC;A;A;AAGA;A;AAEA;A;AAED;A;;;;;;;AAMA;;A;AACC;;A;AAED;;A;AACC;;;;A;AAEC;A;AAED;A;AAED;;A;;;;;;;;;;;;;;;AAQA;AACA;AACA;AACA;;A;AACC;;A;AAEE;;;;AAAH;;A;AACC;;A;AACC;;A;AAKD;;A;AACA;A;AAOD;AACA;AAIA;AACA;AAEA;;;AACC;AACA;;;AACI;;AAAH;;A;AACC;A;;AAEA;A;AAED;A;;;A;;;AAIF;AACA;;;A;A;;;AAEA;;A;AACC;;;;;;;;;;;A;A;A;AAGK;AACJ;;A;AACC;;A;AAED;A;AAEA;A;AAEA;;A;AACI;A;AAEH;A;AAED;A;A;AAIF;;;AACC;;;;A;A;;;AAID;;AACA;;;;;;;;;A;AACK;AAEJ;;A;AACC;;A;AACC;A;AAED;A;AAID;AACA;;;;;;;A;AAIC;A;AAEA;;A;AACI;A;AAEH;A;AAED;A;AAIA;A;A;A;AAEG;AAMJ;AACA;;A;AACC;;A;AAED;A;AAEA;AACA;A;AAEA;AACA;;A;AACI;AACJ;A;AAEC;A;AAED;A;A;;;;;;;;A;AAUA;A;AAED;AACA;A;A;AAGE;A;AAED;;;A;AAEC;AACA;A;AAED;A;A;AAGA;A;AAED;AAIA;A;;;;;;;A;AAQC;A;AAED;AACA;AACA;AACA;A;A;A;AAQE;A;AAED;A;A;AAGA;A;A;;;;;;;;A;AAgBA;A;AAED;;AACA;AACA;A;;;;;;;;;;;;AAqBA;;A;AAEC;A;AAED;AACA;AACA;AACI;AACD;A;AACF;;;A;A;;;A;AAID;;;AACC;;A;AACC;A;AAED;;A;AAEC;A;A;A;;;AAIC;;AAAH;;A;AACC;;AACA;;A;AACC;A;AAED;A;AAED;;AACA;;A;AACC;A;AAED;AACA;AACA;A;;;;;;;;;;AAIA;AASA;;AACA;;A;AAGE;A;AAED;A;AAED;;A;AACK;AACJ;;;;;;AACA;;A;AACC;;A;AAED;;A;AACC;;A;AAEE;;;AAAH;;A;AAGC;;A;AACC;A;AAEE;;AAAH;;A;AACC;AACA;;A;AACC;A;AAED;A;AAED;;AACA;;A;AACC;A;AAED;A;A;;AAGD;;;;;;;AACA;;A;AACC;;A;AAED;AACA;;A;AACK;AACD;;;;;AAAH;;A;AACC;;A;AAEE;;AAAH;;A;AACC;;A;A;A;AAOH;;;;;A;A;A;AAGC;AACA;;;;;AACG;A;AACF;AAGA;;AACA;AAIA;A;AAEE;;;AAAH;;A;AACC;;AACA;A;A;A;AAGD;AACG;A;AACF;;AACC;A;A;A;A;AAIF;AACA;A;AAEC;A;AAED;AAMG;A;AACF;A;AAED;;AAKA;AACA;;;;AACA;;A;AACC;;AACA;A;AAED;;A;AACC;AACA;;A;AAEC;A;AAED;A;A;A;AAIF;;A;AACI;;A;AACF;A;A;AAIC;AAAH;;A;AACI;;;AAAH;;A;AACC;;A;A;A;AAKD;A;AAED;AACA;AACA;AACA;AACA;A;;;;;;;;;AAcA;;;;AACA;AACA;A;;;;;;AA6BA;AACA;A;AAEC;A;AAEC;A;A;AAGF;A;;;;;A;AAUC;A;AAED;A;;;;;;AAKA;;A;AACC;;A;AAED;A;;;;;;AAMA;A;AAEC;A;AAED;A;;;;;;AAYA;;A;;;;;;AAiDG;A;AACF;A;AAED;A;;;;;;;;AAIA;;A;A;;;;;;A;A;AAIC;A;AAED;;;;A;AAEC;A;AAED;AACA;A;;;;;;;AAKA;AACA;AACA;AACA;A;;;;;;;AAMA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;AACA;A;AAEC;A;AAED;A;;;;;;;AAIA;AACA;AACA;AACA;A;;;;;;;;AAOA;AACA;AACA;AACG;;A;AAEF;A;AAED;AACA;A;;;;;;;;A;AAaC;A;AAME;;A;AACF;A;AAID;AACA;AACA;A;AAEC;A;A;AAKA;A;AAGE;;A;AAEF;A;AAED;;;A;AACC;;A;AAEC;A;AAED;;A;AAED;A;;;;;;;;;;AAIA;AACA;;;AACC;AACA;A;;;AAGD;;;AACI;;AAAH;;A;AACC;AACA;;A;AACC;A;AAED;A;AAED;;A;AACC;A;AAED;A;;AAMD;AACA;AAGA;AACA;AACA;AAEA;AACA;;;AACC;AACA;;;AAEA;AACA;;A;AACC;AACA;AACA;A;AAED;AAEA;;AACA;;AAEI;AACJ;;A;AACC;;;;A;;AAEA;AACA;A;AAGD;;A;AACC;;A;AACC;;A;AAGD;;A;A;AAGC;A;AAED;A;AAED;AAEA;AACA;AACA;AAEA;A;AAMC;A;AAGD;;A;AACC;AAQA;;;;;;;AAKA;;A;A;AAGC;A;AAMD;AACA;A;AAGD;AACA;;;AASE;A;AAEA;;;A;AACC;;A;A;AAEG;;A;AACF;A;A;AAGF;A;;;;A;AAdA;;AACA;A;;AAiBF;A;AAEC;AACA;AACA;AACA;AACA;A;AAGD;;A;A;AAGC;A;AAMD;;;;;;;;A;AACK;AACJ;AACA;;;;;;;AAKA;;A;A;A;A;A;AAIA;AACA;A;A;AAEA;AACA;;;;A;A;AAEA;A;AAGD;A;A;;;;;;;;A;AAMA;A;AAEE;AAAH;;A;AACC;;;AACA;A;AAED;;A;AAEC;A;;AAEA;;A;A;;;;;;;;;;AAQD;;A;AACI;;;;AAAH;;A;AACC;A;A;AAGF;AAGA;AACA;AACC;;;;A;AAEC;A;AAED;AACA;;A;AACC;;;A;AACC;;A;AACC;A;A;AAGD;A;A;AAEA;AACA;A;A;AAGF;AAEA;AACA;;A;AACC;A;A;;;;;A;AAIA;AACA;;A;AACI;;A;A;;;;;A;A;AAIJ;A;AAED;A;AAED;AACA;A;;;;;;A;AAQC;A;AAED;;;AACC;AACA;AAEA;;A;AACK;;AACJ;A;AAEA;A;AAEA;A;A;;;A;;;;;;AAWF;AACA;AACC;;;;;A;AACK;AACJ;AACA;;AACG;;;AAAH;;A;AACC;AAQA;A;AAED;;A;AACC;;A;AAED;;A;AACC;A;AAEC;A;A;A;A;AAKF;;A;AACC;AACA;A;A;A;AAGD;A;A;A;;;;;;;;AAaF;;;;A;AACK;AAGJ;A;AAYA;;A;AACK;AACJ;A;AAEA;A;A;A;;;;;;;AAiDoC;A;;;;;AACA;A;;;;;AACA;A;;;A;;;;;;;;;;AAqBtC;AACA;;;A;AACC;A;;;;;A;AAGD;AACA;AACA;AACA;AAEA;;A;AACC;A;AAOD;A;AAiBC;AACA;A;AAGG;A;AAEH;A;A;AAIA;A;AAGD;AACA;AAEA;;;AACC;;A;AACC;A;A;;;AASF;AACA;A;AAGA;A;AASI;AACJ;AACA;;AACA;AACC;AACA;;;;;;;;;A;AACK;AACJ;;A;AACC;A;AAED;;A;AACC;;A;;;;;;A;AAGE;AAAH;;A;AACC;;A;AACC;A;AAED;AACA;AACA;A;A;A;AAGD;;A;AACC;A;A;;;;;;A;AAID;;A;AACC;A;AAED;A;;;;;A;AAEI;AACJ;;A;AACC;;A;AAED;;A;AACC;A;AAED;;A;A;;;;;;A;A;;;;;A;AAKA;AACA;A;A;AAEA;;;;AACA;AACA;A;A;A;;;;;;;;AAUC;;;;AAAH;;A;AACC;;A;A;;;;;;;;AAOD;AACA;AACA;A;;;;;;;;AASA;AACA;AACA;A;;;;;;;;A;AAKC;A;AAED;AACA;;A;AACC;AACA;;A;A;;AASC;;AACA;A;A;AAGF;A;;;;;;;AAWA;AACG;;;;A;AACF;A;AAED;A;AAEC;A;AAED;A;;;;;;;;AA0BA;AACA;;;;AACA;A;A;;;;;A;A;A;;;;;A;AAQA;;;;AACA;;A;AACC;AACA;A;AAEC;A;AAED;;A;AAED;A;;;;;;;AAIA;AACA;A;AAEC;A;AAED;AACA;;A;AACC;;A;AAED;;AACA;;A;;;;;;;A;AAMC;A;AAED;;AACA;AACA;A;;;;;;;;;AAYA;;A;AACC;;A;AACC;;;;A;A;A;;;;;A;A;AAOF;A;AAEC;A;AAED;A;A;;;;;A;A;;;;;A;;;;;;;AASA;;A;;;;AAUkD;A;;;AACA;A;;;AACA;A;;;A;;;A;;;;;A;AAejD;A;AAED;;A;;;;;A;AAWC;AACA;A;AAED;AACG;;A;AACF;A;AAED;A;;;;;AAIA;AACA;AACA;AACA;AACA;A;;;;;AAKG;;;A;AACF;AACA;A;A;;;;;AAMD;A;;;;AAOA;;;;;A;AAEE;A;A;;AAGF;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;A;;A;Ad/0EC;A;AAEA;A;AAEA;A;A;A;A;A;A;A;A;A;A;AG8/B2B;A;AACA;A;AACA;A;AACA;A;AACA;A;A;A;A;A;A;A;A;A;;AAke3B;AACA;A;A;A;A;A;A;A;;A;A;;AAslDA;AACA;A;A;A;A;A;A;A;A;A;A;A;AAwZA;A;A;A;AAsEwD;A;A;A;A;A;A;A;;AA4NxD;AACA;AACA;A;A;A;A;A;A;A;AAq2ByB;A;A;AAIA;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;ACx/IA;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;AKwqBzB;AACA;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AM5wBD;;;;;;;A;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;A;;;;;AAWA;A;;;;ACxCA;A;;;;;;AAQA;;AACA;;;;;;;;;;A;;;;;;AAwBA;AAEA;AACA;A;;;;;AAKA;A;;;;;A;AAMC;AACA;A;AAGD;A;;;;;;ACpDA;;AACA;;;;;;A;;;;AAcA;A;;;;;;AAKA;A;AAEC;A;AAED;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKA;AACA;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;;AAKA;AACA;AACA;A;;;;;;;AAKI;AACJ;;AACA;;A;AACC;A;;AAEA;;A;AAED;A;;;;;AC/DA;A;;;;;;AAOA;;AACA;;;;;;;;;;;;A;;;;;;AAqCA;A;;;;;A;AAMC;AACA;A;AAGD;A;;;;;;AAIA;AAEA;AACA;AACA;A;;;;;;A;ACzDC;A;AAED;A;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;A;;;;;;AAsCA;AAEA;A;;;;;AAKA;A;;;;;A;AAKC;A;AAGD;A;;;;;;;AAMA;;AACA;AACA;AACA;;;;AACA;;A;AACC;;AACA;A;AAGG;AACJ;;AACA;;A;AACC;;AACA;A;AAGG;AACJ;;;;;A;AAEE;A;A;;AAIF;AACA;;AACA;;;;;;AACC;;A;;A;;;;;;ACtGD;A;;;;;;AAMA;;;;;;A;;;;;;AAgBA;;;AACC;AACA;;AAEA;;AACA;A;;;A;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BD;AACA;A;;;;;;;;AAKA;;A;AACC;A;A;;;;;;;;AAMD;;AACA;A;;;;;A;AA2BC;A;AAED;A;;;;AAaA;A;;;;;;;;A;A;A;A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;ACrEC;A;AAGD;AAEA;A;AAGC;AACA;A;AAGD;A;;;;;AAKA;A;;;;;;ACHA;;;;AACA;;A;AACC;;A;AAGG;AACJ;;;AACA;;AAEA;;A;AACC;;A;A;AAGA;A;AAGD;A;;;;;AAgBA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAGA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAMA;;A;;;;;AAOA;;;;A;AAEC;A;AAGD;AACA;AACA;A;;;;;AAOA;AACG;;;AAAH;;A;AACC;;;;AACA;;A;AACC;;A;AAED;A;AAED;;A;;;;;;AA2DA;AACA;;A;AACC;AACA;AACA;;;;;AACC;AACA;;A;AACC;;A;A;;A;AAIH;;A;AACC;;A;AAED;AACA;;;;;;A;A;;A;;AACC;A;;AAED;A;;;;;ACjNA;AACA;A;;;;;AAMA;A;;;;ACZI;AACJ;AAWA;;;;;AACC;A;;AAGD;AAaA;;;;;AACC;A;;AAGD;AACA;AAEA;A;;;;;;ACjCA;AACA;AACA;AAEA;AACA;AACI;;;AACH;;AACA;AACA;AACA;AAJ6B;A;AAM9B;AAEA;AACA;A;;;;;;;ACjBA;A;A;AAGC;A;A;;;;;ACJD;;AAEA;AACA;AACA;AACA;A;;;;;ACNA;AACA;AACA;A;;;;AAKA;AACA;AACA;A;;;;;ACQA;;;;AACA;;A;AACC;;A;AAGD;AAEA;;;;AACA;;A;AACC;;A;AAED;AACA;A;;;;;;AAKA;;;;AACA;;A;AACC;;A;AAGD;AACA;A;;;;;;;AAQA;;A;;;;;;A;AAMC;A;AAED;A;;;;;A;AAMC;A;AAED;A;;;;;AC1CA;AACA;;;;AACA;;A;AACC;;A;;AAEA;A;AAGD;AAKA;AACA;AACA;A;;;;;;;AAKA;;;;;;;;;;;;;;;;;;A;;;;;;;AAsBA;;;;;A;;;;;;AAYA;;;;A;AAEC;A;AAGD;AACA;;;;;AACC;;;;AACA;;A;AACC;;A;AAGD;A;;AAED;A;;;;;;;AAKI;AACJ;;;;;;A;A;;A;;AACC;;;;;A;;AAQD;A;;;;;;;AAKA;AAEA;;A;AACC;AACA;AACA;A;AAGD;AAEA;AACA;AAEA;A;;;;;;;;AAKA;AACA;;;;AACA;;A;AACC;;A;AAGD;;AAEA;AACA;AAEA;A;;;;;;;AAKA;A;AAGC;A;A;;;;;;AC9ID;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;A;;;;;;;;AAIA;AACA;AACA;AACA;;;;;;A;A;;A;;AACC;;AACA;AACA;A;;A;;;;;;;;AAKD;AACA;;;;;AACC;AACA;AACA;AACA;AAEI;AACJ;AACA;AAEA;AACA;A;;A;;;;;;;AAOD;;;;;;A;;;;;ACzBA;AAIA;;AACA;AACA;AACA;A;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;AAqDA;;;;;;A;;;;;;A;AAgBC;A;AAED;A;;;;;;AAIA;;AACA;AACA;;AACA;A;;;;;;;;;AAKA;AACI;AACJ;;AACA;;A;AACC;;AACA;A;AAED;A;;;;;AC3GA;AACA;AAIA;A;;;;;;AAIA;;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;A;;;;;;;;AAIA;;AACA;AACA;AACA;AACA;A;;;;;;;;AAKA;;AACA;AACA;A;AAEC;A;A;;;;;;;;AAMD;AAEA;AAEA;AACA;AACA;A;;;;;;;;AAKA;AACA;AAEA;AAEA;A;;;;;;;AAKA;A;;;;;;AC9EA;AACA;AACA;;A;;;;;;;;;;;;;;;;;;;;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;A;A;A;A"} diff --git a/widgets/simulation.go b/widgets/simulation.go index 91912b7..d5fcb35 100644 --- a/widgets/simulation.go +++ b/widgets/simulation.go @@ -1,29 +1,36 @@ package widgets import ( + "bytes" + "encoding/json" "fmt" + "net/http" + "time" "github.com/gopherjs/vecty" "github.com/gopherjs/vecty/elem" "github.com/gopherjs/vecty/event" "github.com/gopherjs/vecty/prop" + "github.com/status-im/simulation/propagation" ) // Simulation represents configuration panel for propagation simulation. type Simulation struct { vecty.Core + networkFn func() []byte // function that returns current network JSON description address string // backend host address } // NewSimulation creates new simulation configuration panel. If simulation // backend host address is not specified, it'll use 'localhost:8084' as a default. -func NewSimulation(address string) *Simulation { +func NewSimulation(address string, networkFn func() []byte) *Simulation { if address == "" { address = "http://localhost:8084" } return &Simulation{ - address: address, + address: address, + networkFn: networkFn, } } @@ -78,6 +85,42 @@ func (s *Simulation) Address() string { } func (s *Simulation) onSimulateClick(e *vecty.Event) { - // TODO(divan): connect to backend and run simulation - fmt.Println("Start simulation") + if s.networkFn == nil { + return + } + + go s.runSimulation() +} + +// runSimulation starts whisper message propagation simulation, +// remotely talking to simulation backend. +func (s *Simulation) runSimulation() { + payload := s.networkFn() + buf := bytes.NewBuffer(payload) + url := "http://" + s.address + "/" + resp, err := http.Post(url, "application/json", buf) + if err != nil { + fmt.Println("[ERROR] POST request to simulation backend:", err) + return + } + + var plog propagation.Log + err = json.NewDecoder(resp.Body).Decode(&plog) + if err != nil { + fmt.Println("[ERROR] decoding response from simulation backend:", err) + return + } + + var max int + for _, ts := range plog.Timestamps { + if ts > max { + max = ts + } + } + + timespan := time.Duration(max) * time.Millisecond + fmt.Printf("Whoa! Got results! %d timestamps over %v\n", len(plog.Timestamps), timespan) + for i, ts := range plog.Timestamps { + fmt.Printf("[%dms] %d / %d links/nodes\n", ts, len(plog.Indices[i]), len(plog.Nodes[i])) + } }